summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-01-28 20:56:31 +0100
committerMichael Stahl <mstahl@redhat.com>2012-01-28 20:56:31 +0100
commitc687d917f059089d41545c995597357568adce92 (patch)
tree9e9f67205cd5b72f1031721273e1534a3a1e5b0f
parent85e7f01992844cc9f1fbba855075f0c59b2942c4 (diff)
replace obsolete "master" branch with README that points at new repoHEADmaster-deletedmaster
-rw-r--r--.gitignore17
-rw-r--r--README20
-rw-r--r--autodoc/inc/ary/actions.hxx105
-rw-r--r--autodoc/inc/ary/ary.hxx93
-rw-r--r--autodoc/inc/ary/ary_disp.hxx114
-rw-r--r--autodoc/inc/ary/arygroup.hxx110
-rw-r--r--autodoc/inc/ary/ceslot.hxx106
-rw-r--r--autodoc/inc/ary/cessentl.hxx91
-rw-r--r--autodoc/inc/ary/cpp/c_builtintype.hxx100
-rw-r--r--autodoc/inc/ary/cpp/c_ce.hxx106
-rw-r--r--autodoc/inc/ary/cpp/c_class.hxx248
-rw-r--r--autodoc/inc/ary/cpp/c_cppentity.hxx94
-rw-r--r--autodoc/inc/ary/cpp/c_de.hxx107
-rw-r--r--autodoc/inc/ary/cpp/c_define.hxx85
-rw-r--r--autodoc/inc/ary/cpp/c_enum.hxx119
-rw-r--r--autodoc/inc/ary/cpp/c_enuval.hxx99
-rw-r--r--autodoc/inc/ary/cpp/c_funct.hxx152
-rw-r--r--autodoc/inc/ary/cpp/c_gate.hxx124
-rw-r--r--autodoc/inc/ary/cpp/c_macro.hxx87
-rw-r--r--autodoc/inc/ary/cpp/c_namesp.hxx197
-rw-r--r--autodoc/inc/ary/cpp/c_osigna.hxx125
-rw-r--r--autodoc/inc/ary/cpp/c_slntry.hxx113
-rw-r--r--autodoc/inc/ary/cpp/c_traits.hxx219
-rw-r--r--autodoc/inc/ary/cpp/c_tydef.hxx103
-rw-r--r--autodoc/inc/ary/cpp/c_type.hxx136
-rw-r--r--autodoc/inc/ary/cpp/c_types4cpp.hxx137
-rw-r--r--autodoc/inc/ary/cpp/c_vari.hxx117
-rw-r--r--autodoc/inc/ary/cpp/c_vfflag.hxx154
-rw-r--r--autodoc/inc/ary/cpp/cp_ce.hxx176
-rw-r--r--autodoc/inc/ary/cpp/cp_def.hxx102
-rw-r--r--autodoc/inc/ary/cpp/cp_type.hxx99
-rw-r--r--autodoc/inc/ary/cpp/inpcontx.hxx219
-rw-r--r--autodoc/inc/ary/cpp/namechain.hxx143
-rw-r--r--autodoc/inc/ary/cpp/usedtype.hxx215
-rw-r--r--autodoc/inc/ary/doc/d_boolean.hxx99
-rw-r--r--autodoc/inc/ary/doc/d_docu.hxx109
-rw-r--r--autodoc/inc/ary/doc/d_node.hxx112
-rw-r--r--autodoc/inc/ary/doc/d_oldcppdocu.hxx133
-rw-r--r--autodoc/inc/ary/doc/d_oldidldocu.hxx114
-rw-r--r--autodoc/inc/ary/doc/d_parametrized.hxx124
-rw-r--r--autodoc/inc/ary/doc/d_types4doc.hxx73
-rw-r--r--autodoc/inc/ary/doc/ht/dht_interpreter.hxx79
-rw-r--r--autodoc/inc/ary/entity.hxx84
-rw-r--r--autodoc/inc/ary/getncast.hxx91
-rw-r--r--autodoc/inc/ary/idl/i_attribute.hxx138
-rw-r--r--autodoc/inc/ary/idl/i_ce.hxx138
-rw-r--r--autodoc/inc/ary/idl/i_ce2s.hxx99
-rw-r--r--autodoc/inc/ary/idl/i_comrela.hxx83
-rw-r--r--autodoc/inc/ary/idl/i_constant.hxx115
-rw-r--r--autodoc/inc/ary/idl/i_constgroup.hxx104
-rw-r--r--autodoc/inc/ary/idl/i_enum.hxx103
-rw-r--r--autodoc/inc/ary/idl/i_enumvalue.hxx106
-rw-r--r--autodoc/inc/ary/idl/i_exception.hxx110
-rw-r--r--autodoc/inc/ary/idl/i_function.hxx163
-rw-r--r--autodoc/inc/ary/idl/i_gate.hxx86
-rw-r--r--autodoc/inc/ary/idl/i_interface.hxx130
-rw-r--r--autodoc/inc/ary/idl/i_module.hxx117
-rw-r--r--autodoc/inc/ary/idl/i_namelookup.hxx98
-rw-r--r--autodoc/inc/ary/idl/i_param.hxx78
-rw-r--r--autodoc/inc/ary/idl/i_property.hxx146
-rw-r--r--autodoc/inc/ary/idl/i_service.hxx142
-rw-r--r--autodoc/inc/ary/idl/i_singleton.hxx108
-rw-r--r--autodoc/inc/ary/idl/i_siservice.hxx110
-rw-r--r--autodoc/inc/ary/idl/i_sisingleton.hxx103
-rw-r--r--autodoc/inc/ary/idl/i_struct.hxx133
-rw-r--r--autodoc/inc/ary/idl/i_structelem.hxx106
-rw-r--r--autodoc/inc/ary/idl/i_traits.hxx81
-rw-r--r--autodoc/inc/ary/idl/i_type.hxx145
-rw-r--r--autodoc/inc/ary/idl/i_typedef.hxx93
-rw-r--r--autodoc/inc/ary/idl/i_types4idl.hxx145
-rw-r--r--autodoc/inc/ary/idl/ik_attribute.hxx88
-rw-r--r--autodoc/inc/ary/idl/ik_ce.hxx148
-rw-r--r--autodoc/inc/ary/idl/ik_constant.hxx78
-rw-r--r--autodoc/inc/ary/idl/ik_constgroup.hxx75
-rw-r--r--autodoc/inc/ary/idl/ik_enum.hxx87
-rw-r--r--autodoc/inc/ary/idl/ik_enumvalue.hxx76
-rw-r--r--autodoc/inc/ary/idl/ik_exception.hxx84
-rw-r--r--autodoc/inc/ary/idl/ik_function.hxx98
-rw-r--r--autodoc/inc/ary/idl/ik_interface.hxx103
-rw-r--r--autodoc/inc/ary/idl/ik_module.hxx117
-rw-r--r--autodoc/inc/ary/idl/ik_property.hxx92
-rw-r--r--autodoc/inc/ary/idl/ik_service.hxx91
-rw-r--r--autodoc/inc/ary/idl/ik_singleton.hxx76
-rw-r--r--autodoc/inc/ary/idl/ik_siservice.hxx78
-rw-r--r--autodoc/inc/ary/idl/ik_sisingleton.hxx76
-rw-r--r--autodoc/inc/ary/idl/ik_struct.hxx93
-rw-r--r--autodoc/inc/ary/idl/ik_structelem.hxx75
-rw-r--r--autodoc/inc/ary/idl/ik_typedef.hxx86
-rw-r--r--autodoc/inc/ary/idl/ip_ce.hxx213
-rw-r--r--autodoc/inc/ary/idl/ip_type.hxx86
-rw-r--r--autodoc/inc/ary/info/all_dts.hxx162
-rw-r--r--autodoc/inc/ary/info/all_tags.hxx291
-rw-r--r--autodoc/inc/ary/info/ci_attag.hxx103
-rw-r--r--autodoc/inc/ary/info/ci_text.hxx87
-rw-r--r--autodoc/inc/ary/info/docstore.hxx119
-rw-r--r--autodoc/inc/ary/info/infodisp.hxx117
-rw-r--r--autodoc/inc/ary/info/inftypes.hxx124
-rw-r--r--autodoc/inc/ary/itrange.hxx83
-rw-r--r--autodoc/inc/ary/loc/loc_dir.hxx148
-rw-r--r--autodoc/inc/ary/loc/loc_file.hxx71
-rw-r--r--autodoc/inc/ary/loc/loc_filebase.hxx75
-rw-r--r--autodoc/inc/ary/loc/loc_le.hxx97
-rw-r--r--autodoc/inc/ary/loc/loc_root.hxx113
-rw-r--r--autodoc/inc/ary/loc/loc_traits.hxx118
-rw-r--r--autodoc/inc/ary/loc/loc_types4loc.hxx57
-rw-r--r--autodoc/inc/ary/loc/locp_le.hxx91
-rw-r--r--autodoc/inc/ary/namesort.hxx78
-rw-r--r--autodoc/inc/ary/object.hxx73
-rw-r--r--autodoc/inc/ary/qualiname.hxx106
-rw-r--r--autodoc/inc/ary/sequentialids.hxx156
-rw-r--r--autodoc/inc/ary/stdconstiter.hxx101
-rw-r--r--autodoc/inc/ary/symtreenode.hxx347
-rw-r--r--autodoc/inc/ary/types.hxx133
-rw-r--r--autodoc/inc/ary/udmhost.hxx65
-rw-r--r--autodoc/inc/ary_i/ci_atag2.hxx81
-rw-r--r--autodoc/inc/ary_i/ci_text2.hxx94
-rw-r--r--autodoc/inc/ary_i/d_token.hxx284
-rw-r--r--autodoc/inc/ary_i/disdocum.hxx148
-rw-r--r--autodoc/inc/autodoc/displaying.hxx78
-rw-r--r--autodoc/inc/autodoc/dsp_html_std.hxx216
-rw-r--r--autodoc/inc/autodoc/dsp_txt_flist.hxx67
-rw-r--r--autodoc/inc/autodoc/filecoli.hxx74
-rw-r--r--autodoc/inc/autodoc/parsing.hxx80
-rw-r--r--autodoc/inc/autodoc/prs_code.hxx79
-rw-r--r--autodoc/inc/autodoc/prs_docu.hxx61
-rw-r--r--autodoc/inc/autodoc/x_parsing.hxx76
-rw-r--r--autodoc/inc/display/corframe.hxx84
-rw-r--r--autodoc/inc/parser/parser.hxx59
-rw-r--r--autodoc/inc/parser/parserinfo.hxx67
-rw-r--r--autodoc/inc/parser/unoidl.hxx81
-rw-r--r--autodoc/prj/build.lst67
-rw-r--r--autodoc/prj/d.lst3
-rw-r--r--autodoc/source/ary/cpp/c_builtintype.cxx130
-rw-r--r--autodoc/source/ary/cpp/c_class.cxx287
-rw-r--r--autodoc/source/ary/cpp/c_de.cxx54
-rw-r--r--autodoc/source/ary/cpp/c_define.cxx79
-rw-r--r--autodoc/source/ary/cpp/c_enum.cxx137
-rw-r--r--autodoc/source/ary/cpp/c_enuval.cxx90
-rw-r--r--autodoc/source/ary/cpp/c_funct.cxx250
-rw-r--r--autodoc/source/ary/cpp/c_macro.cxx81
-rw-r--r--autodoc/source/ary/cpp/c_namesp.cxx295
-rw-r--r--autodoc/source/ary/cpp/c_osigna.cxx79
-rw-r--r--autodoc/source/ary/cpp/c_reposypart.cxx526
-rw-r--r--autodoc/source/ary/cpp/c_reposypart.hxx117
-rw-r--r--autodoc/source/ary/cpp/c_slots.cxx109
-rw-r--r--autodoc/source/ary/cpp/c_slots.hxx87
-rw-r--r--autodoc/source/ary/cpp/c_traits.cxx226
-rw-r--r--autodoc/source/ary/cpp/c_tydef.cxx97
-rw-r--r--autodoc/source/ary/cpp/c_vari.cxx99
-rw-r--r--autodoc/source/ary/cpp/ca_ce.cxx625
-rw-r--r--autodoc/source/ary/cpp/ca_ce.hxx216
-rw-r--r--autodoc/source/ary/cpp/ca_def.cxx114
-rw-r--r--autodoc/source/ary/cpp/ca_def.hxx118
-rw-r--r--autodoc/source/ary/cpp/ca_type.cxx139
-rw-r--r--autodoc/source/ary/cpp/ca_type.hxx130
-rw-r--r--autodoc/source/ary/cpp/cs_ce.cxx107
-rw-r--r--autodoc/source/ary/cpp/cs_ce.hxx108
-rw-r--r--autodoc/source/ary/cpp/cs_def.cxx89
-rw-r--r--autodoc/source/ary/cpp/cs_def.hxx110
-rw-r--r--autodoc/source/ary/cpp/cs_type.cxx115
-rw-r--r--autodoc/source/ary/cpp/cs_type.hxx141
-rw-r--r--autodoc/source/ary/cpp/makefile.mk80
-rw-r--r--autodoc/source/ary/cpp/namechain.cxx199
-rw-r--r--autodoc/source/ary/cpp/tplparam.cxx77
-rw-r--r--autodoc/source/ary/cpp/tplparam.hxx87
-rw-r--r--autodoc/source/ary/cpp/usedtype.cxx578
-rw-r--r--autodoc/source/ary/doc/d_boolean.cxx58
-rw-r--r--autodoc/source/ary/doc/d_docu.cxx62
-rw-r--r--autodoc/source/ary/doc/d_node.cxx72
-rw-r--r--autodoc/source/ary/doc/d_oldcppdocu.cxx339
-rw-r--r--autodoc/source/ary/doc/d_oldidldocu.cxx79
-rw-r--r--autodoc/source/ary/doc/makefile.mk58
-rw-r--r--autodoc/source/ary/idl/i2s_calculator.cxx974
-rw-r--r--autodoc/source/ary/idl/i2s_calculator.hxx298
-rw-r--r--autodoc/source/ary/idl/i_attribute.cxx162
-rw-r--r--autodoc/source/ary/idl/i_ce.cxx71
-rw-r--r--autodoc/source/ary/idl/i_ce2s.cxx87
-rw-r--r--autodoc/source/ary/idl/i_comrela.cxx50
-rw-r--r--autodoc/source/ary/idl/i_constant.cxx126
-rw-r--r--autodoc/source/ary/idl/i_constgroup.cxx117
-rw-r--r--autodoc/source/ary/idl/i_enum.cxx146
-rw-r--r--autodoc/source/ary/idl/i_enumvalue.cxx119
-rw-r--r--autodoc/source/ary/idl/i_exception.cxx142
-rw-r--r--autodoc/source/ary/idl/i_function.cxx168
-rw-r--r--autodoc/source/ary/idl/i_interface.cxx199
-rw-r--r--autodoc/source/ary/idl/i_module.cxx207
-rw-r--r--autodoc/source/ary/idl/i_namelookup.cxx65
-rw-r--r--autodoc/source/ary/idl/i_nnfinder.hxx121
-rw-r--r--autodoc/source/ary/idl/i_param.cxx60
-rw-r--r--autodoc/source/ary/idl/i_property.cxx174
-rw-r--r--autodoc/source/ary/idl/i_reposypart.cxx122
-rw-r--r--autodoc/source/ary/idl/i_reposypart.hxx99
-rw-r--r--autodoc/source/ary/idl/i_service.cxx174
-rw-r--r--autodoc/source/ary/idl/i_singleton.cxx115
-rw-r--r--autodoc/source/ary/idl/i_siservice.cxx124
-rw-r--r--autodoc/source/ary/idl/i_sisingleton.cxx116
-rw-r--r--autodoc/source/ary/idl/i_struct.cxx166
-rw-r--r--autodoc/source/ary/idl/i_structelem.cxx120
-rw-r--r--autodoc/source/ary/idl/i_traits.cxx75
-rw-r--r--autodoc/source/ary/idl/i_typedef.cxx148
-rw-r--r--autodoc/source/ary/idl/ia_ce.cxx584
-rw-r--r--autodoc/source/ary/idl/ia_ce.hxx256
-rw-r--r--autodoc/source/ary/idl/ia_type.cxx367
-rw-r--r--autodoc/source/ary/idl/ia_type.hxx173
-rw-r--r--autodoc/source/ary/idl/is_ce.cxx68
-rw-r--r--autodoc/source/ary/idl/is_ce.hxx82
-rw-r--r--autodoc/source/ary/idl/is_type.cxx86
-rw-r--r--autodoc/source/ary/idl/is_type.hxx125
-rw-r--r--autodoc/source/ary/idl/it_builtin.cxx82
-rw-r--r--autodoc/source/ary/idl/it_builtin.hxx79
-rw-r--r--autodoc/source/ary/idl/it_ce.cxx103
-rw-r--r--autodoc/source/ary/idl/it_ce.hxx91
-rw-r--r--autodoc/source/ary/idl/it_explicit.cxx103
-rw-r--r--autodoc/source/ary/idl/it_explicit.hxx96
-rw-r--r--autodoc/source/ary/idl/it_named.hxx78
-rw-r--r--autodoc/source/ary/idl/it_sequence.cxx94
-rw-r--r--autodoc/source/ary/idl/it_sequence.hxx87
-rw-r--r--autodoc/source/ary/idl/it_tplparam.cxx95
-rw-r--r--autodoc/source/ary/idl/it_tplparam.hxx101
-rw-r--r--autodoc/source/ary/idl/it_xnameroom.cxx103
-rw-r--r--autodoc/source/ary/idl/it_xnameroom.hxx126
-rw-r--r--autodoc/source/ary/idl/makefile.mk87
-rw-r--r--autodoc/source/ary/inc/cpp_internalgate.hxx69
-rw-r--r--autodoc/source/ary/inc/cross_refs.hxx101
-rw-r--r--autodoc/source/ary/inc/idl_internalgate.hxx69
-rw-r--r--autodoc/source/ary/inc/idsort.hxx55
-rw-r--r--autodoc/source/ary/inc/loc_internalgate.hxx66
-rw-r--r--autodoc/source/ary/inc/nametreenode.hxx213
-rw-r--r--autodoc/source/ary/inc/reposy.hxx94
-rw-r--r--autodoc/source/ary/inc/sci_impl.hxx416
-rw-r--r--autodoc/source/ary/inc/slots.hxx166
-rw-r--r--autodoc/source/ary/inc/sorted_idset.hxx99
-rw-r--r--autodoc/source/ary/inc/sortedids.hxx240
-rw-r--r--autodoc/source/ary/inc/store/s_base.hxx183
-rw-r--r--autodoc/source/ary/inc/store/s_iterator.hxx240
-rw-r--r--autodoc/source/ary/inc/store/s_storage.hxx297
-rw-r--r--autodoc/source/ary/inc/traits_impl.hxx122
-rw-r--r--autodoc/source/ary/info/all_dts.cxx107
-rw-r--r--autodoc/source/ary/info/all_tags.cxx571
-rw-r--r--autodoc/source/ary/info/ci_attag.cxx95
-rw-r--r--autodoc/source/ary/info/ci_text.cxx73
-rw-r--r--autodoc/source/ary/info/makefile.mk60
-rw-r--r--autodoc/source/ary/kernel/ary_disp.cxx111
-rw-r--r--autodoc/source/ary/kernel/cessentl.cxx89
-rw-r--r--autodoc/source/ary/kernel/makefile.mk63
-rw-r--r--autodoc/source/ary/kernel/namesort.cxx103
-rw-r--r--autodoc/source/ary/kernel/qualiname.cxx108
-rw-r--r--autodoc/source/ary/kernel/reposy.cxx221
-rw-r--r--autodoc/source/ary/kernel/slots.cxx167
-rw-r--r--autodoc/source/ary/loc/loc_dir.cxx137
-rw-r--r--autodoc/source/ary/loc/loc_file.cxx69
-rw-r--r--autodoc/source/ary/loc/loc_filebase.cxx66
-rw-r--r--autodoc/source/ary/loc/loc_root.cxx86
-rw-r--r--autodoc/source/ary/loc/loc_traits.cxx94
-rw-r--r--autodoc/source/ary/loc/loca_le.cxx184
-rw-r--r--autodoc/source/ary/loc/loca_le.hxx101
-rw-r--r--autodoc/source/ary/loc/locs_le.cxx70
-rw-r--r--autodoc/source/ary/loc/locs_le.hxx91
-rw-r--r--autodoc/source/ary/loc/makefile.mk61
-rw-r--r--autodoc/source/ary_i/kernel/ci_atag2.cxx59
-rw-r--r--autodoc/source/ary_i/kernel/ci_text2.cxx141
-rw-r--r--autodoc/source/ary_i/kernel/d_token.cxx189
-rw-r--r--autodoc/source/ary_i/kernel/makefile.mk60
-rw-r--r--autodoc/source/display/html/aryattrs.cxx251
-rw-r--r--autodoc/source/display/html/aryattrs.hxx157
-rw-r--r--autodoc/source/display/html/cfrstd.cxx347
-rw-r--r--autodoc/source/display/html/chd_udk2.cxx204
-rw-r--r--autodoc/source/display/html/cre_link.cxx272
-rw-r--r--autodoc/source/display/html/cre_link.hxx136
-rw-r--r--autodoc/source/display/html/dsply_cl.cxx111
-rw-r--r--autodoc/source/display/html/dsply_cl.hxx90
-rw-r--r--autodoc/source/display/html/dsply_da.cxx202
-rw-r--r--autodoc/source/display/html/dsply_da.hxx110
-rw-r--r--autodoc/source/display/html/dsply_op.cxx210
-rw-r--r--autodoc/source/display/html/dsply_op.hxx107
-rw-r--r--autodoc/source/display/html/easywri.cxx67
-rw-r--r--autodoc/source/display/html/easywri.hxx82
-rw-r--r--autodoc/source/display/html/hd_chlst.cxx592
-rw-r--r--autodoc/source/display/html/hd_chlst.hxx209
-rw-r--r--autodoc/source/display/html/hd_docu.cxx486
-rw-r--r--autodoc/source/display/html/hd_docu.hxx199
-rw-r--r--autodoc/source/display/html/hdimpl.cxx549
-rw-r--r--autodoc/source/display/html/hdimpl.hxx250
-rw-r--r--autodoc/source/display/html/html_kit.cxx307
-rw-r--r--autodoc/source/display/html/html_kit.hxx201
-rw-r--r--autodoc/source/display/html/makefile.mk78
-rw-r--r--autodoc/source/display/html/nav_main.cxx379
-rw-r--r--autodoc/source/display/html/nav_main.hxx121
-rw-r--r--autodoc/source/display/html/navibar.cxx318
-rw-r--r--autodoc/source/display/html/navibar.hxx121
-rw-r--r--autodoc/source/display/html/opageenv.cxx492
-rw-r--r--autodoc/source/display/html/opageenv.hxx131
-rw-r--r--autodoc/source/display/html/outfile.cxx390
-rw-r--r--autodoc/source/display/html/outfile.hxx89
-rw-r--r--autodoc/source/display/html/pagemake.cxx578
-rw-r--r--autodoc/source/display/html/pagemake.hxx167
-rw-r--r--autodoc/source/display/html/pm_aldef.cxx248
-rw-r--r--autodoc/source/display/html/pm_aldef.hxx91
-rw-r--r--autodoc/source/display/html/pm_base.cxx79
-rw-r--r--autodoc/source/display/html/pm_base.hxx90
-rw-r--r--autodoc/source/display/html/pm_class.cxx813
-rw-r--r--autodoc/source/display/html/pm_class.hxx133
-rw-r--r--autodoc/source/display/html/pm_help.cxx234
-rw-r--r--autodoc/source/display/html/pm_help.hxx65
-rw-r--r--autodoc/source/display/html/pm_index.cxx320
-rw-r--r--autodoc/source/display/html/pm_index.hxx138
-rw-r--r--autodoc/source/display/html/pm_namsp.cxx176
-rw-r--r--autodoc/source/display/html/pm_namsp.hxx80
-rw-r--r--autodoc/source/display/html/pm_start.cxx139
-rw-r--r--autodoc/source/display/html/pm_start.hxx65
-rw-r--r--autodoc/source/display/html/protarea.cxx140
-rw-r--r--autodoc/source/display/html/protarea.hxx96
-rw-r--r--autodoc/source/display/html/strconst.hxx80
-rw-r--r--autodoc/source/display/idl/hfi_constgroup.cxx140
-rw-r--r--autodoc/source/display/idl/hfi_constgroup.hxx68
-rw-r--r--autodoc/source/display/idl/hfi_doc.cxx194
-rw-r--r--autodoc/source/display/idl/hfi_doc.hxx88
-rw-r--r--autodoc/source/display/idl/hfi_enum.cxx136
-rw-r--r--autodoc/source/display/idl/hfi_enum.hxx70
-rw-r--r--autodoc/source/display/idl/hfi_globalindex.cxx278
-rw-r--r--autodoc/source/display/idl/hfi_globalindex.hxx91
-rw-r--r--autodoc/source/display/idl/hfi_hierarchy.cxx205
-rw-r--r--autodoc/source/display/idl/hfi_hierarchy.hxx127
-rw-r--r--autodoc/source/display/idl/hfi_interface.cxx360
-rw-r--r--autodoc/source/display/idl/hfi_interface.hxx93
-rw-r--r--autodoc/source/display/idl/hfi_linklist.cxx380
-rw-r--r--autodoc/source/display/idl/hfi_linklist.hxx147
-rw-r--r--autodoc/source/display/idl/hfi_method.cxx238
-rw-r--r--autodoc/source/display/idl/hfi_method.hxx106
-rw-r--r--autodoc/source/display/idl/hfi_module.cxx302
-rw-r--r--autodoc/source/display/idl/hfi_module.hxx85
-rw-r--r--autodoc/source/display/idl/hfi_navibar.cxx227
-rw-r--r--autodoc/source/display/idl/hfi_navibar.hxx85
-rw-r--r--autodoc/source/display/idl/hfi_property.cxx453
-rw-r--r--autodoc/source/display/idl/hfi_property.hxx185
-rw-r--r--autodoc/source/display/idl/hfi_service.cxx365
-rw-r--r--autodoc/source/display/idl/hfi_service.hxx101
-rw-r--r--autodoc/source/display/idl/hfi_singleton.cxx136
-rw-r--r--autodoc/source/display/idl/hfi_singleton.hxx71
-rw-r--r--autodoc/source/display/idl/hfi_siservice.cxx178
-rw-r--r--autodoc/source/display/idl/hfi_siservice.hxx74
-rw-r--r--autodoc/source/display/idl/hfi_struct.cxx206
-rw-r--r--autodoc/source/display/idl/hfi_struct.hxx81
-rw-r--r--autodoc/source/display/idl/hfi_tag.cxx357
-rw-r--r--autodoc/source/display/idl/hfi_tag.hxx180
-rw-r--r--autodoc/source/display/idl/hfi_typedef.cxx95
-rw-r--r--autodoc/source/display/idl/hfi_typedef.hxx67
-rw-r--r--autodoc/source/display/idl/hfi_typetext.cxx760
-rw-r--r--autodoc/source/display/idl/hfi_typetext.hxx160
-rw-r--r--autodoc/source/display/idl/hfi_xrefpage.cxx276
-rw-r--r--autodoc/source/display/idl/hfi_xrefpage.hxx107
-rw-r--r--autodoc/source/display/idl/hi_ary.cxx273
-rw-r--r--autodoc/source/display/idl/hi_ary.hxx164
-rw-r--r--autodoc/source/display/idl/hi_display.cxx200
-rw-r--r--autodoc/source/display/idl/hi_env.cxx202
-rw-r--r--autodoc/source/display/idl/hi_env.hxx163
-rw-r--r--autodoc/source/display/idl/hi_factory.cxx323
-rw-r--r--autodoc/source/display/idl/hi_factory.hxx172
-rw-r--r--autodoc/source/display/idl/hi_linkhelper.cxx99
-rw-r--r--autodoc/source/display/idl/hi_linkhelper.hxx108
-rw-r--r--autodoc/source/display/idl/hi_main.cxx766
-rw-r--r--autodoc/source/display/idl/hi_main.hxx181
-rw-r--r--autodoc/source/display/idl/makefile.mk77
-rw-r--r--autodoc/source/display/inc/cfrstd.hxx82
-rw-r--r--autodoc/source/display/inc/html/chd_udk2.hxx98
-rw-r--r--autodoc/source/display/inc/idl/hi_display.hxx113
-rw-r--r--autodoc/source/display/inc/toolkit/hf_docentry.hxx62
-rw-r--r--autodoc/source/display/inc/toolkit/hf_funcdecl.hxx74
-rw-r--r--autodoc/source/display/inc/toolkit/hf_linachain.hxx75
-rw-r--r--autodoc/source/display/inc/toolkit/hf_navi_main.hxx94
-rw-r--r--autodoc/source/display/inc/toolkit/hf_navi_sub.hxx83
-rw-r--r--autodoc/source/display/inc/toolkit/hf_title.hxx94
-rw-r--r--autodoc/source/display/inc/toolkit/htmlfactory.hxx104
-rw-r--r--autodoc/source/display/inc/toolkit/htmlfile.hxx88
-rw-r--r--autodoc/source/display/inc/toolkit/out_node.hxx132
-rw-r--r--autodoc/source/display/inc/toolkit/out_position.hxx120
-rw-r--r--autodoc/source/display/inc/toolkit/out_tree.hxx139
-rw-r--r--autodoc/source/display/inc/toolkit/outputstack.hxx75
-rw-r--r--autodoc/source/display/kernel/displfct.cxx91
-rw-r--r--autodoc/source/display/kernel/displfct.hxx65
-rw-r--r--autodoc/source/display/kernel/makefile.mk55
-rw-r--r--autodoc/source/display/toolkit/hf_docentry.cxx77
-rw-r--r--autodoc/source/display/toolkit/hf_funcdecl.cxx159
-rw-r--r--autodoc/source/display/toolkit/hf_linachain.cxx113
-rw-r--r--autodoc/source/display/toolkit/hf_navi_main.cxx240
-rw-r--r--autodoc/source/display/toolkit/hf_navi_sub.cxx105
-rw-r--r--autodoc/source/display/toolkit/hf_title.cxx172
-rw-r--r--autodoc/source/display/toolkit/htmlfile.cxx213
-rw-r--r--autodoc/source/display/toolkit/makefile.mk64
-rw-r--r--autodoc/source/display/toolkit/out_node.cxx192
-rw-r--r--autodoc/source/display/toolkit/out_position.cxx242
-rw-r--r--autodoc/source/display/toolkit/out_tree.cxx56
-rw-r--r--autodoc/source/display/toolkit/outputstack.cxx60
-rw-r--r--autodoc/source/exes/adc_uni/adc_cl.cxx402
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmd.hxx134
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmd_parse.cxx345
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmd_parse.hxx211
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmds.cxx180
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmds.hxx128
-rw-r--r--autodoc/source/exes/adc_uni/adc_msg.cxx211
-rw-r--r--autodoc/source/exes/adc_uni/cmd_run.cxx281
-rw-r--r--autodoc/source/exes/adc_uni/cmd_run.hxx107
-rw-r--r--autodoc/source/exes/adc_uni/cmd_sincedata.cxx132
-rw-r--r--autodoc/source/exes/adc_uni/cmd_sincedata.hxx94
-rw-r--r--autodoc/source/exes/adc_uni/main.cxx56
-rw-r--r--autodoc/source/exes/adc_uni/makefile.mk104
-rw-r--r--autodoc/source/exes/adc_uni/spec-CommandLine.txt181
-rw-r--r--autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt0
-rw-r--r--autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt49
-rw-r--r--autodoc/source/inc/adc_cl.hxx195
-rw-r--r--autodoc/source/inc/adc_msg.hxx144
-rw-r--r--autodoc/source/inc/docu_node_ids.hxx67
-rw-r--r--autodoc/source/inc/estack.hxx96
-rw-r--r--autodoc/source/inc/luxenum.hxx105
-rw-r--r--autodoc/source/inc/manip.hxx63
-rw-r--r--autodoc/source/inc/precomp.h69
-rw-r--r--autodoc/source/inc/prprpr.hxx61
-rw-r--r--autodoc/source/inc/tools/filecoll.hxx71
-rw-r--r--autodoc/source/inc/tools/tkpchars.hxx172
-rw-r--r--autodoc/source/mkinc/fullcpp.mk55
-rw-r--r--autodoc/source/parser/adoc/a_rdocu.cxx92
-rw-r--r--autodoc/source/parser/adoc/adoc_tok.cxx49
-rw-r--r--autodoc/source/parser/adoc/cx_a_std.cxx518
-rw-r--r--autodoc/source/parser/adoc/cx_a_sub.cxx184
-rw-r--r--autodoc/source/parser/adoc/docu_pe.cxx405
-rw-r--r--autodoc/source/parser/adoc/makefile.mk62
-rw-r--r--autodoc/source/parser/adoc/prs_adoc.cxx59
-rw-r--r--autodoc/source/parser/adoc/tk_attag.cxx86
-rw-r--r--autodoc/source/parser/adoc/tk_docw.cxx130
-rw-r--r--autodoc/source/parser/cpp/all_toks.cxx154
-rw-r--r--autodoc/source/parser/cpp/all_toks.hxx221
-rw-r--r--autodoc/source/parser/cpp/c_dealer.cxx149
-rw-r--r--autodoc/source/parser/cpp/c_dealer.hxx110
-rw-r--r--autodoc/source/parser/cpp/c_rcode.cxx161
-rw-r--r--autodoc/source/parser/cpp/c_rcode.hxx106
-rw-r--r--autodoc/source/parser/cpp/cpp_pe.cxx80
-rw-r--r--autodoc/source/parser/cpp/cpp_pe.hxx83
-rw-r--r--autodoc/source/parser/cpp/cpp_tok.hxx65
-rw-r--r--autodoc/source/parser/cpp/cx_base.cxx79
-rw-r--r--autodoc/source/parser/cpp/cx_base.hxx98
-rw-r--r--autodoc/source/parser/cpp/cx_c_pp.cxx182
-rw-r--r--autodoc/source/parser/cpp/cx_c_pp.hxx97
-rw-r--r--autodoc/source/parser/cpp/cx_c_std.cxx531
-rw-r--r--autodoc/source/parser/cpp/cx_c_std.hxx94
-rw-r--r--autodoc/source/parser/cpp/cx_c_sub.cxx160
-rw-r--r--autodoc/source/parser/cpp/cx_c_sub.hxx105
-rw-r--r--autodoc/source/parser/cpp/cxt2ary.cxx360
-rw-r--r--autodoc/source/parser/cpp/cxt2ary.hxx201
-rw-r--r--autodoc/source/parser/cpp/defdescr.cxx227
-rw-r--r--autodoc/source/parser/cpp/defdescr.hxx100
-rw-r--r--autodoc/source/parser/cpp/fevnthdl.hxx107
-rw-r--r--autodoc/source/parser/cpp/icprivow.cxx195
-rw-r--r--autodoc/source/parser/cpp/icprivow.hxx126
-rw-r--r--autodoc/source/parser/cpp/makefile.mk87
-rw-r--r--autodoc/source/parser/cpp/pe_base.cxx226
-rw-r--r--autodoc/source/parser/cpp/pe_base.hxx126
-rw-r--r--autodoc/source/parser/cpp/pe_class.cxx496
-rw-r--r--autodoc/source/parser/cpp/pe_class.hxx255
-rw-r--r--autodoc/source/parser/cpp/pe_defs.cxx182
-rw-r--r--autodoc/source/parser/cpp/pe_defs.hxx96
-rw-r--r--autodoc/source/parser/cpp/pe_enum.cxx191
-rw-r--r--autodoc/source/parser/cpp/pe_enum.hxx134
-rw-r--r--autodoc/source/parser/cpp/pe_enval.cxx170
-rw-r--r--autodoc/source/parser/cpp/pe_enval.hxx101
-rw-r--r--autodoc/source/parser/cpp/pe_expr.cxx179
-rw-r--r--autodoc/source/parser/cpp/pe_expr.hxx107
-rw-r--r--autodoc/source/parser/cpp/pe_file.cxx320
-rw-r--r--autodoc/source/parser/cpp/pe_file.hxx198
-rw-r--r--autodoc/source/parser/cpp/pe_funct.cxx612
-rw-r--r--autodoc/source/parser/cpp/pe_funct.hxx284
-rw-r--r--autodoc/source/parser/cpp/pe_ignor.cxx118
-rw-r--r--autodoc/source/parser/cpp/pe_ignor.hxx77
-rw-r--r--autodoc/source/parser/cpp/pe_namsp.cxx165
-rw-r--r--autodoc/source/parser/cpp/pe_namsp.hxx101
-rw-r--r--autodoc/source/parser/cpp/pe_param.cxx282
-rw-r--r--autodoc/source/parser/cpp/pe_param.hxx141
-rw-r--r--autodoc/source/parser/cpp/pe_tpltp.cxx178
-rw-r--r--autodoc/source/parser/cpp/pe_tpltp.hxx108
-rw-r--r--autodoc/source/parser/cpp/pe_tydef.cxx145
-rw-r--r--autodoc/source/parser/cpp/pe_tydef.hxx93
-rw-r--r--autodoc/source/parser/cpp/pe_type.cxx556
-rw-r--r--autodoc/source/parser/cpp/pe_type.hxx187
-rw-r--r--autodoc/source/parser/cpp/pe_vafu.cxx651
-rw-r--r--autodoc/source/parser/cpp/pe_vafu.hxx292
-rw-r--r--autodoc/source/parser/cpp/pe_vari.cxx189
-rw-r--r--autodoc/source/parser/cpp/pe_vari.hxx132
-rw-r--r--autodoc/source/parser/cpp/pev.hxx306
-rw-r--r--autodoc/source/parser/cpp/preproc.cxx233
-rw-r--r--autodoc/source/parser/cpp/preproc.hxx118
-rw-r--r--autodoc/source/parser/cpp/prs_cpp.cxx250
-rw-r--r--autodoc/source/parser/cpp/sdocdist.hxx161
-rw-r--r--autodoc/source/parser/cpp/sfscope.hxx72
-rw-r--r--autodoc/source/parser/cpp/sownstck.hxx327
-rw-r--r--autodoc/source/parser/cpp/srecover.hxx134
-rw-r--r--autodoc/source/parser/cpp/tkp_cpp.cxx94
-rw-r--r--autodoc/source/parser/cpp/tkp_cpp.hxx101
-rw-r--r--autodoc/source/parser/cpp/tokintpr.hxx120
-rw-r--r--autodoc/source/parser/inc/adoc/a_rdocu.hxx73
-rw-r--r--autodoc/source/parser/inc/adoc/adoc_tok.hxx64
-rw-r--r--autodoc/source/parser/inc/adoc/atokdeal.hxx62
-rw-r--r--autodoc/source/parser/inc/adoc/cx_a_std.hxx107
-rw-r--r--autodoc/source/parser/inc/adoc/cx_a_sub.hxx148
-rw-r--r--autodoc/source/parser/inc/adoc/docu_pe.hxx195
-rw-r--r--autodoc/source/parser/inc/adoc/prs_adoc.hxx57
-rw-r--r--autodoc/source/parser/inc/adoc/tk_attag.hxx100
-rw-r--r--autodoc/source/parser/inc/adoc/tk_docw.hxx119
-rw-r--r--autodoc/source/parser/inc/adoc/tokintpr.hxx119
-rw-r--r--autodoc/source/parser/inc/cpp/ctokdeal.hxx76
-rw-r--r--autodoc/source/parser/inc/cpp/prs_cpp.hxx70
-rw-r--r--autodoc/source/parser/inc/doc_deal.hxx92
-rw-r--r--autodoc/source/parser/inc/semantic/callf.hxx289
-rw-r--r--autodoc/source/parser/inc/semantic/parseenv.hxx112
-rw-r--r--autodoc/source/parser/inc/semantic/sub_pe.hxx114
-rw-r--r--autodoc/source/parser/inc/semantic/sub_peu.hxx133
-rw-r--r--autodoc/source/parser/inc/tokens/parseinc.hxx205
-rw-r--r--autodoc/source/parser/inc/tokens/stmstarr.hxx87
-rw-r--r--autodoc/source/parser/inc/tokens/stmstate.hxx70
-rw-r--r--autodoc/source/parser/inc/tokens/stmstfin.hxx82
-rw-r--r--autodoc/source/parser/inc/tokens/tkp.hxx95
-rw-r--r--autodoc/source/parser/inc/tokens/tkpcontx.hxx142
-rw-r--r--autodoc/source/parser/inc/tokens/tkpstama.hxx125
-rw-r--r--autodoc/source/parser/inc/tokens/tokdeal.hxx59
-rw-r--r--autodoc/source/parser/inc/tokens/token.hxx68
-rw-r--r--autodoc/source/parser/inc/tokens/tokproct.hxx85
-rw-r--r--autodoc/source/parser/inc/x_docu.hxx61
-rw-r--r--autodoc/source/parser/inc/x_parse.hxx66
-rw-r--r--autodoc/source/parser/kernel/makefile.mk58
-rw-r--r--autodoc/source/parser/kernel/parsefct.cxx83
-rw-r--r--autodoc/source/parser/kernel/parsefct.hxx62
-rw-r--r--autodoc/source/parser/kernel/x_docu.cxx64
-rw-r--r--autodoc/source/parser/kernel/x_parse.cxx101
-rw-r--r--autodoc/source/parser/semantic/makefile.mk58
-rw-r--r--autodoc/source/parser/semantic/parseenv.cxx89
-rw-r--r--autodoc/source/parser/tokens/makefile.mk62
-rw-r--r--autodoc/source/parser/tokens/stmstarr.cxx101
-rw-r--r--autodoc/source/parser/tokens/stmstate.cxx48
-rw-r--r--autodoc/source/parser/tokens/stmstfin.cxx63
-rw-r--r--autodoc/source/parser/tokens/tkp.cxx74
-rw-r--r--autodoc/source/parser/tokens/tkpcontx.cxx70
-rw-r--r--autodoc/source/parser/tokens/tkpstama.cxx175
-rw-r--r--autodoc/source/parser/tokens/tokdeal.cxx52
-rw-r--r--autodoc/source/parser_i/idl/cx_idlco.cxx547
-rw-r--r--autodoc/source/parser_i/idl/cx_sub.cxx149
-rw-r--r--autodoc/source/parser_i/idl/distrib.cxx266
-rw-r--r--autodoc/source/parser_i/idl/makefile.mk84
-rw-r--r--autodoc/source/parser_i/idl/parsenv2.cxx215
-rw-r--r--autodoc/source/parser_i/idl/pe_attri.cxx297
-rw-r--r--autodoc/source/parser_i/idl/pe_const.cxx282
-rw-r--r--autodoc/source/parser_i/idl/pe_enum2.cxx253
-rw-r--r--autodoc/source/parser_i/idl/pe_evalu.cxx184
-rw-r--r--autodoc/source/parser_i/idl/pe_excp.cxx301
-rw-r--r--autodoc/source/parser_i/idl/pe_file2.cxx320
-rw-r--r--autodoc/source/parser_i/idl/pe_func2.cxx447
-rw-r--r--autodoc/source/parser_i/idl/pe_iface.cxx470
-rw-r--r--autodoc/source/parser_i/idl/pe_property.cxx240
-rw-r--r--autodoc/source/parser_i/idl/pe_selem.cxx208
-rw-r--r--autodoc/source/parser_i/idl/pe_servi.cxx395
-rw-r--r--autodoc/source/parser_i/idl/pe_singl.cxx250
-rw-r--r--autodoc/source/parser_i/idl/pe_struc.cxx330
-rw-r--r--autodoc/source/parser_i/idl/pe_tydf2.cxx186
-rw-r--r--autodoc/source/parser_i/idl/pe_type2.cxx317
-rw-r--r--autodoc/source/parser_i/idl/pe_vari2.cxx175
-rw-r--r--autodoc/source/parser_i/idl/pestate.cxx142
-rw-r--r--autodoc/source/parser_i/idl/semnode.cxx85
-rw-r--r--autodoc/source/parser_i/idl/tk_const.cxx59
-rw-r--r--autodoc/source/parser_i/idl/tk_ident.cxx70
-rw-r--r--autodoc/source/parser_i/idl/tk_keyw.cxx227
-rw-r--r--autodoc/source/parser_i/idl/tk_punct.cxx116
-rw-r--r--autodoc/source/parser_i/idl/tkp_uidl.cxx76
-rw-r--r--autodoc/source/parser_i/idl/unoidl.cxx168
-rw-r--r--autodoc/source/parser_i/idoc/cx_docu2.cxx269
-rw-r--r--autodoc/source/parser_i/idoc/cx_dsapi.cxx535
-rw-r--r--autodoc/source/parser_i/idoc/docu_pe2.cxx694
-rw-r--r--autodoc/source/parser_i/idoc/makefile.mk62
-rw-r--r--autodoc/source/parser_i/idoc/tk_atag2.cxx85
-rw-r--r--autodoc/source/parser_i/idoc/tk_docw2.cxx121
-rw-r--r--autodoc/source/parser_i/idoc/tk_html.cxx60
-rw-r--r--autodoc/source/parser_i/idoc/tk_xml.cxx176
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/cx_docu2.hxx235
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/cx_dsapi.hxx125
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx183
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/dsapitok.hxx67
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/tk_atag2.hxx90
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/tk_docw2.hxx123
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/tk_html.hxx75
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/tk_xml.hxx203
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/tokintpr.hxx96
-rw-r--r--autodoc/source/parser_i/inc/s2_dsapi/tokrecv.hxx62
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/cx_idlco.hxx101
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/cx_sub.hxx133
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/distrib.hxx274
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/parsenv2.hxx145
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_attri.hxx137
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_const.hxx147
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_enum2.hxx133
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_evalu.hxx129
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_excp.hxx261
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_file2.hxx142
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx165
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_iface.hxx186
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_modul.hxx65
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_property.hxx125
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_selem.hxx124
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_servi.hxx151
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_singl.hxx127
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_struc.hxx287
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_tydf2.hxx126
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_type2.hxx119
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_vari2.hxx109
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pestate.hxx108
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/semnode.hxx99
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/smp_uidl.hxx84
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tk_const.hxx66
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tk_ident.hxx77
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tk_keyw.hxx253
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tk_punct.hxx115
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tkp_uidl.hxx86
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tokintpr.hxx101
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx95
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/tokrecv.hxx62
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/uidl_tok.hxx66
-rw-r--r--autodoc/source/parser_i/inc/semantic/parsenv2.hxx53
-rw-r--r--autodoc/source/parser_i/inc/tokens/stmstar2.hxx85
-rw-r--r--autodoc/source/parser_i/inc/tokens/stmstat2.hxx70
-rw-r--r--autodoc/source/parser_i/inc/tokens/stmstfi2.hxx82
-rw-r--r--autodoc/source/parser_i/inc/tokens/tkp2.hxx86
-rw-r--r--autodoc/source/parser_i/inc/tokens/tkpcont2.hxx125
-rw-r--r--autodoc/source/parser_i/inc/tokens/tkpstam2.hxx123
-rw-r--r--autodoc/source/parser_i/inc/tokens/token2.hxx65
-rw-r--r--autodoc/source/parser_i/inc/x_parse2.hxx70
-rw-r--r--autodoc/source/parser_i/tokens/makefile.mk63
-rw-r--r--autodoc/source/parser_i/tokens/stmstar2.cxx104
-rw-r--r--autodoc/source/parser_i/tokens/stmstat2.cxx48
-rw-r--r--autodoc/source/parser_i/tokens/stmstfi2.cxx63
-rw-r--r--autodoc/source/parser_i/tokens/tkp2.cxx64
-rw-r--r--autodoc/source/parser_i/tokens/tkpcont2.cxx67
-rw-r--r--autodoc/source/parser_i/tokens/tkpstam2.cxx177
-rw-r--r--autodoc/source/parser_i/tokens/x_parse2.cxx63
-rw-r--r--autodoc/source/tools/filecoll.cxx134
-rw-r--r--autodoc/source/tools/makefile.mk58
-rw-r--r--autodoc/source/tools/tkpchars.cxx161
-rw-r--r--cosv/inc/cosv/bstream.hxx152
-rw-r--r--cosv/inc/cosv/comdline.hxx72
-rw-r--r--cosv/inc/cosv/comfunc.hxx79
-rw-r--r--cosv/inc/cosv/commandline.hxx183
-rw-r--r--cosv/inc/cosv/csv_env.hxx157
-rw-r--r--cosv/inc/cosv/csv_ostream.hxx136
-rw-r--r--cosv/inc/cosv/csv_precomp.h49
-rw-r--r--cosv/inc/cosv/dirchain.hxx155
-rw-r--r--cosv/inc/cosv/file.hxx130
-rw-r--r--cosv/inc/cosv/openclose.hxx146
-rw-r--r--cosv/inc/cosv/persist.hxx107
-rw-r--r--cosv/inc/cosv/ploc.hxx115
-rw-r--r--cosv/inc/cosv/ploc_dir.hxx118
-rw-r--r--cosv/inc/cosv/plocroot.hxx82
-rw-r--r--cosv/inc/cosv/std_outp.hxx138
-rw-r--r--cosv/inc/cosv/str_types.hxx97
-rw-r--r--cosv/inc/cosv/streamstr.hxx322
-rw-r--r--cosv/inc/cosv/string.hxx510
-rw-r--r--cosv/inc/cosv/stringdata.hxx137
-rw-r--r--cosv/inc/cosv/tpl/dyn.hxx241
-rw-r--r--cosv/inc/cosv/tpl/funcall.hxx310
-rw-r--r--cosv/inc/cosv/tpl/processor.hxx186
-rw-r--r--cosv/inc/cosv/tpl/range.hxx194
-rw-r--r--cosv/inc/cosv/tpl/swelist.hxx371
-rw-r--r--cosv/inc/cosv/tpl/tpltools.hxx231
-rw-r--r--cosv/inc/cosv/tpl/vvector.hxx542
-rw-r--r--cosv/inc/cosv/x.hxx73
-rw-r--r--cosv/prj/build.lst16
-rw-r--r--cosv/prj/d.lst8
-rw-r--r--cosv/source/comphelp/badcast.cxx47
-rw-r--r--cosv/source/comphelp/makefile.mk55
-rw-r--r--cosv/source/fullcpp.mk56
-rw-r--r--cosv/source/inc/precomp.h38
-rw-r--r--cosv/source/service/comdline.cxx59
-rw-r--r--cosv/source/service/comfunc.cxx53
-rw-r--r--cosv/source/service/csv_ostream.cxx94
-rw-r--r--cosv/source/service/makefile.mk58
-rw-r--r--cosv/source/service/std_outp.cxx83
-rw-r--r--cosv/source/storage/dirchain.cxx118
-rw-r--r--cosv/source/storage/file.cxx203
-rw-r--r--cosv/source/storage/makefile.mk52
-rw-r--r--cosv/source/storage/persist.cxx115
-rw-r--r--cosv/source/storage/ploc.cxx131
-rw-r--r--cosv/source/storage/ploc_dir.cxx361
-rw-r--r--cosv/source/storage/plocroot.cxx527
-rw-r--r--cosv/source/strings/makefile.mk58
-rw-r--r--cosv/source/strings/str_types.cxx46
-rw-r--r--cosv/source/strings/streamstr.cxx659
-rw-r--r--cosv/source/strings/string.cxx239
-rw-r--r--cosv/source/unittest/file_ut.cxx123
-rw-r--r--cosv/source/unittest/makefile.mk72
-rw-r--r--cosv/source/unittest/string_ut.cxx76
-rw-r--r--cosv/source/unittest/ut.hxx55
-rw-r--r--cosv/source/unittest/ut_main.cxx49
-rw-r--r--cosv/util/makefile.mk58
-rw-r--r--odk/cfgWin.js971
-rwxr-xr-xodk/configure.pl803
-rw-r--r--odk/docs/common/ref/idl.css130
-rw-r--r--odk/docs/cpp/ref/cpp.css127
-rw-r--r--odk/docs/images/arrow-1.gifbin98 -> 0 bytes
-rw-r--r--odk/docs/images/arrow-2.gifbin68 -> 0 bytes
-rw-r--r--odk/docs/images/arrow-3.gifbin98 -> 0 bytes
-rw-r--r--odk/docs/images/bg_table.gifbin42 -> 0 bytes
-rw-r--r--odk/docs/images/bg_table.pngbin128 -> 0 bytes
-rwxr-xr-xodk/docs/images/bg_table2.gifbin44 -> 0 bytes
-rw-r--r--odk/docs/images/bg_table2.pngbin128 -> 0 bytes
-rwxr-xr-xodk/docs/images/bg_table3.gifbin44 -> 0 bytes
-rw-r--r--odk/docs/images/bg_table3.pngbin128 -> 0 bytes
-rw-r--r--odk/docs/images/bluball.gifbin103 -> 0 bytes
-rw-r--r--odk/docs/images/nada.gifbin49 -> 0 bytes
-rw-r--r--odk/docs/images/nav_down.pngbin224 -> 0 bytes
-rw-r--r--odk/docs/images/nav_home.pngbin471 -> 0 bytes
-rw-r--r--odk/docs/images/nav_left.pngbin223 -> 0 bytes
-rw-r--r--odk/docs/images/nav_right.pngbin225 -> 0 bytes
-rw-r--r--odk/docs/images/nav_up.pngbin211 -> 0 bytes
-rw-r--r--odk/docs/images/odk-footer-logo.gifbin850 -> 0 bytes
-rw-r--r--odk/docs/images/ooo-main-app_32.pngbin2429 -> 0 bytes
-rw-r--r--odk/docs/images/orc-main-app_32.pngbin2496 -> 0 bytes
-rw-r--r--odk/docs/images/sdk_head-1.pngbin11767 -> 0 bytes
-rw-r--r--odk/docs/images/sdk_head-2.pngbin175 -> 0 bytes
-rw-r--r--odk/docs/images/sdk_line-1.gifbin43 -> 0 bytes
-rw-r--r--odk/docs/images/sdk_line-2.gifbin113 -> 0 bytes
-rw-r--r--odk/docs/install.html420
-rw-r--r--odk/docs/notsupported.html4
-rw-r--r--odk/docs/sdk_styles.css130
-rw-r--r--odk/docs/tools.html1094
-rw-r--r--odk/examples/CLI/CSharp/Spreadsheet/GeneralTableSample.cs206
-rw-r--r--odk/examples/CLI/CSharp/Spreadsheet/Makefile94
-rw-r--r--odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetDocHelper.cs344
-rw-r--r--odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetSample.cs1478
-rw-r--r--odk/examples/CLI/CSharp/Spreadsheet/ViewSample.cs165
-rw-r--r--odk/examples/CLI/VB.NET/WriterDemo/Makefile68
-rw-r--r--odk/examples/CLI/VB.NET/WriterDemo/WriterDemo.vb242
-rw-r--r--odk/examples/CLI/makefile.mk72
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/ConnectionTask.java208
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/EventHandler.java447
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java232
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/GraphicalDisplay.java189
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/IAccessibleObjectDisplay.java46
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/Makefile113
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/MessageArea.java133
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/NameProvider.java290
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/RegistrationThread.java156
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/SSR.java171
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/TextualDisplay.java230
-rw-r--r--odk/examples/DevelopersGuide/Accessibility/makefile.mk73
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/CreatingDialogs.odtbin8654 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/Makefile139
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java275
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/FirstStepsBasic.odtbin18560 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/Makefile126
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls.odtbin7793 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialog.xba73
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialogDlg.xdl12
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPage.xba286
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPageDlg.xdl75
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBar.xba76
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBarDlg.xdl11
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBar.xba86
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBarDlg.xdl13
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/dialog.xlb8
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/script.xlb8
-rw-r--r--odk/examples/DevelopersGuide/BasicAndDialogs/makefile.mk84
-rw-r--r--odk/examples/DevelopersGuide/Charts/AddInChart.odsbin18045 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Charts/CalcHelper.java412
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartHelper.java261
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInCalc.java424
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInDraw.java308
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInWriter.java178
-rw-r--r--odk/examples/DevelopersGuide/Charts/Helper.java170
-rw-r--r--odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components10
-rw-r--r--odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java480
-rw-r--r--odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java211
-rw-r--r--odk/examples/DevelopersGuide/Charts/Makefile200
-rw-r--r--odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java219
-rw-r--r--odk/examples/DevelopersGuide/Charts/bullet.gifbin335 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Charts/makefile.mk75
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu81
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java444
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Jobs.xcu27
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile137
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu220
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile163
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu11
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx253
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx128
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx130
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Addons.xcu220
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile139
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandler.xcu10
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java287
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/Makefile238
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/SimpleComponent.odtbin8841 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx93
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx258
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx215
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/some.idl54
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/JavaComponent.components11
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/Makefile207
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl46
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl46
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java71
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java100
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java143
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java75
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl48
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl48
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl50
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java175
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile172
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml12
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_de.txt1
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_en_US.txt1
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/Makefile81
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java163
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile129
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java79
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl46
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile73
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl53
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl50
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk28
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java328
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.odtbin11902 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/Makefile179
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl47
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl53
-rw-r--r--odk/examples/DevelopersGuide/Components/makefile.mk123
-rw-r--r--odk/examples/DevelopersGuide/Config/ConfigExamples.java1123
-rw-r--r--odk/examples/DevelopersGuide/Config/Makefile99
-rw-r--r--odk/examples/DevelopersGuide/Config/makefile.mk64
-rw-r--r--odk/examples/DevelopersGuide/Database/CodeSamples.java330
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/How_to_write_my_own_driver.txt25
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile165
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/OSubComponent.hxx254
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/OTypeInfo.hxx100
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx404
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx157
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx889
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx221
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx212
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.hxx88
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx390
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx149
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx875
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.hxx221
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx171
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx93
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx147
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx370
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx178
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx185
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx163
-rw-r--r--odk/examples/DevelopersGuide/Database/Makefile134
-rw-r--r--odk/examples/DevelopersGuide/Database/OpenQuery.java162
-rw-r--r--odk/examples/DevelopersGuide/Database/RowSet.java241
-rw-r--r--odk/examples/DevelopersGuide/Database/RowSetEventListener.java77
-rw-r--r--odk/examples/DevelopersGuide/Database/Sales.java250
-rw-r--r--odk/examples/DevelopersGuide/Database/SalesMan.java145
-rw-r--r--odk/examples/DevelopersGuide/Database/makefile.mk95
-rw-r--r--odk/examples/DevelopersGuide/Database/sdbcx.java420
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java115
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java143
-rw-r--r--odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java173
-rw-r--r--odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java141
-rw-r--r--odk/examples/DevelopersGuide/Drawing/DrawingDemo.java426
-rw-r--r--odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java133
-rw-r--r--odk/examples/DevelopersGuide/Drawing/GluePointDemo.java188
-rw-r--r--odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java152
-rw-r--r--odk/examples/DevelopersGuide/Drawing/Helper.java83
-rw-r--r--odk/examples/DevelopersGuide/Drawing/LayerDemo.java156
-rw-r--r--odk/examples/DevelopersGuide/Drawing/Makefile175
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java133
-rw-r--r--odk/examples/DevelopersGuide/Drawing/Organigram.java191
-rw-r--r--odk/examples/DevelopersGuide/Drawing/PageHelper.java223
-rw-r--r--odk/examples/DevelopersGuide/Drawing/PresentationDemo.java239
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ShapeHelper.java145
-rw-r--r--odk/examples/DevelopersGuide/Drawing/SimplePresentation.odpbin74753 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Drawing/StyleDemo.java174
-rw-r--r--odk/examples/DevelopersGuide/Drawing/TextDemo.java155
-rw-r--r--odk/examples/DevelopersGuide/Drawing/makefile.mk81
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Addons.xcu58
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Dialog1.xdl10
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Module1.xba16
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/dialog.xlb5
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/script.xlb5
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/META-INF/manifest.xml6
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Makefile118
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/description.xml8
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page1.xhp73
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page2.xhp27
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/subfolder/anotherpage.xhp100
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page1.xhp73
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page2.xhp26
-rw-r--r--odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/subfolder/anotherpage.xhp100
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java58
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java329
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/FirstUnoContact.java58
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java462
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/Makefile101
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/build_FirstUnoContact.xml64
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/makefile.mk67
-rw-r--r--odk/examples/DevelopersGuide/Forms/BooleanValidator.java85
-rw-r--r--odk/examples/DevelopersGuide/Forms/ButtonOperator.java223
-rw-r--r--odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java91
-rw-r--r--odk/examples/DevelopersGuide/Forms/ControlLock.java219
-rw-r--r--odk/examples/DevelopersGuide/Forms/ControlValidation.java100
-rw-r--r--odk/examples/DevelopersGuide/Forms/ControlValidator.java60
-rw-r--r--odk/examples/DevelopersGuide/Forms/DataAwareness.java932
-rw-r--r--odk/examples/DevelopersGuide/Forms/DateValidator.java102
-rw-r--r--odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java228
-rw-r--r--odk/examples/DevelopersGuide/Forms/DocumentHelper.java320
-rw-r--r--odk/examples/DevelopersGuide/Forms/DocumentType.java59
-rw-r--r--odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java230
-rw-r--r--odk/examples/DevelopersGuide/Forms/FLTools.java270
-rw-r--r--odk/examples/DevelopersGuide/Forms/FormLayer.java294
-rw-r--r--odk/examples/DevelopersGuide/Forms/GridFieldValidator.java176
-rw-r--r--odk/examples/DevelopersGuide/Forms/HsqlDatabase.java256
-rw-r--r--odk/examples/DevelopersGuide/Forms/InteractionRequest.java76
-rw-r--r--odk/examples/DevelopersGuide/Forms/KeyGenerator.java432
-rw-r--r--odk/examples/DevelopersGuide/Forms/ListSelectionValidator.java69
-rw-r--r--odk/examples/DevelopersGuide/Forms/Makefile197
-rw-r--r--odk/examples/DevelopersGuide/Forms/NumericValidator.java89
-rw-r--r--odk/examples/DevelopersGuide/Forms/ProgrammaticScriptAssignment.odtbin19198 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Forms/RowSet.java290
-rw-r--r--odk/examples/DevelopersGuide/Forms/SalesFilter.java512
-rw-r--r--odk/examples/DevelopersGuide/Forms/SingleControlValidation.java187
-rw-r--r--odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java131
-rw-r--r--odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java136
-rw-r--r--odk/examples/DevelopersGuide/Forms/SpreadsheetView.java76
-rw-r--r--odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java210
-rw-r--r--odk/examples/DevelopersGuide/Forms/TextValidator.java89
-rw-r--r--odk/examples/DevelopersGuide/Forms/TimeValidator.java94
-rw-r--r--odk/examples/DevelopersGuide/Forms/UNO.java90
-rw-r--r--odk/examples/DevelopersGuide/Forms/URLHelper.java72
-rw-r--r--odk/examples/DevelopersGuide/Forms/ValueBinding.java88
-rw-r--r--odk/examples/DevelopersGuide/Forms/WaitForInput.java64
-rw-r--r--odk/examples/DevelopersGuide/Forms/makefile.mk97
-rw-r--r--odk/examples/DevelopersGuide/GUI/DialogDocument.java145
-rw-r--r--odk/examples/DevelopersGuide/GUI/ImageControlSample.java163
-rw-r--r--odk/examples/DevelopersGuide/GUI/Makefile142
-rw-r--r--odk/examples/DevelopersGuide/GUI/MessageBox.java245
-rw-r--r--odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java68
-rw-r--r--odk/examples/DevelopersGuide/GUI/SystemDialog.java186
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java1482
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java264
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoMenu.java167
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoMenu2.java95
-rw-r--r--odk/examples/DevelopersGuide/GUI/oologo.gifbin2563 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/Makefile89
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/OOoBeanViewer.java407
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor16.jpgbin321 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor32.jpgbin569 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono16.jpgbin321 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono32.jpgbin569 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/OfficeBean/makefile.mk68
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java229
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java55
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java60
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Clipboard/Makefile99
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java85
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java256
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java298
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java96
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java430
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java1060
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java70
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IShutdownListener.java47
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Install.txt10
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java672
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java107
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile128
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java182
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java205
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java240
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java478
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java266
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java269
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile73
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c112
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h66
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile78
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c181
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def3
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h66
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java411
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DisableCommands/Makefile92
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java737
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java230
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/Makefile140
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/SampleFilter.components10
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/TypeDetection.xcu29
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/FlatXmlTypeDetection.xcu71
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile164
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx77
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx259
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx118
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx345
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.uno.xml59
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.xcu86
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile162
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java277
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.xcu86
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/Makefile143
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java368
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile232
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java155
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java194
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java86
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java110
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java552
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java495
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java332
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java97
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java69
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/XPossibleHyphens_impl.java89
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java92
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Makefile106
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/MenuElement.java56
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java253
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java184
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/PathSettings/Makefile92
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java168
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/Makefile92
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java119
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/TerminationTest/Makefile97
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminateListener.java60
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java101
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/makefile.mk180
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile118
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx109
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx87
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java260
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/Makefile86
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/UrlResolver.java111
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile113
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java60
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx71
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile101
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx106
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/Makefile91
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java76
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/manifest.mf4
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/makefile.mk95
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml5
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile129
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odtbin8874 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java46
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml17
-rwxr-xr-xodk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml81
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml5
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile131
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odtbin8921 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java397
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gifbin164 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml17
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gifbin187 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gifbin136 -> 0 bytes
-rwxr-xr-xodk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml81
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk79
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/DataPilotReadme.txt30
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components9
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java318
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.odsbin8961 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components8
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java992
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java241
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/Makefile310
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java405
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java1417
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java170
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/XExampleAddIn.idl60
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/makefile.mk72
-rw-r--r--odk/examples/DevelopersGuide/Text/Makefile96
-rw-r--r--odk/examples/DevelopersGuide/Text/PrintDemo.odtbin6909 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Text/TextDocuments.java1792
-rw-r--r--odk/examples/DevelopersGuide/Text/TextTemplateWithUserFields.odtbin6641 -> 0 bytes
-rw-r--r--odk/examples/DevelopersGuide/Text/makefile.mk67
-rw-r--r--odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java348
-rw-r--r--odk/examples/DevelopersGuide/UCB/DataStreamComposer.java258
-rw-r--r--odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java233
-rw-r--r--odk/examples/DevelopersGuide/UCB/Helper.java250
-rw-r--r--odk/examples/DevelopersGuide/UCB/Makefile156
-rw-r--r--odk/examples/DevelopersGuide/UCB/MyActiveDataSink.java73
-rw-r--r--odk/examples/DevelopersGuide/UCB/MyInputStream.java190
-rw-r--r--odk/examples/DevelopersGuide/UCB/PropertiesComposer.java299
-rw-r--r--odk/examples/DevelopersGuide/UCB/PropertiesRetriever.java254
-rw-r--r--odk/examples/DevelopersGuide/UCB/ResourceCreator.java313
-rw-r--r--odk/examples/DevelopersGuide/UCB/ResourceManager.java289
-rw-r--r--odk/examples/DevelopersGuide/UCB/ResourceRemover.java180
-rw-r--r--odk/examples/DevelopersGuide/UCB/data/data.txt1
-rw-r--r--odk/examples/DevelopersGuide/UCB/makefile.mk75
-rw-r--r--odk/examples/DevelopersGuide/examples.html3032
-rw-r--r--odk/examples/OLE/activex/Makefile122
-rw-r--r--odk/examples/OLE/activex/README.txt39
-rw-r--r--odk/examples/OLE/activex/SOActiveX.cpp645
-rw-r--r--odk/examples/OLE/activex/SOActiveX.h168
-rw-r--r--odk/examples/OLE/activex/SOActiveX.rgs33
-rw-r--r--odk/examples/OLE/activex/SOComWindowPeer.cpp61
-rw-r--r--odk/examples/OLE/activex/SOComWindowPeer.h165
-rw-r--r--odk/examples/OLE/activex/SOComWindowPeer.rgs23
-rw-r--r--odk/examples/OLE/activex/StdAfx2.cpp49
-rw-r--r--odk/examples/OLE/activex/StdAfx2.h68
-rw-r--r--odk/examples/OLE/activex/example.html26
-rw-r--r--odk/examples/OLE/activex/resource.h57
-rw-r--r--odk/examples/OLE/activex/so_activex.cpp110
-rw-r--r--odk/examples/OLE/activex/so_activex.def5
-rw-r--r--odk/examples/OLE/activex/so_activex.idl138
-rw-r--r--odk/examples/OLE/activex/so_activex.rc136
-rw-r--r--odk/examples/OLE/delphi/InsertTables/Project1.dpr14
-rw-r--r--odk/examples/OLE/delphi/InsertTables/Project1.res0
-rw-r--r--odk/examples/OLE/delphi/InsertTables/SampleCode.pas393
-rw-r--r--odk/examples/OLE/delphi/InsertTables/SampleUI.dfm4
-rw-r--r--odk/examples/OLE/delphi/InsertTables/SampleUI.pas168
-rw-r--r--odk/examples/OLE/delphi/StarOffice_Delphi.sxwbin34970 -> 0 bytes
-rw-r--r--odk/examples/OLE/delphi/StarOffice_and_Delphi.pdfbin60963 -> 0 bytes
-rw-r--r--odk/examples/OLE/makefile.mk93
-rw-r--r--odk/examples/OLE/vbscript/WriterDemo.vbs172
-rw-r--r--odk/examples/OLE/vbscript/readme.txt4
-rw-r--r--odk/examples/basic/drawing/dirtree.txt20
-rw-r--r--odk/examples/basic/drawing/importexportofasciifiles.odgbin11125 -> 0 bytes
-rw-r--r--odk/examples/basic/forms_and_controls/beef.wmfbin9856 -> 0 bytes
-rw-r--r--odk/examples/basic/forms_and_controls/burger.wmfbin84308 -> 0 bytes
-rw-r--r--odk/examples/basic/forms_and_controls/burger_factory.odtbin18934 -> 0 bytes
-rw-r--r--odk/examples/basic/forms_and_controls/chicken.wmfbin14272 -> 0 bytes
-rw-r--r--odk/examples/basic/forms_and_controls/fish.wmfbin13716 -> 0 bytes
-rw-r--r--odk/examples/basic/forms_and_controls/vegetable.wmfbin17862 -> 0 bytes
-rw-r--r--odk/examples/basic/makefile.mk91
-rw-r--r--odk/examples/basic/sheet/adapting_to_euroland.odsbin9964 -> 0 bytes
-rw-r--r--odk/examples/basic/stock_quotes_updater/stock.odsbin21540 -> 0 bytes
-rw-r--r--odk/examples/basic/text/creating_an_index/index.odtbin13160 -> 0 bytes
-rw-r--r--odk/examples/basic/text/creating_an_index/indexlist.txt9
-rw-r--r--odk/examples/basic/text/modifying_text_automatically/changing_appearance.odtbin9883 -> 0 bytes
-rw-r--r--odk/examples/basic/text/modifying_text_automatically/inserting_bookmarks.odtbin10207 -> 0 bytes
-rw-r--r--odk/examples/basic/text/modifying_text_automatically/replacing_text.odtbin10021 -> 0 bytes
-rw-r--r--odk/examples/basic/text/modifying_text_automatically/using_regular_expressions.odtbin10072 -> 0 bytes
-rw-r--r--odk/examples/cpp/DocumentLoader/DocumentLoader.cxx159
-rw-r--r--odk/examples/cpp/DocumentLoader/Makefile108
-rw-r--r--odk/examples/cpp/DocumentLoader/test.odtbin6737 -> 0 bytes
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/Addons.xcu170
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx41
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/CalcWindowState.xcu21
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/Jobs.xcu23
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/ListenerHelper.cxx147
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h85
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/Makefile185
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyJob.cxx110
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyJob.h152
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyListener.cxx156
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyListener.h99
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx542
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h144
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/ProtocolHandler.xcu10
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/WriterListener.cxx49
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/WriterWindowState.xcu21
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/exports.cxx93
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/logo_big.pngbin616 -> 0 bytes
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/logo_small.pngbin585 -> 0 bytes
-rw-r--r--odk/examples/cpp/counter/Makefile175
-rw-r--r--odk/examples/cpp/counter/XCountable.idl55
-rw-r--r--odk/examples/cpp/counter/counter.cxx233
-rw-r--r--odk/examples/cpp/counter/countermain.cxx104
-rw-r--r--odk/examples/cpp/makefile.mk80
-rw-r--r--odk/examples/cpp/remoteclient/Makefile155
-rw-r--r--odk/examples/cpp/remoteclient/remoteclient.cxx253
-rw-r--r--odk/examples/examples.html750
-rw-r--r--odk/examples/java/ConverterServlet/ConverterServlet.html46
-rw-r--r--odk/examples/java/ConverterServlet/ConverterServlet.java336
-rw-r--r--odk/examples/java/ConverterServlet/Makefile94
-rw-r--r--odk/examples/java/ConverterServlet/README38
-rw-r--r--odk/examples/java/ConverterServlet/web.xml23
-rw-r--r--odk/examples/java/DocumentHandling/DocumentConverter.java225
-rw-r--r--odk/examples/java/DocumentHandling/DocumentLoader.java92
-rw-r--r--odk/examples/java/DocumentHandling/DocumentPrinter.java109
-rw-r--r--odk/examples/java/DocumentHandling/DocumentSaver.java131
-rw-r--r--odk/examples/java/DocumentHandling/Makefile145
-rw-r--r--odk/examples/java/DocumentHandling/test/test1.odtbin7999 -> 0 bytes
-rw-r--r--odk/examples/java/Drawing/Makefile92
-rw-r--r--odk/examples/java/Drawing/SDraw.java272
-rw-r--r--odk/examples/java/EmbedDocument/Container1/EmbedContApp.java1024
-rw-r--r--odk/examples/java/EmbedDocument/Container1/EmbedContFrame.java108
-rw-r--r--odk/examples/java/EmbedDocument/Container1/Makefile48
-rwxr-xr-xodk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java121
-rw-r--r--odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.odtbin9975 -> 0 bytes
-rw-r--r--odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.xcu28
-rwxr-xr-xodk/examples/java/EmbedDocument/EmbeddedObject/Makefile149
-rw-r--r--odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.components8
-rwxr-xr-xodk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java1124
-rwxr-xr-xodk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java105
-rw-r--r--odk/examples/java/Inspector/Addon.xcu28
-rw-r--r--odk/examples/java/Inspector/Addons.xcu23
-rw-r--r--odk/examples/java/Inspector/HideableMutableTreeNode.java88
-rw-r--r--odk/examples/java/Inspector/HideableTreeModel.java298
-rw-r--r--odk/examples/java/Inspector/Inspector.java461
-rw-r--r--odk/examples/java/Inspector/InspectorAddon.java228
-rw-r--r--odk/examples/java/Inspector/InspectorPane.java629
-rw-r--r--odk/examples/java/Inspector/InstanceInspector.idl52
-rw-r--r--odk/examples/java/Inspector/InstanceInspectorTest.odtbin12272 -> 0 bytes
-rw-r--r--odk/examples/java/Inspector/Introspector.java667
-rw-r--r--odk/examples/java/Inspector/Makefile195
-rw-r--r--odk/examples/java/Inspector/MethodParametersDialog.java353
-rw-r--r--odk/examples/java/Inspector/ObjectInspector.xcs18
-rw-r--r--odk/examples/java/Inspector/ObjectInspector.xcu18
-rw-r--r--odk/examples/java/Inspector/ProtocolHandler.xcu11
-rw-r--r--odk/examples/java/Inspector/ProtocolHandlerAddon.java283
-rw-r--r--odk/examples/java/Inspector/SourceCodeGenerator.java1766
-rw-r--r--odk/examples/java/Inspector/SwingDialogProvider.java442
-rw-r--r--odk/examples/java/Inspector/SwingTreeControlProvider.java427
-rw-r--r--odk/examples/java/Inspector/SwingTreePathProvider.java40
-rw-r--r--odk/examples/java/Inspector/SwingUnoFacetteNode.java84
-rw-r--r--odk/examples/java/Inspector/SwingUnoMethodNode.java138
-rw-r--r--odk/examples/java/Inspector/SwingUnoNode.java156
-rw-r--r--odk/examples/java/Inspector/SwingUnoPropertyNode.java96
-rw-r--r--odk/examples/java/Inspector/TDocSupplier.java168
-rw-r--r--odk/examples/java/Inspector/TestInspector.java88
-rw-r--r--odk/examples/java/Inspector/UnoFacetteNode.java85
-rw-r--r--odk/examples/java/Inspector/UnoMethodNode.java228
-rw-r--r--odk/examples/java/Inspector/UnoNode.java437
-rw-r--r--odk/examples/java/Inspector/UnoPropertyNode.java225
-rw-r--r--odk/examples/java/Inspector/UnoTreeRenderer.java135
-rw-r--r--odk/examples/java/Inspector/XDialogProvider.java65
-rw-r--r--odk/examples/java/Inspector/XInstanceInspector.idl56
-rw-r--r--odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java106
-rw-r--r--odk/examples/java/Inspector/XMethodParametersDialog.java37
-rw-r--r--odk/examples/java/Inspector/XTreeControlProvider.java93
-rw-r--r--odk/examples/java/Inspector/XTreePathProvider.java25
-rw-r--r--odk/examples/java/Inspector/XUnoFacetteNode.java63
-rw-r--r--odk/examples/java/Inspector/XUnoMethodNode.java68
-rw-r--r--odk/examples/java/Inspector/XUnoNode.java84
-rw-r--r--odk/examples/java/Inspector/XUnoPropertyNode.java51
-rw-r--r--odk/examples/java/Inspector/images/containers_16.pngbin233 -> 0 bytes
-rw-r--r--odk/examples/java/Inspector/images/content_16.pngbin370 -> 0 bytes
-rw-r--r--odk/examples/java/Inspector/images/interfaces_16.pngbin433 -> 0 bytes
-rw-r--r--odk/examples/java/Inspector/images/methods_16.pngbin380 -> 0 bytes
-rw-r--r--odk/examples/java/Inspector/images/properties_16.pngbin242 -> 0 bytes
-rw-r--r--odk/examples/java/Inspector/images/services_16.pngbin258 -> 0 bytes
-rwxr-xr-xodk/examples/java/Inspector/manifest.mf3
-rw-r--r--odk/examples/java/MinimalComponent/BuildMinimalComponent.xml64
-rw-r--r--odk/examples/java/MinimalComponent/Makefile205
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.components8
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.idl52
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.java175
-rw-r--r--odk/examples/java/MinimalComponent/TestMinimalComponent.java69
-rw-r--r--odk/examples/java/NotesAccess/Makefile113
-rw-r--r--odk/examples/java/NotesAccess/NotesAccess.java288
-rw-r--r--odk/examples/java/NotesAccess/Stocks.nsfbin262144 -> 0 bytes
-rw-r--r--odk/examples/java/PropertySet/Makefile136
-rw-r--r--odk/examples/java/PropertySet/PropTest.components8
-rw-r--r--odk/examples/java/PropertySet/PropTest.java269
-rw-r--r--odk/examples/java/PropertySet/PropertySet.odtbin8391 -> 0 bytes
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.components9
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.java308
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.odsbin8653 -> 0 bytes
-rw-r--r--odk/examples/java/Spreadsheet/ChartTypeChange.java355
-rw-r--r--odk/examples/java/Spreadsheet/EuroAdaption.java389
-rw-r--r--odk/examples/java/Spreadsheet/Makefile215
-rw-r--r--odk/examples/java/Spreadsheet/SCalc.java412
-rw-r--r--odk/examples/java/Spreadsheet/XCalcAddins.idl100
-rw-r--r--odk/examples/java/Storage/Makefile58
-rw-r--r--odk/examples/java/Storage/StorageFunctionality.java147
-rw-r--r--odk/examples/java/Storage/StorageTest.java7
-rw-r--r--odk/examples/java/Storage/Test01.java158
-rw-r--r--odk/examples/java/Storage/Test02.java152
-rw-r--r--odk/examples/java/Storage/Test03.java209
-rw-r--r--odk/examples/java/Storage/Test04.java273
-rw-r--r--odk/examples/java/Storage/Test05.java268
-rw-r--r--odk/examples/java/Storage/Test06.java278
-rw-r--r--odk/examples/java/Storage/Test07.java137
-rw-r--r--odk/examples/java/Storage/Test08.java213
-rw-r--r--odk/examples/java/Storage/Test09.java123
-rw-r--r--odk/examples/java/Storage/TestHelper.java864
-rw-r--r--odk/examples/java/Text/BookmarkInsertion.java284
-rw-r--r--odk/examples/java/Text/GraphicsInserter.java179
-rw-r--r--odk/examples/java/Text/HardFormatting.java286
-rw-r--r--odk/examples/java/Text/Makefile136
-rw-r--r--odk/examples/java/Text/SWriter.java397
-rw-r--r--odk/examples/java/Text/StyleCreation.java226
-rw-r--r--odk/examples/java/Text/StyleInitialization.java320
-rw-r--r--odk/examples/java/Text/TextDocumentStructure.java205
-rw-r--r--odk/examples/java/Text/TextReplace.java231
-rw-r--r--odk/examples/java/Text/WriterSelector.java162
-rw-r--r--odk/examples/java/Text/oo_smiley.gifbin46109 -> 0 bytes
-rw-r--r--odk/examples/java/ToDo/Makefile168
-rw-r--r--odk/examples/java/ToDo/ToDo.components8
-rw-r--r--odk/examples/java/ToDo/ToDo.idl50
-rw-r--r--odk/examples/java/ToDo/ToDo.java969
-rw-r--r--odk/examples/java/ToDo/ToDo.odsbin13276 -> 0 bytes
-rw-r--r--odk/examples/java/ToDo/XToDo.idl50
-rw-r--r--odk/examples/java/makefile.mk155
-rw-r--r--odk/inc/makefile.mk47
-rw-r--r--odk/inc/pch/precompiled_odk.cxx31
-rw-r--r--odk/inc/pch/precompiled_odk.hxx34
-rw-r--r--odk/index.html203
-rw-r--r--odk/no_localization1
-rw-r--r--odk/pack/checkbin/makefile.mk51
-rw-r--r--odk/pack/checkidl/makefile.mk51
-rw-r--r--odk/pack/checkinc/makefile.mk52
-rw-r--r--odk/pack/checkinc2/makefile.mk54
-rwxr-xr-xodk/pack/copying/addsym-macosx.sh11
-rw-r--r--odk/pack/copying/dk.mk3
-rw-r--r--odk/pack/copying/idl_chapter_refs.txt7555
-rw-r--r--odk/pack/copying/makefile.mk250
-rw-r--r--odk/pack/gendocu/java/package-list135
-rw-r--r--odk/pack/gendocu/makefile.mk122
-rw-r--r--odk/pack/gendocu/uno/package-list53
-rw-r--r--odk/pack/unzip_udk/deltree.txt0
-rw-r--r--odk/pack/unzip_udk/makefile.mk46
-rw-r--r--odk/prj/build.lst15
-rw-r--r--odk/prj/d.lst5
-rw-r--r--odk/setsdkenv_unix67
-rw-r--r--odk/setsdkenv_unix.csh.in293
-rw-r--r--odk/setsdkenv_unix.sh.in322
-rwxr-xr-xodk/setsdkenv_windows.bat64
-rwxr-xr-xodk/setsdkenv_windows.template177
-rwxr-xr-xodk/setsdkname.bat3
-rw-r--r--odk/settings/component.uno.def2
-rw-r--r--odk/settings/settings.mk605
-rw-r--r--odk/settings/std.mk63
-rw-r--r--odk/settings/stdtarget.mk17
-rw-r--r--odk/source/com/sun/star/lib/loader/InstallationFinder.java584
-rw-r--r--odk/source/com/sun/star/lib/loader/Loader.java385
-rw-r--r--odk/source/com/sun/star/lib/loader/WinRegKey.java200
-rw-r--r--odk/source/com/sun/star/lib/loader/WinRegKeyException.java51
-rw-r--r--odk/source/com/sun/star/lib/loader/makefile.mk56
-rw-r--r--odk/source/unoapploader/unx/makefile.mk60
-rw-r--r--odk/source/unoapploader/unx/unoapploader.c311
-rw-r--r--odk/source/unoapploader/win/makefile.mk57
-rw-r--r--odk/source/unoapploader/win/unoapploader.c428
-rw-r--r--odk/source/unowinreg/win/makefile.mk114
-rw-r--r--odk/source/unowinreg/win/unowinreg.cxx188
-rw-r--r--odk/source/unowinreg/win/unowinreg.dxp9
-rw-r--r--odk/util/check.pl487
-rw-r--r--odk/util/checkdiff.pl62
-rw-r--r--odk/util/delzip1
-rw-r--r--odk/util/makefile.mk58
-rw-r--r--odk/util/makefile.pmk198
-rw-r--r--odk/util/odk_rules.pmk188
-rw-r--r--udm/inc/udm/html/htmlitem.hxx359
-rw-r--r--udm/inc/udm/xml/xmlitem.hxx348
-rw-r--r--udm/prj/build.lst12
-rw-r--r--udm/prj/d.lst9
-rw-r--r--udm/source/html/htmlitem.cxx203
-rw-r--r--udm/source/html/makefile.mk56
-rw-r--r--udm/source/inc/precomp.h69
-rw-r--r--udm/source/mkinc/fullcpp.mk63
-rw-r--r--udm/source/xml/makefile.mk56
-rw-r--r--udm/source/xml/xmlitem.cxx546
-rw-r--r--udm/util/makefile.mk54
-rw-r--r--unodevtools/inc/unodevtools/options.hxx53
-rw-r--r--unodevtools/inc/unodevtools/typemanager.hxx92
-rw-r--r--unodevtools/prj/build.lst8
-rw-r--r--unodevtools/prj/d.lst5
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx1275
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx973
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx999
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx873
-rw-r--r--unodevtools/source/skeletonmaker/makefile.mk63
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx724
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.hxx170
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncpp.hxx144
-rw-r--r--unodevtools/source/skeletonmaker/skeletonjava.hxx118
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx354
-rw-r--r--unodevtools/source/unodevtools/makefile.mk52
-rw-r--r--unodevtools/source/unodevtools/options.cxx128
-rw-r--r--unodevtools/source/unodevtools/typeblob.cxx810
-rw-r--r--unodevtools/source/unodevtools/typemanager.cxx284
-rwxr-xr-xunodevtools/unodevtools.pmk55
1377 files changed, 20 insertions, 228989 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index e9a4130b..00000000
--- a/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-# backup and temporary files
-*~
-.*.sw[op]
-.gitattributes
-
-# the build directories
-/*/unxlng??
-/*/unxlng??.pro
-/*/wntmsc???
-/*/wntmsc???.pro
-/*/wntgcc?
-/*/wntgcc?.pro
-/*/unxmac*.pro
-/*/unxios?
-/*/unxios?.pro
-/*/unxand?
-/*/unxand?.pro
diff --git a/README b/README
new file mode 100644
index 00000000..2f046a7a
--- /dev/null
+++ b/README
@@ -0,0 +1,20 @@
+
+This git repository is part of the "bootstrap" family of Libreoffice repos.
+It is obsolete and its only useful content are the LibreOffice 3.3
+and 3.4 release branches.
+
+If you are interested in the latest and greatest development branch "master",
+or in release branches of LibreOffice versions newer than 3.4, please
+check out the "core" git repository, as described on the Wiki:
+
+ http://wiki.documentfoundation.org/Development/Native_Build
+
+If you want to build the 3.3 or 3.4 release, you need to switch to the
+corresponding release branch:
+
+ ./g checkout libreoffice-3-4
+
+If for some reason you want to look at obsolete in-development code,
+check out the "master-backup" branch in this repository; this is most likely
+to be a complete waste of time though.
+
diff --git a/autodoc/inc/ary/actions.hxx b/autodoc/inc/ary/actions.hxx
deleted file mode 100644
index 75b85d5e..00000000
--- a/autodoc/inc/ary/actions.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ACTIONS_HXX
-#define ARY_ACTIONS_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
- class RepositoryCenter;
-
-
-/*
-enum E_Action
-{
- action_Parse,
- action_SecondaryProductions,
- action_Save,
- action_Load,
- action_ReadyForRead
-};
-*/
-
-
-/** @resp
- Performs such commands on the repository, which refer to
- large parts of it.
-
- @collab ::ary::Repository
- and its components and derivates.
- @descr
- This class works in kind of double dispatch way:
-
- // Client code:
- Command_Xy aMyCommand;
- ary::Repository::The_().PerformCommand( aMyCommand );
-
- // Repository_Implementation::PerformCommand() code:
- aMyCommand.Run(*this);
-
- // Command_Xy::Run(Repository_Implementation & rRepository) code:
- rRepository.Run_Command_Xy(*this);
-*/
-class Command
-{
- public:
- virtual ~Command() {}
-
- void Run(
- n22::RepositoryCenter &
- io_rReposy );
- private:
- virtual void do_Run(
- n22::RepositoryCenter &
- io_rReposy ) = 0;
-};
-
-
-// IMPLEMENTATION
-
-inline void
-Command::Run(n22::RepositoryCenter & io_rReposy)
- { do_Run(io_rReposy); }
-
-
-} // namespace ary
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/ary.hxx b/autodoc/inc/ary/ary.hxx
deleted file mode 100644
index 0fd9beaa..00000000
--- a/autodoc/inc/ary/ary.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ARY_HXX
-#define ARY_ARY_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-
-namespace ary
-{
-namespace idl
-{
- class Gate;
-}
-
-namespace cpp
-{
- class Gate;
-}
-}
-
-
-
-namespace ary
-{
-
-/** Starting point for all work with the
- Autodoc Sourcecode Repository.
-
- Create and destroy the repository and
- give access to the "Gates" for different tasks.
-
- @collab ::ary::cpp::Gate
- @collab ::ary::idl::Gate
-*/
-
-class Repository
-{
- public:
- // LIFECYCLE
- virtual ~Repository() {}
- static DYN Repository &
- Create_();
- // INQUIRY
- virtual const String &
- Title() const = 0;
- virtual const ::ary::cpp::Gate &
- Gate_Cpp() const = 0;
- virtual const ::ary::idl::Gate &
- Gate_Idl() const = 0;
- // ACCESS
- virtual ::ary::cpp::Gate &
- Gate_Cpp() = 0;
- virtual ::ary::idl::Gate &
- Gate_Idl() = 0;
- virtual void Set_Title(
- const String & i_sName ) = 0;
-};
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/ary_disp.hxx b/autodoc/inc/ary/ary_disp.hxx
deleted file mode 100644
index 89c85489..00000000
--- a/autodoc/inc/ary/ary_disp.hxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ARY_DISP_HXX
-#define ARY_ARY_DISP_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/tpl/processor.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/types.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
-}
-
-class Display : public csv::ProcessorIfc
-{
- public:
- virtual ~Display() {}
-
- // OPERATIONS
- void StartSlot();
- void FinishSlot();
-
- /** This method depends on the result of Get_ReFinder().
- If Get_ReFinder() != 0, then DisplayGate::Find_Re() is called
- and if valid, cpp::CppEntity::Accept( *this ) is called.
- If Get_ReFinder() == 0, simply do_DisplaySlot_Rid() is called
- with just the id as parameter.
- */
- void DisplaySlot_Rid(
- ary::Rid i_nId );
-// void DisplaySlot_Lid(
-// ary::Lid i_nId );
- /** This method depends on the result of Get_ReFinder().
- If Get_ReFinder() != 0, then DisplayGate::Find_Re() is called
- and if valid, cpp::CppEntity::Accept( *this ) is called.
- If Get_ReFinder() == 0, simply do_DisplaySlot_LocalCe() is called
- with just the id as parameter.
- */
- void DisplaySlot_LocalCe(
- ary::cpp::Ce_id i_nId,
- const String & i_sName );
- // INQUIRY
- const cpp::Gate * Get_ReFinder() const;
-
- private:
- virtual void do_StartSlot();
- virtual void do_FinishSlot();
-
-
- virtual void do_DisplaySlot_Rid(
- ary::Rid i_nId );
- virtual void do_DisplaySlot_LocalCe(
- ary::cpp::Ce_id i_nId,
- const String & i_sName );
- virtual const cpp::Gate *
- inq_Get_ReFinder() const = 0;
-};
-
-
-// IMPLEMENTATION
-
-
-inline void
-Display::StartSlot()
- { do_StartSlot(); }
-inline void
-Display::FinishSlot()
- { do_FinishSlot(); }
-inline const cpp::Gate *
-Display::Get_ReFinder() const
- { return inq_Get_ReFinder(); }
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/arygroup.hxx b/autodoc/inc/ary/arygroup.hxx
deleted file mode 100644
index 4a96b49e..00000000
--- a/autodoc/inc/ary/arygroup.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ARYGROUP_HXX
-#define ARY_ARYGROUP_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/types.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
- class CppEntity;
-}
-
-class Slot;
-
-namespace group
-{
- typedef std::vector< SlotAccessId > SlotList;
-}
-}
-
-
-
-
-namespace ary
-{
-
-
-
-class AryGroup
-{
- public:
- // LIFECYCLE
- virtual ~AryGroup() {}
-
- // INQUIRY
- Gid Id_Group() const;
- const cpp::CppEntity &
- RE_Group() const;
- const group::SlotList &
- Slots() const;
- DYN Slot * Create_Slot(
- SlotAccessId i_nSlot ) const;
-
-
- private:
- virtual Gid inq_Id_Group() const = 0;
- virtual const cpp::CppEntity &
- inq_RE_Group() const = 0;
- virtual const group::SlotList &
- inq_Slots() const = 0;
- virtual DYN Slot * inq_Create_Slot(
- SlotAccessId i_nSlot ) const = 0;
-};
-
-
-
-// IMPLEMENTATION
-inline Gid
-AryGroup::Id_Group() const
- { return inq_Id_Group(); }
-inline const cpp::CppEntity &
-AryGroup::RE_Group() const
- { return inq_RE_Group(); }
-inline const group::SlotList &
-AryGroup::Slots() const
- { return inq_Slots(); }
-inline DYN Slot *
-AryGroup::Create_Slot( SlotAccessId i_nSlot ) const
- { return inq_Create_Slot(i_nSlot); }
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/ceslot.hxx b/autodoc/inc/ary/ceslot.hxx
deleted file mode 100644
index 5557cbb1..00000000
--- a/autodoc/inc/ary/ceslot.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CESLOT_HXX
-#define ARY_CESLOT_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-
-class Display;
-
-/** Unterscheidungen von Slots
-
- Slots:
- - ReadWrite or ReadOnly
- - ContentType
- - Groups
- - MemberLink 'EnumValue from Enum' or 'Class from Namespace'
- - MemberData 'Parameter from Operation'
- - SimpleLink
- - CommentedLink 'Baseclass from Class'
- - DefaultCommentedLink 'Class from GlobaIndex'
-*/
-
-class Slot
-{
- public:
- virtual ~Slot() {}
-
- virtual void StoreAt(
- Display & o_rDestination ) const;
- virtual uintt Size() const = 0;
-
- private:
- virtual void StoreEntries(
- Display & o_rDestination ) const = 0;
-};
-
-class Slot_AutoPtr
-{
- public:
- Slot_AutoPtr(
- Slot * i_pSlot = 0 )
- : pSlot(i_pSlot) {}
- ~Slot_AutoPtr() { if (pSlot != 0) delete pSlot; }
-
- Slot_AutoPtr & operator=(
- Slot * i_pSlot )
- { if (pSlot != 0) delete pSlot;
- pSlot = i_pSlot;
- return *this; }
- operator bool() const { return pSlot != 0; }
-
- const Slot & operator*() { csv_assert(pSlot != 0);
- return *pSlot; }
- const Slot * operator->() { csv_assert(pSlot != 0);
- return pSlot; }
-
- private:
- // Forbidden functions
- Slot_AutoPtr(const Slot_AutoPtr &);
- Slot_AutoPtr & operator=(const Slot_AutoPtr &);
-
- // DATA
- Slot * pSlot;
-};
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cessentl.hxx b/autodoc/inc/ary/cessentl.hxx
deleted file mode 100644
index 6e61fc15..00000000
--- a/autodoc/inc/ary/cessentl.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CESSENTL_HXX
-#define ARY_CESSENTL_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/loc/loc_types4loc.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-class CeEssentials
-{ // Non inline functions are implemented in ceworker.cxx .
- public:
- // LIFECYCLE
- CeEssentials();
- CeEssentials(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- loc::Le_id i_nLocation );
- ~CeEssentials();
- // INQUIRY
- const String & LocalName() const;
- Ce_id Owner() const;
- loc::Le_id Location() const;
-
- // ACCESS
- private:
- String sLocalName;
- Ce_id nOwner;
- loc::Le_id nLocation;
-};
-
-
-
-// IMPLEMENTATION
-inline const String &
-CeEssentials::LocalName() const
- { return sLocalName; }
-inline Ce_id
-CeEssentials::Owner() const
- { return nOwner; }
-inline loc::Le_id
-CeEssentials::Location() const
- { return nLocation; }
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_builtintype.hxx b/autodoc/inc/ary/cpp/c_builtintype.hxx
deleted file mode 100644
index 223aea57..00000000
--- a/autodoc/inc/ary/cpp/c_builtintype.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_BUILTINTYPE_HXX
-#define ARY_CPP_C_BUILTINTYPE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_type.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** Represents types like void, int, double.
-*/
-class BuiltInType : public Type
-{
- public:
- enum E_ClassId { class_id = 1200 };
-
- BuiltInType(
- const String & i_sName,
- E_TypeSpecialisation
- i_Specialisation );
-
- String SpecializedName() const;
-
- static String SpecializedName_(
- const char * i_sName,
- E_TypeSpecialisation
- i_eTypeSpecialisation );
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface Object:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual bool inq_IsConst() const;
- virtual void inq_Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const;
- // DATA
- String sName;
- E_TypeSpecialisation
- eSpecialisation;
-};
-
-
-
-inline String
-BuiltInType::SpecializedName() const
-{
- return SpecializedName_(sName, eSpecialisation);
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_ce.hxx b/autodoc/inc/ary/cpp/c_ce.hxx
deleted file mode 100644
index c351fbfe..00000000
--- a/autodoc/inc/ary/cpp/c_ce.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_CE_HXX
-#define ARY_CPP_C_CE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_cppentity.hxx>
- // COMPONENTS
-#include <ary/doc/d_docu.hxx>
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_traits.hxx>
-#include <ary/loc/loc_types4loc.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
-
-typedef loc::Le_id Lid;
-
-
-
-/** Represents a C++ code entity.
-*/
-class CodeEntity : public ary::cpp::CppEntity
-{
- public:
- typedef Ce_Traits traits_t;
-
- // LIFECYCLE
- virtual ~CodeEntity() {}
-
- // INQUIRY
- Ce_id CeId() const { return Ce_id(Id()); }
- const String & LocalName() const;
- Cid Owner() const;
- Lid Location() const;
- bool IsVisible() const;
-
- // ACCESS
- void Set_InVisible() { bIsVisible = false; }
-
- protected:
- CodeEntity() : bIsVisible(true) {}
-
- private:
- // Locals
- virtual const String &
- inq_LocalName() const = 0;
- virtual Cid inq_Owner() const = 0;
- virtual Lid inq_Location() const = 0;
-
- // DATA
- mutable bool bIsVisible;
-};
-
-
-// IMPLEMENTATION
-inline const String &
-CodeEntity::LocalName() const
- { return inq_LocalName(); }
-inline Cid
-CodeEntity::Owner() const
- { return inq_Owner(); }
-inline Lid
-CodeEntity::Location() const
- { return inq_Location(); }
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_class.hxx b/autodoc/inc/ary/cpp/c_class.hxx
deleted file mode 100644
index baf15f1f..00000000
--- a/autodoc/inc/ary/cpp/c_class.hxx
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_CLASS_HXX
-#define ARY_CPP_C_CLASS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
-#include <ary/arygroup.hxx>
- // OTHER
-#include <ary/symtreenode.hxx>
-#include <ary/cessentl.hxx>
-#include <ary/sequentialids.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class Enum;
- class Typedef;
- class Function;
- class Variable;
-}
-}
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C++ class.
-*/
-class Class : public CodeEntity,
- public AryGroup
-{
- public:
- enum E_ClassId { class_id = 1001 };
-
- enum E_Slots
- {
- SLOT_Bases = 1,
- SLOT_NestedClasses,
- SLOT_Enums,
- SLOT_Typedefs,
- SLOT_Operations,
- SLOT_StaticOperations,
- SLOT_Data,
- SLOT_StaticData,
- SLOT_FriendClasses,
- SLOT_FriendOperations
- };
-
- typedef ::ary::symtree::Node<CeNode_Traits> node_t;
-
-
- // LIFECYCLE
- Class(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- loc::Le_id i_nFile,
- E_ClassKey i_eClassKey );
- ~Class();
-
- // OPERATIONS
- void Add_BaseClass(
- const S_Classes_Base &
- i_rBaseClass );
- void Add_TemplateParameterType(
- const String & i_sLocalName,
- Type_id i_nIdAsType );
- void Add_KnownDerivative(
- Ce_id i_nId )
- { aKnownDerivatives.Add(i_nId); }
-
- void Add_LocalClass(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalEnum(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalTypedef(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalOperation(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalStaticOperation(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalData(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalStaticData(
- const String & i_sLocalName,
- Cid i_nId );
-
- void UpdateVirtuality(
- E_Virtuality i_eVirtuality )
- { if ( int(i_eVirtuality) > int(eVirtuality) )
- eVirtuality = i_eVirtuality; }
- const List_TplParam &
- TemplateParameters() const
- { return aTemplateParameterTypes; }
- const List_Bases & BaseClasses() const { return aBaseClasses; }
- const SequentialIds<Ce_id> &
- KnownDerivatives() const
- { return aKnownDerivatives; }
-
- // INQUIRY
- E_ClassKey ClassKey() const;
- E_Protection Protection() const;
- E_Virtuality Virtuality() const { return eVirtuality; }
-
- Ce_id Search_Child(
- const String & i_key ) const;
- Rid Search_LocalClass(
- const String & i_sName ) const;
- const node_t & AsNode() const;
-
- // ACCESS
- node_t & AsNode();
-
- private:
- NON_COPYABLE(Class);
-
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::cpp::CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual loc::Le_id inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // Interface ary::AryGroup
- virtual Gid inq_Id_Group() const;
- virtual const cpp::CppEntity &
- inq_RE_Group() const;
- virtual const group::SlotList &
- inq_Slots() const;
- virtual DYN Slot * inq_Create_Slot(
- SlotAccessId i_nSlot ) const;
- // Local
- typedef List_LocalCe::const_iterator CIterator_Locals;
- typedef List_LocalCe::iterator Iterator_Locals;
- typedef SequentialIds<Ce_id> IdSequence;
-
- CIterator_Locals PosOfName(
- const List_LocalCe& i_rList,
- const String & i_sName ) const;
- // DATA
- CeEssentials aEssentials;
- node_t aAssignedNode;
-
- List_Bases aBaseClasses;
- List_TplParam aTemplateParameterTypes;
-
- List_LocalCe aClasses;
- List_LocalCe aEnums;
- List_LocalCe aTypedefs;
- List_LocalCe aOperations;
- List_LocalCe aStaticOperations;
- List_LocalCe aData;
- List_LocalCe aStaticData;
-
- IdSequence aFriendClasses;
- IdSequence aFriendOperations;
- IdSequence aKnownDerivatives;
-
- E_ClassKey eClassKey;
- E_Protection eProtection;
- E_Virtuality eVirtuality;
-};
-
-
-
-
-// IMPLEMENTATION
-inline E_ClassKey
-Class::ClassKey() const
-{
- return eClassKey;
-}
-
-inline E_Protection
-Class::Protection() const
-{
- return eProtection;
-}
-
-inline const Class::node_t &
-Class::AsNode() const
-{
- return aAssignedNode;
-}
-
-inline Class::node_t &
-Class::AsNode()
-{
- return aAssignedNode;
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_cppentity.hxx b/autodoc/inc/ary/cpp/c_cppentity.hxx
deleted file mode 100644
index 5f5dc6b6..00000000
--- a/autodoc/inc/ary/cpp/c_cppentity.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_CPPENTITY_HXX
-#define ARY_CPP_C_CPPENTITY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/entity.hxx>
- // OTHER
-#include <ary/doc/d_docu.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C++ code entity as parsed by Autodoc.
-*/
-class CppEntity : public Entity
-{
- public:
- // LIFECYCLE
- virtual ~CppEntity() {}
-
- // OPERATIONS
-
- // INQUIRY
- const ary::doc::Documentation &
- Docu() const;
- // ACCESS
- void Set_Docu(
- DYN ary::doc::Node &
- pass_docudata );
- private:
- // DATA
- ary::doc::Documentation
- aDocu;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const doc::Documentation &
-CppEntity::Docu() const
-{
- return aDocu;
-}
-
-inline void
-CppEntity::Set_Docu(ary::doc::Node & pass_docudata)
-{
- aDocu.Set_Data(pass_docudata);
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_de.hxx b/autodoc/inc/ary/cpp/c_de.hxx
deleted file mode 100644
index 7ae40d72..00000000
--- a/autodoc/inc/ary/cpp/c_de.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_DE_HXX
-#define ARY_CPP_C_DE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_cppentity.hxx>
- // OTHER
-#include <ary/loc/loc_types4loc.hxx>
-#include <ary/cpp/c_traits.hxx>
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** Describes a C/C++ #define statement. May be a define or a macro, for which
- two cases the two different constructors are to be used.
-
- This class is used by cpp::PreProcessor.
-*/
-class DefineEntity : public ary::cpp::CppEntity
-{
- public:
- typedef Def_Traits traits_t;
-
- virtual ~DefineEntity() {}
-
- // INQUIRY
- De_id DefId() const { return De_id(Id()); }
- const String & LocalName() const;
- loc::Le_id Location() const;
- const StringVector &
- DefinitionText() const;
- // ACCESS
- protected:
- DefineEntity(
- const String & i_name,
- loc::Le_id i_declaringFile );
- private:
- // Locals
- virtual const StringVector &
- inq_DefinitionText() const = 0;
-
- // DATA
- String sName;
- loc::Le_id nLocation;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const String &
-DefineEntity::LocalName() const
- { return sName; }
-
-inline loc::Le_id
-DefineEntity::Location() const
- { return nLocation; }
-
-inline const StringVector &
-DefineEntity::DefinitionText() const
- { return inq_DefinitionText(); }
-
-
-
-
-
-} // end namespace cpp
-} // end namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_define.hxx b/autodoc/inc/ary/cpp/c_define.hxx
deleted file mode 100644
index 28552901..00000000
--- a/autodoc/inc/ary/cpp/c_define.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_DEFINE_HXX
-#define ARY_CPP_C_DEFINE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_de.hxx>
- // OTHER
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C/C++ #define ("#define DEF") statement, but no macro.
-
- @see Macro
-*/
-class Define : public DefineEntity
-{
- public:
- enum E_ClassId { class_id = 1601 };
-
- Define( /// Used for: #define DEFINE xyz
- const String & i_name,
- const StringVector &
- i_definition,
- loc::Le_id i_declaringFile );
- virtual ~Define();
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface DefineEntity:
- virtual const StringVector &
- inq_DefinitionText() const;
- // DATA
- StringVector aDefinition;
-};
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_enum.hxx b/autodoc/inc/ary/cpp/c_enum.hxx
deleted file mode 100644
index 22bc9eb1..00000000
--- a/autodoc/inc/ary/cpp/c_enum.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_ENUM_HXX
-#define ARY_CPP_C_ENUM_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
-#include <ary/arygroup.hxx>
- // OTHER
-#include <ary/cessentl.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/sequentialids.hxx>
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C++ enum declaration.
-*/
-class Enum : public CodeEntity,
- public AryGroup
-{
- public:
- enum E_ClassId { class_id = 1002 };
-
- enum E_Slots
- {
- SLOT_Values = 1
- };
-
- // LIFECYCLE
- Enum(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- Lid i_nFile );
- ~Enum();
-
- // OPERATIONS
- void Add_Value(
- Ce_id i_nId );
-
- // INQUIRY
- E_Protection Protection() const { return eProtection; }
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::cpp::CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual Lid inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // Interface ary::AryGroup
- virtual Gid inq_Id_Group() const;
- virtual const cpp::CppEntity &
- inq_RE_Group() const;
- virtual const group::SlotList &
- inq_Slots() const;
- virtual DYN Slot * inq_Create_Slot(
- SlotAccessId i_nSlot ) const;
-
- // DATA
- CeEssentials aEssentials;
- SequentialIds<Ce_id>
- aValues;
- E_Protection eProtection;
-};
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_enuval.hxx b/autodoc/inc/ary/cpp/c_enuval.hxx
deleted file mode 100644
index 03da4b0c..00000000
--- a/autodoc/inc/ary/cpp/c_enuval.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_ENUVAL_HXX
-#define ARY_CPP_C_ENUVAL_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
- // OTHER
-#include <ary/cessentl.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** A C++ enum value declaration and definition.
-*/
-class EnumValue : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 1006 };
-
- // LIFECYCLE
- EnumValue(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- String i_sInitialisation );
- ~EnumValue();
- // INQUIRY
- const String & Initialisation() const;
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::cpp::CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual Lid inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // DATA
- CeEssentials aEssentials;
- String sInitialisation;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const String &
-EnumValue::Initialisation() const
- { return sInitialisation; }
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_funct.hxx b/autodoc/inc/ary/cpp/c_funct.hxx
deleted file mode 100644
index 55320a15..00000000
--- a/autodoc/inc/ary/cpp/c_funct.hxx
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_FUNCT_HXX
-#define ARY_CPP_C_FUNCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
- // OTHER
-#include <ary/cessentl.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-#include <ary/cpp/c_osigna.hxx>
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** A C++ function declaration.
-*/
-class Function : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 1004 };
-
- Function(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- loc::Le_id i_nFile,
- Type_id i_nReturnType,
- const std::vector<S_Parameter> &
- i_parameters,
- E_ConVol i_conVol,
- E_Virtuality i_eVirtuality,
- FunctionFlags i_aFlags,
- bool i_bThrowExists,
- const std::vector<Type_id> &
- i_rExceptions );
- ~Function();
-
-
- // OPERATIONS
- void Add_TemplateParameterType(
- const String & i_sLocalName,
- Type_id i_nIdAsType );
-
- // INQUIRY
- const OperationSignature &
- Signature() const;
- Type_id ReturnType() const;
- E_Protection Protection() const { return eProtection; }
- E_Virtuality Virtuality() const { return eVirtuality; }
- const FunctionFlags &
- Flags() const { return aFlags; }
- const StringVector &
- ParamInfos() const { return aParameterInfos; }
- const std::vector<Type_id> *
- Exceptions() const { return pExceptions.Ptr(); }
-
- const List_TplParam &
- TemplateParameters() const
- { return aTemplateParameterTypes; }
- bool IsIdentical(
- const Function & i_f ) const;
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::cpp::CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual Lid inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // Local Types
- typedef StringVector ParameterInfoList;
- typedef std::vector<Type_id> ExceptionTypeList;
-
- // DATA
- CeEssentials aEssentials;
- List_TplParam aTemplateParameterTypes;
- OperationSignature aSignature;
- Type_id nReturnType;
- E_Protection eProtection;
- E_Virtuality eVirtuality;
- FunctionFlags aFlags;
- ParameterInfoList aParameterInfos;
- Dyn<ExceptionTypeList>
- pExceptions; // if (NOT pExceptions) there is no throw,
- // else, there is one, but the list still may be empty.
-};
-
-
-
-
-// IMPLEMENTATION
-inline const OperationSignature &
-Function::Signature() const
- { return aSignature; }
-inline Type_id
-Function::ReturnType() const
- { return nReturnType; }
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_gate.hxx b/autodoc/inc/ary/cpp/c_gate.hxx
deleted file mode 100644
index d6b6e593..00000000
--- a/autodoc/inc/ary/cpp/c_gate.hxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_GATE_HXX
-#define ARY_CPP_C_GATE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace autodoc
-{
- class Options;
-}
-namespace ary
-{
- class Entity;
-
-namespace cpp
-{
- class CodeEntity;
- class CppEntity;
- class CePilot;
- class DefPilot;
- class TypePilot;
-}
-namespace loc
-{
- class LocationPilot;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** Acess to all stored objcts in the repository, which are
- relevant to C++.
-*/
-class Gate
-{
- public:
- // LIFECYCLE
- virtual ~Gate() {}
-
-
- // OPERATIONS
- virtual void Calculate_AllSecondaryInformation() = 0;
-// const ::autodoc::Options &
-// i_options ) = 0;
-
- // INQUIRY
- virtual const String &
- RepositoryTitle() const = 0;
- virtual const CodeEntity *
- Search_RelatedCe(
- Type_id i_type ) const = 0;
- virtual const ::ary::cpp::CppEntity *
- Search_Entity(
- GlobalId i_id ) const = 0;
- virtual uintt Get_AlphabeticalList(
- List_GlobalIds & o_result,
- const char * i_begin,
- const char * i_end ) const = 0;
- virtual const CePilot &
- Ces() const = 0;
- virtual const DefPilot &
- Defs() const = 0;
- virtual const TypePilot &
- Types() const = 0;
- virtual const loc::LocationPilot &
- Locations() const = 0;
-
- // ACCESS
- virtual CePilot & Ces() = 0;
- virtual DefPilot & Defs() = 0;
- virtual TypePilot & Types() = 0;
- virtual loc::LocationPilot &
- Locations() = 0;
-};
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_macro.hxx b/autodoc/inc/ary/cpp/c_macro.hxx
deleted file mode 100644
index 73568478..00000000
--- a/autodoc/inc/ary/cpp/c_macro.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_MACRO_HXX
-#define ARY_CPP_C_MACRO_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_de.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C/C++ macro ("#define ABC(a,b)") statement, but no simple define.
-
- @see Define
-*/
-class Macro : public DefineEntity
-{
- public:
- enum E_ClassId { class_id = 1602 };
-
- Macro();
- Macro( /// Used for: #define DEFINE xyz
- const String & i_name,
- const StringVector &
- i_params,
- const StringVector &
- i_definition,
- loc::Le_id i_declaringFile );
- ~Macro();
- const StringVector & Params() const { return aParams; }
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object
- virtual ClassId get_AryClass() const;
-
- // Interface DefineEntity:
- virtual const StringVector &
- inq_DefinitionText() const;
- // DATA
- StringVector aParams;
- StringVector aDefinition;
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_namesp.hxx b/autodoc/inc/ary/cpp/c_namesp.hxx
deleted file mode 100644
index deade56a..00000000
--- a/autodoc/inc/ary/cpp/c_namesp.hxx
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_NAMESP_HXX
-#define ARY_CPP_C_NAMESP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
-#include <ary/arygroup.hxx>
- // OTHER
-#include <ary/symtreenode.hxx>
-#include <ary/cessentl.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
- class OperationSignature;
-}
-}
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** A C++ namespace.
-*/
-class Namespace : public CodeEntity,
- public AryGroup
-{
- public:
- enum E_ClassId { class_id = 1000 };
-
- enum E_Slots
- {
- SLOT_SubNamespaces = 1,
- SLOT_Classes,
- SLOT_Enums,
- SLOT_Typedefs,
- SLOT_Operations,
- SLOT_Variables,
- SLOT_Constants
- };
-
- typedef ::ary::symtree::Node<CeNode_Traits> node_t;
-
- Namespace();
- Namespace(
- const String & i_sName,
- Namespace & i_rParent );
- ~Namespace();
- // OPERATIONS
- void Add_LocalNamespace(
- Namespace & io_rLocalNamespace );
- void Add_LocalClass(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalEnum(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalTypedef(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalOperation(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalVariable(
- const String & i_sLocalName,
- Cid i_nId );
- void Add_LocalConstant(
- const String & i_sLocalName,
- Cid i_nId );
-
- // INQUIRY
- virtual uintt Depth() const;
- Namespace * Parent() const;
-
- Ce_id Search_Child(
- const String & i_key ) const;
- Namespace * Search_LocalNamespace(
- const String & i_sLocalName ) const;
- uintt Get_SubNamespaces(
- std::vector< const Namespace* > &
- o_rResultList ) const;
- Ce_id Search_LocalClass(
- const String & i_sName ) const;
- void Search_LocalOperations(
- std::vector<Ce_id> &
- o_result,
- const String & i_sName ) const;
- const node_t & AsNode() const;
-
- // ACCESS
- node_t & AsNode();
-
- private:
- NON_COPYABLE(Namespace);
-
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual Lid inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // Interface AryGroup
- virtual Gid inq_Id_Group() const;
- virtual const cpp::CppEntity &
- inq_RE_Group() const;
- virtual const ary::group::SlotList &
- inq_Slots() const;
- virtual DYN Slot * inq_Create_Slot(
- SlotAccessId i_nSlot ) const;
- // Local
- typedef std::multimap<String, Ce_id> Map_Operations;
-
- // DATA
- CeEssentials aEssentials;
- node_t aAssignedNode;
-
- Map_NamespacePtr aLocalNamespaces;
- Map_LocalCe aLocalClasses;
- Map_LocalCe aLocalEnums;
- Map_LocalCe aLocalTypedefs;
- Map_Operations aLocalOperations;
- Map_LocalCe aLocalVariables;
- Map_LocalCe aLocalConstants;
-
- Namespace * pParent;
- uintt nDepth;
-};
-
-
-
-// IMPLEMENTATION
-inline const Namespace::node_t &
-Namespace::AsNode() const
-{
- return aAssignedNode;
-}
-
-inline Namespace::node_t &
-Namespace::AsNode()
-{
- return aAssignedNode;
-}
-
-
-
-
-} // namespace cpp
-} // ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_osigna.hxx b/autodoc/inc/ary/cpp/c_osigna.hxx
deleted file mode 100644
index 717763f2..00000000
--- a/autodoc/inc/ary/cpp/c_osigna.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_OSIGNA_HXX
-#define ARY_CPP_C_OSIGNA_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
-}
-}
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** The signature of a C++ function. That is: parameter types and
- const/volatile modifiers.
-*/
-class OperationSignature
-{
- public:
- typedef std::vector<Type_id> ParameterTypeList;
-
- OperationSignature(
- ParameterTypeList i_parameterTypes, // Non const, because it will be swapped with aParameterTypes.
- E_ConVol i_conVol );
-
- bool operator==(
- const OperationSignature &
- i_rSig ) const;
- bool operator<(
- const OperationSignature &
- i_rSig ) const;
-
- // INQUIRY
- const ParameterTypeList &
- Parameters() const;
- E_ConVol ConVol() const;
-
- /** Compares the signatures by length an then by ids of
- parameter types. So the result is not always human
- reconstructable.
- @return like in strcmp().
- */
- int Compare(
- const OperationSignature &
- i_rSig ) const;
- private:
- // DATA
- ParameterTypeList aParameterTypes;
- E_ConVol eConVol;
-};
-
-
-
-
-// IMPLEMENTATION
-inline bool
-OperationSignature::operator==( const OperationSignature & i_rSign ) const
-{
- return Compare(i_rSign) == 0;
-}
-
-inline bool
-OperationSignature::operator<( const OperationSignature & i_rSign ) const
-{
- return Compare(i_rSign) < 0;
-}
-
-inline const OperationSignature::ParameterTypeList &
-OperationSignature::Parameters() const
-{
- return aParameterTypes;
-}
-
-inline E_ConVol
-OperationSignature::ConVol() const
-{
- return eConVol;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_slntry.hxx b/autodoc/inc/ary/cpp/c_slntry.hxx
deleted file mode 100644
index 407375bd..00000000
--- a/autodoc/inc/ary/cpp/c_slntry.hxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_SLNTRY_HXX
-#define ARY_CPP_C_SLNTRY_HXX
-// KORR_DEPRECATED_3.0
-
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/namesort.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
- class Namespace;
-
-
-
-typedef Namespace * NamespacePtr;
-struct Less_NamespacePtr
-{
- bool operator()( /// @return true if (i_p1->Name() < i_p2->Name()) .
- const NamespacePtr& i_p1,
- const NamespacePtr& i_p2 );
-};
-
-
-
-
-struct S_Classes_Base
-{
- Type_id nId;
- E_Protection eProtection;
- E_Virtuality eVirtuality;
- String sComment;
-
- S_Classes_Base()
- : nId(0),
- eProtection(PROTECT_global),
- eVirtuality(VIRTUAL_none)
- // sComment
- { }
-};
-
-struct S_TplParam
-{
- String sName;
- Type_id nId;
-
- S_TplParam(
- String i_sName,
- Type_id i_nId )
- : sName(i_sName), nId(i_nId) {}
- const String & Name() const { return sName; }
-};
-
-
-struct S_LocalCe
-{
- String sLocalName;
- Ce_id nId;
-
- S_LocalCe() : nId(0) {}
- S_LocalCe(
- const String & i_sLocalName,
- Cid i_nId )
- : sLocalName(i_sLocalName), nId(i_nId) {}
- bool operator<(
- const S_LocalCe & i_rCe ) const
- { return LesserName()(sLocalName,i_rCe.sLocalName); }
-};
-
-typedef std::vector< S_LocalCe > List_LocalCe;
-
-
-typedef std::map<String, NamespacePtr> Map_NamespacePtr;
-typedef std::vector< S_Classes_Base > List_Bases;
-typedef std::vector< S_TplParam > List_TplParam;
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_traits.hxx b/autodoc/inc/ary/cpp/c_traits.hxx
deleted file mode 100644
index 80390b15..00000000
--- a/autodoc/inc/ary/cpp/c_traits.hxx
+++ /dev/null
@@ -1,219 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_TRAITS_HXX
-#define ARY_CPP_C_TRAITS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace ary
-{
-namespace symtree
-{
- template <class X> class Node;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** Basic traits for derived ones of ->CodeEntity.
-*/
-struct Ce_Traits
-{
- typedef CodeEntity entity_base_type;
- typedef Ce_id id_type;
-
- static entity_base_type &
- EntityOf_(
- id_type i_id );
-};
-
-
-/** An instance of SYMBOL_TRAITS for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct CeNode_Traits : public Ce_Traits
-{
- static const symtree::Node<CeNode_Traits> *
- NodeOf_(
- const entity_base_type &
- i_entity );
- static symtree::Node<CeNode_Traits> *
- NodeOf_(
- entity_base_type & i_entity );
- static entity_base_type *
- ParentOf_(
- const entity_base_type &
- i_entity );
- template <class KEY>
- static id_type Search_(
- const entity_base_type &
- i_entity,
- const KEY & i_localKey );
-};
-
-
-/** An instance of COMPARE for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct Ce_Compare : public Ce_Traits
-{
- typedef String key_type;
-
- static const key_type &
- KeyOf_(
- const entity_base_type &
- i_entity );
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-};
-
-/** An instance of COMPARE for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct Ce_GlobalCompare : public Ce_Traits
-{
- typedef entity_base_type key_type;
-
- static const key_type &
- KeyOf_(
- const entity_base_type &
- i_entity )
- { return i_entity; }
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-};
-
-
-/** Basic traits for derivd ones of ->DefineEntity.
-*/
-struct Def_Traits
-{
- typedef DefineEntity entity_base_type;
- typedef De_id id_type;
-
- static entity_base_type &
- EntityOf_(
- id_type i_id );
-};
-
-
-/** An instance of COMPARE for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct Def_Compare : public Def_Traits
-{
- typedef String key_type;
-
- static const key_type &
- KeyOf_(
- const entity_base_type &
- i_entity );
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-};
-
-/** Basic traits for derivd ones of ->Type.
-*/
-struct Type_Traits
-{
- typedef Type entity_base_type;
- typedef Type_id id_type;
-
- static entity_base_type &
- EntityOf_(
- id_type i_id );
-};
-
-/** An instance of COMPARE for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct UsedType_Compare : public Type_Traits
-{
- typedef UsedType key_type;
-
- static const key_type &
- KeyOf_(
- const entity_base_type &
- i_entity );
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-};
-
-
-
-
-
-
-// IMPLEMENTATION
-
-/// Implementation helper for ->CeNode_Traits::Search_ .
-Ce_id CeNode_Search(
- const CodeEntity & i_entity,
- const String & i_localKey );
-
-
-template <class KEY>
-Ce_Traits::id_type
-CeNode_Traits::Search_( const entity_base_type & i_entity,
- const KEY & i_localKey )
-{
- return CeNode_Search(i_entity, i_localKey);
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_tydef.hxx b/autodoc/inc/ary/cpp/c_tydef.hxx
deleted file mode 100644
index e9716c62..00000000
--- a/autodoc/inc/ary/cpp/c_tydef.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_TYDEF_HXX
-#define ARY_CPP_C_TYDEF_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
- // OTHER
-#include <ary/cessentl.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C++ typedef declaration.
-*/
-class Typedef : public CodeEntity
-{
- public:
- // LIFECYCLE
- enum E_ClassId { class_id = 1003 };
-
- Typedef(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- Lid i_nFile,
- Type_id i_nDescribingType );
- ~Typedef();
- // INQUIRY
- Type_id DescribingType() const;
- E_Protection Protection() const { return eProtection; }
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::cpp::CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual Lid inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // DATA
- CeEssentials aEssentials;
- Type_id nDescribingType;
- E_Protection eProtection;
-};
-
-
-
-// IMPLEMENTATION
-inline Type_id
-Typedef::DescribingType() const
-{
- return nDescribingType;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_type.hxx b/autodoc/inc/ary/cpp/c_type.hxx
deleted file mode 100644
index 06f98d79..00000000
--- a/autodoc/inc/ary/cpp/c_type.hxx
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_TYPE_HXX
-#define ARY_CPP_C_TYPE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/entity.hxx>
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_traits.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** Base of all C++ types
-*/
-class Type : public ::ary::Entity
-{
- public:
- typedef Type_Traits traits_t;
-
- virtual ~Type() {}
-
- Type_id TypeId() const { return Type_id(Id()); }
- Ce_id RelatedCe() const;
- bool IsConst() const;
- void Get_Text(
- StreamStr & o_rOut,
- const Gate & i_rGate ) const;
-
- /** It is guaranteed, that the output is correct, also,
- if all three output-streams are the same instance.
- */
- void Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const;
-
- private:
- virtual Rid inq_RelatedCe() const; // Defaulted to 0. Implemented in c_builtintype.cxx.
- virtual bool inq_IsConst() const = 0;
- virtual void inq_Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Ce_id
-Type::RelatedCe() const
-{
- return Ce_id(inq_RelatedCe());
-}
-
-inline bool
-Type::IsConst() const
-{
- return inq_IsConst();
-}
-
-inline void
-Type::Get_Text( StreamStr & o_rOut,
- const Gate & i_rGate ) const
-{
- inq_Get_Text( o_rOut, o_rOut, o_rOut, i_rGate );
-}
-
-inline void
-Type::Get_Text( StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const
-{
- inq_Get_Text( o_rPreName,o_rName,o_rPostName, i_rGate );
-}
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_types4cpp.hxx b/autodoc/inc/ary/cpp/c_types4cpp.hxx
deleted file mode 100644
index 22b14170..00000000
--- a/autodoc/inc/ary/cpp/c_types4cpp.hxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_TYPES4CPP_HXX
-#define ARY_CPP_C_TYPES4CPP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <cosv/tpl/range.hxx>
-#include <ary/types.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-class Namespace;
-class CodeEntity;
-class Type;
-class DefineEntity;
-class Gate;
-class CePilot;
-class TypePilot;
-class SecondariesPilot;
-class Ce_Storage;
-class Def_Storage;
-class Type_Storage;
-class UsedType;
-
-
-typedef TypedId< ::ary::cpp::CodeEntity > Ce_id;
-typedef TypedId< ::ary::cpp::Type > Type_id;
-typedef TypedId< ::ary::cpp::DefineEntity > De_id;
-
-
-typedef std::vector<Ce_id> CesList;
-typedef std::vector<De_id> DefsList;
-typedef std::vector<Type_id> TypesList;
-
-typedef std::vector<Ce_id>::const_iterator CesConstIterator;
-typedef std::vector<De_id>::const_iterator DefsConstIterator;
-typedef std::vector<Type_id>::const_iterator TypesConstIterator;
-
-typedef csv::range< CesConstIterator > CesResultList;
-typedef csv::range< DefsConstIterator > DefsResultList;
-typedef csv::range< TypesConstIterator > TypesResultList;
-
-
-typedef std::map<String, Ce_id> Map_LocalCe;
-
-
-
-enum E_Protection
-{
- PROTECT_global = 0,
- PROTECT_local, /// within Functions
- PROTECT_public,
- PROTECT_protected,
- PROTECT_private
-};
-
-/** The sequence of E_Virtuality's values must not be changed,
- because they are used in int-comparisons.
-*/
-enum E_Virtuality
-{
- VIRTUAL_none = 0,
- VIRTUAL_virtual,
- VIRTUAL_abstract
-};
-
-enum E_ClassKey
-{
- CK_class,
- CK_struct,
- CK_union
-};
-
-enum E_TypeSpecialisation
-{
- TYSP_none = 0,
- TYSP_unsigned,
- TYSP_signed
-};
-
-enum E_ConVol
-{
- CONVOL_none = 0,
- CONVOL_const = 0x0001,
- CONVOL_volatile = 0x0002,
- CONVOL_both = 0x0003
-};
-
-
-
-// Backwards compatibility:
-typedef Ce_id Cid;
-typedef Type_id Tid;
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_vari.hxx b/autodoc/inc/ary/cpp/c_vari.hxx
deleted file mode 100644
index b31f04a1..00000000
--- a/autodoc/inc/ary/cpp/c_vari.hxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_VARI_HXX
-#define ARY_CPP_C_VARI_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_ce.hxx>
- // OTHER
-#include <ary/cessentl.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** A C++ variable or constant declaration.
-*/
-class Variable : public CodeEntity
-{
- public:
- // LIFECYCLE
- enum E_ClassId { class_id = 1005 };
-
- Variable(
- const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- loc::Le_id i_nFile,
- Type_id i_nType,
- VariableFlags i_aFlags,
- const String & i_sArraySize,
- const String & i_sInitValue );
- ~Variable();
-
-
- // INQUIRY
- Type_id Type() const;
- const String & ArraySize() const;
- const String & Initialisation() const;
- E_Protection Protection() const { return eProtection; }
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::cpp::CodeEntity
- virtual const String &
- inq_LocalName() const;
- virtual Cid inq_Owner() const;
- virtual Lid inq_Location() const;
-
- // Interface ary::cpp::CppEntity
- virtual ClassId get_AryClass() const;
-
- // DATA
- CeEssentials aEssentials;
- Type_id nType;
- E_Protection eProtection;
- VariableFlags aFlags;
- String sArraySize;
- String sInitialisation;
-};
-
-
-
-// IMPLEMENTATION
-inline Type_id
-Variable::Type() const
- { return nType; }
-inline const String &
-Variable::ArraySize() const
- { return sArraySize; }
-inline const String &
-Variable::Initialisation() const
- { return sInitialisation; }
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/c_vfflag.hxx b/autodoc/inc/ary/cpp/c_vfflag.hxx
deleted file mode 100644
index b94163d8..00000000
--- a/autodoc/inc/ary/cpp/c_vfflag.hxx
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_VFFLAG_HXX
-#define ARY_CPP_C_VFFLAG_HXX
-
-// USED SERVICES
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** Properties of C++ variables.
-*/
-struct VariableFlags
-{
- public:
- enum E_Flags
- {
- f_static_local = 0x0001,
- f_static_member = 0x0002,
- f_extern = 0x0004,
- f_mutable = 0x0008
- };
-
- VariableFlags(
- UINT16 i_nFlags = 0 )
- : nFlags(i_nFlags) {}
-
- void Reset() { nFlags = 0; }
-
- void SetStaticLocal() { nFlags |= f_static_local; }
- void SetStaticMember() { nFlags |= f_static_member; }
- void SetExtern() { nFlags |= f_extern; }
- void SetMutable() { nFlags |= f_mutable; }
-
- bool IsStaticLocal() const { return (nFlags & f_static_local) != 0; }
- bool IsStaticMember() const { return (nFlags & f_static_member) != 0; }
- bool IsExtern() const { return (nFlags & f_extern) != 0; }
- bool IsMutable() const { return (nFlags & f_mutable) != 0; }
-
- private:
- UINT16 nFlags;
-};
-
-
-/** Properties of C++ functions.
-*/
-struct FunctionFlags
-{
- public:
- enum E_Flags
- {
- f_static_local = 0x0001,
- f_static_member = 0x0002,
- f_extern = 0x0004,
- f_externC = 0x0008,
- f_mutable = 0x0010,
- f_inline = 0x0100,
- f_register = 0x0200,
- f_explicit = 0x0400
- };
-
- FunctionFlags(
- UINT16 i_nFlags = 0 )
- : nFlags(i_nFlags) {}
-
- bool operator==(
- const FunctionFlags &
- i_ff ) const
- { return nFlags == i_ff.nFlags; }
- bool operator!=(
- const FunctionFlags &
- i_ff ) const
- { return NOT operator==(i_ff); }
-
- void Reset() { nFlags = 0; }
-
- void SetStaticLocal() { nFlags |= f_static_local; }
- void SetStaticMember() { nFlags |= f_static_member; }
- void SetExtern() { nFlags |= f_extern; }
- void SetExternC() { nFlags |= f_externC; }
- void SetMutable() { nFlags |= f_mutable; }
- void SetInline() { nFlags |= f_inline; }
- void SetRegister() { nFlags |= f_register; }
- void SetExplicit() { nFlags |= f_explicit; }
-
- bool IsStaticLocal() const { return (nFlags & f_static_local) != 0; }
- bool IsStaticMember() const { return (nFlags & f_static_member) != 0; }
- bool IsExtern() const { return (nFlags & f_extern) != 0; }
- bool IsExternC() const { return (nFlags & f_externC) != 0; }
- bool IsMutable() const { return (nFlags & f_mutable) != 0; }
- bool IsInline() const { return (nFlags & f_inline) != 0; }
- bool IsRegister() const { return (nFlags & f_register) != 0; }
- bool IsExplicit() const { return (nFlags & f_explicit) != 0; }
-
- private:
- UINT16 nFlags;
-};
-
-
-/** A C++ function parameter.
-*/
-struct S_Parameter
-{
- String sName;
- String sSizeExpression;
- String sInitExpression;
- Type_id nType;
-
- S_Parameter() : nType(0) {}
- ~S_Parameter() {}
- void Empty() { nType = Type_id(0);
- sName.clear();
- sSizeExpression.clear();
- sInitExpression.clear(); }
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/cp_ce.hxx b/autodoc/inc/ary/cpp/cp_ce.hxx
deleted file mode 100644
index ce612f0c..00000000
--- a/autodoc/inc/ary/cpp/cp_ce.hxx
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CP_CE_HXX
-#define ARY_CPP_CP_CE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
- class QualifiedName;
-
-namespace cpp
-{
- class Class;
- class CodeEntity;
- class Enum;
- class EnumValue;
- class Function;
- class InputContext;
- class Namespace;
- class OperationSignature;
- class Typedef;
- class Variable;
-
- struct FunctionFlags;
- struct S_Parameter;
- struct VariableFlags;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** Acess to all declared C++ code entites (types, variables, operations)
- in the repository.
-*/
-class CePilot
-{
- public:
- // LIFECYCLE
- virtual ~CePilot() {}
-
- // OPERATIONS
- virtual Namespace &
- CheckIn_Namespace(
- const InputContext &
- i_context,
- const String & i_localName ) = 0;
- virtual Class & Store_Class(
- const InputContext &
- i_context,
- const String & i_localName,
- E_ClassKey i_classKey ) = 0;
- virtual Enum & Store_Enum(
- const InputContext &
- i_context,
- const String & i_localName ) = 0;
- virtual Typedef & Store_Typedef(
- const InputContext &
- i_context,
- const String & i_localName,
- Type_id i_referredType ) = 0;
-
- /// @return 0, if the function is duplicate.
- virtual Function * Store_Operation(
- const InputContext &
- i_context,
- const String & i_localName,
- Type_id i_returnType,
- const std::vector<S_Parameter> &
- i_parameters,
- E_Virtuality i_virtuality,
- E_ConVol i_conVol,
- FunctionFlags i_flags,
- bool i_throwExists,
- const std::vector<Tid> &
- i_exceptions ) = 0;
- virtual Variable & Store_Variable(
- const InputContext &
- i_context,
- const String & i_localName,
- Type_id i_type,
- VariableFlags i_flags,
- const String & i_arraySize,
- const String & i_initValue ) = 0;
- virtual EnumValue & Store_EnumValue(
- const InputContext &
- i_context,
- const String & i_localName,
- const String & i_initValue ) = 0;
- // INQUIRY
- virtual const Namespace &
- GlobalNamespace() const = 0;
- virtual const CodeEntity &
- Find_Ce(
- Ce_id i_id ) const = 0;
- virtual const CodeEntity *
- Search_Ce(
- Ce_id i_id ) const = 0;
-
- /// It's assumed that i_rSearchedName is an absolute name.
- virtual const CodeEntity *
- Search_CeAbsolute(
- const CodeEntity & i_curScope,
- const QualifiedName &
- i_absoluteName ) const = 0;
- virtual const CodeEntity *
- Search_CeLocal(
- const String & i_relativeName,
- bool i_isFunction,
- const Namespace & i_curNamespace,
- const Class * i_curClass ) const = 0;
- virtual void Get_QualifiedName(
- StreamStr & o_result,
- const String & i_localName,
- Ce_id i_owner,
- const char * i_delimiter = "::" ) const = 0;
- virtual void Get_SignatureText(
- StreamStr & o_rOut,
- const OperationSignature &
- i_signature,
- const StringVector *
- i_sParameterNames = 0 ) const = 0;
- virtual CesResultList
- Search_TypeName(
- const String & i_sName ) const = 0;
- // ACCESS
- virtual Namespace & GlobalNamespace() = 0;
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/cp_def.hxx b/autodoc/inc/ary/cpp/cp_def.hxx
deleted file mode 100644
index 64b9b245..00000000
--- a/autodoc/inc/ary/cpp/cp_def.hxx
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CP_DEF_HXX
-#define ARY_CPP_CP_DEF_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class Define;
- class InputContext;
- class Macro;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** Acess to C++ defines and macros in the repository.
-*/
-class DefPilot
-{
- public:
- typedef DefsList::const_iterator DefsIterator;
-
-
-
- // LIFECYCLE
- virtual ~DefPilot() {}
-
-
- // OPERATIONS
- virtual Define & Store_Define(
- const InputContext& i_rContext,
- const String & i_sName,
- const StringVector &
- i_rDefinition ) = 0;
- virtual Macro & Store_Macro(
- const InputContext& i_rContext,
- const String & i_sName,
- const StringVector &
- i_rParams,
- const StringVector &
- i_rDefinition ) = 0;
- // INQUIRY
- virtual const DefineEntity &
- Find_Def(
- De_id i_id ) const = 0;
- virtual DefsResultList
- AllDefines() const = 0;
- virtual DefsResultList
- AllMacros() const = 0;
-};
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/cp_type.hxx b/autodoc/inc/ary/cpp/cp_type.hxx
deleted file mode 100644
index c477b23c..00000000
--- a/autodoc/inc/ary/cpp/cp_type.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CP_TYPE_HXX
-#define ARY_CPP_CP_TYPE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class InputContext;
- class Type;
- class UsedType;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-
-/** Acess to all found C++ types (as they are used in declarations)
- in the repository.
-*/
-class TypePilot
-{
- public:
-
- // LIFECYCLE
- virtual ~TypePilot() {}
-
-
- // OPERATIONS
- virtual const Type &
- CheckIn_UsedType(
- const InputContext &
- i_context,
- DYN UsedType & pass_type ) = 0;
- // INQUIRY
- virtual const Type &
- Find_Type(
- Type_id i_type ) const = 0;
- virtual bool Get_TypeText(
- StreamStr & o_result,
- Type_id i_type ) const = 0;
- virtual bool Get_TypeText(
- StreamStr & o_preName, /// ::ary::cpp::
- StreamStr & o_name, /// MyClass
- StreamStr & o_postName, /// <TplArgument> * const &
- Type_id i_type ) const = 0;
- virtual Type_id Tid_Ellipse() const = 0;
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/inpcontx.hxx b/autodoc/inc/ary/cpp/inpcontx.hxx
deleted file mode 100644
index 7acc88d6..00000000
--- a/autodoc/inc/ary/cpp/inpcontx.hxx
+++ /dev/null
@@ -1,219 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_INPCONTX_HXX
-#define ARY_CPP_INPCONTX_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace ary
-{
-namespace loc
-{
- class File;
-}
-namespace cpp
-{
- class Gate;
- class Namespace;
- class Class;
- class Enum;
-
- class OperationSignature;
-}
-}
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** The context of a CodeEntity, which is going to be stored in the
- repository. The information is used mainly by ->ary::cpp::CeAdmin.
-*/
-class InputContext
-{
- public:
- class Owner
- {
- public:
- // LIFECYCLE
- virtual ~Owner() {}
-
- // OPERATIONS
- /// Adds Class data to current inner scope (Namespace or Class).
- void Add_Class(
- const String & i_sLocalName,
- Cid i_nId );
- /// Adds Enum data to current inner scope (Namespace or Class).
- void Add_Enum(
- const String & i_sLocalName,
- Cid i_nId );
- /// Adds Typedef data to current inner scope (Namespace or Class).
- void Add_Typedef(
- const String & i_sLocalName,
- Cid i_nId );
- /// Adds Operation data to current inner scope (Namespace or Class).
- void Add_Operation(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStaticMember ); /// True only for static class members.
- /// Adds Variable data to current inner scope (Namespace or Class).
- void Add_Variable(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStaticMember ); /// True only for static class members.
- // INQUIRY
- Ce_id CeId() const;
-
- /** @attention Must only be used by ary::cpp::GatePilot!
- Will work nowhere else!
- */
- virtual bool HasClass(
- const String & i_sLocalName ) = 0;
- private:
- virtual void do_Add_Class(
- const String & i_sLocalName,
- Cid i_nId ) = 0;
- virtual void do_Add_Enum(
- const String & i_sLocalName,
- Cid i_nId ) = 0;
- virtual void do_Add_Typedef(
- const String & i_sLocalName,
- Cid i_nId ) = 0;
- virtual void do_Add_Operation(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStatic ) = 0;
- virtual void do_Add_Variable(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStatic ) = 0;
- virtual Ce_id inq_CeId() const = 0;
- };
-
- // LIFECYCLE
- virtual ~InputContext() {}
-
- // OPERATIONS
-
- // INQUIRY
- loc::File & CurFile() const;
-
- Namespace & CurNamespace() const;
- Class * CurClass() const;
- Enum * CurEnum() const;
-
- Owner & CurOwner() const;
- E_Protection CurProtection() const;
-
- private:
- virtual loc::File & inq_CurFile() const = 0;
-
- virtual Namespace & inq_CurNamespace() const = 0;
- virtual Class * inq_CurClass() const = 0;
- virtual Enum * inq_CurEnum() const = 0;
-
- virtual Owner & inq_CurOwner() const = 0;
- virtual E_Protection
- inq_CurProtection() const = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline loc::File &
-InputContext::CurFile() const
- { return inq_CurFile(); }
-
-inline Namespace &
-InputContext::CurNamespace() const
- { return inq_CurNamespace(); }
-inline Class *
-InputContext::CurClass() const
- { return inq_CurClass(); }
-inline Enum *
-InputContext::CurEnum() const
- { return inq_CurEnum(); }
-inline InputContext::Owner &
-InputContext::CurOwner() const
- { return inq_CurOwner(); }
-inline E_Protection
-InputContext::CurProtection() const
- { return inq_CurProtection(); }
-
-
-inline void
-InputContext::Owner::Add_Class( const String & i_sLocalName,
- Cid i_nId )
- { do_Add_Class(i_sLocalName, i_nId); }
-inline void
-InputContext::Owner::Add_Enum( const String & i_sLocalName,
- Cid i_nId )
- { do_Add_Enum(i_sLocalName, i_nId); }
-inline void
-InputContext::Owner::Add_Typedef( const String & i_sLocalName,
- Cid i_nId )
- { do_Add_Typedef(i_sLocalName, i_nId); }
-inline void
-InputContext::Owner::Add_Operation( const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStatic )
- { do_Add_Operation( i_sLocalName, i_nId, i_bIsStatic ); }
-inline void
-InputContext::Owner::Add_Variable( const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStatic )
- { do_Add_Variable( i_sLocalName, i_nId, i_bIsConst, i_bIsStatic ); }
-inline Ce_id
-InputContext::Owner::CeId() const
- { return inq_CeId(); }
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/namechain.hxx b/autodoc/inc/ary/cpp/namechain.hxx
deleted file mode 100644
index d8894bbd..00000000
--- a/autodoc/inc/ary/cpp/namechain.hxx
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_NAMECHAI_HXX
-#define ARY_CPP_NAMECHAI_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
-
-namespace ut
-{
- class List_TplParameter;
-
-class NameSegment
-{
- public:
- NameSegment(
- const char * i_sName );
- /** @precond MPT pTemplate.
- This cannot be used, except of inserting a new element
- in the segment list of ary::cpp::ut::NameChain. In that
- case, the template parameter list doe snot yet exist.
- */
- NameSegment(
- const NameSegment & i_rSeg );
- ~NameSegment();
-
- // OPERATIONS
- List_TplParameter & AddTemplate();
-
- // INQUIRY
- const String & Name() const;
-
- /// @return as strcmp().
- intt Compare(
- const NameSegment & i_rOther ) const;
- void Get_Text_AsScope(
- StreamStr & o_rOut,
- const ary::cpp::Gate &
- i_rGate ) const;
- void Get_Text_AsMainType(
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const ary::cpp::Gate &
- i_rGate ) const;
-
- NameSegment& operator=(const NameSegment&);
- private:
- String sName;
- Dyn<List_TplParameter>
- pTemplate;
-};
-
-class NameChain
-{
- public:
- typedef std::vector<NameSegment>::const_iterator
- const_iterator;
-
- NameChain();
- ~NameChain();
-
- // OPERATIONS
- void Add_Segment(
- const char * i_sSeg );
- /** @precond aSegments.size() > 0.
- Which means: Add_Segment() has to be called at least once before.
- */
- List_TplParameter & Templatize_LastSegment();
-
- // INQUIRY
- const_iterator begin() const { return aSegments.begin(); }
- const_iterator end() const { return aSegments.end(); }
-
- /// @return like strcmp.
- intt Compare(
- const NameChain & i_rChain ) const;
- /// @ATTENTION Return value is volatile. Not reentrance enabled.
- const String & LastSegment() const;
-
- void Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const ary::cpp::Gate &
- i_rGate ) const;
- private:
- std::vector< NameSegment >
- aSegments;
-};
-
-
-
-// IMPLEMENTATION
-inline const String &
-NameSegment::Name() const
- { return sName; }
-
-
-
-
-
-
-} // namespace ut
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/cpp/usedtype.hxx b/autodoc/inc/ary/cpp/usedtype.hxx
deleted file mode 100644
index 68b1297b..00000000
--- a/autodoc/inc/ary/cpp/usedtype.hxx
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_USEDTYPE_HXX
-#define ARY_CPP_USEDTYPE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/c_type.hxx>
- // OTHER
-#include <ary/cpp/namechain.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class CePilot;
-
-namespace ut
-{
- class List_TplParameter;
-}
-}
-}
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** This class represents a type in textual form, like it is parsed out of
- source code as a variable type or function return type.
-*/
-class UsedType : public Type
-{
- public:
- enum E_ClassId { class_id = 1203 };
-
- explicit UsedType(
- Ce_id i_scope );
- ~UsedType();
- // OPERATORS
- bool operator<(
- const UsedType & i_rType ) const;
- // OPERATIONS
-
- // Operations to build up the used type from parsing:
- void Set_Absolute(); /// "::" is in front.
- void Add_NameSegment(
- const char * i_sSeg );
- ut::List_TplParameter &
- Enter_Template();
- void Set_Unsigned();
- void Set_Signed();
- void Set_BuiltIn(
- const char * i_sType );
- void Set_Const(); /// Sets CV to the type or the present pointer level, whatever is highest.
- void Set_Volatile(); /// Sets CV to the type or the present pointer level, whatever is highest.
- void Add_PtrLevel(); /// For an '*'.
- void Set_Reference(); /// For an '&'.
-
- // Operations to find the relating CodeEntity:
- /** This needs to be called only one time. After that
- RelatedCe() will return the value.
-
- When connectiing all parsed types, there are three steps:
- 1. Find related types in the same scope and namespaces above.
- 2. Then all classes can be connected to their base classes.
- 3. Lastly types can be connected to Ces only known via their base
- classes. This is not possible at step 1.
-
- @see Connect2CeOnlyKnownViaBaseClass()
- */
- void Connect2Ce(
- const CePilot & i_ces );
-
- /** @see Connect2Ce()
- */
- void Connect2CeOnlyKnownViaBaseClass(
- const Gate & i_gate );
-
- // INQUIRY
- /** @return True, if type consists of one built-in typename and
- nothing else.
- */
- bool IsBuiltInType() const;
- /** @return the full local name, including template instantiation, but without
- '*','&' or modifiers.
- */
- const String & LocalName() const;
- E_TypeSpecialisation
- TypeSpecialisation() const;
-
- private:
- // Interface csv::ConstProcessorClient
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
-
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface ary::cpp::Type:
- virtual Rid inq_RelatedCe() const;
- virtual bool inq_IsConst() const;
- virtual void inq_Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const ary::cpp::Gate &
- i_rGate ) const;
- // Local
- typedef std::vector< ary::cpp::E_ConVol > PtrLevelVector;
-
- uintt PtrLevel() const { return uintt(aPtrLevels.size()); }
- Ce_id RecursiveSearchCe_InBaseClassesOf(
- const CodeEntity & i_mayBeClass,
- const StringVector &
- i_myQualification,
- const String & i_myName,
- const Gate & i_gate ) const;
- void Get_NameParts(
- StringVector & o_qualification,
- String & o_name );
-
- // Forbidden functions
- UsedType(
- const UsedType & i_rType );
- bool operator=(
- const UsedType & i_rType );
-
- // DATA
- ut::NameChain aPath;
- PtrLevelVector aPtrLevels;
- ary::cpp::E_ConVol eConVol_Type;
- bool bIsReference;
- bool bIsAbsolute;
- bool bRefers2BuiltInType;
- E_TypeSpecialisation
- eTypeSpecialisation;
- Ce_id nRelatedCe;
-
- /// Namespace or class scope where the type occurred.
- Ce_id nScope;
-};
-
-
-namespace ut
-{
- class TemplateParameter;
-
-class List_TplParameter
-{
- public:
- typedef std::vector< DYN TemplateParameter * >::const_iterator const_iterator;
-
- List_TplParameter();
- ~List_TplParameter();
-
- void AddParam_Type(
- Type_id i_nType );
- /// puts "< " TemplateArgumentList " >" to o_rOut.
- void Get_Text(
- StreamStr & o_rOut,
- const ary::cpp::Gate &
- i_rGate ) const;
- /// @return as strcmp().
- intt Compare(
- const List_TplParameter &
- i_rOther ) const;
-
- private:
- typedef std::vector< DYN TemplateParameter * > Vector_TplArgument;
-
- Vector_TplArgument aTplParameters;
-};
-
-} // namespace ut
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_boolean.hxx b/autodoc/inc/ary/doc/d_boolean.hxx
deleted file mode 100644
index 00bab2a1..00000000
--- a/autodoc/inc/ary/doc/d_boolean.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_BOOLEAN_HXX
-#define ARY_DOC_D_BOOLEAN_HXX
-
-// BASE CLASSES
-#include <ary/doc/d_node.hxx>
-
-// USED SERVICES
-
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-
-/** Repesents a boolean documentation item like "optional" or "not optional".
-*/
-class Boolean : public Node
-{
- public:
- // LIFECYCLE
- explicit Boolean(
- nodetype::id i_type );
- virtual ~Boolean();
-
- // OPERATIONS
- void Set(
- bool i_b );
- // INQUIRY
- bool IsTrue() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // DATA
- bool b;
-};
-
-
-
-
-// IMPLEMENTATION
-inline
-Boolean::Boolean(nodetype::id i_type)
- : Node(i_type),
- b(false)
-{
-}
-
-inline bool
-Boolean::IsTrue() const
-{
- return b;
-}
-
-inline void
-Boolean::Set( bool i_b )
-{
- b = i_b;
-}
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_docu.hxx b/autodoc/inc/ary/doc/d_docu.hxx
deleted file mode 100644
index a5de97b7..00000000
--- a/autodoc/inc/ary/doc/d_docu.hxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_DOCU_HXX
-#define ARY_DOC_D_DOCU_HXX
-
-// BASE CLASSES
-#include <cosv/tpl/processor.hxx>
-
-// USED SERVICES
-#include <ary/doc/d_node.hxx>
-
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-
-/** Represents a documentation which is assigned to an Autodoc
- repository entity.
-*/
-class Documentation : public csv::ConstProcessorClient
-{
- public:
- Documentation();
- ~Documentation();
- // OPERATIONS
- void Clear();
-
- // INQUIRY
- const Node * Data() const;
-
- // ACCESS
- Node * Data();
- void Set_Data(
- ary::doc::Node & i_data );
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // DATA
- Dyn<Node> pData;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Documentation::Clear()
-{
- pData = 0;
-}
-
-inline const Node *
-Documentation::Data() const
-{
- return pData.Ptr();
-}
-
-inline Node *
-Documentation::Data()
-{
- return pData.Ptr();
-}
-
-inline void
-Documentation::Set_Data(ary::doc::Node & i_data)
-{
- pData = &i_data;
-}
-
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_node.hxx b/autodoc/inc/ary/doc/d_node.hxx
deleted file mode 100644
index a1d2a28f..00000000
--- a/autodoc/inc/ary/doc/d_node.hxx
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_NODE_HXX
-#define ARY_DOC_D_NODE_HXX
-
-// BASE CLASSES
-#include <cosv/tpl/processor.hxx>
-// USED SERVICES
-#include <cosv/tpl/vvector.hxx>
-#include <ary/doc/d_types4doc.hxx>
-
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-
-/** The abstract base class for any type of documentation content.
-
- A ->Documentation has as content a hierarchy of Nodes, each can be a
- different kind of content, like descriptions of single items or structs
- or lists of Nodes.
-*/
-class Node : public csv::ConstProcessorClient
-{
- public:
- // LIFECYCLE
- virtual ~Node();
-
- // OPERATIONS
- void Add_toChain(
- DYN Node & pass_nextNode );
- // INQUIRY
- nodetype::id Type() const;
- const Node * Next() const;
- bool IsSingle() const;
- uintt ListSize() const;
-
- protected:
- explicit Node(
- nodetype::id i_type);
- private:
- // Forbid copies:
- Node(const Node&);
- Node & operator=(const Node&);
-
- // DATA
- nodetype::id nType;
- Dyn<Node> pNext; /// Next ->Node in same list.
-};
-
-typedef csv::VirtualVector<Node> NodeList;
-
-
-
-
-// IMPLEMENTATION
-inline nodetype::id
-Node::Type() const
-{
- return nType;
-}
-
-inline const Node *
-Node::Next() const
-{
- return pNext.Ptr();
-}
-
-inline bool
-Node::IsSingle() const
-{
- return pNext.operator bool();
-}
-
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_oldcppdocu.hxx b/autodoc/inc/ary/doc/d_oldcppdocu.hxx
deleted file mode 100644
index f3971ede..00000000
--- a/autodoc/inc/ary/doc/d_oldcppdocu.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_OLDCPPDOCU_HXX
-#define ARY_DOC_D_OLDCPPDOCU_HXX
-// KORR_DEPRECATED_3.0
-
-// BASE CLASSES
-#include <ary/doc/d_node.hxx>
-// USED SERVICES
-#include <ary/info/inftypes.hxx>
-#include <ary/ary_disp.hxx>
-
-namespace ary
-{
-namespace info
-{
- class AtTag;
- class DocuStore;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace doc
-{
- using ::ary::info::AtTag;
- using ::ary::info::E_AtTagId;
-
-
-/** Wrapper class for old C++ documentation format.
-
- To be replaced by using the standard format.
-*/
-class OldCppDocu : public Node
-{
- public:
- typedef std::vector< DYN AtTag * > TagList;
-
- // LIFECYCLE
- OldCppDocu();
- virtual ~OldCppDocu();
-
- void Store2(
- info::DocuStore & o_rDocuStore );
-
- virtual AtTag * Create_StdTag(
- E_AtTagId i_eId );
- virtual AtTag * CheckIn_BaseTag();
- virtual AtTag * CheckIn_ExceptionTag();
- virtual AtTag * Create_ImplementsTag();
- virtual AtTag * Create_KeywordTag();
- virtual AtTag * CheckIn_ParameterTag();
- virtual AtTag * CheckIn_SeeTag();
- virtual AtTag * CheckIn_TemplateTag();
- virtual AtTag * Create_LabelTag();
- virtual AtTag * Create_DefaultTag();
- virtual AtTag * Create_SinceTag(); /// @return always the first one created.
-
- virtual void Replace_AtShort_By_AtDescr();
-
- virtual void Set_Obsolete();
- virtual void Set_Internal();
- virtual void Set_Interface() { bIsInterface = true; }
-
- // INQUIRY
- const TagList & Tags() const { return aTags; }
- const AtTag & Short() const;
- bool IsObsolete() const { return bIsObsolete; }
- virtual bool IsInternal() const;
- virtual bool IsInterface() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // DATA
- unsigned char nTags[ary::info::C_eAtTag_NrOfClasses];
-
- /** Creates a new AtTag at the end of aTags.
- The index of this new AtTag is inserted in nTags at position
- i_nIndex.
- */
- AtTag * & NewTag(
- UINT8 i_nIndex );
- /** Returns the Tag with the position nTags[i_nIndex]
- in aTags.
- */
- AtTag & GetTag(
- UINT8 i_nIndex );
-
- TagList aTags;
- bool bIsObsolete;
- bool bIsInternal;
- bool bIsInterface;
-};
-
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_oldidldocu.hxx b/autodoc/inc/ary/doc/d_oldidldocu.hxx
deleted file mode 100644
index d99b7612..00000000
--- a/autodoc/inc/ary/doc/d_oldidldocu.hxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_OLDIDLDOCU_HXX
-#define ARY_DOC_D_OLDIDLDOCU_HXX
-
-// BASE CLASSES
-#include <ary/doc/d_node.hxx>
-// USED SERVICES
-#include <ary_i/ci_text2.hxx>
-
-
-
-
-namespace ary
-{
-namespace inf
-{
- class AtTag2;
- class DocuToken;
- class DocuTex2;
-}
-namespace doc
-{
- using ::ary::inf::AtTag2;
- using ::ary::inf::DocuToken;
- using ::ary::inf::DocuTex2;
-
-
-
-/** Wrapper for the old idl documentation format.
-*/
-class OldIdlDocu : public Node
-{
- public:
- OldIdlDocu();
- ~OldIdlDocu();
-
- void AddToken2Short(
- DYN DocuToken & let_drToken )
- { aShort.AddToken(let_drToken); }
- void AddToken2Description(
- DYN DocuToken & let_drToken )
- { aDescription.AddToken(let_drToken); }
- void AddToken2DeprecatedText(
- DYN DocuToken & let_drToken );
- void AddAtTag(
- DYN AtTag2 & let_drAtTag )
- { aTags.push_back(&let_drAtTag); }
- void SetPublished() { bIsPublished = true; }
- void SetDeprecated() { bIsDeprecated = true; }
- void SetOptional() { bIsOptional = true; }
- void SetExternShort(
- const DocuTex2 & i_pExternShort )
- { pExternShort = &i_pExternShort; }
-
- const DocuTex2 & Short() const { return pExternShort != 0 ? *pExternShort : aShort; }
- const DocuTex2 & Description() const { return aDescription; }
- const DocuTex2 & DeprecatedText() const { return aDeprecatedText; }
- const std::vector< AtTag2* > &
- Tags() const { return aTags; }
- bool IsPublished() const { return bIsPublished; }
- bool IsDeprecated() const { return bIsDeprecated; }
- bool IsOptional() const { return bIsOptional; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // DATA
- DocuTex2 aShort;
- DocuTex2 aDescription;
- DocuTex2 aDeprecatedText;
- std::vector< AtTag2* >
- aTags;
- const DocuTex2 * pExternShort;
- bool bIsPublished;
- bool bIsDeprecated;
- bool bIsOptional;
-};
-
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_parametrized.hxx b/autodoc/inc/ary/doc/d_parametrized.hxx
deleted file mode 100644
index edb9e004..00000000
--- a/autodoc/inc/ary/doc/d_parametrized.hxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_PARAMETER_HXX
-#define ARY_DOC_D_PARAMETER_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/doc/d_node.hxx>
-
-namespace ary
-{
-namespace doc
-{
-
-
-/** Documentation unit with Parameter.
-*/
-template <class T>
-class Parametrized : public Node
-{
- public:
- // LIFECYCLE
- explicit Parametrized(
- nodetype::id i_id,
- T i_Parameter );
- virtual ~Parametrized();
-
- // INQUIRY
- const HyperText & Doc() const;
- const T & Parameter() const;
-
- // ACESS
- HyperText & Doc();
- void Set_Parameter(
- const T & i_param );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // DATA
- HyperText aDoc;
- T aParameter;
-};
-
-
-
-
-// IMPLEMENTATION
-template <class T>
-Parametrized<T>::Parametrized( nodetype::id i_id,
- T i_Parameter )
- : Node(i_id),
- aDoc(),
- aParameter(i_Parameter)
-{
-}
-
-template <class T>
-Parametrized<T>::~Parametrized()
-{
-}
-
-template <class T>
-const HyperText &
-Parametrized<T>::Doc() const
-{
- return aDoc;
-}
-
-template <class T>
-const T &
-Parametrized<T>::Parameter() const
-{
- return aParameter;
-}
-
-template <class T>
-HyperText &
-Parametrized<T>::Doc()
-{
- return aDoc;
-}
-
-template <class T>
-inline void
-Parametrized<T>::Set_Parameter(const T & i_param)
-{
- aParameter = i_param;
-}
-
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/d_types4doc.hxx b/autodoc/inc/ary/doc/d_types4doc.hxx
deleted file mode 100644
index 82819717..00000000
--- a/autodoc/inc/ary/doc/d_types4doc.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DOC_D_TYPES4DOC_HXX
-#define ARY_DOC_D_TYPES4DOC_HXX
-
-// USED SERVICES
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-
-/** Type of a documentation: multiple lines or single line.
-*/
-enum E_BlockType
-{
- dbt_none = 0,
- dbt_multiline,
- dbt_singleline
-};
-
-/** Type of documentation text: with html or without.
-*/
-enum E_TextType
-{
- dtt_none = 0,
- dtt_plain,
- dtt_html
-};
-
-namespace nodetype
-{
-
-typedef int id;
-
-} // namespace nodetype
-
-
-
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/doc/ht/dht_interpreter.hxx b/autodoc/inc/ary/doc/ht/dht_interpreter.hxx
deleted file mode 100644
index bef25888..00000000
--- a/autodoc/inc/ary/doc/ht/dht_interpreter.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DHT_INTERPRETER_HXX
-#define ARY_DHT_INTERPRETER_HXX
-
-
-
-
-namespace ary
-{
-namespace doc
-{
-namespace ht
-{
- class Processor;
-
-
-/** Interface for all interpreters of a ->Component.
-*/
-class Interpreter
-{
- public:
- virtual ~Interpreter() {}
-
- void Accept(
- Processor & io_processor,
- const String & i_data ) const;
- private:
- virtual void do_Accept(
- Processor & io_processor,
- const String & i_data ) const = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Interpreter::Accept( Processor & io_processor,
- const String & i_data ) const
-{
- do_Accept(io_processor, i_data);
-}
-
-
-
-
-} // namespace ht
-} // namespace doc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/entity.hxx b/autodoc/inc/ary/entity.hxx
deleted file mode 100644
index 305704a6..00000000
--- a/autodoc/inc/ary/entity.hxx
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ENTITY_HXX
-#define ARY_ENTITY_HXX
-
-// BASE CLASSES
-#include <ary/object.hxx>
-
-
-
-
-namespace ary
-{
-
-
-/** Interface for every class, whose objects are searchable within the
- Autodoc Repository by an id.
-
- @todo
- Possibly make ->Set_Id() less public accessible.
-*/
-class Entity : public Object
-{
- public:
- virtual ~Entity() {}
-
- Rid Id() const;
-
- /// @attention Must be used only by ->ary::stg::Storage<>
- void Set_Id(
- Rid i_nId );
- protected:
- Entity() : nId(0) {}
- private:
- // DATA
- Rid nId;
-};
-
-
-inline Rid
-Entity::Id() const
-{
- return nId;
-}
-
-inline void
-Entity::Set_Id(Rid i_nId)
-{
- nId = i_nId;
-}
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/getncast.hxx b/autodoc/inc/ary/getncast.hxx
deleted file mode 100644
index bff69469..00000000
--- a/autodoc/inc/ary/getncast.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_GETNCAST_HXX
-#define ARY_GETNCAST_HXX
-
-
-// USED SERVICES
-#include <ary/object.hxx>
-
-
-
-
-namespace ary
-{
-
-
-template <class DEST>
-inline bool
-is_type(const ary::Object & i_obj)
-{
- return i_obj.AryClass() == DEST::class_id;
-}
-
-
-template <class DEST>
-inline const DEST &
-ary_cast( const Object & ce)
-{
- csv_assert( is_type<DEST>(ce) );
- return static_cast< const DEST& >(ce);
-}
-
-template <class DEST>
-inline DEST &
-ary_cast( Object & ce)
-{
- csv_assert( is_type<DEST>(ce) );
- return static_cast< DEST& >(ce);
-}
-
-template <class DEST>
-inline const DEST *
-ary_cast( const Object * ce)
-{
- if ( ce ? is_type<DEST>(*ce) : false )
- return static_cast< const DEST* >(ce);
- return 0;
-}
-
-template <class DEST>
-inline DEST *
-ary_cast( Object * ce)
-{
- if ( ce ? is_type<DEST>(*ce) : false )
- return static_cast< DEST* >(ce);
- return 0;
-}
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_attribute.hxx b/autodoc/inc/ary/idl/i_attribute.hxx
deleted file mode 100644
index 2dd964dc..00000000
--- a/autodoc/inc/ary/idl/i_attribute.hxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_ATTRIBUTE_HXX
-#define ARY_IDL_I_ATTRIBUTE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_attribute
-{
- struct attr;
-}
-
-
-
-
-/** @resp
- Represents an IDL property.
-*/
-class Attribute : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2014 };
-
- // LIFECYCLE
- Attribute(
- const String & i_sName,
- Ce_id i_nInterface,
- Ce_id i_nModule,
- Type_id i_nType,
- bool i_bReadonly,
- bool i_bBound );
- ~Attribute();
- // OPERATIONS
- void Add_GetException(
- Type_id i_nException );
- void Add_SetException(
- Type_id i_nException );
-
- // INQUIRY
- Type_id Type() const;
- bool IsReadonly() const;
- bool IsBound() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Local
- typedef std::vector< Type_id > ExceptionList;
- friend struct ifc_attribute::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Ce_id nNameRoom;
-
- Type_id nType;
- ExceptionList aGetExceptions;
- ExceptionList aSetExceptions;
- bool bReadonly;
- bool bBound;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Attribute::Add_GetException( Type_id i_nException )
- { aGetExceptions.push_back(i_nException); }
-
-inline void
-Attribute::Add_SetException( Type_id i_nException )
- { aSetExceptions.push_back(i_nException); }
-
-inline Type_id
-Attribute::Type() const
- { return nType; }
-
-inline bool
-Attribute::IsReadonly() const
- { return bReadonly; }
-
-inline bool
-Attribute::IsBound() const
- { return bBound; }
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_ce.hxx b/autodoc/inc/ary/idl/i_ce.hxx
deleted file mode 100644
index 51d0c02f..00000000
--- a/autodoc/inc/ary/idl/i_ce.hxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_CE_HXX
-#define ARY_IDL_I_CE_HXX
-
-// BASE CLASSES
-#include <ary/entity.hxx>
-// USED SERVICES
-#include <ary/doc/d_docu.hxx>
-#include <ary/idl/i_ce2s.hxx>
-#include <ary/idl/i_types4idl.hxx>
-
-
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** @resp Base class for all IDL code entities.
-
- A @->CodeEntity is a namespace, type, data or function, which occures in
- the parsed UNO IDL code and is described and/or commented within the
- Autodoc repository.
-
- This is a storage base class, where more special classes are
- derived from.
-*/
-class CodeEntity : public ary::Entity
-{
- public:
- // LIFECYCLE
- virtual ~CodeEntity();
-
- // OPERATION
-
- // INQUIRY
- Ce_id CeId() const { return Ce_id(Id()); }
- const String & LocalName() const;
- Ce_id NameRoom() const;
- Ce_id Owner() const;
- E_SightLevel SightLevel() const;
-
- const ary::doc::Documentation &
- Docu() const;
- const Ce_2s & Secondaries() const;
-
- static const CodeEntity &
- Null_();
- // ACCESS
- void Set_Docu(
- DYN ary::doc::Node &
- pass_data );
- Ce_2s & Secondaries();
-
- protected:
- CodeEntity();
- private:
- // Locals
- virtual const String & inq_LocalName() const = 0;
- virtual Ce_id inq_NameRoom() const = 0;
- virtual Ce_id inq_Owner() const = 0;
- virtual E_SightLevel inq_SightLevel() const = 0;
-
- // DATA
- ary::doc::Documentation
- aDocu;
- Dyn<Ce_2s> p2s;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const String &
-CodeEntity::LocalName() const
- { return inq_LocalName(); }
-
-inline Ce_id
-CodeEntity::NameRoom() const
- { return inq_NameRoom(); }
-
-inline Ce_id
-CodeEntity::Owner() const
- { return inq_Owner(); }
-
-inline E_SightLevel
-CodeEntity::SightLevel() const
- { return inq_SightLevel(); }
-
-inline const ary::doc::Documentation &
-CodeEntity::Docu() const
- { return aDocu; }
-
-inline void
-CodeEntity::Set_Docu(DYN ary::doc::Node & pass_data)
-{
- aDocu.Set_Data(pass_data);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_ce2s.hxx b/autodoc/inc/ary/idl/i_ce2s.hxx
deleted file mode 100644
index efb2711e..00000000
--- a/autodoc/inc/ary/idl/i_ce2s.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_CE2S_HXX
-#define ARY_IDL_I_CE2S_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_types4idl.hxx>
-
-
-namespace ary
-{
-
-namespace idl
-{
-
-
-
-/** Abstract base for all secondary productions of code entities
-*/
-class Ce_2s
-{
- public:
- // LIFECYCLE
- Ce_2s() {}
- virtual ~Ce_2s();
-
- static DYN Ce_2s * Create_(
- ClassId i_nCeClass );
- // OPERATIONS
- void Add_Link2DescriptionInManual(
- const String & i_link,
- const String & i_linkUI )
- { aDescriptionsInManual.push_back(i_link); aDescriptionsInManual.push_back(i_linkUI); }
- void Add_Link2RefInManual(
- const String & i_link,
- const String & i_linkUI )
- { aRefsInManual.push_back(i_link); aRefsInManual.push_back(i_linkUI); }
- std::vector<Ce_id> &
- Access_List(
- int i_indexOfList );
- // INQUIRY
- const StringVector &
- Links2DescriptionInManual() const
- { return aDescriptionsInManual; }
- const StringVector &
- Links2RefsInManual() const
- { return aRefsInManual; }
- int CountXrefLists() const { return aXrefLists.size(); }
- const std::vector<Ce_id> &
- List(
- int i_indexOfList ) const;
- private:
- typedef DYN std::vector<Ce_id> * ListPtr;
-
- // DATA
- StringVector aDescriptionsInManual;
- StringVector aRefsInManual;
- std::vector<ListPtr>
- aXrefLists;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_comrela.hxx b/autodoc/inc/ary/idl/i_comrela.hxx
deleted file mode 100644
index 47afcc17..00000000
--- a/autodoc/inc/ary/idl/i_comrela.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_COMRELA_HXX
-#define ARY_IDL_I_COMRELA_HXX
-
-// USED SERVICES
-#include <ary/idl/i_types4idl.hxx>
-
-namespace ary
-{
-namespace doc
-{
- class OldIdlDocu;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Contains data for an IDL code entity related to another one like a base of
- an interface or of a service or the supported interface of a service.
-*/
-class CommentedRelation
-{
- public:
- // LIFECYCLE
-
- CommentedRelation(
- Type_id i_nType,
- doc::OldIdlDocu * i_pInfo )
- : nType(i_nType),
- pInfo(i_pInfo)
- {}
- // INQUIRY
- Type_id Type() const { return nType; }
- doc::OldIdlDocu * Info() const { return pInfo; }
-
- private:
- // DATA
- Type_id nType;
- doc::OldIdlDocu * pInfo;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_constant.hxx b/autodoc/inc/ary/idl/i_constant.hxx
deleted file mode 100644
index 7622dbf5..00000000
--- a/autodoc/inc/ary/idl/i_constant.hxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_CONSTANT_HXX
-#define ARY_IDL_I_CONSTANT_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_constant
-{
- struct attr;
-}
-
-
-/** Represents an IDL constant.
-*/
-class Constant : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2012 };
-
- // LIFECYCLE
- Constant(
- const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- Type_id i_nType,
- const String & i_sInitValue );
- ~Constant();
- // INQUIRY
- Type_id Type() const;
- const String & Value() const;
-
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- friend struct ifc_constant::attr;
-
- // DATA
- String sName;
- Ce_id nNameRoom;
- Ce_id nOwner;
-
- Type_id nType;
- String sInitValue;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Type_id
-Constant::Type() const
-{
- return nType;
-}
-
-inline const String &
-Constant::Value() const
-{
- return sInitValue;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_constgroup.hxx b/autodoc/inc/ary/idl/i_constgroup.hxx
deleted file mode 100644
index 29c8c821..00000000
--- a/autodoc/inc/ary/idl/i_constgroup.hxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_CONSTGROUP_HXX
-#define ARY_IDL_I_CONSTGROUP_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_constgroup
-{
- struct attr;
-}
-
-
-/** Represents an IDL constants group.
-*/
-class ConstantsGroup : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2011 };
-
- // LIFECYCLE
- ConstantsGroup(
- const String & i_sName,
- Ce_id i_nModule );
- ~ConstantsGroup();
- // ACCESS
- void Add_Constant(
- Ce_id i_nConstant );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- typedef std::vector<Ce_id> ConstantList;
- friend struct ifc_constgroup::attr;
-
- // DATA
- String sName;
- Ce_id nModule;
-
- ConstantList aConstants;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-ConstantsGroup::Add_Constant( Ce_id i_nConstant )
-{
- aConstants.push_back(i_nConstant);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_enum.hxx b/autodoc/inc/ary/idl/i_enum.hxx
deleted file mode 100644
index ce2e5510..00000000
--- a/autodoc/inc/ary/idl/i_enum.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_ENUM_HXX
-#define ARY_IDL_I_ENUM_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_enum
-{
- struct attr;
-}
-
-
-/** Represents an IDL enum.
-*/
-class Enum : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2005 };
- // LIFECYCLE
- Enum(
- const String & i_sName,
- Ce_id i_nOwner );
- ~Enum();
- // ACCESS
- void Add_Value(
- Ce_id i_nValue );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- typedef std::vector<Ce_id> ValueList;
- friend struct ifc_enum::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
-
- ValueList aValues;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Enum::Add_Value( Ce_id i_nValue )
-{
- aValues.push_back(i_nValue);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_enumvalue.hxx b/autodoc/inc/ary/idl/i_enumvalue.hxx
deleted file mode 100644
index 5dbdedf4..00000000
--- a/autodoc/inc/ary/idl/i_enumvalue.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_ENUMVALUE_HXX
-#define ARY_IDL_I_ENUMVALUE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_enumvalue
-{
- struct attr;
-}
-
-
-/** @resp
- Represents an IDL enum value.
-*/
-class EnumValue : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2006 };
-
- // LIFECYCLE
- EnumValue(
- const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- const String & i_sInitValue );
- ~EnumValue();
- // INQUIRY
- const String & Value() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- friend struct ifc_enumvalue::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Ce_id nNameRoom;
-
- String sValue;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const String &
-EnumValue::Value() const
-{
- return sValue;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_exception.hxx b/autodoc/inc/ary/idl/i_exception.hxx
deleted file mode 100644
index 300d7add..00000000
--- a/autodoc/inc/ary/idl/i_exception.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_EXCEPTION_HXX
-#define ARY_IDL_I_EXCEPTION_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_exception
-{
- struct attr;
-}
-
-
-/** Represents an IDL exception.
-*/
-class Exception : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2010 };
-
- // LIFECYCLE
- Exception(
- const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBase );
- ~Exception();
- // INQUIRY
- Type_id Base() const { return nBase; }
-
- // ACCESS
- void Add_Member(
- Ce_id i_nMember );
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- typedef std::vector<Ce_id> ElementList;
- friend struct ifc_exception::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
-
- Type_id nBase;
- ElementList aElements;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Exception::Add_Member( Ce_id i_nMember )
-{
- aElements.push_back(i_nMember);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_function.hxx b/autodoc/inc/ary/idl/i_function.hxx
deleted file mode 100644
index ad5a7474..00000000
--- a/autodoc/inc/ary/idl/i_function.hxx
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_FUNCTION_HXX
-#define ARY_IDL_I_FUNCTION_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-// USED SERVICES
-#include <ary/idl/i_param.hxx>
-#include <ary/idl/ik_function.hxx>
-#include <ary/stdconstiter.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Represents an IDL function.
-
- Special case constructor:
- Constructors have return type "0".
-*/
-class Function : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2002 };
-
- typedef std::vector< Parameter > ParamList;
- typedef std::vector< Type_id > ExceptionList;
-
- // LIFECYCLE
- /// Normal function
- Function(
- const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- Type_id i_nReturnType,
- bool i_bOneWay );
- /// Constructor
- Function(
- const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom );
- ~Function();
-
- // OPERATIONS
- void Add_Parameter(
- const String & i_sName,
- Type_id i_nType,
- E_ParameterDirection
- i_eDirection );
- /// The function's parameter list ends with the ellipse "..." .
- void Set_Ellipse();
- void Add_Exception(
- Type_id i_nException );
-
- // INQUIRY
- Type_id ReturnType() const;
- const ParamList & Parameters() const { return aParameters; }
- const ExceptionList &
- Exceptions() const { return aExceptions; }
- bool IsOneway() const;
- bool HasEllipse() const { return bEllipse; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- friend struct ifc_function::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Ce_id nNameRoom;
-
- Type_id nReturnType;
- ParamList aParameters;
- ExceptionList aExceptions;
- bool bOneWay;
- bool bEllipse;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Function::Add_Parameter( const String & i_sName,
- Type_id i_nType,
- E_ParameterDirection i_eDirection )
-{
- aParameters.push_back( Parameter(i_sName,i_nType,i_eDirection) );
-}
-
-inline void
-Function::Set_Ellipse()
-{
- bEllipse = true;
-}
-
-inline void
-Function::Add_Exception( Type_id i_nException )
-{
- aExceptions.push_back(i_nException);
-}
-
-inline Type_id
-Function::ReturnType() const
- { return nReturnType; }
-
-inline bool
-Function::IsOneway() const
- { return bOneWay; }
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_gate.hxx b/autodoc/inc/ary/idl/i_gate.hxx
deleted file mode 100644
index 2166de1d..00000000
--- a/autodoc/inc/ary/idl/i_gate.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_GATE_HXX
-#define ARY_IDL_I_GATE_HXX
-
-// USED SERVICES
-
-namespace autodoc
-{
- class Options;
-}
-namespace ary
-{
-namespace idl
-{
- class CePilot;
- class TypePilot;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Main entry to access the IDL parts of the repository.
-*/
-class Gate
-{
- public:
- // LIFECYCLE
- virtual ~Gate() {}
-
- // OPERATIONS
- virtual void Calculate_AllSecondaryInformation(
- const String & i_devman_reffilepath ) = 0;
-// const ::autodoc::Options &
-// i_options ) = 0;
- // INQUIRY
- virtual const CePilot &
- Ces() const = 0;
- virtual const TypePilot &
- Types() const = 0;
- // ACCESS
- virtual CePilot & Ces() = 0;
- virtual TypePilot & Types() = 0;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_interface.hxx b/autodoc/inc/ary/idl/i_interface.hxx
deleted file mode 100644
index f6f9f064..00000000
--- a/autodoc/inc/ary/idl/i_interface.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_INTERFACE_HXX
-#define ARY_IDL_I_INTERFACE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-// USED SERVICES
-#include <ary/idl/i_comrela.hxx>
-#include <ary/stdconstiter.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_interface
-{
- struct attr;
-}
- class Interface_2s;
-
-
-/** Represents an IDL interface.
-*/
-class Interface : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2001 };
-
- // LIFECYCLE
- Interface(
- const String & i_sName,
- Ce_id i_nOwner );
- ~Interface();
- // INQUIRY
- bool HasBase() const;
-
- // ACCESS
- void Add_Function(
- Ce_id i_nId );
- void Add_Attribute(
- Ce_id i_nId );
- void Add_Base(
- Type_id i_nInterface,
- DYN doc::OldIdlDocu *
- pass_dpDocu );
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity:
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Local
- typedef std::vector< CommentedRelation > RelationList;
- typedef std::vector<Ce_id> MemberList;
- friend struct ifc_interface::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- RelationList aBases;
- MemberList aFunctions;
- MemberList aAttributes;
- Dyn<Interface_2s> p2s;
-};
-
-
-
-
-// IMPLEMENTATION
-inline bool
-Interface::HasBase() const
- { return aBases.size() > 0; }
-inline void
-Interface::Add_Function( Ce_id i_nId )
- { aFunctions.push_back(i_nId); }
-inline void
-Interface::Add_Attribute( Ce_id i_nId )
- { aAttributes.push_back(i_nId); }
-inline void
-Interface::Add_Base( Type_id i_nInterface,
- DYN doc::OldIdlDocu * pass_dpDocu )
- { aBases.push_back( CommentedRelation(i_nInterface, pass_dpDocu) ); }
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_module.hxx b/autodoc/inc/ary/idl/i_module.hxx
deleted file mode 100644
index 47a1d194..00000000
--- a/autodoc/inc/ary/idl/i_module.hxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_MODULE_HXX
-#define ARY_IDL_I_MODULE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-// USED SERVICES
-#include <ary/stdconstiter.hxx>
-
-
-
-
-namespace ary
-{
- template <class> class NameTreeNode;
-
-namespace idl
-{
-namespace ifc_module
-{
- struct attr;
-}
- class Gate;
-
-
-/** Represents an IDL module.
-
- "Name" in methods means all code entities which belong into
- this namespace (not in a subnamespace of this one), but not
- to the subnamespaces.
-
- "SubNamespace" in method names refers to all direct subnamespaces.
-*/
-class Module : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2000 };
-
- // LIFECYCLE
- Module();
- Module(
- const String & i_sName,
- const Module & i_rParent );
- ~Module();
- // OPERATIONS
- void Add_Name(
- const String & i_sName,
- Ce_id i_nId );
- // INQUIRY
- Ce_id Search_Name(
- const String & i_sName ) const;
- void Get_Names(
- Dyn_StdConstIterator<Ce_id> &
- o_rResult ) const;
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- friend struct ifc_module::attr;
-
- // DATA
- Dyn< NameTreeNode<Ce_id> >
- pImpl;
-};
-
-
-inline bool
-is_Module( const CodeEntity & i_rCe )
-{
- return i_rCe.AryClass() == Module::class_id;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_namelookup.hxx b/autodoc/inc/ary/idl/i_namelookup.hxx
deleted file mode 100644
index e52b2ba3..00000000
--- a/autodoc/inc/ary/idl/i_namelookup.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_NAMELOOKUP_HXX
-#define ARY_IDL_I_NAMELOOKUP_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_types4idl.hxx>
-
-// USED SERVICES
-#include <ary/stdconstiter.hxx>
-#include <ary/itrange.hxx>
-#include <vector>
-#include <map>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** This class finds all occurrences in the current language of a
- name in the repository.
-*/
-class NameLookup
-{
- public:
- struct NameProperties
- {
- NameProperties()
- : nId(0),
- nClass(0),
- nOwner(0) {}
- NameProperties(
- Ce_id i_id,
- ClassId i_class,
- Ce_id i_owner )
- : nId(i_id),
- nClass(i_class),
- nOwner(i_owner) {}
- Ce_id nId;
- ClassId nClass;
- Ce_id nOwner;
- };
-
- /// Map from Name to NameProperties.
- typedef std::multimap<String, NameProperties> Map_Names;
-
- // LIFECYCLE
- NameLookup();
- ~NameLookup();
- // OPERATIONS
- void Add_Name(
- const String & i_name,
- Ce_id i_id,
- ClassId i_class,
- Ce_id i_owner );
- private:
- // DATA
- Map_Names aNames;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_param.hxx b/autodoc/inc/ary/idl/i_param.hxx
deleted file mode 100644
index 3ce69a9c..00000000
--- a/autodoc/inc/ary/idl/i_param.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_PARAM_HXX
-#define ARY_IDL_I_PARAM_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_types4idl.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Represents a parameter in an IDL function.
-*/
-class Parameter
-{
- public:
- // LIFECYCLE
- Parameter(
- const String & i_sName,
- Type_id i_nType,
- E_ParameterDirection
- i_eDirection );
- ~Parameter();
-
- // INQUIRY
- const String & Name() const { return sName; }
- Type_id Type() const { return nType; }
- E_ParameterDirection
- Direction() const { return eDirection; }
-
- private:
- // DATA
- String sName;
- Type_id nType;
- E_ParameterDirection
- eDirection;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_property.hxx b/autodoc/inc/ary/idl/i_property.hxx
deleted file mode 100644
index 5767249a..00000000
--- a/autodoc/inc/ary/idl/i_property.hxx
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_PROPERTY_HXX
-#define ARY_IDL_I_PROPERTY_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_property
-{
- struct attr;
-}
-
-
-/** Represents an IDL property.
-*/
-class Property : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2004 };
-
- class Stereotypes
- {
- public:
- enum E_Flags
- {
- readonly = 1,
- bound = 2,
- constrained = 4,
- maybeambiguous = 8,
- maybedefault = 16,
- maybevoid = 32,
- removable = 64,
- transient = 128,
- s_MAX
- };
- Stereotypes() : nFlags(0) {}
-
- bool HasAny() const { return nFlags != 0; }
- bool IsReadOnly() const { return (nFlags & UINT32(readonly)) != 0; }
- bool IsBound() const { return (nFlags & UINT32(bound)) != 0; }
- bool IsConstrained() const
- { return (nFlags & UINT32(constrained)) != 0; }
- bool IsMayBeAmbiguous() const
- { return (nFlags & UINT32(maybeambiguous)) != 0; }
- bool IsMayBeDefault() const
- { return (nFlags & UINT32(maybedefault)) != 0; }
- bool IsMayBeVoid() const { return (nFlags & UINT32(maybevoid)) != 0; }
- bool IsRemovable() const { return (nFlags & UINT32(removable)) != 0; }
- bool IsTransient() const { return (nFlags & UINT32(transient)) != 0; }
-
- void Set_Flag(
- E_Flags i_flag )
- { nFlags |= UINT32(i_flag); }
- private:
- // DATA
- UINT32 nFlags;
- };
-
-
- // LIFECYCLE
- Property(
- const String & i_sName,
- Ce_id i_nService,
- Ce_id i_nModule,
- Type_id i_nType,
- Stereotypes i_stereotypes );
- ~Property();
- // INQUIRY
- Type_id Type() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- friend struct ifc_property::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Ce_id nNameRoom;
-
- Type_id nType;
- Stereotypes aStereotypes;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Type_id
-Property::Type() const
-{
- return nType;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_service.hxx b/autodoc/inc/ary/idl/i_service.hxx
deleted file mode 100644
index 0e1574e5..00000000
--- a/autodoc/inc/ary/idl/i_service.hxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_SERVICE_HXX
-#define ARY_IDL_I_SERVICE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-// USED SERVICES
-#include <ary/idl/i_comrela.hxx>
-#include <ary/stdconstiter.hxx>
-#include <ary/idl/ik_service.hxx>
-
-
-
-
-namespace ary
-{
-namespace info
-{
- class CodeInformation;
-}
-namespace idl
-{
-namespace ifc_service
-{
- struct attr;
-}
-
-
-/** Represents an IDL service.
-*/
-class Service : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2003 }; // See reposy.cxx
-
- // LIFECYCLE
- Service(
- const String & i_sName,
- Ce_id i_nOwner );
- ~Service();
-
- // INQUIRY
- void Get_SupportedInterfaces(
- Dyn_StdConstIterator<CommentedRelation> &
- o_rResult ) const;
- void Get_IncludedServices(
- Dyn_StdConstIterator<CommentedRelation> &
- o_rResult ) const;
-
- // ACCESS
- void Add_Property(
- Ce_id i_nProperty );
- void AddRef_IncludedService(
- Type_id i_nService,
- DYN doc::OldIdlDocu *
- pass_dpDocu );
- void AddRef_SupportedInterface(
- Type_id i_nInterface,
- DYN doc::OldIdlDocu *
- pass_dpDocu );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- typedef std::vector< CommentedRelation > RelationList;
- typedef std::vector<Ce_id> PropertyList;
- friend struct ifc_service::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
-
- RelationList aIncludedServices;
- RelationList aSupportedInterfaces;
- PropertyList aProperties;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Service::Add_Property( Ce_id i_nProperty )
- { aProperties.push_back(i_nProperty); }
-
-inline void
-Service::AddRef_IncludedService( Type_id i_nService,
- DYN doc::OldIdlDocu * pass_dpDocu )
- { aIncludedServices.push_back( CommentedRelation(i_nService, pass_dpDocu) ); }
-
-inline void
-Service::AddRef_SupportedInterface( Type_id i_nInterface,
- DYN doc::OldIdlDocu * pass_dpDocu )
- { aSupportedInterfaces.push_back( CommentedRelation(i_nInterface, pass_dpDocu) ); }
-
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_singleton.hxx b/autodoc/inc/ary/idl/i_singleton.hxx
deleted file mode 100644
index 617fb1e7..00000000
--- a/autodoc/inc/ary/idl/i_singleton.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_SINGLETON_HXX
-#define ARY_IDL_I_SINGLETON_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_singleton
-{
- struct attr;
-}
-
-
-/** Represents an IDL singleton.
-*/
-class Singleton : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2013 };
-
- // LIFECYCLE
- Singleton(
- const String & i_sName,
- Ce_id i_nOwner );
- ~Singleton();
- // INQUIRY
- Type_id AssociatedService() const
- { return nService; }
-
- // ACCESS
- void Set_Service(
- Type_id i_nService );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- friend struct ifc_singleton::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
-
- Type_id nService;
-};
-
-
-
-
-
-// IMPLEMENTATION
-inline void
-Singleton::Set_Service( Type_id i_nService )
-{
- nService = i_nService;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_siservice.hxx b/autodoc/inc/ary/idl/i_siservice.hxx
deleted file mode 100644
index 2729e87a..00000000
--- a/autodoc/inc/ary/idl/i_siservice.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_SISERVICE_HXX
-#define ARY_IDL_I_SISERVICE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_sglifcservice
-{
- struct attr;
-}
-
-
-/** Represents an IDL single interface service.
-*/
-class SglIfcService : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2015 }; // See reposy.cxx
-
- // LIFECYCLE
- SglIfcService(
- const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBaseInterface );
- ~SglIfcService();
- // ACCESS
- void Add_Constructor(
- Ce_id i_nId );
-
- // INFO
- Type_id BaseInterface() const { return nBaseInterface; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity:
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Local
- typedef std::vector<Ce_id> CtorList;
- friend struct ifc_sglifcservice::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Type_id nBaseInterface;
-
- CtorList aConstructors;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-SglIfcService::Add_Constructor( Ce_id i_nId )
-{
- aConstructors.push_back(i_nId);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_sisingleton.hxx b/autodoc/inc/ary/idl/i_sisingleton.hxx
deleted file mode 100644
index 5e1d7ced..00000000
--- a/autodoc/inc/ary/idl/i_sisingleton.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_SISINGLETON_HXX
-#define ARY_IDL_I_SISINGLETON_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_sglifcsingleton
-{
- struct attr;
-}
-
-
-/** Represents an IDL interface.
-*/
-class SglIfcSingleton : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2016 }; // See reposy.cxx
-
- // LIFECYCLE
- SglIfcSingleton(
- const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBaseInterface );
- ~SglIfcSingleton();
- // INQUIRY
- Type_id BaseInterface() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity:
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Local
- friend struct ifc_sglifcsingleton::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Type_id nBaseInterface;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Type_id
-SglIfcSingleton::BaseInterface() const
-{
- return nBaseInterface;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_struct.hxx b/autodoc/inc/ary/idl/i_struct.hxx
deleted file mode 100644
index d713a3c5..00000000
--- a/autodoc/inc/ary/idl/i_struct.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_STRUCT_HXX
-#define ARY_IDL_I_STRUCT_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_struct
-{
- struct attr;
-}
-
-
-/** Represents an IDL struct.
-*/
-class Struct : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2008 };
-
- // LIFECYCLE
- Struct(
- const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBase,
- const String & i_sTemplateParameter,
- Type_id i_nTemplateParameterType );
- ~Struct();
- // INQUIRY
- Type_id Base() const;
- String TemplateParameter() const;
- Type_id TemplateParameterType() const;
-
- // ACCESS
- void Add_Member(
- Ce_id i_nMember );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- // Locals
- typedef std::vector<Ce_id> ElementList;
- friend struct ifc_struct::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
-
- Type_id nBase;
- String sTemplateParameter;
- Type_id nTemplateParameterType;
- ElementList aElements;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Type_id
-Struct::Base() const
-{
- return nBase;
-}
-
-inline String
-Struct::TemplateParameter() const
-{
- return sTemplateParameter;
-}
-
-inline Type_id
-Struct::TemplateParameterType() const
-{
- return nTemplateParameterType;
-}
-
-inline void
-Struct::Add_Member( Ce_id i_nMember )
-{
- aElements.push_back(i_nMember);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_structelem.hxx b/autodoc/inc/ary/idl/i_structelem.hxx
deleted file mode 100644
index d992f6b7..00000000
--- a/autodoc/inc/ary/idl/i_structelem.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_STRUCTELEM_HXX
-#define ARY_IDL_I_STRUCTELEM_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_structelement
-{
- struct attr;
-}
-
-
-/** Represents an IDL struct element.
-*/
-class StructElement : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2009 };
-
- // LIFECYCLE
- StructElement(
- const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- Type_id i_nType );
- ~StructElement();
-
- // INQUIRY
- Type_id Type() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- friend struct ifc_structelement::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
- Ce_id nNameRoom;
-
- Type_id nType;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Type_id
-StructElement::Type() const
-{
- return nType;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_traits.hxx b/autodoc/inc/ary/idl/i_traits.hxx
deleted file mode 100644
index 285fe711..00000000
--- a/autodoc/inc/ary/idl/i_traits.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_TRAITS_HXX
-#define ARY_IDL_I_TRAITS_HXX
-
-// USED SERVICES
-#include <ary/idl/i_types4idl.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Basic traits for derivd ones of ->CodeEntity.
-*/
-struct Ce_Traits
-{
- typedef CodeEntity entity_base_type;
- typedef Ce_id id_type;
-
- static entity_base_type &
- EntityOf_(
- id_type i_id );
-};
-
-
-/** An instance of COMPARE for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct Ce_Compare : public Ce_Traits
-{
- typedef String key_type;
-
- static const key_type &
- KeyOf_(
- const entity_base_type &
- i_entity );
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_type.hxx b/autodoc/inc/ary/idl/i_type.hxx
deleted file mode 100644
index be2e6181..00000000
--- a/autodoc/inc/ary/idl/i_type.hxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_TYPE_HXX
-#define ARY_IDL_I_TYPE_HXX
-
-// USED SERVICES
-#include <ary/entity.hxx>
-#include <ary/idl/i_types4idl.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
- class Gate;
-
-
-/** Abstract base for all secondary productions of types
-*/
-class Type_2s
-{
- public:
- virtual ~Type_2s() {}
-
- static DYN Type_2s *
- Create_(
- ClassId i_nCeId );
-};
-
-
-/** Base of all IDL types.
-
- Type represents the occurrence of a type as base,
- parameter, return type or element type in UNO IDL code.
- Some of them relate to a ->CodeEntity, but
- the ->Type "MyInterface" is something different than
- the ->CodeEntity "MyInterface".
-
- This is a storage base class, where more special
- classes are derived from.
-*/
-class Type : public ary::Entity
-{
- public:
- typedef Type_2s secondary_productions;
-
- // LIFECYCLE
- virtual ~Type() {}
-
- // INQUIRY
- Type_id TypeId() const { return Type_id(Id()); }
-
- /** Does NOT clear the output-parameters.
-
- @attention
- If this is a sequence, the text of the first non-sequence, enclosed type
- is returned.
- */
- void Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequenceCount,
- const Gate & i_rGate ) const;
- const std::vector<Type_id> *
- TemplateParameters() const;
- const Type & FirstEnclosedNonSequenceType( /// @return *this, if this is not a ->Sequence.
- const Gate & i_rGate ) const;
-
- private:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequemceCount,
- const Gate & i_rGate ) const = 0;
- virtual const std::vector<Type_id> *
- inq_TemplateParameters() const;
- virtual const Type &
- inq_FirstEnclosedNonSequenceType(
- const Gate & i_rGate ) const;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Type::Get_Text( StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequenceCount,
- const Gate & i_rGate ) const
-{
- inq_Get_Text(o_module,o_name,o_nRelatedCe,o_nSequenceCount,i_rGate);
-}
-
-inline const std::vector<Type_id> *
-Type::TemplateParameters() const
-{
- return inq_TemplateParameters();
-}
-
-inline const Type &
-Type::FirstEnclosedNonSequenceType(const Gate & i_rGate) const
-{
- return inq_FirstEnclosedNonSequenceType(i_rGate);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_typedef.hxx b/autodoc/inc/ary/idl/i_typedef.hxx
deleted file mode 100644
index 1ebf900e..00000000
--- a/autodoc/inc/ary/idl/i_typedef.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_TYPEDEF_HXX
-#define ARY_IDL_I_TYPEDEF_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-namespace ifc_typedef
-{
- struct attr;
-}
-
-
-/** Represents an IDL typedef.
-*/
-class Typedef : public CodeEntity
-{
- public:
- enum E_ClassId { class_id = 2007 };
-
- // LIFECYCLE
- Typedef(
- const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nDefiningType );
- ~Typedef();
-
- Type_id DefiningType() const { return nDefiningType; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface CodeEntity
- virtual const String & inq_LocalName() const;
- virtual Ce_id inq_NameRoom() const;
- virtual Ce_id inq_Owner() const;
- virtual E_SightLevel inq_SightLevel() const;
-
- friend struct ifc_typedef::attr;
-
- // DATA
- String sName;
- Ce_id nOwner;
-
- Type_id nDefiningType;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/i_types4idl.hxx b/autodoc/inc/ary/idl/i_types4idl.hxx
deleted file mode 100644
index b77b3154..00000000
--- a/autodoc/inc/ary/idl/i_types4idl.hxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_TYPES4IDL_HXX
-#define ARY_IDL_I_TYPES4IDL_HXX
-
-// USED SERVICES
-#include <ary/types.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
- class Module;
- class CodeEntity;
- class Type;
- class Gate;
- class CePilot;
- class TypePilot;
-
-
-typedef TypedId<CodeEntity> Ce_id;
-typedef TypedId<Type> Type_id;
-
-
-/** This is used when an ->ary::idl::ExplicitType
- represents a templated struct and is sorted into the
- dictionary of an ->ary::idl::XNameRoom.
- Then local type name and template type id are concatenated
- to one string with this char as delimiter.
-*/
-const char C_cTemplateDelimiter = '<';
-
-typedef std::vector<Ce_id> Ce_idList;
-
-
-enum E_ParameterDirection
-{
- param_in,
- param_out,
- param_inout
-};
-
-
-enum E_SightLevel
-{
- sl_Module, // not file bound entities, like modules
- sl_File, // entities on top level within one file, like interface or enum
- sl_Member // member entities, like enumvalue or function
-};
-
-inline Ce_id
-Ce_id_Null()
-{
- return Ce_id(0);
-}
-
-inline void
-NullPush_IdList(Ce_idList * o_pList)
-{
- if (o_pList)
- o_pList->push_back( Ce_id_Null() );
-}
-
-inline void
-NullPush_IdList_2(Ce_idList * o_pList)
-{
- if (o_pList)
- {
- o_pList->push_back( Ce_id_Null() );
- o_pList->push_back( Ce_id_Null() );
- }
-}
-
-namespace alphabetical_index
-{
- enum E_Letter
- {
- a = int('a'),
- b,
- c,
- d,
- e,
- f,
- g,
- h,
- i,
- j,
- k,
- l,
- m,
- n,
- o,
- p,
- q,
- r,
- s,
- t,
- u,
- v,
- w,
- x,
- y,
- z,
- non_alpha = int('_'),
- MAX
- };
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_attribute.hxx b/autodoc/inc/ary/idl/ik_attribute.hxx
deleted file mode 100644
index 491217a0..00000000
--- a/autodoc/inc/ary/idl/ik_attribute.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_ATTRIBUTE_HXX
-#define ARY_IDL_IK_ATTRIBUTE_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_attribute
-{
-
-using ifc_ce::DocText;
-using ::ary::idl::ifc_ce::Dyn_TypeIterator;
-
-
-struct attr: public ifc_ce::attr
-{
- static bool HasAnyStereotype(
- const CodeEntity & i_ce );
- static bool IsReadOnly(
- const CodeEntity & i_ce );
- static bool IsBound(
- const CodeEntity & i_ce );
- static Type_id Type(
- const CodeEntity & i_ce );
- static void Get_GetExceptions(
- Dyn_TypeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_SetExceptions(
- Dyn_TypeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_attribute
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_ce.hxx b/autodoc/inc/ary/idl/ik_ce.hxx
deleted file mode 100644
index b89be43a..00000000
--- a/autodoc/inc/ary/idl/ik_ce.hxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_CE_HXX
-#define ARY_IDL_IK_CE_HXX
-// KORR_DEPRECATED_3.0
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_types4idl.hxx>
-#include <ary/stdconstiter.hxx>
-
-namespace ary
-{
-namespace info
-{
- class Text;
-}
-namespace idl
-{
-
-
-namespace ifc_ce
-{
-
-
-typedef ::ary::Dyn_StdConstIterator<Ce_id> Dyn_CeIterator;
-typedef ::ary::Dyn_StdConstIterator<Type_id> Dyn_TypeIterator;
-typedef ::ary::info::Text DocText;
-
-
-
-struct attr
-{
- static Ce_id CeId(
- const CodeEntity & i_ce );
- static const String &
- LocalName(
- const CodeEntity & i_ce );
- static Ce_id NameRoom(
- const CodeEntity & i_ce );
- static Rid Owner(
- const CodeEntity & i_ce );
- static E_SightLevel SightLevel(
- const CodeEntity & i_ce );
- static bool Search_Member(
- const CodeEntity & ,
- const String & )
- { return true; } // KORR_FUTURE
-};
-
-struct xref
-{
-};
-
-struct doc
-{
- static const DocText &
- ShortInfo( /// @return a short description of the CodeEntity
- const CodeEntity & i_ce );
-
- static const DocText &
- TagAuthor(
- const CodeEntity & i_ce );
- static const DocText &
- TagExample(
- const CodeEntity & i_ce );
- static const DocText &
- TagDescr(
- const CodeEntity & i_ce );
- static const DocText &
- TagGuarantees(
- const CodeEntity & i_ce );
- static const DocText &
- TagKey(
- const CodeEntity & i_ce );
- static const DocText &
- TagMissing(
- const CodeEntity & i_ce );
- static const DocText &
- TagSee(
- const CodeEntity & i_ce );
- static const DocText &
- TagShort(
- const CodeEntity & i_ce );
- static const DocText &
- TagVersion(
- const CodeEntity & i_ce );
-
- void Get_UnkownTags(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-
- bool IsDeprecated(
- const CodeEntity & i_ce );
- bool IsIncomplete(
- const CodeEntity & i_ce );
- bool IsInternal(
- const CodeEntity & i_ce );
- bool IsNodoc(
- const CodeEntity & i_ce );
- bool IsOptional(
- const CodeEntity & i_ce );
- bool IsSuspicious(
- const CodeEntity & i_ce );
-
-};
-
-
-} // namespace ifc_ce
-
-
-} // namspace idl
-} // namspace ary
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_constant.hxx b/autodoc/inc/ary/idl/ik_constant.hxx
deleted file mode 100644
index c2c101ad..00000000
--- a/autodoc/inc/ary/idl/ik_constant.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_CONSTANT_HXX
-#define ARY_IDL_IK_CONSTANT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_constant
-{
-
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id Type(
- const CodeEntity & i_ce );
- static const String &
- Value(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_constant
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_constgroup.hxx b/autodoc/inc/ary/idl/ik_constgroup.hxx
deleted file mode 100644
index e8b793da..00000000
--- a/autodoc/inc/ary/idl/ik_constgroup.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_CONSTGROUP_HXX
-#define ARY_IDL_IK_CONSTGROUP_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_constgroup
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static void Get_Constants(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_constgroup
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_enum.hxx b/autodoc/inc/ary/idl/ik_enum.hxx
deleted file mode 100644
index 9396d2a4..00000000
--- a/autodoc/inc/ary/idl/ik_enum.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_ENUM_HXX
-#define ARY_IDL_IK_ENUM_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_enum
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static void Get_Values(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
- static void Get_SynonymTypedefs(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsReturns(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsParameters(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsDataTypes(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_enum
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_enumvalue.hxx b/autodoc/inc/ary/idl/ik_enumvalue.hxx
deleted file mode 100644
index a40f4f62..00000000
--- a/autodoc/inc/ary/idl/ik_enumvalue.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_ENUMVALUE_HXX
-#define ARY_IDL_IK_ENUMVALUE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_enumvalue
-{
-
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static const String &
- Value(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_enumvalue
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_exception.hxx b/autodoc/inc/ary/idl/ik_exception.hxx
deleted file mode 100644
index b4402f4d..00000000
--- a/autodoc/inc/ary/idl/ik_exception.hxx
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_EXCEPTION_HXX
-#define ARY_IDL_IK_EXCEPTION_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_exception
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id Base(
- const CodeEntity & i_ce );
- static void Get_Elements(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
- static void Get_Derivations(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_RaisingFunctions(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_exception
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_function.hxx b/autodoc/inc/ary/idl/ik_function.hxx
deleted file mode 100644
index 00ab8bd7..00000000
--- a/autodoc/inc/ary/idl/ik_function.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_SERVICE_HXX
-#define ARY_IDL_IK_SERVICE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/i_param.hxx>
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-
-namespace ifc_function
-{
-
-using ::ary::idl::ifc_ce::Dyn_CeIterator;
-using ::ary::idl::ifc_ce::Dyn_TypeIterator;
-using ::ary::idl::ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id ReturnType(
- const CodeEntity & i_ce );
- static bool IsOneway(
- const CodeEntity & i_ce );
- static bool HasEllipse(
- const CodeEntity & i_ce );
- static void Get_Parameters(
- Dyn_StdConstIterator<ary::idl::Parameter> &
- o_result,
- const CodeEntity & i_ce );
- static void Get_Exceptions(
- Dyn_TypeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-// aStateMachine.AddToken( "@param", nTok_at_param, A_nAtTagDefStatus, finAtTag );
-// aStateMachine.AddToken( "@throws", nTok_at_throws, A_nAtTagDefStatus, finAtTag );
-// aStateMachine.AddToken( "@exception",
-// aStateMachine.AddToken( "@return", nTok_at_return, A_nAtTagDefStatus, finAtTag );
-// aStateMachine.AddToken( "@returns", nTok_at_return, A_nAtTagDefStatus, finAtTag );
-};
-
-
-} // namespace ifc_function
-
-
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_interface.hxx b/autodoc/inc/ary/idl/ik_interface.hxx
deleted file mode 100644
index d1bbab97..00000000
--- a/autodoc/inc/ary/idl/ik_interface.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_INTERFACE_HXX
-#define ARY_IDL_IK_INTERFACE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-class CommentedRelation;
-
-namespace ifc_interface
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static void Get_Bases(
- Dyn_StdConstIterator<CommentedRelation> &
- o_result,
- const CodeEntity & i_ce );
- static void Get_Functions(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Attributes(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
- static void Get_Derivations(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_SynonymTypedefs( /// like: typedef i_ce.LocalName() newName;
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_ExportingServices(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_ExportingSingletons(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsReturns(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsParameters(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsDataTypes(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_interface
-
-} // namespace idl
-} // namespace ary
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_module.hxx b/autodoc/inc/ary/idl/ik_module.hxx
deleted file mode 100644
index 172a4e7c..00000000
--- a/autodoc/inc/ary/idl/ik_module.hxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_MODULE_HXX
-#define ARY_IDL_IK_MODULE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-class CePilot;
-
-namespace ifc_module
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr : public ifc_ce::attr
-{
- // KORR_FUTURE
- // This has to be changed that way, that the differencing takes place
- // within hfi_module.cxx and not here.
- // So the class CePilot is not needed here, etc.
- // Too much scope pollution.
- static void Get_AllChildrenSeparated(
- std::vector< const CodeEntity* > & o_nestedModules,
- std::vector< const CodeEntity* > & o_services,
- std::vector< const CodeEntity* > & o_interfaces,
- std::vector< const CodeEntity* > & o_structs,
- std::vector< const CodeEntity* > & o_exceptions,
- std::vector< const CodeEntity* > & o_enums,
- std::vector< const CodeEntity* > & o_typedefs,
- std::vector< const CodeEntity* > & o_constantGroups,
- std::vector< const CodeEntity* > & o_singletons,
- const CePilot & i_pilot,
- const CodeEntity & i_ce );
-
- static void Get_SubModules(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Services(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Interfaces(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Structs(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Exceptions(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Enums(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_Typedefs(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_ConstantsGroups(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_module
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_property.hxx b/autodoc/inc/ary/idl/ik_property.hxx
deleted file mode 100644
index d8e7a5a8..00000000
--- a/autodoc/inc/ary/idl/ik_property.hxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_PROPERTY_HXX
-#define ARY_IDL_IK_PROPERTY_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_property
-{
-
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static bool HasAnyStereotype(
- const CodeEntity & i_ce );
- static bool IsReadOnly(
- const CodeEntity & i_ce );
- static bool IsBound(
- const CodeEntity & i_ce );
- static bool IsConstrained(
- const CodeEntity & i_ce );
- static bool IsMayBeAmbiguous(
- const CodeEntity & i_ce );
- static bool IsMayBeDefault(
- const CodeEntity & i_ce );
- static bool IsMayBeVoid(
- const CodeEntity & i_ce );
- static bool IsRemovable(
- const CodeEntity & i_ce );
- static bool IsTransient(
- const CodeEntity & i_ce );
- static Type_id Type(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_property
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_service.hxx b/autodoc/inc/ary/idl/ik_service.hxx
deleted file mode 100644
index f5e5264a..00000000
--- a/autodoc/inc/ary/idl/ik_service.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_SERVICE_HXX
-#define ARY_IDL_IK_SERVICE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_service
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static void Get_IncludedServices(
- Dyn_StdConstIterator<CommentedRelation> &
- o_result,
- const CodeEntity & i_ce );
- static void Get_ExportedInterfaces(
- Dyn_StdConstIterator<CommentedRelation> &
- o_result,
- const CodeEntity & i_ce );
- static void Get_Properties(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
- static void Get_IncludingServices(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_InstantiatingSingletons(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_service
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_singleton.hxx b/autodoc/inc/ary/idl/ik_singleton.hxx
deleted file mode 100644
index a0c52008..00000000
--- a/autodoc/inc/ary/idl/ik_singleton.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_SINGLETON_HXX
-#define ARY_IDL_IK_SINGLETON_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_singleton
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id AssociatedService(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_singleton
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_siservice.hxx b/autodoc/inc/ary/idl/ik_siservice.hxx
deleted file mode 100644
index 01412044..00000000
--- a/autodoc/inc/ary/idl/ik_siservice.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_SISERVICE_HXX
-#define ARY_IDL_IK_SISERVICE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_sglifcservice
-{
-
-using ifc_ce::Dyn_CeIterator;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id BaseInterface(
- const CodeEntity & i_ce );
- static void Get_Constructors(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_sglifcservice
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_sisingleton.hxx b/autodoc/inc/ary/idl/ik_sisingleton.hxx
deleted file mode 100644
index dbde2eea..00000000
--- a/autodoc/inc/ary/idl/ik_sisingleton.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_SISINGLETON_HXX
-#define ARY_IDL_IK_SISINGLETON_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_sglifcsingleton
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id BaseInterface(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_sglifcsingleton
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_struct.hxx b/autodoc/inc/ary/idl/ik_struct.hxx
deleted file mode 100644
index 2e42d1f7..00000000
--- a/autodoc/inc/ary/idl/ik_struct.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_STRUCT_HXX
-#define ARY_IDL_IK_STRUCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_struct
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id Base(
- const CodeEntity & i_ce );
- static void Get_Elements(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
- static void Get_Derivations(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_SynonymTypedefs(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsReturns(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsParameters(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsDataTypes(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_struct
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_structelem.hxx b/autodoc/inc/ary/idl/ik_structelem.hxx
deleted file mode 100644
index 631d5c6e..00000000
--- a/autodoc/inc/ary/idl/ik_structelem.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_STRUCTELEM_HXX
-#define ARY_IDL_IK_STRUCTELEM_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_structelement
-{
-
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id Type(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-
-} // namespace ifc_structelement
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ik_typedef.hxx b/autodoc/inc/ary/idl/ik_typedef.hxx
deleted file mode 100644
index ddccd46d..00000000
--- a/autodoc/inc/ary/idl/ik_typedef.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IK_TYPEDEF_HXX
-#define ARY_IDL_IK_TYPEDEF_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ik_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-namespace idl
-{
-
-namespace ifc_typedef
-{
-
-using ifc_ce::Dyn_CeIterator;
-using ifc_ce::DocText;
-
-
-struct attr: public ifc_ce::attr
-{
- static Type_id DefiningType(
- const CodeEntity & i_ce );
-};
-
-struct xref : public ifc_ce::xref
-{
- static void Get_SynonymTypedefs(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsReturns(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsParameters(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
- static void Get_AsDataTypes(
- Dyn_CeIterator & o_result,
- const CodeEntity & i_ce );
-};
-
-struct doc : public ifc_ce::doc
-{
-};
-
-} // namespace ifc_typedef
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ip_ce.hxx b/autodoc/inc/ary/idl/ip_ce.hxx
deleted file mode 100644
index 20698ec4..00000000
--- a/autodoc/inc/ary/idl/ip_ce.hxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IP_CE_HXX
-#define ARY_IDL_IP_CE_HXX
-
-// USED SERVICES
-#include <ary/idl/i_types4idl.hxx>
-#include <ary/idl/i_property.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
- class Module;
-
- class ConstantsGroup;
- class Enum;
- class Exception;
- class Interface;
- class Service;
- class SglIfcService;
- class Singleton;
- class SglIfcSingleton;
- class Struct;
- class Typedef;
-
- class Attribute;
- class Constant;
- class EnumValue;
- class Function;
- class Property;
- class StructElement;
- class Variable;
-
- class NameLookup;
-
-
-/** Provides the access logic for all code entities.
-*/
-class CePilot
-{
- public:
- // LIFECYCLE
- virtual ~CePilot() {}
-
- // OPERATIONS
- virtual Module & CheckIn_Module(
- Ce_id i_nParentId,
- const String & i_sName ) = 0;
- virtual Service & Store_Service(
- Ce_id i_nOwner,
- const String & i_sName ) = 0;
- virtual SglIfcService &
- Store_SglIfcService(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBaseInterface ) = 0;
- virtual Interface & Store_Interface(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase ) = 0;
- virtual Struct & Store_Struct(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase,
- const String & i_sTemplateParam = String::Null_() ) = 0;
- virtual Exception & Store_Exception(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase ) = 0;
- virtual Enum & Store_Enum(
- Ce_id i_nOwner,
- const String & i_sName ) = 0;
- virtual Typedef & Store_Typedef(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nDefiningType ) = 0;
- virtual ConstantsGroup &
- Store_ConstantsGroup(
- Ce_id i_nOwner,
- const String & i_sName ) = 0;
- virtual Singleton & Store_Singleton(
- Ce_id i_nOwner,
- const String & i_sName ) = 0;
- virtual SglIfcSingleton &
- Store_SglIfcSingleton(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBaseInterface ) = 0;
-
- virtual Constant & Store_Constant(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- const String & i_sValue ) = 0;
- virtual Property & Store_Property(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- Property::Stereotypes
- i_stereotypes ) = 0;
- virtual Function & Store_Function(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nReturnType,
- bool i_bOneWay ) = 0;
- virtual Function & Store_ServiceConstructor(
- Ce_id i_nOwner,
- const String & i_sName ) = 0;
- virtual StructElement &
- Store_StructMember(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType ) = 0;
- virtual StructElement &
- Store_ExceptionMember(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType ) = 0;
- virtual EnumValue & Store_EnumValue(
- Ce_id i_nOwner,
- const String & i_sName,
- const String & i_sValue ) = 0;
- virtual Attribute & Store_Attribute(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- bool i_bReadOnly,
- bool i_bBound ) = 0;
- // INQUIRY
- virtual const Module &
- GlobalNamespace() const = 0;
- virtual const CodeEntity &
- Find_Ce(
- Ce_id i_nId ) const = 0;
-
- virtual const Module &
- Find_Module(
- Ce_id i_nId ) const = 0;
- virtual const Module *
- Search_Module(
- Ce_id i_nId ) const = 0;
- virtual const Function &
- Find_Function(
- Ce_id i_nId ) const = 0;
- virtual const Property &
- Find_Property(
- Ce_id i_nId ) const = 0;
- virtual const EnumValue &
- Find_EnumValue(
- Ce_id i_nId ) const = 0;
- virtual const Constant &
- Find_Constant(
- Ce_id i_nId ) const = 0;
- virtual const StructElement &
- Find_StructElement(
- Ce_id i_nId ) const = 0;
- virtual void Get_Text(
- StringVector & o_module,
- String & o_ce,
- String & o_member,
- const CodeEntity & i_ce ) const = 0;
- virtual const NameLookup &
- NameDictionary() const = 0;
- virtual void Get_AlphabeticalIndex(
- std::vector<Ce_id> &
- o_rResult,
- alphabetical_index::E_Letter
- i_cLetter) const = 0;
- // ACCESS
- virtual Module & GlobalNamespace() = 0;
- virtual CodeEntity &
- Find_Ce(
- Ce_id i_nId ) = 0;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/idl/ip_type.hxx b/autodoc/inc/ary/idl/ip_type.hxx
deleted file mode 100644
index b3839b3a..00000000
--- a/autodoc/inc/ary/idl/ip_type.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IP_TYPE_HXX
-#define ARY_IDL_IP_TYPE_HXX
-
-// USED SERVICES
-#include <ary/idl/i_types4idl.hxx>
-
-
-
-
-namespace ary
-{
- class QualifiedName;
-
-namespace idl
-{
- class Type;
- class ExplicitNameRoom;
-
-
-/** Access point to all {->Type}s in IDL.
-*/
-class TypePilot
-{
- public:
- // LIFECYCLE
- virtual ~TypePilot() {}
-
- // OPERATIONS
- virtual const Type &
- CheckIn_Type(
- QualifiedName & i_rFullName,
- uintt i_nSequenceCount,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> *
- i_templateParameters ) = 0;
- // INQUIRY
- virtual const Type &
- Find_Type(
- Type_id i_nType ) const = 0;
- virtual String Search_LocalNameOf(
- Type_id i_nType ) const = 0;
- virtual Ce_id Search_CeRelatedTo(
- Type_id i_nType ) const = 0;
- virtual const ExplicitNameRoom &
- Find_XNameRoom(
- Type_id i_nType ) const = 0;
- virtual bool IsBuiltInOrRelated(
- const Type & i_rType ) const = 0;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/all_dts.hxx b/autodoc/inc/ary/info/all_dts.hxx
deleted file mode 100644
index b92e4951..00000000
--- a/autodoc/inc/ary/info/all_dts.hxx
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_ALL_DTS_HXX
-#define ARY_INFO_ALL_DTS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace info
-{
-
-class DocuDisplay;
-
-class DocuToken
-{
- public:
- virtual ~DocuToken() {}
-
- void StoreAt(
- DocuDisplay & o_rDisplay ) const;
- bool IsWhite() const;
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const = 0;
- virtual bool inq_IsWhite() const = 0;
-};
-
-class DT_Text : public DocuToken
-{
- public:
- DT_Text(
- const char * i_sText )
- : sText( i_sText ) {}
-
- const String & Text() const { return sText; }
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual bool inq_IsWhite() const;
-
- String sText;
-};
-
-class DT_MaybeLink : public DocuToken
-{
- public:
- DT_MaybeLink(
- const char * i_sText,
- bool i_bIsGlobal,
- bool i_bIsFunction )
- : sText( i_sText ),
- bIsGlobal(i_bIsGlobal),
- bIsFunction(i_bIsFunction) { }
-
- const String & Text() const { return sText; }
- bool IsAbsolute() const { return bIsGlobal; }
- bool IsFunction() const { return bIsFunction; }
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual bool inq_IsWhite() const;
-
- String sText;
- bool bIsGlobal;
- bool bIsFunction;
-};
-
-class DT_Whitespace : public DocuToken
-{
- public:
- DT_Whitespace(
- UINT8 i_nLength )
- : nLength( i_nLength ) {}
- UINT8 Length() const { return nLength; }
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual bool inq_IsWhite() const;
-
- UINT8 nLength;
-};
-
-
-class DT_Eol : public DocuToken
-{
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual bool inq_IsWhite() const;
-};
-
-class DT_Xml : public DocuToken
-{
- public:
- DT_Xml(
- const char * i_sText )
- : sText( i_sText ) {}
-
- const String & Text() const { return sText; }
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual bool inq_IsWhite() const;
-
- String sText;
-};
-
-
-// IMPLEMENTATION
-
-inline void
-DocuToken::StoreAt( DocuDisplay & o_rDisplay ) const
- { do_StoreAt(o_rDisplay); }
-inline bool
-DocuToken::IsWhite() const
- { return inq_IsWhite(); }
-
-
-
-}
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/all_tags.hxx b/autodoc/inc/ary/info/all_tags.hxx
deleted file mode 100644
index 5dfd69d9..00000000
--- a/autodoc/inc/ary/info/all_tags.hxx
+++ /dev/null
@@ -1,291 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_ALL_TAGS_HXX
-#define ARY_INFO_ALL_TAGS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/info/ci_attag.hxx>
- // COMPONENTS
-#include <ary/info/inftypes.hxx>
-#include <ary/info/ci_text.hxx>
-#include <ary/qualiname.hxx>
- // PARAMETERS
-
-
-
-namespace ary
-{
-namespace info
-{
-
-
-class StdTag : public AtTag
-{
- public:
- StdTag(
- E_AtTagId i_eId );
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- void ChangeId2(
- E_AtTagId i_eId )
- { eId = i_eId; }
-
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- E_AtTagId Std_Id() const { return eId; }
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual DocuText * Text();
-
- E_AtTagId eId;
- DocuText aText;
- StdTag * pNext;
-};
-
-class BaseTag : public AtTag
-{
- public:
- BaseTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- private:
- virtual DocuText * Text();
-
- QualifiedName sBase;
- DocuText aText;
- AtTag * pNext;
-};
-
-class ExceptionTag : public AtTag
-{
- public:
- ExceptionTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- private:
- virtual DocuText * Text();
-
- QualifiedName sException;
- DocuText aText;
- AtTag * pNext;
-};
-
-class ImplementsTag : public AtTag
-{
- public:
- ImplementsTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- private:
- virtual DocuText * Text();
-
- QualifiedName sName;
- AtTag * pNext;
-};
-
-class KeywordTag : public AtTag
-{
- public:
- KeywordTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- private:
- virtual DocuText * Text();
-
- StringVector sKeys;
-};
-
-class ParameterTag : public AtTag
-{
- public:
- ParameterTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
-
- const String & ParamName() const { return sName; }
- const DocuText & CText() const { return aText; }
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual const ParameterTag *
- GetNext() const { return dynamic_cast< ParameterTag* >(pNext); }
- virtual AtTag * GetFollower();
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual DocuText * Text();
-
- String sName;
- String sValidRange;
- DocuText aText;
- AtTag * pNext;
-};
-
-class SeeTag : public AtTag
-{
- public:
- SeeTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- const std::vector< QualifiedName > &
- References() const { return sReferences; }
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual DocuText * Text();
-
- std::vector< QualifiedName >
- sReferences;
-};
-
-class TemplateTag : public AtTag
-{
- public:
- TemplateTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- const DocuText & CText() const { return aText; }
- virtual const char *
- Title() const;
- const String & TplParamName() const { return sName; }
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual const TemplateTag *
- GetNext() const { return dynamic_cast< TemplateTag* >(pNext); }
- virtual AtTag * GetFollower();
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual DocuText * Text();
-
- String sName;
- DocuText aText;
- AtTag * pNext;
-};
-
-class LabelTag : public AtTag
-{
- public:
- LabelTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- private:
- virtual DocuText * Text();
-
- String sLabel;
-};
-
-class SinceTag : public AtTag
-{
- public:
- SinceTag();
-
- virtual bool Add_SpecialMeaningToken(
- const char * i_sText,
- intt i_nNr );
- virtual const char *
- Title() const;
- virtual UINT8 NrOfSpecialMeaningTokens() const;
- virtual AtTag * GetFollower();
-
- const String & Version() const { return sVersion; }
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const;
- virtual DocuText * Text();
-
- // Data
- String sVersion;
-};
-
-
-
-// IMPLEMENTATION
-
-
-}
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/ci_attag.hxx b/autodoc/inc/ary/info/ci_attag.hxx
deleted file mode 100644
index 39d037c2..00000000
--- a/autodoc/inc/ary/info/ci_attag.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_CI_ATTAG_HXX
-#define ARY_INFO_CI_ATTAG_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-
-namespace ary
-{
-namespace info
-{
-
-class DocuText;
-class DocuDisplay;
-
-class AtTag
-{
- public:
- virtual ~AtTag() {}
-
- void Set_HtmlUseInDocuText(
- bool i_bUseIt );
- virtual bool Add_SpecialMeaningToken( /// @return false, if token was not spüecial.
- const char * i_sText,
- intt i_nNr ) = 0;
- virtual void Add_Token(
- const char * i_sText );
- virtual void Add_PotentialLink(
- const char * i_sText,
- bool i_bIsGlobal,
- bool i_bIsFunction );
- virtual void Add_Whitespace(
- UINT8 i_nLength );
- virtual void Add_Eol();
-
- virtual UINT8 NrOfSpecialMeaningTokens() const = 0;
- virtual AtTag * GetFollower() = 0;
-
- void StoreAt(
- DocuDisplay & o_rDisplay ) const;
- const DocuText & CText() const;
-
- private:
- virtual void do_StoreAt(
- DocuDisplay & o_rDisplay ) const; // later becoming abstract
-
- virtual DocuText * Text() = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-inline void
-AtTag::StoreAt( DocuDisplay & o_rDisplay ) const
- { do_StoreAt(o_rDisplay); }
-inline const DocuText &
-AtTag::CText() const
- { DocuText * ret = const_cast< AtTag* >(this)->Text();
- csv_assert( ret != 0 );
- return *ret;
- }
-
-
-}
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/ci_text.hxx b/autodoc/inc/ary/info/ci_text.hxx
deleted file mode 100644
index 8aae466e..00000000
--- a/autodoc/inc/ary/info/ci_text.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_CI_TEXT_HXX
-#define ARY_INFO_CI_TEXT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace info
-{
-
-class DocuToken;
-class DocuDisplay;
-
-
-class DocuText
-{
- public:
- typedef std::vector< DocuToken * > TokenList;
-
- DocuText();
- ~DocuText();
-
- void Set_HtmlUse(
- bool i_bUseIt )
- { bUsesHtml = i_bUseIt; }
- void Add_Token(
- DYN DocuToken & let_drToken )
- { aTokens.push_back(&let_drToken); }
- const TokenList & Tokens() const { return aTokens; }
- void StoreAt(
- DocuDisplay & o_rDisplay ) const;
- bool IsNoHtml() const { return NOT bUsesHtml; }
- bool IsEmpty() const { return aTokens.size() == 0; }
-
- private:
- TokenList aTokens;
- bool bUsesHtml;
-};
-
-
-
-
-
-
-// IMPLEMENTATION
-
-
-}
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/docstore.hxx b/autodoc/inc/ary/info/docstore.hxx
deleted file mode 100644
index 92c4c85c..00000000
--- a/autodoc/inc/ary/info/docstore.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_DOCSTORE_HXX
-#define ARY_INFO_DOCSTORE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/info/inftypes.hxx>
-
-namespace ary
-{
-namespace doc
-{
- class Node;
-}
-
-
-
-namespace info
-{
-
-class DocuStore
-{
- public:
- virtual ~DocuStore() {}
-
- void Store2CurFile(
- DYN doc::Node & let_drDocu );
- void Store2CurNamespace(
- DYN doc::Node & let_drDocu );
-
- void Store2ConnectedDeclaration(
- DYN doc::Node & let_drDocu );
-
- void Store2Glossary(
- DYN doc::Node & let_drDocu,
- const String & i_sExplainedTerm );
- void Store2GlobalTexts(
- DYN doc::Node & let_drDocu,
- ary::info::GlobalTextId
- i_nId );
- private:
- virtual void do_Store2CurFile(
- DYN doc::Node & let_drDocu ) = 0;
- virtual void do_Store2CurNamespace(
- DYN doc::Node & let_drDocu ) = 0;
-
- virtual void do_Store2ConnectedDeclaration(
- DYN doc::Node & let_drDocu ) = 0;
-
- virtual void do_Store2Glossary(
- DYN doc::Node & let_drDocu,
- const String & i_sExplainedTerm ) = 0;
- virtual void do_Store2GlobalTexts(
- DYN doc::Node & let_drDocu,
- ary::info::GlobalTextId
- i_nId ) = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-DocuStore::Store2CurFile( DYN doc::Node & let_drDocu )
- { do_Store2CurFile(let_drDocu); }
-inline void
-DocuStore::Store2CurNamespace( DYN doc::Node & let_drDocu )
- { do_Store2CurNamespace(let_drDocu); }
-inline void
-DocuStore::Store2ConnectedDeclaration( DYN doc::Node & let_drDocu )
- { do_Store2ConnectedDeclaration(let_drDocu); }
-inline void
-DocuStore::Store2Glossary( DYN doc::Node & let_drDocu,
- const String & i_sExplainedTerm )
- { do_Store2Glossary(let_drDocu, i_sExplainedTerm); }
-inline void
-DocuStore::Store2GlobalTexts( DYN doc::Node & let_drDocu,
- ary::info::GlobalTextId i_nId )
- { do_Store2GlobalTexts(let_drDocu, i_nId); }
-
-
-
-
-} // namespace info
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/infodisp.hxx b/autodoc/inc/ary/info/infodisp.hxx
deleted file mode 100644
index 1716928a..00000000
--- a/autodoc/inc/ary/info/infodisp.hxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_INFODISP_HXX
-#define ARY_INFO_INFODISP_HXX
-// KORR_DEPRECATED_3.0
-
-// BASE CLASSES
-// USED SERVICES
-
-
-
-
-namespace ary
-{
-namespace info
-{
- class StdTag;
- class BaseTag;
- class ExceptionTag;
- class ImplementsTag;
- class KeywordTag;
- class ParameterTag;
- class SeeTag;
- class TemplateTag;
- class LabelTag;
- class SinceTag;
- class DT_Text;
- class DT_MaybeLink;
- class DT_Whitespace;
- class DT_Eol;
- class DT_Xml;
-
-
-
-/** Displaying an ary::doc::OldCppDocu.
-
- @descr
- This class is an interface, but the functions are defaulted,
- to do nothing. so a derived class needn't implement all of them.
-*/
-class DocuDisplay
-{
- public:
- virtual ~DocuDisplay() {}
-
- virtual void Display_StdTag(
- const StdTag & i_rData ) = 0;
- virtual void Display_BaseTag(
- const BaseTag & i_rData ) = 0;
- virtual void Display_ExceptionTag(
- const ExceptionTag &
- i_rData ) = 0;
- virtual void Display_ImplementsTag(
- const ImplementsTag &
- i_rData ) = 0;
- virtual void Display_KeywordTag(
- const KeywordTag & i_rData ) = 0;
- virtual void Display_ParameterTag(
- const ParameterTag &
- i_rData ) = 0;
- virtual void Display_SeeTag(
- const SeeTag & i_rData ) = 0;
- virtual void Display_TemplateTag(
- const TemplateTag & i_rData ) = 0;
- virtual void Display_LabelTag(
- const LabelTag & i_rData ) = 0;
- virtual void Display_SinceTag(
- const ary::info::SinceTag &
- i_rData ) = 0;
- virtual void Display_DT_Text(
- const DT_Text & i_rData ) = 0;
- virtual void Display_DT_MaybeLink(
- const DT_MaybeLink& i_rData ) = 0;
- virtual void Display_DT_Whitespace(
- const DT_Whitespace &
- i_rData ) = 0;
- virtual void Display_DT_Eol(
- const DT_Eol & i_rData ) = 0;
- virtual void Display_DT_Xml(
- const ary::info::DT_Xml &
- i_rData ) = 0;
-};
-
-
-
-
-}
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/info/inftypes.hxx b/autodoc/inc/ary/info/inftypes.hxx
deleted file mode 100644
index ecbcbc04..00000000
--- a/autodoc/inc/ary/info/inftypes.hxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_INFO_INFTYPES_HXX
-#define ARY_INFO_INFTYPES_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace info
-{
-
-
-
-
-typedef uintt GlobalTextId;
-
-
-
-/** Because this enum is used as index list for displayed
- tag headlines, the items must neither be moved nor deleted.
- Only adding to the end is allowed. atid_MAX always has to exist
- and to be the last used value.
- Also assigning numbers to the values is forbidden.
-*/
-enum E_AtTagId
-{
- atid_ATT = 0,
- atid_author,
- atid_change,
- atid_collab,
- atid_contact,
-
- atid_copyright,
- atid_deprecated,
- atid_descr,
- atid_docdate,
- atid_derive,
-
- atid_dyn,
- atid_instance,
- atid_interface,
- atid_invariant,
- atid_life,
-
- atid_multi,
- atid_onerror,
- atid_persist,
- atid_postcond,
- atid_precond,
-
- atid_resp,
- atid_return,
- atid_short,
- atid_todo,
- atid_version,
-
- atid_MAX
-};
-
-/** Because this enum is used as index list for displayed
- tag headlines, the items must neither be moved nor deleted.
- Only adding to the end is allowed. C_eAtTag_NrOfClasses always has to exist
- and to be the last used value.
- Also assigning other numbers to the values, than in this
- existing scheme, is forbidden.
-*/
-enum E_AtTagClass
-{
- atc_std = 0,
-
- atc_base = atid_MAX,
- atc_exception = atid_MAX + 1,
- atc_implements = atid_MAX + 2,
- atc_keyword = atid_MAX + 3,
- atc_parameter = atid_MAX + 4,
-
- atc_see = atid_MAX + 5,
- atc_template = atid_MAX + 6,
- atc_label = atid_MAX + 7,
- atc_since = atid_MAX + 8,
- C_eAtTag_NrOfClasses
-};
-
-
-
-} // namespace info
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/itrange.hxx b/autodoc/inc/ary/itrange.hxx
deleted file mode 100644
index a213f93e..00000000
--- a/autodoc/inc/ary/itrange.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ITRANGE_HXX
-#define ARY_ITRANGE_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <utility>
-
-
-
-
-namespace ary
-{
-
-template <typename ITER>
-class IteratorRange
-{
- public:
- IteratorRange(
- ITER i_begin,
- ITER i_end )
- : itCurrent(i_begin),
- itEnd(i_end)
- {}
- IteratorRange(
- std::pair<ITER,ITER>
- i_range )
- : itCurrent(i_range.first),
- itEnd(i_range.second)
- {}
-
- operator bool() const { return itCurrent != itEnd; }
- IteratorRange & operator++() { ++itCurrent; return *this; }
-
- ITER cur() const { return itCurrent; }
- ITER end() const { return itEnd; }
-
-
- private:
- // DATA
- ITER itCurrent;
- ITER itEnd;
-};
-
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_dir.hxx b/autodoc/inc/ary/loc/loc_dir.hxx
deleted file mode 100644
index e2446672..00000000
--- a/autodoc/inc/ary/loc/loc_dir.hxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_DIR_HXX
-#define ARY_LOC_DIR_HXX
-
-// BASE CLASSES
-#include <ary/loc/loc_le.hxx>
-
-// USED SERVICES
-#include <ary/loc/loc_traits.hxx>
-#include <ary/symtreenode.hxx>
-
-namespace ary
-{
-namespace loc
-{
- class File;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** Represents a directory for source code files.
-*/
-class Directory : public LocationEntity
-{
- public:
- enum E_ClassId { class_id = 7030 };
-
- typedef ::ary::symtree::Node<LeNode_Traits> node_t;
-
- /// Used for root directories.
- explicit Directory(
- Le_id i_assignedRoot );
-
- /// Used for subdirectories which have a parent directory.
- Directory(
- const String & i_localName,
- Le_id i_parentDirectory );
- virtual ~Directory();
-
- void Add_Dir(
- const Directory & i_dir );
- void Add_File(
- const File & i_file );
-
- Le_id Parent() const;
- Le_id AssignedRoot() const;
-
- Le_id Search_Dir(
- const String & i_name ) const;
- Le_id Search_File(
- const String & i_name ) const;
-
- const node_t & AsNode() const;
- node_t & AsNode();
-
- private:
- struct Container;
-
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface LocationEntity:
- virtual const String &
- inq_LocalName() const;
- virtual Le_id inq_ParentDirectory() const;
-
- // DATA
- String sLocalName;
- Le_id nParentDirectory;
- Le_id nAssignedRoot;
- node_t aAssignedNode;
- Dyn<Container> pChildren;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Le_id
-Directory::Parent() const
-{
- return nParentDirectory;
-}
-
-inline Le_id
-Directory::AssignedRoot() const
-{
- return nAssignedRoot;
-}
-
-inline const Directory::node_t &
-Directory::AsNode() const
-{
- return aAssignedNode;
-}
-
-inline Directory::node_t &
-Directory::AsNode()
-{
- return aAssignedNode;
-}
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_file.hxx b/autodoc/inc/ary/loc/loc_file.hxx
deleted file mode 100644
index 99f2f11d..00000000
--- a/autodoc/inc/ary/loc/loc_file.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_FILE_HXX
-#define ARY_LOC_FILE_HXX
-
-// BASE CLASSES
-#include <ary/loc/loc_filebase.hxx>
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** Represents an unspecified source code file.
-*/
-class File : public FileBase
-{
- public:
- enum E_ClassId { class_id = 7100 };
-
- File(
- const String & i_sLocalName,
- Le_id i_nParentDirectory );
- virtual ~File();
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-};
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_filebase.hxx b/autodoc/inc/ary/loc/loc_filebase.hxx
deleted file mode 100644
index fabdc33e..00000000
--- a/autodoc/inc/ary/loc/loc_filebase.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_FILEBASE_HXX
-#define ARY_LOC_FILEBASE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/loc/loc_le.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-
-/** Base class for classes representing source code files.
-*/
-class FileBase : public LocationEntity
-{
- public:
- virtual ~FileBase() {}
-
- protected:
- FileBase(
- const String & i_localName ,
- Le_id i_parentDirectory );
- private:
- // Interface LocationEntity:
- virtual const String &
- inq_LocalName() const;
- virtual Le_id inq_ParentDirectory() const;
-
- // DATA
- String sLocalName;
- Le_id nParentDirectory;
-};
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_le.hxx b/autodoc/inc/ary/loc/loc_le.hxx
deleted file mode 100644
index b8c7041c..00000000
--- a/autodoc/inc/ary/loc/loc_le.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_LE_HXX
-#define ARY_LOC_LE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/entity.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/loc/loc_types4loc.hxx>
-#include <ary/loc/loc_traits.hxx>
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** Base class for all file locations in the Autodoc repository.
-*/
-class LocationEntity : public ::ary::Entity
-{
- public:
- typedef Le_Traits traits_t;
-
- virtual ~LocationEntity() {}
-
- Le_id LeId() const;
- const String & LocalName() const;
- Le_id ParentDirectory() const;
-
- private:
- virtual const String &
- inq_LocalName() const = 0;
- virtual Le_id inq_ParentDirectory() const = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline Le_id
-LocationEntity::LeId() const
-{
- return TypedId<LocationEntity>(Id());
-}
-
-inline const String &
-LocationEntity::LocalName() const
-{
- return inq_LocalName();
-}
-
-inline Le_id
-LocationEntity::ParentDirectory() const
-{
- return inq_ParentDirectory();
-}
-
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_root.hxx b/autodoc/inc/ary/loc/loc_root.hxx
deleted file mode 100644
index 9dbbb8ec..00000000
--- a/autodoc/inc/ary/loc/loc_root.hxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_PROJECT_HXX
-#define ARY_LOC_PROJECT_HXX
-
-// BASE CLASSES
-#include <ary/loc/loc_le.hxx>
-// USED SERVICES
-#include <cosv/ploc.hxx>
-#include <ary/loc/loc_dir.hxx>
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** Represents a root directory for source files.
-*/
-class Root : public LocationEntity
-{
- public:
- enum E_ClassId { class_id = 7000 };
-
- explicit Root(
- const csv::ploc::Path &
- i_rRootDirectoryPath );
- void Assign_Directory(
- Le_id i_assignedDirectory );
- virtual ~Root();
-
- // INQUIRY
- const csv::ploc::Path &
- Path() const;
- Le_id MyDir() const;
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface ary::Object:
- virtual ClassId get_AryClass() const;
-
- // Interface LocationEntity:
- virtual const String &
- inq_LocalName() const;
- virtual Le_id inq_ParentDirectory() const;
-
- // DATA
- csv::ploc::Path aPath;
- String sPathAsString;
- Le_id aMyDirectory;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-Root::Assign_Directory(Le_id i_assignedDirectory)
-{
- aMyDirectory = i_assignedDirectory;
-}
-
-inline const csv::ploc::Path &
-Root::Path() const
-{
- return aPath;
-}
-
-inline Le_id
-Root::MyDir() const
-{
- return aMyDirectory;
-}
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_traits.hxx b/autodoc/inc/ary/loc/loc_traits.hxx
deleted file mode 100644
index 2409209a..00000000
--- a/autodoc/inc/ary/loc/loc_traits.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_TRAITS_HXX
-#define ARY_LOC_TRAITS_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/loc/loc_types4loc.hxx>
-
-
-namespace ary
-{
-namespace symtree
-{
- template <class> class Node;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-
-/** Basic traits for derived ones of ->LocationEntity.
-*/
-struct Le_Traits
-{
- typedef LocationEntity entity_base_type;
- typedef Le_id id_type;
-
- static entity_base_type &
- EntityOf_(
- id_type i_id );
-};
-
-
-/** An instance of SYMBOL_TRAITS for ->::ary::symtree::Node.
-
- @see ::ary::symtree::Node
-*/
-struct LeNode_Traits : public Le_Traits
-{
- static symtree::Node<LeNode_Traits> *
- NodeOf_(
- entity_base_type & i_entity );
-
- static entity_base_type *
- ParentOf_(
- const entity_base_type &
- i_entity );
- template <class KEY>
- static id_type Search_(
- const entity_base_type &
- i_entity,
- const KEY & i_localKey );
-};
-
-
-
-/** An instance of COMPARE for ->::ary::SortedIds<>.
-
- @see ::ary::SortedIds<>
-*/
-struct Le_Compare : public Le_Traits
-{
- typedef String key_type;
-
- static const key_type &
- KeyOf_(
- const entity_base_type &
- i_entity );
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-};
-
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/loc_types4loc.hxx b/autodoc/inc/ary/loc/loc_types4loc.hxx
deleted file mode 100644
index 5717049a..00000000
--- a/autodoc/inc/ary/loc/loc_types4loc.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_TYPES4LOC_HXX
-#define ARY_LOC_TYPES4LOC_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/types.hxx>
-
-
-namespace ary
-{
-namespace loc
-{
-
-class LocationEntity;
-
-
-
-typedef ::ary::TypedId<LocationEntity> Le_id;
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/loc/locp_le.hxx b/autodoc/inc/ary/loc/locp_le.hxx
deleted file mode 100644
index cfdb4f88..00000000
--- a/autodoc/inc/ary/loc/locp_le.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOCP_LE_HXX
-#define ARY_LOCP_LE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <cosv/ploc.hxx>
-#include <ary/loc/loc_types4loc.hxx>
-
-
-namespace ary
-{
-namespace loc
-{
- class Root;
- class Directory;
- class File;
-}
-}
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-
-/** Provides access to files and directories stored in the
- repository.
-*/
-class LocationPilot
-{
- public:
- virtual ~LocationPilot() {}
-
- virtual Root & CheckIn_Root(
- const csv::ploc::Path &
- i_rPath ) = 0;
- virtual File & CheckIn_File(
- const String & i_name,
- const csv::ploc::DirectoryChain &
- i_subPath,
- Le_id i_root ) = 0;
-
- virtual Root & Find_Root(
- Le_id i_id ) const = 0;
- virtual Directory & Find_Directory(
- Le_id i_id ) const = 0;
- virtual File & Find_File(
- Le_id i_id ) const = 0;
-};
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/namesort.hxx b/autodoc/inc/ary/namesort.hxx
deleted file mode 100644
index 06f02693..00000000
--- a/autodoc/inc/ary/namesort.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_NAMESORT_HXX
-#define ARY_NAMESORT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-
-/** Provides sensible sorting of ASCII names in programming languages.
-
- @descr
- Names are compared case insensitive first. Only after they appear
- equal that way, there is an additional case sensitive comparison.
- The second comparison sorts upper case before lower case.
-
-*/
-struct LesserName
-{
- bool operator()(
- const String & i_s1,
- const String & i_s2 ) const;
- private:
- // DATA
-
- static const csv::CharOrder_Table
- aOrdering1_;
- static const csv::CharOrder_Table
- aOrdering2_;
-};
-
-inline bool
-LesserName::operator()( const String & i_s1,
- const String & i_s2 ) const
-{
- int result = i_s1.compare(aOrdering1_,i_s2);
- if (result == 0)
- result = i_s1.compare(aOrdering2_,i_s2);
- return result < 0;
-}
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/object.hxx b/autodoc/inc/ary/object.hxx
deleted file mode 100644
index 0e20d63e..00000000
--- a/autodoc/inc/ary/object.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_OBJECT_HXX
-#define ARY_OBJECT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/tpl/processor.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/types.hxx>
-
-
-namespace ary
-{
-
-
-/** Interface for every class, that is stored within the
- Autodoc Repository.
-*/
-class Object : public csv::ConstProcessorClient
-{
- public:
- virtual ~Object() {}
-
- /// @return Type id of most derived class.
- ClassId AryClass() const;
-
- private:
- virtual ClassId get_AryClass() const = 0;
-};
-
-
-
-inline ClassId
-Object::AryClass() const
-{
- return get_AryClass();
-}
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/qualiname.hxx b/autodoc/inc/ary/qualiname.hxx
deleted file mode 100644
index 9001984c..00000000
--- a/autodoc/inc/ary/qualiname.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_QUALINAME_HXX
-#define ARY_QUALINAME_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <cosv/tpl/tpltools.hxx>
-
-
-namespace ary
-{
-
-class QualifiedName
-{
- public:
- typedef StringVector::const_iterator namespace_iterator;
-
- QualifiedName(
- uintt i_nSize = 0);
-
- /// @see AssignText()
- QualifiedName(
- const char * i_sText,
- const char * i_sSeparator );
- ~QualifiedName();
-
- QualifiedName & operator+=(
- const String & i_sNamespaceName )
- { if (i_sNamespaceName.length() > 0)
- aNamespace.push_back(i_sNamespaceName);
- return *this; }
- /// @precond i_nIndex < NamespaceDepth().
- String & operator[](
- uintt i_nIndex )
- { csv_assert(i_nIndex < aNamespace.size());
- return aNamespace[i_nIndex]; }
- void Init(
- bool i_bAbsolute )
- { Empty(); bIsAbsolute = i_bAbsolute; }
- /** Reads a qualified name from a string.
- If the last two charcters are "()", the inquiry IsFunction() will return
- true.
- */
- void AssignText(
- const char * i_sText,
- const char * i_sSeparator );
- void SetLocalName(
- const String & i_sLocalName )
- { sLocalName = i_sLocalName; }
- void Empty() { csv::erase_container(aNamespace); sLocalName.clear(); bIsAbsolute = false; }
-
- const String & LocalName() const { return sLocalName; }
- namespace_iterator first_namespace() const { return aNamespace.begin(); }
- namespace_iterator end_namespace() const { return aNamespace.end(); }
- uintt NamespaceDepth() const { return aNamespace.size(); }
-
- bool IsAbsolute() const { return bIsAbsolute; }
- bool IsQualified() const { return aNamespace.size() > 0; }
- bool IsFunction() const { return bIsFunction; }
-
- private:
- // DATA
- StringVector aNamespace;
- String sLocalName;
- bool bIsAbsolute; /// true := beginning with "::".
- bool bIsFunction; /// true := ending with "()"
-};
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/sequentialids.hxx b/autodoc/inc/ary/sequentialids.hxx
deleted file mode 100644
index 26dbae47..00000000
--- a/autodoc/inc/ary/sequentialids.hxx
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_SEQUENTIALIDS_HXX
-#define ARY_SEQUENTIALIDS_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-#include <algorithm>
-
-
-
-namespace ary
-{
-
-
-/** Implementation of a set of children to an entity in the Autodoc
- repository. The children are in the sequence of addition.
-*/
-template<class ID>
-class SequentialIds
-{
- public:
- typedef std::vector<ID> data_t;
- typedef typename data_t::const_iterator const_iterator;
-
- // LIFECYCLE
- explicit SequentialIds(
- std::size_t i_reserve = 0 );
- ~SequentialIds();
-
- // OPERATIONS
- void Add(
- const ID & i_child );
- // INQUIRY
- const_iterator Begin() const;
- const_iterator End() const;
- std::size_t Size() const;
-
- template <class IDENTIFY>
- ID Find(
- IDENTIFY i_find ) const;
- template <class IDENTIFY>
- // Workaround for Solaris8 compiler: return type has to match alphabetically
- typename std::vector<ID>::const_iterator
- Search(
- IDENTIFY i_find ) const;
- private:
- // DATA
- data_t aData;
-};
-
-
-
-
-
-
-
-// IMPLEMENTATION
-
-template <class ID>
-SequentialIds<ID>::SequentialIds(std::size_t i_reserve)
- : aData()
-{
- if (i_reserve > 0)
- aData.reserve(i_reserve);
-}
-
-template <class ID>
-SequentialIds<ID>::~SequentialIds()
-{
-}
-
-template <class ID>
-inline void
-SequentialIds<ID>::Add(const ID & i_child)
-{
- aData.push_back(i_child);
-}
-
-template <class ID>
-inline typename SequentialIds<ID>::const_iterator
-SequentialIds<ID>::Begin() const
-{
- return aData.begin();
-}
-
-template <class ID>
-inline typename SequentialIds<ID>::const_iterator
-SequentialIds<ID>::End() const
-{
- return aData.end();
-}
-
-template <class ID>
-inline std::size_t
-SequentialIds<ID>::Size() const
-{
- return aData.size();
-}
-
-template <class ID>
-template <class IDENTIFY>
-ID
-SequentialIds<ID>::Find(IDENTIFY i_find) const
-{
- const_iterator
- ret = std::find_if(aData.begin(), aData.end(), i_find);
- csv_assert(ret != aData.end());
- return *ret;
-}
-
-template <class ID>
-template <class IDENTIFY>
-// Workaround for Solaris8 compiler: return type has to match alphabetically
-// typename SequentialIds<ID>::const_iterator
-typename std::vector<ID>::const_iterator
-SequentialIds<ID>::Search(IDENTIFY i_find) const
-{
- return std::find_if(aData.begin(), aData.end(), i_find);
-}
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/stdconstiter.hxx b/autodoc/inc/ary/stdconstiter.hxx
deleted file mode 100644
index a3883021..00000000
--- a/autodoc/inc/ary/stdconstiter.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_STDCONSTITER_HXX
-#define ARY_STDCONSTITER_HXX
-// KORR_DEPRECATED_3.0
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-
-template <class ELEM>
-
-class StdConstIterator
-{
- public:
- virtual ~StdConstIterator() {}
-
- void operator++() { do_Advance(); }
- const ELEM & operator*() const { return *inq_CurElement(); }
- operator bool() const { return inq_CurElement() != 0; }
-
- /// Needed as replacement for operator bool() in gcc 2.95.
- bool IsValid() const { return operator bool(); }
- bool IsSorted() const { return inq_IsSorted(); }
-
- protected:
- StdConstIterator() {}
-
- private:
- //Locals
- virtual void do_Advance() = 0;
- virtual const ELEM *
- inq_CurElement() const = 0;
- virtual bool inq_IsSorted() const = 0;
-
- // Forbidden:
- StdConstIterator(const StdConstIterator<ELEM>&);
- StdConstIterator<ELEM> & operator=(const StdConstIterator<ELEM>&);
-};
-
-
-template <class ELEM>
-class Dyn_StdConstIterator
-{
- public:
- typedef StdConstIterator<ELEM> client_type;
-
- Dyn_StdConstIterator(
- DYN client_type * pass_dpIterator = 0 )
- : pClient(pass_dpIterator) {}
- Dyn_StdConstIterator<ELEM> &
- operator=(
- DYN client_type * pass_dpIterator )
- { pClient = pass_dpIterator;
- return *this; }
- client_type & operator*() const { return *pClient.MutablePtr(); }
-
- private:
- Dyn<client_type> pClient;
-};
-
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/symtreenode.hxx b/autodoc/inc/ary/symtreenode.hxx
deleted file mode 100644
index 8966a8d1..00000000
--- a/autodoc/inc/ary/symtreenode.hxx
+++ /dev/null
@@ -1,347 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_SYMTREE_NODE_HXX
-#define ARY_SYMTREE_NODE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-
-
-
-namespace ary
-{
-namespace symtree
-{
-
-
-
-/** Represents a node in a tree of symbols like a namespace tree or a
- directory tree.
-
- @tpl NODE_TRAITS
- Needs to define the types:
- entity_base_type: The type of the entities in that storage,
- e.g. ->ary::cpp::CodeEntity.
- id_type: The type of the ids of those entities,
- e.g. ->ary::cpp::Ce_id.
-
- Needs to define the functions:
- 1. static entity_base_type &
- EntityOf_(
- id_type i_id );
- 2. static symtree::Node<LeNode_Traits> *
- NodeOf_(
- const entity_base_type &
- i_entity );
- 3. static const String &
- LocalNameOf_(
- const entity_base_type &
- i_entity );
- 4. static entity_base_type *
- ParentOf_(
- const entity_base_type &
- i_entity );
- 5. template <class KEY>
- static id_t Search_(
- const entity_base_type &
- i_entity,
- const KEY & i_localKey );
-*/
-template <class NODE_TRAITS>
-class Node
-{
- public:
- typedef Node<NODE_TRAITS> node_self;
- typedef typename NODE_TRAITS::entity_base_type entity_t;
- typedef typename NODE_TRAITS::id_type id_t;
-
-
- // LIFECYCLE
- /// @attention Always needs to be followed by ->Assign_Entity()!
- Node();
- explicit Node(
- entity_t & i_entity );
- void Assign_Entity(
- entity_t & i_entity );
- ~Node();
- // INQUIRY
- id_t Id();
- const String Name() const;
- int Depth() const;
- const entity_t & Entity() const;
- const node_self * Parent() const;
-
- /** Gets a child with a specific name and of a specific type.
-
- There may be more childs with the same name.
-
- @return id_t(0), if no matching child is found.
- */
- template <class KEY>
- typename NODE_TRAITS::id_type
- Search(
- const KEY & i_localKey ) const
- {
- // Inline here to workaround SUNW8 compiler bug, works in SUNW12.
- return NODE_TRAITS::Search_(Entity(), i_localKey);
- }
-
-
- /** Gets a child with a specific qualified name below this node.
-
- The child may not exists.
- */
- template <class KEY>
- void SearchBelow(
- id_t & o_return, // Workaround SUNW8 compiler bug
- StringVector::const_iterator
- i_qualifiedSearchedName_begin,
- StringVector::const_iterator
- i_qualifiedSearchedName_end,
- const KEY & i_localKey ) const;
-
- /** Gets a child with a specific qualified name, either below this node
- or below any of the parent nodes.
-
- The child may not exists.
- */
- template <class KEY>
- void SearchUp(
- id_t & o_return, // Workaround SUNW8 compiler bug
- StringVector::const_iterator
- i_qualifiedSearchedName_begin,
- StringVector::const_iterator
- i_qualifiedSearchedName_end,
- const KEY & i_localKey ) const;
- // ACCESS
- entity_t & Entity();
- node_self * Parent();
-
- private:
- // Forbid copying:
- Node(const node_self&);
- node_self& operator=(const node_self&);
-
- // Locals
- void InitDepth();
- node_self * Get_Parent() const;
- node_self * NodeOf(
- id_t i_id ) const;
-
- // DATA
- entity_t * pEntity;
- int nDepth;
-};
-
-
-
-
-// IMPLEMENTATION
-
-template <class NODE_TRAITS>
-inline const typename Node<NODE_TRAITS>::entity_t &
-Node<NODE_TRAITS>::Entity() const
-{
- csv_assert(pEntity != 0);
- return *pEntity;
-}
-
-template <class NODE_TRAITS>
-inline Node<NODE_TRAITS> *
-Node<NODE_TRAITS>::NodeOf(id_t i_id) const
-{
- if (i_id.IsValid())
- return NODE_TRAITS::NodeOf_(NODE_TRAITS::EntityOf_(i_id));
- return 0;
-}
-
-template <class NODE_TRAITS>
-inline Node<NODE_TRAITS> *
-Node<NODE_TRAITS>::Get_Parent() const
-{
- entity_t *
- parent = NODE_TRAITS::ParentOf_(Entity());
- if (parent != 0)
- return NODE_TRAITS::NodeOf_(*parent);
- return 0;
-}
-
-template <class NODE_TRAITS>
-Node<NODE_TRAITS>::Node()
- : pEntity(0),
- nDepth(0)
-{
-}
-
-template <class NODE_TRAITS>
-Node<NODE_TRAITS>::Node(entity_t & i_entity)
- : pEntity(&i_entity),
- nDepth(0)
-{
- InitDepth();
-}
-
-template <class NODE_TRAITS>
-void
-Node<NODE_TRAITS>::Assign_Entity(entity_t & i_entity)
-{
- pEntity = &i_entity;
- InitDepth();
-}
-
-template <class NODE_TRAITS>
-Node<NODE_TRAITS>::~Node()
-{
-}
-
-template <class NODE_TRAITS>
-inline typename Node<NODE_TRAITS>::id_t
-Node<NODE_TRAITS>::Id()
-{
- return NODE_TRAITS::IdOf(Entity());
-}
-
-template <class NODE_TRAITS>
-inline const String
-Node<NODE_TRAITS>::Name() const
-{
- return NODE_TRAITS::LocalNameOf_(Entity());
-}
-
-template <class NODE_TRAITS>
-inline int
-Node<NODE_TRAITS>::Depth() const
-{
- return nDepth;
-}
-
-template <class NODE_TRAITS>
-inline const Node<NODE_TRAITS> *
-Node<NODE_TRAITS>::Parent() const
-{
- return Get_Parent();
-}
-
-template <class NODE_TRAITS>
-template <class KEY>
-void
-Node<NODE_TRAITS>::SearchBelow(
- id_t & o_return, // Workaround SUNW8 compiler bug
- StringVector::const_iterator i_qualifiedSearchedName_begin,
- StringVector::const_iterator i_qualifiedSearchedName_end,
- const KEY & i_localKey ) const
-{
- if (i_qualifiedSearchedName_begin != i_qualifiedSearchedName_end)
- {
- id_t
- next = Search(*i_qualifiedSearchedName_begin);
- if (next.IsValid())
- {
- const node_self *
- subnode = NodeOf(next);
- if (subnode != 0)
- {
- subnode->SearchBelow( o_return,
- i_qualifiedSearchedName_begin+1,
- i_qualifiedSearchedName_end ,
- i_localKey );
- return;
- }
- }
- o_return = id_t(0);
- return;
- }
-
- o_return = Search(i_localKey);
-}
-
-template <class NODE_TRAITS>
-template <class KEY>
-void
-Node<NODE_TRAITS>::SearchUp(
- id_t & o_return, // Workaround SUNW8 compiler bug
- StringVector::const_iterator i_qualifiedSearchedName_begin,
- StringVector::const_iterator i_qualifiedSearchedName_end,
- const KEY & i_localKey ) const
-{
- SearchBelow( o_return,
- i_qualifiedSearchedName_begin,
- i_qualifiedSearchedName_end,
- i_localKey );
- if (o_return.IsValid())
- return;
-
- node_self *
- parent = Get_Parent();
- if (parent != 0)
- {
- parent->SearchUp( o_return,
- i_qualifiedSearchedName_begin,
- i_qualifiedSearchedName_end,
- i_localKey );
- }
-}
-
-template <class NODE_TRAITS>
-typename Node<NODE_TRAITS>::entity_t &
-Node<NODE_TRAITS>::Entity()
-{
- csv_assert(pEntity != 0);
- return *pEntity;
-}
-
-template <class NODE_TRAITS>
-inline Node<NODE_TRAITS> *
-Node<NODE_TRAITS>::Parent()
-{
- return Get_Parent();
-}
-
-template <class NODE_TRAITS>
-void
-Node<NODE_TRAITS>::InitDepth()
-{
- Node<NODE_TRAITS> *
- pp = Get_Parent();
- if (pp != 0)
- nDepth = pp->Depth() + 1;
- else
- nDepth = 0;
-}
-
-
-
-
-} // namespace symtree
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/types.hxx b/autodoc/inc/ary/types.hxx
deleted file mode 100644
index d7a6a2d7..00000000
--- a/autodoc/inc/ary/types.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_TYPES_HXX
-#define ARY_TYPES_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // OTHER
-
-
-namespace ary
-{
-
-
-typedef uintt Rid;
-typedef uintt ClassId;
-
-
-
-// Deprecated:
-typedef Rid Gid; /// Group Id. Id of a group.
-typedef UINT8 SlotAccessId; /// Access to a Slot
-typedef std::set< Rid, std::less< Rid > > Set_Rid;
-typedef std::vector<Rid> List_Rid;
-
-
-
-
-
-/** This is a global id, providing as well an entity's class as its
- id.
-*/
-class GlobalId
-{
- public:
- GlobalId()
- : nClass(0),
- nId(0) {}
- GlobalId(
- ClassId i_class,
- Rid i_id )
- : nClass(i_class),
- nId(i_id) {}
- ~GlobalId() {}
-
- bool IsValid() const { return nClass != 0
- AND
- nId != 0; }
- ClassId Class() const { return nClass; }
- Rid Id() const { return nId; }
-
- private:
- // DATA
- ClassId nClass;
- Rid nId;
-};
-
-
-typedef std::vector<GlobalId> List_GlobalIds;
-
-
-/** This is a typed repository id. It allows to get
- an object of a specific type.
-*/
-template <class IFC>
-class TypedId
-{
- public:
- typedef TypedId<IFC> self;
-
-
- explicit TypedId(
- Rid i_nId = 0 )
- : nId(i_nId) {}
- TypedId<IFC> & operator=(
- Rid i_nId )
- { nId = i_nId; return *this; }
- bool operator==(
- const TypedId<IFC> &
- i_nId ) const
- { return nId == i_nId.nId; }
- bool operator!=(
- const TypedId<IFC> &
- i_nId ) const
- { return NOT operator==(i_nId); }
- bool operator<(
- const TypedId<IFC> &
- i_nId ) const
- { return nId < i_nId.nId; }
-
- bool IsValid() const { return nId != 0; }
- Rid Value() const { return nId; }
-
- static self Null_() { return self(0); }
-
- private:
- // DATA
- Rid nId;
-};
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary/udmhost.hxx b/autodoc/inc/ary/udmhost.hxx
deleted file mode 100644
index 9e179172..00000000
--- a/autodoc/inc/ary/udmhost.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_UDMHOST_HXX
-#define ARY_UDMHOST_HXX
-// KORR_DEPRECATED_3.0
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/host.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-
-
-
-class UdmHost : public Host
-{
- public:
- enum E_ClassId { class_id = 1000 };
-
- UdmHost();
- virtual ~UdmHost();
-
- private:
- virtual Host_ClassId
- inq_ClassId() const;
-};
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary_i/ci_atag2.hxx b/autodoc/inc/ary_i/ci_atag2.hxx
deleted file mode 100644
index d1e91418..00000000
--- a/autodoc/inc/ary_i/ci_atag2.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CI_ATAG2_HXX
-#define ARY_CI_ATAG2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <ary_i/ci_text2.hxx>
- // PARAMETERS
-
-
-
-namespace ary
-{
-namespace inf
-{
-
-
-class DocumentationDisplay;
-
-class AtTag2
-{
- public:
- virtual ~AtTag2() {}
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const = 0;
-
- const char * Title() const { return sTitle; }
- const DocuTex2 & Text() const { return aText; }
- DocuTex2 & Access_Text() { return aText; }
-
- protected:
- AtTag2(
- const char * i_sTitle)
- : sTitle(i_sTitle) {}
- String sTitle;
- DocuTex2 aText;
-};
-
-
-
-// IMPLEMENTATION
-
-} // namespace inf
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary_i/ci_text2.hxx b/autodoc/inc/ary_i/ci_text2.hxx
deleted file mode 100644
index 912ce9aa..00000000
--- a/autodoc/inc/ary_i/ci_text2.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CINFO_CI_TEXT2_HXX
-#define ARY_CINFO_CI_TEXT2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace inf
-{
-
-
-class DocumentationDisplay;
-
-
-class DocuToken
-{
- public:
- virtual ~DocuToken() {}
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const = 0;
- virtual bool IsWhiteOnly() const = 0;
-};
-
-
-class DocuTex2
-{
- public:
- typedef std::vector< DocuToken * > TokenList;
-
- DocuTex2();
- virtual ~DocuTex2();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- void AddToken(
- DYN DocuToken & let_drToken );
-
- const TokenList & Tokens() const { return aTokens; }
- bool IsEmpty() const;
- const String & TextOfFirstToken() const;
-
- String & Access_TextOfFirstToken();
-
- private:
- TokenList aTokens;
-};
-
-
-
-// IMPLEMENTATION
-
-} // namespace inf
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary_i/d_token.hxx b/autodoc/inc/ary_i/d_token.hxx
deleted file mode 100644
index aa0d3fef..00000000
--- a/autodoc/inc/ary_i/d_token.hxx
+++ /dev/null
@@ -1,284 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSI_DSAPI_D_TOKEN_HXX
-#define CSI_DSAPI_D_TOKEN_HXX
-
-// BASE CLASSES
-#include <ary_i/ci_text2.hxx>
-#include <ary_i/ci_atag2.hxx>
-
-
-namespace ary
-{
-namespace inf
-{
- class DocumentationDisplay;
-}
-}
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-using ary::inf::DocumentationDisplay;
-
-
-class DT_Dsapi : public ary::inf::DocuToken
-{
- public:
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const = 0;
- virtual bool IsWhiteOnly() const;
-};
-
-
-
-class DT_TextToken : public DT_Dsapi
-{
- public:
- explicit DT_TextToken(
- const char * i_sText )
- : sText(i_sText) {}
- explicit DT_TextToken(
- const String & i_sText )
- : sText(i_sText) {}
- virtual ~DT_TextToken();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- const char * GetText() const { return sText; }
- const String & GetTextStr() const { return sText; }
-
- String & Access_Text() { return sText; }
-
- virtual bool IsWhiteOnly() const;
-
- private:
- String sText;
-};
-
-class DT_White : public DT_Dsapi
-{
- public:
- DT_White() {}
- virtual ~DT_White();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- virtual bool IsWhiteOnly() const;
-};
-
-
-class DT_MLTag : public DT_Dsapi
-{
- public:
- enum E_Kind
- {
- k_unknown = 0,
- k_begin,
- k_end,
- k_single
- };
-};
-
-class DT_MupType : public DT_MLTag
-{
- public:
- explicit DT_MupType( /// Constructor for End-Tag
- bool ) /// Must be there, but is not evaluated.
- : bIsBegin(false) {}
- explicit DT_MupType( /// Constructor for Begin-Tag
- const String & i_sScope )
- : sScope(i_sScope), bIsBegin(true) {}
- virtual ~DT_MupType();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- const String & Scope() const { return sScope; }
- bool IsBegin() const { return bIsBegin; }
-
- private:
- String sScope;
- bool bIsBegin;
-};
-
-class DT_MupMember : public DT_MLTag
-{
- public:
- explicit DT_MupMember( /// Constructor for End-Tag
- bool ) /// Must be there, but is not evaluated.
- : bIsBegin(false) {}
- DT_MupMember( /// Constructor for Begin-Tag
- const String & i_sScope )
- : sScope(i_sScope), bIsBegin(true) {}
- virtual ~DT_MupMember();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- const String & Scope() const { return sScope; }
- bool IsBegin() const { return bIsBegin; }
-
- private:
- String sScope;
- bool bIsBegin;
-};
-
-class DT_MupConst : public DT_Dsapi
-{
- public:
- DT_MupConst(
- const char * i_sConstText )
- : sConstText(i_sConstText) {}
- virtual ~DT_MupConst();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- const char * GetText() const { return sConstText; }
-
- private:
- String sConstText; /// Without HTML.
-};
-
-
-class DT_Style : public DT_MLTag
-{
- public:
- DT_Style(
- const char * i_sPlainHtmlTag,
- bool i_bNewLine )
- : sText(i_sPlainHtmlTag), bNewLine(i_bNewLine) {}
- virtual ~DT_Style();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- const char * GetText() const { return sText; }
- bool IsStartOfNewLine() const
- { return bNewLine; }
- private:
- String sText; /// With HTML.
- E_Kind eKind;
- bool bNewLine;
-};
-
-class DT_EOL : public DT_Dsapi
-{
- public:
- DT_EOL() {}
- virtual ~DT_EOL();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- virtual bool IsWhiteOnly() const;
-};
-
-
-class DT_AtTag : public ary::inf::AtTag2
-{
- public:
- void AddToken(
- DYN ary::inf::DocuToken &
- let_drToken )
- { aText.AddToken(let_drToken); }
- void SetName(
- const char * i_sName )
- { sTitle = i_sName; }
-
- protected:
- DT_AtTag(
- const char * i_sTitle )
- : ary::inf::AtTag2(i_sTitle) {}
-};
-
-class DT_StdAtTag : public DT_AtTag
-{
- public:
- explicit DT_StdAtTag(
- const char * i_sTitle )
- : DT_AtTag(i_sTitle) {}
- virtual ~DT_StdAtTag();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
-};
-
-class DT_SeeAlsoAtTag : public DT_AtTag
-{
- public:
- DT_SeeAlsoAtTag() : DT_AtTag("") {}
- virtual ~DT_SeeAlsoAtTag();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
- const String & LinkText() const { return sTitle; } // Missbrauch von sTitle
-};
-
-class DT_ParameterAtTag : public DT_AtTag
-{
- public:
- DT_ParameterAtTag() : DT_AtTag("") {}
- virtual ~DT_ParameterAtTag();
-
- void SetTitle(
- const char * i_sTitle );
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
-};
-
-class DT_SinceAtTag : public DT_AtTag
-{
- public:
- DT_SinceAtTag() : DT_AtTag("Since version") {}
- virtual ~DT_SinceAtTag();
-
- virtual void DisplayAt(
- DocumentationDisplay &
- o_rDisplay ) const;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/ary_i/disdocum.hxx b/autodoc/inc/ary_i/disdocum.hxx
deleted file mode 100644
index f5ea9625..00000000
--- a/autodoc/inc/ary_i/disdocum.hxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_DISDOCUM_HXX
-#define ARY_DISDOCUM_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace dsapi
-{
-class DT_TextToken;
-class DT_MupType;
-class DT_MupMember;
-class DT_MupConst;
-class DT_Style;
-class DT_EOL;
-class DT_StdAtTag;
-class DT_SeeAlsoAtTag;
-class DT_ParameterAtTag;
-class DT_SinceAtTag;
-} // namespace dsapi
-} // namespace csi
-
-
-namespace ary
-{
-namespace inf
-{
-
-
-
-class DocumentationDisplay
-{
- public:
-
- virtual ~DocumentationDisplay() { }
-
- virtual void Display_TextToken(
- const csi::dsapi::DT_TextToken &
- i_rToken ) = 0;
- virtual void Display_White() = 0;
- virtual void Display_MupType(
- const csi::dsapi::DT_MupType & i_rToken ) = 0;
- virtual void Display_MupMember(
- const csi::dsapi::DT_MupMember &
- i_rToken ) = 0;
- virtual void Display_MupConst(
- const csi::dsapi::DT_MupConst &
- i_rToken ) = 0;
- virtual void Display_Style(
- const csi::dsapi::DT_Style & i_rToken ) = 0;
- virtual void Display_EOL() = 0;
- virtual void Display_StdAtTag(
- const csi::dsapi::DT_StdAtTag &
- i_rToken ) = 0;
- virtual void Display_SeeAlsoAtTag(
- const csi::dsapi::DT_SeeAlsoAtTag &
- i_rToken ) = 0;
- virtual void Display_ParameterAtTag(
- const csi::dsapi::DT_ParameterAtTag &
- i_rToken ) = 0;
- virtual void Display_SinceAtTag(
- const csi::dsapi::DT_SinceAtTag &
- i_rToken ) = 0;
-};
-
-
-class DocuTag_Display : public DocumentationDisplay
-{
- public:
- // Dummies, implemented in source\ary_i\kernel\ci_atag2.cxx
- virtual void Display_TextToken(
- const csi::dsapi::DT_TextToken &
- i_rToken );
- virtual void Display_White();
- virtual void Display_MupType(
- const csi::dsapi::DT_MupType & i_rToken );
- virtual void Display_MupMember(
- const csi::dsapi::DT_MupMember &
- i_rToken );
- virtual void Display_MupConst(
- const csi::dsapi::DT_MupConst &
- i_rToken );
- virtual void Display_Style(
- const csi::dsapi::DT_Style & i_rToken );
- virtual void Display_EOL();
-};
-
-class DocuText_Display : public DocumentationDisplay
-{
- public:
- // Dummies, implemented in source\ary_i\kernel\ci_text2.cxx
- virtual void Display_StdAtTag(
- const csi::dsapi::DT_StdAtTag &
- i_rToken );
- virtual void Display_SeeAlsoAtTag(
- const csi::dsapi::DT_SeeAlsoAtTag &
- i_rToken );
- virtual void Display_ParameterAtTag(
- const csi::dsapi::DT_ParameterAtTag &
- i_rToken );
- virtual void Display_SinceAtTag(
- const csi::dsapi::DT_SinceAtTag &
- i_rToken );
-};
-
-
-
-} // namespace inf
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/displaying.hxx b/autodoc/inc/autodoc/displaying.hxx
deleted file mode 100644
index 2e629b29..00000000
--- a/autodoc/inc/autodoc/displaying.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 AUTODOC_DISPLAYING_HXX
-#define AUTODOC_DISPLAYING_HXX
-
-
-namespace display
-{
- class CorporateFrame;
-}
-
-
-
-namespace autodoc
-{
-
-class HtmlDisplay_UdkStd;
-class HtmlDisplay_Idl_Ifc;
-
-// class TextDisplay_FunctionList_Ifc;
-
-
-/** Interface for parsing code of a programming language and
- delivering the information into an Autodoc Repository.
-**/
-class DisplayToolsFactory_Ifc
-{
- public:
- virtual ~DisplayToolsFactory_Ifc() {}
- static DisplayToolsFactory_Ifc &
- GetIt_();
-
-// virtual DYN autodoc::TextDisplay_FunctionList_Ifc *
-// Create_TextDisplay_FunctionList() const = 0;
-
- virtual DYN autodoc::HtmlDisplay_UdkStd *
- Create_HtmlDisplay_UdkStd() const = 0;
- virtual DYN autodoc::HtmlDisplay_Idl_Ifc *
- Create_HtmlDisplay_Idl() const = 0;
-
- virtual const display::CorporateFrame &
- Create_StdFrame() const = 0;
-};
-
-
-} // namespace autodoc
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/dsp_html_std.hxx b/autodoc/inc/autodoc/dsp_html_std.hxx
deleted file mode 100644
index 76f7f899..00000000
--- a/autodoc/inc/autodoc/dsp_html_std.hxx
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 AUTODOC_DSP_HTML_STD_HXX
-#define AUTODOC_DSP_HTML_STD_HXX
-
-
-
-namespace ary
-{
- namespace cpp
- {
- class Gate;
- }
- namespace idl
- {
- class Gate;
- }
-}
-
-namespace display
-{
- class CorporateFrame;
-}
-
-
-namespace autodoc
-{
-
-
-class HtmlDisplay_UdkStd
-{
- public:
- virtual ~HtmlDisplay_UdkStd() {}
-
- /** Displays the names of several C++ code entities within the
- given namespace (or the global namespace as default). All
- subnamespaces are included.
-
- Output has following format:
-
- =========================================================================
- OutputDirectory
- index.html
- def-all.html
- prj\
- sal\
- index.html // Overview about project
-
- f-FileName[1,2,...] // Overview about file
- f-OtherFileName[1,2,...]
- ...
- def-FileName[1,2,...] // #defines and macros in file
- def-OtherFileName[1,2,...]
- ...
- rtl\
- ...
- cppu\
- ...
- cppuhelper\
- ...
- ...
- ix\
- ix-a.html
- ix-b.html
- ...
- ix-z.html
- ix-_.html
- ix-other.html
-
- cpp\
- index.html // Overview about global namespace
-
- Namespace_A\
- Namespace_C\
- index.html // Overview about namespace C
- ...
- ...
-
- index.html // Overview about namespace A
-
- c-ClassName_X.html // Description of class
- ...
- e-EnumName.html // Description of enum
- ...
- t-TypedefName.html // Description of typedef
- ...
- o-Filename.html // Descriptions of operations in this file in this namespace
- ...
- d-Filename.html // Descriptions of data in this file in this namespace
- ...
-
- ClassName_X\
- c-ClassName_Y.html
- e-EnumName.html
- t-TypedefName.html
- o.html // Descriptions of operations in class X
- d.html // Descriptions of data in class X
-
- ClassName_Y\
- ...
- ...
-
- idl\
- ...
- java\
- ...
- =========================================================================
-
-
- @param i_sOutputDirectory
- Directory for output. Path must be given in correct
- syntax for the actual operating system without final
- path delimiter. If this is 0 or "", the current
- working directory is chosen.
- @param i_rAryGate
- The access to the Autodoc Repository.
- @param i_rLayout
- Gives parameters for the appearance of the HTML output.
- @param i_pProjectList
- If this is != 0, then only code entities which are declared
- in this projects are displayed.
- */
- void Run(
- const char * i_sOutputDirectory,
- const ary::cpp::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout );
- private:
- virtual void do_Run(
- const char * i_sOutputDirectory,
- const ary::cpp::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout ) = 0;
-};
-
-// IMPLEMENTATION
-
-inline void
-HtmlDisplay_UdkStd::Run( const char * i_sOutputDirectory,
- const ary::cpp::Gate & i_rAryGate,
- const display::CorporateFrame & i_rLayout )
-{
- do_Run( i_sOutputDirectory, i_rAryGate, i_rLayout );
-}
-
-
-
-// class HtmlDisplay_Idl_Ifc
-
-class HtmlDisplay_Idl_Ifc
-{
- public:
- virtual ~HtmlDisplay_Idl_Ifc() {}
-
- void Run(
- const char * i_sOutputDirectory,
- const ary::idl::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout );
- private:
- virtual void do_Run(
- const char * i_sOutputDirectory,
- const ary::idl::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout ) = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-HtmlDisplay_Idl_Ifc::Run( const char * i_sOutputDirectory,
- const ary::idl::Gate & i_rAryGate,
- const display::CorporateFrame & i_rLayout )
-{
- do_Run( i_sOutputDirectory, i_rAryGate, i_rLayout );
-}
-
-
-
-
-} // namespace autodoc
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/dsp_txt_flist.hxx b/autodoc/inc/autodoc/dsp_txt_flist.hxx
deleted file mode 100644
index 6563cda9..00000000
--- a/autodoc/inc/autodoc/dsp_txt_flist.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 AUTODOC_DSP_TXT_FLIST_HXX
-#define AUTODOC_DSP_TXT_FLIST_HXX
-
-#include <iostream>
-
-
-namespace ary
-{
- namespace cpp
- {
- class DisplayGate;
- }
-}
-
-
-namespace autodoc
-{
-
-class TextDisplay_FunctionList_Ifc
-{
- public:
- virtual ~TextDisplay_FunctionList_Ifc() {}
-
- /** Displays the names of all C++ functions and methods within the
- given namespace (or the global namespace as default). All
- subnamespaces are included.
- */
- virtual void Run(
- ostream & o_rStream,
- const ary::cpp::DisplayGate &
- i_rAryGate ) = 0; /// If i_pNamespace == 0, the global namespace is displayed.
-};
-
-
-} // namespace autodoc
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/filecoli.hxx b/autodoc/inc/autodoc/filecoli.hxx
deleted file mode 100644
index d9e0f36d..00000000
--- a/autodoc/inc/autodoc/filecoli.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSER_FILECOLI_HXX
-#define ADC_PARSER_FILECOLI_HXX
-
-
-namespace autodoc
-{
-
-class FileCollector_Ifc
-{
- public:
- // TYPES
- typedef StringVector::const_iterator const_iterator;
-
- enum E_SearchMode
- {
- flat,
- recursive
- };
-
- // LIFECYCLE
- virtual ~FileCollector_Ifc() {}
-
- // OPERATIONS
- virtual uintt AddFilesFrom(
- const char * i_sRootDir,
- const char * i_sFilter,
- E_SearchMode i_eSearchMode ) = 0;
- virtual uintt AddFile(
- const char * i_sFilePath ) = 0;
- virtual void EraseAll() = 0;
-
- // INQUIRY
- virtual const_iterator
- Begin() const = 0;
- virtual const_iterator
- End() const = 0;
- virtual uintt Size() const = 0;
-};
-
-
-} // namespace autodoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/parsing.hxx b/autodoc/inc/autodoc/parsing.hxx
deleted file mode 100644
index ad30c93d..00000000
--- a/autodoc/inc/autodoc/parsing.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 AUTODOC_PARSING_HXX
-#define AUTODOC_PARSING_HXX
-
-
-
-namespace autodoc
-{
-
-class CodeParser_Ifc;
-class DocumentationParser_Ifc;
-class FileCollector_Ifc;
-
-
-/** Interface for parsing code of a programming language and
- delivering the information into an Autodoc Repository.
-**/
-class ParseToolsFactory_Ifc
-{
- public:
- virtual ~ParseToolsFactory_Ifc() {}
- static ParseToolsFactory_Ifc &
- GetIt_();
-
- virtual DYN autodoc::CodeParser_Ifc *
- Create_Parser_Cplusplus() const = 0;
-
-// virtual DYN autodoc::CodeParser_Ifc *
-// CreateParser_UnoIDL() const = 0;
-// virtual DYN autodoc::CodeParser_Ifc *
-// CreateParser_Java() const = 0;
-// virtual DYN autodoc::CodeParser_Ifc *
-// CreateParser_StoredProcedures() const = 0;
-
- virtual DYN autodoc::DocumentationParser_Ifc *
- Create_DocuParser_AutodocStyle() const = 0;
-
-// virtual DYN autodoc::DocumentationParser_Ifc *
-// CreateDocuParser_StarOfficeAPIStyle() const = 0;
-
- virtual DYN autodoc::FileCollector_Ifc *
- Create_FileCollector(
- uintt i_nEstimatedNrOfFiles ) const = 0; /// Should be somewhat larger than the maximal estimated number of files.
-};
-
-
-} // namespace autodoc
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/prs_code.hxx b/autodoc/inc/autodoc/prs_code.hxx
deleted file mode 100644
index d02ce373..00000000
--- a/autodoc/inc/autodoc/prs_code.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 AUTODOC_PRS_CODE_HXX
-#define AUTODOC_PRS_CODE_HXX
-
-
-
-namespace csv
-{
- namespace ploc
- {
- class Path;
- }
-}
-
-namespace ary
-{
- class Repository;
-}
-
-namespace autodoc
-{
- class FileCollector_Ifc;
- class DocumentationParser_Ifc;
-
-
-
-
-/** Interface for parsing code of a programming language and
- delivering the information into an Autodoc Repository.
-**/
-class CodeParser_Ifc
-{
- public:
- virtual ~CodeParser_Ifc() {}
-
- virtual void Setup(
- ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc &
- i_rDocumentationInterpreter ) = 0;
-
- virtual void Run(
- const autodoc::FileCollector_Ifc &
- i_rFiles ) = 0;
-};
-
-
-
-
-} // namespace autodoc
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/prs_docu.hxx b/autodoc/inc/autodoc/prs_docu.hxx
deleted file mode 100644
index 5e60023c..00000000
--- a/autodoc/inc/autodoc/prs_docu.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSER_PRS_DOCU_HXX
-#define ADC_PARSER_PRS_DOCU_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-
-namespace autodoc
-{
-
-class TkpDocuContext;
-
-class DocumentationParser_Ifc
-{
- public:
- virtual ~DocumentationParser_Ifc() {}
-
- virtual DYN TkpDocuContext *
- Create_DocuContext() const = 0;
-};
-
-
-} // namespace autodoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/autodoc/x_parsing.hxx b/autodoc/inc/autodoc/x_parsing.hxx
deleted file mode 100644
index f7973095..00000000
--- a/autodoc/inc/autodoc/x_parsing.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 AUTODOC_X_PARSING_HXX
-#define AUTODOC_X_PARSING_HXX
-
-// USED SERVICES
-#include <iostream>
-
-
-
-
-namespace autodoc
-{
-
-class X_Parser_Ifc
-{
- public:
- // TYPES
- enum E_Event
- {
- x_Any = 0,
- x_InvalidChar,
- x_UnexpectedToken,
- x_UnexpectedEOF,
- x_UnspecifiedSyntaxError
- };
-
- // LIFECYCLE
- virtual ~X_Parser_Ifc() {}
-
- // INQUIRY
- virtual E_Event GetEvent() const = 0;
- virtual void GetInfo(
- std::ostream & o_rOutputMedium ) const = 0;
-};
-
-
-} // namespace autodoc
-
-std::ostream & operator<<(
- std::ostream & o_rOut,
- const autodoc::X_Parser_Ifc &
- i_rException );
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/display/corframe.hxx b/autodoc/inc/display/corframe.hxx
deleted file mode 100644
index 9945e2d5..00000000
--- a/autodoc/inc/display/corframe.hxx
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CORFRAME_HXX
-#define ADC_CORFRAME_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-class Html_Image;
-
-
-namespace display
-{
-
-
-class CorporateFrame
-{
- public:
- // LIFECYCLE
- virtual ~CorporateFrame() {}
-
- // INQUIRY
- virtual DYN Html_Image *
- LogoSrc() const = 0;
- virtual const char *
- LogoLink() const = 0;
- virtual const char *
- CopyrightText() const = 0;
-
- virtual const char *
- CssStyle() const = 0;
- virtual const char *
- CssStylesExplanation() const = 0;
- virtual const char *
- DevelopersGuideHtmlRoot() const = 0;
- virtual bool SimpleLinks() const = 0;
-
- // ACCESS
- virtual void Set_DevelopersGuideHtmlRoot(
- const String & i_directory ) = 0;
- virtual void Set_SimpleLinks() = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace display
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/parser/parser.hxx b/autodoc/inc/parser/parser.hxx
deleted file mode 100644
index a10e79d6..00000000
--- a/autodoc/inc/parser/parser.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSER_HXX
-#define ADC_PARSER_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace autodoc
-{
- class FileCollector_Ifc;
-}
-
-
-class CodeParser
-{
- public:
- virtual ~CodeParser() {}
-
- virtual void Run(
- const autodoc::FileCollector_Ifc &
- i_rFiles ) = 0;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/parser/parserinfo.hxx b/autodoc/inc/parser/parserinfo.hxx
deleted file mode 100644
index 44b5941f..00000000
--- a/autodoc/inc/parser/parserinfo.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSERINFO_HXX
-#define ADC_PARSERINFO_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-/** Interface about current state of parsing.
-*/
-class ParserInfo
-{
- public:
- // OPERATIONS
- void Set_CurFile(
- const String & i_file,
- bool i_bUseLines = false)
- { sCurFile = i_file;
- nCurLine = i_bUseLines ? 1 : 0; }
- void Increment_CurLine()
- { ++nCurLine; }
-
- // INQUIRY
- const String & CurFile() const { return sCurFile; }
- uintt CurLine() const { return nCurLine; }
-
- protected:
- // LIFECYCLE
- ParserInfo() : sCurFile(), nCurLine(0) {}
- ~ParserInfo() {}
- private:
- String sCurFile;
- uintt nCurLine;
-
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/inc/parser/unoidl.hxx b/autodoc/inc/parser/unoidl.hxx
deleted file mode 100644
index 3a5d7fcb..00000000
--- a/autodoc/inc/parser/unoidl.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UNOIDL_HXX
-#define ADC_UNOIDL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <parser/parser.hxx>
-#include <parser/parserinfo.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
- class Repository;
-}
-namespace autodoc
-{
- class FileCollector_Ifc;
-}
-
-namespace autodoc
-{
-
-
-class IdlParser : public ::CodeParser,
- public ::ParserInfo
-{
- public:
- IdlParser(
- ary::Repository & io_rRepository );
-
- virtual void Run(
- const autodoc::FileCollector_Ifc &
- i_rFiles );
-
- private:
- // DATA
- ary::Repository * pRepository;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace autodoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/prj/build.lst b/autodoc/prj/build.lst
deleted file mode 100644
index fd4d3f7c..00000000
--- a/autodoc/prj/build.lst
+++ /dev/null
@@ -1,67 +0,0 @@
-ar autodoc : cosv udm sal NULL
-ar autodoc usr1 - all ar_mkout NULL
-ar autodoc\inc get - all ar_i NULL
-ar autodoc\inc\ary get - all ar_ir NULL
-ar autodoc\inc\ary\cpp get - all ar_ir_cpp NULL
-ar autodoc\inc\ary\idl get - all ar_ir_idl NULL
-ar autodoc\inc\ary\info get - all ar_ir_info NULL
-ar autodoc\inc\ary\loc get - all ar_ir_loc NULL
-ar autodoc\inc\ary\task get - all ar_ir_task NULL
-ar autodoc\inc\ary_i get - all ar_ir_cinfo NULL
-ar autodoc\inc\autodoc get - all ar_iau NULL
-ar autodoc\inc\display get - all ar_idispl2 NULL
-ar autodoc\inc\parser get - all ar_iparse2 NULL
-ar autodoc\prj get - all ar_prj NULL
-ar autodoc\util get - all ar_util NULL
-ar autodoc\source get - all ar_s NULL
-ar autodoc\source\inc get - all ar_si NULL
-ar autodoc\source\inc\display get - all ar_si_display NULL
-ar autodoc\source\inc\oodb get - all ar_si_oodb2 NULL
-ar autodoc\source\inc\tools get - all ar_si_tools NULL
-ar autodoc\source\inc\utility get - all ar_si_util2 NULL
-ar autodoc\source\ary get - all ar_sr NULL
-ar autodoc\source\ary\inc get - all ar_sri NULL
-ar autodoc\source\ary\inc\cpp get - all ar_sri_cpp NULL
-ar autodoc\source\ary\inc\idl get - all ar_sri_idl NULL
-ar autodoc\source\ary\inc\loc get - all ar_sri_loc NULL
-ar autodoc\source\ary\inc\store get - all ar_sri_store NULL
-ar autodoc\source\ary\cpp nmake - all ar_sr_cpp NULL
-ar autodoc\source\ary\doc nmake - all ar_sr_doc NULL
-ar autodoc\source\ary\idl nmake - all ar_sr_idl NULL
-ar autodoc\source\ary\info nmake - all ar_sr_info NULL
-ar autodoc\source\ary\kernel nmake - all ar_sr_kernel NULL
-ar autodoc\source\ary\loc nmake - all ar_sr_loc NULL
-ar autodoc\source\ary_i get - all ar_sr_i NULL
-ar autodoc\source\ary_i\kernel nmake - all ar_sr_cinfo NULL
-ar autodoc\source\display get - all ar_sd NULL
-ar autodoc\source\display\inc get - all ar_sdi NULL
-ar autodoc\source\display\inc\funclist get - all ar_sdi_flist NULL
-ar autodoc\source\display\inc\html get - all ar_sdi_html NULL
-ar autodoc\source\display\html nmake - all ar_sd_html NULL
-ar autodoc\source\display\kernel nmake - all ar_sd_kernel NULL
-ar autodoc\source\display\idl nmake - all ar_sd_idl NULL
-ar autodoc\source\display\toolkit nmake - all ar_sd_tkit NULL
-ar autodoc\source\parser get - all ar_sp NULL
-ar autodoc\source\parser\inc get - all ar_spi NULL
-ar autodoc\source\parser\inc\adoc get - all ar_spi_adoc NULL
-ar autodoc\source\parser\inc\cpp get - all ar_spi_cpp NULL
-ar autodoc\source\parser\inc\semantic get - all ar_spi_sem NULL
-ar autodoc\source\parser\inc\tokens get - all ar_spi_tok NULL
-ar autodoc\source\parser\adoc nmake - all ar_sp_adoc NULL
-ar autodoc\source\parser\cpp nmake - all ar_sp_cpp NULL
-ar autodoc\source\parser\kernel nmake - all ar_sp_krnl NULL
-ar autodoc\source\parser\semantic nmake - all ar_sp_sem NULL
-ar autodoc\source\parser\tokens nmake - all ar_sp_tok NULL
-ar autodoc\source\parser_i get - all ar_sp2 NULL
-ar autodoc\source\parser_i\inc get - all ar_sp2i NULL
-ar autodoc\source\parser_i\inc\s2_dsapi get - all ar_sp2i_idoc NULL
-ar autodoc\source\parser_i\inc\s2_luidl get - all ar_sp2i_cpp NULL
-ar autodoc\source\parser_i\inc\semantic get - all ar_sp2i_sem NULL
-ar autodoc\source\parser_i\inc\tokens get - all ar_sp2i_tok NULL
-ar autodoc\source\parser_i\idl nmake - all ar_sp2_idl NULL
-ar autodoc\source\parser_i\idoc nmake - all ar_sp2_idoc NULL
-ar autodoc\source\parser_i\tokens nmake - all ar_sp2_tok NULL
-ar autodoc\source\tools nmake - all ar_st NULL
-ar autodoc\source\mkinc get - all ar_smk NULL
-ar autodoc\source\exes get - all ar_se NULL
-ar autodoc\source\exes\adc_uni nmake - all ar_se_uni ar_sr_cpp ar_sr_doc ar_sr_idl ar_sr_info ar_sr_kernel ar_sr_loc ar_sr_cinfo ar_sd_html ar_sd_kernel ar_sd_idl ar_sp_adoc ar_sp_cpp ar_sp_krnl ar_sp_sem ar_sp_tok ar_sp2_idl ar_sd_tkit ar_sp2_idoc ar_sp2_tok ar_st NULL
diff --git a/autodoc/prj/d.lst b/autodoc/prj/d.lst
deleted file mode 100644
index 99ad21da..00000000
--- a/autodoc/prj/d.lst
+++ /dev/null
@@ -1,3 +0,0 @@
-..\%__SRC%\bin\autodoc.exe %_DEST%\bin\autodoc.exe
-..\%__SRC%\bin\autodoc %_DEST%\bin\autodoc
-
diff --git a/autodoc/source/ary/cpp/c_builtintype.cxx b/autodoc/source/ary/cpp/c_builtintype.cxx
deleted file mode 100644
index 54ed015d..00000000
--- a/autodoc/source/ary/cpp/c_builtintype.cxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_builtintype.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_type.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-
-//********************** Type **************************//
-Rid
-Type::inq_RelatedCe() const
-{
- return 0;
-}
-
-
-//********************** BuiltInType **************************//
-
-BuiltInType::BuiltInType( const String & i_sName,
- E_TypeSpecialisation i_eSpecialisation )
- : sName( i_sName ),
- eSpecialisation( i_eSpecialisation )
-{
-}
-
-String
-BuiltInType::SpecializedName_( const char * i_sName,
- E_TypeSpecialisation i_eTypeSpecialisation )
-{
- StreamLock
- aStrLock(60);
- StreamStr &
- ret = aStrLock();
-
- switch ( i_eTypeSpecialisation )
- {
- case TYSP_unsigned:
- ret << "u_";
- break;
- case TYSP_signed:
- if (strcmp(i_sName,"char") == 0)
- ret << "s_";
- break;
- default:
- ;
-
- } // end switch
-
- ret << i_sName;
- return String(ret.c_str());
-}
-
-void
-BuiltInType::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ary::ClassId
-BuiltInType::get_AryClass() const
-{
- return class_id;
-}
-
-bool
-BuiltInType::inq_IsConst() const
-{
- return false;
-}
-
-void
-BuiltInType::inq_Get_Text( StreamStr & , // o_rPreName
- StreamStr & o_rName,
- StreamStr & , // o_rPostName
- const Gate & ) const // i_rGate
-{
- switch (eSpecialisation)
- {
- case TYSP_unsigned: o_rName << "unsigned "; break;
- case TYSP_signed: o_rName << "signed "; break;
-
- default: // Does nothing.
- ;
- }
- o_rName << sName;
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_class.cxx b/autodoc/source/ary/cpp/c_class.cxx
deleted file mode 100644
index 78c9cc5c..00000000
--- a/autodoc/source/ary/cpp/c_class.cxx
+++ /dev/null
@@ -1,287 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_class.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <slots.hxx>
-#include "c_slots.hxx"
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Class::Class( const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- loc::Le_id i_nFile,
- E_ClassKey i_eClassKey )
- : aEssentials( i_sLocalName,
- i_nOwner,
- i_nFile ),
- aAssignedNode(),
- aBaseClasses(),
- aTemplateParameterTypes(),
- aClasses(),
- aEnums(),
- aTypedefs(),
- aOperations(),
- aStaticOperations(),
- aData(),
- aStaticData(),
- aFriendClasses(),
- aFriendOperations(),
- aKnownDerivatives(),
- eClassKey(i_eClassKey),
- eProtection(i_eProtection),
- eVirtuality(VIRTUAL_none)
-{
- aAssignedNode.Assign_Entity(*this);
-}
-
-Class::~Class()
-{
-}
-
-void
-Class::Add_BaseClass( const S_Classes_Base & i_rBaseClass )
-{
- aBaseClasses.push_back(i_rBaseClass);
-}
-
-void
-Class::Add_TemplateParameterType( const String & i_sLocalName,
- Type_id i_nIdAsType )
-{
- aTemplateParameterTypes.push_back(
- List_TplParam::value_type(i_sLocalName,i_nIdAsType) );
-}
-
-void
-Class::Add_LocalClass( const String & i_sLocalName,
- Cid i_nId )
-{
- aClasses.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-void
-Class::Add_LocalEnum( const String & i_sLocalName,
- Cid i_nId )
-{
- aEnums.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-void
-Class::Add_LocalTypedef( const String & i_sLocalName,
- Cid i_nId )
-{
- aTypedefs.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-void
-Class::Add_LocalOperation( const String & i_sLocalName,
- Cid i_nId )
-{
- aOperations.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-void
-Class::Add_LocalStaticOperation( const String & i_sLocalName,
- Cid i_nId )
-{
- aStaticOperations.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-void
-Class::Add_LocalData( const String & i_sLocalName,
- Cid i_nId )
-{
- aData.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-void
-Class::Add_LocalStaticData( const String & i_sLocalName,
- Cid i_nId )
-{
- aStaticData.push_back( S_LocalCe(i_sLocalName, i_nId) );
-}
-
-
-struct find_name
-{
- find_name(
- const String & i_name )
- : sName(i_name) {}
-
- bool operator()(
- const S_LocalCe & i_lce ) const
- { return i_lce.sLocalName == sName; }
- private:
- String sName;
-};
-
-Ce_id
-Class::Search_Child(const String & i_key) const
-{
- Ce_id
- ret = Ce_id(Search_LocalClass(i_key));
- if (ret.IsValid())
- return ret;
-
- CIterator_Locals
- itret = std::find_if(aEnums.begin(), aEnums.end(), find_name(i_key));
- if (itret != aEnums.end())
- return (*itret).nId;
- itret = std::find_if(aTypedefs.begin(), aTypedefs.end(), find_name(i_key));
- if (itret != aTypedefs.end())
- return (*itret).nId;
- itret = std::find_if(aData.begin(), aData.end(), find_name(i_key));
- if (itret != aData.end())
- return (*itret).nId;
- itret = std::find_if(aStaticData.begin(), aStaticData.end(), find_name(i_key));
- if (itret != aStaticData.end())
- return (*itret).nId;
- return Ce_id(0);
-}
-
-Rid
-Class::Search_LocalClass( const String & i_sName ) const
-{
- CIterator_Locals itFound = PosOfName(aClasses, i_sName);
- if (itFound != aClasses.end())
- return (*itFound).nId.Value();
- return 0;
-}
-
-const String &
-Class::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-Class::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-loc::Le_id
-Class::inq_Location() const
-{
- return aEssentials.Location();
-}
-
-void
-Class::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Class::get_AryClass() const
-{
- return class_id;
-}
-
-Gid
-Class::inq_Id_Group() const
-{
- return static_cast<Gid>(Id());
-}
-
-const ary::cpp::CppEntity &
-Class::inq_RE_Group() const
-{
- return *this;
-}
-
-const group::SlotList &
-Class::inq_Slots() const
-{
- static const SlotAccessId aProjectSlotData[]
- = { SLOT_Bases,
- SLOT_NestedClasses,
- SLOT_Enums,
- SLOT_Typedefs,
- SLOT_Operations,
- SLOT_StaticOperations,
- SLOT_Data,
- SLOT_StaticData,
- SLOT_FriendClasses,
- SLOT_FriendOperations };
- static const std::vector< SlotAccessId >
- aSlots( &aProjectSlotData[0],
- &aProjectSlotData[0]
- + sizeof aProjectSlotData / sizeof (SlotAccessId) );
- return aSlots;
-}
-
-
-DYN Slot *
-Class::inq_Create_Slot( SlotAccessId i_nSlot ) const
-{
- switch ( i_nSlot )
- {
- case SLOT_Bases: return new Slot_BaseClass(aBaseClasses);
- case SLOT_NestedClasses: return new Slot_ListLocalCe(aClasses);
- case SLOT_Enums: return new Slot_ListLocalCe(aEnums);
- case SLOT_Typedefs: return new Slot_ListLocalCe(aTypedefs);
- case SLOT_Operations: return new Slot_ListLocalCe(aOperations);
- case SLOT_StaticOperations: return new Slot_ListLocalCe(aStaticOperations);
- case SLOT_Data: return new Slot_ListLocalCe(aData);
- case SLOT_StaticData: return new Slot_ListLocalCe(aStaticData);
- case SLOT_FriendClasses: return new Slot_SequentialIds<Ce_id>(aFriendClasses);
- case SLOT_FriendOperations: return new Slot_SequentialIds<Ce_id>(aFriendOperations);
- default:
- return new Slot_Null;
- } // end switch
-}
-
-Class::CIterator_Locals
-Class::PosOfName( const List_LocalCe & i_rList,
- const String & i_sName ) const
-{
- for ( CIterator_Locals ret = i_rList.begin();
- ret != i_rList.end();
- ++ret )
- {
- if ( (*ret).sLocalName == i_sName )
- return ret;
- }
- return i_rList.end();
-}
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_de.cxx b/autodoc/source/ary/cpp/c_de.cxx
deleted file mode 100644
index 1d9e9d7b..00000000
--- a/autodoc/source/ary/cpp/c_de.cxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_de.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-DefineEntity::DefineEntity( const String & i_name,
- loc::Le_id i_declaringFile )
- : sName(i_name),
- nLocation(i_declaringFile)
-{
-}
-
-
-
-
-} // end namespace cpp
-} // end namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_define.cxx b/autodoc/source/ary/cpp/c_define.cxx
deleted file mode 100644
index 33f3bdbb..00000000
--- a/autodoc/source/ary/cpp/c_define.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_define.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <prprpr.hxx>
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-Define::Define( const String & i_name,
- const StringVector & i_definition,
- loc::Le_id i_declaringFile)
- : DefineEntity(i_name, i_declaringFile),
- aDefinition(i_definition)
-{
-}
-
-Define::~Define()
-{
-}
-
-void
-Define::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Define::get_AryClass() const
-{
- return class_id;
-}
-
-const StringVector &
-Define::inq_DefinitionText() const
-{
- return aDefinition;
-}
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_enum.cxx b/autodoc/source/ary/cpp/c_enum.cxx
deleted file mode 100644
index 5e2983fe..00000000
--- a/autodoc/source/ary/cpp/c_enum.cxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_enum.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <slots.hxx>
-#include "c_slots.hxx"
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Enum::Enum( const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- Lid i_nFile )
- : aEssentials( i_sLocalName,
- i_nOwner,
- i_nFile ),
- aValues(),
- eProtection(i_eProtection)
-{
-}
-
-Enum::~Enum()
-{
-}
-
-void
-Enum::Add_Value( Ce_id i_nId )
-{
- aValues.Add( i_nId );
-}
-
-const String &
-Enum::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-Enum::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-Lid
-Enum::inq_Location() const
-{
- return aEssentials.Location();
-}
-
-void
-Enum::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Enum::get_AryClass() const
-{
- return class_id;
-}
-
-Gid
-Enum::inq_Id_Group() const
-{
- return static_cast<Gid>(Id());
-}
-
-const ary::cpp::CppEntity &
-Enum::inq_RE_Group() const
-{
- return *this;
-}
-
-const group::SlotList &
-Enum::inq_Slots() const
-{
- static const SlotAccessId aProjectSlotData[]
- = { SLOT_Values };
- static const std::vector< SlotAccessId >
- aSlots( &aProjectSlotData[0],
- &aProjectSlotData[0]
- + sizeof aProjectSlotData / sizeof (SlotAccessId) );
- return aSlots;
-}
-
-DYN Slot *
-Enum::inq_Create_Slot( SlotAccessId i_nSlot ) const
-{
- switch ( i_nSlot )
- {
- case SLOT_Values: return new Slot_SequentialIds<Ce_id>(aValues);
- default:
- return new Slot_Null;
- } // end switch
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_enuval.cxx b/autodoc/source/ary/cpp/c_enuval.cxx
deleted file mode 100644
index 66017f23..00000000
--- a/autodoc/source/ary/cpp/c_enuval.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_enuval.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-EnumValue::EnumValue( const String & i_sLocalName,
- Ce_id i_nOwner,
- String i_sInitialisation )
- : aEssentials( i_sLocalName,
- i_nOwner,
- Lid(0) ),
- sInitialisation(i_sInitialisation)
-{
-}
-
-EnumValue::~EnumValue()
-{
-}
-
-const String &
-EnumValue::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-EnumValue::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-Lid
-EnumValue::inq_Location() const
-{
- return aEssentials.Location();
-}
-
-void
-EnumValue::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-EnumValue::get_AryClass() const
-{
- return class_id;
-}
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_funct.cxx b/autodoc/source/ary/cpp/c_funct.cxx
deleted file mode 100644
index 73bb4fc2..00000000
--- a/autodoc/source/ary/cpp/c_funct.cxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_funct.hxx>
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include <algorithm>
-#include <ary/cpp/c_funct.hxx>
-
-
-
-
-
-namespace
-{
-using namespace ::ary::cpp;
-
-
-class Parameter_2_NonTypeParamInfo
-{
- public:
- String operator()(
- const S_Parameter & i_rParam ) const;
-};
-
-class Parameter_2_Type
-{
- public:
- Type_id operator()(
- const S_Parameter & i_rParam ) const
- { return i_rParam.nType; }
-};
-
-/** @return
- A vector with Strings like this:
- "ParamName" or "ParamName[ArraySize]" or "ParamName = InitValue".
-*/
-StringVector Create_NonTypeParameterInfos(
- const std::vector<S_Parameter> &
- i_rParameters );
-/** @return
- A vector of the parameters' type ids.
-*/
-std::vector<Type_id>
- Create_ParameterTypeList(
- const std::vector<S_Parameter> &
- i_rParameters );
-
-} // namspace anonymous
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Function::Function( const String & i_sLocalName,
- Ce_id i_nOwner,
- E_Protection i_eProtection,
- Lid i_nFile,
- Type_id i_nReturnType,
- const std::vector<S_Parameter> &
- i_parameters,
- E_ConVol i_conVol,
- E_Virtuality i_eVirtuality,
- FunctionFlags i_aFlags,
- bool i_bThrowExists,
- const std::vector<Type_id> &
- i_rExceptions )
- : aEssentials( i_sLocalName,
- i_nOwner,
- i_nFile ),
- aTemplateParameterTypes(),
- aSignature( Create_ParameterTypeList(i_parameters),
- i_conVol ),
- nReturnType(i_nReturnType),
- eProtection(i_eProtection),
- eVirtuality(i_eVirtuality),
- aFlags(i_aFlags),
- aParameterInfos( Create_NonTypeParameterInfos(i_parameters) ),
- pExceptions( i_bThrowExists ? new ExceptionTypeList(i_rExceptions) : 0 )
-{
-}
-
-Function::~Function()
-{
-}
-
-bool
-Function::IsIdentical( const Function & i_f ) const
-{
- return
- LocalName() == i_f.LocalName()
- AND
- Owner() == i_f.Owner()
- AND
- aSignature == i_f.aSignature
- AND
- nReturnType == i_f.nReturnType
- AND
- eProtection == i_f.eProtection
- AND
- eVirtuality == i_f.eVirtuality
- AND
- aFlags == i_f.aFlags
- AND
- ( ( NOT pExceptions AND NOT i_f.pExceptions )
- OR
- ( pExceptions AND i_f.pExceptions
- ? *pExceptions == *i_f.pExceptions
- : false )
- )
- AND
- aTemplateParameterTypes.size() == i_f.aTemplateParameterTypes.size();
-}
-
-void
-Function::Add_TemplateParameterType( const String & i_sLocalName,
- Type_id i_nIdAsType )
-{
- aTemplateParameterTypes.push_back(
- List_TplParam::value_type(i_sLocalName, i_nIdAsType) );
-}
-
-
-const String &
-Function::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-Function::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-Lid
-Function::inq_Location() const
-{
- return aEssentials.Location();
-}
-
-void
-Function::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Function::get_AryClass() const
-{
- return class_id;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-
-
-namespace
-{
-
-String
-Parameter_2_NonTypeParamInfo::operator()( const ary::cpp::S_Parameter & i_rParam ) const
-{
- static StreamStr aParamName_(1020);
- aParamName_.seekp(0);
-
- aParamName_ << i_rParam.sName;
- if ( i_rParam.sSizeExpression.length() > 0 )
- {
- aParamName_ << '['
- << i_rParam.sSizeExpression
- << ']';
- }
- if ( i_rParam.sInitExpression.length() > 0 )
- {
- aParamName_ << " = "
- << i_rParam.sInitExpression;
- }
-
- return aParamName_.c_str();
-}
-
-
-StringVector
-Create_NonTypeParameterInfos( const std::vector<S_Parameter> & i_rParameters )
-{
- static Parameter_2_NonTypeParamInfo
- aTransformFunction_;
-
- StringVector
- ret(i_rParameters.size(), String::Null_());
- std::transform( i_rParameters.begin(), i_rParameters.end(),
- ret.begin(),
- aTransformFunction_ );
- return ret;
-}
-
-std::vector<Type_id>
-Create_ParameterTypeList( const std::vector<S_Parameter> & i_rParameters )
-{
- static Parameter_2_Type
- aTransformFunction_;
-
- std::vector<Type_id>
- ret(i_rParameters.size(), Type_id(0));
- std::transform( i_rParameters.begin(), i_rParameters.end(),
- ret.begin(),
- aTransformFunction_ );
- return ret;
-}
-
-
-
-
-} // namespace anonymous
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_macro.cxx b/autodoc/source/ary/cpp/c_macro.cxx
deleted file mode 100644
index febe4bd7..00000000
--- a/autodoc/source/ary/cpp/c_macro.cxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_macro.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <prprpr.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-Macro::Macro( const String & i_name,
- const StringVector & i_params,
- const StringVector & i_definition,
- loc::Le_id i_declaringFile )
- : DefineEntity(i_name, i_declaringFile),
- aParams(i_params),
- aDefinition(i_definition)
-{
-}
-
-Macro::~Macro()
-{
-}
-
-void
-Macro::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Macro::get_AryClass() const
-{
- return class_id;
-
- // return RCID_MACRO;
-}
-
-const StringVector &
-Macro::inq_DefinitionText() const
-{
- return aDefinition;
-}
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_namesp.cxx b/autodoc/source/ary/cpp/c_namesp.cxx
deleted file mode 100644
index adea5dad..00000000
--- a/autodoc/source/ary/cpp/c_namesp.cxx
+++ /dev/null
@@ -1,295 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_namesp.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <algorithm>
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/getncast.hxx>
-#include <slots.hxx>
-#include "c_slots.hxx"
-
-
-namespace ary
-{
-namespace cpp
-{
-
-typedef std::multimap<String, Ce_id>::const_iterator operations_citer;
-
-Namespace::Namespace()
- : aEssentials(),
- aAssignedNode(),
- // aLocalNamespaces,
- // aLocalClasses,
- // aLocalEnums,
- // aLocalTypedefs,
- // aLocalOperations,
- // aLocalVariables,
- // aLocalConstants,
- pParent(0),
- nDepth(0)
-{
- aAssignedNode.Assign_Entity(*this);
-}
-
-Namespace::Namespace( const String & i_sLocalName,
- Namespace & i_rParent )
- : aEssentials( i_sLocalName,
- i_rParent.CeId(),
- Lid(0) ),
- aAssignedNode(),
- // aLocalNamespaces,
- // aLocalClasses,
- // aLocalEnums,
- // aLocalTypedefs,
- // aLocalOperations,
- // aLocalVariables,
- // aLocalConstants,
- pParent(&i_rParent),
- nDepth(i_rParent.Depth()+1)
-{
- aAssignedNode.Assign_Entity(*this);
-}
-
-Namespace::~Namespace()
-{
-}
-
-void
-Namespace::Add_LocalNamespace( DYN Namespace & io_rLocalNamespace )
-{
- aLocalNamespaces[io_rLocalNamespace.LocalName()] = &io_rLocalNamespace;
-}
-
-void
-Namespace::Add_LocalClass( const String & i_sLocalName,
- Cid i_nId )
-{
- aLocalClasses[i_sLocalName] = i_nId;
-}
-
-void
-Namespace::Add_LocalEnum( const String & i_sLocalName,
- Cid i_nId )
-{
- aLocalEnums[i_sLocalName] = i_nId;
-}
-
-void
-Namespace::Add_LocalTypedef( const String & i_sLocalName,
- Cid i_nId )
-{
- aLocalTypedefs[i_sLocalName] = i_nId;
-}
-
-void
-Namespace::Add_LocalOperation( const String & i_sLocalName,
- Cid i_nId )
-{
- aLocalOperations.insert( Map_Operations::value_type(i_sLocalName, i_nId) );
-}
-
-
-void
-Namespace::Add_LocalVariable( const String & i_sLocalName,
- Cid i_nId )
-{
- aLocalVariables[i_sLocalName] = i_nId;
-}
-
-void
-Namespace::Add_LocalConstant( const String & i_sLocalName,
- Cid i_nId )
-{
- aLocalConstants[i_sLocalName] = i_nId;
-}
-
-uintt
-Namespace::Depth() const
-{
- return nDepth;
-}
-
-Namespace *
-Namespace::Parent() const
-{
- return pParent;
-}
-
-Ce_id
-Namespace::Search_Child(const String & i_key) const
-{
- Namespace *
- ret_nsp = Search_LocalNamespace(i_key);
- if (ret_nsp != 0)
- return ret_nsp->CeId();
-
- Ce_id
- ret = Search_LocalClass(i_key);
- if (ret.IsValid())
- return ret;
-
- ret = csv::value_from_map(aLocalEnums, i_key, Ce_id(0));
- if (ret.IsValid())
- return ret;
- ret = csv::value_from_map(aLocalTypedefs, i_key, Ce_id(0));
- if (ret.IsValid())
- return ret;
- ret = csv::value_from_map(aLocalVariables, i_key, Ce_id(0));
- if (ret.IsValid())
- return ret;
- return csv::value_from_map(aLocalConstants, i_key, Ce_id(0));
-}
-
-Namespace *
-Namespace::Search_LocalNamespace( const String & i_sLocalName ) const
-{
- return csv::value_from_map(aLocalNamespaces, i_sLocalName, (Namespace*)(0));
-}
-
-uintt
-Namespace::Get_SubNamespaces( std::vector< const Namespace* > & o_rResultList ) const
-{
- for ( Map_NamespacePtr::const_iterator it = aLocalNamespaces.begin();
- it != aLocalNamespaces.end();
- ++it )
- {
- o_rResultList.push_back( (*it).second );
- }
- return o_rResultList.size();
-}
-
-Ce_id
-Namespace::Search_LocalClass( const String & i_sName ) const
-{
- return csv::value_from_map(aLocalClasses, i_sName, Ce_id(0));
-}
-
-void
-Namespace::Search_LocalOperations( std::vector<Ce_id> & o_result,
- const String & i_sName ) const
-{
- operations_citer
- itLower = aLocalOperations.lower_bound(i_sName);
- if (itLower == aLocalOperations.end())
- return;
- if ( (*itLower).first != i_sName )
- return;
-
- for ( operations_citer it = itLower;
- it != aLocalOperations.end() ? (*itLower).first == i_sName : false;
- ++it )
- {
- o_result.push_back((*it).second);
- }
-}
-
-
-const String &
-Namespace::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-Namespace::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-Lid
-Namespace::inq_Location() const
-{
- return Lid(0);
-}
-
-void
-Namespace::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Namespace::get_AryClass() const
-{
- return class_id;
-}
-
-Gid
-Namespace::inq_Id_Group() const
-{
- return static_cast<Gid>(Id());
-}
-
-const ary::cpp::CppEntity &
-Namespace::inq_RE_Group() const
-{
- return *this;
-}
-
-const ary::group::SlotList &
-Namespace::inq_Slots() const
-{
- static const SlotAccessId aProjectSlotData[]
- = { SLOT_SubNamespaces, SLOT_Classes, SLOT_Enums, SLOT_Typedefs, SLOT_Operations,
- SLOT_Variables, SLOT_Constants };
- static const std::vector< SlotAccessId >
- aSlots( &aProjectSlotData[0],
- &aProjectSlotData[0]
- + sizeof aProjectSlotData / sizeof (SlotAccessId) );
- return aSlots;
-}
-
-DYN Slot *
-Namespace::inq_Create_Slot( SlotAccessId i_nSlot ) const
-{
- switch ( i_nSlot )
- {
- case SLOT_SubNamespaces: return new Slot_SubNamespaces(aLocalNamespaces);
- case SLOT_Classes: return new Slot_MapLocalCe(aLocalClasses);
- case SLOT_Enums: return new Slot_MapLocalCe(aLocalEnums);
- case SLOT_Typedefs: return new Slot_MapLocalCe(aLocalTypedefs);
- case SLOT_Operations: return new Slot_MapOperations(aLocalOperations);
- case SLOT_Variables: return new Slot_MapLocalCe(aLocalVariables);
- case SLOT_Constants: return new Slot_MapLocalCe(aLocalConstants);
- default:
- return new Slot_Null;
- } // end switch
-}
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_osigna.cxx b/autodoc/source/ary/cpp/c_osigna.cxx
deleted file mode 100644
index ebb5d6a3..00000000
--- a/autodoc/source/ary/cpp/c_osigna.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_osigna.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-OperationSignature::OperationSignature( std::vector<Type_id> i_parameterTypes,
- E_ConVol i_conVol )
- : aParameterTypes(i_parameterTypes),
- eConVol(i_conVol)
-{
-}
-
-int
-OperationSignature::Compare( const OperationSignature & i_rSig ) const
-{
- if ( aParameterTypes.size() < i_rSig.aParameterTypes.size() )
- return -1;
- else if ( i_rSig.aParameterTypes.size() < aParameterTypes.size() )
- return 1;
-
- ParameterTypeList::const_iterator iMe = aParameterTypes.begin();
- ParameterTypeList::const_iterator iOther = i_rSig.aParameterTypes.begin();
- for ( ; iMe != aParameterTypes.end(); ++iMe, ++iOther )
- {
- if ( *iMe < *iOther )
- return -1;
- else if ( *iOther < *iMe )
- return 1;
- }
-
- if ( eConVol < i_rSig.eConVol )
- return -1;
- else if ( eConVol != i_rSig.eConVol )
- return 1;
-
- return 0;
-}
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_reposypart.cxx b/autodoc/source/ary/cpp/c_reposypart.cxx
deleted file mode 100644
index f0e989d7..00000000
--- a/autodoc/source/ary/cpp/c_reposypart.cxx
+++ /dev/null
@@ -1,526 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "c_reposypart.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/getncast.hxx>
-#include <ary/namesort.hxx>
-#include <ary/cpp/c_builtintype.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_cppentity.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/usedtype.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <ary/getncast.hxx>
-#include <loc_internalgate.hxx>
-#include <reposy.hxx>
-#include "ca_ce.hxx"
-#include "ca_def.hxx"
-#include "ca_type.hxx"
-#include "cs_ce.hxx"
-#include "cs_def.hxx"
-#include "cs_type.hxx"
-
-
-
-namespace
-{
-
-using ::ary::GlobalId;
-using ::ary::Rid;
-using namespace ::ary::cpp;
-
-
-inline bool
-IsDefine( const GlobalId & i_id )
-{
- return i_id.Class() == Define::class_id
- OR
- i_id.Class() == Macro::class_id;
-}
-
-
-/// Find Ces
-class TypeConnector
-{
- public:
- TypeConnector(
- Gate & i_gate )
- : pGate(&i_gate) {}
- ~TypeConnector() {}
-
- void operator()(
- Type & io_rType ) const;
- private:
- // DATA
- Gate * pGate;
-};
-
-/// Find Ces only known from base class name scope.
-class TypeConnector2ndTry
-{
- public:
- TypeConnector2ndTry(
- Gate & i_gate )
- : pGate(&i_gate) {}
- ~TypeConnector2ndTry() {}
-
- void operator()(
- Type & io_rType ) const;
- private:
- // DATA
- Gate * pGate;
-};
-
-/// Reconnect (in both directions) base-derived relations of classes.
-class HierarchyLinker
-{
- public:
- HierarchyLinker(
- Gate & i_gate )
- : pGate(&i_gate) {}
-
- ~HierarchyLinker() {}
-
- void operator()(
- Class & io_rCe ) const;
- private:
- // DATA
- Gate * pGate;
-};
-
-
-
-/// Helper functor for ->RepositoryPartition::Get_AlphabeticalList().
-template <class TRAITS>
-struct MakeGlobalId
-{
- GlobalId operator()(
- typename TRAITS::id_type
- i_id ) const
- {
- return GlobalId( TRAITS::EntityOf_(i_id).AryClass(),
- i_id.Value() );
- }
-};
-
-
-
-
-/** Compare two {->GlobalId}s.
-
-
- @todo Move this up to the definition of GlobalId<>.
-*/
-struct LesserGlobal
-{
- LesserGlobal(
- const Ce_Storage & i_ces,
- const Def_Storage & i_des )
- : rCes(i_ces), rDes(i_des) {}
-
- bool operator()(
- GlobalId i_1,
- GlobalId i_2 ) const;
-
- private:
- const String & NameOf(
- GlobalId i_id ) const;
- // DATA
- const Ce_Storage & rCes;
- const Def_Storage & rDes;
- ::ary::LesserName aLess;
-};
-
-
-bool
-LesserGlobal::operator()( GlobalId i_1,
- GlobalId i_2 ) const
- {
- String s1 = NameOf(i_1);
- String s2 = NameOf(i_2);
-
- if (s1 != s2)
- return aLess(s1, s2);
-
- if ( IsDefine(i_1) != IsDefine(i_2) )
- {
- return NOT IsDefine(i_2);
- }
- else if (IsDefine(i_1))
- {
- return i_1.Class() < i_2.Class();
- }
-
- return Ce_GlobalCompare::Lesser_(
- rCes[i_1.Id()],
- rCes[i_2.Id()] );
- }
-
-
-} // namespace anonymous
-
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-DYN InternalGate &
-InternalGate::Create_Partition_(RepositoryCenter & i_center)
-{
- return *new RepositoryPartition(i_center);
-}
-
-
-RepositoryPartition::RepositoryPartition(RepositoryCenter & i_center)
- : pRepositoryCenter(&i_center),
- pCes(0),
- pTypes(0),
- pDefs(0),
- pLocations(& loc::InternalGate::Create_Locations_())
-{
- pCes = new CeAdmin(*this);
- pTypes = new TypeAdmin(*this);
- pDefs = new DefAdmin(*this);
- pCes->Set_Related(*pTypes);
-}
-
-RepositoryPartition::~RepositoryPartition()
-{
-}
-
-void
-RepositoryPartition::Calculate_AllSecondaryInformation()
-// const ::autodoc::Options & )
-{
- // KORR_FUTURE
- // Forward the options from here.
-
- Connect_AllTypes_2_TheirRelated_CodeEntites();
-}
-
-const String &
-RepositoryPartition::RepositoryTitle() const
-{
- return static_cast< ary::Repository* >(pRepositoryCenter)->Title();
-}
-
-const CodeEntity *
-RepositoryPartition::Search_RelatedCe(Type_id i_type) const
-{
- if (NOT i_type.IsValid())
- return 0;
-
- Ce_id
- ce_id = pTypes->Find_Type(i_type).RelatedCe();
- return ce_id.IsValid()
- ? & pCes->Find_Ce(ce_id)
- : (CodeEntity*)(0);
-}
-
-const ::ary::cpp::CppEntity *
-RepositoryPartition::Search_Entity(GlobalId i_id) const
-{
- if (i_id.Id() == 0)
- return 0;
-
- if ( NOT IsDefine(i_id) )
- {
- // Shall make sure this is a C++ CodeEntity:
- csv_assert( i_id.Class() >= Namespace::class_id
- AND
- i_id.Class() < BuiltInType::class_id
- && "Unexpected entity type in cpp::RepositoryPartition"
- "::Search_Entity()." );
- return & Ces().Find_Ce( Ce_id(i_id.Id()) );
- }
- else
- {
- return & Defs().Find_Def( De_id(i_id.Id()) );
- }
-}
-
-
-const CePilot &
-RepositoryPartition::Ces() const
-{
- csv_assert(pCes != 0);
- return *pCes;
-}
-
-const DefPilot &
-RepositoryPartition::Defs() const
-{
- csv_assert(pDefs != 0);
- return *pDefs;
-}
-
-const TypePilot &
-RepositoryPartition::Types() const
-{
- csv_assert(pTypes != 0);
- return *pTypes;
-}
-
-const loc::LocationPilot &
-RepositoryPartition::Locations() const
-{
- csv_assert(pLocations != 0);
- return *pLocations;
-}
-
-CePilot &
-RepositoryPartition::Ces()
-{
- csv_assert(pCes != 0);
- return *pCes;
-}
-
-DefPilot &
-RepositoryPartition::Defs()
-{
- csv_assert(pDefs != 0);
- return *pDefs;
-}
-
-TypePilot &
-RepositoryPartition::Types()
-{
- csv_assert(pTypes != 0);
- return *pTypes;
-}
-
-loc::LocationPilot &
-RepositoryPartition::Locations()
-{
- csv_assert(pLocations != 0);
- return *pLocations;
-}
-
-
-void
-RepositoryPartition::Connect_AllTypes_2_TheirRelated_CodeEntites()
-{
- TypeConnector
- aConnector(*this);
- std::for_each( pTypes->Storage().BeginUnreserved(),
- pTypes->Storage().End(),
- aConnector );
-
- typedef ::ary::stg::filter_iterator<CodeEntity,Class>
- filter_class_iter;
-
- HierarchyLinker
- aHierarchyLinker(*this);
- filter_class_iter itEnd( pCes->Storage().End() );
- for ( filter_class_iter it( pCes->Storage().BeginUnreserved() );
- it != itEnd;
- ++it )
- {
- if (NOT it.IsValid())
- continue;
-
- if (is_type<Class>(*it))
- aHierarchyLinker(ary_cast<Class>(*it));
- }
-
- TypeConnector2ndTry
- aConnector2ndTry(*this);
- std::for_each( pTypes->Storage().BeginUnreserved(),
- pTypes->Storage().End(),
- aConnector2ndTry );
-}
-
-template <class COMPARE>
-void Add2Result(
- List_GlobalIds & o_result,
- const SortedIds<COMPARE> &
- i_data,
- const char * i_begin,
- const char * i_end );
-template <class COMPARE>
-void
-Add2Result( List_GlobalIds & o_result,
- const SortedIds<COMPARE> & i_data,
- const char * i_begin,
- const char * i_end )
-{
- const size_t
- previous_size = o_result.size();
- typename std::vector<typename COMPARE::id_type>::const_iterator
- it_beg = i_data.LowerBound(i_begin);
- typename std::vector<typename COMPARE::id_type>::const_iterator
- it_end = i_data.LowerBound(i_end);
- size_t
- count_added = static_cast<size_t>( std::distance(it_beg,it_end) );
- o_result.insert( o_result.end(),
- count_added,
- GlobalId() );
- List_GlobalIds::iterator
- it_out = o_result.begin() + previous_size;
- std::transform( it_beg, it_end,
- it_out,
- MakeGlobalId<COMPARE>() );
-}
-
-
-uintt
-RepositoryPartition::Get_AlphabeticalList( List_GlobalIds & o_result,
- const char * i_begin,
- const char * i_end ) const
-{
- size_t
- ret = o_result.size();
-
- const Ce_Storage &
- ce_storage = pCes->Storage();
- const Def_Storage &
- def_storage = pDefs->Storage();
-
- Add2Result( o_result,
- ce_storage.TypeIndex(),
- i_begin, i_end );
- Add2Result( o_result,
- ce_storage.OperationIndex(),
- i_begin, i_end );
- Add2Result( o_result,
- ce_storage.DataIndex(),
- i_begin, i_end );
- Add2Result( o_result,
- def_storage.DefineIndex(),
- i_begin, i_end );
- Add2Result( o_result,
- def_storage.MacroIndex(),
- i_begin, i_end );
-
- LesserGlobal
- aLess(ce_storage, def_storage);
-
- std::sort(o_result.begin(), o_result.end(), aLess);
-
- return o_result.size() - ret;
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-
-
-
-
-
-namespace
-{
-
-
-void
-TypeConnector::operator()( Type & io_rType ) const
-{
- csv_assert(pGate != 0);
- UsedType *
- pt = ::ary::ary_cast<UsedType>(&io_rType);
- if (pt != 0)
- pt->Connect2Ce(pGate->Ces());
-}
-
-void
-TypeConnector2ndTry::operator()( Type & io_rType ) const
-{
- csv_assert(pGate != 0);
- UsedType *
- pt = ::ary::ary_cast<UsedType>(&io_rType);
- if (pt != 0)
- pt->Connect2CeOnlyKnownViaBaseClass(*pGate);
-}
-
-void
-HierarchyLinker::operator()( Class & io_rCe ) const
-{
- csv_assert( ::ary::is_type<Class>(io_rCe) );
- Class &
- rClass = io_rCe;
-
- for ( List_Bases::const_iterator it = rClass.BaseClasses().begin();
- it != rClass.BaseClasses().end();
- ++it )
- {
- const CodeEntity *
- pCe = 0;
- Type_id
- nTid = (*it).nId;
- for ( pCe = pGate->Search_RelatedCe(nTid);
- ary::ary_cast<Typedef>(pCe) != 0;
- pCe = pGate->Search_RelatedCe(nTid) )
- {
- nTid = static_cast< const Typedef* >(pCe)->DescribingType();
- }
- const Class *
- pClass = ary::ary_cast<Class>(pCe);
- if (pClass == 0)
- return;
- // KORR_FUTURE: we need a non const Find_Class()
- const_cast< Class* >(pClass)->Add_KnownDerivative( io_rCe.CeId() );
- }
-}
-
-const String &
-LesserGlobal::NameOf(GlobalId i_id) const
-{
- if ( NOT IsDefine(i_id) )
- {
- return rCes[i_id.Id()].LocalName();
- }
- else
- {
- return rDes[i_id.Id()].LocalName();
- }
-}
-
-
-
-} // namespace anonymous
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_reposypart.hxx b/autodoc/source/ary/cpp/c_reposypart.hxx
deleted file mode 100644
index 02d93ccc..00000000
--- a/autodoc/source/ary/cpp/c_reposypart.hxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_REPOSYPART_HXX
-#define ARY_CPP_C_REPOSYPART_HXX
-
-
-
-// BASE CLASSES
-#include <cpp_internalgate.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class CeAdmin;
- class DefAdmin;
- class TypeAdmin;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** The C++ partition of the repository.
-*/
-class RepositoryPartition : public InternalGate
-{
- public:
- RepositoryPartition(
- RepositoryCenter & i_reposyImpl );
- virtual ~RepositoryPartition();
-
- // INHERITED
- // Interface Gate:
- virtual void Calculate_AllSecondaryInformation();
-// const ::autodoc::Options &
-// i_options );
- virtual const String &
- RepositoryTitle() const;
- virtual const CodeEntity *
- Search_RelatedCe(
- Type_id i_type ) const;
- virtual const ::ary::cpp::CppEntity *
- Search_Entity(
- GlobalId i_id ) const;
- virtual uintt Get_AlphabeticalList(
- List_GlobalIds & o_result,
- const char * i_begin,
- const char * i_end ) const;
- virtual const CePilot &
- Ces() const;
- virtual const DefPilot &
- Defs() const;
- virtual const TypePilot &
- Types() const;
- virtual const loc::LocationPilot &
- Locations() const;
- virtual CePilot & Ces();
- virtual DefPilot & Defs();
- virtual TypePilot & Types();
- virtual loc::LocationPilot &
- Locations();
- private:
- // Locals
- void Connect_AllTypes_2_TheirRelated_CodeEntites();
-
- // DATA
- RepositoryCenter * pRepositoryCenter;
-
- Dyn<CeAdmin> pCes;
- Dyn<TypeAdmin> pTypes;
- Dyn<DefAdmin> pDefs;
- Dyn<loc::LocationPilot>
- pLocations;
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_slots.cxx b/autodoc/source/ary/cpp/c_slots.cxx
deleted file mode 100644
index 2269a56f..00000000
--- a/autodoc/source/ary/cpp/c_slots.cxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <c_slots.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary_disp.hxx>
-#include <ary/cpp/c_namesp.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-//*********************** Slot_SubNamespaces ********************//
-
-
-Slot_SubNamespaces::Slot_SubNamespaces( const Map_NamespacePtr & i_rData )
- : pData( &i_rData )
-{
-}
-
-Slot_SubNamespaces::~Slot_SubNamespaces()
-{
-}
-
-uintt
-Slot_SubNamespaces::Size() const
-{
- return pData->size();
-}
-
-void
-Slot_SubNamespaces::StoreEntries( ary::Display & o_rDestination ) const
-{
- for ( Map_NamespacePtr::const_iterator it = pData->begin();
- it != pData->end();
- ++it )
- {
- (*(*it).second).Accept(o_rDestination);
- }
-}
-
-
-//*********************** Slot_BaseClass ********************//
-
-Slot_BaseClass::Slot_BaseClass( const List_Bases & i_rData )
- : pData( &i_rData )
-{
-}
-
-Slot_BaseClass::~Slot_BaseClass()
-{
-}
-
-uintt
-Slot_BaseClass::Size() const
-{
- return pData->size();
-}
-
-void
-Slot_BaseClass::StoreEntries( ary::Display & o_rDestination ) const
-{
- for ( List_Bases::const_iterator it = pData->begin();
- it != pData->end();
- ++it )
- {
- csv::CheckedCall(o_rDestination, *it);
- }
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_slots.hxx b/autodoc/source/ary/cpp/c_slots.hxx
deleted file mode 100644
index 5bc13639..00000000
--- a/autodoc/source/ary/cpp/c_slots.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_C_SLOTS_HXX
-#define ARY_CPP_C_SLOTS_HXX
-
-// BASE CLASSES
-#include <ary/ceslot.hxx>
-// USED SERVICES
-#include <ary/cpp/c_slntry.hxx>
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-class Slot_SubNamespaces : public ary::Slot
-{
- public:
- Slot_SubNamespaces(
- const Map_NamespacePtr &
- i_rData );
- virtual ~Slot_SubNamespaces();
-
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- ary::Display & o_rDestination ) const;
- // DATA
- const Map_NamespacePtr *
- pData;
-};
-
-class Slot_BaseClass : public ary::Slot
-{
- public:
- Slot_BaseClass(
- const List_Bases & i_rData );
- virtual ~Slot_BaseClass();
-
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- ary::Display & o_rDestination ) const;
- // DATA
- const List_Bases * pData;
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_traits.cxx b/autodoc/source/ary/cpp/c_traits.cxx
deleted file mode 100644
index b07a69dd..00000000
--- a/autodoc/source/ary/cpp/c_traits.cxx
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_traits.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/namesort.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/usedtype.hxx>
-#include <ary/getncast.hxx>
-#include "cs_ce.hxx"
-#include "cs_def.hxx"
-#include "cs_type.hxx"
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-//******************** Ce_Traits ********************//
-Ce_Traits::entity_base_type &
-Ce_Traits::EntityOf_(id_type i_id)
-{
- csv_assert(i_id.IsValid());
- return Ce_Storage::Instance_()[i_id];
-}
-
-//******************** CeNode_Traits ********************//
-const symtree::Node<CeNode_Traits> *
-CeNode_Traits::NodeOf_(const entity_base_type & i_entity)
-{
- if (is_type<Namespace>(i_entity))
- return & ary_cast<Namespace>(i_entity).AsNode();
- else if (is_type<Class>(i_entity))
- return & ary_cast<Class>(i_entity).AsNode();
- return 0;
-}
-
-symtree::Node<CeNode_Traits> *
-CeNode_Traits::NodeOf_(entity_base_type & io_entity)
-{
- if (is_type<Namespace>(io_entity))
- return & ary_cast<Namespace>(io_entity).AsNode();
- else if (is_type<Class>(io_entity))
- return & ary_cast<Class>(io_entity).AsNode();
- return 0;
-}
-
-Ce_Traits::entity_base_type *
-CeNode_Traits::ParentOf_(const entity_base_type & i_entity)
-{
- Ce_Traits::id_type
- ret = i_entity.Owner();
- if (ret.IsValid())
- {
- if (is_type<EnumValue>(i_entity))
- { // Return not the Enum, but the owner of the Enum:
- ret = EntityOf_(ret).Owner();
- csv_assert(ret.IsValid());
- }
- return &EntityOf_(ret);
- }
- return 0;
-}
-
-Ce_id
-CeNode_Search( const CodeEntity & i_entity,
- const String & i_localKey )
-{
- if (is_type<Namespace>(i_entity))
- return ary_cast<Namespace>(i_entity).Search_Child(i_localKey);
- else if (is_type<Class>(i_entity))
- return ary_cast<Class>(i_entity).Search_Child(i_localKey);
- return Ce_id(0);
-}
-
-
-
-
-//******************** Ce_Compare ********************//
-const Ce_Compare::key_type &
-Ce_Compare::KeyOf_(const entity_base_type & i_entity)
-{
- return i_entity.LocalName();
-}
-
-bool
-Ce_Compare::Lesser_( const key_type & i_1,
- const key_type & i_2 )
-{
- static ::ary::LesserName less_;
- return less_(i_1,i_2);
-}
-
-
-//******************** Ce_GlobalCompare ********************//
-void
-Get_Qualified( StreamStr & o_out,
- const CodeEntity & i_ce )
-{
- if (i_ce.LocalName().empty())
- return;
- if (i_ce.Owner().IsValid())
- Get_Qualified(o_out, Ce_Traits::EntityOf_(i_ce.Owner()));
-
- o_out << i_ce.LocalName() << "::";
-}
-
-
-bool
-Ce_GlobalCompare::Lesser_( const key_type & i_1,
- const key_type & i_2 )
-{
- static ::ary::LesserName less_;
-
- if (i_1.LocalName() != i_2.LocalName())
- return less_(i_1.LocalName(), i_2.LocalName());
-
- csv_assert(i_1.Owner().IsValid() AND i_2.Owner().IsValid());
-
- static StreamStr
- aBuffer1_(300);
- static StreamStr
- aBuffer2_(300);
- aBuffer1_.reset();
- aBuffer2_.reset();
-
- Get_Qualified(aBuffer1_, Ce_Traits::EntityOf_(i_1.Owner()));
- Get_Qualified(aBuffer2_, Ce_Traits::EntityOf_(i_2.Owner()));
- if (aBuffer1_.size() >= 2)
- aBuffer1_.pop_back(2);
- if (aBuffer2_.size() >= 2)
- aBuffer2_.pop_back(2);
- return less_(aBuffer1_.c_str(), aBuffer2_.c_str());
-}
-
-
-
-//******************** Def_Traits ********************//
-Def_Traits::entity_base_type &
-Def_Traits::EntityOf_(id_type i_id)
-{
- csv_assert(i_id.IsValid());
- return Def_Storage::Instance_()[i_id];
-}
-
-//******************** Def_Compare ********************//
-const Def_Compare::key_type &
-Def_Compare::KeyOf_(const entity_base_type & i_entity)
-{
- return i_entity.LocalName();
-}
-
-bool
-Def_Compare::Lesser_( const key_type & i_1,
- const key_type & i_2 )
-{
- static ::ary::LesserName less_;
- return less_(i_1,i_2);
-}
-
-
-
-//******************** Type_Traits ********************//
-Type_Traits::entity_base_type &
-Type_Traits::EntityOf_(id_type i_id)
-{
- csv_assert(i_id.IsValid());
- return Type_Storage::Instance_()[i_id];
-}
-
-//******************** Type_Compare ********************//
-const UsedType_Compare::key_type &
-UsedType_Compare::KeyOf_(const entity_base_type & i_entity)
-{
- csv_assert( is_type<UsedType>(i_entity) );
- return ary_cast<UsedType>(i_entity);
-}
-
-bool
-UsedType_Compare::Lesser_( const key_type & i_1,
- const key_type & i_2 )
-{
- return i_1 < i_2;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_tydef.cxx b/autodoc/source/ary/cpp/c_tydef.cxx
deleted file mode 100644
index f49dcfa9..00000000
--- a/autodoc/source/ary/cpp/c_tydef.cxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_tydef.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <slots.hxx>
-#include "c_slots.hxx"
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Typedef::Typedef( const String & i_sLocalName,
- Cid i_nOwner,
- E_Protection i_eProtection,
- Lid i_nFile,
- Tid i_nDescribingType )
- : aEssentials( i_sLocalName,
- i_nOwner,
- i_nFile ),
- nDescribingType(i_nDescribingType),
- eProtection(i_eProtection)
-{
-}
-
-Typedef::~Typedef()
-{
-
-}
-
-const String &
-Typedef::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-Typedef::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-Lid
-Typedef::inq_Location() const
-{
- return aEssentials.Location();
-}
-
-void
-Typedef::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Typedef::get_AryClass() const
-{
- return class_id;
-}
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/c_vari.cxx b/autodoc/source/ary/cpp/c_vari.cxx
deleted file mode 100644
index 736baed2..00000000
--- a/autodoc/source/ary/cpp/c_vari.cxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/c_vari.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Variable::Variable( const String & i_sLocalName,
- Cid i_nOwner,
- E_Protection i_eProtection,
- Lid i_nFile,
- Tid i_nType,
- VariableFlags i_aFlags,
- const String & i_sArraySize,
- const String & i_sInitValue )
- : aEssentials( i_sLocalName,
- i_nOwner,
- i_nFile ),
- nType(i_nType),
- eProtection(i_eProtection),
- aFlags(i_aFlags),
- sArraySize(i_sArraySize),
- sInitialisation(i_sInitValue)
-{
-}
-
-Variable::~Variable()
-{
-}
-
-const String &
-Variable::inq_LocalName() const
-{
- return aEssentials.LocalName();
-}
-
-Cid
-Variable::inq_Owner() const
-{
- return aEssentials.Owner();
-}
-
-Lid
-Variable::inq_Location() const
-{
- return aEssentials.Location();
-}
-
-void
-Variable::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Variable::get_AryClass() const
-{
- return class_id;
-}
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/ca_ce.cxx b/autodoc/source/ary/cpp/ca_ce.cxx
deleted file mode 100644
index 9fdbdd56..00000000
--- a/autodoc/source/ary/cpp/ca_ce.cxx
+++ /dev/null
@@ -1,625 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "ca_ce.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/qualiname.hxx>
-#include <ary/cpp/inpcontx.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/getncast.hxx>
-
-
-
-
-
-
-namespace
-{
-
-String Get_NewAnonymousNamespaceName();
-String Get_NewAnonymousName(
- char i_start );
-
-
-} // anonymous namespace
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-// KORR_FUTURE
-// What about namespace visibility ?
-// Perhaps handle all/some visibility transfer only after parse is complete.
-void
-transfer_visibility( const Class * i_owner,
- CodeEntity & o_child )
-{
- if ( i_owner != 0 ? NOT i_owner->IsVisible() : false )
- o_child.Set_InVisible();
-}
-
-inline const TypePilot &
-CeAdmin::Types() const
-{
- csv_assert(pTypes != 0);
- return *pTypes;
-}
-
-
-
-
-
-
-CeAdmin::CeAdmin(RepositoryPartition & io_myReposyPartition)
- : aStorage(),
- pTypes(0),
- pCppRepositoryPartition(&io_myReposyPartition)
-{
-}
-
-void
-CeAdmin::Set_Related(const TypePilot & i_types)
-{
- pTypes = &i_types;
-}
-
-CeAdmin::~CeAdmin()
-{
-}
-
-Namespace &
-CeAdmin::CheckIn_Namespace( const InputContext & i_context,
- const String & i_localName )
-{
- const String
- local_name = NOT i_localName.empty()
- ? i_localName
- : Get_NewAnonymousNamespaceName();
- Namespace &
- rParent = i_context.CurNamespace();
- Namespace *
- ret = rParent.Search_LocalNamespace(local_name);
- if ( ret == 0 )
- {
- ret = &Create_Namespace(rParent, local_name);
- }
- return *ret;
-}
-
-Class &
-CeAdmin::Store_Class( const InputContext & i_context,
- const String & i_localName,
- E_ClassKey i_eClassKey )
-{
- const String
- local_name = i_localName.empty()
- ? Get_NewAnonymousName( i_eClassKey == CK_class
- ? 'c'
- : i_eClassKey == CK_struct
- ? 's'
- : 'u' )
- : i_localName;
-
- Class &
- ret = * new Class( local_name,
- i_context.CurOwner().CeId(),
- i_context.CurProtection(),
- i_context.CurFile().LeId(),
- i_eClassKey );
- aStorage.Store_Type(ret);
- i_context.CurOwner().Add_Class(local_name, ret.CeId());
- transfer_visibility(i_context.CurClass(), ret);
-
- return ret;
-}
-
-Enum &
-CeAdmin::Store_Enum( const InputContext & i_context,
- const String & i_localName )
-{
- const String
- local_name = i_localName.empty()
- ? Get_NewAnonymousName('e')
- : i_localName;
- Enum &
- ret = * new Enum( local_name,
- i_context.CurOwner().CeId(),
- i_context.CurProtection(),
- i_context.CurFile().LeId() );
- aStorage.Store_Type(ret);
- i_context.CurOwner().Add_Enum(local_name, ret.CeId());
- transfer_visibility(i_context.CurClass(), ret);
-
- return ret;
-}
-
-Typedef &
-CeAdmin::Store_Typedef( const InputContext& i_context,
- const String & i_localName,
- Type_id i_referredType )
-{
- Typedef &
- ret = * new Typedef( i_localName,
- i_context.CurOwner().CeId(),
- i_context.CurProtection(),
- i_context.CurFile().LeId(),
- i_referredType );
- aStorage.Store_Type(ret);
- i_context.CurOwner().Add_Typedef(i_localName, ret.CeId());
- transfer_visibility(i_context.CurClass(), ret);
-
- return ret;
-}
-
-Function *
-CeAdmin::Store_Operation( const InputContext & i_context,
- const String & i_localName,
- Type_id i_returnType,
- const std::vector<S_Parameter> & i_parameters,
- E_Virtuality i_virtuality,
- E_ConVol i_conVol,
- FunctionFlags i_flags,
- bool i_throwExists,
- const std::vector<Type_id> & i_exceptions )
-{
- Function &
- ret = * new Function( i_localName,
- i_context.CurOwner().CeId(),
- i_context.CurProtection(),
- i_context.CurFile().LeId(),
- i_returnType,
- i_parameters,
- i_conVol,
- i_virtuality,
- i_flags,
- i_throwExists,
- i_exceptions );
-
- // Check for double declaration:
- Ce_id
- nAlreadyExistingFunction(0);
- switch ( lhf_CheckAndHandle_DuplicateOperation(
- nAlreadyExistingFunction,
- i_context,
- ret) )
- {
- case df_discard_new:
- delete &ret;
- return 0;
- case df_replace:
- csv_assert(nAlreadyExistingFunction.IsValid());
- aStorage.Replace_Entity(
- nAlreadyExistingFunction,
- ret );
- break;
- case df_no:
- aStorage.Store_Operation(ret); // Now it has a valid id.
- i_context.CurOwner().Add_Operation( i_localName, ret.CeId(), i_flags.IsStaticMember() );
- break;
- default:
- csv_assert(false);
- }
-
- transfer_visibility(i_context.CurClass(), ret);
- if ( i_context.CurProtection() != PROTECT_global )
- {
- Class *
- pClass = i_context.CurClass();
- if ( pClass != 0 AND i_virtuality != VIRTUAL_none)
- {
- pClass->UpdateVirtuality(i_virtuality);
- }
- }
-
- return &ret;
-}
-
-Variable &
-CeAdmin::Store_Variable( const InputContext& i_context,
- const String & i_localName,
- Type_id i_type,
- VariableFlags i_flags,
- const String & i_arraySize,
- const String & i_initValue )
-{
- Variable &
- ret = * new Variable( i_localName,
- i_context.CurOwner().CeId(),
- i_context.CurProtection(),
- i_context.CurFile().LeId(),
- i_type,
- i_flags,
- i_arraySize,
- i_initValue );
-
- bool
- is_const = Types().Find_Type(i_type).IsConst();
- aStorage.Store_Datum(ret);
- i_context.CurOwner().Add_Variable(
- i_localName,
- ret.CeId(),
- is_const,
- i_flags.IsStaticMember() );
- transfer_visibility(i_context.CurClass(), ret);
-
- return ret;
-}
-
-EnumValue &
-CeAdmin::Store_EnumValue( const InputContext & i_context,
- const String & i_localName,
- const String & i_initValue )
-{
- Enum *
- parent = i_context.CurEnum();
- csv_assert( parent != 0 );
-
- EnumValue &
- ret = * new EnumValue( i_localName,
- parent->CeId(),
- i_initValue );
- aStorage.Store_Datum(ret);
- parent->Add_Value(ret.CeId());
-
- // KORR also for current enum:
- transfer_visibility(i_context.CurClass(), ret);
-
- return ret;
-}
-
-const Namespace &
-CeAdmin::GlobalNamespace() const
-{
- return ary_cast<Namespace>( aStorage[predefined::ce_GlobalNamespace] );
-}
-
-const CodeEntity &
-CeAdmin::Find_Ce(Ce_id i_id) const
-{
- return aStorage[i_id];
-}
-
-const CodeEntity *
-CeAdmin::Search_Ce(Ce_id i_id) const
-{
- return aStorage.Exists(i_id)
- ? & aStorage[i_id]
- : (const CodeEntity*)(0);
-}
-
-const CodeEntity *
-CeAdmin::Search_CeAbsolute( const CodeEntity & i_curScope,
- const QualifiedName & i_rSearchedName ) const
-{
- const symtree::Node<CeNode_Traits> *
- cur_node = CeNode_Traits::NodeOf_(i_curScope);
- csv_assert(cur_node != 0);
-
- Ce_id
- ret(0);
- cur_node->SearchUp( ret,
- i_rSearchedName.first_namespace(),
- i_rSearchedName.end_namespace(),
- i_rSearchedName.LocalName() );
- return Search_Ce(ret);
-}
-
-const CodeEntity *
-CeAdmin::Search_CeLocal( const String & i_localName,
- bool i_bIsFunction,
- const Namespace & i_rCurNamespace,
- const Class * i_pCurClass ) const
-{
- // KORR_FUTURE
- // See if this is correct.
-
- Ce_id
- ret(0);
-
- if ( NOT i_bIsFunction )
- {
- CesResultList
- type_instances = aStorage.TypeIndex().SearchAll(i_localName);
- CesResultList
- data_instances = aStorage.DataIndex().SearchAll(i_localName);
- Ce_id
- ret1 = Search_MatchingInstance(
- type_instances,
- (i_pCurClass
- ? i_pCurClass->CeId()
- : i_rCurNamespace.CeId())
- );
- Ce_id
- ret2 = Search_MatchingInstance(
- data_instances,
- (i_pCurClass
- ? i_pCurClass->CeId()
- : i_rCurNamespace.CeId())
- );
- if (NOT ret2.IsValid())
- ret = ret1;
- else if (NOT ret1.IsValid())
- ret = ret2;
- }
- else
- {
- CesResultList
- function_instances = aStorage.OperationIndex().SearchAll(i_localName);
- if ( function_instances.size() == 1 )
- ret = *function_instances.begin();
- else
- {
- ret = Search_MatchingInstance(
- function_instances,
- (i_pCurClass
- ? i_pCurClass->CeId()
- : i_rCurNamespace.CeId())
- );
- }
- }
-
- if ( ret.IsValid() )
- return & Find_Ce(ret);
-
- return 0;
-}
-
-void
-CeAdmin::Get_QualifiedName( StreamStr & o_rOut,
- const String & i_localName,
- Ce_id i_nOwner,
- const char * i_sDelimiter ) const
-{
- if ( i_localName.empty() OR NOT i_nOwner.IsValid() )
- return;
-
- const CodeEntity *
- pOwner = & Find_Ce( i_nOwner );
- if ( is_type<Enum>(*pOwner) )
- pOwner = &Find_Ce( Ce_id(pOwner->Owner()) );
-
- Get_QualifiedName( o_rOut,
- pOwner->LocalName(),
- Ce_id(pOwner->Owner()),
- i_sDelimiter );
- o_rOut
- << i_sDelimiter
- << i_localName;
-}
-
-void
-CeAdmin::Get_SignatureText( StreamStr & o_rOut,
- const OperationSignature & i_signature,
- const StringVector * i_sParameterNames ) const
-{
- OperationSignature::ParameterTypeList::const_iterator
- it = i_signature.Parameters().begin();
- OperationSignature::ParameterTypeList::const_iterator
- it_end = i_signature.Parameters().end();
-
- const StringVector aDummy;
- StringVector::const_iterator
- itName = i_sParameterNames != 0
- ? i_sParameterNames->begin()
- : aDummy.begin();
- StringVector::const_iterator
- itName_end = i_sParameterNames != 0
- ? i_sParameterNames->end()
- : aDummy.end();
-
- bool
- bEmpty = (it == it_end);
- if (NOT bEmpty)
- {
- o_rOut << "( ";
- Types().Get_TypeText(o_rOut, *it);
- if (itName != itName_end)
- o_rOut << " " << (*itName);
-
- for ( ++it; it != it_end; ++it )
- {
- o_rOut << ", ";
- Types().Get_TypeText(o_rOut, *it);
- if (itName != itName_end)
- {
- ++itName;
- if (itName != itName_end)
- o_rOut << " " << (*itName);
- }
- }
- o_rOut << " )";
- }
- else
- {
- o_rOut << "( )";
- }
-
- if ( intt(i_signature.ConVol()) & intt(ary::cpp::CONVOL_const) )
- o_rOut << " const";
- if ( intt(i_signature.ConVol()) & intt(ary::cpp::CONVOL_volatile) )
- o_rOut << " volatile";
-}
-
-CesResultList
-CeAdmin::Search_TypeName(const String & i_sName) const
-{
- return aStorage.TypeIndex().SearchAll(i_sName);
-}
-
-Namespace &
-CeAdmin::GlobalNamespace()
-{
- return ary_cast<Namespace>( aStorage[predefined::ce_GlobalNamespace] );
-}
-
-CeAdmin::E_DuplicateFunction
-CeAdmin::lhf_CheckAndHandle_DuplicateOperation(
- Ce_id & o_existentFunction,
- const InputContext & i_context,
- const Function & i_newFunction )
-{
- if (i_context.CurProtection() != PROTECT_global)
- {
- // Assume, there will be no duplicates within the same class.
-
- // KORR_FUTURE
- // Assumption may be wrong in case of #defines providing different
- // versions for different compilers.
- return df_no;
- }
-
- std::vector<Ce_id>
- aOperationsWithSameName;
- i_context.CurNamespace().Search_LocalOperations(
- aOperationsWithSameName,
- i_newFunction.LocalName() );
-
- for ( std::vector<Ce_id>::const_iterator
- it = aOperationsWithSameName.begin();
- it != aOperationsWithSameName.end();
- ++it )
- {
- const Function &
- rFunction = ary_cast<Function>(aStorage[*it]);
- if ( rFunction.LocalName() == i_newFunction.LocalName()
- AND rFunction.Signature() == i_newFunction.Signature() )
- {
- if (NOT rFunction.IsIdentical(i_newFunction))
- {
- // KORR_FUTURE Make this more detailed.
- Cerr() << "Non identical function with same signature "
- << "found: "
- << i_context.CurNamespace().LocalName()
- << "::"
- << i_newFunction.LocalName()
- << "(..)"
- << Endl();
- }
- o_existentFunction = rFunction.CeId();
- if (rFunction.Docu().Data() == 0)
- return df_replace;
- else
- return df_discard_new;
- }
- } // end for
-
- return df_no;
-}
-
-Namespace &
-CeAdmin::Create_Namespace( Namespace & o_parent,
- const String & i_localName )
-{
- DYN Namespace &
- ret = *new Namespace(i_localName, o_parent);
- aStorage.Store_Entity(ret);
- o_parent.Add_LocalNamespace(ret);
- return ret;
-}
-
-Ce_id
-CeAdmin::Search_MatchingInstance( CesResultList i_list,
- Ce_id i_owner ) const
-{
- // KORR
- // Multiple results?
-
- for ( CesList::const_iterator it = i_list.begin();
- it != i_list.end();
- ++it )
- {
- const CodeEntity &
- ce = aStorage[*it];
- if ( ce.Owner() == i_owner)
- {
- return *it;
- }
- }
- return Ce_id(0);
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-
-
-namespace
-{
-
-uintt G_nLastFreeAnonymousNamespaceNr = 0;
-uintt G_nLastFreeAnonymousEntityNr = 0;
-
-String
-Get_NewAnonymousNamespaceName()
-{
- StreamLock
- sl(100);
- return String( sl()
- << "namespace_anonymous_"
- << ++G_nLastFreeAnonymousNamespaceNr
- << csv::c_str );
-
-}
-
-String
-Get_NewAnonymousName(char i_cStart)
-{
- StreamLock
- sl(100);
- return String( sl()
- << i_cStart
- << "_Anonymous__"
- << ++G_nLastFreeAnonymousEntityNr
- << c_str );
-}
-
-
-
-} // namespace anonymous
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/ca_ce.hxx b/autodoc/source/ary/cpp/ca_ce.hxx
deleted file mode 100644
index dc8b9a08..00000000
--- a/autodoc/source/ary/cpp/ca_ce.hxx
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CA_CE_HXX
-#define ARY_CPP_CA_CE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/cp_ce.hxx>
- // OTHER
-#include "cs_ce.hxx"
-
-
-namespace ary
-{
-namespace cpp
-{
- class Ce_Storage;
- class RepositoryPartition;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** Administrates all C++ code entities (types, operations, variables).
-*/
-class CeAdmin : public CePilot
-{
- public:
- // LIFECYCLE
- CeAdmin(
- RepositoryPartition &
- io_myReposyPartition );
- void Set_Related(
- const TypePilot & i_types );
- virtual ~CeAdmin();
-
- // INQUIRY
- const Ce_Storage & Storage() const;
-
- // ACCESS
- Ce_Storage & Storage();
-
- // INHERITED
- // Interface CePilot:
- virtual Namespace & CheckIn_Namespace(
- const InputContext &
- i_context,
- const String & i_localName );
- virtual Class & Store_Class(
- const InputContext &
- i_context,
- const String & i_localName,
- E_ClassKey i_classKey );
- virtual Enum & Store_Enum(
- const InputContext &
- i_context,
- const String & i_localName );
- virtual Typedef & Store_Typedef(
- const InputContext &
- i_context,
- const String & i_localName,
- Type_id i_referredType );
- virtual Function * Store_Operation(
- const InputContext &
- i_context,
- const String & i_localName,
- Type_id i_returnType,
- const std::vector<S_Parameter> &
- i_parameters,
- E_Virtuality i_virtuality,
- E_ConVol i_conVol,
- FunctionFlags i_flags,
- bool i_throwExists,
- const std::vector<Type_id> &
- i_exceptions );
- virtual Variable & Store_Variable(
- const InputContext &
- i_context,
- const String & i_localName,
- Type_id i_type,
- VariableFlags i_flags,
- const String & i_arraySize,
- const String & i_initValue );
- virtual EnumValue & Store_EnumValue(
- const InputContext &
- i_context,
- const String & i_localName,
- const String & i_initValue );
- virtual const Namespace &
- GlobalNamespace() const;
- virtual const CodeEntity &
- Find_Ce(
- Ce_id i_id ) const;
- virtual const CodeEntity *
- Search_Ce(
- Ce_id i_id ) const;
- virtual const CodeEntity *
- Search_CeAbsolute(
- const CodeEntity & i_curScope,
- const QualifiedName &
- i_absoluteName ) const;
- virtual const CodeEntity *
- Search_CeLocal(
- const String & i_relativeName,
- bool i_isFunction,
- const Namespace & i_curNamespace,
- const Class * i_curClass ) const;
- virtual void Get_QualifiedName(
- StreamStr & o_result,
- const String & i_localName,
- Ce_id i_owner,
- const char * i_delimiter = "::" ) const;
- virtual void Get_SignatureText(
- StreamStr & o_rOut,
- const OperationSignature &
- i_signature,
- const StringVector *
- i_sParameterNames = 0 ) const;
- virtual CesResultList
- Search_TypeName(
- const String & i_sName ) const;
- virtual Namespace & GlobalNamespace();
-
- private:
- // Locals
- /// @return true, if function is duplicate.
- enum E_DuplicateFunction
- {
- df_no,
- df_replace,
- df_discard_new
- };
-
- /** @param o_existentFunction
- The id of the already existing function, else unset.
- */
- E_DuplicateFunction lhf_CheckAndHandle_DuplicateOperation(
- Ce_id & o_existentFunction,
- const InputContext &
- i_context,
- const Function & i_newFunction );
- Namespace & Create_Namespace(
- Namespace & o_parent,
- const String & i_localName );
- Ce_id Search_MatchingInstance(
- CesResultList i_list,
- Ce_id i_owner ) const;
- const TypePilot & Types() const;
-
- // DATA
- Ce_Storage aStorage;
- const TypePilot * pTypes;
- RepositoryPartition *
- pCppRepositoryPartition;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const Ce_Storage &
-CeAdmin::Storage() const
-{
- return aStorage;
-}
-
-inline Ce_Storage &
-CeAdmin::Storage()
-{
- return aStorage;
-}
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/ca_def.cxx b/autodoc/source/ary/cpp/ca_def.cxx
deleted file mode 100644
index 297a8066..00000000
--- a/autodoc/source/ary/cpp/ca_def.cxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "ca_def.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/cpp/inpcontx.hxx>
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-DefAdmin::DefAdmin(RepositoryPartition & io_myReposyPartition)
- : aStorage(),
- pCppRepositoryPartition(&io_myReposyPartition)
-{
-}
-
-DefAdmin::~DefAdmin()
-{
-}
-
-Define &
-DefAdmin::Store_Define( const InputContext& i_rContext,
- const String & i_sName,
- const StringVector & i_rDefinition )
-{
- Define &
- ret = *new Define( i_sName,
- i_rDefinition,
- i_rContext.CurFile().LeId() );
- aStorage.Store_Define(ret);
- return ret;
-
-}
-
-Macro &
-DefAdmin::Store_Macro( const InputContext& i_rContext,
- const String & i_sName,
- const StringVector & i_rParams,
- const StringVector & i_rDefinition )
-{
- Macro &
- ret = *new Macro( i_sName,
- i_rParams,
- i_rDefinition,
- i_rContext.CurFile().LeId() );
- aStorage.Store_Macro(ret);
- return ret;
-}
-
-const DefineEntity &
-DefAdmin::Find_Def(De_id i_id) const
-{
- return aStorage[i_id];
-}
-
-DefsResultList
-DefAdmin::AllDefines() const
-{
- return csv::make_range( aStorage.DefineIndex().Begin(),
- aStorage.DefineIndex().End() );
-}
-
-DefsResultList
-DefAdmin::AllMacros() const
-{
- return csv::make_range( aStorage.MacroIndex().Begin(),
- aStorage.MacroIndex().End() );
-}
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/ca_def.hxx b/autodoc/source/ary/cpp/ca_def.hxx
deleted file mode 100644
index ba1a1f66..00000000
--- a/autodoc/source/ary/cpp/ca_def.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CA_DEF_HXX
-#define ARY_CPP_CA_DEF_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/cp_def.hxx>
- // OTHER
-#include "cs_def.hxx"
-
-
-
-namespace ary
-{
-namespace cpp
-{
- class Def_Storage;
- class RepositoryPartition;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-
-class DefAdmin : public DefPilot
-{
- public:
- // LIFECYCLE
- DefAdmin(
- RepositoryPartition &
- io_myReposyPartition );
- ~DefAdmin();
-
- // INQUIRY
- const Def_Storage & Storage() const;
-
- // INHERITED
- // Interface DefPilot:
- virtual Define & Store_Define(
- const InputContext& i_rContext,
- const String & i_sName,
- const StringVector &
- i_rDefinition );
- virtual Macro & Store_Macro(
- const InputContext& i_rContext,
- const String & i_sName,
- const StringVector &
- i_rParams,
- const StringVector &
- i_rDefinition );
- virtual const DefineEntity &
- Find_Def(
- De_id i_id ) const;
- virtual DefsResultList
- AllDefines() const;
- virtual DefsResultList
- AllMacros() const;
-
- private:
- // DATA
- Def_Storage aStorage;
- RepositoryPartition *
- pCppRepositoryPartition;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const Def_Storage &
-DefAdmin::Storage() const
-{
- return aStorage;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/ca_type.cxx b/autodoc/source/ary/cpp/ca_type.cxx
deleted file mode 100644
index f9efc793..00000000
--- a/autodoc/source/ary/cpp/ca_type.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "ca_type.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_builtintype.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/inpcontx.hxx>
-#include <ary/cpp/usedtype.hxx>
-#include <ary/getncast.hxx>
-#include "c_reposypart.hxx"
-#include "cs_type.hxx"
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-TypeAdmin::TypeAdmin(RepositoryPartition & io_myReposyPartition)
- : aStorage(),
- pCppRepositoryPartition(&io_myReposyPartition)
-{
-}
-
-TypeAdmin::~TypeAdmin()
-{
-}
-
-
-// KORR_FUTURE
-// Remove unused parameter.
-
-const Type &
-TypeAdmin::CheckIn_UsedType( const InputContext & ,
- DYN UsedType & pass_type )
-{
- Dyn<UsedType>
- pNewType(&pass_type); // Ensure clean up of heap object.
-
- Type_id
- tid(0);
- if (pass_type.IsBuiltInType())
- {
- tid = aStorage.Search_BuiltInType(
- BuiltInType::SpecializedName_( pass_type.LocalName().c_str(),
- pass_type.TypeSpecialisation() ));
- csv_assert(tid.IsValid());
- return aStorage[tid];
- }
-
- tid = aStorage.UsedTypeIndex().Search(pass_type);
- if (tid.IsValid())
- {
- return aStorage[tid];
- }
-
- // Type does not yet exist:
- // Transfer ownership from pNewTypeand assign id:
- aStorage.Store_Entity(*pNewType.Release());
-
- aStorage.UsedTypeIndex().Add(pass_type.TypeId());
- return pass_type;
-}
-
-const Type &
-TypeAdmin::Find_Type(Type_id i_type) const
-{
- return aStorage[i_type];
-}
-
-bool
-TypeAdmin::Get_TypeText( StreamStr & o_result,
- Type_id i_type ) const
-{
- if (NOT i_type.IsValid())
- return false;
- aStorage[i_type].Get_Text(o_result, *pCppRepositoryPartition);
- return true;
-}
-
-bool
-TypeAdmin::Get_TypeText( StreamStr & o_preName,
- StreamStr & o_name,
- StreamStr & o_postName,
- Type_id i_type ) const
-{
- if (NOT i_type.IsValid())
- return false;
- aStorage[i_type].Get_Text(o_preName, o_name, o_postName, *pCppRepositoryPartition);
- return true;
-}
-
-Type_id
-TypeAdmin::Tid_Ellipse() const
-{
- return Type_id(predefined::t_ellipse);
-}
-
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/ca_type.hxx b/autodoc/source/ary/cpp/ca_type.hxx
deleted file mode 100644
index 9758248b..00000000
--- a/autodoc/source/ary/cpp/ca_type.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CA_TYPE_HXX
-#define ARY_CPP_CA_TYPE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/cp_type.hxx>
- // OTHER
-#include "cs_type.hxx"
-
-
-
-namespace ary
-{
-namespace cpp
-{
- class RepositoryPartition;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** Administrates all C++ types as uses in user declarations
- as return-, parameter- or variable-types.
-*/
-class TypeAdmin : public TypePilot
-{
- public:
- // LIFECYCLE
- TypeAdmin(
- RepositoryPartition &
- io_myReposyPartition );
- virtual ~TypeAdmin();
-
- // INQUIRY
- /// @return A list of all stored types that are not C++ or STL builtin types.
- const Type_Storage &
- Storage() const;
-
- // ACCESS
- Type_Storage & Storage();
-
- // INHERITED
- // Interface TypePilot:
- virtual const Type &
- CheckIn_UsedType(
- const InputContext &
- i_context,
- DYN UsedType & pass_type );
- virtual const Type &
- Find_Type(
- Type_id i_type ) const;
- virtual bool Get_TypeText(
- StreamStr & o_result,
- Type_id i_type ) const;
- virtual bool Get_TypeText(
- StreamStr & o_preName, /// ::ary::cpp::
- StreamStr & o_name, /// MyClass
- StreamStr & o_postName, /// <TplArgument> * const &
- Type_id i_type ) const;
- virtual Type_id Tid_Ellipse() const;
-
- private:
- // DATA
- Type_Storage aStorage;
- RepositoryPartition *
- pCppRepositoryPartition;
-};
-
-
-
-
-// IMPLEMENTATION
-inline const Type_Storage &
-TypeAdmin::Storage() const
-{
- return aStorage;
-}
-
-inline Type_Storage &
-TypeAdmin::Storage()
-{
- return aStorage;
-}
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/cs_ce.cxx b/autodoc/source/ary/cpp/cs_ce.cxx
deleted file mode 100644
index 9375df4d..00000000
--- a/autodoc/source/ary/cpp/cs_ce.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cs_ce.hxx"
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_namesp.hxx>
-
-
-
-namespace
-{
-const uintt
- C_nReservedElements = ::ary::cpp::predefined::ce_MAX; // Skipping "0" and the GlobalNamespace
-}
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Ce_Storage * Ce_Storage::pInstance_ = 0;
-
-
-
-Ce_Storage::Ce_Storage()
- : stg::Storage<CodeEntity>(C_nReservedElements),
- aTypes(),
- aOperations(),
- aData()
-
-{
- Set_Reserved( predefined::ce_GlobalNamespace,
- *new Namespace );
-
- csv_assert(pInstance_ == 0);
- pInstance_ = this;
-}
-
-Ce_Storage::~Ce_Storage()
-{
- csv_assert(pInstance_ != 0);
- pInstance_ = 0;
-}
-
-Ce_id
-Ce_Storage::Store_Type(DYN CodeEntity & pass_ce)
-{
- Ce_id
- ret = Store_Entity(pass_ce);
- aTypes.Add(ret);
- return ret;
-}
-
-Ce_id
-Ce_Storage::Store_Operation(DYN CodeEntity & pass_ce)
-{
- Ce_id
- ret = Store_Entity(pass_ce);
- aOperations.Add(ret);
- return ret;
-}
-
-Ce_id
-Ce_Storage::Store_Datum(DYN CodeEntity & pass_ce)
-{
- Ce_id
- ret = Store_Entity(pass_ce);
- aData.Add(ret);
- return ret;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/cs_ce.hxx b/autodoc/source/ary/cpp/cs_ce.hxx
deleted file mode 100644
index 5b8e15a4..00000000
--- a/autodoc/source/ary/cpp/cs_ce.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CS_CE_HXX
-#define ARY_CPP_CS_CE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <store/s_storage.hxx>
- // OTHER
-#include <ary/cpp/c_ce.hxx>
-#include <ary/cpp/c_traits.hxx>
-#include <sortedids.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** The data base for all ->ary::cpp::CodeEntity objects.
-*/
-class Ce_Storage : public ::ary::stg::Storage<CodeEntity>
-{
- public:
- typedef SortedIds<Ce_Compare> Index;
-
- Ce_Storage();
- virtual ~Ce_Storage();
-
- Ce_id Store_Type(
- DYN CodeEntity & pass_ce );
- Ce_id Store_Operation(
- DYN CodeEntity & pass_ce );
- Ce_id Store_Datum(
- DYN CodeEntity & pass_ce );
-
- const Index & TypeIndex() const { return aTypes; }
- const Index & OperationIndex() const { return aOperations; }
- const Index & DataIndex() const { return aData; }
-
- Index & TypeIndex() { return aTypes; }
- Index & OperationIndex() { return aOperations; }
- Index & DataIndex() { return aData; }
-
- static Ce_Storage & Instance_() { csv_assert(pInstance_ != 0);
- return *pInstance_; }
- private:
- // DATA
- Index aTypes;
- Index aOperations;
- Index aData;
-
- static Ce_Storage * pInstance_;
-};
-
-
-
-
-namespace predefined
-{
-
-enum E_CodeEntity
-{
- ce_GlobalNamespace = 1,
- ce_MAX
-};
-
-} // namespace predefined
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/cs_def.cxx b/autodoc/source/ary/cpp/cs_def.cxx
deleted file mode 100644
index 4a8fa424..00000000
--- a/autodoc/source/ary/cpp/cs_def.cxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cs_def.hxx"
-
-// NOT FULLY DEFINED SERVICES
-
-
-namespace
-{
-const uintt
- C_nReservedElements = ::ary::cpp::predefined::de_MAX; // Skipping "0"
-}
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-Def_Storage * Def_Storage::pInstance_ = 0;
-
-
-
-
-Def_Storage::Def_Storage()
- : stg::Storage<DefineEntity>(C_nReservedElements)
-{
- csv_assert(pInstance_ == 0);
- pInstance_ = this;
-}
-
-Def_Storage::~Def_Storage()
-{
- csv_assert(pInstance_ != 0);
- pInstance_ = 0;
-}
-
-De_id
-Def_Storage::Store_Define(DYN DefineEntity & pass_de)
-{
- De_id
- ret = Store_Entity(pass_de);
- aDefines.Add(ret);
- return ret;
-}
-
-De_id
-Def_Storage::Store_Macro(DYN DefineEntity & pass_de)
-{
- De_id
- ret = Store_Entity(pass_de);
- aMacros.Add(ret);
- return ret;
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/cs_def.hxx b/autodoc/source/ary/cpp/cs_def.hxx
deleted file mode 100644
index 50cf9d18..00000000
--- a/autodoc/source/ary/cpp/cs_def.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CS_DE_HXX
-#define ARY_CPP_CS_DE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <store/s_storage.hxx>
- // OTHER
-#include <ary/cpp/c_de.hxx>
-#include <ary/cpp/c_traits.hxx>
-#include <sortedids.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-
-/** The data base for all ->ary::cpp::Type objects.
-*/
-class Def_Storage : public ::ary::stg::Storage<DefineEntity>
-{
- public:
- typedef SortedIds<Def_Compare> Index;
-
- // LIFECYCLE
- Def_Storage();
- virtual ~Def_Storage();
-
- De_id Store_Define(
- DYN DefineEntity & pass_de );
- De_id Store_Macro(
- DYN DefineEntity & pass_de );
-
- const Index & DefineIndex() const { return aDefines; }
- const Index & MacroIndex() const { return aMacros; }
-
- Index & DefineIndex() { return aDefines; }
- Index & MacroIndex() { return aMacros; }
-
- static Def_Storage &
- Instance_() { csv_assert(pInstance_ != 0);
- return *pInstance_; }
- private:
- // DATA
- Index aDefines;
- Index aMacros;
-
-
- static Def_Storage *
- pInstance_;
-};
-
-
-
-
-namespace predefined
-{
-
-enum E_DefineEntity
-{
- // 0 is always unused with repository storages.
- de_MAX = 1
-};
-
-} // namespace predefined
-
-
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/cs_type.cxx b/autodoc/source/ary/cpp/cs_type.cxx
deleted file mode 100644
index 6e903a44..00000000
--- a/autodoc/source/ary/cpp/cs_type.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cs_type.hxx"
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_builtintype.hxx>
-
-
-namespace
-{
- const uintt
- C_nReservedElements = ary::cpp::predefined::t_MAX; // Skipping "0" and the builtin types
-}
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-Type_Storage * Type_Storage::pInstance_ = 0;
-
-
-
-
-Type_Storage::Type_Storage()
- : stg::Storage<Type>(C_nReservedElements),
- aBuiltInTypes()
-{
- Setup_BuiltInTypes();
-
- csv_assert(pInstance_ == 0);
- pInstance_ = this;
-}
-
-Type_Storage::~Type_Storage()
-{
- csv_assert(pInstance_ != 0);
- pInstance_ = 0;
-}
-
-Type_id
-Type_Storage::Search_BuiltInType( const String & i_specializedName ) const
-{
- return csv::value_from_map(aBuiltInTypes, i_specializedName, Tid(0));
-}
-
-void
-Type_Storage::Setup_BuiltInTypes()
-{
- Set_BuiltInType( predefined::t_void, "void" );
- Set_BuiltInType( predefined::t_bool, "bool" );
- Set_BuiltInType( predefined::t_char, "char" );
- Set_BuiltInType( predefined::t_signed_char, "char", TYSP_signed );
- Set_BuiltInType( predefined::t_unsigned_char, "char", TYSP_unsigned );
- Set_BuiltInType( predefined::t_short, "short" );
- Set_BuiltInType( predefined::t_unsigned_short, "short", TYSP_unsigned );
- Set_BuiltInType( predefined::t_int, "int" );
- Set_BuiltInType( predefined::t_unsigned_int, "int", TYSP_unsigned );
- Set_BuiltInType( predefined::t_long, "long" );
- Set_BuiltInType( predefined::t_unsigned_long, "long", TYSP_unsigned );
- Set_BuiltInType( predefined::t_float, "float" );
- Set_BuiltInType( predefined::t_double, "double" );
- Set_BuiltInType( predefined::t_size_t, "size_t" );
- Set_BuiltInType( predefined::t_wchar_t, "wchar_t" );
- Set_BuiltInType( predefined::t_ptrdiff_t, "ptrdiff_t" );
- Set_BuiltInType( predefined::t_ellipse, "..." );
-}
-
-void
-Type_Storage::Set_BuiltInType( Rid i_id,
- const char * i_sName,
- ary::cpp::E_TypeSpecialisation i_eSpecialisation )
-{
- DYN BuiltInType &
- rNew = *new BuiltInType(i_sName, i_eSpecialisation);
- Set_Reserved( i_id, rNew); // Here goes the ownership for rNew.
- aBuiltInTypes[rNew.SpecializedName()] = rNew.TypeId();
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/cs_type.hxx b/autodoc/source/ary/cpp/cs_type.hxx
deleted file mode 100644
index c903dca6..00000000
--- a/autodoc/source/ary/cpp/cs_type.hxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_CS_TYPE_HXX
-#define ARY_CPP_CS_TYPE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <store/s_storage.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/c_traits.hxx>
-#include <ary/cpp/usedtype.hxx>
-#include <sortedids.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-
-/** The data base for all ->ary::cpp::Type objects.
-*/
-class Type_Storage : public ::ary::stg::Storage<Type>
-{
- public:
- typedef SortedIds<UsedType_Compare> UT_Index;
-
- Type_Storage();
- virtual ~Type_Storage();
-
- const UT_Index & UsedTypeIndex() const;
-
- UT_Index & UsedTypeIndex();
- Type_id Search_BuiltInType(
- const String & i_specializedName ) const;
-
- static Type_Storage &
- Instance_() { csv_assert(pInstance_ != 0);
- return *pInstance_; }
- private:
- // Locals
- void Setup_BuiltInTypes();
- void Set_BuiltInType(
- Rid i_nId,
- const char * i_sName,
- ary::cpp::E_TypeSpecialisation
- i_eSpecialisation = TYSP_none );
- // DATA
- UT_Index aUsedTypes;
- std::map<String,Type_id>
- aBuiltInTypes;
-
-
- static Type_Storage *
- pInstance_;
-};
-
-
-
-
-namespace predefined
-{
-
-enum E_Type
-{
- // 0 is always unused with repository storages.
- t_void = 1,
- t_bool,
- t_char,
- t_signed_char,
- t_unsigned_char,
- t_short,
- t_unsigned_short,
- t_int,
- t_unsigned_int,
- t_long,
- t_unsigned_long,
- t_float,
- t_double,
- t_size_t,
- t_wchar_t,
- t_ptrdiff_t,
- t_ellipse,
- t_MAX
-};
-
-} // namespace predefined
-
-
-
-// IMPLEMENTATION
-inline const Type_Storage::UT_Index &
-Type_Storage::UsedTypeIndex() const
-{
- return aUsedTypes;
-}
-
-inline Type_Storage::UT_Index &
-Type_Storage::UsedTypeIndex()
-{
- return aUsedTypes;
-}
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/makefile.mk b/autodoc/source/ary/cpp/makefile.mk
deleted file mode 100644
index 5c20a59b..00000000
--- a/autodoc/source/ary/cpp/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary_cpp
-
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/c_builtintype.obj \
- $(OBJ)$/c_class.obj \
- $(OBJ)$/c_de.obj \
- $(OBJ)$/c_define.obj \
- $(OBJ)$/c_enum.obj \
- $(OBJ)$/c_enuval.obj \
- $(OBJ)$/c_funct.obj \
- $(OBJ)$/c_macro.obj \
- $(OBJ)$/c_namesp.obj \
- $(OBJ)$/c_osigna.obj \
- $(OBJ)$/c_reposypart.obj \
- $(OBJ)$/c_slots.obj \
- $(OBJ)$/c_traits.obj \
- $(OBJ)$/c_tydef.obj \
- $(OBJ)$/c_vari.obj \
- $(OBJ)$/ca_ce.obj \
- $(OBJ)$/ca_def.obj \
- $(OBJ)$/ca_type.obj \
- $(OBJ)$/cs_ce.obj \
- $(OBJ)$/cs_def.obj \
- $(OBJ)$/cs_type.obj \
- $(OBJ)$/namechain.obj \
- $(OBJ)$/tplparam.obj \
- $(OBJ)$/usedtype.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/ary/cpp/namechain.cxx b/autodoc/source/ary/cpp/namechain.cxx
deleted file mode 100644
index b581be5e..00000000
--- a/autodoc/source/ary/cpp/namechain.cxx
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/namechain.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/usedtype.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include "tplparam.hxx"
-
-
-
-namespace ary
-{
-namespace cpp
-{
-namespace ut
-{
-
-
-//********************* NameSegment ******************//
-
-NameSegment::NameSegment( const char * i_sName )
- : sName( i_sName )
- // pTemplate
-{
-}
-
-NameSegment::NameSegment( const NameSegment & i_rSeg )
- : sName(i_rSeg.sName)
- // pTemplate
-{
- // KORR_FUTURE : Handling of copying of templates.
-// csv_assert( NOT i_rSeg.pTemplate );
-}
-
-NameSegment& NameSegment::operator=(const NameSegment & i_rSeg)
-{
- sName = i_rSeg.sName;
- return *this;
-}
-
-NameSegment::~NameSegment()
-{
-}
-
-List_TplParameter &
-NameSegment::AddTemplate()
-{
- return * (pTemplate = new List_TplParameter);
-}
-
-intt
-NameSegment::Compare( const NameSegment & i_rOther ) const
-{
- intt nResult = strcmp( sName.c_str(), i_rOther.sName.c_str() );
- if (nResult != 0)
- return nResult;
- if ( bool(pTemplate) != bool(i_rOther.pTemplate) )
- {
- if ( NOT pTemplate )
- return -1;
- else
- return +1;
- }
- else if ( NOT pTemplate )
- return 0;
- else
- return pTemplate->Compare( *i_rOther.pTemplate );
-}
-
-void
-NameSegment::Get_Text_AsScope( StreamStr & o_rOut,
- const Gate & i_rGate ) const
-{
- o_rOut << sName;
- if ( pTemplate )
- pTemplate->Get_Text( o_rOut, i_rGate );
-}
-
-void
-NameSegment::Get_Text_AsMainType( StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const
-{
- o_rName << sName;
- if ( pTemplate )
- pTemplate->Get_Text( o_rPostName, i_rGate );
-}
-
-
-//********************* NameChain ******************//
-
-NameChain::NameChain()
-// : aSegments
-{
-}
-
-NameChain::~NameChain()
-{
-}
-
-void
-NameChain::Add_Segment( const char * i_sSeg )
-{
- aSegments.push_back( NameSegment(i_sSeg) );
-}
-
-List_TplParameter &
-NameChain::Templatize_LastSegment()
-{
- csv_assert( aSegments.size() > 0 );
-
- return aSegments.back().AddTemplate();
-}
-
-intt
-NameChain::Compare( const NameChain & i_rChain ) const
-{
- intt nResult = intt(aSegments.size()) - intt(i_rChain.aSegments.size());
- if (nResult != 0)
- return nResult;
-
- std::vector< NameSegment >::const_iterator it1 = aSegments.begin();
- std::vector< NameSegment >::const_iterator it1End = aSegments.end();
- std::vector< NameSegment >::const_iterator it2 = i_rChain.aSegments.begin();
-
- for ( ; it1 != it1End; ++it1, ++it2 )
- {
- nResult = (*it1).Compare(*it2);
- if (nResult != 0)
- return nResult;
- }
-
- return 0;
-}
-
-const String &
-NameChain::LastSegment() const
-{
- if ( aSegments.size() > 0 )
- return aSegments.back().Name();
- return String::Null_();
-}
-
-void
-NameChain::Get_Text( StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const
-{
- std::vector< NameSegment >::const_iterator it = aSegments.begin();
- std::vector< NameSegment >::const_iterator itEnd = aSegments.end();
-
- if ( it == itEnd )
- return;
-
- for ( --itEnd; it != itEnd; ++it )
- {
- (*it).Get_Text_AsScope( o_rPreName, i_rGate );
- o_rPreName << "::";
- }
- (*it).Get_Text_AsMainType( o_rName, o_rPostName, i_rGate );
-}
-
-
-
-} // namespace ut
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/tplparam.cxx b/autodoc/source/ary/cpp/tplparam.cxx
deleted file mode 100644
index 82f53b6e..00000000
--- a/autodoc/source/ary/cpp/tplparam.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "tplparam.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_type.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
-namespace ut
-{
-
-TplParameter_Type::TplParameter_Type( Tid i_nType )
- : nType(i_nType)
-{
-}
-
-TplParameter_Type::~TplParameter_Type()
-{
-}
-
-intt
-TplParameter_Type::Compare( const TemplateParameter & i_rOther ) const
-{
- const TplParameter_Type * pOther
- = dynamic_cast< const TplParameter_Type* >( &i_rOther );
- if (pOther == 0)
- return -1;
-
- return static_cast<long>(nType.Value())
- - static_cast<long>(pOther->nType.Value());
-}
-
-void
-TplParameter_Type::Get_Text( StreamStr & o_rOut,
- const ary::cpp::Gate & i_rGate ) const
-{
- i_rGate.Types().Get_TypeText( o_rOut, nType );
-}
-
-} // namespace ut
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/tplparam.hxx b/autodoc/source/ary/cpp/tplparam.hxx
deleted file mode 100644
index 701a2ad3..00000000
--- a/autodoc/source/ary/cpp/tplparam.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_TPLPARAM_HXX
-#define ARY_CPP_TPLPARAM_HXX
-
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
- class UsedType;
- class Gate;
-
-namespace ut
-{
-
-
-class TemplateParameter
-{
- public:
- virtual ~TemplateParameter() {}
-
- virtual intt Compare(
- const TemplateParameter &
- i_rOther ) const = 0;
- virtual void Get_Text(
- StreamStr & o_rOut,
- const ary::cpp::Gate &
- i_rGate ) const = 0;
-};
-
-
-class TplParameter_Type : public TemplateParameter
-{
- public:
- TplParameter_Type(
- Tid i_nType );
- ~TplParameter_Type();
-
- virtual intt Compare(
- const TemplateParameter &
- i_rOther ) const;
- virtual void Get_Text(
- StreamStr & o_rOut,
- const ary::cpp::Gate &
- i_rGate ) const;
- private:
- Tid nType;
-};
-
-} // namespace ut
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/cpp/usedtype.cxx b/autodoc/source/ary/cpp/usedtype.cxx
deleted file mode 100644
index 4bc0b0ed..00000000
--- a/autodoc/source/ary/cpp/usedtype.cxx
+++ /dev/null
@@ -1,578 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cpp/usedtype.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/symtreenode.hxx>
-#include <ary/cpp/c_ce.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_traits.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <ary/getncast.hxx>
-#include "tplparam.hxx"
-
-
-
-namespace
-{
-
-using namespace ::ary::cpp;
-typedef std::vector< ary::cpp::E_ConVol > PtrLevelVector;
-
-
-inline bool
-result2bool( intt i_nResult )
- { return i_nResult < 0; }
-
-
-intt compare_PtrLevelVector(
- const PtrLevelVector &
- i_r1,
- const PtrLevelVector &
- i_r2 );
-inline intt
-compare_ConVol( E_ConVol i_e1,
- E_ConVol i_e2 )
- { return intt(i_e1) - intt(i_e2); }
-
-inline intt
-compare_bool( bool i_b1,
- bool i_b2 )
- { return i_b1 == i_b2
- ? 0
- : i_b1
- ? -1
- : +1; }
-inline intt
-compare_Specialisation( E_TypeSpecialisation i_e1,
- E_TypeSpecialisation i_e2 )
- { return intt(i_e1) - intt(i_e2); }
-
-inline bool
-is_const( E_ConVol i_eCV )
- { return ( intt(i_eCV) & intt(CONVOL_const) ) != 0; }
-
-inline bool
-is_volatile( E_ConVol i_eCV )
- { return ( intt(i_eCV) & intt(CONVOL_volatile) ) != 0; }
-
-
-intt
-compare_PtrLevelVector( const PtrLevelVector & i_r1,
- const PtrLevelVector & i_r2 )
-{
- intt nResult = i_r1.size() - i_r2.size();
- if ( nResult != 0 )
- return nResult;
-
- PtrLevelVector::const_iterator it1 = i_r1.begin();
- PtrLevelVector::const_iterator it1End = i_r1.end();
- PtrLevelVector::const_iterator it2 = i_r2.begin();
-
- for ( ; it1 != it1End; ++it1, ++it2 )
- {
- nResult = compare_ConVol(*it1, *it2);
- if ( nResult != 0 )
- return nResult;
- }
-
- return 0;
-}
-
-
-} // anonymous namespace
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-typedef symtree::Node<CeNode_Traits> CeNode;
-typedef ut::NameChain::const_iterator nc_iter;
-
-Ce_id CheckForRelatedCe_inNode(
- const CeNode & i_node,
- const StringVector& i_qualification,
- const String & i_name );
-
-
-UsedType::UsedType(Ce_id i_scope )
- : aPath(),
- aPtrLevels(),
- eConVol_Type(CONVOL_none),
- bIsReference(false),
- bIsAbsolute(false),
- bRefers2BuiltInType(false),
- eTypeSpecialisation(TYSP_none),
- nRelatedCe(0),
- nScope(i_scope)
-{
-}
-
-UsedType::~UsedType()
-{
-}
-
-
-bool
-UsedType::operator<( const UsedType & i_rType ) const
-{
- intt nResult = compare_bool( bIsAbsolute, i_rType.bIsAbsolute );
- if ( nResult != 0 )
- return result2bool(nResult);
-
- nResult = static_cast<intt>(nScope.Value())
- -
- static_cast<intt>(i_rType.nScope.Value());
- if ( nResult != 0 )
- return result2bool(nResult);
-
- nResult = aPath.Compare( i_rType.aPath );
- if ( nResult != 0 )
- return result2bool(nResult);
-
- nResult = compare_ConVol( eConVol_Type, i_rType.eConVol_Type );
- if ( nResult != 0 )
- return result2bool(nResult);
-
- nResult = compare_PtrLevelVector( aPtrLevels, i_rType.aPtrLevels );
- if ( nResult != 0 )
- return result2bool(nResult);
-
- nResult = compare_bool( bIsReference, i_rType.bIsReference );
- if ( nResult != 0 )
- return result2bool(nResult);
-
- nResult = compare_Specialisation( eTypeSpecialisation, i_rType.eTypeSpecialisation );
- if ( nResult != 0 )
- return result2bool(nResult);
-
- return false;
-}
-
-void
-UsedType::Set_Absolute()
-{
- bIsAbsolute = true;
-}
-
-void
-UsedType::Add_NameSegment( const char * i_sSeg )
-{
- aPath.Add_Segment(i_sSeg);
-}
-
-ut::List_TplParameter &
-UsedType::Enter_Template()
-{
- return aPath.Templatize_LastSegment();
-}
-
-void
-UsedType::Set_Unsigned()
-{
- eTypeSpecialisation = TYSP_unsigned;
-}
-
-void
-UsedType::Set_Signed()
-{
- eTypeSpecialisation = TYSP_signed;
-}
-
-void
-UsedType::Set_BuiltIn( const char * i_sType )
-{
- aPath.Add_Segment(i_sType);
- bRefers2BuiltInType = true;
-}
-
-void
-UsedType::Set_Const()
-{
- if (PtrLevel() == 0)
- eConVol_Type = E_ConVol(eConVol_Type | CONVOL_const);
- else
- aPtrLevels.back() = E_ConVol(aPtrLevels.back() | CONVOL_const);
-}
-
-void
-UsedType::Set_Volatile()
-{
- if (PtrLevel() == 0)
- eConVol_Type = E_ConVol(eConVol_Type | CONVOL_volatile);
- else
- aPtrLevels.back() = E_ConVol(aPtrLevels.back() | CONVOL_volatile);
-}
-
-void
-UsedType::Add_PtrLevel()
-{
- aPtrLevels.push_back(CONVOL_none);
-}
-
-void
-UsedType::Set_Reference()
-{
- bIsReference = true;
-}
-
-inline bool
-IsInternal(const ary::cpp::CodeEntity & i_ce)
-{
- const ary::doc::OldCppDocu *
- docu = dynamic_cast< const ary::doc::OldCppDocu* >(i_ce.Docu().Data());
- if (docu != 0)
- return docu->IsInternal();
- return false;
-}
-
-
-void
-UsedType::Connect2Ce( const CePilot & i_ces)
-{
- StringVector
- qualification;
- String
- name;
- Get_NameParts(qualification, name);
-
- for ( const CeNode * scope_node = CeNode_Traits::NodeOf_(
- i_ces.Find_Ce(nScope));
- scope_node != 0;
- scope_node = scope_node->Parent() )
- {
- nRelatedCe = CheckForRelatedCe_inNode(*scope_node, qualification, name);
- if ( nRelatedCe.IsValid() )
- {
- if ( IsInternal(i_ces.Find_Ce(nRelatedCe)) )
- nRelatedCe = Ce_id(0);
- return;
- }
- } // end for
-}
-
-void
-UsedType::Connect2CeOnlyKnownViaBaseClass(const Gate & i_gate)
-{
- csv_assert(nScope.IsValid());
- CesResultList
- instances = i_gate.Ces().Search_TypeName( LocalName() );
-
- // If there are no matches, or only one match that was already
- // accepted, all work is done.
- if ( (nRelatedCe.IsValid() AND instances.size() == 1)
- OR instances.size() == 0 )
- return;
-
- StringVector
- qualification;
- String
- name;
- Get_NameParts(qualification, name);
-
- const CodeEntity &
- scopece = i_gate.Ces().Find_Ce(nScope);
-
- // Else search for declaration in own class and then in base classes.
- // These would be of higher priority than those in parent namespaces.
- Ce_id
- foundce = RecursiveSearchCe_InBaseClassesOf(
- scopece, qualification, name, i_gate);
- if (foundce.IsValid())
- nRelatedCe = foundce;
-
- if ( nRelatedCe.IsValid() AND IsInternal(i_gate.Ces().Find_Ce(nRelatedCe)) )
- {
- nRelatedCe = Ce_id(0);
- }
-}
-
-bool
-UsedType::IsBuiltInType() const
-{
- return bRefers2BuiltInType
- AND aPtrLevels.size() == 0
- AND NOT bIsReference
- AND eConVol_Type == ary::cpp::CONVOL_none;
-}
-
-const String &
-UsedType::LocalName() const
-{
- return aPath.LastSegment();
-}
-
-E_TypeSpecialisation
-UsedType::TypeSpecialisation() const
-{
- return eTypeSpecialisation;
-}
-
-void
-UsedType::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ary::ClassId
-UsedType::get_AryClass() const
-{
- return class_id;
-}
-
-Rid
-UsedType::inq_RelatedCe() const
-{
- return nRelatedCe.Value();
-}
-
-bool
-UsedType::inq_IsConst() const
-{
- if ( is_const(eConVol_Type) )
- return true;
- for ( PtrLevelVector::const_iterator it = aPtrLevels.begin();
- it != aPtrLevels.end();
- ++it )
- {
- if ( is_const(*it) )
- return true;
- }
-
- return false;
-}
-
-void
-UsedType::inq_Get_Text( StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const Gate & i_rGate ) const
-{
- if ( is_const(eConVol_Type) )
- o_rPreName << "const ";
- if ( is_volatile(eConVol_Type) )
- o_rPreName << "volatile ";
- if ( bIsAbsolute )
- o_rPreName << "::";
-
- aPath.Get_Text( o_rPreName, o_rName, o_rPostName, i_rGate );
-
- for ( PtrLevelVector::const_iterator it = aPtrLevels.begin();
- it != aPtrLevels.end();
- ++it )
- {
- o_rPostName << " *";
- if ( is_const(*it) )
- o_rPostName << " const";
- if ( is_volatile(*it) )
- o_rPostName << " volatile";
- }
- if ( bIsReference )
- o_rPostName << " &";
-}
-
-Ce_id
-UsedType::RecursiveSearchCe_InBaseClassesOf( const CodeEntity & i_mayBeClass,
- const StringVector & i_myQualification,
- const String & i_myName,
- const Gate & i_gate ) const
-{
- // Find in this class?
- const CeNode *
- basenode = CeNode_Traits::NodeOf_(i_mayBeClass);
- if (basenode == 0)
- return Ce_id(0);
- Ce_id
- found = CheckForRelatedCe_inNode(*basenode, i_myQualification, i_myName);
- if (found.IsValid())
- return found;
-
-
- const Class *
- cl = ary_cast<Class>(&i_mayBeClass);
- if (cl == 0)
- return Ce_id(0);
-
- for ( List_Bases::const_iterator it = cl->BaseClasses().begin();
- it != cl->BaseClasses().end();
- ++it )
- {
- csv_assert((*it).nId.IsValid());
- Ce_id
- base = i_gate.Types().Find_Type((*it).nId).RelatedCe();
- while (base.IsValid() AND is_type<Typedef>(i_gate.Ces().Find_Ce(base)) )
- {
- base = i_gate.Types().Find_Type(
- ary_cast<Typedef>(i_gate.Ces().Find_Ce(base))
- .DescribingType() )
- .RelatedCe();
- }
-
- if (base.IsValid())
- {
- const CodeEntity &
- basece = i_gate.Ces().Find_Ce(base);
- found = RecursiveSearchCe_InBaseClassesOf(
- basece, i_myQualification, i_myName, i_gate);
- if (found.IsValid())
- return found;
- }
- } // end for
-
- return Ce_id(0);
-}
-
-
-void
-UsedType::Get_NameParts( StringVector & o_qualification,
- String & o_name )
-{
- nc_iter nit = aPath.begin();
- nc_iter nit_end = aPath.end();
- csv_assert(nit != nit_end); // Each UsedType has to have a local name.
-
- --nit_end;
- o_name = (*nit_end).Name();
- for ( ;
- nit != nit_end;
- ++nit )
- {
- o_qualification.push_back( (*nit).Name() );
- }
-}
-
-Ce_id
-CheckForRelatedCe_inNode( const CeNode & i_node,
- const StringVector & i_qualification,
- const String & i_name )
-{
- if (i_qualification.size() > 0)
- {
- Ce_id
- ret(0);
- i_node.SearchBelow( ret,
- i_qualification.begin(),
- i_qualification.end(),
- i_name );
- return ret;
- }
- else
- {
- return i_node.Search(i_name);
- }
-}
-
-
-namespace ut
-{
-
-List_TplParameter::List_TplParameter()
- : aTplParameters()
-{
-}
-
-List_TplParameter::~List_TplParameter()
-{
- csv::erase_container_of_heap_ptrs(aTplParameters);
-}
-
-void
-List_TplParameter::AddParam_Type( Type_id i_nType )
-{
- aTplParameters.push_back( new TplParameter_Type(i_nType) );
-}
-
-void
-List_TplParameter::Get_Text( StreamStr & o_rOut,
- const ary::cpp::Gate & i_rGate ) const
-{
- Vector_TplArgument::const_iterator it = aTplParameters.begin();
- Vector_TplArgument::const_iterator itEnd = aTplParameters.end();
-
- if ( it == itEnd )
- {
- o_rOut << "<>";
- return;
- }
-
- o_rOut << "< ";
-
- (*it)->Get_Text( o_rOut, i_rGate );
-
- for ( ++it; it != itEnd; ++it )
- {
- o_rOut << ", ";
- (*it)->Get_Text( o_rOut, i_rGate );
- }
-
- o_rOut << " >";
-}
-
-intt
-List_TplParameter::Compare( const List_TplParameter & i_rOther ) const
-{
- intt nResult = intt(aTplParameters.size()) - intt(i_rOther.aTplParameters.size());
-
- if (nResult != 0)
- return nResult;
-
- Vector_TplArgument::const_iterator it1 = aTplParameters.begin();
- Vector_TplArgument::const_iterator it1End = aTplParameters.end();
- Vector_TplArgument::const_iterator it2 = i_rOther.aTplParameters.begin();
-
- for ( ; it1 != it1End; ++it1, ++it2 )
- {
- nResult = (*it1)->Compare( *(*it2) );
- if (nResult != 0)
- return nResult;
- }
-
- return 0;
-}
-
-
-} // namespace ut
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/doc/d_boolean.cxx b/autodoc/source/ary/doc/d_boolean.cxx
deleted file mode 100644
index c4ed5e32..00000000
--- a/autodoc/source/ary/doc/d_boolean.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/doc/d_boolean.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-Boolean::~Boolean()
-{
-}
-
-void
-Boolean::do_Accept(csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-
-
-
-} // namespace doc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/doc/d_docu.cxx b/autodoc/source/ary/doc/d_docu.cxx
deleted file mode 100644
index 9ec031d1..00000000
--- a/autodoc/source/ary/doc/d_docu.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/doc/d_docu.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/doc/d_node.hxx>
-
-namespace ary
-{
-namespace doc
-{
-
-Documentation::Documentation()
- : pData(0)
-{
-}
-
-Documentation::~Documentation()
-{
-}
-
-void
-Documentation::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-
-
-
-} // namespace doc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/doc/d_node.cxx b/autodoc/source/ary/doc/d_node.cxx
deleted file mode 100644
index 0722ead0..00000000
--- a/autodoc/source/ary/doc/d_node.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/doc/d_node.hxx>
-
-
-namespace ary
-{
-namespace doc
-{
-
-
-
-Node::~Node()
-{
-}
-
-Node::Node(nodetype::id i_type)
- : nType(i_type),
- pNext(0)
-{
-}
-
-void
-Node::Add_toChain( DYN Node & pass_nextNode )
-{
- if (NOT pNext)
- pNext = &pass_nextNode;
- else
- pNext->Add_toChain(pass_nextNode);
-}
-
-uintt
-Node::ListSize() const
-{
- return pNext
- ? pNext->ListSize() + 1
- : 1;
-}
-
-
-
-} // namespace doc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/doc/d_oldcppdocu.cxx b/autodoc/source/ary/doc/d_oldcppdocu.cxx
deleted file mode 100644
index bcf655df..00000000
--- a/autodoc/source/ary/doc/d_oldcppdocu.cxx
+++ /dev/null
@@ -1,339 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/doc/d_oldcppdocu.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/info/all_tags.hxx>
-#include <ary/info/docstore.hxx>
-#include <ary/info/infodisp.hxx>
-#include <docu_node_ids.hxx>
-
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-using namespace info;
-
-
-
-
-unsigned char C_ucNO_INDEX = 255;
-typedef DYN StdTag * (F_CREATE)();
-
-
-OldCppDocu::OldCppDocu()
- : Node(docnt::nt_OldCppDocu),
- bIsObsolete(false),
- bIsInternal(false),
- bIsInterface(false)
-{
- memset( nTags, C_ucNO_INDEX, size_t(C_eAtTag_NrOfClasses) );
-}
-
-OldCppDocu::~OldCppDocu()
-{
-}
-
-void
-OldCppDocu::Store2( info::DocuStore & o_rDocuStore )
-{
- o_rDocuStore.Store2ConnectedDeclaration(*this);
-}
-
-AtTag *
-OldCppDocu::Create_StdTag( E_AtTagId i_eId )
-{
- UINT8 nIndex = static_cast<UINT8>(i_eId);
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new StdTag(i_eId);
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::CheckIn_BaseTag()
-{
- UINT8 nIndex = atc_base;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new BaseTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::CheckIn_ExceptionTag()
-{
- UINT8 nIndex = atc_exception;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new ExceptionTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::Create_ImplementsTag()
-{
- UINT8 nIndex = atc_implements;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new ImplementsTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::Create_KeywordTag()
-{
- UINT8 nIndex = atc_keyword;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new KeywordTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::CheckIn_ParameterTag()
-{
- UINT8 nIndex = atc_parameter;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new ParameterTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::CheckIn_SeeTag()
-{
- UINT8 nIndex = atc_see;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new SeeTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::CheckIn_TemplateTag()
-{
- UINT8 nIndex = atc_template;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new TemplateTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::Create_LabelTag()
-{
- UINT8 nIndex = atc_label;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new LabelTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::Create_DefaultTag()
-{
- UINT8 nIndex = atid_descr;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new StdTag(atid_descr);
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-AtTag *
-OldCppDocu::Create_SinceTag()
-{
- UINT8 nIndex = atc_since;
- if ( nTags[nIndex] == C_ucNO_INDEX )
- {
- AtTag * ret = new SinceTag();
- NewTag(nIndex) = ret;
- return ret;
- }
- else
- {
- return GetTag(nIndex).GetFollower();
- }
-}
-
-
-void
-OldCppDocu::Replace_AtShort_By_AtDescr()
-{
- unsigned char nPosInTags = nTags[atid_short];
- if ( nPosInTags == C_ucNO_INDEX )
- return;
-
- AtTag * pTag = aTags[ nPosInTags ];
- if ( pTag == 0 ) // Should be csv_assert().
- return;
-
- csv_assert( dynamic_cast< StdTag* >(pTag) != 0 );
- StdTag * pStdTag = static_cast< StdTag* >(pTag);
-
- pStdTag->ChangeId2(atid_descr);
- nTags[atid_short] = C_ucNO_INDEX;
- nTags[atid_descr] = nPosInTags;
-}
-
-void
-OldCppDocu::Set_Obsolete()
-{
- bIsObsolete = true;
-}
-
-void
-OldCppDocu::Set_Internal()
-{
- bIsInternal = true;
-}
-
-const AtTag &
-OldCppDocu::Short() const
-{
- static const StdTag aNull_(atid_short);
-
- unsigned char nPosInTags = nTags[atid_short];
- if ( nPosInTags != C_ucNO_INDEX )
- {
- AtTag * pTag = aTags[ nPosInTags ];
- if ( pTag != 0 ) // Should be csv_assert().
- {
- return *pTag;
- }
- }
-
- return aNull_;
-}
-
-AtTag * &
-OldCppDocu::NewTag(UINT8 i_nIndex)
-{
- nTags[i_nIndex] = static_cast<UINT8>(aTags.size());
- aTags.push_back(0);
- return aTags.back();
-}
-
-AtTag &
-OldCppDocu::GetTag( UINT8 i_nIndex )
-{
- csv_assert( i_nIndex < C_eAtTag_NrOfClasses );
- csv_assert( nTags[i_nIndex] != C_ucNO_INDEX );
- csv_assert( aTags[nTags[i_nIndex]] != 0 );
- return * aTags[nTags[i_nIndex]];
-}
-
-bool
-OldCppDocu::IsInternal() const
-{
- return bIsInternal;
-}
-
-bool
-OldCppDocu::IsInterface() const
-{
- return bIsInterface;
-}
-
-void
-OldCppDocu::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-} // namespace doc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/doc/d_oldidldocu.cxx b/autodoc/source/ary/doc/d_oldidldocu.cxx
deleted file mode 100644
index 4fd7086f..00000000
--- a/autodoc/source/ary/doc/d_oldidldocu.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/doc/d_oldidldocu.hxx>
-
-// NOT FULLY DEFINED SERVICES
-#include <docu_node_ids.hxx>
-
-
-
-namespace ary
-{
-namespace doc
-{
-
-using namespace ::ary::inf;
-
-
-OldIdlDocu::OldIdlDocu()
- : Node(docnt::nt_OldIdlDocu),
- aShort(),
- aDescription(),
- aDeprecatedText(),
- aTags(),
- pExternShort(0),
- bIsPublished(false),
- bIsDeprecated(false),
- bIsOptional(false)
-{
-}
-
-OldIdlDocu::~OldIdlDocu()
-{
-}
-
-void
-OldIdlDocu::AddToken2DeprecatedText( DYN DocuToken & let_drToken )
-{
- aDeprecatedText.AddToken(let_drToken);
-}
-
-void
-OldIdlDocu::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-
-
-} // namespace info
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/doc/makefile.mk b/autodoc/source/ary/doc/makefile.mk
deleted file mode 100644
index 21989dcc..00000000
--- a/autodoc/source/ary/doc/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary_doc
-
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/d_boolean.obj \
- $(OBJ)$/d_docu.obj \
- $(OBJ)$/d_node.obj \
- $(OBJ)$/d_oldcppdocu.obj \
- $(OBJ)$/d_oldidldocu.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/autodoc/source/ary/idl/i2s_calculator.cxx b/autodoc/source/ary/idl/i2s_calculator.cxx
deleted file mode 100644
index 6b33e5a0..00000000
--- a/autodoc/source/ary/idl/i2s_calculator.cxx
+++ /dev/null
@@ -1,974 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "i2s_calculator.hxx"
-
-// NOT FULLY DEFINED SERVICES
-#include <algorithm>
-#include <string.h>
-#include <cosv/file.hxx>
-#include <ary/qualiname.hxx>
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/i_function.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_interface.hxx>
-#include <ary/idl/ik_interface.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_property.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/i_singleton.hxx>
-#include <ary/idl/i_siservice.hxx>
-#include <ary/idl/i_sisingleton.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/i_structelem.hxx>
-#include <ary/idl/i_typedef.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-#include <ary/namesort.hxx>
-#include <nametreenode.hxx>
-#include "i_nnfinder.hxx"
-#include "ia_ce.hxx"
-#include "ia_type.hxx"
-#include "is_ce.hxx"
-#include "is_type.hxx"
-#include "it_ce.hxx"
-#include "it_explicit.hxx"
-#include "it_sequence.hxx"
-#include "it_xnameroom.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-template <class DEST>
-DEST *
-SecondariesCalculator::SearchCe4Type(Type_id i_type)
-{
- Ce_id
- ce = lhf_Search_CeFromTypeId(i_type);
- if (ce.IsValid())
- return ary_cast<DEST>(& my_CeStorage()[ce]);
- return 0;
-}
-
-
-typedef stg::const_iterator<CodeEntity> stg_citerator;
-typedef stg::iterator<CodeEntity> stg_iterator;
-
-typedef stg::filter_iterator<CodeEntity,Interface>
- interface_iterator;
-
-typedef stg::filter_iterator<Type,ExplicitType>
- explicittype_iterator;
-
-typedef ary::stg::const_filter_iterator<CodeEntity,Typedef>
- typedef_citerator;
-
-
-inline Service *
-SecondariesCalculator::lhf_SearchService( Type_id i_nType )
-{
- return SearchCe4Type<Service>(i_nType);
-}
-
-inline Interface *
-SecondariesCalculator::lhf_SearchInterface( Type_id i_nType )
-{
- return SearchCe4Type<Interface>(i_nType);
-}
-
-inline Struct *
-SecondariesCalculator::lhf_SearchStruct( Type_id i_nType )
-{
- return SearchCe4Type<Struct>(i_nType);
-}
-
-inline Exception *
-SecondariesCalculator::lhf_SearchException( Type_id i_nType )
-{
- return SearchCe4Type<Exception>(i_nType);
-}
-
-inline const Ce_Storage &
-SecondariesCalculator::my_CeStorage() const
-{
- csv_assert(pCes != 0);
- return pCes->Storage();
-}
-
-inline const Type_Storage &
-SecondariesCalculator::my_TypeStorage() const
-{
- csv_assert(pTypes != 0);
- return pTypes->Storage();
-}
-
-inline Ce_Storage &
-SecondariesCalculator::my_CeStorage()
-{
- csv_assert(pCes != 0);
- return pCes->Storage();
-}
-
-inline Type_Storage &
-SecondariesCalculator::my_TypeStorage()
-{
- csv_assert(pTypes != 0);
- return pTypes->Storage();
-}
-
-inline void
-SecondariesCalculator::insert_into2sList( CodeEntity & o_out,
- int i_listIndex,
- Ce_id i_nCe )
- { o_out.Secondaries().Access_List(i_listIndex).push_back(i_nCe); }
-
-
-SecondariesCalculator::SecondariesCalculator( CeAdmin & i_ces,
- TypeAdmin & i_types )
- : pCes(&i_ces),
- pTypes(&i_types)
-{
-}
-
-SecondariesCalculator::~SecondariesCalculator()
-{
-}
-
-
-void
-SecondariesCalculator::CheckAllInterfaceBases()
-{
- Module &
- rGlobalNamespace = pCes->GlobalNamespace();
- QualifiedName
- aXInterface("::com::sun::star::uno::XInterface","::");
-
- const Type &
- rType = pTypes->CheckIn_Type( aXInterface,
- 0,
- rGlobalNamespace.CeId(),
- 0 );
- Type_id
- nTypeXInterface = rType.TypeId();
- const ExplicitType &
- rExplType = ary_cast<ExplicitType>(rType);
- Ce_id
- nCeXInterface = lhf_Search_CeForType(rExplType);
-
- interface_iterator itEnd( my_CeStorage().End() );
- for ( interface_iterator it( my_CeStorage().BeginUnreserved() );
- it != itEnd;
- ++it )
- {
- if (NOT it.IsValid())
- continue;
-
- Interface &
- rInterface = *it;
- if ( NOT rInterface.HasBase() // According to UNO IDL syntax, an interface without base has com::sun::star::uno::XInterface as base.
- AND rInterface.CeId() != nCeXInterface ) // XInterface must not be base of itself.
- {
- rInterface.Add_Base(nTypeXInterface, 0);
- }
- } // end for
-}
-
-void
-SecondariesCalculator::Connect_Types2Ces()
-{
- explicittype_iterator itEnd( my_TypeStorage().End() );
- for ( explicittype_iterator it( my_TypeStorage().BeginUnreserved() );
- it != itEnd;
- ++it )
- {
- if (NOT it.IsValid())
- continue;
-
- ExplicitType &
- rType = ary_cast<ExplicitType>(*it);
- Ce_id
- nRelatedCe = lhf_Search_CeForType(rType);
- if (nRelatedCe.IsValid())
- {
- Ce_Type *
- pNew = new Ce_Type(nRelatedCe, rType.TemplateParameters());
- my_TypeStorage().Replace_Entity( rType.TypeId(),
- *pNew );
- }
- } // end for
-}
-
-void
-SecondariesCalculator::Gather_CrossReferences()
-{
- gather_Synonyms();
-
- for ( stg_iterator it = my_CeStorage().Begin();
- it != my_CeStorage().End();
- ++it )
- {
- (*it).Accept( static_cast< SPInst_asHost& >(*this) );
-
- } // end for
-
- sort_All2s();
-}
-
-void
-SecondariesCalculator::Make_Links2DeveloperManual(
- const String & i_devman_reffilepath )
-{
- csv::File
- aFile(i_devman_reffilepath, csv::CFM_READ);
- csv::OpenCloseGuard
- aFileOpener(aFile);
- if (aFileOpener)
- {
- Read_Links2DevManual(aFile);
- }
-}
-
-namespace
-{
-
-enum E_LinkMode
-{
- link2descr,
- link2ref
-};
-
-struct OrderCeIdsByName
-{
- OrderCeIdsByName(
- const Ce_Storage & i_storage )
- : rStorage(i_storage),
- aNameComparison() {}
- bool operator()(
- Ce_id i_ce1,
- Ce_id i_ce2 ) const
- {
- return aNameComparison( rStorage[i_ce1].LocalName(),
- rStorage[i_ce2].LocalName() );
- }
-
- private:
- const Ce_Storage & rStorage;
- LesserName aNameComparison;
-};
-
-
-}
-
-
-
-void
-SecondariesCalculator::do_Process( const Service & i_rData )
-{
- const Service &
- rService = ary_cast<Service>(i_rData);
-
- // Interfaces:
- assignImplementation_toAServicesInterfaces( rService.CeId(),
- rService.CeId(),
- interface_2s_ExportingServices );
- // Services and their interfaces:
- recursive_AssignIncludingService(rService.CeId(), rService);
-}
-
-void
-SecondariesCalculator::do_Process( const Interface & i_rData )
-{
- assign_AsDerivedInterface( ary_cast<Interface>(i_rData) );
-}
-
-void
-SecondariesCalculator::do_Process( const Struct & i_rData )
-{
- assign_AsDerivedStruct( ary_cast<Struct>(i_rData) );
-}
-
-void
-SecondariesCalculator::do_Process( const Exception & i_rData )
-{
- assign_AsDerivedException( ary_cast<Exception>(i_rData) );
-}
-
-void
-SecondariesCalculator::do_Process( const Typedef & )
-{
- // KORR_FUTURE
- // Find out what was meant here ???
-
-// const Typedef &
-// rTypedef = ary_cast<Typedef>(i_rData);
-}
-
-void
-SecondariesCalculator::do_Process( const Singleton & i_rData )
-{
- const Singleton &
- rSingleton = ary_cast<Singleton>(i_rData);
-
- Service *
- pServ = lhf_SearchService(rSingleton.AssociatedService());
- if (pServ != 0)
- {
- insert_into2sUnique( *pServ,
- service_2s_InstantiatingSingletons,
- rSingleton.CeId() );
- }
-
- // Interfaces:
- assignImplementation_toAServicesInterfaces( rSingleton.CeId(),
- lhf_Search_CeFromTypeId(rSingleton.AssociatedService()),
- interface_2s_ExportingSingletons );
-}
-
-void
-SecondariesCalculator::do_Process( const SglIfcService & i_rData )
-{
- const SglIfcService &
- rSglIfcService = ary_cast<SglIfcService>(i_rData);
-
- assignImplementation_toAServicesInterfaces( rSglIfcService.CeId(),
- rSglIfcService.CeId(),
- interface_2s_ExportingServices );
-}
-
-void
-SecondariesCalculator::do_Process( const SglIfcSingleton & i_rData )
-{
- const SglIfcSingleton &
- rSglIfcSingleton = ary_cast<SglIfcSingleton>(i_rData);
-
- Type_id nBase = rSglIfcSingleton.BaseInterface();
- recursive_AssignImplementation_toExportedInterface( rSglIfcSingleton.CeId(),
- nBase,
- interface_2s_ExportingSingletons );
-}
-
-void
-SecondariesCalculator::do_Process( const Function & i_rData )
-{
- const Function &
- rFunction = ary_cast<Function>(i_rData);
-
- recursive_AssignFunction_toCeAsReturn(rFunction.CeId(), rFunction.ReturnType());
-
- for ( Function::ParamList::const_iterator itp = rFunction.Parameters().begin();
- itp != rFunction.Parameters().end();
- ++itp )
- {
- recursive_AssignFunction_toCeAsParameter(rFunction.CeId(), (*itp).Type());
- } // end for (itp)
-
- for ( Function::ExceptionList::const_iterator itx = rFunction.Exceptions().begin();
- itx != rFunction.Exceptions().end();
- ++itx )
- {
- Exception *
- pX = lhf_SearchException(*itx);
- if (pX != 0)
- {
- insert_into2sUnique(*pX, exception_2s_RaisingFunctions, rFunction.CeId());
- }
- } // end for (itx)
-}
-
-void
-SecondariesCalculator::do_Process( const StructElement & i_rData )
-{
- const StructElement &
- rStructElement = ary_cast<StructElement>(i_rData);
-
- recursive_AssignStructElement_toCeAsDataType(rStructElement.CeId(), rStructElement.Type());
-}
-
-void
-SecondariesCalculator::do_Process( const Property & i_rData )
-{
- const Property &
- rProperty = ary_cast<Property>(i_rData);
-
- recursive_AssignStructElement_toCeAsDataType(rProperty.CeId(), rProperty.Type());
-}
-
-Ce_id
-SecondariesCalculator::lhf_Search_CeForType( const ExplicitType & i_rType ) const
-{
- const ExplicitNameRoom &
- rExplicitNameRoom = ary_cast<ExplicitNameRoom>(
- my_TypeStorage()[i_rType.NameRoom()] );
- Find_ModuleNode
- rNodeFinder( my_CeStorage(),
- rExplicitNameRoom.NameChain_Begin(),
- rExplicitNameRoom.NameChain_End(),
- i_rType.Name() );
-
- if ( rExplicitNameRoom.IsAbsolute() )
- {
- const Module &
- rGlobalNamespace = ary_cast<Module>(
- my_CeStorage()[predefined::ce_GlobalNamespace]);
- return Search_SubTree( rGlobalNamespace,
- rNodeFinder );
- }
- else
- {
- const Module &
- rStartModule = ary_cast<Module>(
- my_CeStorage()[i_rType.ModuleOfOccurrence()]);
- Ce_id ret = Search_SubTree_UpTillRoot( rStartModule,
- rNodeFinder );
- return ret;
- } // endif (rExplicitNameRoom.IsAbsolute()) else
-}
-
-Ce_id
-SecondariesCalculator::lhf_Search_CeFromTypeId( Type_id i_nType ) const
-{
- if (NOT i_nType.IsValid())
- return Ce_id(0);
- const Ce_Type *
- pType = ary_cast<Ce_Type>( & my_TypeStorage()[i_nType] );
- return pType != 0
- ? pType->RelatedCe()
- : Ce_id_Null();
-}
-
-void
-SecondariesCalculator::assign_CurLink( char * i_text,
- const String & i_link,
- const String & i_linkUI,
- bool i_isDescr,
- int i_lineCount )
-{
- csv_assert(i_text != 0);
-
- const ary::idl::Module *
- pModule = & ary_cast<Module>(
- my_CeStorage()[predefined::ce_GlobalNamespace]);
-
- char * pPastNext = 0;
- char * pNext = i_text;
- for ( ;
- (pPastNext = strstr(pNext,".")) != 0;
- pNext = pPastNext + 1 )
- {
- String sNext(pNext, pPastNext-pNext);
- Ce_id nModule = pModule->Search_Name(sNext);
- if (nModule.IsValid())
- {
- pModule = ary_cast<Module>( & my_CeStorage()[nModule] );
- }
- else
- {
- pModule = 0;
- }
-
- if (pModule == 0)
- {
- Cerr() << "Warning: Invalid line nr. "
- << i_lineCount
- << " in DevelopersGuide reference file:\n"
- << reinterpret_cast< const char* >(i_text)
- << "\n"
- << Endl();
- return;
- }
- } // end for
-
- pPastNext = strchr(pNext,':');
- bool bMember = pPastNext != 0;
- String sCe( pNext, (bMember ? csv::str::size(pPastNext-pNext) : csv::str::maxsize) );
-
-// KORR_FUTURE
-// String sMember(bMember ? pPastNext+1, "");
-
- Ce_id nCe = pModule->Search_Name(sCe);
- if (NOT nCe.IsValid())
- {
- Cerr() << "Warning: Invalid line nr. "
- << i_lineCount
- << " in DevelopersGuide reference file:\n"
- << reinterpret_cast< const char* >(i_text)
- << "\n"
- << Endl();
- return;
- }
-
- CodeEntity &
- rCe = my_CeStorage()[nCe];
- if (NOT bMember)
- {
- if (i_isDescr)
- rCe.Secondaries().Add_Link2DescriptionInManual(i_link, i_linkUI);
- else
- rCe.Secondaries().Add_Link2RefInManual(i_link, i_linkUI);
- return;
- }
- else
- {
- // KORR_FUTURE
- // Provisorial just doing nothing (or may be
- // adding a link at main Ces lists).
-// if (i_isDescr)
-// rCe.Secondaries().Add_Link2DescriptionInManual(i_link);
-// else
-// rCe.Secondaries().Add_Link2RefInManual(i_link);
- }
-}
-
-void
-SecondariesCalculator::gather_Synonyms()
-{
- const Ce_Storage &
- cstrg = my_CeStorage();
- typedef_citerator itEnd(cstrg.End());
- for ( typedef_citerator it(cstrg.Begin());
- it != itEnd;
- ++it )
- {
- if (NOT it.IsValid())
- continue;
-
- const Typedef &
- rTypedef = *it;
- recursive_AssignAsSynonym(rTypedef.CeId(), rTypedef);
- } // end for (itTd)
-}
-
-void
-SecondariesCalculator::recursive_AssignAsSynonym( Ce_id i_synonymousTypedefsId,
- const Typedef & i_TypedefToCheck )
-{
- Ce_id
- nCe = lhf_Search_CeFromTypeId(i_TypedefToCheck.DefiningType());
- if (NOT nCe.IsValid())
- return;
- CodeEntity &
- rCe = my_CeStorage()[nCe];
-
- switch (rCe.AryClass()) // KORR_FUTURE: make this faster, remove switch.
- {
- case Interface::class_id:
- insert_into2sList( rCe,
- interface_2s_SynonymTypedefs,
- i_synonymousTypedefsId );
- break;
- case Struct::class_id:
- insert_into2sList( rCe,
- struct_2s_SynonymTypedefs,
- i_synonymousTypedefsId );
- break;
- case Enum::class_id:
- insert_into2sList( rCe,
- enum_2s_SynonymTypedefs,
- i_synonymousTypedefsId );
- break;
- case Typedef::class_id:
- insert_into2sList( rCe,
- typedef_2s_SynonymTypedefs,
- i_synonymousTypedefsId );
- recursive_AssignAsSynonym( i_synonymousTypedefsId,
- static_cast< Typedef& >(rCe) );
- break;
- // default: do nothing.
- }
-}
-
-void
-SecondariesCalculator::recursive_AssignIncludingService( Ce_id i_includingServicesId,
- const Service & i_ServiceToCheckItsIncludes )
-{
- Dyn_StdConstIterator<CommentedRelation>
- pIncludedServices;
- i_ServiceToCheckItsIncludes.Get_IncludedServices(pIncludedServices);
-
- for ( StdConstIterator<CommentedRelation> &
- itServ = *pIncludedServices;
- itServ;
- ++itServ )
- {
- Service *
- pServ = lhf_SearchService((*itServ).Type());
- if (pServ != 0)
- {
- insert_into2sUnique( *pServ,
- service_2s_IncludingServices,
- i_includingServicesId
- );
- recursive_AssignIncludingService(i_includingServicesId, *pServ);
-
- } // end if
-
- assignImplementation_toAServicesInterfaces( i_includingServicesId,
- lhf_Search_CeFromTypeId( (*itServ).Type() ),
- interface_2s_ExportingServices );
- } // end for
-}
-
-void
-SecondariesCalculator::assign_AsDerivedInterface( const Interface & i_rDerived )
-{
- ary::Dyn_StdConstIterator<ary::idl::CommentedRelation>
- pHelp;
- ary::idl::ifc_interface::attr::Get_Bases(pHelp, i_rDerived);
-
- for ( ary::StdConstIterator<ary::idl::CommentedRelation> & it = *pHelp;
- it.operator bool();
- ++it )
- {
- Interface *
- pIfc = lhf_SearchInterface( (*it).Type() );
- if (pIfc == 0)
- continue;
-
- insert_into2sList( *pIfc,
- interface_2s_Derivations,
- i_rDerived.CeId() );
- } // end for
-}
-
-void
-SecondariesCalculator::assign_AsDerivedStruct( const Struct & i_rDerived )
-{
- Type_id
- nBase = i_rDerived.Base();
- if (nBase.IsValid())
- {
- Struct *
- pParent = lhf_SearchStruct(nBase);
- if (pParent != 0)
- {
- insert_into2sList( *pParent,
- struct_2s_Derivations,
- i_rDerived.CeId() );
- }
- }
-}
-
-void
-SecondariesCalculator::assign_AsDerivedException( const Exception & i_rDerived )
-{
- Type_id
- nBase = i_rDerived.Base();
- if (nBase.IsValid())
- {
- Exception *
- pParent = lhf_SearchException(nBase);
- if (pParent != 0)
- {
- insert_into2sList( *pParent,
- exception_2s_Derivations,
- i_rDerived.CeId() );
- } // end if
- } // end if
-}
-
-void
-SecondariesCalculator::assignImplementation_toAServicesInterfaces(
- Ce_id i_nImpl,
- Ce_id i_nService,
- E_2s_of_Interface i_eList )
-{
- if (NOT i_nService.IsValid())
- return;
- Service *
- pService = ary_cast<Service>( & my_CeStorage()[i_nService] );
- SglIfcService *
- pSglIfcService = ary_cast<SglIfcService>( & my_CeStorage()[i_nService] );
-
- if (pService != 0)
- {
- Dyn_StdConstIterator<CommentedRelation>
- pSupportedInterfaces;
- pService->Get_SupportedInterfaces(pSupportedInterfaces);
-
- for ( StdConstIterator<CommentedRelation> &
- itInfc = *pSupportedInterfaces;
- itInfc.operator bool();
- ++itInfc )
- {
- recursive_AssignImplementation_toExportedInterface( i_nImpl,
- (*itInfc).Type(),
- i_eList );
- } // end for
- }
- else if (pSglIfcService != 0)
- {
- Type_id nBase = pSglIfcService->BaseInterface();
- recursive_AssignImplementation_toExportedInterface( i_nImpl,
- nBase,
- i_eList );
- } // end if
-}
-
-void
-SecondariesCalculator::recursive_AssignImplementation_toExportedInterface(
- Ce_id i_nService,
- Type_id i_nExportedInterface,
- E_2s_of_Interface i_eList )
-{
- Interface *
- pIfc = lhf_SearchInterface(i_nExportedInterface);
- if (pIfc == 0)
- return;
-
- insert_into2sUnique( *pIfc,
- i_eList,
- i_nService );
- Dyn_StdConstIterator<CommentedRelation>
- pBases;
- ary::idl::ifc_interface::attr::Get_Bases(pBases, *pIfc);
- for ( StdConstIterator<CommentedRelation> & it = *pBases;
- it.operator bool();
- ++it )
- {
- recursive_AssignImplementation_toExportedInterface(i_nService, (*it).Type(), i_eList);
- }
-}
-
-void
-SecondariesCalculator::recursive_AssignFunction_toCeAsReturn( Ce_id i_nFunction,
- Type_id i_nReturnType )
-{
- Ce_id
- nCe = lhf_Search_CeFromTypeId(i_nReturnType);
- if (NOT nCe.IsValid())
- return;
-
- CodeEntity &
- rCe = my_CeStorage()[nCe];
- switch (rCe.AryClass()) // KORR_FUTURE: make this faster, remove switch.
- {
- case Interface::class_id:
- insert_into2sList( rCe,
- interface_2s_AsReturns,
- i_nFunction );
- break;
- case Struct::class_id:
- insert_into2sList( rCe,
- struct_2s_AsReturns,
- i_nFunction );
- break;
- case Enum::class_id:
- insert_into2sList( rCe,
- enum_2s_AsReturns,
- i_nFunction );
- break;
- case Typedef::class_id:
- insert_into2sList( rCe,
- typedef_2s_AsReturns,
- i_nFunction );
- recursive_AssignFunction_toCeAsReturn( i_nFunction,
- static_cast< Typedef& >(rCe).DefiningType() );
- break;
- // default: do nothing.
- }
-}
-
-void
-SecondariesCalculator::recursive_AssignFunction_toCeAsParameter( Ce_id i_nFunction,
- Type_id i_nParameterType )
-{
- Ce_id
- nCe = lhf_Search_CeFromTypeId(i_nParameterType);
- if (NOT nCe.IsValid())
- return;
-
- CodeEntity &
- rCe = my_CeStorage()[nCe];
- switch (rCe.AryClass()) // KORR_FUTURE: make this faster, remove switch.
- {
- case Interface::class_id:
- insert_into2sList( rCe,
- interface_2s_AsParameters,
- i_nFunction );
- break;
- case Struct::class_id:
- insert_into2sList( rCe,
- struct_2s_AsParameters,
- i_nFunction );
- break;
- case Enum::class_id:
- insert_into2sList( rCe,
- enum_2s_AsParameters,
- i_nFunction );
- break;
- case Typedef::class_id:
- insert_into2sList( rCe,
- typedef_2s_AsParameters,
- i_nFunction );
- recursive_AssignFunction_toCeAsParameter( i_nFunction,
- static_cast< Typedef& >(rCe).DefiningType() );
- break;
- // default: do nothing.
- }
-}
-
-void
-SecondariesCalculator::recursive_AssignStructElement_toCeAsDataType( Ce_id i_nDataElement,
- Type_id i_nDataType )
-{
- Ce_id
- nCe = lhf_Search_CeFromTypeId(i_nDataType);
- if (NOT nCe.IsValid())
- return;
-
- CodeEntity &
- rCe = my_CeStorage()[nCe];
- switch (rCe.AryClass()) // KORR_FUTURE: make this faster, remove switch.
- {
- case Interface::class_id:
- insert_into2sList( rCe,
- interface_2s_AsDataTypes,
- i_nDataElement );
- break;
- case Struct::class_id:
- insert_into2sList( rCe,
- struct_2s_AsDataTypes,
- i_nDataElement );
- break;
- case Enum::class_id:
- insert_into2sList( rCe,
- enum_2s_AsDataTypes,
- i_nDataElement );
- break;
- case Typedef::class_id:
- insert_into2sList( rCe,
- typedef_2s_AsDataTypes,
- i_nDataElement );
- recursive_AssignFunction_toCeAsParameter( i_nDataElement,
- static_cast< Typedef& >(rCe).DefiningType() );
- break;
- // default: do nothing.
- } // end switch
-}
-
-void
-SecondariesCalculator::insert_into2sUnique( CodeEntity & o_out,
- int i_listIndex,
- Ce_id i_nCe )
-{
- std::vector<Ce_id> &
- rOut = o_out.Secondaries().Access_List(i_listIndex);
- if (std::find(rOut.begin(),rOut.end(),i_nCe) != rOut.end())
- return;
- rOut.push_back(i_nCe);
-}
-
-void
-SecondariesCalculator::sort_All2s()
-{
- OrderCeIdsByName
- aIdOrdering(my_CeStorage());
-
- for ( stg_iterator it = my_CeStorage().Begin();
- it != my_CeStorage().End();
- ++it )
- {
- Ce_2s &
- r2s = (*it).Secondaries();
- int iCount = r2s.CountXrefLists();
- for (int i = 0; i < iCount; ++i)
- {
- std::sort( r2s.Access_List(i).begin(),
- r2s.Access_List(i).end(),
- aIdOrdering );
- } // end for (i)
- } // end for (it)
-}
-
-void
-SecondariesCalculator::Read_Links2DevManual( csv::bstream & i_file )
-{
- StreamLock aLine(300);
- StreamStr & rLine = aLine();
-
-
- String sCurLink;
- String sCurLinkUI;
- E_LinkMode eCurMode = link2ref;
-
- int lineCount = 0;
- const char * sLink = "LINK:";
- const char * sDescr = "DESCR:";
- const char * sTopic = "TOPIC:";
- const char * sRef = "REF:";
- const UINT8 cMaxASCIINumWhiteSpace = 32;
-
- while (NOT i_file.eod())
- {
- ++lineCount;
-
- rLine.reset();
- rLine.operator_read_line(i_file);
-
- if ( *rLine.c_str() >= 'a' )
- {
- assign_CurLink(rLine.begin(), sCurLink, sCurLinkUI, eCurMode == link2descr, lineCount);
- }
- else if ( strncmp(rLine.c_str(), sLink, strlen(sLink)) == 0 )
- {
- sCurLink = rLine.c_str()+5;
- sCurLinkUI.clear();
- }
- else if ( strncmp(rLine.c_str(), sDescr, strlen(sDescr)) == 0 )
- {
- sCurLinkUI = rLine.c_str()+6;
- }
- else if ( strncmp(rLine.c_str(), sTopic, strlen(sTopic)) == 0 )
- {
- eCurMode = link2descr;
- }
- else if ( strncmp(rLine.c_str(), sRef, strlen(sRef)) == 0 )
- {
- eCurMode = link2ref;
- }
- else if (static_cast<UINT8>(*rLine.c_str()) > cMaxASCIINumWhiteSpace)
- {
- assign_CurLink(rLine.begin(), sCurLink, sCurLinkUI, eCurMode == link2descr, lineCount);
- }
- // else
- // Ignore empty line.
-
- } // end while
-}
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i2s_calculator.hxx b/autodoc/source/ary/idl/i2s_calculator.hxx
deleted file mode 100644
index 04c5c215..00000000
--- a/autodoc/source/ary/idl/i2s_calculator.hxx
+++ /dev/null
@@ -1,298 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I2S_CALCULATOR_HXX
-#define ARY_IDL_I2S_CALCULATOR_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/tpl/processor.hxx>
- // PARAMETERS
-#include <ary/idl/i_types4idl.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
- class CeAdmin;
- class Ce_Storage;
- class TypeAdmin;
- class Type_Storage;
- class Module;
- class ExplicitType;
- class Function;
- class Interface;
- class Property;
- class Typedef;
- class Service;
- class Singleton;
- class SglIfcService;
- class SglIfcSingleton;
- class Struct;
- class StructElement;
- class Exception;
- class Ce_2s;
-}
-}
-
-
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-enum E_2s_of_Service
-{
- service_2s_IncludingServices,
- service_2s_InstantiatingSingletons
-};
-
-enum E_2s_of_Interface
-{
- interface_2s_Derivations,
- interface_2s_ExportingServices,
- interface_2s_ExportingSingletons,
- interface_2s_SynonymTypedefs,
-// interface_2s_UsingTypedefs,
- interface_2s_AsReturns,
-// interface_2s_AsIndirectReturns,
- interface_2s_AsParameters,
-// interface_2s_AsIndirectParameters,
- interface_2s_AsDataTypes
-};
-
-enum E_2s_of_Struct
-{
- struct_2s_Derivations,
- struct_2s_SynonymTypedefs,
-// struct_2s_UsingTypedefs,
- struct_2s_AsReturns,
-// struct_2s_AsIndirectReturns,
- struct_2s_AsParameters,
-// struct_2s_AsIndirectParameters,
- struct_2s_AsDataTypes
-};
-
-enum E_2s_of_Enum
-{
- enum_2s_SynonymTypedefs,
-// enum_2s_UsingTypedefs,
- enum_2s_AsReturns,
-// enum_2s_AsIndirectReturns,
- enum_2s_AsParameters,
-// enum_2s_AsIndirectParameters,
- enum_2s_AsDataTypes
-};
-
-enum E_2s_of_Typedef
-{
- typedef_2s_SynonymTypedefs,
-// typedef_2s_UsingTypedefs,
- typedef_2s_AsReturns,
-// typedef_2s_AsIndirectReturns,
- typedef_2s_AsParameters,
-// typedef_2s_AsIndirectParameters,
- typedef_2s_AsDataTypes
-};
-
-enum E_2s_of_Exceptions
-{
- exception_2s_Derivations,
- exception_2s_RaisingFunctions
-};
-
-
-
-class SPInst_asHost : public csv::ProcessorIfc,
- public csv::ConstProcessor<Service>,
- public csv::ConstProcessor<Interface>,
- public csv::ConstProcessor<Struct>,
- public csv::ConstProcessor<Exception>,
- public csv::ConstProcessor<Typedef>,
- public csv::ConstProcessor<Singleton>,
- public csv::ConstProcessor<Function>,
- public csv::ConstProcessor<StructElement>,
- public csv::ConstProcessor<Property>,
- public csv::ConstProcessor<SglIfcService>,
- public csv::ConstProcessor<SglIfcSingleton>
-{
-};
-
-
-
-
-/** This class scans the parsed data and produces several
- secondary data like cross references and alphabetical indices.
-
- In this declaration "Secondaries" or "2s" mean those secondary data.
-
- @see Ce_2s
-*/
-class SecondariesCalculator : public SPInst_asHost
-{
- public:
- // LIFECYCLE
- SecondariesCalculator(
- CeAdmin & i_ces,
- TypeAdmin & i_types );
- virtual ~SecondariesCalculator();
-
- // OPERATIONS
- void CheckAllInterfaceBases();
- void Connect_Types2Ces();
- void Gather_CrossReferences();
- void Make_Links2DeveloperManual(
- const String & i_devman_reffilepath );
-
- private:
- // Interface CeHost These are the points to gather cross
- // references:
- virtual void do_Process(
- const Service & i_rData );
- virtual void do_Process(
- const Interface & i_rData );
- virtual void do_Process(
- const Struct & i_rData );
- virtual void do_Process(
- const Exception & i_rData );
- virtual void do_Process(
- const Typedef & i_rData );
- virtual void do_Process(
- const Singleton & i_rData );
- virtual void do_Process(
- const Function & i_rData );
- virtual void do_Process(
- const StructElement &
- i_rData );
- virtual void do_Process(
- const Property & i_rData );
- virtual void do_Process(
- const SglIfcService &
- i_rData );
- virtual void do_Process(
- const SglIfcSingleton &
- i_rData );
-
- // Locals
- const Ce_Storage & my_CeStorage() const;
- const Type_Storage &
- my_TypeStorage() const;
- Ce_Storage & my_CeStorage();
- Type_Storage & my_TypeStorage();
-
- template <class DEST>
- DEST * SearchCe4Type(
- Type_id i_type );
- Ce_id lhf_Search_CeForType(
- const ExplicitType &
- i_rType ) const;
- Ce_id lhf_Search_CeFromTypeId(
- Type_id i_nType ) const;
- Service * lhf_SearchService(
- Type_id i_nServ );
- Interface * lhf_SearchInterface(
- Type_id i_nIfc );
- Struct * lhf_SearchStruct(
- Type_id i_nIfc );
- Exception * lhf_SearchException(
- Type_id i_nIfc );
- void assign_CurLink(
- char * i_text,
- const String & i_link,
- const String & i_linkUI,
- bool i_isDescr, /// @descr true: description, false: reference.
- int i_lineCount );
- void gather_Synonyms();
- void recursive_AssignAsSynonym(
- Ce_id i_synonymousTypedefsId,
- const Typedef & i_TypedefToCheck );
- void recursive_AssignIncludingService(
- Ce_id i_includingServicesId,
- const Service & i_ServiceToCheckItsIncludes );
- void assign_AsDerivedInterface(
- const Interface & i_rDerived );
- void assign_AsDerivedStruct(
- const Struct & i_rDerived );
- void assign_AsDerivedException(
- const Exception & i_rDerived );
- void assignImplementation_toAServicesInterfaces(
- Ce_id i_nImpl,
- Ce_id i_nService,
- E_2s_of_Interface i_eList );
- void recursive_AssignImplementation_toExportedInterface(
- Ce_id i_nService,
- Type_id i_nExportedInterface,
- E_2s_of_Interface i_eList );
- void recursive_AssignFunction_toCeAsReturn(
- Ce_id i_nFunction,
- Type_id i_nReturnType );
- void recursive_AssignFunction_toCeAsParameter(
- Ce_id i_nFunction,
- Type_id i_nParameterType );
-
- /** @param i_nDataElement
- May be the ID of an struct element as well as an exception element
- or a property.
- */
- void recursive_AssignStructElement_toCeAsDataType(
- Ce_id i_nDataElement,
- Type_id i_nDataType );
- void insert_into2sList(
- CodeEntity & o_out,
- int i_listIndex,
- Ce_id i_nCe );
- void insert_into2sUnique(
- CodeEntity & o_out,
- int i_listIndex,
- Ce_id i_nCe );
- /// Sorts secondary production lists alphabetical.
- void sort_All2s();
-
- void Read_Links2DevManual(
- csv::bstream & i_file );
-
- // DATA
- CeAdmin * pCes;
- TypeAdmin * pTypes;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_attribute.cxx b/autodoc/source/ary/idl/i_attribute.cxx
deleted file mode 100644
index 56370cbf..00000000
--- a/autodoc/source/ary/idl/i_attribute.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_attribute.hxx>
-#include <ary/idl/ik_attribute.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/getncast.hxx>
-#include <sci_impl.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-Attribute::Attribute( const String & i_sName,
- Ce_id i_nService,
- Ce_id i_nModule,
- Type_id i_nType,
- bool i_bReadonly,
- bool i_bBound )
- : sName(i_sName),
- nOwner(i_nService),
- nNameRoom(i_nModule),
- nType(i_nType),
- aGetExceptions(),
- aSetExceptions(),
- bReadonly(i_bReadonly),
- bBound(i_bBound)
-{
-}
-
-Attribute::~Attribute()
-{
-}
-
-
-void
-Attribute::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Attribute::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Attribute::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Attribute::inq_NameRoom() const
-{
- return nNameRoom;
-}
-
-Ce_id
-Attribute::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Attribute::inq_SightLevel() const
-{
- return sl_Member;
-}
-
-namespace ifc_attribute
-{
-
-inline const Attribute &
-attribute_cast( const CodeEntity & i_ce )
-{
- csv_assert( is_type<Attribute>(i_ce) );
- return static_cast< const Attribute& >(i_ce);
-}
-
-bool
-attr::HasAnyStereotype( const CodeEntity & i_ce )
-{
- const Attribute & rAttr = attribute_cast(i_ce);
- return rAttr.bReadonly OR rAttr.bBound;
-}
-
-bool
-attr::IsReadOnly( const CodeEntity & i_ce )
-{
- return attribute_cast(i_ce).bReadonly;
-}
-
-bool
-attr::IsBound( const CodeEntity & i_ce )
-{
- return attribute_cast(i_ce).bBound;
-}
-
-Type_id
-attr::Type( const CodeEntity & i_ce )
-{
- return attribute_cast(i_ce).nType;
-}
-
-void
-attr::Get_GetExceptions( Dyn_TypeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result
- = new SCI_Vector<Type_id>( attribute_cast(i_ce).aGetExceptions );
-}
-
-void
-attr::Get_SetExceptions( Dyn_TypeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result
- = new SCI_Vector<Type_id>( attribute_cast(i_ce).aSetExceptions );
-}
-
-
-} // namespace ifc_attribute
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_ce.cxx b/autodoc/source/ary/idl/i_ce.cxx
deleted file mode 100644
index 497d7c79..00000000
--- a/autodoc/source/ary/idl/i_ce.cxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_ce.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/doc/d_oldidldocu.hxx>
-#include <ary/getncast.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-CodeEntity::CodeEntity()
- : aDocu(),
- p2s(0)
-{
-}
-
-CodeEntity::~CodeEntity()
-{
-}
-
-const Ce_2s &
-CodeEntity::Secondaries() const
-{
- return const_cast<CodeEntity*>(this)->Secondaries();
-}
-
-Ce_2s &
-CodeEntity::Secondaries()
-{
- if (p2s)
- return *p2s;
- p2s = Ce_2s::Create_(AryClass());
- return *p2s;
-}
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_ce2s.cxx b/autodoc/source/ary/idl/i_ce2s.cxx
deleted file mode 100644
index 89a1bd10..00000000
--- a/autodoc/source/ary/idl/i_ce2s.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_ce.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <ary/getncast.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-namespace
-{
-const std::vector<Ce_id> C_sNullVector_Ce_ids;
-}
-
-
-Ce_2s::~Ce_2s()
-{
- csv::erase_container_of_heap_ptrs(aXrefLists);
-}
-
-DYN Ce_2s *
-Ce_2s::Create_( ClassId )
-{
- return new Ce_2s;
-}
-
-
-std::vector<Ce_id> &
-Ce_2s::Access_List( int i_indexOfList )
-{
- csv_assert(i_indexOfList >= 0 AND i_indexOfList < 1000);
-
- while (i_indexOfList >= (int) aXrefLists.size())
- {
- aXrefLists.push_back(new std::vector<Ce_id>);
- }
- return *aXrefLists[i_indexOfList];
-}
-
-const std::vector<Ce_id> &
-Ce_2s::List( int i_indexOfList ) const
-{
- if (uintt(i_indexOfList) < aXrefLists.size())
- return *aXrefLists[i_indexOfList];
- else
- return C_sNullVector_Ce_ids;
-}
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_comrela.cxx b/autodoc/source/ary/idl/i_comrela.cxx
deleted file mode 100644
index 3e3d8bea..00000000
--- a/autodoc/source/ary/idl/i_comrela.cxx
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_comrela.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-// KORR_FUTURE Currently unneeded file. May become useful later.
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_constant.cxx b/autodoc/source/ary/idl/i_constant.cxx
deleted file mode 100644
index e03d829e..00000000
--- a/autodoc/source/ary/idl/i_constant.cxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_constant.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/ik_constant.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-Constant::Constant( const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- Type_id i_nType,
- const String & i_sInitValue )
- : sName(i_sName),
- nNameRoom(i_nNameRoom),
- nOwner(i_nOwner),
- nType(i_nType),
- sInitValue(i_sInitValue)
-{
-}
-
-Constant::~Constant()
-{
-}
-
-void
-Constant::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-
-ClassId
-Constant::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Constant::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Constant::inq_NameRoom() const
-{
- return nNameRoom;
-}
-
-Ce_id
-Constant::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Constant::inq_SightLevel() const
-{
- return sl_Member;
-}
-
-
-namespace ifc_constant
-{
-
-inline const Constant &
-constant_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Constant::class_id );
- return static_cast< const Constant& >(i_ce);
-}
-
-Type_id
-attr::Type( const CodeEntity & i_ce )
-{
- return constant_cast(i_ce).nType;
-}
-
-const String &
-attr::Value( const CodeEntity & i_ce )
-{
- return constant_cast(i_ce).sInitValue;
-}
-
-} // namespace ifc_constant
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_constgroup.cxx b/autodoc/source/ary/idl/i_constgroup.cxx
deleted file mode 100644
index 7008f94d..00000000
--- a/autodoc/source/ary/idl/i_constgroup.cxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_constgroup.hxx>
-#include <ary/idl/ik_constgroup.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-ConstantsGroup::ConstantsGroup( const String & i_sName,
- Ce_id i_nModule )
- : sName(i_sName),
- nModule(i_nModule),
- aConstants()
-{
-}
-
-ConstantsGroup::~ConstantsGroup()
-{
-}
-
-void
-ConstantsGroup::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-ConstantsGroup::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-ConstantsGroup::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-ConstantsGroup::inq_NameRoom() const
-{
- return nModule;
-}
-
-Ce_id
-ConstantsGroup::inq_Owner() const
-{
- return nModule;
-}
-
-E_SightLevel
-ConstantsGroup::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_constgroup
-{
-
-inline const ConstantsGroup &
-constgroup_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == ConstantsGroup::class_id );
- return static_cast< const ConstantsGroup& >(i_ce);
-}
-
-void
-attr::Get_Constants( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(constgroup_cast(i_ce).aConstants);
-}
-
-} // namespace ifc_constgroup
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_enum.cxx b/autodoc/source/ary/idl/i_enum.cxx
deleted file mode 100644
index 6f0e3920..00000000
--- a/autodoc/source/ary/idl/i_enum.cxx
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/ik_enum.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-#include "i2s_calculator.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-Enum::Enum( const String & i_sName,
- Ce_id i_nOwner )
- : sName(i_sName),
- nOwner(i_nOwner),
- aValues()
-{
-}
-
-Enum::~Enum()
-{
-}
-
-void
-Enum::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Enum::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Enum::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Enum::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Enum::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Enum::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_enum
-{
-
-inline const Enum &
-enum_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Enum::class_id );
- return static_cast< const Enum& >(i_ce);
-}
-
-void
-attr::Get_Values( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(enum_cast(i_ce).aValues);
-}
-
-
-void
-xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_SynonymTypedefs));
-}
-
-void
-xref::Get_AsReturns( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsReturns));
-}
-
-void
-xref::Get_AsParameters( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsParameters));
-}
-
-void
-xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(enum_2s_AsDataTypes));
-}
-
-} // namespace ifc_enum
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_enumvalue.cxx b/autodoc/source/ary/idl/i_enumvalue.cxx
deleted file mode 100644
index 5a851271..00000000
--- a/autodoc/source/ary/idl/i_enumvalue.cxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_enumvalue.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/ik_enumvalue.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-EnumValue::EnumValue( const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- const String & i_sInitValue )
- : sName(i_sName),
- nOwner(i_nOwner),
- nNameRoom(i_nNameRoom),
- sValue(i_sInitValue)
-{
-}
-
-EnumValue::~EnumValue()
-{
-}
-
-void
-EnumValue::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-EnumValue::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-EnumValue::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-EnumValue::inq_NameRoom() const
-{
- return nNameRoom;
-}
-
-Ce_id
-EnumValue::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-EnumValue::inq_SightLevel() const
-{
- return sl_Member;
-}
-
-
-
-namespace ifc_enumvalue
-{
-
-inline const EnumValue &
-enumvalue_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == EnumValue::class_id );
- return static_cast< const EnumValue& >(i_ce);
-}
-
-const String &
-attr::Value( const CodeEntity & i_ce )
-{
- return enumvalue_cast(i_ce).sValue;
-}
-
-
-} // namespace ifc_enumvalue
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_exception.cxx b/autodoc/source/ary/idl/i_exception.cxx
deleted file mode 100644
index 57b60386..00000000
--- a/autodoc/source/ary/idl/i_exception.cxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/ik_exception.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-#include "i2s_calculator.hxx"
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-Exception::Exception( const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBase )
- : sName(i_sName),
- nOwner(i_nOwner),
- nBase(i_nBase),
- aElements()
-{
-}
-
-Exception::~Exception()
-{
-}
-
-void
-Exception::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Exception::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Exception::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Exception::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Exception::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Exception::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_exception
-{
-
-inline const Exception &
-exception_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Exception::class_id );
- return static_cast< const Exception& >(i_ce);
-}
-
-Type_id
-attr::Base( const CodeEntity & i_ce )
-{
- return exception_cast(i_ce).nBase;
-}
-
-void
-attr::Get_Elements( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>( exception_cast(i_ce).aElements );
-}
-
-
-void
-xref::Get_Derivations( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(exception_2s_Derivations));
-}
-
-void
-xref::Get_RaisingFunctions( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(exception_2s_RaisingFunctions));
-}
-
-
-} // namespace ifc_exception
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_function.cxx b/autodoc/source/ary/idl/i_function.cxx
deleted file mode 100644
index f9c00f2b..00000000
--- a/autodoc/source/ary/idl/i_function.cxx
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_function.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-Function::Function( const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- Type_id i_nReturnType,
- bool i_bOneWay )
- : sName(i_sName),
- nOwner(i_nOwner),
- nNameRoom(i_nNameRoom),
- nReturnType(i_nReturnType),
- aParameters(),
- aExceptions(),
- bOneWay(i_bOneWay),
- bEllipse(false)
-{
-}
-
-Function::Function( const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom )
- : sName(i_sName),
- nOwner(i_nOwner),
- nNameRoom(i_nNameRoom),
- nReturnType(0),
- aParameters(),
- aExceptions(),
- bOneWay(false),
- bEllipse(false)
-{
-}
-
-Function::~Function()
-{
-}
-
-void
-Function::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Function::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Function::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Function::inq_NameRoom() const
-{
- return nNameRoom;
-}
-
-Ce_id
-Function::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Function::inq_SightLevel() const
-{
- return sl_Member;
-}
-
-
-namespace ifc_function
-{
-
-inline const Function &
-function_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Function::class_id );
- return static_cast< const Function& >(i_ce);
-}
-
-Type_id
-attr::ReturnType( const CodeEntity & i_ce )
-{
- return function_cast(i_ce).nReturnType;
-}
-
-bool
-attr::IsOneway( const CodeEntity & i_ce )
-{
- return function_cast(i_ce).bOneWay;
-}
-
-bool
-attr::HasEllipse( const CodeEntity & i_ce )
-{
- return function_cast(i_ce).bEllipse;
-}
-
-void
-attr::Get_Parameters( Dyn_StdConstIterator<ary::idl::Parameter> & o_result,
- const CodeEntity & i_ce )
-{
- o_result
- = new SCI_Vector<Parameter>( function_cast(i_ce).aParameters );
-}
-
-void
-attr::Get_Exceptions( Dyn_TypeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result
- = new SCI_Vector<Type_id>( function_cast(i_ce).aExceptions );
-}
-
-
-
-
-
-} // namespace ifc_function
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_interface.cxx b/autodoc/source/ary/idl/i_interface.cxx
deleted file mode 100644
index 08c80c5e..00000000
--- a/autodoc/source/ary/idl/i_interface.cxx
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_interface.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/ik_interface.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <sci_impl.hxx>
-#include "i2s_calculator.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-class Interface_2s
-{
-};
-
-
-Interface::Interface( const String & i_sName,
- Ce_id i_nOwner )
- : sName(i_sName),
- nOwner(i_nOwner),
- aBases(),
- aFunctions(),
- aAttributes(),
- p2s()
-{
-}
-
-Interface::~Interface()
-{
- for ( RelationList::iterator it = aBases.begin();
- it != aBases.end();
- ++it )
- {
- delete (*it).Info();
- }
-}
-
-void
-Interface::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Interface::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Interface::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Interface::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Interface::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Interface::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_interface
-{
-
-inline const Interface &
-interface_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Interface::class_id );
- return static_cast< const Interface& >(i_ce);
-}
-
-void
-attr::Get_Bases( Dyn_StdConstIterator<CommentedRelation> & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<CommentedRelation>(interface_cast(i_ce).aBases);
-}
-
-void
-attr::Get_Functions( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(interface_cast(i_ce).aFunctions);
-}
-
-void
-attr::Get_Attributes( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(interface_cast(i_ce).aAttributes);
-}
-
-void
-xref::Get_Derivations( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_Derivations));
-}
-
-void
-xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_SynonymTypedefs));
-}
-
-void
-xref::Get_ExportingServices( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_ExportingServices));
-}
-
-void
-xref::Get_ExportingSingletons( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_ExportingSingletons));
-}
-
-void
-xref::Get_AsReturns( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_AsReturns));
-}
-
-void
-xref::Get_AsParameters( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_AsParameters));
-}
-
-void
-xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(interface_2s_AsDataTypes));
-}
-
-
-
-
-} // namespace ifc_interface
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_module.cxx b/autodoc/source/ary/idl/i_module.cxx
deleted file mode 100644
index fa671f23..00000000
--- a/autodoc/source/ary/idl/i_module.cxx
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ik_module.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/i_interface.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/i_typedef.hxx>
-#include <ary/idl/i_constgroup.hxx>
-#include <ary/idl/i_singleton.hxx>
-#include <ary/idl/i_siservice.hxx>
-#include <ary/idl/i_sisingleton.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <nametreenode.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-Module::Module()
- : pImpl( new NameTreeNode<Ce_id> )
-{
-}
-
-Module::Module( const String & i_sName,
- const Module & i_rParent )
- : pImpl( new NameTreeNode<Ce_id>( i_sName,
- *i_rParent.pImpl,
- i_rParent.CeId() ) )
-{
-}
-
-Module::~Module()
-{
-}
-
-void
-Module::Add_Name( const String & i_sName,
- Ce_id i_nCodeEntity )
-{
- pImpl->Add_Name(i_sName, i_nCodeEntity);
-}
-
-Ce_id
-Module::Search_Name( const String & i_sName ) const
-{
- return pImpl->Search_Name(i_sName);
-}
-
-void
-Module::Get_Names( Dyn_StdConstIterator<Ce_id> & o_rResult ) const
-{
- pImpl->Get_Names( o_rResult );
-}
-
-void
-Module::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Module::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Module::inq_LocalName() const
-{
- return pImpl->Name();
-}
-
-Ce_id
-Module::inq_NameRoom() const
-{
- return pImpl->Parent();
-}
-
-Ce_id
-Module::inq_Owner() const
-{
- return pImpl->Parent();
-}
-
-E_SightLevel
-Module::inq_SightLevel() const
-{
- return sl_Module;
-}
-
-
-namespace ifc_module
-{
-
-inline const Module &
-module_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Module::class_id );
- return static_cast< const Module& >(i_ce);
-}
-
-typedef NameTreeNode<Ce_id>::Map_LocalNames NameMap;
-
-void
-attr::Get_AllChildrenSeparated( std::vector< const CodeEntity* > & o_nestedModules,
- std::vector< const CodeEntity* > & o_services,
- std::vector< const CodeEntity* > & o_interfaces,
- std::vector< const CodeEntity* > & o_structs,
- std::vector< const CodeEntity* > & o_exceptions,
- std::vector< const CodeEntity* > & o_enums,
- std::vector< const CodeEntity* > & o_typedefs,
- std::vector< const CodeEntity* > & o_constantGroups,
- std::vector< const CodeEntity* > & o_singletons,
- const CePilot & i_pilot,
- const CodeEntity & i_ce )
-{
- const CodeEntity *
- pCe = 0;
- NameMap::const_iterator
- itEnd = module_cast(i_ce).pImpl->LocalNames().end();
- for ( NameMap::const_iterator
- it = module_cast(i_ce).pImpl->LocalNames().begin();
- it != itEnd;
- ++it )
- {
- pCe = &i_pilot.Find_Ce( (*it).second );
- switch (pCe->AryClass())
- {
- case Module::class_id:
- o_nestedModules.push_back(pCe);
- break;
- case SglIfcService::class_id:
- case Service::class_id:
- o_services.push_back(pCe);
- break;
- case Interface::class_id:
- o_interfaces.push_back(pCe);
- break;
- case Struct::class_id:
- o_structs.push_back(pCe);
- break;
- case Exception::class_id:
- o_exceptions.push_back(pCe);
- break;
- case Enum::class_id:
- o_enums.push_back(pCe);
- break;
- case Typedef::class_id:
- o_typedefs.push_back(pCe);
- break;
- case ConstantsGroup::class_id:
- o_constantGroups.push_back(pCe);
- break;
- case SglIfcSingleton::class_id:
- case Singleton::class_id:
- o_singletons.push_back(pCe);
- break;
- }
- } // end for
-}
-
-
-} // namespace ifc_module
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_namelookup.cxx b/autodoc/source/ary/idl/i_namelookup.cxx
deleted file mode 100644
index d71884ad..00000000
--- a/autodoc/source/ary/idl/i_namelookup.cxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_namelookup.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <sci_impl.hxx>
-
-namespace ary
-{
-namespace idl
-{
-
-NameLookup::NameLookup()
- : aNames()
-{
-}
-
-NameLookup::~NameLookup()
-{
-}
-
-void
-NameLookup::Add_Name( const String & i_name,
- Ce_id i_id,
- ClassId i_class,
- Ce_id i_owner )
-{
- aNames.insert( std::pair< const String, NameProperties>(
- i_name,
- NameProperties( i_id,
- i_class,
- i_owner )));
-}
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_nnfinder.hxx b/autodoc/source/ary/idl/i_nnfinder.hxx
deleted file mode 100644
index 58ed77a4..00000000
--- a/autodoc/source/ary/idl/i_nnfinder.hxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_NNFINDER_HXX
-#define ARY_IDL_NNFINDER_HXX
-
-// USED SERVICES
-#include "is_ce.hxx"
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Gives context info for tree search functions.
-
- @collab ->ary::Search_SubTree<>()
- @collab ->ary::Search_SubTree_UpTillRoot<>()
-*/
-class Find_ModuleNode
-{
- public:
- typedef Ce_id id_type;
- typedef StringVector::const_iterator name_iterator;
-
- // LIFECYCLE
- Find_ModuleNode(
- const Ce_Storage & i_rStorage,
- name_iterator it_begin,
- name_iterator it_end,
- const String & i_sName )
- : rStorage(i_rStorage),
- itBegin(it_begin),
- itEnd(it_end),
- sName2Search(i_sName) { if (itBegin != itEnd ? (*itBegin).empty() : false) ++itBegin; }
- // OPERATIONS
- const Module * operator()(
- id_type i_id ) const
- { return i_id.IsValid()
- ? & ary_cast<Module>(rStorage[i_id])
- : 0; }
-
- name_iterator Begin() const { return itBegin; }
- name_iterator End() const { return itEnd; }
- const String & Name2Search() const { return sName2Search; }
-
- private:
- // DATA
- const Ce_Storage & rStorage;
- name_iterator itBegin;
- name_iterator itEnd;
- String sName2Search;
-};
-
-
-
-
-class Types_forSetCe_Id
-{
- public:
- typedef Ce_id element_type;
- typedef Ce_Storage find_type;
-
- // KORR_FUTURE: Check, if this sorting is right or the ary standard
- // sorting should be used.
- struct sort_type
- {
- sort_type(
- const find_type & i_rFinder )
- : rFinder(i_rFinder) {}
- bool operator()(
- const element_type &
- i_r1,
- const element_type &
- i_r2 ) const
- {
- return rFinder[i_r1].LocalName()
- < rFinder[i_r2].LocalName();
- }
-
- private:
- const find_type & rFinder;
-
- };
-};
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_param.cxx b/autodoc/source/ary/idl/i_param.cxx
deleted file mode 100644
index 38a48f02..00000000
--- a/autodoc/source/ary/idl/i_param.cxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_param.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-Parameter::Parameter( const String & i_sName,
- Type_id i_nType,
- E_ParameterDirection i_eDirection )
- : sName(i_sName),
- nType(i_nType),
- eDirection(i_eDirection)
-{
-}
-
-Parameter::~Parameter()
-{
-}
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_property.cxx b/autodoc/source/ary/idl/i_property.cxx
deleted file mode 100644
index dacc596b..00000000
--- a/autodoc/source/ary/idl/i_property.cxx
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_property.hxx>
-#include <ary/idl/ik_property.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-Property::Property( const String & i_sName,
- Ce_id i_nService,
- Ce_id i_nModule,
- Type_id i_nType,
- Stereotypes i_stereotypes )
- : sName(i_sName),
- nOwner(i_nService),
- nNameRoom(i_nModule),
- nType(i_nType),
- aStereotypes(i_stereotypes)
-{
-}
-
-Property::~Property()
-{
-}
-
-
-void
-Property::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Property::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Property::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Property::inq_NameRoom() const
-{
- return nNameRoom;
-}
-
-Ce_id
-Property::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Property::inq_SightLevel() const
-{
- return sl_Member;
-}
-
-namespace ifc_property
-{
-
-inline const Property &
-property_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Property::class_id );
- return static_cast< const Property& >(i_ce);
-}
-
-bool
-attr::HasAnyStereotype( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.HasAny();
-}
-
-bool
-attr::IsReadOnly( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsReadOnly();
-}
-
-bool
-attr::IsBound( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsBound();
-}
-
-bool
-attr::IsConstrained( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsConstrained();
-}
-
-bool
-attr::IsMayBeAmbiguous( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsMayBeAmbiguous();
-}
-
-bool
-attr::IsMayBeDefault( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsMayBeDefault();
-}
-
-bool
-attr::IsMayBeVoid( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsMayBeVoid();
-}
-
-bool
-attr::IsRemovable( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsRemovable();
-}
-
-bool
-attr::IsTransient( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).aStereotypes.IsTransient();
-}
-
-Type_id
-attr::Type( const CodeEntity & i_ce )
-{
- return property_cast(i_ce).nType;
-}
-
-} // namespace ifc_property
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_reposypart.cxx b/autodoc/source/ary/idl/i_reposypart.cxx
deleted file mode 100644
index d0a3b136..00000000
--- a/autodoc/source/ary/idl/i_reposypart.cxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "i_reposypart.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_namelookup.hxx>
-#include <idl_internalgate.hxx>
-#include "ia_ce.hxx"
-#include "ia_type.hxx"
-#include "i2s_calculator.hxx"
-#include "is_ce.hxx"
-#include "is_type.hxx"
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-DYN InternalGate &
-InternalGate::Create_Partition_(RepositoryCenter & i_center)
-{
- return *new RepositoryPartition(i_center);
-}
-
-
-
-RepositoryPartition::RepositoryPartition( RepositoryCenter & i_repository )
- : pCenter(&i_repository),
- pCes(0),
- pTypes(0),
- pNamesDictionary(new NameLookup)
-{
- pTypes = new TypeAdmin;
- pCes = new CeAdmin(*pNamesDictionary, *pTypes);
-}
-
-RepositoryPartition::~RepositoryPartition()
-{
-}
-
-void
-RepositoryPartition::Calculate_AllSecondaryInformation(
- const String & i_devman_reffilepath )
-{
- // KORR_FUTURE
- // Forward the options from here.
-
- SecondariesCalculator
- secalc(*pCes,*pTypes);
-
- secalc.CheckAllInterfaceBases();
- secalc.Connect_Types2Ces();
- secalc.Gather_CrossReferences();
-
- if ( NOT i_devman_reffilepath.empty() )
- {
- secalc.Make_Links2DeveloperManual(i_devman_reffilepath);
- }
-}
-
-const CePilot &
-RepositoryPartition::Ces() const
-{
- return *pCes;
-}
-
-const TypePilot &
-RepositoryPartition::Types() const
-{
- return *pTypes;
-}
-
-CePilot &
-RepositoryPartition::Ces()
-{
- return *pCes;
-}
-
-TypePilot &
-RepositoryPartition::Types()
-{
- return *pTypes;
-}
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_reposypart.hxx b/autodoc/source/ary/idl/i_reposypart.hxx
deleted file mode 100644
index 65aa243f..00000000
--- a/autodoc/source/ary/idl/i_reposypart.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_I_REPOSYPART_HXX
-#define ARY_IDL_I_REPOSYPART_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <idl_internalgate.hxx>
- // OTHER
-
-
-namespace ary
-{
-namespace idl
-{
- class CeAdmin;
- class TypeAdmin;
- class NameLookup;
-}
-}
-
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-
-/** The idl part of the Autodoc repository.
-*/
-class RepositoryPartition : public InternalGate
-{
- public:
- // LIFECYCLE
- RepositoryPartition(
- RepositoryCenter & i_repository );
- ~RepositoryPartition();
- // INHERITED
- // Interface Gate:
- virtual void Calculate_AllSecondaryInformation(
- const String & i_devman_reffilepath );
-// const ::autodoc::Options &
-// i_options );
- virtual const CePilot &
- Ces() const;
- virtual const TypePilot &
- Types() const;
- virtual CePilot & Ces();
- virtual TypePilot & Types();
-
- private:
- // DATA
- RepositoryCenter * pCenter;
-
- Dyn<CeAdmin> pCes;
- Dyn<TypeAdmin> pTypes;
- Dyn<NameLookup> pNamesDictionary;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_service.cxx b/autodoc/source/ary/idl/i_service.cxx
deleted file mode 100644
index dde1c861..00000000
--- a/autodoc/source/ary/idl/i_service.cxx
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_service.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/ik_service.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <sci_impl.hxx>
-#include "i2s_calculator.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-Service::Service( const String & i_sName,
- Ce_id i_nOwner )
- : sName(i_sName),
- nOwner(i_nOwner),
- aIncludedServices(),
- aSupportedInterfaces(),
- aProperties()
-{
-}
-
-Service::~Service()
-{
- for ( RelationList::iterator it = aIncludedServices.begin();
- it != aIncludedServices.end();
- ++it )
- {
- delete (*it).Info();
- }
-
- for ( RelationList::iterator it = aSupportedInterfaces.begin();
- it != aSupportedInterfaces.end();
- ++it )
- {
- delete (*it).Info();
- }
-}
-
-void
-Service::Get_SupportedInterfaces( Dyn_StdConstIterator<CommentedRelation> & o_rResult ) const
-{
- o_rResult = new SCI_Vector<CommentedRelation>(aSupportedInterfaces);
-}
-
-void
-Service::Get_IncludedServices( Dyn_StdConstIterator<CommentedRelation> & o_rResult ) const
-{
- o_rResult = new SCI_Vector<CommentedRelation>(aIncludedServices);
-}
-
-void
-Service::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Service::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Service::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Service::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Service::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Service::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_service
-{
-
-inline const Service &
-service_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Service::class_id );
- return static_cast< const Service& >(i_ce);
-}
-
-void
-attr::Get_IncludedServices( Dyn_StdConstIterator<CommentedRelation> & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<CommentedRelation>( service_cast(i_ce).aIncludedServices );
-}
-
-void
-attr::Get_ExportedInterfaces( Dyn_StdConstIterator<CommentedRelation> & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<CommentedRelation>( service_cast(i_ce).aSupportedInterfaces );
-}
-
-void
-attr::Get_Properties( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>( service_cast(i_ce).aProperties );
-}
-
-void
-xref::Get_IncludingServices( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(service_2s_IncludingServices));
-}
-
-void
-xref::Get_InstantiatingSingletons( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(service_2s_InstantiatingSingletons));
-}
-
-
-} // namespace ifc_service
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_singleton.cxx b/autodoc/source/ary/idl/i_singleton.cxx
deleted file mode 100644
index 10dfb59f..00000000
--- a/autodoc/source/ary/idl/i_singleton.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_singleton.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/ik_singleton.hxx>
-#include <sci_impl.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-Singleton::Singleton( const String & i_sName,
- Ce_id i_nOwner )
- : sName(i_sName),
- nOwner(i_nOwner),
- nService()
-{
-}
-
-Singleton::~Singleton()
-{
-}
-
-void
-Singleton::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Singleton::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Singleton::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Singleton::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Singleton::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Singleton::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_singleton
-{
-
-inline const Singleton &
-singleton_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Singleton::class_id );
- return static_cast< const Singleton& >(i_ce);
-}
-
-Type_id
-attr::AssociatedService( const CodeEntity & i_ce )
-{
- return singleton_cast(i_ce).nService;
-}
-
-} // namespace ifc_singleton
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_siservice.cxx b/autodoc/source/ary/idl/i_siservice.cxx
deleted file mode 100644
index 320d04ea..00000000
--- a/autodoc/source/ary/idl/i_siservice.cxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_siservice.hxx>
-#include <ary/idl/ik_siservice.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-SglIfcService::SglIfcService( const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBaseInterface )
- : sName(i_sName),
- nOwner(i_nOwner),
- nBaseInterface(i_nBaseInterface),
- aConstructors()
-{
-}
-
-SglIfcService::~SglIfcService()
-{
-}
-
-void
-SglIfcService::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-SglIfcService::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-SglIfcService::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-SglIfcService::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-SglIfcService::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-SglIfcService::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_sglifcservice
-{
-
-inline const SglIfcService &
-sglifcservice_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == SglIfcService::class_id );
- return static_cast< const SglIfcService& >(i_ce);
-}
-
-Type_id
-attr::BaseInterface( const CodeEntity & i_ce )
-{
- return sglifcservice_cast(i_ce).nBaseInterface;
-}
-
-void
-attr::Get_Constructors( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>( sglifcservice_cast(i_ce).aConstructors );
-}
-
-} // namespace ifc_sglifcservice
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_sisingleton.cxx b/autodoc/source/ary/idl/i_sisingleton.cxx
deleted file mode 100644
index 0872a641..00000000
--- a/autodoc/source/ary/idl/i_sisingleton.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_sisingleton.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/ik_sisingleton.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-SglIfcSingleton::SglIfcSingleton( const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBaseInterface )
- : sName(i_sName),
- nOwner(i_nOwner),
- nBaseInterface(i_nBaseInterface)
-{
-}
-
-SglIfcSingleton::~SglIfcSingleton()
-{
-}
-
-void
-SglIfcSingleton::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-SglIfcSingleton::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-SglIfcSingleton::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-SglIfcSingleton::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-SglIfcSingleton::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-SglIfcSingleton::inq_SightLevel() const
-{
- return sl_File;
-}
-
-namespace ifc_sglifcsingleton
-{
-
-inline const SglIfcSingleton &
-sglifcsingleton_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == SglIfcSingleton::class_id );
- return static_cast< const SglIfcSingleton& >(i_ce);
-}
-
-Type_id
-attr::BaseInterface( const CodeEntity & i_ce )
-{
- return sglifcsingleton_cast(i_ce).nBaseInterface;
-}
-
-
-} // namespace ifc_sglifcsingleton
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_struct.cxx b/autodoc/source/ary/idl/i_struct.cxx
deleted file mode 100644
index 0f602637..00000000
--- a/autodoc/source/ary/idl/i_struct.cxx
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/ik_struct.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-#include "i2s_calculator.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-Struct::Struct( const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nBase,
- const String & i_sTemplateParameter,
- Type_id i_nTemplateParameterType )
- : sName(i_sName),
- nOwner(i_nOwner),
- nBase(i_nBase),
- sTemplateParameter(i_sTemplateParameter),
- nTemplateParameterType(i_nTemplateParameterType),
- aElements()
-{
-}
-
-Struct::~Struct()
-{
-}
-
-void
-Struct::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Struct::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Struct::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Struct::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Struct::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Struct::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_struct
-{
-
-inline const Struct &
-struct_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Struct::class_id );
- return static_cast< const Struct& >(i_ce);
-}
-
-Type_id
-attr::Base( const CodeEntity & i_ce )
-{
- return struct_cast(i_ce).nBase;
-}
-
-void
-attr::Get_Elements( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>( struct_cast(i_ce).aElements );
-}
-
-
-void
-xref::Get_Derivations( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_Derivations));
-}
-
-void
-xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_SynonymTypedefs));
-}
-
-void
-xref::Get_AsReturns( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsReturns));
-}
-
-void
-xref::Get_AsParameters( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsParameters));
-}
-
-void
-xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(struct_2s_AsDataTypes));
-}
-
-} // namespace ifc_struct
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_structelem.cxx b/autodoc/source/ary/idl/i_structelem.cxx
deleted file mode 100644
index 1b5a89c8..00000000
--- a/autodoc/source/ary/idl/i_structelem.cxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_structelem.hxx>
-#include <ary/idl/ik_structelem.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-StructElement::StructElement( const String & i_sName,
- Ce_id i_nOwner,
- Ce_id i_nNameRoom,
- Type_id i_nType )
- : sName(i_sName),
- nOwner(i_nOwner),
- nNameRoom(i_nNameRoom),
- nType(i_nType)
-{
-}
-
-StructElement::~StructElement()
-{
-}
-
-void
-StructElement::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-StructElement::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-StructElement::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-StructElement::inq_NameRoom() const
-{
- return nNameRoom;
-}
-
-Ce_id
-StructElement::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-StructElement::inq_SightLevel() const
-{
- return sl_Member;
-}
-
-
-namespace ifc_structelement
-{
-
-inline const StructElement &
-selem_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == StructElement::class_id );
- return static_cast< const StructElement& >(i_ce);
-}
-
-Type_id
-attr::Type( const CodeEntity & i_ce )
-{
- return selem_cast(i_ce).nType;
-}
-
-} // namespace ifc_structelement
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_traits.cxx b/autodoc/source/ary/idl/i_traits.cxx
deleted file mode 100644
index 610028e0..00000000
--- a/autodoc/source/ary/idl/i_traits.cxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_traits.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/namesort.hxx>
-#include "is_ce.hxx"
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-
-//******************** Ce_Traits ********************//
-Ce_Traits::entity_base_type &
-Ce_Traits::EntityOf_(id_type i_id)
-{
- csv_assert(i_id.IsValid());
- return Ce_Storage::Instance_()[i_id];
-}
-
-//******************** Ce_Compare ********************//
-const Ce_Compare::key_type &
-Ce_Compare::KeyOf_(const entity_base_type & i_entity)
-{
- return i_entity.LocalName();
-}
-
-bool
-Ce_Compare::Lesser_( const key_type & i_1,
- const key_type & i_2 )
-{
- static ::ary::LesserName less_;
- return less_(i_1,i_2);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/i_typedef.cxx b/autodoc/source/ary/idl/i_typedef.cxx
deleted file mode 100644
index 89d20af5..00000000
--- a/autodoc/source/ary/idl/i_typedef.cxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/idl/i_typedef.hxx>
-#include <ary/idl/ik_typedef.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <sci_impl.hxx>
-#include "i2s_calculator.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-Typedef::Typedef( const String & i_sName,
- Ce_id i_nOwner,
- Type_id i_nDefiningType )
- : sName(i_sName),
- nOwner(i_nOwner),
- nDefiningType(i_nDefiningType)
-{
-}
-
-Typedef::~Typedef()
-{
-}
-
-void
-Typedef::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-Typedef::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Typedef::inq_LocalName() const
-{
- return sName;
-}
-
-Ce_id
-Typedef::inq_NameRoom() const
-{
- return nOwner;
-}
-
-Ce_id
-Typedef::inq_Owner() const
-{
- return nOwner;
-}
-
-E_SightLevel
-Typedef::inq_SightLevel() const
-{
- return sl_File;
-}
-
-
-namespace ifc_typedef
-{
-
-inline const Typedef &
-typedef_cast( const CodeEntity & i_ce )
-{
- csv_assert( i_ce.AryClass() == Typedef::class_id );
- return static_cast< const Typedef& >(i_ce);
-}
-
-Type_id
-attr::DefiningType( const CodeEntity & i_ce )
-{
- return typedef_cast(i_ce).nDefiningType;
-}
-
-
-void
-xref::Get_SynonymTypedefs( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_SynonymTypedefs));
-}
-
-void
-xref::Get_AsReturns( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_AsReturns));
-}
-
-void
-xref::Get_AsParameters( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_AsParameters));
-}
-
-void
-xref::Get_AsDataTypes( Dyn_CeIterator & o_result,
- const CodeEntity & i_ce )
-{
- o_result = new SCI_Vector<Ce_id>(i_ce.Secondaries().List(typedef_2s_AsDataTypes));
-}
-
-} // namespace ifc_typedef
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/ia_ce.cxx b/autodoc/source/ary/idl/ia_ce.cxx
deleted file mode 100644
index 7335df37..00000000
--- a/autodoc/source/ary/idl/ia_ce.cxx
+++ /dev/null
@@ -1,584 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "ia_ce.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <algorithm>
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/idl/i_attribute.hxx>
-#include <ary/idl/i_constant.hxx>
-#include <ary/idl/i_constgroup.hxx>
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/i_enumvalue.hxx>
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/i_function.hxx>
-#include <ary/idl/i_interface.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_namelookup.hxx>
-#include <ary/idl/i_property.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/i_singleton.hxx>
-#include <ary/idl/i_siservice.hxx>
-#include <ary/idl/i_sisingleton.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/i_structelem.hxx>
-#include <ary/idl/i_traits.hxx>
-#include <ary/idl/i_typedef.hxx>
-#include <idsort.hxx>
-#include "ia_type.hxx"
-#include "is_ce.hxx"
-#include "it_tplparam.hxx"
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-inline Module &
-CeAdmin::lhf_Access_Module( Ce_id i_nId )
- { return ary_cast<Module>(Storage()[i_nId]); }
-
-inline void
-CeAdmin::lhf_Put2Storage_and_AssignId( CodeEntity & pass_io_rCe )
- { // This also assigns an ID to pass_io_rCe:
- Storage().Store_Entity(pass_io_rCe);
- my_NameDictionary().Add_Name( pass_io_rCe.LocalName(),
- pass_io_rCe.CeId(),
- pass_io_rCe.AryClass(),
- pass_io_rCe.Owner() );
- }
-
-inline void
-CeAdmin::lhf_Store_NewEntity( DYN CodeEntity & pass_io_rCe,
- Module & i_rOwner )
-{
- lhf_Put2Storage_and_AssignId(pass_io_rCe);
- i_rOwner.Add_Name(pass_io_rCe.LocalName(), pass_io_rCe.CeId());
-}
-
-inline void
-CeAdmin::lhf_Store_NewEntity( DYN CodeEntity & pass_io_rCe,
- Ce_id i_nOwnerModule )
-{
- lhf_Store_NewEntity(pass_io_rCe, lhf_Access_Module(i_nOwnerModule));
-}
-
-
-
-CeAdmin::CeAdmin( NameLookup & io_rNameDictionary,
- TypeAdmin & io_rTypePilot )
- : pStorage(new Ce_Storage),
- pGlobalNamespace(0),
- pNameDictionary(&io_rNameDictionary),
- pTypePilot(&io_rTypePilot)
-{
- Storage().Set_Reserved(
- predefined::ce_GlobalNamespace,
- *new Module );
- pGlobalNamespace = &lhf_Access_Module(Ce_id(predefined::ce_GlobalNamespace));
-}
-
-CeAdmin::~CeAdmin()
-{
-}
-
-
-
-Module &
-CeAdmin::CheckIn_Module( Ce_id i_nParentId,
- const String & i_sName )
-{
- Module & rOwner = lhf_Access_Module(i_nParentId);
- Ce_id nId = rOwner.Search_Name(i_sName);
- if (nId.IsValid())
- {
- return lhf_Access_Module(nId);
- }
-
- Module & ret = *new Module( i_sName,
- rOwner );
- lhf_Store_NewEntity(ret, rOwner);
- return ret;
-}
-
-Service &
-CeAdmin::Store_Service( Ce_id i_nOwner,
- const String & i_sName )
-{
- Service & ret = *new Service( i_sName,
- i_nOwner );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-SglIfcService &
-CeAdmin::Store_SglIfcService( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBaseInterface )
-{
- SglIfcService &
- ret = *new SglIfcService( i_sName,
- i_nOwner,
- i_nBaseInterface );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-Interface &
-CeAdmin::Store_Interface( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase )
-{
- Interface & ret = *new Interface( i_sName,
- i_nOwner );
- lhf_Store_NewEntity(ret, i_nOwner);
- if (i_nBase.IsValid())
- ret.Add_Base(i_nBase, 0);
- return ret;
-}
-
-Struct &
-CeAdmin::Store_Struct( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase,
- const String & i_sTemplateParam )
-{
- if (NOT i_sTemplateParam.empty())
- {
- return lhf_Store_TplStruct( i_nOwner,
- i_sName,
- i_nBase,
- i_sTemplateParam );
- }
-
- Struct & ret = *new Struct( i_sName,
- i_nOwner,
- i_nBase,
- String::Null_(),
- Type_id::Null_() );
- lhf_Store_NewEntity(ret, i_nOwner);
-
- return ret;
-}
-
-Exception &
-CeAdmin::Store_Exception( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase )
-{
- Exception & ret = *new Exception( i_sName,
- i_nOwner,
- i_nBase );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-Enum &
-CeAdmin::Store_Enum( Ce_id i_nOwner,
- const String & i_sName )
-{
- Enum & ret = *new Enum( i_sName,
- i_nOwner );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-Typedef &
-CeAdmin::Store_Typedef( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nDefiningType )
-{
- Typedef & ret = *new Typedef( i_sName,
- i_nOwner,
- i_nDefiningType );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-
-ConstantsGroup &
-CeAdmin::Store_ConstantsGroup( Ce_id i_nOwner,
- const String & i_sName )
-{
- ConstantsGroup & ret = *new ConstantsGroup( i_sName,
- i_nOwner );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-Singleton &
-CeAdmin::Store_Singleton( Ce_id i_nOwner,
- const String & i_sName )
-{
- Singleton & ret = *new Singleton( i_sName,
- i_nOwner );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-SglIfcSingleton &
-CeAdmin::Store_SglIfcSingleton( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBaseInterface )
-{
- SglIfcSingleton &
- ret = *new SglIfcSingleton( i_sName,
- i_nOwner,
- i_nBaseInterface );
- lhf_Store_NewEntity(ret, i_nOwner);
- return ret;
-}
-
-Constant &
-CeAdmin::Store_Constant( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- const String & i_sValue )
-{
- ConstantsGroup &
- rOwner = ary_cast<ConstantsGroup>(Storage()[i_nOwner]);
- Constant & ret = *new Constant( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_nType,
- i_sValue );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Constant(ret.CeId());
- return ret;
-}
-
-Property &
-CeAdmin::Store_Property( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- Property::Stereotypes i_stereotypes )
-{
- Service &
- rOwner = ary_cast<Service>(Storage()[i_nOwner]);
- Property & ret = *new Property( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_nType,
- i_stereotypes );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Property(ret.CeId());
- return ret;
-}
-
-Function &
-CeAdmin::Store_Function( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nReturnType,
- bool i_bOneWay )
-{
- Interface &
- rOwner = ary_cast<Interface>(Storage()[i_nOwner]);
- Function & ret = *new Function( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_nReturnType,
- i_bOneWay);
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Function(ret.CeId());
- return ret;
-}
-
-Function &
-CeAdmin::Store_ServiceConstructor( Ce_id i_nOwner,
- const String & i_sName )
-{
- SglIfcService &
- rOwner = ary_cast<SglIfcService>(Storage()[i_nOwner]);
- Function & ret = *new Function( i_sName,
- i_nOwner,
- rOwner.NameRoom() );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Constructor(ret.CeId());
- return ret;
-}
-
-StructElement &
-CeAdmin::Store_StructMember( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType )
-{
- Struct &
- rOwner = ary_cast<Struct>(Storage()[i_nOwner]);
- StructElement & ret = *new StructElement( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_nType );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Member(ret.CeId());
- return ret;
-}
-
-StructElement &
-CeAdmin::Store_ExceptionMember( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType )
-{
- Exception &
- rOwner = ary_cast<Exception>(Storage()[i_nOwner]);
- StructElement & ret = *new StructElement( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_nType );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Member(ret.CeId());
- return ret;
-}
-
-EnumValue &
-CeAdmin::Store_EnumValue( Ce_id i_nOwner,
- const String & i_sName,
- const String & i_sValue )
-{
- Enum &
- rOwner = ary_cast<Enum>(Storage()[i_nOwner]);
- EnumValue & ret = *new EnumValue( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_sValue );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Value(ret.CeId());
- return ret;
-}
-
-Attribute &
-CeAdmin::Store_Attribute( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- bool i_bReadOnly,
- bool i_bBound )
-{
- Interface &
- rOwner = ary_cast<Interface>(Storage()[i_nOwner]);
-
- Attribute & ret = *new Attribute ( i_sName,
- i_nOwner,
- rOwner.NameRoom(),
- i_nType,
- i_bReadOnly,
- i_bBound );
- lhf_Put2Storage_and_AssignId(ret);
- rOwner.Add_Attribute(ret.CeId());
- return ret;
-}
-
-const Module &
-CeAdmin::GlobalNamespace() const
-{
- csv_assert(pGlobalNamespace);
- return *pGlobalNamespace;
-}
-
-const CodeEntity &
-CeAdmin::Find_Ce( Ce_id i_nId ) const
-{
- return Storage()[i_nId];
-
-}
-
-const Module &
-CeAdmin::Find_Module( Ce_id i_nId ) const
-{
- return ary_cast<Module>(Storage()[i_nId]);
-}
-
-const Module *
-CeAdmin::Search_Module( Ce_id i_nId ) const
-{
- if (NOT i_nId.IsValid())
- return 0;
- return ary_cast<Module>( & Storage()[i_nId] );
-}
-
-const Function &
-CeAdmin::Find_Function( Ce_id i_nId ) const
-{
- return ary_cast<Function>(Storage()[i_nId]);
-}
-
-const Property &
-CeAdmin::Find_Property( Ce_id i_nId ) const
-{
- return ary_cast<Property>(Storage()[i_nId]);
-}
-
-const EnumValue &
-CeAdmin::Find_EnumValue( Ce_id i_nId ) const
-{
- return ary_cast<EnumValue>(Storage()[i_nId]);
-}
-
-const Constant &
-CeAdmin::Find_Constant( Ce_id i_nId ) const
-{
- return ary_cast<Constant>(Storage()[i_nId]);
-}
-
-const StructElement &
-CeAdmin::Find_StructElement( Ce_id i_nId ) const
-{
- return ary_cast<StructElement>(Storage()[i_nId]);
-}
-
-void
-CeAdmin::Get_Text( StringVector & o_module,
- String & o_ce,
- String & o_member,
- const CodeEntity & i_ce ) const
-{
- const CodeEntity * pCe = &i_ce;
- csv::erase_container(o_module);
- o_ce.clear();
- o_member.clear();
-
- switch ( pCe->SightLevel() )
- {
- // Here are intentionally no breaks!
- case sl_Member:
- if ( is_type<Function>(*pCe) )
- o_member = StreamLock(200)()
- << pCe->LocalName()
- << "()"
- << c_str;
- else
- o_member = pCe->LocalName();
- pCe = & Storage()[pCe->Owner()];
- case sl_File:
- o_ce = pCe->LocalName();
- pCe = & Storage()[pCe->NameRoom()];
- case sl_Module:
- get_ModuleText(o_module,*pCe);
- break;
- default:
- csv_assert(false);
- } // end switch
-}
-
-const NameLookup &
-CeAdmin::NameDictionary() const
-{
- return *pNameDictionary;
-}
-
-
-void
-CeAdmin::Get_AlphabeticalIndex( std::vector<Ce_id> & o_rResult,
- alphabetical_index::E_Letter i_cLetter ) const
-{
- const int C_nLowerUpperDiff = 'a'-'A';
-
- // Establishing filter:
- UINT8 filter[256];
-
- UINT8 nLetter = static_cast<UINT8>(i_cLetter);
- memset(filter, 0, 256);
- filter[nLetter] = 1;
- if ( i_cLetter != alphabetical_index::non_alpha )
- filter[nLetter - C_nLowerUpperDiff] = 1;
-
- // Gather entities which start with i_cLetter:
- o_rResult.reserve(1000);
- idl::Ce_Storage::c_iter
- itEnd = Storage().End();
- for ( idl::Ce_Storage::c_iter it = Storage().BeginUnreserved();
- it != itEnd;
- ++it )
- {
- if ( filter[ static_cast<UINT8>(*(*it).LocalName().c_str()) ] == 1 )
- o_rResult.push_back( (*it).CeId() );
- }
-
- std::sort( o_rResult.begin(),
- o_rResult.end(),
- IdSorter<Ce_Compare>() );
-}
-
-
-Module &
-CeAdmin::GlobalNamespace()
-{
- csv_assert(pGlobalNamespace);
- return *pGlobalNamespace;
-}
-
-CodeEntity &
-CeAdmin::Find_Ce( Ce_id i_nId )
-{
- return Storage()[i_nId];
-}
-
-void
-CeAdmin::get_ModuleText( StringVector & o_module,
- const CodeEntity & i_ce ) const
-{
- if (i_ce.NameRoom().IsValid())
- {
- const CodeEntity &
- rParent = Storage()[i_ce.NameRoom()];
- get_ModuleText(o_module, rParent);
- o_module.push_back(i_ce.LocalName());
- }
-}
-
-Struct &
-CeAdmin::lhf_Store_TplStruct( Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase,
- const String & i_sTemplateParam )
-{
- csv_assert(NOT i_sTemplateParam.empty());
-
- TemplateParamType &
- rTpt = pTypePilot->Store_TemplateParamType(i_sTemplateParam);
-
- Struct & ret = *new Struct( i_sName,
- i_nOwner,
- i_nBase,
- i_sTemplateParam,
- rTpt.TypeId() );
- lhf_Store_NewEntity(ret, i_nOwner);
- rTpt.Set_StructId(ret.CeId());
-
- return ret;
-}
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/ia_ce.hxx b/autodoc/source/ary/idl/ia_ce.hxx
deleted file mode 100644
index ad31188d..00000000
--- a/autodoc/source/ary/idl/ia_ce.hxx
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IA_CE_HXX
-#define ARY_IDL_IA_CE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ip_ce.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-class Ce_Storage;
-class TypeAdmin;
-
-
-/** @resp
- Implements ::ary::idl::CePilot. Provides the access logic for all
- IDL code entities.
-
- @collab Ce_Storage
- @collab TypeAdmin
-
- @see CodeEntity
-*/
-class CeAdmin : public CePilot
-{
- public:
- // LIFECYCLE
- CeAdmin(
- NameLookup & io_rNameDictionary,
- TypeAdmin & io_rTypePilot );
- virtual ~CeAdmin();
-
- // OPERATIONS
-
- // INQUIRY
- const Ce_Storage & Storage() const;
-
- // ACCESS
- Ce_Storage & Storage();
-
- // INHERITED
- // Interface ::ary::idl::CePilot:
- virtual Module & CheckIn_Module(
- Ce_id i_nParentId,
- const String & i_sName );
- virtual Service & Store_Service(
- Ce_id i_nOwner,
- const String & i_sName );
- virtual SglIfcService &
- Store_SglIfcService(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBaseInterface );
- virtual Interface & Store_Interface(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase );
- virtual Struct & Store_Struct(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase,
- const String & i_sTemplateParam );
- virtual Exception & Store_Exception(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase );
- virtual Enum & Store_Enum(
- Ce_id i_nOwner,
- const String & i_sName );
- virtual Typedef & Store_Typedef(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nDefiningType );
- virtual ConstantsGroup &
- Store_ConstantsGroup(
- Ce_id i_nOwner,
- const String & i_sName );
- virtual Singleton & Store_Singleton(
- Ce_id i_nOwner,
- const String & i_sName );
- virtual SglIfcSingleton &
- Store_SglIfcSingleton(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBaseInterface );
-
- virtual Constant & Store_Constant(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- const String & i_sValue );
- virtual Property & Store_Property(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- Property::Stereotypes
- i_stereotypes );
- virtual Function & Store_Function(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nReturnType,
- bool i_bOneWay );
- virtual Function & Store_ServiceConstructor(
- Ce_id i_nOwner,
- const String & i_sName );
- virtual StructElement &
- Store_StructMember(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType );
- virtual StructElement &
- Store_ExceptionMember(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType );
- virtual EnumValue & Store_EnumValue(
- Ce_id i_nOwner,
- const String & i_sName,
- const String & i_sValue );
- virtual Attribute & Store_Attribute(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nType,
- bool i_bReadOnly,
- bool i_bBound );
-
- virtual const Module &
- GlobalNamespace() const;
- virtual const CodeEntity &
- Find_Ce(
- Ce_id i_nId ) const;
- virtual const Module &
- Find_Module(
- Ce_id i_nId ) const;
- virtual const Module *
- Search_Module(
- Ce_id i_nId ) const;
- virtual const Function &
- Find_Function(
- Ce_id i_nId ) const;
- virtual const Property &
- Find_Property(
- Ce_id i_nId ) const;
- virtual const EnumValue &
- Find_EnumValue(
- Ce_id i_nId ) const;
- virtual const Constant &
- Find_Constant(
- Ce_id i_nId ) const;
- virtual const StructElement &
- Find_StructElement(
- Ce_id i_nId ) const;
- virtual void Get_Text(
- StringVector & o_module,
- String & o_ce,
- String & o_member,
- const CodeEntity & i_ce ) const;
- virtual const NameLookup &
- NameDictionary() const;
- virtual void Get_AlphabeticalIndex(
- std::vector<Ce_id> &
- o_rResult,
- alphabetical_index::E_Letter
- i_cLetter) const;
- // ACCESS
- virtual Module & GlobalNamespace();
- virtual CodeEntity &
- Find_Ce(
- Ce_id i_nId );
- private:
- // Locals
- Module & lhf_Access_Module(
- Ce_id i_nId );
- void lhf_Put2Storage_and_AssignId(
- CodeEntity & pass_io_rCe );
- void lhf_Store_NewEntity(
- DYN CodeEntity & pass_io_rCe,
- Module & i_rOwner );
- void lhf_Store_NewEntity(
- DYN CodeEntity & pass_io_rCe,
- Ce_id i_nOwnerModule );
- void get_ModuleText(
- StringVector & o_module,
- const CodeEntity & i_ce ) const;
- Struct & lhf_Store_TplStruct(
- Ce_id i_nOwner,
- const String & i_sName,
- Type_id i_nBase,
- const String & i_sTemplateParam );
-
- const Ce_Storage & my_Storage() const;
- Ce_Storage & my_Storage();
- NameLookup & my_NameDictionary() { return *pNameDictionary; }
-
- // DATA
- Dyn<Ce_Storage> pStorage; /// @inv pStorage != 0;
- Module * pGlobalNamespace;
- NameLookup * pNameDictionary;
- TypeAdmin * pTypePilot;
-};
-
-
-// IMPLEMENTATION
-inline const Ce_Storage &
-CeAdmin::Storage() const
-{
- return *pStorage;
-}
-
-inline Ce_Storage &
-CeAdmin::Storage()
-{
- return *pStorage;
-}
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/ia_type.cxx b/autodoc/source/ary/idl/ia_type.cxx
deleted file mode 100644
index 57c853a9..00000000
--- a/autodoc/source/ary/idl/ia_type.cxx
+++ /dev/null
@@ -1,367 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "ia_type.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/qualiname.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_type.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include "ia_ce.hxx"
-#include "is_type.hxx"
-#include "it_builtin.hxx"
-#include "it_ce.hxx"
-#include "it_explicit.hxx"
-#include "it_sequence.hxx"
-#include "it_tplparam.hxx"
-#include "it_xnameroom.hxx"
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-String MakeTemplateName(
- const String & i_localName,
- const std::vector<Type_id> &
- i_templateParameters );
-
-
-
-inline CeAdmin &
-TypeAdmin::my_Ces() const
- { return *pCes; }
-
-inline void
-TypeAdmin::lhf_Put2Storage_and_AssignId( DYN Type & pass_io_rType )
- { // This also assigns an ID to pass_io_rType:
- Storage().Store_Entity(pass_io_rType); }
-
-inline Type_id
-TypeAdmin::lhf_findBuiltInType( const String & i_sName )
- { return ary_cast<ExplicitNameRoom>(Storage()[nXNameRoom_Root])
- .Search_Name(i_sName); }
-
-inline const ExplicitNameRoom &
-TypeAdmin::find_ExplicitNameRoom( Type_id i_nType ) const
-{
- return ary_cast<ExplicitNameRoom>(Storage()[i_nType]);
-}
-
-inline ExplicitNameRoom &
-TypeAdmin::find_ExplicitNameRoom( Type_id i_nType )
-{
- return ary_cast<ExplicitNameRoom>(Storage()[i_nType]);
-}
-
-ExplicitNameRoom &
-TypeAdmin::lhf_CheckIn_XNameRoom( const QualifiedName & i_rName,
- Ce_id i_nModuleOfOccurrence )
-{
- Type_id nRoot = i_rName.IsAbsolute()
- ? Type_id( predefined::type_GlobalXNameRoom )
- : lhf_Get_NameRoomRoot_forModuleofOccurrence( i_nModuleOfOccurrence ).TypeId();
-
- if ( i_rName.NamespaceDepth() == 0 )
- return find_ExplicitNameRoom(nRoot);
-
- QualifiedName::namespace_iterator it = i_rName.first_namespace();
- ExplicitNameRoom *
- ret = & find_ExplicitNameRoom(nRoot);
- for ( ; it != i_rName.end_namespace(); ++it )
- {
- Type_id
- found = ret->Search_Name(*it);
- if (found.IsValid())
- {
- ret = & find_ExplicitNameRoom(found);
- }
- else
- {
- ExplicitNameRoom &
- rNew = *new ExplicitNameRoom(*it, *ret);
- lhf_Put2Storage_and_AssignId(rNew);
- ret->Add_Name( rNew.Name(), rNew.TypeId() );
- ret = &rNew;
- }
-
- } // end for
- return *ret;
-}
-
-Type_id
-TypeAdmin::lhf_CheckIn_TypeName( const String & i_sLocalName,
- ExplicitNameRoom & io_rXNameRoom,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> * i_templateParameters )
-{
- String sSearchLocalName( i_sLocalName );
- if ( i_templateParameters != 0
- ? (!i_templateParameters->empty())
- : false )
- {
- sSearchLocalName = MakeTemplateName(
- i_sLocalName,
- *i_templateParameters);
- }
-
- Type_id
- ret = io_rXNameRoom.Search_Name(sSearchLocalName);
- if (NOT ret.IsValid())
- {
- DYN Type &
- rNewType = *new ExplicitType( i_sLocalName,
- io_rXNameRoom.TypeId(),
- i_nModuleOfOccurrence,
- i_templateParameters );
- lhf_Put2Storage_and_AssignId(rNewType);
- ret = rNewType.TypeId();
- io_rXNameRoom.Add_Name( sSearchLocalName, ret );
- }
- return ret;
-}
-
-Type_id
-TypeAdmin::lhf_CheckIn_Sequence(Type_id i_nType)
-{
- Type_id
- ret = Storage().Search_SequenceOf(i_nType);
-
- if (NOT ret.IsValid())
- {
- DYN Type &
- rNewSeq = *new Sequence(i_nType);
- lhf_Put2Storage_and_AssignId(rNewSeq);
- ret = rNewSeq.Id();
- Storage().Add_Sequence(i_nType, ret);
- }
- return ret;
-}
-
-void
-TypeAdmin::lhf_CheckIn_BuiltInType( const char * i_sName,
- Rid i_nId )
-{
- DYN BuiltInType &
- rNewType = *new BuiltInType(i_sName);
- Storage().Set_Reserved(i_nId, rNewType);
-
- // Put them into both roots, to catch the syntactically correct
- // (though unlikely) ::Any, ::long etc.
- Type_id
- nId(i_nId);
- find_ExplicitNameRoom(nXNameRoom_Root).Add_Name(i_sName, nId);
- find_ExplicitNameRoom(nXNameRoom_Global).Add_Name(i_sName, nId);
-}
-
-ExplicitNameRoom &
-TypeAdmin::lhf_Get_NameRoomRoot_forModuleofOccurrence( Ce_id i_nModuleOfOccurrence )
-{
- const Type_id *
- pFound = csv::find_in_map( aMap_ModuleOfOccurrence2NameRoomRoot,
- i_nModuleOfOccurrence );
- if (pFound != 0)
- return find_ExplicitNameRoom(*pFound);
-
- ExplicitNameRoom &
- ret = *new ExplicitNameRoom;
- lhf_Put2Storage_and_AssignId(ret);
- aMap_ModuleOfOccurrence2NameRoomRoot.insert(std::pair< const Ce_id, Type_id>(i_nModuleOfOccurrence,ret.TypeId()));
- return ret;
-}
-
-TypeAdmin::TypeAdmin()
- : pStorage(new Type_Storage),
- pCes(0), // Needs to be set directly after creation.
- nXNameRoom_Root( static_cast<ary::Rid>(predefined::type_Root_ofXNameRooms) ),
- nXNameRoom_Global( static_cast<ary::Rid>(predefined::type_GlobalXNameRoom) ),
- aMap_ModuleOfOccurrence2NameRoomRoot()
-{
- DYN ExplicitNameRoom &
- drRoot = *new ExplicitNameRoom;
- Storage().Set_Reserved( nXNameRoom_Root.Value(), drRoot );
-
- DYN ExplicitNameRoom &
- drGlobal = *new ExplicitNameRoom(String::Null_(), drRoot);
- Storage().Set_Reserved( nXNameRoom_Global.Value(), drGlobal );
- drRoot.Add_Name( drGlobal.Name(), nXNameRoom_Global );
-
- lhf_Setup_BuildInTypes();
-}
-
-TypeAdmin::~TypeAdmin()
-{
-}
-
-void
-TypeAdmin::lhf_Setup_BuildInTypes()
-{
- lhf_CheckIn_BuiltInType("any", predefined::type_any);
- lhf_CheckIn_BuiltInType("boolean", predefined::type_boolean);
- lhf_CheckIn_BuiltInType("byte", predefined::type_byte);
- lhf_CheckIn_BuiltInType("char", predefined::type_char);
- lhf_CheckIn_BuiltInType("double", predefined::type_double);
- lhf_CheckIn_BuiltInType("float", predefined::type_float);
- lhf_CheckIn_BuiltInType("hyper", predefined::type_hyper);
- lhf_CheckIn_BuiltInType("long", predefined::type_long);
- lhf_CheckIn_BuiltInType("short", predefined::type_short);
- lhf_CheckIn_BuiltInType("string", predefined::type_string);
- lhf_CheckIn_BuiltInType("type", predefined::type_type);
- lhf_CheckIn_BuiltInType("void", predefined::type_void);
- lhf_CheckIn_BuiltInType("unsigned hyper", predefined::type_u_hyper);
- lhf_CheckIn_BuiltInType("unsigned long", predefined::type_u_long);
- lhf_CheckIn_BuiltInType("unsigned short", predefined::type_u_short);
-}
-
-const Type &
-TypeAdmin::CheckIn_Type( QualifiedName & i_rFullName,
- uintt i_nSequenceCount,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> * i_templateParameters )
-{
- // Look in built-in types:
- Type_id
- nType = lhf_findBuiltInType(i_rFullName.LocalName());
- if (NOT nType.IsValid())
- { // No built-in type:
- ExplicitNameRoom &
- rNameRoom = lhf_CheckIn_XNameRoom(i_rFullName,i_nModuleOfOccurrence);
- nType = lhf_CheckIn_TypeName( i_rFullName.LocalName(),
- rNameRoom,
- i_nModuleOfOccurrence,
- i_templateParameters );
- } // endif
-
- for ( uintt s = 0; s < i_nSequenceCount; ++s )
- {
- nType = lhf_CheckIn_Sequence(nType);
- }
-
- return Storage()[nType];
-}
-
-TemplateParamType &
-TypeAdmin::Store_TemplateParamType( String i_sName )
-{
- DYN TemplateParamType &
- ret = *new TemplateParamType( i_sName );
- lhf_Put2Storage_and_AssignId(ret);
- return ret;
-}
-
-const Type &
-TypeAdmin::Find_Type( Type_id i_nType ) const
-{
- return Storage()[i_nType];
-}
-
-String
-TypeAdmin::Search_LocalNameOf( Type_id i_nType ) const
-{
- const Type *
- pType = Storage().Exists(i_nType)
- ? 0
- : & Storage()[i_nType];
- if (pType != 0)
- {
- switch (pType->AryClass())
- {
- case Ce_Type::class_id:
- case ExplicitType::class_id:
- case BuiltInType::class_id:
- return static_cast< const Named_Type& >(*pType).Name();
- }
- }
- return String::Null_();
-}
-
-Ce_id
-TypeAdmin::Search_CeRelatedTo( Type_id i_nType ) const
-{
- const Ce_Type *
- ret = ary_cast<Ce_Type>( & Storage()[i_nType] );
- return ret != 0
- ? ret->RelatedCe()
- : Ce_id_Null();
-}
-
-const ExplicitNameRoom &
-TypeAdmin::Find_XNameRoom( Type_id i_nType ) const
-{
- return find_ExplicitNameRoom(i_nType);
-}
-
-bool
-TypeAdmin::IsBuiltInOrRelated( const Type & i_rType ) const
-{
- if ( is_type<BuiltInType>(i_rType) )
- return true;
- else
- {
- const Type *
- pType = &i_rType;
- while (is_type<Sequence>(*pType))
- {
- Type_id
- nt = ary_cast<Sequence>(pType)->RelatedType();
- if (NOT nt.IsValid())
- return false;
- pType = & Storage()[nt];
- }
- return is_type<BuiltInType>(*pType);
- }
-}
-
-
-String
-MakeTemplateName( const String & i_localName,
- const std::vector<Type_id> & )
-{
- StreamLock
- sl(200);
-
- // This is the simple solution, assuming that there is only
- // one version of templatisation allowed with a given name.
- return
- sl()
- << i_localName
- << C_cTemplateDelimiter
- << c_str;
-}
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/ia_type.hxx b/autodoc/source/ary/idl/ia_type.hxx
deleted file mode 100644
index 88cd1836..00000000
--- a/autodoc/source/ary/idl/ia_type.hxx
+++ /dev/null
@@ -1,173 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IA_TYPE_HXX
-#define ARY_IDL_IA_TYPE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/ip_type.hxx>
- // COMPONENTS
- // PARAMETERS
-#include "is_type.hxx"
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-class Type_Storage;
-class CeAdmin;
-class TemplateParamType;
-
-
-class TypeAdmin : public TypePilot
-{
- public:
- // LIFECYCLE
- TypeAdmin();
-
- void Assign_CePilot(
- CeAdmin & io_rCes );
- virtual ~TypeAdmin();
-
- // OPERATIONS
- TemplateParamType & Store_TemplateParamType(
- String i_sName );
- // INQUIRY
- const Type_Storage &
- Storage() const;
- // ACCESS
- Type_Storage & Storage();
-
- // INHERITED
- // Interface TypePilot:
- virtual const Type &
- CheckIn_Type(
- QualifiedName & i_rFullName,
- uintt i_nSequenceCount,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> *
- i_templateParameters );
- virtual const Type &
- Find_Type(
- Type_id i_nType ) const;
- virtual String Search_LocalNameOf(
- Type_id i_nType ) const;
- virtual Ce_id Search_CeRelatedTo(
- Type_id i_nType ) const;
- virtual const ExplicitNameRoom &
- Find_XNameRoom(
- Type_id i_nType ) const;
- virtual bool IsBuiltInOrRelated(
- const Type & i_rType ) const;
- private:
- // Locals
- CeAdmin & my_Ces() const;
-
- void lhf_Put2Storage_and_AssignId(
- DYN Type & pass_io_rType );
-
- ExplicitNameRoom & lhf_CheckIn_XNameRoom(
- const QualifiedName &
- i_rName,
- Ce_id i_nModuleOfOccurrence );
- Type_id lhf_CheckIn_TypeName(
- const String & i_sLocalName,
- ExplicitNameRoom & io_rExplicitNameRoom,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> *
- i_templateParameters );
- Type_id lhf_CheckIn_Sequence(
- Type_id i_nType );
- void lhf_CheckIn_BuiltInType(
- const char * i_sName,
- Rid i_nId );
- const ExplicitNameRoom &
- find_ExplicitNameRoom(
- Type_id i_nType ) const;
- ExplicitNameRoom & find_ExplicitNameRoom(
- Type_id i_nType );
- ExplicitNameRoom & lhf_Get_NameRoomRoot_forModuleofOccurrence(
- Ce_id i_nModuleOfOccurrence );
-
- /// @return Type_id::Null_(), if not found.
- Type_id lhf_findBuiltInType(
- const String & i_sName );
- /// @precond nGlobalNamespace must be valid.
- void lhf_Setup_BuildInTypes();
-
- // DATA
- Type_Storage * pStorage; /// @inv pStorage != 0
- CeAdmin * pCes; /// @inv pCes != 0
-
- // Data for saving time:
- Type_id nXNameRoom_Root; /** @descr This is different from nXNameRoom_Global, because
- the root of explicit name rooms in code without leading "::" is unknown.
- */
- Type_id nXNameRoom_Global;
-
- // HACK, because this needs to be saved somehow and is not in storage:
- std::map<Ce_id, Type_id>
- aMap_ModuleOfOccurrence2NameRoomRoot;
-};
-
-
-
-
-
-// IMPLEMENTATION
-inline const Type_Storage &
-TypeAdmin::Storage() const
-{
- return *pStorage;
-}
-
-inline Type_Storage &
-TypeAdmin::Storage()
-{
- return *pStorage;
-}
-
-inline void
-TypeAdmin::Assign_CePilot( CeAdmin & io_rCes )
-{
- pCes = &io_rCes;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/is_ce.cxx b/autodoc/source/ary/idl/is_ce.cxx
deleted file mode 100644
index 998b4c72..00000000
--- a/autodoc/source/ary/idl/is_ce.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "is_ce.hxx"
-
-// NOT FULLY DEFINED SERVICES
-
-namespace
-{
- const uintt
- C_nReservedElements = ary::idl::predefined::ce_MAX; // Skipping "0" and the GlobalNamespace
-}
-
-
-namespace ary
-{
-namespace idl
-{
-
-Ce_Storage * Ce_Storage::pInstance_ = 0;
-
-
-
-
-Ce_Storage::Ce_Storage()
- : stg::Storage<CodeEntity>(C_nReservedElements)
-{
- csv_assert(pInstance_ == 0);
- pInstance_ = this;
-}
-
-Ce_Storage::~Ce_Storage()
-{
- csv_assert(pInstance_ != 0);
- pInstance_ = 0;
-}
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/is_ce.hxx b/autodoc/source/ary/idl/is_ce.hxx
deleted file mode 100644
index 46c24659..00000000
--- a/autodoc/source/ary/idl/is_ce.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IS_CE_HXX
-#define ARY_IDL_IS_CE_HXX
-
-// BASE CLASSES
-#include <store/s_storage.hxx>
-// USED SERVICES
-#include <ary/idl/i_ce.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** The data base for all ->ary::idl::CodeEntity objects.
-*/
-class Ce_Storage : public ::ary::stg::Storage< ::ary::idl::CodeEntity >
-{
- public:
- Ce_Storage();
- virtual ~Ce_Storage();
-
- static Ce_Storage & Instance_() { csv_assert(pInstance_ != 0);
- return *pInstance_; }
- private:
- // DATA
- static Ce_Storage * pInstance_;
-};
-
-
-
-
-namespace predefined
-{
-
-enum E_CodeEntity
-{
- ce_GlobalNamespace = 1,
- ce_MAX
-};
-
-} // namespace predefined
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/is_type.cxx b/autodoc/source/ary/idl/is_type.cxx
deleted file mode 100644
index 099360c1..00000000
--- a/autodoc/source/ary/idl/is_type.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "is_type.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-
-namespace
-{
-
-const uintt
- C_nReservedElements = ary::idl::predefined::type_MAX; // Skipping "0" and the built in types.
-}
-
-
-namespace ary
-{
-namespace idl
-{
-
-Type_Storage * Type_Storage::pInstance_ = 0;
-
-
-
-Type_Storage::Type_Storage()
- : stg::Storage<Type>(C_nReservedElements),
- aSequenceIndex()
-{
- csv_assert(pInstance_ == 0);
- pInstance_ = this;
-}
-
-Type_Storage::~Type_Storage()
-{
- csv_assert(pInstance_ != 0);
- pInstance_ = 0;
-}
-
-void
-Type_Storage::Add_Sequence( Type_id i_nRelatedType,
- Type_id i_nSequence )
-{
- aSequenceIndex[i_nRelatedType] = i_nSequence;
-}
-
-Type_id
-Type_Storage::Search_SequenceOf( Type_id i_nRelatedType )
-{
- return csv::value_from_map(aSequenceIndex, i_nRelatedType);
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/is_type.hxx b/autodoc/source/ary/idl/is_type.hxx
deleted file mode 100644
index 540de196..00000000
--- a/autodoc/source/ary/idl/is_type.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IS_TYPE_HXX
-#define ARY_IDL_IS_TYPE_HXX
-
-// BASE CLASSES
-#include <store/s_storage.hxx>
-// USED SERVICES
-#include <ary/idl/i_type.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** The data base for all ->ary::idl::CodeEntity objects.
-*/
-class Type_Storage : public ::ary::stg::Storage< ::ary::idl::Type >
-{
- public:
- Type_Storage();
- ~Type_Storage();
-
-
- void Add_Sequence(
- Type_id i_nRelatedType,
- Type_id i_nSequence );
-
- Type_id Search_SequenceOf(
- Type_id i_nRelatedType );
-
- static Type_Storage &
- Instance_();
- private:
- /** value_type.first := id of the base type
- value_type.second := id of the sequence<base type>
- */
- typedef std::map<Type_id,Type_id> Map_Sequences;
-
- // DATA
- Map_Sequences aSequenceIndex;
-
- static Type_Storage *
- pInstance_;
-};
-
-
-
-namespace predefined
-{
-
-enum E_Type
-{
- type_Root_ofXNameRooms = 1,
- type_GlobalXNameRoom,
- type_any,
- type_boolean,
- type_byte,
- type_char,
- type_double,
- type_float,
- type_hyper,
- type_long,
- type_short,
- type_string,
- type_type,
- type_void,
- type_u_hyper,
- type_u_long,
- type_u_short,
- type_ellipse, // ...
- type_MAX
-};
-
-} // namespace predefined
-
-
-
-
-// IMPLEMENTATION
-inline Type_Storage &
-Type_Storage::Instance_()
-{
- csv_assert(pInstance_ != 0);
- return *pInstance_;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_builtin.cxx b/autodoc/source/ary/idl/it_builtin.cxx
deleted file mode 100644
index 30a0ce91..00000000
--- a/autodoc/source/ary/idl/it_builtin.cxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "it_builtin.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/processor.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-
-BuiltInType::BuiltInType( const char * i_sName )
- : Named_Type(i_sName)
-{
-}
-
-BuiltInType::~BuiltInType()
-{
-}
-
-ClassId
-BuiltInType::get_AryClass() const
-{
- return class_id;
-}
-
-void
-BuiltInType::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-void
-BuiltInType::inq_Get_Text( StringVector & , // o_module
- String & o_name,
- Ce_id & , // o_nRelatedCe
- int & , // o_nSequenceCount
- const Gate & ) const // i_rGate
-{
- o_name = Name();
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_builtin.hxx b/autodoc/source/ary/idl/it_builtin.hxx
deleted file mode 100644
index a5447bf1..00000000
--- a/autodoc/source/ary/idl/it_builtin.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_BUILTIN_HXX
-#define ARY_IDL_IT_BUILTIN_HXX
-
-// BASE CLASSES
-#include "it_named.hxx"
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** A type defined by the IDL language.
-*/
-class BuiltInType : public Named_Type
-{
- public:
- enum E_ClassId { class_id = 2200 };
-
- // LIFECYCLE
- BuiltInType(
- const char * i_sName );
- virtual ~BuiltInType();
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface Object:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequenceCount,
- const Gate & i_rGate ) const;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_ce.cxx b/autodoc/source/ary/idl/it_ce.cxx
deleted file mode 100644
index 5975028a..00000000
--- a/autodoc/source/ary/idl/it_ce.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "it_ce.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ip_ce.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-Ce_Type::Ce_Type( Ce_id i_relatedCe,
- const std::vector<Type_id> * i_templateParameters )
- : nRelatedCe(i_relatedCe),
- pTemplateParameters(0)
-{
- if (i_templateParameters != 0)
- pTemplateParameters = new std::vector<Type_id>(*i_templateParameters);
-}
-
-Ce_Type::~Ce_Type()
-{
-}
-
-ClassId
-Ce_Type::get_AryClass() const
-{
- return class_id;
-}
-
-void
-Ce_Type::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-void
-Ce_Type::inq_Get_Text( StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & , // o_nSequenceCount
- const Gate & i_rGate ) const
-{
- String sDummyMember;
-
- const CodeEntity &
- rCe = i_rGate.Ces().Find_Ce(nRelatedCe);
- i_rGate.Ces().Get_Text( o_module,
- o_name,
- sDummyMember,
- rCe );
- o_nRelatedCe = nRelatedCe;
-}
-
-const std::vector<Type_id> *
-Ce_Type::inq_TemplateParameters() const
-{
- return pTemplateParameters.Ptr();
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_ce.hxx b/autodoc/source/ary/idl/it_ce.hxx
deleted file mode 100644
index 876ae2ca..00000000
--- a/autodoc/source/ary/idl/it_ce.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_CE_HXX
-#define ARY_IDL_IT_CE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_type.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** A named ->Type related to its corresponding
- ->CodeEntity.
-*/
-class Ce_Type : public Type
-{
- public:
- enum E_ClassId { class_id = 2201 };
-
- // LIFECYCLE
- Ce_Type(
- Ce_id i_relatedCe,
- const std::vector<Type_id> *
- i_templateParameters );
- virtual ~Ce_Type();
-
- // INQUIRY
- Ce_id RelatedCe() const { return nRelatedCe; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface Object:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequemceCount,
- const Gate & i_rGate ) const;
- virtual const std::vector<Type_id> *
- inq_TemplateParameters() const;
- // DATA
- Ce_id nRelatedCe;
- Dyn< std::vector<Type_id> >
- pTemplateParameters;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_explicit.cxx b/autodoc/source/ary/idl/it_explicit.cxx
deleted file mode 100644
index ce65208a..00000000
--- a/autodoc/source/ary/idl/it_explicit.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "it_explicit.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-#include "it_xnameroom.hxx"
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-ExplicitType::ExplicitType( const String & i_sName,
- Type_id i_nXNameRoom,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> *
- i_templateParameters )
- : Named_Type(i_sName),
- nXNameRoom(i_nXNameRoom),
- nModuleOfOccurrence(i_nModuleOfOccurrence),
- pTemplateParameters(0)
-{
- if (i_templateParameters != 0)
- pTemplateParameters = new std::vector<Type_id>(*i_templateParameters);
-}
-
-ExplicitType::~ExplicitType()
-{
-}
-
-ClassId
-ExplicitType::get_AryClass() const
-{
- return class_id;
-}
-
-void
-ExplicitType::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-void
-ExplicitType::inq_Get_Text( StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequenceCount,
- const Gate & i_rGate ) const
-{
- const ExplicitNameRoom &
- rNameRoom = i_rGate.Types().Find_XNameRoom(nXNameRoom);
- rNameRoom.Get_Text(o_module,o_name,o_nRelatedCe,o_nSequenceCount,i_rGate);
-
- o_name = Name();
-}
-
-const std::vector<Type_id> *
-ExplicitType::inq_TemplateParameters() const
-{
- return pTemplateParameters.Ptr();
-}
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_explicit.hxx b/autodoc/source/ary/idl/it_explicit.hxx
deleted file mode 100644
index 091cfafb..00000000
--- a/autodoc/source/ary/idl/it_explicit.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_EXPLICIT_HXX
-#define ARY_IDL_IT_EXPLICIT_HXX
-
-// BASE CLASSES
-#include "it_named.hxx"
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** A named @->Type, not yet related to its corresponding
- @->CodeEntity.
-*/
-class ExplicitType : public Named_Type
-{
- public:
- enum E_ClassId { class_id = 2203 };
-
- // LIFECYCLE
- ExplicitType(
- const String & i_sName,
- Type_id i_nXNameRoom,
- Ce_id i_nModuleOfOccurrence,
- const std::vector<Type_id> *
- i_templateParameters );
- virtual ~ExplicitType();
-
- // INQUIRY
- Ce_id ModuleOfOccurrence() const
- { return nModuleOfOccurrence; }
- Type_id NameRoom() const { return nXNameRoom; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface CppEntity:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequemceCount,
- const Gate & i_rGate ) const;
- virtual const std::vector<Type_id> *
- inq_TemplateParameters() const;
- // DATA
- Type_id nXNameRoom; // As written in code.
- Ce_id nModuleOfOccurrence;
- Dyn< const std::vector<Type_id> >
- pTemplateParameters;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_named.hxx b/autodoc/source/ary/idl/it_named.hxx
deleted file mode 100644
index cece6c1c..00000000
--- a/autodoc/source/ary/idl/it_named.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_NAMED_HXX
-#define ARY_IDL_IT_NAMED_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/idl/i_type.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-
-
-/** Represents types with a name - in opposite to e.g. sequences,
- which do not have one.
-*/
-class Named_Type : public Type
-{
- public:
- // LIFECYCLE
- virtual ~Named_Type() {}
-
- // INQUIRY
- const String & Name() const { return sName; }
-
- protected:
- Named_Type(
- const String & i_sName )
- : sName(i_sName) { }
- private:
- // DATA
- String sName;
-};
-
-
-
-} // namespace idl
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_sequence.cxx b/autodoc/source/ary/idl/it_sequence.cxx
deleted file mode 100644
index e82087dd..00000000
--- a/autodoc/source/ary/idl/it_sequence.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "it_sequence.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_type.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-Sequence::Sequence( Type_id i_nRelatedType )
- : nRelatedType(i_nRelatedType)
-{
-}
-
-Sequence::~Sequence()
-{
-}
-
-ClassId
-Sequence::get_AryClass() const
-{
- return class_id;
-}
-
-void
-Sequence::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-void
-Sequence::inq_Get_Text( StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequenceCount,
- const Gate & i_rGate ) const
-{
- ++o_nSequenceCount;
-
- i_rGate.Types().Find_Type(nRelatedType)
- .Get_Text( o_module,
- o_name,
- o_nRelatedCe,
- o_nSequenceCount,
- i_rGate );
-}
-
-const Type &
-Sequence::inq_FirstEnclosedNonSequenceType(const Gate & i_rGate) const
-{
- return i_rGate.Types().Find_Type(nRelatedType).FirstEnclosedNonSequenceType(i_rGate);
-}
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_sequence.hxx b/autodoc/source/ary/idl/it_sequence.hxx
deleted file mode 100644
index 0947eb68..00000000
--- a/autodoc/source/ary/idl/it_sequence.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_SEQUENCE_HXX
-#define ARY_IDL_IT_SEQUENCE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_type.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** A sequence (an array of a type).
-*/
-class Sequence : public Type
-{
- public:
- enum E_ClassId { class_id = 2202 };
-
- // LIFECYCLE
- Sequence(
- Type_id i_nRelatedType );
- virtual ~Sequence();
-
- // INQUIRY
- Type_id RelatedType() const { return nRelatedType; }
-
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface Object:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequemceCount,
- const Gate & i_rGate ) const;
- virtual const Type &
- inq_FirstEnclosedNonSequenceType(
- const Gate & i_rGate ) const;
- // DATA
- Type_id nRelatedType;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_tplparam.cxx b/autodoc/source/ary/idl/it_tplparam.cxx
deleted file mode 100644
index 1ff4c052..00000000
--- a/autodoc/source/ary/idl/it_tplparam.cxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "it_tplparam.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/processor.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-
-TemplateParamType::TemplateParamType( const char * i_sName )
- : Named_Type(i_sName)
-{
-}
-
-TemplateParamType::~TemplateParamType()
-{
-}
-
-ClassId
-TemplateParamType::get_AryClass() const
-{
- return class_id;
-}
-
-void
-TemplateParamType::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-void
-TemplateParamType::inq_Get_Text( StringVector & , // o_module
- String & o_name,
- Ce_id & , // o_nRelatedCe
- int & , // o_nSequenceCount
- const Gate & ) const // i_rGate
-{
- o_name = Name();
-}
-
-
-//************* Implemented default function for idl::Type ********//
-
-const std::vector<Type_id> *
-Type::inq_TemplateParameters() const
-{
- return 0;
-}
-
-const Type &
-Type::inq_FirstEnclosedNonSequenceType(const Gate & ) const
-{
- return *this;
-}
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_tplparam.hxx b/autodoc/source/ary/idl/it_tplparam.hxx
deleted file mode 100644
index 8aa116e4..00000000
--- a/autodoc/source/ary/idl/it_tplparam.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_TPLPARAM_HXX
-#define ARY_IDL_IT_TPLPARAM_HXX
-
-// BASE CLASSES
-#include "it_named.hxx"
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** @resp Represents a template type when it is used within the
- declaring struct.
-*/
-class TemplateParamType : public Named_Type
-{
- public:
- enum E_ClassId { class_id = 2205 };
-
- // LIFECYCLE
- TemplateParamType(
- const char * i_sName );
- virtual ~TemplateParamType();
-
- Ce_id StructId() const; /// The struct which declares this type.
- void Set_StructId(
- Ce_id i_nStruct );
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface Object:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequenceCount,
- const Gate & i_rGate ) const;
- // DATA
- Ce_id nStruct; /// The struct which declares this type.
-};
-
-
-
-
-// IMPLEMENTATION
-inline Ce_id
-TemplateParamType::StructId() const
-{
- return nStruct;
-}
-
-inline void
-TemplateParamType::Set_StructId( Ce_id i_nStruct )
-{
- nStruct = i_nStruct;
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_xnameroom.cxx b/autodoc/source/ary/idl/it_xnameroom.cxx
deleted file mode 100644
index 0a9b06e9..00000000
--- a/autodoc/source/ary/idl/it_xnameroom.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "it_xnameroom.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/processor.hxx>
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_type.hxx>
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-ExplicitNameRoom::ExplicitNameRoom()
- : aImpl()
-{
-}
-
-ExplicitNameRoom::ExplicitNameRoom( const String & i_sName,
- const ExplicitNameRoom & i_rParent )
- : aImpl( i_sName, i_rParent.aImpl, i_rParent.TypeId() )
-{
-}
-
-ExplicitNameRoom::~ExplicitNameRoom()
-{
-}
-
-ClassId
-ExplicitNameRoom::get_AryClass() const
-{
- return class_id;
-}
-
-void
-ExplicitNameRoom::do_Accept( csv::ProcessorIfc & io_processor ) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-void
-ExplicitNameRoom::inq_Get_Text( StringVector & o_module,
- String & , // o_name
- Ce_id & , // o_nRelatedCe
- int & , // o_nSequemceCount
- const Gate & ) const // i_rGate
-{
- StringVector::const_iterator it = NameChain_Begin();
- if ( it != NameChain_End()
- ? (*it).empty()
- : false )
- { // Don't put out the root global namespace
- ++it;
- }
-
- for ( ;
- it != NameChain_End();
- ++it )
- {
- o_module.push_back(*it);
- }
-}
-
-
-
-
-} // namespace idl
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/it_xnameroom.hxx b/autodoc/source/ary/idl/it_xnameroom.hxx
deleted file mode 100644
index ec403045..00000000
--- a/autodoc/source/ary/idl/it_xnameroom.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_IT_XNAMEROOM_HXX
-#define ARY_IDL_IT_XNAMEROOM_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_type.hxx>
-#include <nametreenode.hxx>
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** A namespace for ->Type s, as they are explicitely written in code.
-
- The search/identification string is usually the local name of
- the Type. But for templated structs, the search string has this
- pattern:
- <LocalName> '<' <StringOfTemplateTypeId>
-*/
-class ExplicitNameRoom : public Type
-{
- public:
- enum E_ClassId { class_id = 2204 };
-
- // LIFECYCLE
- ExplicitNameRoom();
- ExplicitNameRoom(
- const String & i_sName,
- const ExplicitNameRoom &
- i_rParent );
- virtual ~ExplicitNameRoom();
-
- // OPERATIONS
- /** @param i_sSearchString
- A local type name usually.
- For templated types see class docu.
- @see ExplicitNameRoom
- */
- void Add_Name(
- const String & i_sSearchString,
- Type_id i_nId )
- { aImpl.Add_Name(i_sSearchString,i_nId); }
- // INQUIRY
- const String & Name() const { return aImpl.Name(); }
- intt Depth() const { return aImpl.Depth(); }
- void Get_FullName(
- StringVector & o_rText,
- Ce_idList * o_pRelatedCes,
- const Gate & i_rGate ) const;
- bool IsAbsolute() const { return Depth() > 0
- ? (*NameChain_Begin()).empty()
- : false; }
- /** @param i_sSearchString
- A local type name usually.
- For templated types see class docu.
- @see ExplicitNameRoom
- */
- Type_id Search_Name(
- const String & i_sSearchString ) const
- { return aImpl.Search_Name(i_sSearchString); }
-
- StringVector::const_iterator
- NameChain_Begin() const
- { return aImpl.NameChain_Begin(); }
- StringVector::const_iterator
- NameChain_End() const
- { return aImpl.NameChain_End(); }
- private:
- // Interface csv::ConstProcessorClient:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- // Interface Object:
- virtual ClassId get_AryClass() const;
-
- // Interface Type:
- virtual void inq_Get_Text(
- StringVector & o_module,
- String & o_name,
- Ce_id & o_nRelatedCe,
- int & o_nSequemceCount,
- const Gate & i_rGate ) const;
- // DATA
- NameTreeNode<Type_id>
- aImpl;
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/idl/makefile.mk b/autodoc/source/ary/idl/makefile.mk
deleted file mode 100644
index bf260e2c..00000000
--- a/autodoc/source/ary/idl/makefile.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary_idl
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/i_attribute.obj \
- $(OBJ)$/i_ce.obj \
- $(OBJ)$/i_ce2s.obj \
- $(OBJ)$/i_comrela.obj \
- $(OBJ)$/i_constant.obj \
- $(OBJ)$/i_constgroup.obj \
- $(OBJ)$/i_enum.obj \
- $(OBJ)$/i_enumvalue.obj \
- $(OBJ)$/i_exception.obj \
- $(OBJ)$/i_function.obj \
- $(OBJ)$/i_interface.obj \
- $(OBJ)$/i_module.obj \
- $(OBJ)$/i_namelookup.obj \
- $(OBJ)$/i_param.obj \
- $(OBJ)$/i_property.obj \
- $(OBJ)$/i_reposypart.obj \
- $(OBJ)$/i_service.obj \
- $(OBJ)$/i_singleton.obj \
- $(OBJ)$/i_siservice.obj \
- $(OBJ)$/i_sisingleton.obj \
- $(OBJ)$/i_struct.obj \
- $(OBJ)$/i_structelem.obj \
- $(OBJ)$/i_traits.obj \
- $(OBJ)$/i_typedef.obj \
- $(OBJ)$/i2s_calculator.obj \
- $(OBJ)$/ia_ce.obj \
- $(OBJ)$/ia_type.obj \
- $(OBJ)$/is_ce.obj \
- $(OBJ)$/is_type.obj \
- $(OBJ)$/it_builtin.obj \
- $(OBJ)$/it_ce.obj \
- $(OBJ)$/it_explicit.obj \
- $(OBJ)$/it_sequence.obj \
- $(OBJ)$/it_tplparam.obj \
- $(OBJ)$/it_xnameroom.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/autodoc/source/ary/inc/cpp_internalgate.hxx b/autodoc/source/ary/inc/cpp_internalgate.hxx
deleted file mode 100644
index a81d9f11..00000000
--- a/autodoc/source/ary/inc/cpp_internalgate.hxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_INTERNALGATE_HXX
-#define ARY_CPP_INTERNALGATE_HXX
-
-// BASE CLASSES
-#include <ary/cpp/c_gate.hxx>
-
-namespace ary
-{
- class RepositoryCenter;
-}
-
-
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-/** Provides access to the ->cpp::RepositoryPartition as far as is needed
- by the ->RepositoryCenter.
-*/
-class InternalGate : public ::ary::cpp::Gate
-{
- public:
- virtual ~InternalGate() {}
-
- static DYN InternalGate &
- Create_Partition_(
- RepositoryCenter & i_center );
-};
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/cross_refs.hxx b/autodoc/source/ary/inc/cross_refs.hxx
deleted file mode 100644
index 7e7cbe5f..00000000
--- a/autodoc/source/ary/inc/cross_refs.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CROSS_REFS_HXX
-#define ARY_CROSS_REFS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include "sorted_idset.hxx"
-
-
-template <class VALUE_LIST, class TYPES>
-class CrossReferences
-{
- public:
- typedef TYPES::element_type element;
-
- /// Checks for double occurrences
- void Add(
- VALUE_LIST::index_type
- i_nPosition
- const element & i_rElem );
- void Get_List(
- Dyn_StdConstIterator<element> &
- o_rResult ) const;
- private:
- SortedIdSet<TYPES> aData[VALUE_LIST::max];
-};
-
-
-
-namespace ary
-{
-
-template <class TYPES>
-class SortedIdSet
-{
- public:
- typedef typename TYPES::element_type element;
- typedef typename TYPES::sort_type sorter;
- typedef typename TYPES::find_type finder;
-
- SortedIdSet(
- const finder & i_rFinder )
- : aSorter(i_rFinder),
- aData(aSorter) {}
- ~SortedIdSet() {}
-
- void Get_Begin(
- Dyn_StdConstIterator<element> &
- o_rResult )
- { o_rResult = new SCI_Set<FINDER>(aData); }
- void Add(
- const element & i_rElement )
- { aData.insert(i_rElement); }
-
- private:
- typedef std::set<element, sorter> Set;
-
- // DATA
- sorter aSorter;
- Set aData;
-};
-
-
-} // namespace ary
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/idl_internalgate.hxx b/autodoc/source/ary/inc/idl_internalgate.hxx
deleted file mode 100644
index 41ba4da7..00000000
--- a/autodoc/source/ary/inc/idl_internalgate.hxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDL_INTERNALGATE_HXX
-#define ARY_IDL_INTERNALGATE_HXX
-
-// BASE CLASSES
-#include <ary/idl/i_gate.hxx>
-
-namespace ary
-{
- class RepositoryCenter;
-}
-
-
-
-
-namespace ary
-{
-namespace idl
-{
-
-
-/** Provides access to the ->idl::RepositoryPartition as far as is needed
- by the ->RepositoryCenter.
-*/
-class InternalGate : public ::ary::idl::Gate
-{
- public:
- virtual ~InternalGate() {}
-
- static DYN InternalGate &
- Create_Partition_(
- RepositoryCenter & i_center );
-};
-
-
-
-
-} // namespace idl
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/idsort.hxx b/autodoc/source/ary/inc/idsort.hxx
deleted file mode 100644
index b87572d5..00000000
--- a/autodoc/source/ary/inc/idsort.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_IDSORT_HXX
-#define ARY_IDSORT_HXX
-
-
-/** A compare function that sorts ids of repository entities in the same
- storage.
-
- @see ::ary::SortedIds
-*/
-template<class COMPARE>
-struct IdSorter
-{
- bool operator()(
- typename COMPARE::id_type
- i_1,
- typename COMPARE::id_type
- i_2 ) const
- { return COMPARE::Lesser_(
- COMPARE::KeyOf_(COMPARE::EntityOf_(i_1)),
- COMPARE::KeyOf_(COMPARE::EntityOf_(i_2)) );
- }
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/loc_internalgate.hxx b/autodoc/source/ary/inc/loc_internalgate.hxx
deleted file mode 100644
index a2dc9510..00000000
--- a/autodoc/source/ary/inc/loc_internalgate.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_INTERNALGATE_HXX
-#define ARY_LOC_INTERNALGATE_HXX
-
-// USED SERVICES
-
-namespace ary
-{
-namespace loc
-{
- class LocationPilot;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** Additional access to locations for the repository implementation.
-*/
-class InternalGate
-{
- public:
-
- static DYN LocationPilot &
- Create_Locations_();
-};
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/nametreenode.hxx b/autodoc/source/ary/inc/nametreenode.hxx
deleted file mode 100644
index 7cf73813..00000000
--- a/autodoc/source/ary/inc/nametreenode.hxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_NAMETREENODE_HXX
-#define ARY_NAMETREENODE_HXX
-// KORR_DEPRECATED_3.0
-// Replace by ::ary::symtree::Node.
-
-// USED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <sci_impl.hxx>
-// HACK because of SunPro 5.2 compiler bug with templates:
-#include <ary/idl/i_module.hxx>
-
-
-
-
-namespace ary
-{
-
-
-/** Implementation of a node in a namespace-tree.
-*/
-template<class ITEM_ID>
-class NameTreeNode
-{
- public:
- typedef NameTreeNode self;
- typedef ITEM_ID item_id;
- typedef StringVector::const_iterator name_iterator;
- typedef std::map<String, item_id> Map_LocalNames;
-
- // LIFECYCLE
- NameTreeNode();
- NameTreeNode(
- const String & i_sName,
- const self & i_rParent,
- ITEM_ID i_nParentId );
- virtual ~NameTreeNode();
-
- // OPERATIONS
- void Add_Name(
- const String & i_sName,
- item_id i_nId );
- // INQUIRY
- const String & Name() const { return Depth() > 0 ? aCompleteNameChain.back() : String::Null_(); }
- item_id Parent() const { return nParent; }
- intt Depth() const { return aCompleteNameChain.size(); }
-
- bool IsEquivalent(
- const NameTreeNode &
- i_rNode ) const;
- name_iterator NameChain_Begin() const { return aCompleteNameChain.begin(); }
- name_iterator NameChain_End() const { return aCompleteNameChain.end(); }
-
- item_id Search_Name(
- const String & i_sName ) const;
- void Get_Names(
- Dyn_StdConstIterator<ITEM_ID> &
- o_rResult ) const;
- const Map_LocalNames &
- LocalNames() const { return aLocalNames; }
- private:
- // Locals
- Map_LocalNames & LocalNames() { return aLocalNames; }
-
- // DATA
- Map_LocalNames aLocalNames;
- StringVector aCompleteNameChain;
- item_id nParent;
-};
-
-
-
-
-// IMPLEMENTATION
-template<class ITEM_ID>
-NameTreeNode<ITEM_ID>::NameTreeNode()
- : aLocalNames(),
- aCompleteNameChain(),
- nParent(0)
-{
-}
-
-template<class ITEM_ID>
-NameTreeNode<ITEM_ID>::NameTreeNode( const String & i_sName,
- const self & i_rParent,
- ITEM_ID i_nParentId )
- : aLocalNames(),
- aCompleteNameChain(),
- nParent(i_nParentId)
-{
- aCompleteNameChain.reserve(i_rParent.Depth()+1);
- for ( name_iterator it = i_rParent.NameChain_Begin();
- it != i_rParent.NameChain_End();
- ++it )
- {
- aCompleteNameChain.push_back(*it);
- }
- aCompleteNameChain.push_back(i_sName);
-}
-
-template<class ITEM_ID>
-NameTreeNode<ITEM_ID>::~NameTreeNode()
-{
-}
-
-
-template<class ITEM_ID>
-inline void
-NameTreeNode<ITEM_ID>::Add_Name( const String & i_sName,
- item_id i_nId )
-{
- LocalNames().insert( typename Map_LocalNames::value_type(i_sName, i_nId) );
-}
-
-
-template<class ITEM_ID>
-inline bool
-NameTreeNode<ITEM_ID>::IsEquivalent( const NameTreeNode & i_rNode ) const
-{
- return aCompleteNameChain == i_rNode.aCompleteNameChain;
-}
-
-template<class ITEM_ID>
-inline ITEM_ID
-NameTreeNode<ITEM_ID>::Search_Name( const String & i_sName ) const
-{
- return csv::value_from_map(LocalNames(),i_sName, ITEM_ID(0));
-}
-
-template<class ITEM_ID>
-inline void
-NameTreeNode<ITEM_ID>::Get_Names( Dyn_StdConstIterator<ITEM_ID> & o_rResult ) const
-{
- o_rResult = new SCI_DataInMap<String,item_id>(LocalNames());
-}
-
-
-// HACK because of SunPro 5.2 compiler bug with templates:
-// ary::idl::Module has to be "FIND_NODE::node_type"
-// must be solved later somehow.
-template <class FIND_NODE>
-typename FIND_NODE::id_type
-Search_SubTree( const ary::idl::Module & i_rStart,
- const FIND_NODE & i_rNodeFinder )
-{
- const ary::idl::Module *
- ret = &i_rStart;
-
- for ( StringVector::const_iterator it = i_rNodeFinder.Begin();
- it != i_rNodeFinder.End() AND ret != 0;
- ++it )
- {
- ret = i_rNodeFinder(ret->Search_Name(*it));
- }
-
- typename FIND_NODE::id_type nret(0);
- return ret != 0
- ? ret->Search_Name(i_rNodeFinder.Name2Search())
- : nret;
-}
-
-template <class FIND_NODE>
-typename FIND_NODE::id_type
-Search_SubTree_UpTillRoot( const ary::idl::Module & i_rStart,
- const FIND_NODE & i_rNodeFinder )
-{
- typename FIND_NODE::id_type
- ret(0);
- for ( const ary::idl::Module * start = &i_rStart;
- start != 0 AND NOT ret.IsValid();
- start = i_rNodeFinder(start->Owner()) )
- {
- ret = Search_SubTree( *start,
- i_rNodeFinder );
- }
- return ret;
-}
-// END Hack for SunPro 5.2 compiler bug.
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/reposy.hxx b/autodoc/source/ary/inc/reposy.hxx
deleted file mode 100644
index 0d89b504..00000000
--- a/autodoc/source/ary/inc/reposy.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_REPOSY_HXX
-#define ARY_REPOSY_HXX
-
-// BASE CLASSES
-#include <ary/ary.hxx>
-// USED SERVICES
-#include <cosv/ploc_dir.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class InternalGate;
-}
-namespace idl
-{
- class InternalGate;
-}
-} // namespace ary
-
-
-
-
-namespace ary
-{
-
-
-/** Implements ::ary::Repository.
-
- @see Repository
-*/
-
-class RepositoryCenter : public ::ary::Repository
-{
- public:
- // LIFECYCLE
- RepositoryCenter();
- virtual ~RepositoryCenter();
-
- // INHERITED
- // Interface Repository:
- virtual const cpp::Gate & Gate_Cpp() const;
- virtual const idl::Gate & Gate_Idl() const;
- virtual const String & Title() const;
- virtual cpp::Gate & Gate_Cpp();
- virtual idl::Gate & Gate_Idl();
- virtual void Set_Title(const String & i_sName );
-
- private:
- // DATA
- String sDisplayedName; /// Name to be displayed for human users.
- csv::ploc::Directory
- aLocation;
- Dyn<cpp::InternalGate>
- pCppPartition;
- Dyn<idl::InternalGate>
- pIdlPartition;
-};
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/sci_impl.hxx b/autodoc/source/ary/inc/sci_impl.hxx
deleted file mode 100644
index 92aa1512..00000000
--- a/autodoc/source/ary/inc/sci_impl.hxx
+++ /dev/null
@@ -1,416 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_SCI_IMPL_HXX
-#define ARY_SCI_IMPL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/stdconstiter.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-
-
-//************************* SCI_Vector **********************************//
-
-template <class ELEM>
-class SCI_Vector : public StdConstIterator<ELEM>
-{
- public:
- typedef std::vector<ELEM> source;
- typedef typename source::const_iterator source_iterator;
-
- SCI_Vector(
- const source & i_rSource );
- virtual ~SCI_Vector();
-
- private:
- // Interface StdConstIterator<>:
- virtual void do_Advance();
- virtual const ELEM *
- inq_CurElement() const;
- virtual bool inq_IsSorted() const;
-
- // DATA
- source_iterator itRun;
- source_iterator itEnd;
-};
-
-
-
-//************************* SCI_Map **********************************//
-
-template <class KEY, class VALUE>
-class SCI_Map : public StdConstIterator< typename std::map<KEY,VALUE>::value_type >
-{
- public:
- typedef std::map<KEY,VALUE> source;
- typedef typename source::const_iterator source_iterator;
-
- SCI_Map(
- const source & i_rSource );
- virtual ~SCI_Map();
-
- private:
- // Interface StdConstIterator<>:
- virtual void do_Advance();
- virtual const typename std::map<KEY,VALUE>::value_type *
- inq_CurElement() const;
- virtual bool inq_IsSorted() const;
-
- // DATA
- source_iterator itRun;
- source_iterator itEnd;
-};
-
-
-//************************* SCI_MultiMap **********************************//
-
-template <class KEY, class VALUE>
-class SCI_MultiMap : public StdConstIterator< typename std::multimap<KEY,VALUE>::value_type >
-{
- public:
- typedef std::multimap<KEY,VALUE> source;
- typedef typename source::const_iterator source_iterator;
-
- SCI_MultiMap(
- const source & i_rSource );
- SCI_MultiMap(
- source_iterator i_begin,
- source_iterator i_end );
- virtual ~SCI_MultiMap();
-
- private:
- // Interface StdConstIterator<>:
- virtual void do_Advance();
- virtual const typename std::multimap<KEY,VALUE>::value_type *
- inq_CurElement() const;
- virtual bool inq_IsSorted() const;
-
- // DATA
- source_iterator itRun;
- source_iterator itEnd;
-};
-
-
-
-//************************* SCI_Set **********************************//
-
-
-template <class TYPES>
-class SCI_Set : public StdConstIterator<typename TYPES::element_type>
-{
- public:
- typedef typename TYPES::element_type element;
- typedef typename TYPES::sort_type sorter;
- typedef std::set<element, sorter> source;
- typedef typename source::const_iterator source_iterator;
-
- SCI_Set(
- const source & i_rSource );
- virtual ~SCI_Set();
-
- private:
- // Interface StdConstIterator<>:
- virtual void do_Advance();
- virtual const element *
- inq_CurElement() const;
- virtual bool inq_IsSorted() const;
-
- // DATA
- source_iterator itRun;
- source_iterator itEnd;
-};
-
-//************************* SCI_DataInMap **********************************//
-
-template <class KEY, class VALUE>
-class SCI_DataInMap : public StdConstIterator<VALUE>
-{
- public:
- typedef std::map<KEY,VALUE> source;
- typedef typename source::const_iterator source_iterator;
-
- SCI_DataInMap(
- const source & i_rSource );
- virtual ~SCI_DataInMap();
-
- private:
- // Interface StdConstIterator<>:
- virtual void do_Advance();
- virtual const VALUE *
- inq_CurElement() const;
- virtual bool inq_IsSorted() const;
-
- // DATA
- source_iterator itRun;
- source_iterator itEnd;
-};
-
-
-
-
-
-//********************************************************************//
-
-
-// IMPLEMENTATION
-
-template <class ELEM>
-SCI_Vector<ELEM>::SCI_Vector( const source & i_rSource )
- : itRun(i_rSource.begin()),
- itEnd(i_rSource.end())
-{
-}
-
-template <class ELEM>
-SCI_Vector<ELEM>::~SCI_Vector()
-{
-}
-
-
-template <class ELEM>
-void
-SCI_Vector<ELEM>::do_Advance()
-{
- if (itRun != itEnd)
- ++itRun;
-}
-
-template <class ELEM>
-const ELEM *
-SCI_Vector<ELEM>::inq_CurElement() const
-{
- if (itRun != itEnd)
- return &(*itRun);
- return 0;
-}
-
-template <class ELEM>
-bool
-SCI_Vector<ELEM>::inq_IsSorted() const
-{
- return false;
-}
-
-
-
-
-template <class KEY, class VALUE>
-SCI_Map<KEY,VALUE>::SCI_Map( const source & i_rSource )
- : itRun(i_rSource.begin()),
- itEnd(i_rSource.end())
-{
-}
-
-template <class KEY, class VALUE>
-SCI_Map<KEY,VALUE>::~SCI_Map()
-{
-}
-
-template <class KEY, class VALUE>
-void
-SCI_Map<KEY,VALUE>::do_Advance()
-{
- if (itRun != itEnd)
- ++itRun;
-}
-
-template <class KEY, class VALUE>
-const typename std::map<KEY,VALUE>::value_type *
-SCI_Map<KEY,VALUE>::inq_CurElement() const
-{
- if (itRun != itEnd)
- return &(*itRun);
- return 0;
-}
-
-
-template <class KEY, class VALUE>
-bool
-SCI_Map<KEY,VALUE>::inq_IsSorted() const
-{
- return true;
-}
-
-
-
-
-
-
-
-template <class KEY, class VALUE>
-SCI_MultiMap<KEY,VALUE>::SCI_MultiMap( const source & i_rSource )
- : itRun(i_rSource.begin()),
- itEnd(i_rSource.end())
-{
-}
-
-template <class KEY, class VALUE>
-SCI_MultiMap<KEY,VALUE>::SCI_MultiMap( source_iterator i_begin,
- source_iterator i_end )
- : itRun(i_begin),
- itEnd(i_end)
-{
-}
-
-template <class KEY, class VALUE>
-SCI_MultiMap<KEY,VALUE>::~SCI_MultiMap()
-{
-}
-
-template <class KEY, class VALUE>
-void
-SCI_MultiMap<KEY,VALUE>::do_Advance()
-{
- if (itRun != itEnd)
- ++itRun;
-}
-
-template <class KEY, class VALUE>
-const typename std::multimap<KEY,VALUE>::value_type *
-SCI_MultiMap<KEY,VALUE>::inq_CurElement() const
-{
- if (itRun != itEnd)
- return &(*itRun);
- return 0;
-}
-
-
-template <class KEY, class VALUE>
-bool
-SCI_MultiMap<KEY,VALUE>::inq_IsSorted() const
-{
- return true;
-}
-
-
-
-
-
-
-
-
-template <class ELEM>
-SCI_Set<ELEM>::SCI_Set( const source & i_rSource )
- : itRun(i_rSource.begin()),
- itEnd(i_rSource.end())
-{
-}
-
-template <class ELEM>
-SCI_Set<ELEM>::~SCI_Set()
-{
-}
-
-
-template <class ELEM>
-void
-SCI_Set<ELEM>::do_Advance()
-{
- if (itRun != itEnd)
- ++itRun;
-}
-
-template <class ELEM>
-const typename SCI_Set<ELEM>::element *
-SCI_Set<ELEM>::inq_CurElement() const
-{
- if (itRun != itEnd)
- return &(*itRun);
- return 0;
-}
-
-template <class ELEM>
-bool
-SCI_Set<ELEM>::inq_IsSorted() const
-{
- return true;
-}
-
-
-
-
-
-
-
-template <class KEY, class VALUE>
-SCI_DataInMap<KEY,VALUE>::SCI_DataInMap( const source & i_rSource )
- : itRun(i_rSource.begin()),
- itEnd(i_rSource.end())
-{
-}
-
-template <class KEY, class VALUE>
-SCI_DataInMap<KEY,VALUE>::~SCI_DataInMap()
-{
-}
-
-template <class KEY, class VALUE>
-void
-SCI_DataInMap<KEY,VALUE>::do_Advance()
-{
- if (itRun != itEnd)
- ++itRun;
-}
-
-template <class KEY, class VALUE>
-const VALUE *
-SCI_DataInMap<KEY,VALUE>::inq_CurElement() const
-{
- if (itRun != itEnd)
- return &(*itRun).second;
- return 0;
-}
-
-
-template <class KEY, class VALUE>
-bool
-SCI_DataInMap<KEY,VALUE>::inq_IsSorted() const
-{
- return true;
-}
-
-
-
-
-
-
-
-} // namespace ary
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/slots.hxx b/autodoc/source/ary/inc/slots.hxx
deleted file mode 100644
index 94958ce4..00000000
--- a/autodoc/source/ary/inc/slots.hxx
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_SLOTS_HXX
-#define ARY_SLOTS_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/ceslot.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/ary_disp.hxx>
-#include <ary/types.hxx>
-#include <ary/sequentialids.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-
-
-
-namespace ary
-{
-
-
-class Slot_Null : public Slot
-{
- public:
- virtual ~Slot_Null();
-
- virtual void StoreAt(
- Display & o_rDestination ) const;
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- Display & o_rDestination ) const;
-};
-
-class Slot_MapLocalCe : public Slot
-{
- public:
- Slot_MapLocalCe(
- const cpp::Map_LocalCe & i_rData );
- virtual ~Slot_MapLocalCe();
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- Display & o_rDestination ) const;
- // DATA
- const cpp::Map_LocalCe *
- pData;
-};
-
-class Slot_MapOperations : public Slot
-{
- public:
- Slot_MapOperations(
- const std::multimap<String, cpp::Ce_id> &
- i_rData );
- virtual ~Slot_MapOperations();
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- Display & o_rDestination ) const;
- // DATA
- const std::multimap<String, cpp::Ce_id> *
- pData;
-};
-
-class Slot_ListLocalCe : public Slot
-{
- public:
- Slot_ListLocalCe(
- const cpp::List_LocalCe &
- i_rData );
- virtual ~Slot_ListLocalCe();
-
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- Display & o_rDestination ) const;
- // DATA
- const cpp::List_LocalCe *
- pData;
-};
-
-template <class ID>
-class Slot_SequentialIds : public Slot
-{
- public:
- Slot_SequentialIds(
- const SequentialIds<ID> &
- i_rData )
- : pData(&i_rData) {}
- virtual ~Slot_SequentialIds();
-
- virtual uintt Size() const;
-
- private:
- virtual void StoreEntries(
- Display & o_rDestination ) const;
- // DATA
- const SequentialIds<ID> *
- pData;
-};
-
-
-template <class ID>
-Slot_SequentialIds<ID>::~Slot_SequentialIds()
-{
-}
-
-template <class ID>
-uintt
-Slot_SequentialIds<ID>::Size() const
-{
- return pData->Size();
-}
-
-template <class ID>
-void
-Slot_SequentialIds<ID>::StoreEntries( Display & o_rDestination ) const
-{
- for ( typename SequentialIds<ID>::const_iterator it = pData->Begin();
- it != pData->End();
- ++it )
- {
- o_rDestination.DisplaySlot_Rid( (*it).Value() );
- }
-}
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/sorted_idset.hxx b/autodoc/source/ary/inc/sorted_idset.hxx
deleted file mode 100644
index 6373b157..00000000
--- a/autodoc/source/ary/inc/sorted_idset.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_SORTED_IDSET_HXX
-#define ARY_SORTED_IDSET_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <set>
- // PARAMETERS
-#include "csi_impl.hxx"
-
-
-template <class XY> class SortedIdSet;
-
-class Interface_2s
-{
- public:
- /// Checks for double occurrences
- void Add_ExportingService(
- Ce_id i_nId );
- void Get_ExportingServices(
- Dyn_StdConstIterator<Ce_id> &
- o_rResult ) const;
- private:
- Dyn<SortedIdSet> pExportingServices;
-};
-
-
-
-namespace ary
-{
-
-template <class TYPES>
-class SortedIdSet
-{
- public:
- typedef typename TYPES::element_type element;
- typedef typename TYPES::sort_type sorter;
- typedef typename TYPES::find_type finder;
-
- SortedIdSet(
- const finder & i_rFinder )
- : aSorter(i_rFinder),
- aData(aSorter) {}
- ~SortedIdSet() {}
-
- void Get_Begin(
- Dyn_StdConstIterator<element> &
- o_rResult )
- { o_rResult = new SCI_Set<FINDER>(aData); }
- void Add(
- const element & i_rElement )
- { aData.insert(i_rElement); }
-
- private:
- typedef std::set<element, sorter> Set;
-
- // DATA
- sorter aSorter;
- Set aData;
-};
-
-
-} // namespace ary
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/sortedids.hxx b/autodoc/source/ary/inc/sortedids.hxx
deleted file mode 100644
index a830937a..00000000
--- a/autodoc/source/ary/inc/sortedids.hxx
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_SORTEDIDS_HXX
-#define ARY_SORTEDIDS_HXX
-
-
-// USED SERVICES
-#include <algorithm>
-#include <cosv/tpl/range.hxx>
-
-
-
-
-namespace ary
-{
-
-
-/** Implementation of a set of children to an entity in the Autodoc
- repository. The children are sorted.
-
- @tpl COMPARE
- Needs to provide types:
- entity_base_type
- id_type
- key_type
-
- and functions:
- static entity_base_type &
- EntityOf_(
- id_type i_id );
- static const key_type &
- KeyOf_(
- const entity_type & i_entity );
- static bool Lesser_(
- const key_type & i_1,
- const key_type & i_2 );
-*/
-template<class COMPARE>
-class SortedIds
-{
- public:
- typedef typename COMPARE::id_type element_t;
- typedef typename COMPARE::key_type key_t;
- typedef std::vector<element_t> data_t;
- typedef typename data_t::const_iterator const_iterator;
- typedef typename data_t::iterator iterator;
- typedef csv::range<const_iterator> search_result_t;
-
- // LIFECYCLE
- explicit SortedIds(
- std::size_t i_reserve = 0 );
- ~SortedIds();
-
- // OPERATIONS
- void Add(
- element_t i_elem );
- // INQUIRY
- const_iterator Begin() const;
- const_iterator End() const;
-
- element_t Search(
- const key_t & i_key ) const;
- search_result_t SearchAll(
- const key_t & i_key ) const;
- const_iterator LowerBound(
- const key_t & i_key ) const;
-
- private:
- typedef typename COMPARE::entity_base_type entity_t;
-
- // Locals
- iterator LowerBound(
- const key_t & i_key );
-
- static const key_t &
- KeyOf_(
- element_t i_child );
- template <class ITER>
- static ITER impl_LowerBound_(
- ITER i_begin,
- ITER i_end,
- const key_t & i_key );
-
- // DATA
- data_t aData;
-};
-
-
-
-
-// IMPLEMENTATION
-template<class COMPARE>
-inline const typename SortedIds<COMPARE>::key_t &
-SortedIds<COMPARE>::KeyOf_(element_t i_child)
-{
- return COMPARE::KeyOf_(COMPARE::EntityOf_(i_child));
-}
-
-template<class COMPARE>
-SortedIds<COMPARE>::SortedIds(std::size_t i_reserve)
- : aData()
-{
- if (i_reserve > 0)
- aData.reserve(i_reserve);
-}
-
-template<class COMPARE>
-SortedIds<COMPARE>::~SortedIds()
-{
-}
-
-template<class COMPARE>
-void
-SortedIds<COMPARE>::Add(element_t i_elem)
-{
- aData.insert( LowerBound( KeyOf_(i_elem) ),
- i_elem );
-}
-
-template<class COMPARE>
-inline typename SortedIds<COMPARE>::const_iterator
-SortedIds<COMPARE>::Begin() const
-{
- return aData.begin();
-}
-
-template<class COMPARE>
-inline typename SortedIds<COMPARE>::const_iterator
-SortedIds<COMPARE>::End() const
-{
- return aData.end();
-}
-
-template<class COMPARE>
-typename SortedIds<COMPARE>::element_t
-SortedIds<COMPARE>::Search(const key_t & i_key) const
-{
- const_iterator
- ret = LowerBound(i_key);
- return ret != aData.end() AND NOT COMPARE::Lesser_(i_key, KeyOf_(*ret))
- ? *ret
- : element_t(0);
-}
-
-template<class COMPARE>
-typename SortedIds<COMPARE>::search_result_t
-SortedIds<COMPARE>::SearchAll(const key_t & i_key) const
-{
- const_iterator
- r1 = LowerBound(i_key);
- const_iterator
- r2 = r1;
- while ( r2 != aData.end()
- AND NOT COMPARE::Lesser_(i_key, KeyOf_(*r2)) )
- {
- ++r2;
- }
-
- return csv::make_range(r1,r2);
-}
-
-template<class COMPARE>
-inline typename SortedIds<COMPARE>::const_iterator
-SortedIds<COMPARE>::LowerBound(const key_t & i_key) const
-{
- return impl_LowerBound_( aData.begin(),
- aData.end(),
- i_key );
-}
-
-template<class COMPARE>
-inline typename SortedIds<COMPARE>::iterator
-SortedIds<COMPARE>::LowerBound(const key_t & i_key)
-{
- return impl_LowerBound_( aData.begin(),
- aData.end(),
- i_key );
-}
-
-template<class COMPARE>
-template <class ITER>
-ITER
-SortedIds<COMPARE>::impl_LowerBound_( ITER i_begin,
- ITER i_end,
- const key_t & i_key )
-{
- ITER i1 = i_begin;
- ITER i2 = i_end;
-
- for ( ITER it = i1 + (i2-i1)/2;
- i1 != i2;
- it = i1 + (i2-i1)/2 )
- {
- if ( COMPARE::Lesser_(KeyOf_(*it), i_key) )
- {
- i1 = it;
- ++i1;
- }
- else
- {
- i2 = it;
- }
- } // end for
-
- return i1;
-}
-
-
-
-
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/store/s_base.hxx b/autodoc/source/ary/inc/store/s_base.hxx
deleted file mode 100644
index 671b2b6f..00000000
--- a/autodoc/source/ary/inc/store/s_base.hxx
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_STORE_S_BASE_HXX
-#define ARY_STORE_S_BASE_HXX
-
-// USED SERVICES
-#include <deque>
-#include <cosv/tpl/tpltools.hxx>
-
-
-
-
-namespace ary
-{
-namespace stg
-{
-
-
-/** The basic storage container of the repository.
-
- @collab Storage
- Implements Storage. Not used elsewhere.
-
- @tpl ENTITY
- The type of *it, where it is of type c_iter, has to be ENTITY * const.
-*/
-template <class ENTITY>
-class Base
-{
- public:
- // LIFECYCLE
- typedef std::deque< ENTITY* > impl_type;
- typedef typename impl_type::const_iterator c_iter;
-
-
- /** @param i_nrOfReservedItems
- The number of actual items to reserve, including the item
- at index [0] that is always empty and unused.
- */
- Base(
- uintt i_nrOfReservedItems );
- ~Base();
-
- // OPERATORS
- ENTITY * operator[](
- uintt i_index ) const;
- // OPERATIONS
- uintt Add_Entity( /// @return the index of the new element.
- DYN ENTITY & pass_newEntity );
- DYN ENTITY * Set_Entity( /// @return the previous value.
- uintt i_index,
- DYN ENTITY & pass_newEntity );
- // INQUIRY
- uintt Size() const; /// Incl. reserved size.
- uintt ReservedSize() const; /// Incl. zero for element at [0].
-
- c_iter Begin() const; /// @return location of index 1, because 0 is always empty.
- c_iter BeginUnreserved() const;
- c_iter End() const;
-
- private:
- // DATA
- impl_type aData;
- uintt nReservedSize;
-};
-
-
-
-// IMPLEMENTATION
-
-template <class ENTITY>
-Base<ENTITY>::Base(uintt i_nrOfReservedItems)
- : aData(i_nrOfReservedItems, 0),
- nReservedSize(i_nrOfReservedItems)
-{
-}
-
-template <class ENTITY>
-Base<ENTITY>::~Base()
-{
- csv::erase_container_of_heap_ptrs(aData);
-}
-
-
-template <class ENTITY>
-ENTITY *
-Base<ENTITY>::operator[](uintt i_index) const
-{
- if (i_index < aData.size())
- return aData[i_index];
- return 0;
-}
-
-template <class ENTITY>
-uintt
-Base<ENTITY>::Add_Entity(DYN ENTITY & pass_newEntity)
-{
- aData.push_back(&pass_newEntity);
- return aData.size() - 1;
-}
-
-template <class ENTITY>
-DYN ENTITY *
-Base<ENTITY>::Set_Entity( uintt i_index,
- DYN ENTITY & pass_newEntity )
-{
- csv_assert(i_index != 0 AND i_index < aData.size());
-
- Dyn<ENTITY>
- ret(aData[i_index]);
- aData[i_index] = &pass_newEntity;
- return ret.Release();
-}
-
-template <class ENTITY>
-uintt
-Base<ENTITY>::Size() const
-{
- return aData.size();
-}
-
-template <class ENTITY>
-uintt
-Base<ENTITY>::ReservedSize() const
-{
- return nReservedSize;
-}
-
-template <class ENTITY>
-typename Base<ENTITY>::c_iter
-Base<ENTITY>::Begin() const
-{
- return aData.begin() + 1;
-}
-
-template <class ENTITY>
-typename Base<ENTITY>::c_iter
-Base<ENTITY>::BeginUnreserved() const
-{
- return aData.begin() + nReservedSize;
-}
-
-template <class ENTITY>
-typename Base<ENTITY>::c_iter
-Base<ENTITY>::End() const
-{
- return aData.end();
-}
-
-
-
-
-} // namespace stg
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/store/s_iterator.hxx b/autodoc/source/ary/inc/store/s_iterator.hxx
deleted file mode 100644
index 717c0951..00000000
--- a/autodoc/source/ary/inc/store/s_iterator.hxx
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_STORE_S_ITERATOR_HXX
-#define ARY_STORE_S_ITERATOR_HXX
-
-// USED SERVICES
-#include <ary/getncast.hxx>
-#include "s_base.hxx"
-
-
-
-
-namespace ary
-{
-namespace stg
-{
-
-
-template <class> class const_iterator;
-template <class, class> class const_filter_iterator;
-
-
-/** A non-const iterator that runs on a ->Storage<>.
-
- @collab Storage<>
-*/
-template <class ENTITY>
-class iterator : public std::iterator<std::forward_iterator_tag, ENTITY>
-{
- public:
- typedef iterator<ENTITY> self;
- typedef typename Base<ENTITY>::impl_type impl_container;
- typedef typename impl_container::const_iterator impl_type;
-
- // OPERATORS
- iterator()
- : itImpl() {}
- explicit iterator(
- impl_type i_impl)
- : itImpl(i_impl) {}
- ~iterator() {}
-
- bool operator==(
- self i_other ) const
- { return itImpl == i_other.itImpl; }
- bool operator!=(
- self i_other ) const
- { return itImpl != i_other.itImpl; }
- ENTITY & operator*() const { csv_assert(*itImpl != 0);
- return *(*itImpl); }
- self & operator++() { ++itImpl; return *this; }
- self operator++(int) { return self(itImpl++); }
-
- private:
- friend class const_iterator<ENTITY>; // For const_iterator(iterator);
- impl_type ImplIterator() const { return itImpl; }
-
- // DATA
- impl_type itImpl;
-};
-
-
-/** A const iterator that runs on a ->Storage<>.
-
- @collab Storage<>
-*/
-template <class ENTITY>
-class const_iterator :
- public std::iterator<std::forward_iterator_tag, const ENTITY>
-{
- public:
- typedef const_iterator<ENTITY> self;
- typedef typename Base<ENTITY>::impl_type impl_container;
- typedef typename impl_container::const_iterator impl_type;
-
- // OPERATORS
- const_iterator()
- : itImpl() {}
- explicit const_iterator(
- impl_type i_impl)
- : itImpl(i_impl) {}
- const_iterator( // implicit conversions allowed
- ::ary::stg::iterator<ENTITY> i_it )
- : itImpl(i_it.ImplIterator()) {}
- ~const_iterator() {}
-
- bool operator==(
- self i_other ) const
- { return itImpl == i_other.itImpl; }
- bool operator!=(
- self i_other ) const
- { return itImpl != i_other.itImpl; }
- const ENTITY & operator*() const { csv_assert(*itImpl != 0);
- return *(*itImpl); }
- self & operator++() { ++itImpl; return *this; }
- self operator++(int) { return self(itImpl++); }
-
- private:
- // DATA
- impl_type itImpl;
-};
-
-
-
-
-
-/** A non const iterator that runs on a ->Storage<> and returns only
- the elements of a specific type.
-
- @tpl ENTITY
- The element type of the ->Storage<>
-
- @tpl FILTER
- The actual type of the returned items. FILTER needs to be derived from
- ENTITY.
-
- @collab Storage<>
-*/
-template <class ENTITY, class FILTER>
-class filter_iterator :
- public std::iterator<std::forward_iterator_tag, FILTER>
-{
- public:
- typedef filter_iterator<ENTITY,FILTER> self;
- typedef ::ary::stg::iterator<ENTITY> impl_type;
-
- // OPERATORS
- filter_iterator()
- : itCur() {}
- explicit filter_iterator(
- impl_type i_cur )
- : itCur(i_cur) {}
- ~filter_iterator() {}
-
- bool operator==(
- self i_other ) const
- { return itCur == i_other.itCur; }
- bool operator!=(
- self i_other ) const
- { return itCur != i_other.itCur; }
- FILTER & operator*() const { csv_assert(IsValid());
- return static_cast< FILTER& >(*itCur); }
- self & operator++() { ++itCur;
- return *this; }
- self operator++(int) { return self(itCur++); }
- bool IsValid() const { return ary::is_type<FILTER>(*itCur); }
-
- private:
- friend class const_filter_iterator<ENTITY,FILTER>; // For const_filter_iterator(filter_iterator);
- impl_type ImplCur() const { return itCur; }
-
- // DATA
- impl_type itCur;
-};
-
-
-/** A const iterator that runs on a ->Storage<> and returns only
- the elements of a specific type.
-
- @tpl ENTITY
- The element type of the ->Storage<>
-
- @tpl FILTER
- The actual type of the returned items. FILTER needs to be derived from
- ENTITY.
-
- @collab Storage<>
-*/
-template <class ENTITY, class FILTER>
-class const_filter_iterator :
- public std::iterator<std::forward_iterator_tag, const FILTER>
-{
- public:
- typedef const_filter_iterator<ENTITY,FILTER> self;
- typedef ::ary::stg::const_iterator<ENTITY> impl_type;
-
- // OPERATORS
- const_filter_iterator()
- : itCur() {}
- explicit const_filter_iterator(
- impl_type i_cur )
- : itCur(i_cur) {}
- explicit const_filter_iterator( // implicit conversions allowed
- filter_iterator<ENTITY,FILTER>
- i_it )
- : itCur(i_it.ImplCur()) {}
- ~const_filter_iterator()
- {}
- bool operator==(
- self i_other ) const
- { return itCur == i_other.itCur; }
- bool operator!=(
- self i_other ) const
- { return itCur != i_other.itCur; }
- const FILTER & operator*() const { csv_assert(IsValid());
- return static_cast< const FILTER& >(*itCur); }
- self & operator++() { ++itCur;
- return *this; }
- self operator++(int) { return self(itCur++); }
- bool IsValid() const { return ary::is_type<FILTER>(*itCur); }
-
- private:
- // DATA
- impl_type itCur;
-};
-
-
-
-
-} // namespace stg
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/store/s_storage.hxx b/autodoc/source/ary/inc/store/s_storage.hxx
deleted file mode 100644
index 6085089d..00000000
--- a/autodoc/source/ary/inc/store/s_storage.hxx
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_STORE_S_STORAGE_HXX
-#define ARY_STORE_S_STORAGE_HXX
-
-// USED SERVICES
-#include <ary/types.hxx>
-#include "s_iterator.hxx"
-
-
-
-
-namespace ary
-{
-namespace stg
-{
-
-
-/** The storage unit of one class of commomly stored repository
- entities.
-*/
-template <class ENTITY>
-class Storage
-{
- public:
- typedef Base<ENTITY> container_type;
- typedef ary::TypedId<ENTITY> key_type;
- typedef stg::const_iterator<ENTITY> c_iter;
- typedef stg::iterator<ENTITY> iter;
-
- // LIFECYCLE
- virtual ~Storage() {}
-
- // OPERATORS
- const ENTITY & operator[](
- key_type i_id ) const;
- ENTITY & operator[](
- key_type i_id );
- const ENTITY & operator[](
- Rid i_index ) const;
- ENTITY & operator[](
- Rid i_index );
- // OPERATIONS
- /// Sets the id of the new entity.
- key_type Store_Entity(
- DYN ENTITY & pass_newEntity );
- /// Sets the id of the new entity.
- void Set_Reserved(
- uintt i_index,
- DYN ENTITY & pass_newEntity );
- /// Sets the id of the new entity.
- void Replace_Entity(
- key_type i_index,
- DYN ENTITY & pass_newEntity );
- // INQUIRY
- bool Exists(
- key_type i_id ) const;
- bool Exists(
- Rid i_index ) const;
-
- c_iter Begin() const;
- c_iter BeginUnreserved() const;
- c_iter End() const;
-
- // ACCESS
- iter Begin();
- iter BeginUnreserved();
- iter End();
-
- protected:
- Storage(
- uintt i_nrOfReservedItems );
- private:
- // DATA
- container_type aData;
-};
-
-
-
-
-
-
-// IMPLEMENTATION
-
-// Used later, so implemented first.
-template <class ENTITY>
-inline bool
-Storage<ENTITY>::Exists(Rid i_index) const
-{
- return 0 < i_index AND i_index < aData.Size();
-}
-
-template <class ENTITY>
-inline bool
-Storage<ENTITY>::Exists(key_type i_id) const
-{
- return Exists(i_id.Value());
-}
-
-template <class ENTITY>
-inline const ENTITY &
-Storage<ENTITY>::operator[](Rid i_index) const
-{
- csv_assert(Exists(i_index));
- return * aData[i_index];
-}
-
-template <class ENTITY>
-inline ENTITY &
-Storage<ENTITY>::operator[](Rid i_index)
-{
- csv_assert(Exists(i_index));
- return * aData[i_index];
-}
-
-template <class ENTITY>
-inline const ENTITY &
-Storage<ENTITY>::operator[](key_type i_id) const
-{
- return operator[](i_id.Value());
-}
-
-template <class ENTITY>
-inline ENTITY &
-Storage<ENTITY>::operator[](key_type i_id)
-{
- return operator[](i_id.Value());
-}
-
-template <class ENTITY>
-typename Storage<ENTITY>::key_type
-Storage<ENTITY>::Store_Entity(DYN ENTITY & pass_newEntity)
-{
- csv_assert( aData.Size() >= aData.ReservedSize() );
- Rid
- ret( aData.Add_Entity(pass_newEntity) );
- pass_newEntity.Set_Id(ret);
- return key_type(ret);
-}
-
-template <class ENTITY>
-void
-Storage<ENTITY>::Set_Reserved(uintt i_index,
- DYN ENTITY & pass_newEntity)
-{
- // 0 must not be used.
- csv_assert( i_index != 0 );
- // Make sure, i_index actually is the id of a reserved item.
- csv_assert( i_index < aData.ReservedSize() );
-
- // If there was a previous entity, it will be deleted by
- // the destructor of pOldEntity.
- Dyn<ENTITY>
- pOldEntity(aData.Set_Entity(i_index, pass_newEntity));
- pass_newEntity.Set_Id(i_index);
-}
-
-template <class ENTITY>
-void
-Storage<ENTITY>::Replace_Entity( key_type i_index,
- DYN ENTITY & pass_newEntity )
-{
- uintt
- nIndex = i_index.Value();
- // Make sure, i_index actually is the id of an existing,
- // non reserved entity.
- csv_assert( csv::in_range(aData.ReservedSize(), nIndex, aData.Size()) );
-
- // If there was a previous entity, it will be deleted by
- // the destructor of pOldEntity.
- Dyn<ENTITY>
- pOldEntity(aData.Set_Entity(nIndex, pass_newEntity));
- pass_newEntity.Set_Id(nIndex);
-}
-
-template <class ENTITY>
-inline
-typename Storage<ENTITY>::c_iter
-Storage<ENTITY>::Begin() const
-{
- return c_iter(aData.Begin());
-}
-
-template <class ENTITY>
-inline
-typename Storage<ENTITY>::c_iter
-Storage<ENTITY>::BeginUnreserved() const
-{
- return c_iter(aData.BeginUnreserved());
-}
-
-template <class ENTITY>
-inline
-typename Storage<ENTITY>::c_iter
-Storage<ENTITY>::End() const
-{
- return c_iter(aData.End());
-}
-
-template <class ENTITY>
-inline
-typename Storage<ENTITY>::iter
-Storage<ENTITY>::Begin()
-{
- return iter(aData.Begin());
-}
-
-template <class ENTITY>
-inline
-typename Storage<ENTITY>::iter
-Storage<ENTITY>::BeginUnreserved()
-{
- return iter(aData.BeginUnreserved());
-}
-
-template <class ENTITY>
-inline
-typename Storage<ENTITY>::iter
-Storage<ENTITY>::End()
-{
- return iter(aData.End());
-}
-
-template <class ENTITY>
-inline
-Storage<ENTITY>::Storage(uintt i_nrOfReservedItems)
- : aData(i_nrOfReservedItems)
-{
- // Make sure Rid and uintt are the same type, because
- // the interface of this uses Rid, but the interface of
- // container_type uses uintt.
- csv_assert( sizeof(uintt) == sizeof(Rid) );
-}
-
-
-
-
-// HELPER FUNCTIONS
-
-/** @return 0, if data are not there.
-*/
-template <class ENTITY>
-inline const ENTITY *
-Search( const Storage<ENTITY> & i_storage,
- Rid i_id )
-{
- if (NOT i_storage.Exists(i_id))
- return 0;
- return &i_storage[i_id];
-}
-
-/** @return 0, if data are not there.
-*/
-template <class ENTITY>
-inline ENTITY *
-SearchAccess( const Storage<ENTITY> & i_storage,
- Rid i_id )
-{
- if (NOT i_storage.Exists(i_id))
- return 0;
- return &i_storage[i_id];
-}
-
-
-
-
-} // namespace stg
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/inc/traits_impl.hxx b/autodoc/source/ary/inc/traits_impl.hxx
deleted file mode 100644
index d1a11941..00000000
--- a/autodoc/source/ary/inc/traits_impl.hxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_TRAITS_IMPL_HXX
-#define ARY_TRAITS_IMPL_HXX
-
-
-// USED SERVICES
-#include <ary/getncast.hxx>
-
-
-namespace ary
-{
-namespace traits
-{
-
-
-/** Finds the node assigned to an entity, if that entity has a specific
- actual type.
-
- @tpl NODE
- The assumed actual type of io_node.
-*/
-template<class NODE>
-const typename NODE::node_t *
- NodeOf(
- const typename NODE::traits_t::entity_base_type &
- io_node );
-
-/** Finds the node assigned to an entity, if that entity has a specific
- actual type.
-
- @tpl NODE
- The assumed actual type of io_node.
-*/
-template<class NODE>
-typename NODE::node_t *
- NodeOf(
- typename NODE::traits_t::entity_base_type &
- io_node );
-
-/** Finds a child to a node.
-*/
-template<class NODE, class KEY>
-typename NODE::traits_t::id_type
- Search_Child(
- const typename NODE::traits_t::entity_base_type &
- i_node,
- const KEY & i_localKey );
-
-
-
-
-// IMPLEMENTATION
-
-template<class NODE>
-const typename NODE::node_t *
-NodeOf(const typename NODE::traits_t::entity_base_type & io_node)
-{
- const NODE *
- pn = ary_cast<NODE>(&io_node);
- if (pn != 0)
- return & pn->AsNode();
- return 0;
-}
-
-template<class NODE>
-typename NODE::node_t *
-NodeOf(typename NODE::traits_t::entity_base_type & io_node)
-{
- NODE *
- pn = ary_cast<NODE>(&io_node);
- if (pn != 0)
- return & pn->AsNode();
- return 0;
-}
-
-template<class NODE, class KEY>
-typename NODE::traits_t::id_type
-Search_Child( const typename NODE::traits_t::entity_base_type & i_node,
- const KEY & i_localKey )
-{
- const NODE *
- pn = ary_cast<NODE>(&i_node);
- if (pn != 0)
- return pn->Search_Child(i_localKey);
- return typename NODE::traits_t::id_type(0);
-}
-
-
-
-
-} // namespace traits
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/info/all_dts.cxx b/autodoc/source/ary/info/all_dts.cxx
deleted file mode 100644
index 0022e6a4..00000000
--- a/autodoc/source/ary/info/all_dts.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/info/all_dts.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/info/infodisp.hxx>
-
-
-namespace ary
-{
-namespace info
-{
-
-
-void
-DT_Text::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_DT_Text(*this);
-}
-
-bool
-DT_Text::inq_IsWhite() const
-{
- return false;
-}
-
-void
-DT_MaybeLink::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_DT_MaybeLink(*this);
-}
-
-bool
-DT_MaybeLink::inq_IsWhite() const
-{
- return false;
-}
-
-void
-DT_Whitespace::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_DT_Whitespace(*this);
-}
-
-bool
-DT_Whitespace::inq_IsWhite() const
-{
- return true;
-}
-
-void
-DT_Eol::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_DT_Eol(*this);
-}
-
-bool
-DT_Eol::inq_IsWhite() const
-{
- return true;
-}
-
-void
-DT_Xml::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_DT_Xml(*this);
-}
-
-bool
-DT_Xml::inq_IsWhite() const
-{
- return false;
-}
-
-
-} // namespace info
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/info/all_tags.cxx b/autodoc/source/ary/info/all_tags.cxx
deleted file mode 100644
index d6b6ee00..00000000
--- a/autodoc/source/ary/info/all_tags.cxx
+++ /dev/null
@@ -1,571 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/info/all_tags.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <limits>
-#include <ary/info/infodisp.hxx>
-#include <adc_cl.hxx>
-
-
-namespace ary
-{
-namespace info
-{
-
-
-
-//***************************** StdTag ***********************//
-
-
-StdTag::StdTag( E_AtTagId i_eId )
- : eId(i_eId),
- // aText,
- pNext(0)
-{
-}
-
-bool
-StdTag::Add_SpecialMeaningToken( const char * ,
- intt )
-{
- // Does nothing
-
- // KORR_FUTURE
- // Should be a logical exception:
- // csv_assert(false);
- return false;
-}
-
-UINT8
-StdTag::NrOfSpecialMeaningTokens() const
-{
- return 0;
-}
-
-AtTag *
-StdTag::GetFollower()
-{
- if (pNext != 0)
- return pNext->GetFollower();
- pNext = new StdTag(eId);
- return pNext;
-}
-
-void
-StdTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_StdTag( *this );
-}
-
-DocuText *
-StdTag::Text()
-{
- return &aText;
-}
-
-
-
-//***************************** BaseTag ***********************//
-
-BaseTag::BaseTag()
- : // sBase
- // aText
- pNext(0)
-{
-}
-
-bool
-BaseTag::Add_SpecialMeaningToken( const char * i_sText,
- intt i_nNr )
-{
- if ( i_nNr == 1 )
- {
- sBase.AssignText(i_sText,"::");
- return true;
- }
- return false;
-}
-
-const char *
-BaseTag::Title() const
-{
- return "Base Classes";
-}
-
-UINT8
-BaseTag::NrOfSpecialMeaningTokens() const
-{
- return 1;
-}
-
-AtTag *
-BaseTag::GetFollower()
-{
- if (pNext != 0)
- return pNext->GetFollower();
- pNext = new BaseTag;
- return pNext;
-}
-
-DocuText *
-BaseTag::Text()
-{
- return &aText;
-}
-
-
-
-//***************************** ExceptionTag ***********************//
-
-ExceptionTag::ExceptionTag()
- : // sException,
- // aText
- pNext(0)
-{
-}
-
-bool
-ExceptionTag::Add_SpecialMeaningToken( const char * i_sText,
- intt i_nNr )
-{
- if ( i_nNr == 1 )
- {
- sException.AssignText(i_sText,"::");
- return true;
- }
- return false;
-}
-
-const char *
-ExceptionTag::Title() const
-{
- return "Thrown Exceptions";
-}
-
-UINT8
-ExceptionTag::NrOfSpecialMeaningTokens() const
-{
- return 1;
-}
-
-AtTag *
-ExceptionTag::GetFollower()
-{
- if (pNext != 0)
- return pNext->GetFollower();
- pNext = new ExceptionTag;
- return pNext;
-}
-
-DocuText *
-ExceptionTag::Text()
-{
- return &aText;
-}
-
-
-//***************************** ImplementsTag ***********************//
-
-ImplementsTag::ImplementsTag()
- : // sBase
- // aText
- pNext(0)
-{
-}
-
-bool
-ImplementsTag::Add_SpecialMeaningToken( const char * i_sText,
- intt i_nNr )
-{
- if ( i_nNr == 1 )
- {
- sName.AssignText(i_sText,"::");
- }
- else
- {
- GetFollower()->Add_SpecialMeaningToken(i_sText,1);
- }
- return true;
-}
-
-const char *
-ImplementsTag::Title() const
-{
- return "Implements";
-}
-
-UINT8
-ImplementsTag::NrOfSpecialMeaningTokens() const
-{
- return std::numeric_limits<UINT8>::max();
-}
-
-AtTag *
-ImplementsTag::GetFollower()
-{
- if (pNext != 0)
- return pNext->GetFollower();
- pNext = new ImplementsTag;
- return pNext;
-}
-
-DocuText *
-ImplementsTag::Text()
-{
- return 0;
-}
-
-
-//***************************** KeywordTag ***********************//
-
-
-KeywordTag::KeywordTag()
-// : sKeys
-{
-}
-
-bool
-KeywordTag::Add_SpecialMeaningToken( const char * i_sText,
- intt )
-{
- sKeys.push_back(i_sText);
- return true;
-}
-
-const char *
-KeywordTag::Title() const
-{
- return "Keywords";
-}
-
-UINT8
-KeywordTag::NrOfSpecialMeaningTokens() const
-{
- return std::numeric_limits<UINT8>::max();
-}
-
-AtTag *
-KeywordTag::GetFollower()
-{
- return this;
-}
-
-DocuText *
-KeywordTag::Text()
-{
- return 0;
-}
-
-
-
-//***************************** ParameterTag ***********************//
-
-
-ParameterTag::ParameterTag()
- : // sName
- // aText
- pNext(0)
-{
-}
-
-bool
-ParameterTag::Add_SpecialMeaningToken( const char * i_sText,
- intt i_nNr )
-{
- if ( i_nNr == 1 )
- {
- sName = i_sText;
- return true;
- }
- else if (i_nNr == 2)
- {
- uintt nLen = strlen(i_sText);
- if (*i_sText == '[' AND i_sText[nLen-1] == ']')
- {
- sValidRange = String(i_sText+1, nLen-2);
- return true;
- }
- }
- return false;
-}
-
-UINT8
-ParameterTag::NrOfSpecialMeaningTokens() const
-{
- return 2;
-}
-
-AtTag *
-ParameterTag::GetFollower()
-{
- if (pNext != 0)
- return pNext->GetFollower();
- return pNext = new ParameterTag;
-}
-
-DocuText *
-ParameterTag::Text()
-{
- return &aText;
-}
-
-void
-ParameterTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_ParameterTag( *this );
-}
-
-
-
-//***************************** SeeTag ***********************//
-
-
-
-SeeTag::SeeTag()
-// : sReferences
-{
-}
-
-bool
-SeeTag::Add_SpecialMeaningToken( const char * i_sText,
- intt )
-{
- static QualifiedName aNull_;
- sReferences.push_back(aNull_);
- sReferences.back().AssignText(i_sText,"::");
-
- return true;
-}
-
-const char *
-SeeTag::Title() const
-{
- return "See Also";
-}
-
-UINT8
-SeeTag::NrOfSpecialMeaningTokens() const
-{
- return std::numeric_limits<UINT8>::max();
-}
-
-AtTag *
-SeeTag::GetFollower()
-{
- return this;
-}
-
-void
-SeeTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_SeeTag( *this );
-}
-
-DocuText *
-SeeTag::Text()
-{
- return 0;
-}
-
-
-
-//***************************** TemplateTag ***********************//
-
-
-TemplateTag::TemplateTag()
- : // sName
- // aText
- pNext(0)
-{
-}
-
-bool
-TemplateTag::Add_SpecialMeaningToken( const char * i_sText,
- intt i_nNr )
-{
- if ( i_nNr == 1 )
- {
- sName = i_sText;
- return true;
- }
- return false;
-}
-
-const char *
-TemplateTag::Title() const
-{
- return "Template Parameters";
-}
-
-UINT8
-TemplateTag::NrOfSpecialMeaningTokens() const
-{
- return 1;
-}
-
-AtTag *
-TemplateTag::GetFollower()
-{
- if (pNext != 0)
- return pNext->GetFollower();
- return pNext = new TemplateTag;
-}
-
-void
-TemplateTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_TemplateTag( *this );
-}
-
-
-DocuText *
-TemplateTag::Text()
-{
- return &aText;
-}
-
-
-//***************************** LabelTag ***********************//
-
-
-
-LabelTag::LabelTag()
- : sLabel()
-{
-}
-
-bool
-LabelTag::Add_SpecialMeaningToken( const char * i_sText,
- intt i_nNr )
-{
- if ( i_nNr == 1 AND sLabel.length() == 0 )
- {
- sLabel = i_sText;
- return true;
- }
- // KORR_FUTURE
-// else // Throw exception because of double label.
- return false;
-}
-
-const char *
-LabelTag::Title() const
-{
- return "Label";
-}
-
-UINT8
-LabelTag::NrOfSpecialMeaningTokens() const
-{
- return 1;
-}
-
-AtTag *
-LabelTag::GetFollower()
-{
- return this;
-}
-
-DocuText *
-LabelTag::Text()
-{
- return 0;
-}
-
-
-//***************************** SinceTag ***********************//
-
-SinceTag::SinceTag()
- : sVersion()
-{
-}
-
-bool
-SinceTag::Add_SpecialMeaningToken( const char * i_sText,
- intt )
-{
- const char cCiphersend = '9' + 1;
- if ( sVersion.empty()
- AND NOT csv::in_range('0', *i_sText, cCiphersend)
- AND autodoc::CommandLine::Get_().DoesTransform_SinceTag() )
- {
- return true;
- }
-
- if (sVersion.empty())
- {
- sVersion = i_sText;
- }
- else
- {
- StreamLock sHelp(100);
- sVersion = sHelp() << sVersion << " " << i_sText << c_str;
- }
-
- return true;
-}
-
-const char *
-SinceTag::Title() const
-{
- return "Label";
-}
-
-UINT8
-SinceTag::NrOfSpecialMeaningTokens() const
-{
- return UINT8(-1);
-}
-
-AtTag *
-SinceTag::GetFollower()
-{
- return this;
-}
-
-void
-SinceTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_SinceTag( *this );
-}
-
-DocuText *
-SinceTag::Text()
-{
- return 0;
-}
-
-
-} // namespace info
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/info/ci_attag.cxx b/autodoc/source/ary/info/ci_attag.cxx
deleted file mode 100644
index 218ea5fb..00000000
--- a/autodoc/source/ary/info/ci_attag.cxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/info/ci_attag.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/info/all_dts.hxx>
-#include <ary/info/ci_text.hxx>
-
-
-namespace ary
-{
-namespace info
-{
-
-void
-AtTag::Set_HtmlUseInDocuText( bool i_bUseIt )
-{
- DocuText * pText = Text();
- if ( pText != 0 )
- pText->Set_HtmlUse(i_bUseIt);
-}
-
-void
-AtTag::Add_Token( const char * i_sText )
-{
- DocuText * pText = Text();
- if (pText != 0)
- pText->Add_Token( *new DT_Text(i_sText) );
-}
-
-void
-AtTag::Add_PotentialLink( const char * i_sText,
- bool i_bIsGlobal,
- bool i_bIsFunction )
-{
- DocuText * pText = Text();
- if (pText != 0)
- pText->Add_Token( *new DT_MaybeLink(i_sText, i_bIsGlobal, i_bIsFunction) );
-}
-
-void
-AtTag::Add_Whitespace( UINT8 i_nLength )
-{
- DocuText * pText = Text();
- if (pText != 0)
- pText->Add_Token( *new DT_Whitespace(i_nLength) );
-}
-
-void
-AtTag::Add_Eol()
-{
- DocuText * pText = Text();
- if (pText != 0)
- pText->Add_Token( *new DT_Eol );
-}
-
-void
-AtTag::do_StoreAt( DocuDisplay & ) const
-{
- // Dummy
-}
-
-} // namespace info
-} // namespace ary
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/info/ci_text.cxx b/autodoc/source/ary/info/ci_text.cxx
deleted file mode 100644
index dee50d27..00000000
--- a/autodoc/source/ary/info/ci_text.cxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/info/ci_text.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/info/all_dts.hxx>
-
-
-namespace ary
-{
-namespace info
-{
-
-DocuText::DocuText()
- : bUsesHtml(false)
-{
-}
-
-DocuText::~DocuText()
-{
- for ( TokenList::iterator iter = aTokens.begin();
- iter != aTokens.end();
- ++iter )
- {
- delete (*iter);
- }
-}
-
-void
-DocuText::StoreAt( DocuDisplay & o_rDisplay ) const
-{
- ary::info::DocuText::TokenList::const_iterator itEnd = aTokens.end();
- for ( ary::info::DocuText::TokenList::const_iterator it = aTokens.begin();
- it != itEnd;
- ++it )
- {
- (*it)->StoreAt(o_rDisplay);
- }
-}
-
-} // namespace info
-} // namespace ary
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/info/makefile.mk b/autodoc/source/ary/info/makefile.mk
deleted file mode 100644
index 0c507ba3..00000000
--- a/autodoc/source/ary/info/makefile.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary_info
-
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/all_dts.obj \
- $(OBJ)$/all_tags.obj \
- $(OBJ)$/ci_attag.obj \
- $(OBJ)$/ci_text.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/ary/kernel/ary_disp.cxx b/autodoc/source/ary/kernel/ary_disp.cxx
deleted file mode 100644
index eed6d17e..00000000
--- a/autodoc/source/ary/kernel/ary_disp.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/ary_disp.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_ce.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-
-
-
-namespace ary
-{
-
-void
-Display::DisplaySlot_Rid( ary::Rid i_nId )
-{
- const cpp::Gate *
- pGate = Get_ReFinder();
- if (pGate != 0)
- {
- const ary::cpp::CodeEntity *
- pRE = pGate->Ces().Search_Ce( cpp::Ce_id(i_nId) );
- if (pRE != 0)
- {
- pRE->Accept( *this );
- return;
- }
- }
-
- do_DisplaySlot_Rid( i_nId );
-}
-
-
-void
-Display::DisplaySlot_LocalCe( ary::cpp::Ce_id i_nId,
- const String & i_sName )
-{
- const cpp::Gate *
- pGate = Get_ReFinder();
- if (pGate != 0)
- {
- const ary::cpp::CodeEntity *
- pRE = pGate->Ces().Search_Ce(i_nId);
- if (pRE != 0)
- {
- pRE->Accept( *this );
- return;
- }
- }
-
- do_DisplaySlot_LocalCe( i_nId, i_sName );
-}
-
-
-
-// Dummy implementations for class Display
-
-void
-Display::do_StartSlot()
-{
-}
-
-void
-Display::do_FinishSlot()
-{
-}
-
-void
-Display::do_DisplaySlot_Rid( ary::Rid )
-{
-}
-
-void
-Display::do_DisplaySlot_LocalCe( ary::cpp::Ce_id ,
- const String & )
-{
-}
-
-
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/kernel/cessentl.cxx b/autodoc/source/ary/kernel/cessentl.cxx
deleted file mode 100644
index e8e29bf8..00000000
--- a/autodoc/source/ary/kernel/cessentl.cxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/cessentl.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_ce.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-
-
-namespace ary
-{
-namespace cpp
-{
-
-
-CeEssentials::CeEssentials()
- : sLocalName(),
- nOwner(0),
- nLocation(0)
-{
-}
-
-CeEssentials::CeEssentials( const String & i_sLocalName,
- Cid i_nOwner,
- loc::Le_id i_nLocation )
- : sLocalName(i_sLocalName),
- nOwner(i_nOwner),
- nLocation(i_nLocation)
-{
-}
-
-CeEssentials::~CeEssentials()
-{
-}
-
-
-
-inline bool
-IsInternal(const doc::Documentation & i_doc)
-{
- const ary::doc::OldCppDocu *
- docu = dynamic_cast< const ary::doc::OldCppDocu* >(i_doc.Data());
- if (docu != 0)
- return docu->IsInternal();
- return false;
-}
-
-
-bool
-CodeEntity::IsVisible() const
-{
- // KORR_FUTURE: Improve the whole handling of internal and visibility.
- return bIsVisible && NOT IsInternal(Docu());
-}
-
-
-
-} // namespace cpp
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/kernel/makefile.mk b/autodoc/source/ary/kernel/makefile.mk
deleted file mode 100644
index 6c90252b..00000000
--- a/autodoc/source/ary/kernel/makefile.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary_kernel
-
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/ary_disp.obj \
- $(OBJ)$/cessentl.obj \
- $(OBJ)$/namesort.obj \
- $(OBJ)$/qualiname.obj \
- $(OBJ)$/reposy.obj \
- $(OBJ)$/slots.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/ary/kernel/namesort.cxx b/autodoc/source/ary/kernel/namesort.cxx
deleted file mode 100644
index 0a64b976..00000000
--- a/autodoc/source/ary/kernel/namesort.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/namesort.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-namespace
-{
-
-
-int C_cAutodocNameOrdering1[256] =
- { 0,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 0 ..
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 32 ..
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,255,255, 255,255,255,255,
-
- 255, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, // 64 ..
- 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,255, 255,255,255, 63,
- 255, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, // 96 ..
- 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,255, 255,255,255,255,
-
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //128 ..
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //160 ..
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
-
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255
- };
-
-int C_cAutodocNameOrdering2[256] =
- { 0,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 0 ..
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, // 32 ..
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,255,255, 255,255,255,255,
-
- 255, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, // 64 ..
- 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61,255, 255,255,255, 63,
- 255, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, // 96 ..
- 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62,255, 255,255,255,255,
-
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //128 ..
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255, //160 ..
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
-
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255,
- 255,255,255,255, 255,255,255,255, 255,255,255,255, 255,255,255,255
- };
-
-
-} // namespace anonymous
-
-
-namespace ary
-{
-
-
-const csv::CharOrder_Table
-LesserName::aOrdering1_(C_cAutodocNameOrdering1);
-
-const csv::CharOrder_Table
-LesserName::aOrdering2_(C_cAutodocNameOrdering2);
-
-
-
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/kernel/qualiname.cxx b/autodoc/source/ary/kernel/qualiname.cxx
deleted file mode 100644
index 0451485c..00000000
--- a/autodoc/source/ary/kernel/qualiname.cxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/qualiname.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace ary
-{
-
-
-QualifiedName::QualifiedName( uintt i_nSize )
- : aNamespace(),
- sLocalName(),
- bIsAbsolute(false),
- bIsFunction()
-{
- if (i_nSize > 0)
- aNamespace.reserve(i_nSize);
-}
-
-QualifiedName::QualifiedName( const char * i_sText,
- const char * i_sSeparator )
- : aNamespace(),
- sLocalName(),
- bIsAbsolute(false),
- bIsFunction()
-{
- AssignText(i_sText,i_sSeparator);
-}
-
-QualifiedName::~QualifiedName()
-{
-}
-
-void
-QualifiedName::AssignText( const char * i_sText,
- const char * i_sSeparator )
-{
- csv_assert(NOT csv::no_str(i_sText) AND NOT csv::no_str(i_sSeparator));
- bIsAbsolute = false;
- bIsFunction = false;
- csv::erase_container( aNamespace );
-
- uintt nSepLen = strlen(i_sSeparator);
- const char * sNext = i_sText;
-
- const char * ps = strstr( i_sText, i_sSeparator );
- if (ps == i_sText)
- {
- bIsAbsolute = true;
- sNext = ps + nSepLen;
- }
-
- for ( ps = strstr(sNext, i_sSeparator);
- ps != 0;
- ps = strstr(sNext, i_sSeparator) )
- {
- String sPart(sNext, ps - sNext);
- aNamespace.push_back(sPart);
- sNext = ps + nSepLen;
- }
-
- uintt sNameLen = strlen(sNext);
- if ( sNameLen > 2 )
- {
- ps = sNext + sNameLen - 2;
- if (*ps == '(' AND *(ps+1) == ')')
- {
- sNameLen -= 2;
- bIsFunction = true;
- }
- }
- sLocalName = String(sNext,sNameLen);
-}
-
-
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/kernel/reposy.cxx b/autodoc/source/ary/kernel/reposy.cxx
deleted file mode 100644
index 99bfcf90..00000000
--- a/autodoc/source/ary/kernel/reposy.cxx
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <reposy.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cpp_internalgate.hxx>
-#include <idl_internalgate.hxx>
-
-
-namespace ary
-{
-
-
-//***************** Repository ************//
-
-DYN Repository &
-Repository::Create_()
-{
- return *new RepositoryCenter;
-}
-
-
-
-
-RepositoryCenter::RepositoryCenter()
- : sDisplayedName(),
- aLocation(),
- pCppPartition(0),
- pIdlPartition(0)
-{
- pCppPartition = & cpp::InternalGate::Create_Partition_(*this);
- pIdlPartition = & idl::InternalGate::Create_Partition_(*this);
-}
-
-RepositoryCenter::~RepositoryCenter()
-{
-}
-
-const ::ary::cpp::Gate &
-RepositoryCenter::Gate_Cpp() const
-{
- csv_assert(pCppPartition);
- return *pCppPartition;
-}
-
-const ::ary::idl::Gate &
-RepositoryCenter::Gate_Idl() const
-{
- csv_assert(pIdlPartition);
- return *pIdlPartition;
-}
-
-const String &
-RepositoryCenter::Title() const
-{
- return sDisplayedName;
-}
-
-
-::ary::cpp::Gate &
-RepositoryCenter::Gate_Cpp()
-{
- csv_assert(pCppPartition);
- return *pCppPartition;
-}
-
-::ary::idl::Gate &
-RepositoryCenter::Gate_Idl()
-{
- csv_assert(pIdlPartition);
- return *pIdlPartition;
-}
-
-void
-RepositoryCenter::Set_Title(const String & i_sName)
-{
- sDisplayedName = i_sName;
-}
-
-
-
-
-//********************* Repository Type Info Data ****************//
-
-// !!! IMPORTANT - NEVER DELETE OR CHANGE - ADDING ALLOWED
-
-
-
-/* ClassType-Ids
- -------------
-
- cpp 1000
- idl 2000
- corba 3000
- java 4000
- information 5000
- logic location 6000
- phys location 7000
- sec. prod. 8000
-
-
- cpp
- ---
- Namespace 1000
- Class 1001
- Enum 1002
- Typedef 1003
- Function 1004
- Variable 1005
- EnumValue 1006
- NamespaceAlias 1007
-
- BuiltInType 1200
- CeType_Final 1201
- CeType_Extern 1202
- UsedType 1203
- PtrType 1211
- RefType 1212
- ConstType 1221
- VolatileType 1222
- ArrayType 1230
- TemplateInstance 1235
- FunctionPtr 1240
- DataMemberPtr 1250
- OperationMemberPtr 1260
-
- TplParam_Type 1301
- TplParam_Value 1302
-
- OpSignature 1400
-
- Define 1601
- Macro 1602
-
- ProjectGroup 1901
- FileGroup 1902
-
- TopProject 1921
-
-
-
- idl
- ---
-
- Module 2000
- Interface 2001
- Function 2002
- Service 2003
- Property 2004
- Enum 2005
- EnumValue 2006
- Typedef 2007
- Struct 2008
- StructElement 2009
- Exception 2010
- ConstantGroup 2011
- Constant 2012
- Singleton 2013
- Attribute 2014
- SglIfcService 2015
- SglIfcSingleton 2016
-
- BuiltInType 2200
- CeType 2201
- Sequence 2202
- ExplicitType 2203
- ExplicitNameRoom 2204
- TemplateParamType 2205
-
-
- java
- ----
- Package 4000
- Interface 4001
- Class 4002
-
- physical location
- -----------------
- Root 7000
- Directory 7030
- File 7100
-
-
- info
- ----
- CodeInformation
- (IDL) 11002
-*/
-
-
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/kernel/slots.cxx b/autodoc/source/ary/kernel/slots.cxx
deleted file mode 100644
index 1e7e4b49..00000000
--- a/autodoc/source/ary/kernel/slots.cxx
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <slots.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary_disp.hxx>
-
-
-
-namespace ary
-{
-
-
-//*********************** Slot ********************//
-
-
-void
-Slot::StoreAt( Display & o_rDestination ) const
-{
- o_rDestination.StartSlot();
- StoreEntries(o_rDestination);
- o_rDestination.FinishSlot();
-}
-
-
-//*********************** Slot_Null ********************//
-
-Slot_Null::~Slot_Null()
-{
-}
-
-void
-Slot_Null::StoreAt( Display & ) const
-{
- // Does nothing
-}
-
-uintt
-Slot_Null::Size() const
-{
- return 0;
-}
-
-void
-Slot_Null::StoreEntries( Display & ) const
-{
- // Does nothing
-}
-
-//*********************** Slot_MapLocalCe ********************//
-
-Slot_MapLocalCe::Slot_MapLocalCe( const cpp::Map_LocalCe & i_rData )
- : pData(&i_rData)
-{
-}
-
-Slot_MapLocalCe::~Slot_MapLocalCe()
-{
-}
-
-uintt
-Slot_MapLocalCe::Size() const
-{
- return pData->size();;
-}
-
-void
-Slot_MapLocalCe::StoreEntries( Display & o_rDestination ) const
-{
- for ( cpp::Map_LocalCe::const_iterator it = pData->begin();
- it != pData->end();
- ++it )
- {
- o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first );
- }
-}
-
-
-
-//*********************** Slot_MapOperations ********************//
-
-Slot_MapOperations::Slot_MapOperations( const std::multimap<String, cpp::Ce_id> & i_rData )
- : pData(&i_rData)
-{
-}
-
-Slot_MapOperations::~Slot_MapOperations()
-{
-}
-
-uintt
-Slot_MapOperations::Size() const
-{
- return pData->size();;
-}
-
-void
-Slot_MapOperations::StoreEntries( Display & o_rDestination ) const
-{
- for ( std::multimap<String, cpp::Ce_id>::const_iterator it = pData->begin();
- it != pData->end();
- ++it )
- {
- o_rDestination.DisplaySlot_LocalCe( (*it).second, (*it).first );
- }
-}
-
-//*********************** Slot_ListLocalCe ********************//
-
-Slot_ListLocalCe::Slot_ListLocalCe( const cpp::List_LocalCe & i_rData )
- : pData(&i_rData)
-{
-}
-
-Slot_ListLocalCe::~Slot_ListLocalCe()
-{
-}
-
-uintt
-Slot_ListLocalCe::Size() const
-{
- return pData->size();;
-}
-
-void
-Slot_ListLocalCe::StoreEntries( Display & o_rDestination ) const
-{
- for ( cpp::List_LocalCe::const_iterator it = pData->begin();
- it != pData->end();
- ++it )
- {
- o_rDestination.DisplaySlot_LocalCe( (*it).nId, (*it).sLocalName );
- }
-}
-
-
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_dir.cxx b/autodoc/source/ary/loc/loc_dir.cxx
deleted file mode 100644
index 0a3fcf3e..00000000
--- a/autodoc/source/ary/loc/loc_dir.cxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/loc/loc_dir.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/loc/loc_file.hxx>
-#include <sortedids.hxx>
-#include "locs_le.hxx"
-
-
-namespace ary
-{
-namespace loc
-{
-
-struct Directory::Container
-{
- typedef SortedIds<Le_Compare> SortedChildList;
-
- SortedChildList aSubDirectories;
- SortedChildList aFiles;
-
- Container()
- : aSubDirectories(),
- aFiles()
- {}
-};
-
-
-
-
-Directory::Directory(Le_id i_assignedRoot)
- : sLocalName(),
- nParentDirectory(0),
- nAssignedRoot(i_assignedRoot),
- aAssignedNode(),
- pChildren(new Container)
-{
- aAssignedNode.Assign_Entity(*this);
-}
-
-Directory::Directory( const String & i_localName,
- Le_id i_parentDirectory )
- : sLocalName(i_localName),
- nParentDirectory(i_parentDirectory),
- nAssignedRoot(0),
- aAssignedNode(),
- pChildren(new Container)
-{
- aAssignedNode.Assign_Entity(*this);
-}
-
-Directory::~Directory()
-{
-}
-
-void
-Directory::Add_Dir(const Directory & i_dir)
-{
- pChildren->aSubDirectories.Add(i_dir.LeId());
-}
-
-void
-Directory::Add_File(const File & i_file)
-{
- pChildren->aFiles.Add(i_file.LeId());
-}
-
-Le_id
-Directory::Search_Dir(const String & i_name) const
-{
- return pChildren->aSubDirectories.Search(i_name);
-}
-
-Le_id
-Directory::Search_File(const String & i_name) const
-{
- return pChildren->aFiles.Search(i_name);
-}
-
-void
-Directory::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Directory::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Directory::inq_LocalName() const
-{
- return sLocalName;
-}
-
-Le_id
-Directory::inq_ParentDirectory() const
-{
- return nParentDirectory;
-}
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_file.cxx b/autodoc/source/ary/loc/loc_file.cxx
deleted file mode 100644
index dc05de03..00000000
--- a/autodoc/source/ary/loc/loc_file.cxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/loc/loc_file.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-File::File( const String & i_sLocalName,
- Le_id i_nParentDirectory )
- : FileBase(i_sLocalName, i_nParentDirectory)
-{
-}
-
-File::~File()
-{
-}
-
-void
-File::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor, *this);
-}
-
-ClassId
-File::get_AryClass() const
-{
- return class_id;
-}
-
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_filebase.cxx b/autodoc/source/ary/loc/loc_filebase.cxx
deleted file mode 100644
index 0daaee2c..00000000
--- a/autodoc/source/ary/loc/loc_filebase.cxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/loc/loc_filebase.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-FileBase::FileBase( const String & i_localName,
- Le_id i_parentDirectory )
- : sLocalName(i_localName),
- nParentDirectory(i_parentDirectory)
-{
-}
-
-const String &
-FileBase::inq_LocalName() const
-{
- return sLocalName;
-}
-
-Le_id
-FileBase::inq_ParentDirectory() const
-{
- return nParentDirectory;
-}
-
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_root.cxx b/autodoc/source/ary/loc/loc_root.cxx
deleted file mode 100644
index dca36206..00000000
--- a/autodoc/source/ary/loc/loc_root.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/loc/loc_root.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-Root::Root(const csv::ploc::Path & i_path)
- : aPath(i_path),
- sPathAsString(),
- aMyDirectory(0)
-{
- StreamLock
- path_string(700);
- path_string() << i_path;
- sPathAsString = path_string().c_str();
-}
-
-Root::~Root()
-{
-}
-
-void
-Root::do_Accept(csv::ProcessorIfc & io_processor) const
-{
- csv::CheckedCall(io_processor,*this);
-}
-
-ClassId
-Root::get_AryClass() const
-{
- return class_id;
-}
-
-const String &
-Root::inq_LocalName() const
-{
- return sPathAsString;
-}
-
-Le_id
-Root::inq_ParentDirectory() const
-{
- return Le_id::Null_();
-}
-
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loc_traits.cxx b/autodoc/source/ary/loc/loc_traits.cxx
deleted file mode 100644
index eb314d11..00000000
--- a/autodoc/source/ary/loc/loc_traits.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary/loc/loc_traits.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/namesort.hxx>
-#include <ary/getncast.hxx>
-#include "locs_le.hxx"
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-//******************** Le_Traits ************************//
-Le_Traits::entity_base_type &
-Le_Traits::EntityOf_(id_type i_id)
-{
- csv_assert(i_id.IsValid());
- return Le_Storage::Instance_()[i_id];
-}
-
-//******************** LeNode_Traits ************************//
-symtree::Node<LeNode_Traits> *
-LeNode_Traits::NodeOf_(entity_base_type & io_entity)
-{
- if (is_type<Directory>(io_entity))
- return & ary_cast<Directory>(io_entity).AsNode();
- return 0;
-}
-
-Le_Traits::entity_base_type *
-LeNode_Traits::ParentOf_(const entity_base_type & i_entity)
-{
- Le_Traits::id_type
- ret = i_entity.ParentDirectory();
- if (ret.IsValid())
- return &EntityOf_(ret);
- return 0;
-}
-
-//******************** Le_Compare ************************//
-const Le_Compare::key_type &
-Le_Compare::KeyOf_(const entity_base_type & i_entity)
-{
- return i_entity.LocalName();
-}
-
-bool
-Le_Compare::Lesser_( const key_type & i_1,
- const key_type & i_2 )
-{
- static ::ary::LesserName less_;
- return less_(i_1,i_2);
-}
-
-
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loca_le.cxx b/autodoc/source/ary/loc/loca_le.cxx
deleted file mode 100644
index e16d304a..00000000
--- a/autodoc/source/ary/loc/loca_le.cxx
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "loca_le.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/loc/loc_dir.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/loc/loc_root.hxx>
-#include <loc_internalgate.hxx>
-#include "locs_le.hxx"
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-DYN LocationPilot &
-InternalGate::Create_Locations_()
-{
- return *new LocationAdmin;
-}
-
-
-
-
-inline Le_Storage &
-LocationAdmin::Storage() const
-{
- csv_assert(pStorage);
- return *pStorage.MutablePtr();
-}
-
-
-LocationAdmin::LocationAdmin()
- : pStorage(new Le_Storage)
-{
-}
-
-LocationAdmin::~LocationAdmin()
-{
-}
-
-Root &
-LocationAdmin::CheckIn_Root(const csv::ploc::Path & i_path)
-{
- Dyn<Root>
- p_new( new Root(i_path) );
-
- Le_id
- id = Storage().RootIndex().Search(p_new->LocalName());
- if ( id.IsValid() )
- {
- return ary_cast<Root>(Storage()[id]);
- }
-
- Root *
- ret = p_new.Ptr();
- Storage().Store_Entity(*p_new.Release());
- Storage().RootIndex().Add(ret->LeId());
-
- Directory *
- p_rootdir = new Directory(ret->LeId());
- Storage().Store_Entity(*p_rootdir);
- ret->Assign_Directory(p_rootdir->LeId());
-
- return *ret;
-}
-
-File &
-LocationAdmin::CheckIn_File( const String & i_name,
- const csv::ploc::DirectoryChain & i_subPath,
- Le_id i_root )
-{
- Root &
- root = Find_Root(i_root);
- Directory &
- parent_dir = CheckIn_Directories(
- Find_Directory(root.MyDir()),
- i_subPath.Begin(),
- i_subPath.End() );
- Le_id
- fid = parent_dir.Search_File(i_name);
- if (NOT fid.IsValid())
- {
- File *
- ret = new File(i_name, parent_dir.LeId());
- Storage().Store_Entity(*ret);
- parent_dir.Add_File(*ret);
- return *ret;
- }
- else
- {
- return Find_File(fid);
- }
-}
-
-Root &
-LocationAdmin::Find_Root(Le_id i_id) const
-{
- return ary_cast<Root>(Storage()[i_id]);
-}
-
-Directory &
-LocationAdmin::Find_Directory(Le_id i_id) const
-{
- return ary_cast<Directory>(Storage()[i_id]);
-}
-
-File &
-LocationAdmin::Find_File(Le_id i_id) const
-{
- return ary_cast<File>(Storage()[i_id]);
-}
-
-Directory &
-LocationAdmin::CheckIn_Directory( Directory & io_parent,
- const String & i_name )
-{
- Le_id
- did = io_parent.Search_Dir(i_name);
- if (NOT did.IsValid())
- {
- Directory *
- ret = new Directory(i_name, io_parent.LeId());
- Storage().Store_Entity(*ret);
- io_parent.Add_Dir(*ret);
- return *ret;
- }
- else
- {
- return Find_Directory(did);
- }
-}
-
-Directory &
-LocationAdmin::CheckIn_Directories(
- Directory & io_root,
- StringVector::const_iterator i_beginSubPath,
- StringVector::const_iterator i_endSubPath )
-{
- if (i_beginSubPath == i_endSubPath)
- return io_root;
-
- Directory &
- next = CheckIn_Directory(io_root, *i_beginSubPath);
- return CheckIn_Directories(next, i_beginSubPath+1, i_endSubPath);
-}
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/loca_le.hxx b/autodoc/source/ary/loc/loca_le.hxx
deleted file mode 100644
index 112343b6..00000000
--- a/autodoc/source/ary/loc/loca_le.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_LOCA_LE_HXX
-#define ARY_LOC_LOCA_LE_HXX
-
-// BASE CLASSES
-#include <ary/loc/locp_le.hxx>
-
-namespace ary
-{
-namespace loc
-{
- class Le_Storage;
-}
-}
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** Provides access to files and directories stored in the
- repository.
-*/
-class LocationAdmin : public LocationPilot
-{
- public:
- LocationAdmin();
- virtual ~LocationAdmin();
-
- // INHERITED
- // Interface LocationPilot:
- virtual Root & CheckIn_Root(
- const csv::ploc::Path &
- i_rPath );
- virtual File & CheckIn_File(
- const String & i_name,
- const csv::ploc::DirectoryChain &
- i_subPath,
- Le_id i_root );
-
- virtual Root & Find_Root(
- Le_id i_id ) const;
- virtual Directory & Find_Directory(
- Le_id i_id ) const;
- virtual File & Find_File(
- Le_id i_id ) const;
- private:
- // Locals
- Le_Storage & Storage() const;
- Directory & CheckIn_Directory(
- Directory & io_parent,
- const String & i_name );
- Directory & CheckIn_Directories(
- Directory & io_root,
- StringVector::const_iterator
- i_beginSubPath,
- StringVector::const_iterator
- i_endSubPath );
- // DATA
- Dyn<Le_Storage> pStorage;
-};
-
-
-
-
-} // namespace loc
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/locs_le.cxx b/autodoc/source/ary/loc/locs_le.cxx
deleted file mode 100644
index 76babbf1..00000000
--- a/autodoc/source/ary/loc/locs_le.cxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "locs_le.hxx"
-
-// NOT FULLY DEFINED SERVICES
-
-
-namespace
-{
- const uintt
- C_nReservedElements = ary::loc::predefined::le_MAX; // Skipping "0"
-}
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-Le_Storage * Le_Storage::pInstance_ = 0;
-
-
-
-
-Le_Storage::Le_Storage()
- : stg::Storage<LocationEntity>(C_nReservedElements)
-{
- csv_assert(pInstance_ == 0);
- pInstance_ = this;
-}
-
-Le_Storage::~Le_Storage()
-{
- csv_assert(pInstance_ != 0);
- pInstance_ = 0;
-}
-
-
-} // namespace loc
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/locs_le.hxx b/autodoc/source/ary/loc/locs_le.hxx
deleted file mode 100644
index 88639d6c..00000000
--- a/autodoc/source/ary/loc/locs_le.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_LOC_LOCS_LE_HXX
-#define ARY_LOC_LOCS_LE_HXX
-
-// BASE CLASSES
-#include <store/s_storage.hxx>
-// USED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/loc/loc_le.hxx>
-#include <ary/loc/loc_root.hxx>
-#include <sortedids.hxx>
-
-
-
-
-namespace ary
-{
-namespace loc
-{
-
-
-/** The data base for all ->ary::cpp::CodeEntity objects.
-*/
-class Le_Storage : public ::ary::stg::Storage<LocationEntity>
-{
- public:
- typedef SortedIds<Le_Compare> Index;
-
- Le_Storage();
- virtual ~Le_Storage();
-
- const Index & RootIndex() const { return aRoots; }
- Index & RootIndex() { return aRoots; }
-
- static Le_Storage & Instance_() { csv_assert(pInstance_ != 0);
- return *pInstance_; }
- private:
- // DATA
- Index aRoots;
-
- static Le_Storage * pInstance_;
-};
-
-
-
-
-namespace predefined
-{
-
-enum E_LocationEntity
-{
- le_MAX = 1
-};
-
-} // namespace predefined
-
-
-
-
-} // namespace cpp
-} // namespace ary
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary/loc/makefile.mk b/autodoc/source/ary/loc/makefile.mk
deleted file mode 100644
index e4aa0e9b..00000000
--- a/autodoc/source/ary/loc/makefile.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary_loc
-
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/loc_dir.obj \
- $(OBJ)$/loc_file.obj \
- $(OBJ)$/loc_filebase.obj \
- $(OBJ)$/loc_root.obj \
- $(OBJ)$/loc_traits.obj \
- $(OBJ)$/loca_le.obj \
- $(OBJ)$/locs_le.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/autodoc/source/ary_i/kernel/ci_atag2.cxx b/autodoc/source/ary_i/kernel/ci_atag2.cxx
deleted file mode 100644
index 21c01f7a..00000000
--- a/autodoc/source/ary_i/kernel/ci_atag2.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary_i/ci_atag2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary_i/disdocum.hxx>
-
-
-namespace ary
-{
-namespace inf
-{
-
-void DocuTag_Display::Display_TextToken(
- const csi::dsapi::DT_TextToken & ) {}
-void DocuTag_Display::Display_White() {}
-void DocuTag_Display::Display_MupType(
- const csi::dsapi::DT_MupType & ) {}
-void DocuTag_Display::Display_MupMember(
- const csi::dsapi::DT_MupMember & ) {}
-void DocuTag_Display::Display_MupConst(
- const csi::dsapi::DT_MupConst & ) {}
-void DocuTag_Display::Display_Style(
- const csi::dsapi::DT_Style & ) {}
-void DocuTag_Display::Display_EOL() {}
-
-
-} // namespace inf
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary_i/kernel/ci_text2.cxx b/autodoc/source/ary_i/kernel/ci_text2.cxx
deleted file mode 100644
index 36458489..00000000
--- a/autodoc/source/ary_i/kernel/ci_text2.cxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary_i/ci_text2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary_i/disdocum.hxx>
-#include <ary_i/d_token.hxx>
-
-
-namespace ary
-{
-namespace inf
-{
-
-DocuTex2::DocuTex2()
-{
-}
-
-DocuTex2::~DocuTex2()
-{
- for ( TokenList::iterator iter = aTokens.begin();
- iter != aTokens.end();
- ++iter )
- {
- delete (*iter);
- }
-}
-
-void
-DocuTex2::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- for ( ary::inf::DocuTex2::TokenList::const_iterator
- iter = aTokens.begin();
- iter != aTokens.end();
- ++iter )
- {
- (*iter)->DisplayAt(o_rDisplay);
- }
-}
-
-void
-DocuTex2::AddToken( DYN DocuToken & let_drToken )
-{
- if (aTokens.empty())
- {
- if (let_drToken.IsWhiteOnly())
- return;
- }
- aTokens.push_back(&let_drToken);
-}
-
-bool
-DocuTex2::IsEmpty() const
-{
- for ( ary::inf::DocuTex2::TokenList::const_iterator
- iter = aTokens.begin();
- iter != aTokens.end();
- ++iter )
- {
- return false;
- }
- return true;
-}
-
-using csi::dsapi::DT_TextToken;
-
-const String &
-DocuTex2::TextOfFirstToken() const
-{
- if (NOT aTokens.empty())
- {
- const DT_TextToken *
- pTok = dynamic_cast< const DT_TextToken* >(*aTokens.begin());
-
- if (pTok != 0)
- return pTok->GetTextStr();
- }
- return String::Null_();
-}
-
-String &
-DocuTex2::Access_TextOfFirstToken()
-{
- if (NOT aTokens.empty())
- {
- DT_TextToken *
- pTok = dynamic_cast< DT_TextToken* >(*aTokens.begin());
-
- if (pTok != 0)
- return pTok->Access_Text();
- }
-
- static String sDummy_;
- return sDummy_;
-}
-
-
-
-void DocuText_Display::Display_StdAtTag(
- const csi::dsapi::DT_StdAtTag & ) {}
-void DocuText_Display::Display_SeeAlsoAtTag(
- const csi::dsapi::DT_SeeAlsoAtTag & ) {}
-void DocuText_Display::Display_ParameterAtTag(
- const csi::dsapi::DT_ParameterAtTag & ) {}
-void DocuText_Display::Display_SinceAtTag(
- const csi::dsapi::DT_SinceAtTag & ) {}
-
-
-
-} // namespace inf
-} // namespace ary
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary_i/kernel/d_token.cxx b/autodoc/source/ary_i/kernel/d_token.cxx
deleted file mode 100644
index c2099724..00000000
--- a/autodoc/source/ary_i/kernel/d_token.cxx
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <ary_i/d_token.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary_i/disdocum.hxx>
-
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-bool
-DT_Dsapi::IsWhiteOnly() const
-{
- return false;
-}
-
-DT_TextToken::~DT_TextToken()
-{
-}
-
-void
-DT_TextToken::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_TextToken( *this );
-}
-
-bool
-DT_TextToken::IsWhiteOnly() const
-{
- const char *it = sText.c_str();
- while (static_cast<UINT8>(*it++) > 32)
- {
- return false;
- }
- return true;
-}
-
-DT_White::~DT_White()
-{
-}
-
-void
-DT_White::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_White();
-}
-
-bool
-DT_White::IsWhiteOnly() const
-{
- return true;
-}
-
-DT_MupType::~DT_MupType()
-{
-}
-
-void
-DT_MupType::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_MupType( *this );
-}
-
-DT_MupMember::~DT_MupMember()
-{
-}
-
-void
-DT_MupMember::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_MupMember( *this );
-}
-
-DT_MupConst::~DT_MupConst()
-{
-}
-
-void
-DT_MupConst::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_MupConst( *this );
-}
-
-DT_Style::~DT_Style()
-{
-}
-
-void
-DT_Style::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_Style( *this );
-}
-
-DT_EOL::~DT_EOL()
-{
-}
-
-void
-DT_EOL::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_EOL();
-}
-
-bool
-DT_EOL::IsWhiteOnly() const
-{
- return true;
-}
-
-DT_StdAtTag::~DT_StdAtTag()
-{
-}
-
-void
-DT_StdAtTag::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_StdAtTag( *this );
-}
-
-DT_SeeAlsoAtTag::~DT_SeeAlsoAtTag()
-{
-}
-
-void
-DT_SeeAlsoAtTag::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_SeeAlsoAtTag( *this );
-}
-
-DT_ParameterAtTag::~DT_ParameterAtTag()
-{
-}
-
-void
-DT_ParameterAtTag::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_ParameterAtTag( *this );
-}
-
-DT_SinceAtTag::~DT_SinceAtTag()
-{
-}
-
-void
-DT_SinceAtTag::DisplayAt( DocumentationDisplay & o_rDisplay ) const
-{
- o_rDisplay.Display_SinceAtTag( *this );
-}
-
-
-
-
-} // namespace dsapi
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/ary_i/kernel/makefile.mk b/autodoc/source/ary_i/kernel/makefile.mk
deleted file mode 100644
index 79675bc0..00000000
--- a/autodoc/source/ary_i/kernel/makefile.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=ary2_cinfo
-
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/ci_atag2.obj \
- $(OBJ)$/ci_text2.obj \
- $(OBJ)$/d_token.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/display/html/aryattrs.cxx b/autodoc/source/display/html/aryattrs.cxx
deleted file mode 100644
index 106ff4b7..00000000
--- a/autodoc/source/display/html/aryattrs.cxx
+++ /dev/null
@@ -1,251 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "aryattrs.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/getncast.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include "strconst.hxx"
-
-
-
-
-//******************** HtmlDisplay_Impl *********************//
-
-const char *
-Get_ClassTypeKey( const ary::cpp::Class & i_rClass )
-{
- return i_rClass.ClassKey() == ary::cpp::CK_class
- ? C_sHFTypeTitle_Class
- : i_rClass.ClassKey() == ary::cpp::CK_struct
- ? C_sHFTypeTitle_Struct
- : C_sHFTypeTitle_Union;
-
-}
-
-const char *
-Get_TypeKey( const ary::cpp::CodeEntity & i_rCe )
-{
- if ( ary::is_type<ary::cpp::Class>(i_rCe) )
- {
- return Get_ClassTypeKey(
- ary::ary_cast<ary::cpp::Class>(i_rCe) );
- }
- if ( ary::is_type<ary::cpp::Enum>(i_rCe) )
- {
- return "enum";
- }
- return "";
-}
-
-bool
-Ce_IsInternal( const ary::cpp::CodeEntity & i_rCe )
-{
- return NOT i_rCe.IsVisible();
-}
-
-const char *
-SyntaxText_PreName( const ary::cpp::Function & i_rFunction,
- const ary::cpp::Gate & i_rAryGate )
-{
- static StreamStr sResult( 150 );
- sResult.seekp(0);
-
- // write pre-name:
- const ary::cpp::FunctionFlags & rFlags = i_rFunction.Flags();
- if ( rFlags.IsStaticLocal() OR rFlags.IsStaticMember() )
- sResult << "static ";
- if ( rFlags.IsExplicit() )
- sResult << "explicit ";
- if ( rFlags.IsMutable() )
- sResult << "mutable ";
- if ( i_rFunction.Virtuality() != ary::cpp::VIRTUAL_none )
- sResult << "virtual ";
- i_rAryGate.Types().Get_TypeText( sResult, i_rFunction.ReturnType() );
- sResult << " ";
-
- return sResult.c_str();
-}
-
-const char *
-SyntaxText_PostName( const ary::cpp::Function & i_rFunction,
- const ary::cpp::Gate & i_rAryGate )
-{
- static StreamStr sResult( 850 );
- sResult.seekp(0);
-
- // parameters and con_vol
- i_rAryGate.Ces().Get_SignatureText( sResult, i_rFunction.Signature(), &i_rFunction.ParamInfos() );
-
- // write Exceptions:
- const std::vector< ary::cpp::Type_id > *
- pThrow = i_rFunction.Exceptions();
- if ( pThrow)
- {
-
- std::vector< ary::cpp::Type_id >::const_iterator
- it = pThrow->begin();
- std::vector< ary::cpp::Type_id >::const_iterator
- it_end = pThrow->end();
-
- if (it != it_end)
- {
- sResult << " throw( ";
- i_rAryGate.Types().Get_TypeText(sResult, *it);
-
- for ( ++it; it != it_end; ++it )
- {
- sResult << ", ";
- i_rAryGate.Types().Get_TypeText(sResult, *it);
- }
- sResult << " )";
- }
- else
- {
- sResult << " throw( )";
- }
- } // endif // pThrow
-
- // abstractness:
- if ( i_rFunction.Virtuality() == ary::cpp::VIRTUAL_abstract )
- sResult << " = 0";
-
- // finish:
- sResult << ";";
-
- return sResult.c_str();
-}
-
-bool
-Get_TypeText( const char * & o_rPreName,
- const char * & o_rName,
- const char * & o_rPostName,
- ary::cpp::Type_id i_nTypeid,
- const ary::cpp::Gate & i_rAryGate )
-{
- static StreamStr sResult_PreName(250);
- static StreamStr sResult_Name(250);
- static StreamStr sResult_PostName(250);
-
- sResult_PreName.seekp(0);
- sResult_Name.seekp(0);
- sResult_PostName.seekp(0);
-
- bool ret = i_rAryGate.Types().Get_TypeText(
- sResult_PreName,
- sResult_Name,
- sResult_PostName,
- i_nTypeid );
- if ( sResult_PreName.tellp() > 0 )
- {
- char cLast = *( sResult_PreName.c_str() + (sResult_PreName.tellp() - 1) );
- if (cLast != ':' AND cLast != ' ')
- sResult_PreName << " ";
- }
-
-
- if (ret)
- {
- o_rPreName = sResult_PreName.c_str();
- o_rName = sResult_Name.c_str();
- o_rPostName = sResult_PostName.c_str();
- }
- else
- {
- o_rPreName = o_rName = o_rPostName = "";
- }
- return ret;
-}
-
-
-
-
-//********************* FunctionParam_Iterator *****************//
-
-
-FunctionParam_Iterator::FunctionParam_Iterator()
- : // itTypes
- // itTypes_end
- // itNames_andMore
- // itNames_andMore_end
- eConVol(ary::cpp::CONVOL_none)
-{
- static std::vector<ary::cpp::Type_id> aTypesNull_;
- static StringVector aNamesNull_;
-
- itTypes = itTypes_end = aTypesNull_.end();
- itNames_andMore = itNames_andMore_end = aNamesNull_.end();
-}
-
-FunctionParam_Iterator::~FunctionParam_Iterator()
-{
-}
-
-FunctionParam_Iterator &
-FunctionParam_Iterator::operator++()
-{
- if ( IsValid() )
- {
- ++itTypes;
- ++itNames_andMore;
- }
- return *this;
-}
-
-void
-FunctionParam_Iterator::Assign( const ary::cpp::Function & i_rFunction )
-{
- const ary::cpp::OperationSignature &
- rSigna = i_rFunction.Signature();
-
- const std::vector<ary::cpp::Type_id> &
- rTypes = rSigna.Parameters();
- const StringVector &
- rNames = i_rFunction.ParamInfos();
-
- if ( rTypes.size() != rNames.size() OR rTypes.size() == 0 )
- return;
-
- itTypes = rTypes.begin();
- itTypes_end = rTypes.end();
- itNames_andMore = rNames.begin();
- itNames_andMore_end = rNames.end();
-
- eConVol = rSigna.ConVol();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/aryattrs.hxx b/autodoc/source/display/html/aryattrs.hxx
deleted file mode 100644
index 92de1774..00000000
--- a/autodoc/source/display/html/aryattrs.hxx
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_ARYATTRS_HXX
-#define ADC_DISPLAY_ARYATTRS_HXX
-
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/doc/d_docu.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- class CodeEntity;
- class Class;
- class DisplayGate;
- class Function;
- class Namespace;
- }
-}
-
-
-
-
-const char * Get_ClassTypeKey(
- const ary::cpp::Class & i_rClass );
-const char * Get_TypeKey(
- const ary::cpp::CodeEntity &
- i_rCe );
-bool Ce_IsInternal(
- const ary::cpp::CodeEntity &
- i_rCe );
-const char * SyntaxText_PreName(
- const ary::cpp::Function &
- i_rFunction,
- const ary::cpp::Gate & i_rAryGate );
-const char * SyntaxText_PostName(
- const ary::cpp::Function &
- i_rFunction,
- const ary::cpp::Gate & i_rAryGate );
-
-bool Get_TypeText(
- const char * & o_rPreName,
- const char * & o_rName,
- const char * & o_rPostName,
- ary::cpp::Type_id i_nTypeid,
- const ary::cpp::Gate & i_rAryGate );
-
-
-inline const ary::doc::OldCppDocu *
-Get_CppDocu(const ary::doc::Documentation & i_doc)
-{
- return dynamic_cast< const ary::doc::OldCppDocu* >(i_doc.Data());
-}
-
-
-class FunctionParam_Iterator
-{
- public:
- FunctionParam_Iterator();
- ~FunctionParam_Iterator();
-
- operator bool() const;
- FunctionParam_Iterator &
- operator++();
-
- void Assign(
- const ary::cpp::Function &
- i_rFunction );
-
- ary::cpp::Type_id
- CurType() const;
- const String & CurName() const;
-
- bool IsFunctionConst() const;
- bool IsFunctionVolatile() const;
-
- private:
- typedef std::vector<ary::cpp::Type_id>::const_iterator Type_Iterator;
- typedef StringVector::const_iterator Name_Iterator;
-
- bool IsValid() const;
-
- // Forbidden
- FunctionParam_Iterator &
- operator++(int);
- // DATA
- Type_Iterator itTypes;
- Type_Iterator itTypes_end;
- Name_Iterator itNames_andMore; /// Name, init-value.
- Name_Iterator itNames_andMore_end;
-
- ary::cpp::E_ConVol eConVol;
-};
-
-
-
-
-// IMPLEMENTATION
-inline
-FunctionParam_Iterator::operator bool() const
- { return IsValid(); }
-
-inline bool
-FunctionParam_Iterator::IsValid() const
-{
- // By C'tor and Assign(), it is assured, that
- // both iterators are valid, if one is valid.
- return itTypes != itTypes_end;
-}
-
-inline ary::cpp::Type_id
-FunctionParam_Iterator::CurType() const
- { return IsValid() ? *itTypes : ary::cpp::Type_id(0); }
-inline const String &
-FunctionParam_Iterator::CurName() const
- { return IsValid() ? *itNames_andMore : String::Null_(); }
-inline bool
-FunctionParam_Iterator::IsFunctionConst() const
- { return (eConVol & ary::cpp::CONVOL_const) != 0; }
-inline bool
-FunctionParam_Iterator::IsFunctionVolatile() const
- { return (eConVol & ary::cpp::CONVOL_volatile) != 0; }
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/cfrstd.cxx b/autodoc/source/display/html/cfrstd.cxx
deleted file mode 100644
index 7cf1263a..00000000
--- a/autodoc/source/display/html/cfrstd.cxx
+++ /dev/null
@@ -1,347 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cfrstd.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <time.h>
-
-
-/* CSS Styles
- ----------
-
-Colors:
-- light background color #eeeeff
-- dark background color #ccccff
-- self in navibar background color #2222ad
-
-
-Fonts:
-- page title 20, bold, Arial
-- navibar main 12, bold, Arial
-- navibar sub 8, Arial, kapitälchen
-- attrtable title line 8, bold, Arial, kapitälchen
-- attrtable value line 8, Arial kapitälchen
-
-- namespace chain 13, bold
-- table title 13, bold
-- template line 13
-
-- member paragraph title 12, bold
-
-- docu paragraph title 11, bold
-- standard text 11
-
-- hierarchy 11, monospace
-
-
-classes:
-
- td.title page title
- h3 table title
- h4 member paragraph title
-
- td.nmain navigation main bar
- td.nsub navigation sub bar
- a.nmain links in navigation main bar
- a.nsub links in navigation sub bar
-
- td.attr1 attribute table head line
- td.attr2 attribute table value line
-
- p.namechain namespace chain in head of pages
- p.tpl template line in head of pages
-
- pre.doc preformatted docu
- pre.hierarchy class bases hierarchy graphic
-
- dl.syntax function- or variable-declaration field
- a.syntax link in function- or variable-declaration field
-
- p.dt docu paragraph title
- dl.dt docu paragraph title
-
- p standard text
- dl standard text
- dd standard text
-*/
-
-
-#define CRLF "\n"
-
-namespace
-{
-
-bool bUse_OOoFrameDiv = true;
-
-
-//*************** These are used for IDL currently only! ********************
-
-const char * const C_sStdStyle =
- "/*See bottom of file for explanations.*/"CRLF
- CRLF
- "body { background-color:#ffffff; }"CRLF
- CRLF
- "h3 { font-size:13pt; font-weight:bold;"CRLF
- " margin-top:3pt; margin-bottom:1pt; }"CRLF
- "p, dt, dd, pre { font-size:11pt;"CRLF
- " margin-top:3pt; margin-bottom:1pt; }"CRLF
- "pre { font-family:monospace; }"CRLF
- CRLF
- "table.navimain { background-color:#eeeeff; }"CRLF
- "table.subtitle { margin-top:6pt; margin-bottom:6pt; }"CRLF
- CRLF
- "td { font-size:11pt; }"CRLF
- "td.title { font-family: Arial; font-size:19pt; font-weight:bold;"CRLF
- " line-height:30pt; background-color:#ccccff; text-align:center; }"CRLF
- "td.subtitle { font-family: Arial; font-size:13pt;"CRLF
- " line-height:20pt; background-color:#ccccff; }"CRLF
- "td.crosstitle { font-size:12pt; font-weight:bold;"CRLF
- " line-height:15pt; background-color:#eeeeff; }"CRLF
- "td.imdetail { width:100%; background-color:#eeeeff; }"CRLF
- CRLF
- "td.imsum_left { width:30%; }"CRLF
- "td.imsum_right { width:70%; }"CRLF
- CRLF
- "td.navimain, a.navimain"CRLF
- " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }"CRLF
- "td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;"CRLF
- " color:#ffffff; background-color:#2222ad; }"CRLF
- "td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }"CRLF
- "td.navisub, a.navisub"CRLF
- " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }"CRLF
- "td.navimain, td.navisub"CRLF
- " { padding-left:7pt; padding-right:7pt; }"CRLF
- CRLF
- "a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }"CRLF
- "a.navimain, a.navisub { color:#000000; }"CRLF
- ".dt { font-weight:bold; }"CRLF
- ".namechain { font-size:13pt; font-weight:bold;"CRLF
- " margin-top:3pt; margin-bottom:6pt; }"CRLF
- ".title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }"CRLF
- ;
-
-
-const char * const C_sCssExplanations =
- "/* Explanation of CSS classes:"CRLF
- CRLF
- ".navimain Text in main navigation bar."CRLF
- ".navisub Text in lower navigation bar."CRLF
- "td.navimainself Cell in main navigation bar with \"selected\" shadow: You are here."CRLF
- "td.navimainnone Cell in main navigation bar with no link."CRLF
- CRLF
- ".namechain Line with current module path."CRLF
- CRLF
- "td.crosstitle Comment box for bases (base interfaces etc.)"CRLF
- "td.imsum_left Left part of such boxes."CRLF
- "td.imsum_right Right part of such boxes."CRLF
- CRLF
- "td.title Main title of the page like \"interface XYz\""CRLF
- ".subtitle Tables, and head cells of those, which list members"CRLF
- " like \"method summary\" and \"method details\"."CRLF
- CRLF
- "td.imdetail Background table of method's detail description."CRLF
- "a.membertitle Method name (as jump label) in method's detail"CRLF
- " description."CRLF
- ".title2 smaller font prefixes to page titles"CRLF
- "*/"CRLF
- ;
-
-const char * const C_sStdStyle_withDivFrame =
- "/*See bottom of file for explanations.*/"CRLF
- CRLF
- "body { background-color:#ffffff; }"CRLF
- CRLF
- "#adc-idlref h3 { font-size:13pt; font-weight:bold;"CRLF
- " margin-top:3pt; margin-bottom:1pt; }"CRLF
- "#adc-idlref p, #adc-idlref dt, #adc-idlref dd, #adc-idlref pre"CRLF
- " { font-size:11pt;"CRLF
- " margin-top:3pt; margin-bottom:1pt; }"CRLF
- "#adc-idlref pre { font-family:monospace; }"CRLF
- CRLF
- "#adc-idlref table.navimain { background-color:#eeeeff; }"CRLF
- "#adc-idlref table.subtitle { margin-top:6pt; margin-bottom:6pt; }"CRLF
- CRLF
- "#adc-idlref td { font-size:11pt; }"CRLF
- "#adc-idlref td.title { font-family: Arial; font-size:19pt; font-weight:bold;"CRLF
- " line-height:30pt; background-color:#ccccff; text-align:center; }"CRLF
- "#adc-idlref td.subtitle { font-family: Arial; font-size:13pt;"CRLF
- " line-height:20pt; background-color:#ccccff; }"CRLF
- "#adc-idlref td.crosstitle { font-size:12pt; font-weight:bold;"CRLF
- " line-height:15pt; background-color:#eeeeff; }"CRLF
- "#adc-idlref td.imdetail { width:100%; background-color:#eeeeff; }"CRLF
- CRLF
- "#adc-idlref td.imsum_left { width:30%; }"CRLF
- "#adc-idlref td.imsum_right { width:70%; }"CRLF
- CRLF
- "#adc-idlref td.navimain, #adc-idlref a.navimain"CRLF
- " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }"CRLF
- "#adc-idlref td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;"CRLF
- " color:#ffffff; background-color:#2222ad; }"CRLF
- "#adc-idlref td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }"CRLF
- "#adc-idlref td.navisub, #adc-idlref a.navisub"CRLF
- " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }"CRLF
- "#adc-idlref td.navimain, #adc-idlref td.navisub"CRLF
- " { padding-left:7pt; padding-right:7pt; }"CRLF
- CRLF
- "#adc-idlref a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }"CRLF
- "#adc-idlref a.navimain, #adc-idlref a.navisub { color:#000000; }"CRLF
- "#adc-idlref .dt { font-weight:bold; }"CRLF
- "#adc-idlref .namechain { font-size:13pt; font-weight:bold;"CRLF
- " margin-top:3pt; margin-bottom:6pt; }"CRLF
- "#adc-idlref .title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }"CRLF
- ""CRLF
- "#adc-idlref table { empty-cells:show; }"CRLF
- ""CRLF
- "#adc-idlref .childlist td, "CRLF
- "#adc-idlref .commentedlinks td, "CRLF
- "#adc-idlref .memberlist td, "CRLF
- "#adc-idlref .subtitle td, "CRLF
- "#adc-idlref .crosstitle td { border: .1pt solid #000000; }"CRLF
- ""CRLF
- "#adc-idlref .flag-table td { border: .1pt solid #cccccc; } "CRLF
- ""CRLF
- "#adc-idlref .title-table td, "CRLF
- "#adc-idlref .table-in-method td, "CRLF
- "#adc-idlref .table-in-data td, "CRLF
- "#adc-idlref .navimain td, "CRLF
- "#adc-idlref .navisub td, "CRLF
- "#adc-idlref .expl-table td, "CRLF
- "#adc-idlref .param-table td { border: none; }"CRLF
- ;
-
-
-} // anonymous namespace
-
-
-StdFrame::StdFrame()
- : sDevelopersGuideHtmlRoot(),
- bSimpleLinks(false)
-{
-}
-
-DYN Html_Image *
-StdFrame::LogoSrc() const
-{
- return 0;
-
-// return new Html_Image( "logodot-blu.gif",
-// "109",
-// "54",
-// "RIGHT",
-// "0",
-// "OpenOffice" );
-
-}
-
-const char *
-StdFrame::LogoLink() const
-{
- return "";
-// return "http://www.sun.com";
-// return "http://www.openoffice.org";
-}
-
-
-String MakeCopyRight();
-
-const char *
-StdFrame::CopyrightText() const
-{
- static String sCopyRight_( MakeCopyRight() );
- return sCopyRight_.c_str();
-}
-
-const char *
-StdFrame::CssStyle() const
-{
- if (bUse_OOoFrameDiv)
- return C_sStdStyle_withDivFrame;
- else
- return C_sStdStyle;
-}
-
-const char *
-StdFrame::CssStylesExplanation() const
-{
- return C_sCssExplanations;
-}
-
-const char *
-StdFrame::DevelopersGuideHtmlRoot() const
-{
- return sDevelopersGuideHtmlRoot;
-}
-
-bool
-StdFrame::SimpleLinks() const
-{
- return bSimpleLinks;
-}
-
-void
-StdFrame::Set_DevelopersGuideHtmlRoot( const String & i_directory )
-{
- if (NOT i_directory.empty())
- {
- if (i_directory.char_at(i_directory.length()-1) == '/')
- {
- sDevelopersGuideHtmlRoot.assign(i_directory,i_directory.length()-1);
- return;
- }
- }
- sDevelopersGuideHtmlRoot = i_directory;
-}
-
-void
-StdFrame::Set_SimpleLinks()
-{
- bSimpleLinks = true;
-}
-
-String
-MakeCopyRight()
-{
- StreamStr cr(700);
- time_t
- gt;
- time(&gt);
- tm *
- plt = localtime(&gt);
- int year = 1900 + plt->tm_year;
-
- cr << "Copyright &copy; 1995, "
- << year
- << ", Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.";
- return String(cr.c_str());
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/chd_udk2.cxx b/autodoc/source/display/html/chd_udk2.cxx
deleted file mode 100644
index 5d2a3f27..00000000
--- a/autodoc/source/display/html/chd_udk2.cxx
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <html/chd_udk2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/ary_disp.hxx>
-#include <ary/ceslot.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_ce.hxx>
-
-#include "dsply_cl.hxx"
-#include "dsply_da.hxx"
-#include "dsply_op.hxx"
-#include "opageenv.hxx"
-#include "outfile.hxx"
-#include "pagemake.hxx"
-
-
-
-//******************** CppHtmlDisplay_Udk2 ********************//
-
-
-CppHtmlDisplay_Udk2::CppHtmlDisplay_Udk2()
- : pCurPageEnv(0)
-{
-}
-
-CppHtmlDisplay_Udk2::~CppHtmlDisplay_Udk2()
-{
-}
-
-void
-CppHtmlDisplay_Udk2::do_Run( const char * i_sOutputDirectory,
- const ary::cpp::Gate & i_rAryGate,
- const display::CorporateFrame & i_rLayout )
-{
- SetRunData( i_sOutputDirectory, i_rAryGate, i_rLayout );
-
- Create_Css_File();
- Create_Overview_File();
- Create_Help_File();
- Create_AllDefs_File();
-
- CreateFiles_InSubTree_Namespaces();
- CreateFiles_InSubTree_Index();
-}
-
-void
-CppHtmlDisplay_Udk2::SetRunData( const char * i_sOutputDirectory,
- const ary::cpp::Gate & i_rAryGate,
- const display::CorporateFrame & i_rLayout )
-{
- csv::ploc::Path aOutputDir( i_sOutputDirectory, true );
- pCurPageEnv = new OuputPage_Environment( aOutputDir, i_rAryGate, i_rLayout );
-}
-
-void
-CppHtmlDisplay_Udk2::Create_Css_File()
-{
- pCurPageEnv->MoveDir_2Root();
- pCurPageEnv->SetFile_Css();
- HtmlDocuFile::WriteCssFile(pCurPageEnv->CurPath());
-}
-
-void
-CppHtmlDisplay_Udk2::Create_Overview_File()
-{
- pCurPageEnv->MoveDir_2Root();
- PageDisplay aPageMaker( *pCurPageEnv );
- aPageMaker.Create_OverviewFile();
-}
-
-void
-CppHtmlDisplay_Udk2::Create_Help_File()
-{
- PageDisplay aPageMaker( *pCurPageEnv );
- aPageMaker.Create_HelpFile();
-}
-
-void
-CppHtmlDisplay_Udk2::Create_AllDefs_File()
-{
- PageDisplay aPageMaker( *pCurPageEnv );
- aPageMaker.Create_AllDefsFile();
-}
-
-void
-CppHtmlDisplay_Udk2::CreateFiles_InSubTree_Namespaces()
-{
- Cout() << "\nCreate files in subtree namespaces" << Endl();
-
- const ary::cpp::Namespace &
- rGlobalNsp = Gate().Ces().GlobalNamespace();
-
- RecursiveDisplay_Namespace(rGlobalNsp);
- Cout() << Endl();
-}
-
-void
-CppHtmlDisplay_Udk2::CreateFiles_InSubTree_Index()
-{
- Cout() << "\nCreate files in subtree index" << Endl();
- Cout() << Endl();
-
- PageDisplay aPageMaker( *pCurPageEnv );
- aPageMaker.Create_IndexFiles();
-}
-
-void
-CppHtmlDisplay_Udk2::RecursiveDisplay_Namespace( const ary::cpp::Namespace & i_rNsp )
-{
- if (i_rNsp.Owner().IsValid())
- pCurPageEnv->MoveDir_Down2( i_rNsp );
- else
- pCurPageEnv->MoveDir_2Names();
- DisplayFiles_InNamespace( i_rNsp );
-
- typedef std::vector< const ary::cpp::Namespace* > NspList;
- NspList aSubNspList;
- i_rNsp.Get_SubNamespaces( aSubNspList );
- for ( NspList::const_iterator it = aSubNspList.begin();
- it != aSubNspList.end();
- ++it )
- {
- RecursiveDisplay_Namespace( *(*it) );
- } // end for
-
- pCurPageEnv->MoveDir_Up();
-}
-
-void
-CppHtmlDisplay_Udk2::DisplayFiles_InNamespace( const ary::cpp::Namespace & i_rNsp )
-{
- PageDisplay aPageMaker( *pCurPageEnv );
-
- ary::Slot_AutoPtr pSlot;
-
- // Namespace
- aPageMaker.Create_NamespaceFile();
-
- // Classes
- ClassDisplayer aClassDisplayer( *pCurPageEnv );
- DisplaySlot( aClassDisplayer, i_rNsp, ary::cpp::Namespace::SLOT_Classes );
-
- // Enums
- DisplaySlot( aPageMaker, i_rNsp, ary::cpp::Namespace::SLOT_Enums );
-
- // Typedefs
- DisplaySlot( aPageMaker, i_rNsp, ary::cpp::Namespace::SLOT_Typedefs );
-
- // Operations
- OperationsDisplay aOperationsDisplayer( *pCurPageEnv );
- DisplaySlot( aOperationsDisplayer, i_rNsp, ary::cpp::Namespace::SLOT_Operations );
- aOperationsDisplayer.Create_Files();
-
- // Data
- DataDisplay aDataDisplayer( *pCurPageEnv );
-
- aDataDisplayer.PrepareForConstants();
- DisplaySlot( aDataDisplayer, i_rNsp, ary::cpp::Namespace::SLOT_Constants );
-
- aDataDisplayer.PrepareForVariables();
- DisplaySlot( aDataDisplayer, i_rNsp, ary::cpp::Namespace::SLOT_Variables );
-
- aDataDisplayer.Create_Files();
-}
-
-const ary::cpp::Gate &
-CppHtmlDisplay_Udk2::Gate() const
-{
- return pCurPageEnv->Gate();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/cre_link.cxx b/autodoc/source/display/html/cre_link.cxx
deleted file mode 100644
index 2635ece8..00000000
--- a/autodoc/source/display/html/cre_link.cxx
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cre_link.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/loc/locp_le.hxx>
-#include "hdimpl.hxx"
-#include "opageenv.hxx"
-#include "strconst.hxx"
-
-
-
-
-
-LinkCreator::LinkCreator( char * o_rOutput,
- uintt i_nOutputSize )
- : pOut(o_rOutput),
- nOutMaxSize(i_nOutputSize),
- pEnv(0)
-{
-}
-
-LinkCreator::~LinkCreator()
-{
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Namespace & i_rData )
-{
- Create_PrePath( i_rData );
- strcat( pOut, "index.html" ); // KORR_FUTURE // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Class & i_rData )
-{
- Create_PrePath( i_rData );
- strcat( pOut, ClassFileName(i_rData.LocalName().c_str()) ); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Enum & i_rData )
-{
- Create_PrePath( i_rData );
- strcat( pOut, EnumFileName(i_rData.LocalName().c_str()) ); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Typedef & i_rData )
-{
- Create_PrePath( i_rData );
- strcat( pOut, TypedefFileName(i_rData.LocalName().c_str()) ); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Function & i_rData )
-{
- Create_PrePath( i_rData );
-
- if ( i_rData.Protection() != ary::cpp::PROTECT_global )
- {
- strcat( pOut, "o.html" ); // SAFE STRCAT (#100211# - checked)
- }
- else
- {
- csv_assert(i_rData.Location().IsValid());
- const ary::loc::File &
- rFile = pEnv->Gate().Locations().Find_File(i_rData.Location());
- strcat( pOut, HtmlFileName("o-", rFile.LocalName().c_str()) ); // SAFE STRCAT (#100211# - checked)
- }
-
- csv_assert(pEnv != 0);
- strcat( pOut, OperationLink(pEnv->Gate(), i_rData.LocalName(), i_rData.CeId()) ); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Variable & i_rData )
-{
- Create_PrePath( i_rData );
-
- if ( i_rData.Protection() != ary::cpp::PROTECT_global )
- {
- strcat( pOut, "d.html" ); // SAFE STRCAT (#100211# - checked)
- }
- else
- {
- csv_assert(i_rData.Location().IsValid());
- const ary::loc::File &
- rFile = pEnv->Gate().Locations().Find_File(i_rData.Location());
- strcat( pOut, HtmlFileName("d-", rFile.LocalName().c_str()) ); // SAFE STRCAT (#100211# - checked)
- }
-
- strcat( pOut, DataLink(i_rData.LocalName()) ); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::EnumValue & i_rData )
-{
- const ary::cpp::CodeEntity *
- pEnum = pEnv->Gate().Ces().Search_Ce(i_rData.Owner());
- if (pEnum == 0)
- return;
-
- pEnum->Accept(*this);
- strcat(pOut, "#"); // SAFE STRCAT (#100211# - checked)
- strcat(pOut, i_rData.LocalName().c_str()); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Define & i_rData )
-{
- // KORR_FUTURE
- // Only valid from Index:
-
- *pOut = '\0';
- strcat(pOut, "../def-all.html#"); // SAFE STRCAT (#100211# - checked)
- strcat(pOut, i_rData.LocalName().c_str()); // SAFE STRCAT (#100211# - checked)
-}
-
-void
-LinkCreator::do_Process( const ary::cpp::Macro & i_rData )
-{
- // KORR_FUTURE
- // Only valid from Index:
-
- *pOut = '\0';
- strcat(pOut, "../def-all.html#"); // SAFE STRCAT (#100211# - checked)
- strcat(pOut, i_rData.LocalName().c_str()); // SAFE STRCAT (#100211# - checked)
-}
-
-
-namespace
-{
-
-class NameScope_const_iterator
-{
- public:
- NameScope_const_iterator(
- ary::cpp::Ce_id i_nId,
- const ary::cpp::Gate &
- i_rGate );
-
- operator bool() const { return pCe != 0; }
- const String & operator*() const;
-
- void go_up();
-
- private:
- const ary::cpp::CodeEntity *
- pCe;
- const ary::cpp::Gate *
- pGate;
-};
-
-
-NameScope_const_iterator::NameScope_const_iterator(
- ary::cpp::Ce_id i_nId,
- const ary::cpp::Gate & i_rGate )
- : pCe(i_rGate.Ces().Search_Ce(i_nId)),
- pGate(&i_rGate)
-{
-}
-
-const String &
-NameScope_const_iterator::operator*() const
-{
- return pCe ? pCe->LocalName()
- : String::Null_();
-}
-
-void
-NameScope_const_iterator::go_up()
-{
- if (pCe == 0)
- return;
- pCe = pGate->Ces().Search_Ce(pCe->Owner());
-}
-
-
-void Recursive_CreatePath(
- char * o_pOut,
- const NameScope_const_iterator &
- i_it );
-
-void
-Recursive_CreatePath( char * o_pOut,
- const NameScope_const_iterator & i_it )
-{
- if (NOT i_it)
- return;
-
- NameScope_const_iterator it( i_it );
- it.go_up();
- if (NOT it)
- return; // Global Namespace
- Recursive_CreatePath( o_pOut, it );
-
- strcat( o_pOut, (*i_it).c_str() ); // SAFE STRCAT (#100211# - checked)
- strcat( o_pOut, "/" ); // SAFE STRCAT (#100211# - checked)
-}
-
-
-} // anonymous namespace
-
-
-
-
-
-void
-LinkCreator::Create_PrePath( const ary::cpp::CodeEntity & i_rData )
-{
- *pOut = NULCH;
-
- if ( pEnv->CurNamespace() != 0 )
- {
- if ( pEnv->CurClass()
- ? pEnv->CurClass()->CeId() == i_rData.Owner()
- : pEnv->CurNamespace()->CeId() == i_rData.Owner() )
- return;
-
- strcat( pOut, PathUp(pEnv->Depth() - 1) ); // SAFE STRCAT (#100211# - checked)
- }
- else
- { // Within Index
- strcat( pOut, "../names/" ); // SAFE STRCAT (#100211# - checked)
- }
-
- NameScope_const_iterator it( i_rData.Owner(), pEnv->Gate() );
- Recursive_CreatePath( pOut, it );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/cre_link.hxx b/autodoc/source/display/html/cre_link.hxx
deleted file mode 100644
index ff0c5753..00000000
--- a/autodoc/source/display/html/cre_link.hxx
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_CRE_LINK_HXX
-#define ADC_DISPLAY_CRE_LINK_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/tpl/processor.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-namespace cpp
-{
- class CodeEntity;
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- class Function;
- class Variable;
- class EnumValue;
- class Define;
- class Macro;
-}
-}
-
-
-class OuputPage_Environment;
-
-
-
-/** Displays links to ->{ary::cpp::CodeEntity CodeEntites}.
-*/
-class LinkCreator : public csv::ProcessorIfc,
- public csv::ConstProcessor<ary::cpp::Namespace>,
- public csv::ConstProcessor<ary::cpp::Class>,
- public csv::ConstProcessor<ary::cpp::Enum>,
- public csv::ConstProcessor<ary::cpp::Typedef>,
- public csv::ConstProcessor<ary::cpp::Function>,
- public csv::ConstProcessor<ary::cpp::Variable>,
- public csv::ConstProcessor<ary::cpp::EnumValue>,
- public csv::ConstProcessor<ary::cpp::Define>,
- public csv::ConstProcessor<ary::cpp::Macro>
-{
- public:
- LinkCreator(
- char * o_rOutput,
- uintt i_nOutputSize );
- ~LinkCreator();
-
-
- void SetEnv(
- const OuputPage_Environment &
- i_rEnv );
- private:
- void Create_PrePath(
- const ary::cpp::CodeEntity &
- i_rData );
- // Interface csv::ConstProcessor<>
- virtual void do_Process(
- const ary::cpp::Namespace &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Class &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Enum &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Typedef &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Function &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Variable &
- i_rData );
- virtual void do_Process(
- const ary::cpp::EnumValue &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Define &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Macro &
- i_rData );
- // DATA
- char * pOut;
- uintt nOutMaxSize;
- const OuputPage_Environment *
- pEnv;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-LinkCreator::SetEnv( const OuputPage_Environment & i_rEnv )
- { pEnv = &i_rEnv; }
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/dsply_cl.cxx b/autodoc/source/display/html/dsply_cl.cxx
deleted file mode 100644
index 8a570ae3..00000000
--- a/autodoc/source/display/html/dsply_cl.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "dsply_cl.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include "dsply_da.hxx"
-#include "dsply_op.hxx"
-#include "hdimpl.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-
-
-
-
-ClassDisplayer::ClassDisplayer( OuputPage_Environment & io_rEnv )
- : pEnv(&io_rEnv)
-{
-}
-
-ClassDisplayer::~ClassDisplayer()
-{
-}
-
-void
-ClassDisplayer::DisplayFiles_InClass( const ary::cpp::Class & i_rData,
- PageDisplay & io_rPageMaker )
-{
- // Classes
- ClassDisplayer aClassDisplayer( Env() );
- DisplaySlot( aClassDisplayer, i_rData, ary::cpp::Class::SLOT_NestedClasses );
-
- // Enums
- DisplaySlot( io_rPageMaker, i_rData, ary::cpp::Class::SLOT_Enums );
-
- // Typedefs
- DisplaySlot( io_rPageMaker, i_rData, ary::cpp::Class::SLOT_Typedefs );
-
- // Operations
- OperationsDisplay aOperationsDisplayer( Env() );
-
- aOperationsDisplayer.PrepareForStdMembers();
- DisplaySlot( aOperationsDisplayer, i_rData, ary::cpp::Class::SLOT_Operations );
-
- aOperationsDisplayer.PrepareForStaticMembers();
- DisplaySlot( aOperationsDisplayer, i_rData, ary::cpp::Class::SLOT_StaticOperations );
-
- aOperationsDisplayer.Create_Files();
-
- // Data
- DataDisplay aDataDisplayer( Env() );
-
- aDataDisplayer.PrepareForStdMembers();
- DisplaySlot( aDataDisplayer, i_rData, ary::cpp::Class::SLOT_Data );
-
- aDataDisplayer.PrepareForStaticMembers();
- DisplaySlot( aDataDisplayer, i_rData, ary::cpp::Class::SLOT_StaticData );
-
- aDataDisplayer.Create_Files();
-}
-
-void
-ClassDisplayer::do_Process( const ary::cpp::Class & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- PageDisplay aPageMaker( Env() );
- aPageMaker.Process(i_rData);
-
- Env().MoveDir_Down2( i_rData );
- DisplayFiles_InClass( i_rData, aPageMaker );
- Env().MoveDir_Up();
-}
-
-const ary::cpp::Gate *
-ClassDisplayer::inq_Get_ReFinder() const
-{
- return & pEnv->Gate();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/dsply_cl.hxx b/autodoc/source/display/html/dsply_cl.hxx
deleted file mode 100644
index 9ba6d76e..00000000
--- a/autodoc/source/display/html/dsply_cl.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_HD_PAGE_HXX
-#define ADC_DISPLAY_HTML_HD_PAGE_HXX
-
-// BASE CLASSES
-#include <ary/ary_disp.hxx>
-#include <cosv/tpl/processor.hxx>
-// USED SERVICES
-#include <ary/types.hxx>
-
-class OuputPage_Environment;
-
-namespace ary
-{
-namespace cpp
-{
- class Class;
-}
-}
-
-class PageDisplay;
-
-
-
-
-class ClassDisplayer : public ary::Display,
- public csv::ConstProcessor<ary::cpp::Class>
-{
- public:
- ClassDisplayer( // TODO
- OuputPage_Environment &
- io_rEnv );
- virtual ~ClassDisplayer();
-
- private:
- // Interface csv::ConstProcessor<>:
- virtual void do_Process(
- const ary::cpp::Class &
- i_data );
- // Interface ary::Display:
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
-
- // Locals
- void DisplayFiles_InClass(
- const ary::cpp::Class &
- i_rData,
- PageDisplay & io_rPageMaker );
-
- OuputPage_Environment &
- Env() { return *pEnv; }
-
- // DATA
- OuputPage_Environment *
- pEnv;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/dsply_da.cxx b/autodoc/source/display/html/dsply_da.cxx
deleted file mode 100644
index 17614c7d..00000000
--- a/autodoc/source/display/html/dsply_da.cxx
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "dsply_da.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/doc/d_docu.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <udm/html/htmlitem.hxx>
-#include "hd_docu.hxx"
-#include "hdimpl.hxx"
-#include "html_kit.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-
-
-using namespace csi;
-
-
-
-DataDisplay::DataDisplay( OuputPage_Environment & io_rEnv )
- : aMap_GlobalDataDisplay(),
- pClassMembersDisplay(0),
- pEnv( &io_rEnv ),
- pDocuShow( new Docu_Display(io_rEnv) )
-{
-}
-
-DataDisplay::~DataDisplay()
-{
- csv::erase_map_of_heap_ptrs( aMap_GlobalDataDisplay );
-}
-
-void
-DataDisplay::PrepareForConstants()
-{
- if (pClassMembersDisplay)
- pClassMembersDisplay = 0;
-
- csv::erase_map_of_heap_ptrs( aMap_GlobalDataDisplay );
-}
-
-void
-DataDisplay::PrepareForVariables()
-{
- // Doesn't need to do anything yet.
-}
-
-void
-DataDisplay::PrepareForStdMembers()
-{
- csv::erase_map_of_heap_ptrs( aMap_GlobalDataDisplay );
-
- pClassMembersDisplay = new PageDisplay(*pEnv);
- const ary::cpp::Class * pClass = pEnv->CurClass();
- csv_assert( pClass != 0 );
- pClassMembersDisplay->Setup_DataFile_for(*pClass);
-}
-
-void
-DataDisplay::PrepareForStaticMembers()
-{
- // Doesn't need to do anything yet.
-}
-
-void
-DataDisplay::Create_Files()
-{
- if (pClassMembersDisplay)
- {
- pClassMembersDisplay->Create_File();
- pClassMembersDisplay = 0;
- }
- else
- {
- for ( Map_FileId2PagePtr::const_iterator it = aMap_GlobalDataDisplay.begin();
- it != aMap_GlobalDataDisplay.end();
- ++it )
- {
- (*it).second->Create_File();
- }
- csv::erase_map_of_heap_ptrs( aMap_GlobalDataDisplay );
- }
-}
-
-void
-DataDisplay::do_Process( const ary::cpp::Variable & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- PageDisplay & rPage = FindPage_for( i_rData );
-
- csi::xml::Element & rOut = rPage.CurOut();
- Display_SglDatum( rOut, i_rData );
-}
-
-const ary::cpp::Gate *
-DataDisplay::inq_Get_ReFinder() const
-{
- return & pEnv->Gate();
-}
-
-PageDisplay &
-DataDisplay::FindPage_for( const ary::cpp::Variable & i_rData )
-{
- if ( pClassMembersDisplay )
- return *pClassMembersDisplay;
-
- SourceFileId
- nSourceFile = i_rData.Location();
- PageDisplay *
- pFound = csv::value_from_map( aMap_GlobalDataDisplay, nSourceFile, (PageDisplay*)0 );
- if ( pFound == 0 )
- {
- pFound = new PageDisplay( *pEnv );
- const ary::loc::File &
- rFile = pEnv->Gate().Locations().Find_File( nSourceFile );
- pFound->Setup_DataFile_for(rFile);
- aMap_GlobalDataDisplay[nSourceFile] = pFound;
- }
-
- return *pFound;
-}
-
-void
-DataDisplay::Display_SglDatum( csi::xml::Element & rOut,
- const ary::cpp::Variable & i_rData )
-{
- adcdisp::ExplanationList aDocu(rOut, true);
- aDocu.AddEntry( 0 );
-
- aDocu.Term()
- >> *new html::Label( DataLabel(i_rData.LocalName()) )
- << " ";
- aDocu.Term()
- << i_rData.LocalName();
-
- dshelp::Get_LinkedTypeText( aDocu.Def(), *pEnv, i_rData.Type() );
- aDocu.Def()
- << " "
- >> *new html::Strong
- << i_rData.LocalName();
- if ( i_rData.ArraySize().length() > 0 )
- {
- aDocu.Def()
- << "["
- << i_rData.ArraySize()
- << "]";
- }
- if ( i_rData.Initialisation().length() > 0 )
- {
- aDocu.Def()
- << " = "
- << i_rData.Initialisation();
- }
- aDocu.Def()
- << ";"
- << new html::LineBreak
- << new html::LineBreak;
-
- aDocu.AddEntry_NoTerm();
-
- pDocuShow->Assign_Out(aDocu.Def());
- pDocuShow->Process(i_rData.Docu());
- pDocuShow->Unassign_Out();
-
- rOut << new html::HorizontalLine;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/dsply_da.hxx b/autodoc/source/display/html/dsply_da.hxx
deleted file mode 100644
index a8d29fc2..00000000
--- a/autodoc/source/display/html/dsply_da.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_DSPLY_DA_HXX
-#define ADC_DISPLAY_HTML_DSPLY_DA_HXX
-
-// BASE CLASSES
-#include <ary/ary_disp.hxx>
-#include <cosv/tpl/processor.hxx>
-// USED SERVICES
-#include <ary/cpp/c_ce.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- class Variable;
- }
-}
-namespace csi
-{
- namespace xml
- {
- class Element;
- }
-}
-
-
-
-
-class OuputPage_Environment;
-class PageDisplay;
-class Docu_Display;
-
-class DataDisplay : public ary::Display,
- public csv::ConstProcessor<ary::cpp::Variable>
-{
- public:
- DataDisplay(
- OuputPage_Environment &
- io_rInfo );
- virtual ~DataDisplay();
-
- void PrepareForConstants();
- void PrepareForVariables();
- void PrepareForStdMembers();
- void PrepareForStaticMembers();
-
- void Create_Files();
-
- private:
- // Interface csv::ConstProcessor<>:
- virtual void do_Process(
- const ary::cpp::Variable &
- i_rData );
- // Interface ary::cpp::Display:
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
-
- // Locals
- typedef ary::cpp::Lid SourceFileId;
- typedef std::map< SourceFileId, DYN PageDisplay* > Map_FileId2PagePtr;
-
- PageDisplay & FindPage_for(
- const ary::cpp::Variable &
- i_rData );
- void Display_SglDatum(
- csi::xml::Element & rOut,
- const ary::cpp::Variable &
- i_rData );
- // DATA
- Map_FileId2PagePtr aMap_GlobalDataDisplay;
- Dyn<PageDisplay> pClassMembersDisplay;
-
- OuputPage_Environment *
- pEnv;
- Dyn<Docu_Display> pDocuShow;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/dsply_op.cxx b/autodoc/source/display/html/dsply_op.cxx
deleted file mode 100644
index dbbd1ac7..00000000
--- a/autodoc/source/display/html/dsply_op.cxx
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "dsply_op.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <udm/html/htmlitem.hxx>
-#include "hd_docu.hxx"
-#include "hdimpl.hxx"
-#include "html_kit.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-
-using namespace csi;
-using namespace adcdisp;
-
-
-
-
-OperationsDisplay::OperationsDisplay( OuputPage_Environment & io_rEnv )
- : // aMap_GlobalFunctionsDisplay,
- // pClassMembersDisplay,
- pEnv( &io_rEnv ),
- pDocuShow( new Docu_Display(io_rEnv) )
-{
-}
-
-OperationsDisplay::~OperationsDisplay()
-{
- csv::erase_map_of_heap_ptrs( aMap_GlobalFunctionsDisplay );
-}
-
-void
-OperationsDisplay::PrepareForStdMembers()
-{
- csv::erase_map_of_heap_ptrs( aMap_GlobalFunctionsDisplay );
-
- pClassMembersDisplay = new PageDisplay(*pEnv);
- const ary::cpp::Class * pClass = pEnv->CurClass();
- csv_assert( pClass != 0 );
- pClassMembersDisplay->Setup_OperationsFile_for(*pClass);
-}
-
-void
-OperationsDisplay::PrepareForStaticMembers()
-{
- // Doesn't need to do anything yet.
-}
-
-void
-OperationsDisplay::Create_Files()
-{
- if (pClassMembersDisplay)
- pClassMembersDisplay->Create_File();
- else
- {
- for ( Map_FileId2PagePtr::const_iterator it = aMap_GlobalFunctionsDisplay.begin();
- it != aMap_GlobalFunctionsDisplay.end();
- ++it )
- {
- (*it).second->Create_File();
- }
- }
-}
-
-void
-OperationsDisplay::do_Process( const ary::cpp::Function & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- PageDisplay & rPage = FindPage_for( i_rData );
-
- csi::xml::Element & rOut = rPage.CurOut();
- Display_SglOperation( rOut, i_rData );
-}
-
-const ary::cpp::Gate *
-OperationsDisplay::inq_Get_ReFinder() const
-{
- return & pEnv->Gate();
-}
-
-PageDisplay &
-OperationsDisplay::FindPage_for( const ary::cpp::Function & i_rData )
-{
- if ( pClassMembersDisplay )
- return *pClassMembersDisplay;
-
- SourceFileId
- nSourceFile = i_rData.Location();
- PageDisplay *
- pFound = csv::value_from_map( aMap_GlobalFunctionsDisplay, nSourceFile, (PageDisplay*)0 );
- if ( pFound == 0 )
- {
- pFound = new PageDisplay( *pEnv );
- const ary::loc::File &
- rFile = pEnv->Gate().Locations().Find_File( nSourceFile );
- pFound->Setup_OperationsFile_for(rFile);
- aMap_GlobalFunctionsDisplay[nSourceFile] = pFound;
- }
-
- return *pFound;
-}
-
-void
-OperationsDisplay::Display_SglOperation( csi::xml::Element & rOut,
- const ary::cpp::Function & i_rData )
-{
- adcdisp::ExplanationList aDocu(rOut, true);
- aDocu.AddEntry( 0 );
-
-
- adcdisp::OperationTitle fTitle;
- fTitle( aDocu.Term(),
- i_rData.LocalName(),
- i_rData.CeId(),
- pEnv->Gate() );
-
- // Syntax
- adcdisp::ExplanationList aSyntaxHeader(aDocu.Def());
- aSyntaxHeader.AddEntry( 0, "simple" );
- csi::xml::Element & rHeader = aSyntaxHeader.Term();
-
- adcdisp::ParameterTable
- aParams( aSyntaxHeader.Def() );
-
- if (i_rData.TemplateParameters().size() > 0)
- {
- TemplateClause fTemplateClause;
- fTemplateClause( rHeader, i_rData.TemplateParameters() );
- rHeader << new html::LineBreak;
- }
- if ( i_rData.Flags().IsExternC() )
- {
- rHeader
- << "extern \"C\""
- << new html::LineBreak;
- }
-
- bool bConst = false;
- bool bVolatile = false;
- WriteOut_LinkedFunctionText( rHeader, aParams, i_rData, *pEnv,
- &bConst, &bVolatile );
- aDocu.Def() << new html::LineBreak;
-
- // Flags
- aDocu.AddEntry_NoTerm();
- adcdisp::FlagTable
- aFlags( aDocu.Def(), 8 );
-
- const ary::cpp::FunctionFlags &
- rFFlags = i_rData.Flags();
- aFlags.SetColumn( 0, "virtual",
- i_rData.Virtuality() != ary::cpp::VIRTUAL_none );
- aFlags.SetColumn( 1, "abstract",
- i_rData.Virtuality() == ary::cpp::VIRTUAL_abstract );
- aFlags.SetColumn( 2, "const", bConst );
- aFlags.SetColumn( 3, "volatile", bVolatile );
- aFlags.SetColumn( 4, "template",
- i_rData.TemplateParameters().size() > 0 );
- aFlags.SetColumn( 5, "static",
- rFFlags.IsStaticLocal() OR rFFlags.IsStaticMember() );
- aFlags.SetColumn( 6, "inline",
- rFFlags.IsInline() );
- aFlags.SetColumn( 7, "C-linkage",
- rFFlags.IsExternC() );
- aDocu.Def() << new html::LineBreak;
-
- // Docu
- aDocu.AddEntry_NoTerm();
- pDocuShow->Assign_Out(aDocu.Def());
- pDocuShow->Process(i_rData.Docu());
- pDocuShow->Unassign_Out();
-
- rOut << new html::HorizontalLine;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/dsply_op.hxx b/autodoc/source/display/html/dsply_op.hxx
deleted file mode 100644
index 9367489f..00000000
--- a/autodoc/source/display/html/dsply_op.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_DSPLY_OP_HXX
-#define ADC_DISPLAY_HTML_DSPLY_OP_HXX
-
-// BASE CLASSES
-#include <ary/ary_disp.hxx>
-#include <cosv/tpl/processor.hxx>
-// USED SERVICES
-#include <ary/cpp/c_ce.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- class Function;
- }
-}
-namespace csi
-{
- namespace xml
- {
- class Element;
- }
-}
-
-class OuputPage_Environment;
-class PageDisplay;
-class Docu_Display;
-
-
-
-
-class OperationsDisplay : public ary::Display,
- public csv::ConstProcessor<ary::cpp::Function>
-{
- public:
- OperationsDisplay(
- OuputPage_Environment &
- io_rInfo );
- virtual ~OperationsDisplay();
-
- void PrepareForStdMembers();
- void PrepareForStaticMembers();
- void Create_Files();
-
- private:
- // Interface csv::ConstProcessor<>:
- virtual void do_Process(
- const ary::cpp::Function &
- i_rData );
- // Interface ary::Display:
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
-
- // Locals
- typedef ary::cpp::Lid SourceFileId;
- typedef std::map< SourceFileId, DYN PageDisplay* > Map_FileId2PagePtr;
-
- PageDisplay & FindPage_for(
- const ary::cpp::Function &
- i_rData );
- void Display_SglOperation(
- csi::xml::Element & rOut,
- const ary::cpp::Function &
- i_rData );
- // DATA
- Map_FileId2PagePtr aMap_GlobalFunctionsDisplay;
- Dyn<PageDisplay> pClassMembersDisplay;
-
- OuputPage_Environment *
- pEnv;
- Dyn<Docu_Display> pDocuShow;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/easywri.cxx b/autodoc/source/display/html/easywri.cxx
deleted file mode 100644
index 79ff4273..00000000
--- a/autodoc/source/display/html/easywri.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "easywri.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-using namespace csi::html;
-
-
-EasyWriter::EasyWriter()
-{
-}
-
-EasyWriter::~EasyWriter()
-{
-}
-
-void
-EasyWriter::Open_OutputNode( csi::xml::Element & io_rDestination )
-{
- aCurDestination.push(&io_rDestination);
-}
-
-void
-EasyWriter::Finish_OutputNode()
-{
- csv_assert( NOT aCurDestination.empty() );
- aCurDestination.pop();
-}
-
-csi::xml::Element &
-EasyWriter::Out()
-{
- csv_assert( aCurDestination.size() > 0);
- return *aCurDestination.top();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/easywri.hxx b/autodoc/source/display/html/easywri.hxx
deleted file mode 100644
index 53e56e3f..00000000
--- a/autodoc/source/display/html/easywri.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_EASYWRI_HXX
-#define ADC_DISPLAY_HTML_EASYWRI_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <estack.hxx>
- // PARAMETERS
-#include <udm/html/htmlitem.hxx>
-
-
-class EasyWriter
-{
- public:
- // LIFECYCLE
- EasyWriter();
- ~EasyWriter();
-
- // OPERATIONS
- /// Pushes csi::xml::Element on stack.
- void Open_OutputNode(
- csi::xml::Element & io_rDestination );
- /// Pops front csi::xml::Element from stack.
- void Finish_OutputNode();
-
- void Enter(
- csi::xml::Element & io_rDestination )
- { Open_OutputNode(io_rDestination); }
- void Leave() { Finish_OutputNode(); }
-
- // ACCESS
- csi::xml::Element & Out(); // CurOutputNode
-
- private:
- EStack< csi::xml::Element * >
- aCurDestination; // The front element is the currently used.
- // The later ones are the parents.
-};
-
-/*
-inline csi::xml::Element &
-EasyWriter::Out()
- { csv_assert( aCurDestination.size() > 0 );
- return *aCurDestination.top(); }
-*/
-
-// IMPLEMENTATION
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/hd_chlst.cxx b/autodoc/source/display/html/hd_chlst.cxx
deleted file mode 100644
index c537ac58..00000000
--- a/autodoc/source/display/html/hd_chlst.cxx
+++ /dev/null
@@ -1,592 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hd_chlst.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ceslot.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <ary/info/ci_attag.hxx>
-#include <ary/info/ci_text.hxx>
-#include <ary/info/all_dts.hxx>
-#include "hd_docu.hxx"
-#include "opageenv.hxx"
-#include "protarea.hxx"
-#include "strconst.hxx"
-
-
-using namespace csi;
-using html::Table;
-using html::TableRow;
-using html::TableCell;
-using html::Font;
-using html::SizeAttr;
-using html::BgColorAttr;
-using html::WidthAttr;
-
-
-const int ixPublic = 0;
-const int ixProtected = 1;
-const int ixPrivate = 2;
-
-struct ChildList_Display::S_AreaCo
-{
- public:
- ProtectionArea aArea;
- Area_Result * pResult;
-
- S_AreaCo(
- Area_Result & o_rResult,
- const char * i_sLabel,
- const char * i_sTitle );
- ~S_AreaCo();
-
- void PerformResult();
-
- private:
- csi::xml::Element & Out() { return pResult->rOut; }
-};
-
-
-const ary::info::DocuText &
-ShortDocu( const ary::cpp::CodeEntity & i_rCe )
-{
- static const ary::info::DocuText
- aNull_;
-
- const ary::doc::OldCppDocu *
- pInfo = dynamic_cast< const ary::doc::OldCppDocu* >( i_rCe.Docu().Data() );
- if (pInfo == 0)
- return aNull_;
-
- return pInfo->Short().CText();
-}
-
-
-ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv )
- : HtmlDisplay_Impl( io_rEnv ),
- pShortDocu_Display( new Docu_Display(io_rEnv) ),
- pActiveParentClass(0),
- pActiveParentEnum(0),
- // pSglArea,
- // aMemberAreas,
- peClassesFilter(0)
-{
-}
-
-ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv,
- const ary::cpp::Class & i_rClass )
- : HtmlDisplay_Impl( io_rEnv ),
- pShortDocu_Display( new Docu_Display(io_rEnv) ),
- pActiveParentClass(&i_rClass),
- pActiveParentEnum(0),
- // pSglArea,
- // aMemberAreas,
- peClassesFilter(0)
-{
-}
-
-ChildList_Display::ChildList_Display( OuputPage_Environment & io_rEnv,
- const ary::cpp::Enum & i_rEnum )
- : HtmlDisplay_Impl( io_rEnv ),
- pShortDocu_Display( new Docu_Display(io_rEnv) ),
- pActiveParentClass(0),
- pActiveParentEnum(&i_rEnum),
- // pSglArea,
- // aMemberAreas,
- peClassesFilter(0)
-{
-}
-
-ChildList_Display::~ChildList_Display()
-{
-}
-
-void
-ChildList_Display::Run_Simple( Area_Result & o_rResult,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel,
- const char * i_sListTitle )
-{
- ary::Slot_AutoPtr
- pSlot( ActiveParent().Create_Slot( i_nSlot ) );
- if ( pSlot->Size() == 0 )
- return;
-
- pSglArea = new S_AreaCo( o_rResult,
- i_sListLabel,
- i_sListTitle );
-
- pSlot->StoreAt(*this);
-
- pSglArea->PerformResult();
- pSglArea = 0;
-}
-
-void
-ChildList_Display::Run_GlobalClasses( Area_Result & o_rResult,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel,
- const char * i_sListTitle,
- ary::cpp::E_ClassKey i_eFilter )
-{
- ary::Slot_AutoPtr
- pSlot( ActiveParent().Create_Slot( i_nSlot ) );
- if ( pSlot->Size() == 0 )
- return;
-
- pSglArea = new S_AreaCo( o_rResult,
- i_sListLabel,
- i_sListTitle );
-
- SetClassesFilter(i_eFilter);
- pSlot->StoreAt(*this);
- UnsetClassesFilter();
-
- pSglArea->PerformResult();
- pSglArea = 0;
-}
-
-void
-ChildList_Display::Run_Members( Area_Result & o_rResult_public,
- Area_Result & o_rResult_protected,
- Area_Result & o_rResult_private,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel_public,
- const char * i_sListLabel_protected,
- const char * i_sListLabel_private,
- const char * i_sListTitle )
-{
- ary::Slot_AutoPtr
- pSlot( ActiveParent().Create_Slot(i_nSlot) );
- if ( pSlot->Size() == 0 )
- return;
-
- aMemberAreas[ixPublic] = new S_AreaCo( o_rResult_public,
- i_sListLabel_public,
- i_sListTitle );
- aMemberAreas[ixProtected] = new S_AreaCo( o_rResult_protected,
- i_sListLabel_protected,
- i_sListTitle );
- aMemberAreas[ixPrivate] = new S_AreaCo( o_rResult_private,
- i_sListLabel_private,
- i_sListTitle );
-
- pSlot->StoreAt(*this);
-
- aMemberAreas[ixPublic]->PerformResult();
- aMemberAreas[ixProtected]->PerformResult();
- aMemberAreas[ixPrivate]->PerformResult();
-
- aMemberAreas[ixPublic] = 0;
- aMemberAreas[ixProtected] = 0;
- aMemberAreas[ixPrivate] = 0;
-}
-
-void
-ChildList_Display::Run_MemberClasses( Area_Result & o_rResult_public,
- Area_Result & o_rResult_protected,
- Area_Result & o_rResult_private,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel_public,
- const char * i_sListLabel_protected,
- const char * i_sListLabel_private,
- const char * i_sListTitle,
- ary::cpp::E_ClassKey i_eFilter )
-{
- ary::Slot_AutoPtr
- pSlot( ActiveParent().Create_Slot(i_nSlot) );
- if ( pSlot->Size() == 0 )
- return;
-
- aMemberAreas[ixPublic] = new S_AreaCo( o_rResult_public,
- i_sListLabel_public,
- i_sListTitle );
- aMemberAreas[ixProtected] = new S_AreaCo( o_rResult_protected,
- i_sListLabel_protected,
- i_sListTitle );
- aMemberAreas[ixPrivate] = new S_AreaCo( o_rResult_private,
- i_sListLabel_private,
- i_sListTitle );
-
- SetClassesFilter(i_eFilter);
- pSlot->StoreAt(*this);
- UnsetClassesFilter();
-
- aMemberAreas[ixPublic]->PerformResult();
- aMemberAreas[ixProtected]->PerformResult();
- aMemberAreas[ixPrivate]->PerformResult();
-
- aMemberAreas[ixPublic] = 0;
- aMemberAreas[ixProtected] = 0;
- aMemberAreas[ixPrivate] = 0;
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::Namespace & i_rData )
-{
- Write_ListItem( i_rData.LocalName(),
- Path2ChildNamespace(i_rData.LocalName()),
- ShortDocu( i_rData ),
- GetArea().GetTable() );
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::Class & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- if (peClassesFilter)
- {
- if (*peClassesFilter != i_rData.ClassKey() )
- return;
- }
-
- String sLink;
- if ( i_rData.Protection() == ary::cpp::PROTECT_global )
- {
- sLink = ClassFileName(i_rData.LocalName());
-
- }
- else
- {
- csv_assert( pActiveParentClass != 0 );
- sLink = Path2Child( ClassFileName(i_rData.LocalName()), pActiveParentClass->LocalName() );
- }
-
- if (peClassesFilter)
- {
- Write_ListItem( i_rData.LocalName(),
- sLink,
- ShortDocu( i_rData ),
- GetArea(i_rData.Protection())
- .GetTable() );
- }
- else
- {
- Write_ListItem( i_rData.LocalName(),
- sLink,
- ShortDocu( i_rData ),
- GetArea(i_rData.Protection())
- .GetTable(i_rData.ClassKey()) );
- }
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::Enum & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- String sLink;
- if ( i_rData.Protection() == ary::cpp::PROTECT_global )
- {
- sLink = EnumFileName(i_rData.LocalName());
- }
- else
- {
- csv_assert( pActiveParentClass != 0 );
- sLink = Path2Child( EnumFileName(i_rData.LocalName()),
- pActiveParentClass->LocalName() );
- }
-
- Write_ListItem( i_rData.LocalName(),
- sLink,
- ShortDocu( i_rData ),
- GetArea(i_rData.Protection()).GetTable() );
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::Typedef & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- String sLink;
- if ( i_rData.Protection() == ary::cpp::PROTECT_global )
- {
- sLink = TypedefFileName(i_rData.LocalName());
- }
- else
- {
- csv_assert( pActiveParentClass != 0 );
- sLink = Path2Child( TypedefFileName(i_rData.LocalName()),
- pActiveParentClass->LocalName() );
- }
-
- Write_ListItem( i_rData.LocalName(),
- sLink,
- ShortDocu( i_rData ),
- GetArea(i_rData.Protection()).GetTable() );
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::Function & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- String sLinkPrePath;
- if ( i_rData.Protection() == ary::cpp::PROTECT_global )
- {
- const ary::loc::File &
- rFile = Env().Gate().Locations().Find_File( i_rData.Location() );
- sLinkPrePath = HtmlFileName( "o-", rFile.LocalName() );
- }
- else
- {
- csv_assert( pActiveParentClass != 0 );
- sLinkPrePath = Path2Child( HtmlFileName( "o", "" ),
- pActiveParentClass->LocalName() );
- }
-
- // Out
- Table & rOut = GetArea(i_rData.Protection()).GetTable();
- TableRow * dpRow = new TableRow;
- rOut << dpRow;
- TableCell & rCell1 = dpRow->AddCell();
-
- rCell1
- << SyntaxText_PreName( i_rData, Env().Gate() )
- << new html::LineBreak;
- rCell1
- >> *new html::Link( OperationLink(
- Env().Gate(),
- i_rData.LocalName(),
- i_rData.CeId(),
- sLinkPrePath) )
- << i_rData.LocalName();
- rCell1
- << SyntaxText_PostName( i_rData, Env().Gate() );
- TableCell &
- rCell2 = dpRow->AddCell();
- rCell2
- << new WidthAttr("50%")
- << " ";
-
- pShortDocu_Display->Assign_Out( rCell2 );
- ShortDocu( i_rData ).StoreAt( *pShortDocu_Display );
- pShortDocu_Display->Unassign_Out();
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::Variable & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- String sLinkPrePath;
- if ( i_rData.Protection() == ary::cpp::PROTECT_global )
- {
- const ary::loc::File &
- rFile = Env().Gate().Locations().Find_File( i_rData.Location() );
- sLinkPrePath = HtmlFileName( "d-", rFile.LocalName() );
- }
- else
- {
- csv_assert( pActiveParentClass != 0 );
- sLinkPrePath = Path2Child( HtmlFileName( "d", "" ),
- pActiveParentClass->LocalName() );
- }
-
- TableRow * dpRow = new TableRow;
- GetArea(i_rData.Protection()).GetTable() << dpRow;
-
- *dpRow << new html::BgColorAttr("white");
- csi::xml::Element &
- rCell1 = dpRow->AddCell();
-
- dshelp::Get_LinkedTypeText( rCell1, Env(), i_rData.Type() );
- rCell1
- << " "
- >> *new html::Link( DataLink(i_rData.LocalName(), sLinkPrePath.c_str()) )
- >> *new html::Strong
- << i_rData.LocalName()
- << ";";
-
- TableCell & rShortDocu = dpRow->AddCell();
- pShortDocu_Display->Assign_Out( rShortDocu );
- ShortDocu( i_rData ).StoreAt( *pShortDocu_Display );
- pShortDocu_Display->Unassign_Out();
-}
-
-void
-ChildList_Display::do_Process( const ary::cpp::EnumValue & i_rData )
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- Table & rOut = GetArea().GetTable();
-
- TableRow * dpRow = new TableRow;
- rOut << dpRow;
-
- *dpRow << new html::BgColorAttr("white");
- dpRow->AddCell()
- << new WidthAttr("20%")
- << new xml::AnAttribute("valign", "top")
- >> *new html::Label(i_rData.LocalName())
- >> *new html::Bold
- << i_rData.LocalName();
-
- TableCell & rValueDocu = dpRow->AddCell();
- pShortDocu_Display->Assign_Out( rValueDocu );
- i_rData.Docu().Accept( *pShortDocu_Display );
- pShortDocu_Display->Unassign_Out();
-}
-
-void
-ChildList_Display::do_StartSlot()
-{
-}
-
-void
-ChildList_Display::do_FinishSlot()
-{
-}
-
-const ary::cpp::Gate *
-ChildList_Display::inq_Get_ReFinder() const
-{
- return & Env().Gate();
-}
-
-void
-ChildList_Display::Write_ListItem( const String & i_sLeftText,
- const char * i_sLink,
- const ary::info::DocuText & i_rRightText,
- csi::xml::Element & o_rOut )
-{
- TableRow * dpRow = new TableRow;
- o_rOut << dpRow;
-
- *dpRow << new html::BgColorAttr("white");
- dpRow->AddCell()
- << new WidthAttr("20%")
- >> *new html::Link( i_sLink )
- >> *new html::Bold
- << i_sLeftText;
-
- TableCell & rShortDocu = dpRow->AddCell();
- pShortDocu_Display->Assign_Out( rShortDocu );
- i_rRightText.StoreAt( *pShortDocu_Display );
- pShortDocu_Display->Unassign_Out();
-}
-
-const ary::AryGroup &
-ChildList_Display::ActiveParent()
-{
- return pActiveParentClass != 0
- ? static_cast< const ary::AryGroup& >(*pActiveParentClass)
- : pActiveParentEnum != 0
- ? static_cast< const ary::AryGroup& >(*pActiveParentEnum)
- : static_cast< const ary::AryGroup& >(*Env().CurNamespace());
-}
-
-ProtectionArea &
-ChildList_Display::GetArea()
-{
- return pSglArea->aArea;
-}
-
-ProtectionArea &
-ChildList_Display::GetArea( ary::cpp::E_Protection i_eProtection )
-{
- switch ( i_eProtection )
- {
- case ary::cpp::PROTECT_public:
- return aMemberAreas[ixPublic]->aArea;
- case ary::cpp::PROTECT_protected:
- return aMemberAreas[ixProtected]->aArea;
- case ary::cpp::PROTECT_private:
- return aMemberAreas[ixPrivate]->aArea;
- default:
- return pSglArea->aArea;
- }
-}
-
-
-//******************* ********************//
-
-ChildList_Display::
-S_AreaCo::S_AreaCo( Area_Result & o_rResult,
- const char * i_sLabel,
- const char * i_sTitle )
- : aArea(i_sLabel, i_sTitle),
- pResult(&o_rResult)
-{
-}
-
-ChildList_Display::
-S_AreaCo::~S_AreaCo()
-{
-}
-
-void
-ChildList_Display::
-S_AreaCo::PerformResult()
-{
- bool bUsed = aArea.WasUsed_Area();
- pResult->rChildrenExist = bUsed;
- if ( bUsed )
- {
- Create_ChildListLabel( Out(), aArea.Label() );
-
- if ( aArea.Size() == 1 )
- {
- Out() << aArea.ReleaseTable();
- }
- else
- {
- Table * pTable = aArea.ReleaseTable( ary::cpp::CK_class );
- if (pTable != 0)
- Out() << pTable;
- pTable = aArea.ReleaseTable( ary::cpp::CK_struct );
- if (pTable != 0)
- Out() << pTable;
- pTable = aArea.ReleaseTable( ary::cpp::CK_union );
- if (pTable != 0)
- Out() << pTable;
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/hd_chlst.hxx b/autodoc/source/display/html/hd_chlst.hxx
deleted file mode 100644
index 5cb38875..00000000
--- a/autodoc/source/display/html/hd_chlst.hxx
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_HD_CHLST_HXX
-#define ADC_DISPLAY_HTML_HD_CHLST_HXX
-
-// BASE CLASSES
-#include <ary/ary_disp.hxx>
-#include <cosv/tpl/processor.hxx>
-
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-#include "hdimpl.hxx"
-
-
-
-namespace ary
-{
- namespace cpp
- {
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- class Function;
- class Variable;
- class EnumValue;
- }
- namespace info
- {
- class DocuText;
- }
-}
-
-class Docu_Display;
-class ProtectionArea;
-
-class ChildList_Display : public ary::Display,
- public csv::ConstProcessor<ary::cpp::Namespace>,
- public csv::ConstProcessor<ary::cpp::Class>,
- public csv::ConstProcessor<ary::cpp::Enum>,
- public csv::ConstProcessor<ary::cpp::Typedef>,
- public csv::ConstProcessor<ary::cpp::Function>,
- public csv::ConstProcessor<ary::cpp::Variable>,
- public csv::ConstProcessor<ary::cpp::EnumValue>,
- private HtmlDisplay_Impl
-{
- public:
- struct Area_Result
- {
- bool & rChildrenExist;
- csi::xml::Element & rOut;
-
- Area_Result(
- bool & o_rChildrenExist,
- csi::xml::Element & o_rOut )
- : rChildrenExist(o_rChildrenExist),
- rOut(o_rOut) {}
- };
-
-
- ChildList_Display(
- OuputPage_Environment &
- io_rEnv );
- ChildList_Display(
- OuputPage_Environment &
- io_rEnv,
- const ary::cpp::Class &
- i_rClass );
- ChildList_Display(
- OuputPage_Environment &
- io_rEnv,
- const ary::cpp::Enum &
- i_rEnum );
-
- virtual ~ChildList_Display();
-
- void Run_Simple(
- Area_Result & o_rResult,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel,
- const char * i_sListTitle );
- void Run_GlobalClasses(
- Area_Result & o_rResult,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel,
- const char * i_sListTitle,
- ary::cpp::E_ClassKey
- i_eFilter );
- void Run_Members(
- Area_Result & o_rResult_public,
- Area_Result & o_rResult_protected,
- Area_Result & o_rResult_private,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel_public,
- const char * i_sListLabel_protected,
- const char * i_sListLabel_private,
- const char * i_sListTitle );
- void Run_MemberClasses(
- Area_Result & o_rResult_public,
- Area_Result & o_rResult_protected,
- Area_Result & o_rResult_private,
- ary::SlotAccessId i_nSlot,
- const char * i_sListLabel_public,
- const char * i_sListLabel_protected,
- const char * i_sListLabel_private,
- const char * i_sListTitle,
- ary::cpp::E_ClassKey
- i_eFilter );
- private:
- // Interface csv::ConstProcessor<>:
- virtual void do_Process(
- const ary::cpp::Namespace &
- i_rData );
- /** i_rData is shown only, if it passes two filters:
- it must have the right protection, checked with pFilter,
- and the right class key (class,struct,union), checked with
- pClassFilter. A not exsting filter allows i_rData to be
- displayed.
- */
- virtual void do_Process(
- const ary::cpp::Class &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Enum &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Typedef &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Function &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Variable &
- i_rData );
- virtual void do_Process(
- const ary::cpp::EnumValue &
- i_rData );
- private:
- // Interface ary::Display:
- virtual void do_StartSlot();
- virtual void do_FinishSlot();
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
- // Locals
- struct S_AreaCo;
- void Write_ListItem(
- const String & i_sLeftText,
- const char * i_sLink,
- const ary::info::DocuText &
- i_rRightText,
- csi::xml::Element & rOut );
- const ary::AryGroup &
- ActiveParent();
- ProtectionArea & GetArea();
- ProtectionArea & GetArea(
- ary::cpp::E_Protection
- i_eProtection );
- void SetClassesFilter(
- ary::cpp::E_ClassKey
- i_eFilter )
- { peClassesFilter = new ary::cpp::E_ClassKey(i_eFilter); }
- void UnsetClassesFilter() { peClassesFilter = 0; }
-
- // DATA
- Dyn<Docu_Display> pShortDocu_Display;
- const ary::cpp::Class *
- pActiveParentClass;
- const ary::cpp::Enum *
- pActiveParentEnum;
-
- Dyn<S_AreaCo> pSglArea;
- Dyn<S_AreaCo> aMemberAreas[3];
-
- Dyn<ary::cpp::E_ClassKey>
- peClassesFilter;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/hd_docu.cxx b/autodoc/source/display/html/hd_docu.cxx
deleted file mode 100644
index 29265734..00000000
--- a/autodoc/source/display/html/hd_docu.cxx
+++ /dev/null
@@ -1,486 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hd_docu.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <ary/info/all_tags.hxx>
-#include <ary/info/all_dts.hxx>
-#include <adc_cl.hxx>
-#include "html_kit.hxx"
-#include "opageenv.hxx"
-
-
-
-using namespace ary::info;
-using namespace csi;
-
-using html::DefList;
-using html::DefListTerm;
-using html::DefListDefinition;
-using html::Headline;
-using html::Link;
-
-
-const char *
-C_sTagHeadlines[ ary::info::C_eAtTag_NrOfClasses ] =
- {
- "ATTENTION!", "Author", "Changes", "Collaborators",
- "Contact", // Contact may be unused
- "Copyright", "Deprecated", "Description", "Date of Documentation",
- "How to Derive from this Class",
- "Heap object - owner is responsible for deletion.",
- "Important Instances",
- "Interface Only",
- "Invariant", "Lifecycle",
- "Multiplicity", "On Error", "Persistency", "Postcondition",
- "Precondition",
- "Responsibilities",
- "Return", "Summary", "Todos", "Version",
- "Base Classes", "Exceptions", "Implements", "Keywords", "Parameters",
- "See Also", "Template Parameters",
- "", "Since "
- };
-
-
-
-Docu_Display::Docu_Display( OuputPage_Environment & io_rEnv )
- : HtmlDisplay_Impl(io_rEnv),
- bUseHtmlInDocuTokens(false),
- pCurClassOverwrite(0)
-{
-}
-
-Docu_Display::~Docu_Display()
-{
-}
-
-void
-Docu_Display::Assign_Out( csi::xml::Element & o_rOut )
-{
- Easy().Enter(o_rOut);
-}
-
-void
-Docu_Display::Unassign_Out()
-{
- Easy().Leave();
-}
-
-void
-Docu_Display::do_Process( const ary::cpp::Namespace & i_rData )
-{
- Process(i_rData.Docu());
-}
-
-void
-Docu_Display::do_Process( const ary::cpp::Class & i_rData )
-{
- pCurClassOverwrite = &i_rData;
- Process(i_rData.Docu());
- pCurClassOverwrite = 0;
-}
-
-void
-Docu_Display::do_Process( const ary::cpp::Enum & i_rData )
-{
- Process(i_rData.Docu());
-}
-
-void
-Docu_Display::do_Process( const ary::cpp::Typedef & i_rData )
-{
- Process(i_rData.Docu());
-}
-
-void
-Docu_Display::do_Process( const ary::cpp::Function & i_rData )
-{
- Process(i_rData.Docu());
-}
-
-void
-Docu_Display::do_Process( const ary::cpp::Variable & i_rData )
-{
- Process(i_rData.Docu());
-}
-
-
-
-// -------------- Interface ary::info::DocuDisplay ------------------ //
-
-
-void
-Docu_Display::do_Process(const ary::doc::Documentation & i_rData)
-{
- if (i_rData.Data() == 0)
- return;
-
- const ary::doc::OldCppDocu *
- docdata = dynamic_cast< const ary::doc::OldCppDocu* >(i_rData.Data());
- csv_assert(docdata != 0);
-
- Start_DocuBlock();
-
- if ( docdata->IsObsolete() )
- {
- CurOut()
- >> *new html::DefListTerm
- >> *new html::Strong
- << "D E P R E C A T E D";
-
- }
-
- ary::doc::OldCppDocu::TagList::const_iterator
- itEnd = docdata->Tags().end();
- for ( ary::doc::OldCppDocu::TagList::const_iterator it = docdata->Tags().begin();
- it != itEnd;
- ++it )
- {
- (*it)->StoreAt( *this );
- }
-
- Finish_DocuBlock();
-}
-
-void
-Docu_Display::Display_StdTag( const StdTag & i_rData )
-{
- const ary::info::DocuText::TokenList &
- rText = i_rData.CText().Tokens();
- typedef ary::info::DocuText::TokenList::const_iterator TokenIterator;
-
- if ( rText.empty() )
- return;
- else if ( rText.size() < 3 )
- {
- bool bIsWhite = true;
- for ( TokenIterator it = rText.begin();
- it != rText.end();
- ++it )
- {
- if (bIsWhite)
- bIsWhite = (*it)->IsWhite();
- }
- if (bIsWhite)
- return;
- }
-
- Write_TagTitle( C_sTagHeadlines[i_rData.Std_Id()] );
- Write_TagContents( i_rData.CText() );
-}
-
-void
-Docu_Display::Display_BaseTag( const BaseTag & )
-{
-}
-
-void
-Docu_Display::Display_ExceptionTag( const ExceptionTag & )
-{
-}
-
-void
-Docu_Display::Display_ImplementsTag( const ImplementsTag & )
-{
-}
-
-void
-Docu_Display::Display_KeywordTag( const KeywordTag & )
-{
-}
-
-void
-Docu_Display::Display_ParameterTag( const ParameterTag & i_rData )
-{
- Write_TagTitle( "Parameters" );
-
- adcdisp::ExplanationTable
- aParams( CurOut() >> *new DefListDefinition );
-
- for ( const ParameterTag * pParam = &i_rData;
- pParam != 0;
- pParam = pParam->GetNext() ) // KORR_FUTURE
- {
- aParams.AddEntry( pParam->ParamName().c_str() );
-
- Easy().Enter( aParams.Def() );
- Write_Text( pParam->CText() );
- Easy().Leave();
- } // end for
-}
-
-void
-Docu_Display::Display_SeeTag( const SeeTag & i_rData )
-{
- Write_TagTitle( "See Also" );
-
- DefListDefinition * dpDef = new DefListDefinition;
- CurOut() << dpDef;
- Easy().Enter(*dpDef);
-
- for ( std::vector< ary::QualifiedName >::const_iterator
- it = i_rData.References().begin();
- it != i_rData.References().end();
- ++it )
- {
- Write_LinkableText( (*it) );
- CurOut() << new html::LineBreak;
- }
-
- Easy().Leave();
-}
-
-void
-Docu_Display::Display_TemplateTag( const TemplateTag & i_rData )
-{
- Write_TagTitle( "Template Parameters" );
-
- adcdisp::ExplanationTable
- aTplParams( CurOut() >> *new DefListDefinition );
-
- for ( const TemplateTag * pTplParam = &i_rData;
- pTplParam != 0;
- pTplParam = pTplParam->GetNext() )
- {
- aTplParams.AddEntry( pTplParam->TplParamName().c_str() );
-
- Easy().Enter( aTplParams.Def() );
- Write_Text( pTplParam->CText() );
- Easy().Leave();
- } // end for
-}
-
-void
-Docu_Display::Display_LabelTag( const LabelTag & )
-{
-}
-
-void
-Docu_Display::Display_SinceTag( const ary::info::SinceTag & i_rData )
-{
- if ( i_rData.Version().empty() )
- {
- return;
- }
-
- // Transform the value of the @since tag into the text to be displayed.
- String sDisplay;
- if ( autodoc::CommandLine::Get_().DoesTransform_SinceTag() )
- {
- sDisplay = autodoc::CommandLine::Get_()
- .DisplayOf_SinceTagValue( i_rData.Version() );
- }
- else
- {
- sDisplay = i_rData.Version();
- }
-
- if (sDisplay.empty())
- return;
-
- Write_TagTitle( "Since " );
-
- DefListDefinition * dpDef = new DefListDefinition;
- CurOut() << dpDef;
-
- Easy().Enter(*dpDef);
- CurOut() << sDisplay;
- Easy().Leave();
-}
-
-void
-Docu_Display::Display_DT_Text( const DT_Text & i_rData )
-{
- Write_TextToken( i_rData.Text() );
-}
-
-void
-Docu_Display::Display_DT_MaybeLink( const DT_MaybeLink & i_rData )
-{
- // KORR_FUTURE
- Write_TextToken( i_rData.Text() );
-}
-
-void
-Docu_Display::Display_DT_Whitespace( const DT_Whitespace & i_rData )
-{
- static char sSpace[300] =
- " "
- " "
- " "
- " "
- " "
- " ";
- UINT8 nLength = i_rData.Length();
- sSpace[nLength] = NULCH;
- CurOut() << sSpace;
- sSpace[nLength] = ' ';
-}
-
-void
-Docu_Display::Display_DT_Eol( const DT_Eol & )
-{
- CurOut() << new html::Sbr;
-}
-
-void
-Docu_Display::Display_DT_Xml( const ary::info::DT_Xml & i_rData )
-{
- CurOut() << new xml::XmlCode( i_rData.Text() );
-}
-
-const ary::cpp::Gate *
-Docu_Display::inq_Get_ReFinder() const
-{
- return &Env().Gate();
-}
-
-void
-Docu_Display::Start_DocuBlock()
-{
- DYN DefList * dpDefList = new DefList;
- CurOut() << dpDefList;
- Easy().Enter( *dpDefList );
-}
-
-void
-Docu_Display::Finish_DocuBlock()
-{
- Easy().Leave();
-}
-
-void
-Docu_Display::Write_TagTitle( const char * i_sText,
- const char * )
-{
- if ( strcmp(i_sText,"ATTENTION!") == 0 )
- {
- CurOut()
- >> *new html::DefListTerm
- << new html::ClassAttr("attention")
- << i_sText;
- }
- else
- {
- CurOut()
- >> *new html::DefListTerm
- << i_sText;
- }
-}
-
-void
-Docu_Display::Write_TagContents( const DocuText & i_rDocuText )
-{
- DefListDefinition * dpDef = new DefListDefinition;
- CurOut() << dpDef;
-
- Easy().Enter(*dpDef);
- Write_Text(i_rDocuText);
- Easy().Leave();
-}
-
-void
-Docu_Display::Write_Text( const ary::info::DocuText & i_rDocuText )
-{
- if ( i_rDocuText.IsNoHtml() )
- {
- CurOut()
- << new xml::XmlCode("<pre>");
- bUseHtmlInDocuTokens = false;
- }
- else
- {
- bUseHtmlInDocuTokens = true;
- }
- i_rDocuText.StoreAt( *this );
- if ( i_rDocuText.IsNoHtml() )
- {
- CurOut()
- << new xml::XmlCode("</pre>");
- }
-}
-
-void
-Docu_Display::Write_TextToken( const String & i_sText )
-{
- if ( bUseHtmlInDocuTokens )
- CurOut() << new xml::XmlCode(i_sText);
- else
- CurOut() << i_sText;
-}
-
-void
-Docu_Display::Write_LinkableText( const ary::QualifiedName & i_sQuName )
-{
- const ary::cpp::CodeEntity *
- pCe = FindUnambiguousCe( Env(), i_sQuName, pCurClassOverwrite );
- if ( pCe != 0 )
- {
- csi::xml::Element *
- pLink = new csi::html::Link( Link2Ce(Env(), *pCe) );
- CurOut() << pLink;
- Easy().Enter(*pLink);
- Write_QualifiedName(i_sQuName);
- Easy().Leave();
- }
- else
- {
- Write_QualifiedName(i_sQuName);
- }
- CurOut() << " ";
-}
-
-void
-Docu_Display::Write_QualifiedName( const ary::QualifiedName & i_sQuName )
-{
- if ( i_sQuName.IsAbsolute() )
- CurOut() << "::";
- for ( ary::QualifiedName::namespace_iterator it = i_sQuName.first_namespace();
- it != i_sQuName.end_namespace();
- ++it )
- {
- CurOut() << (*it) << "::";
- }
- CurOut() << i_sQuName.LocalName();
- if ( i_sQuName.IsFunction() )
- CurOut() << "()";
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/hd_docu.hxx b/autodoc/source/display/html/hd_docu.hxx
deleted file mode 100644
index 3ea2c93a..00000000
--- a/autodoc/source/display/html/hd_docu.hxx
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_HD_DOCU_HXX
-#define ADC_DISPLAY_HTML_HD_DOCU_HXX
-
-// BASE CLASSES
-#include <ary/ary_disp.hxx>
-#include <ary/info/infodisp.hxx>
-#include <cosv/tpl/processor.hxx>
-#include "hdimpl.hxx"
-
-namespace ary
-{
- namespace cpp
- {
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- class Function;
- class Variable;
- }
-
- namespace doc
- {
- class Documentation;
- }
- namespace info
- {
- class DocuText;
- }
-
- class QualifiedName;
-}
-
-class OuputPage_Environment;
-
-
-class Docu_Display : public ary::Display,
- public csv::ConstProcessor<ary::cpp::Namespace>,
- public csv::ConstProcessor<ary::cpp::Class>,
- public csv::ConstProcessor<ary::cpp::Enum>,
- public csv::ConstProcessor<ary::cpp::Typedef>,
- public csv::ConstProcessor<ary::cpp::Function>,
- public csv::ConstProcessor<ary::cpp::Variable>,
- public csv::ConstProcessor<ary::doc::Documentation>,
- public ary::info::DocuDisplay,
- private HtmlDisplay_Impl
-{
- public:
- Docu_Display(
- OuputPage_Environment &
- io_rEnv );
- virtual ~Docu_Display();
-
- void Assign_Out(
- csi::xml::Element & o_rOut );
- void Unassign_Out();
-
- virtual void Display_StdTag(
- const ary::info::StdTag &
- i_rData );
- virtual void Display_BaseTag(
- const ary::info::BaseTag &
- i_rData );
- virtual void Display_ExceptionTag(
- const ary::info::ExceptionTag &
- i_rData );
- virtual void Display_ImplementsTag(
- const ary::info::ImplementsTag &
- i_rData );
- virtual void Display_KeywordTag(
- const ary::info::KeywordTag &
- i_rData );
- virtual void Display_ParameterTag(
- const ary::info::ParameterTag &
- i_rData );
- virtual void Display_SeeTag(
- const ary::info::SeeTag &
- i_rData );
- virtual void Display_TemplateTag(
- const ary::info::TemplateTag &
- i_rData );
- virtual void Display_LabelTag(
- const ary::info::LabelTag &
- i_rData );
- virtual void Display_SinceTag(
- const ary::info::SinceTag &
- i_rData );
-
- virtual void Display_DT_Text(
- const ary::info::DT_Text &
- i_rData );
- virtual void Display_DT_MaybeLink(
- const ary::info::DT_MaybeLink &
- i_rData );
- virtual void Display_DT_Whitespace(
- const ary::info::DT_Whitespace &
- i_rData );
- virtual void Display_DT_Eol(
- const ary::info::DT_Eol &
- i_rData );
- virtual void Display_DT_Xml(
- const ary::info::DT_Xml &
- i_rData );
-
- using csv::ConstProcessor<ary::doc::Documentation>::Process;
-
- private:
- // Interface csv::ConstProcessor<>:
- virtual void do_Process(
- const ary::cpp::Namespace &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Class &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Enum &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Typedef &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Function &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Variable &
- i_rData );
- virtual void do_Process(
- const ary::doc::Documentation &
- i_rData );
- // Interface ary::Display:
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
- // Locals
- void Start_DocuBlock();
- void Finish_DocuBlock();
-
- void Write_TagTitle(
- const char * i_sText,
- const char * i_nFontSize = "+0" );
- void Write_TagContents(
- const ary::info::DocuText &
- i_rDocuText );
- void Write_Text(
- const ary::info::DocuText &
- i_rDocuText );
- void Write_TextToken(
- const String & i_sText );
- void Write_LinkableText(
- const ary::QualifiedName &
- i_sQuName );
- void Write_QualifiedName(
- const ary::QualifiedName &
- i_sQuName );
-
- // DATA
- bool bUseHtmlInDocuTokens;
-
- /** This is used, if a class documentation is displayed,
- because for links to members then the "current class"
- is not the parent, but this class itself.
- */
- const ary::cpp::Class *
- pCurClassOverwrite;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/hdimpl.cxx b/autodoc/source/display/html/hdimpl.cxx
deleted file mode 100644
index dd5a787d..00000000
--- a/autodoc/source/display/html/hdimpl.cxx
+++ /dev/null
@@ -1,549 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hdimpl.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <stdlib.h>
-#include <stdio.h>
-#include <ary/ceslot.hxx>
-#include <ary/qualiname.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_de.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <udm/html/htmlitem.hxx>
-#include "cre_link.hxx"
-#include "hd_docu.hxx"
-#include "html_kit.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-#include "strconst.hxx"
-
-
-using namespace csi;
-
-
-//******************** HtmlDisplay_Impl *********************//
-
-HtmlDisplay_Impl::~HtmlDisplay_Impl()
-{
-}
-
-HtmlDisplay_Impl::HtmlDisplay_Impl( OuputPage_Environment & io_rEnv )
- : pEnv(&io_rEnv)
- // aWriteHelper
-{
-}
-
-
-//******************** Free Functions *********************//
-
-
-
-namespace dshelp
-{
-
-void
-DisplaySlot( ary::Display & o_rDisplay,
- const ary::AryGroup & i_rGroup,
- ary::SlotAccessId i_nSlot )
-{
- ary::Slot_AutoPtr pSlot( i_rGroup.Create_Slot(i_nSlot) );
- pSlot->StoreAt( o_rDisplay );
-}
-
-
-const char *
-PathUp( uintt i_nLevels )
-{
- static char sResult[300];
-
- sResult[0] = NULCH;
- for ( uintt lev = 0; lev < i_nLevels; ++lev )
- {
- strcat( sResult, "../"); // SAFE STRCAT (#100211# - checked)
- }
- return sResult;
-}
-
-const char *
-PathPerLevelsUp( uintt i_nLevels,
- const char * i_nPathBelowDestinationLevel )
-{
- static char sResult[500];
- strcpy( sResult, PathUp(i_nLevels) ); // SAFE STRCPY (#100211# - checked)
- // KORR_FUTURE: Make it still safer here:
- strcat( sResult, i_nPathBelowDestinationLevel ); // SAFE STRCAT (#100211# - checked)
- return sResult;
-}
-
-
-const char *
-PathPerRoot( const OuputPage_Environment & i_rEnv,
- const char * i_sPathFromRootDir )
-{
- return PathPerLevelsUp( i_rEnv.Depth(), i_sPathFromRootDir );
-}
-
-const char *
-PathPerNamespace( const OuputPage_Environment & i_rEnv,
- const char * i_sPathFromNamespaceDir )
-{
- const ary::cpp::Namespace * pNsp = i_rEnv.CurNamespace();
- if ( pNsp == 0 )
- return "";
-
- uintt nCount = i_rEnv.Depth() - (pNsp->Depth() + 1) ;
- csv_assert( nCount < 100 );
- return PathPerLevelsUp( nCount, i_sPathFromNamespaceDir );
-}
-
-const char *
-HtmlFileName( const char * i_sPrefix,
- const char * i_sEntityName )
-{
- // KORR_FUTURE: Make it still safer here:
- static char sResult[300];
- strcpy( sResult, i_sPrefix ); // SAFE STRCPY (#100211# - checked)
- strcat( sResult, i_sEntityName ); // SAFE STRCAT (#100211# - checked)
- strcat( sResult, ".html" ); // SAFE STRCAT (#100211# - checked)
- return sResult;
-}
-
-const char *
-Path2Class( uintt i_nLevelsUp,
- const char * i_sClassLocalName )
-{
- return PathPerLevelsUp( i_nLevelsUp, ClassFileName(i_sClassLocalName) );
-}
-
-const char *
-Path2Child( const char * i_sFileName,
- const char * i_sSubDir )
-{
- static char sResult[400];
- if ( i_sSubDir != 0 )
- {
- // KORR_FUTURE: Make it still safer here:
- strcpy( sResult, i_sSubDir ); // SAFE STRCPY (#100211# - checked)
- strcat( sResult, "/" ); // SAFE STRCAT (#100211# - checked)
- }
- else
- {
- sResult[0] = NULCH;
- }
-
- strcat( sResult, i_sFileName ); // SAFE STRCAT (#100211# - checked)
- return sResult;
-}
-
-const char *
-Path2ChildNamespace( const char * i_sLocalName )
-{
- return Path2Child( C_sHFN_Namespace, i_sLocalName );
-}
-
-String
-OperationLink( const ary::cpp::Gate & ,
- const String & i_sOpName,
- ary::cpp::Ce_id i_nOpId,
- const char * i_sPrePath )
-{
- StreamLock
- slResult(3000);
- StreamStr &
- sResult = slResult();
-
- sResult
- << i_sPrePath
- << "#"
- << i_sOpName
- << "-"
- << i_nOpId.Value();
-
-
-
- return sResult.c_str();
-}
-
-const char *
-DataLink( const String & i_sLocalName,
- const char * i_sPrePath )
-{
- StreamLock
- slResult(3000);
- StreamStr &
- sResult = slResult();
-
- sResult
- << i_sPrePath
- << "#"
- << i_sLocalName;
-
- return sResult.c_str();
-}
-
-void
-Get_LinkedTypeText( csi::xml::Element & o_rOut,
- const OuputPage_Environment & i_rEnv,
- ary::cpp::Type_id i_nId,
- bool i_bWithAbsolutifier )
-{
- if (NOT i_nId.IsValid())
- return;
-
- const char * sPreName = "";
- const char * sName = "";
- const char * sPostName = "";
-
- bool bTypeExists = Get_TypeText( sPreName,
- sName,
- sPostName,
- i_nId,
- i_rEnv.Gate() );
- if ( NOT bTypeExists )
- return;
-
- if ( NOT i_bWithAbsolutifier AND strncmp(sPreName,"::",2) == 0 )
- sPreName+=2;
-
- const ary::cpp::CodeEntity *
- pCe = i_rEnv.Gate().Search_RelatedCe(i_nId);
-
- String sLink;
- if ( pCe != 0 )
- {
- sLink = Link2Ce(i_rEnv,*pCe);
- }
- else
- {
- if ( strstr(sPreName,"com::sun::star") != 0 )
- {
- static StreamStr aLink(400);
- aLink.seekp(0);
- aLink << PathPerRoot(i_rEnv, "../../common/ref");
- if ( *sPreName != ':' )
- aLink << '/';
- for ( const char * s = sPreName;
- *s != 0;
- ++s )
- {
- if ( *s == ':' )
- {
- aLink << '/';
- ++s;
- }
- else
- {
- aLink << *s;
- }
- } // end for
- aLink << sName
- << ".html";
- sLink = aLink.c_str();
- }
- } // endif( pCe != 0 )
-
- o_rOut
- << sPreName;
- csi::xml::Element &
- o_Goon = sLink.length() > 0
- ? o_rOut >> * new html::Link( sLink.c_str() )
- : o_rOut;
- o_Goon
- << sName;
- o_rOut
- << sPostName;
-}
-
-void
-Create_ChildListLabel( csi::xml::Element & o_rParentElement,
- const char * i_sLabel )
-{
- if ( NOT csv::no_str(i_sLabel) )
- {
- o_rParentElement
- >> *new html::Label(i_sLabel)
- << " ";
- }
-}
-
-DYN csi::html::Table &
-Create_ChildListTable( const char * i_sTitle )
-{
- html::Table *
- dpTable = new html::Table;
- *dpTable
- << new html::ClassAttr( "childlist")
- << new xml::AnAttribute( "border", "1" )
- << new xml::AnAttribute( "cellpadding", "5" )
- << new xml::AnAttribute( "cellspacing", "0" )
- << new html::WidthAttr( "100%" );
-
- html::TableRow &
- rRow = dpTable->AddRow();
- rRow
- << new html::ClassAttr("subtitle")
- >> *new html::TableCell
- << new xml::AnAttribute( "colspan","2" )
- >> *new html::Headline(4)
- << i_sTitle;
- return *dpTable;
-}
-
-const char *
-Link2Ce( const OuputPage_Environment & i_rEnv,
- const ary::cpp::CodeEntity & i_rCe )
-{
- const uintt nMaxSize
- = 3000;
- static char sLink[nMaxSize];
- static LinkCreator aLinkCreator( &sLink[0], nMaxSize );
- sLink[0] = NULCH;
-
- aLinkCreator.SetEnv(i_rEnv);
- i_rCe.Accept(aLinkCreator);
-
- return sLink;
-}
-
-const char *
-Link2CppDefinition( const OuputPage_Environment & i_rEnv,
- const ary::cpp::DefineEntity & i_rDef )
-{
- const uintt nMaxSize
- = 1000;
- static char sLink[nMaxSize];
- static LinkCreator aLinkCreator( &sLink[0], nMaxSize );
- sLink[0] = NULCH;
-
- aLinkCreator.SetEnv(i_rEnv);
- i_rDef.Accept(aLinkCreator);
-
- return sLink;
-}
-
-const ary::cpp::CodeEntity *
-FindUnambiguousCe( const OuputPage_Environment & i_rEnv,
- const ary::QualifiedName & i_rQuName,
- const ary::cpp::Class * i_pJustDocumentedClass )
-{
- if ( i_rEnv.CurNamespace() == 0 )
- return 0;
-
- const ary::cpp::CodeEntity * ret = 0;
-
- if ( NOT i_rQuName.IsQualified() )
- {
- if ( i_pJustDocumentedClass != 0 )
- ret = i_rEnv.Gate().Ces().Search_CeLocal( i_rQuName.LocalName(),
- i_rQuName.IsFunction(),
- *i_rEnv.CurNamespace(),
- i_pJustDocumentedClass );
- if (ret != 0)
- return ret;
-
- ret = i_rEnv.Gate().Ces().Search_CeLocal( i_rQuName.LocalName(),
- i_rQuName.IsFunction(),
- *i_rEnv.CurNamespace(),
- i_rEnv.CurClass() );
- }
- if (ret != 0)
- return ret;
-
- return i_rEnv.Gate().Ces().Search_CeAbsolute( *i_rEnv.CurNamespace(),
- i_rQuName );
-}
-
-void
-ShowDocu_On( csi::xml::Element & o_rOut,
- Docu_Display & io_rDisplay,
- const ary::cpp::CppEntity & i_rRE )
-{
- if (i_rRE.Docu().Data() != 0)
- {
- io_rDisplay.Assign_Out( o_rOut );
- io_rDisplay.Process(i_rRE.Docu());
- io_rDisplay.Unassign_Out();
- }
-}
-
-void
-WriteOut_TokenList( csi::xml::Element & o_rOut,
- const StringVector & i_rTokens,
- const char * i_sSeparator )
-{
- if ( i_rTokens.size() > 0 )
- {
- StringVector::const_iterator
- it = i_rTokens.begin();
- StringVector::const_iterator
- itEnd = i_rTokens.end();
-
- o_rOut << *it;
- for ( ++it; it != itEnd; ++it )
- {
- o_rOut << i_sSeparator << *it;
- }
- };
-
-}
-
-void
-EraseLeadingSpace( String & io_rStr )
-{
- if ( *io_rStr.c_str() < 33 AND io_rStr.length() > 0 )
- {
- const unsigned char * pNew;
- for ( pNew = (const unsigned char * ) io_rStr.c_str();
- *pNew < 33 AND *pNew != 0;
- ++pNew ) {}
- String sNew( (const char*)pNew );
- io_rStr = sNew;
- }
-}
-
-void
-WriteOut_LinkedFunctionText( csi::xml::Element & o_rTitleOut,
- adcdisp::ParameterTable & o_rParameters,
- const ary::cpp::Function & i_rFunction,
- const OuputPage_Environment & i_rEnv,
- bool * o_bIsConst,
- bool * o_bIsVirtual )
-{
- // write pre-name:
- const ary::cpp::FunctionFlags & rFlags = i_rFunction.Flags();
- if ( rFlags.IsStaticLocal() OR rFlags.IsStaticMember() )
- o_rTitleOut << "static ";
- if ( rFlags.IsExplicit() )
- o_rTitleOut << "explicit ";
- if ( rFlags.IsMutable() )
- o_rTitleOut << "mutable ";
- if ( i_rFunction.Virtuality() != ary::cpp::VIRTUAL_none )
- o_rTitleOut << "virtual ";
-// o_rTitleOut << new html::LineBreak;
-
- Get_LinkedTypeText( o_rTitleOut, i_rEnv, i_rFunction.ReturnType() );
-
- // write name:
- o_rTitleOut
- << " "
- >> *new html::Strong
- << i_rFunction.LocalName();
- o_rTitleOut
- << "(";
-
-
- csi::xml::Element * pOutLast = &o_rTitleOut;
-
- // write post-name:
- FunctionParam_Iterator fit;
- fit.Assign(i_rFunction);
-
- if (fit)
- {
- o_rParameters.AddEntry();
- Get_LinkedTypeText( o_rParameters.Type(), i_rEnv, fit.CurType() );
- o_rParameters.Type() << " ";
- o_rParameters.Name() << " " << fit.CurName();
-
- for ( ++fit; fit; ++fit )
- {
- o_rParameters.Name() << ",";
- o_rParameters.AddEntry();
- Get_LinkedTypeText( o_rParameters.Type(), i_rEnv, fit.CurType() );
- o_rParameters.Name() << fit.CurName();
- }
-
- pOutLast = &o_rParameters.Name();
- o_rParameters.Name() << " ";
- }
-
- *pOutLast << ")";
- if ( fit.IsFunctionConst() )
- {
- *pOutLast << " const";
- if ( o_bIsConst != 0 )
- *o_bIsConst = true;
- }
- if ( fit.IsFunctionVolatile() )
- {
- *pOutLast << " volatile";
- if ( o_bIsVirtual != 0 )
- *o_bIsVirtual = true;
- }
-
- // write Exceptions:
- const std::vector< ary::cpp::Type_id > *
- pThrow = i_rFunction.Exceptions();
- if ( pThrow)
- {
- std::vector< ary::cpp::Type_id >::const_iterator
- it = pThrow->begin();
- std::vector< ary::cpp::Type_id >::const_iterator
- it_end = pThrow->end();
-
- if (it != it_end)
- {
- o_rParameters.AddEntry();
- pOutLast = &o_rParameters.Name();
-
- o_rParameters.Name() << " throw( ";
- Get_LinkedTypeText(o_rParameters.Name(), i_rEnv, *it);
-
- for ( ++it; it != it_end; ++it )
- {
- o_rParameters.Name() << ", ";
- Get_LinkedTypeText(o_rParameters.Name(), i_rEnv, *it);
- }
- o_rParameters.Name() << " )";
- }
- else
- {
- *pOutLast << " throw()";
- }
- } // endif // pThrow
-
- // abstractness:
- if ( i_rFunction.Virtuality() == ary::cpp::VIRTUAL_abstract )
- *pOutLast << " = 0";
-
- // finish:
- *pOutLast << ";";
-}
-
-
-
-} // namespace dshelp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/hdimpl.hxx b/autodoc/source/display/html/hdimpl.hxx
deleted file mode 100644
index b6f8390d..00000000
--- a/autodoc/source/display/html/hdimpl.hxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HDIMPL_HXX
-#define ADC_DISPLAY_HDIMPL_HXX
-
-// BASE CLASSES
-#include <udm/html/htmlitem.hxx>
-// USED SERVICES
-#include "easywri.hxx"
-#include <cosv/bstream.hxx>
-#include <ary/ary_disp.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_ce.hxx>
-#include "aryattrs.hxx" // For compatibility with earlier times, when those funtions were in this header.
-
-
-namespace ary
-{
- namespace cpp
- {
- class CodeEntity;
- class Class;
- class DisplayGate;
- class Function;
- class DefineEntity;
- class OperationSignature;
- }
-
- class QualifiedName;
-}
-namespace csi
-{
- namespace xml
- {
- class Element;
- }
- namespace html
- {
- class Table;
- }
-}
-
-namespace adcdisp
-{
- class ParameterTable;
-}
-
-class OuputPage_Environment;
-class Docu_Display;
-
-class HtmlDisplay_Impl
-{
- public:
- ~HtmlDisplay_Impl();
-
- const OuputPage_Environment &
- Env() const { return *pEnv; }
-
- // ACCESS
- OuputPage_Environment &
- Env() { return *pEnv; }
- EasyWriter & Easy() { return aWriteHelper; }
- csi::xml::Element & CurOut() { return aWriteHelper.Out(); }
-
- protected:
- HtmlDisplay_Impl(
- OuputPage_Environment &
- io_rEnv );
- private:
- // DATA
- OuputPage_Environment *
- pEnv;
- EasyWriter aWriteHelper;
-};
-
-
-namespace dshelp
-{
-
-void DisplaySlot(
- ary::Display & o_rDisplay,
- const ary::AryGroup &
- i_rGroup,
- ary::SlotAccessId i_nSlot );
-
-
-const char * PathUp(
- uintt i_nLevels );
-const char * PathPerLevelsUp(
- uintt i_nLevels,
- const char * i_nPathBelowDestinationLevel );
-
-const char * PathPerRoot(
- const OuputPage_Environment &
- i_rEnv,
- const char * i_sPathFromRootDir );
-const char * PathPerNamespace(
- const OuputPage_Environment &
- i_rEnv,
- const char * i_sPathFromNamespaceDir );
-
-void Create_ChildListLabel(
- csi::xml::Element & o_rParentElement,
- const char * i_sLabel );
-DYN csi::html::Table &
- Create_ChildListTable(
- const char * i_sTitle );
-
-const char * HtmlFileName(
- const char * i_sPrefix,
- const char * i_sEntityName );
-
-inline const char *
-ClassFileName( const char * i_sClassLocalName )
- { return HtmlFileName( "c-", i_sClassLocalName); }
-inline const char *
-EnumFileName( const char * i_sEnumLocalName )
- { return HtmlFileName( "e-", i_sEnumLocalName); }
-inline const char *
-TypedefFileName( const char * i_sTypedefLocalName )
- { return HtmlFileName( "t-", i_sTypedefLocalName); }
-inline const char *
-FileFileName( const char * i_sFileLocalName )
- { return HtmlFileName( "f-", i_sFileLocalName); }
-
-const char * Path2Class(
- uintt i_nLevelsUp,
- const char * i_sClassLocalName );
-
-const char * Path2Child(
- const char * i_sFileName,
- const char * i_sSubDir = 0 );
-
-const char * Path2ChildNamespace(
- const char * i_sLocalName );
-
-String OperationLink(
- const ary::cpp::Gate & i_gate,
- const String & i_sOpName,
- ary::cpp::Ce_id i_nOpId,
- const char * i_sPrePath = "" );
-const char * DataLink(
- const String & i_sLocalName,
- const char * i_sPrePath = "" );
-
-inline String
-OperationLabel( const String & i_sOpName,
- ary::cpp::Ce_id i_nOpId,
- const ary::cpp::Gate & i_gate )
- { return String(OperationLink(i_gate, i_sOpName, i_nOpId) + 1); } // Skip '#' in front.
-inline const char *
-DataLabel( const String & i_sLocalName )
- { return DataLink(i_sLocalName) + 1; } // Skip '#' in front.
-
-
-void Get_LinkedTypeText(
- csi::xml::Element & o_rOut,
- const OuputPage_Environment &
- i_rEnv,
- ary::cpp::Type_id i_nId,
- bool i_bWithAbsolutifier = true );
-
-
-const char * Link2Ce(
- const OuputPage_Environment &
- i_rEnv,
- const ary::cpp::CodeEntity &
- i_rCe );
-
-const char * Link2CppDefinition(
- const OuputPage_Environment &
- i_rEnv,
- const ary::cpp::DefineEntity &
- i_rDef );
-
-const ary::cpp::CodeEntity *
- FindUnambiguousCe(
- const OuputPage_Environment &
- i_rEnv,
- const ary::QualifiedName &
- i_rQuName,
- const ary::cpp::Class * i_pJustDocumentedClass );
-
-void ShowDocu_On(
- csi::xml::Element & o_rOut,
- Docu_Display & io_rDisplay,
- const ary::cpp::CppEntity &
- i_rRE );
-
-void WriteOut_TokenList(
- csi::xml::Element & o_rOut,
- const StringVector & i_rTokens,
- const char * i_sSeparator );
-
-void EraseLeadingSpace(
- String & io_rStr );
-
-/** @param o_bIsConst
- *o_bIsConst will be set to true, if o_bIsConst != 0 and function is const.
- If the function is not const, *o_bIsConst remains unchanged!
-
- @param o_bIsVirtual
- The same as o_bIsConst.
-*/
-void WriteOut_LinkedFunctionText(
- csi::xml::Element & o_rTitleOut,
- adcdisp::ParameterTable &
- o_rParameters,
- const ary::cpp::Function &
- i_rFunction,
- const OuputPage_Environment &
- i_rEnv,
- bool * o_bIsConst = 0,
- bool * o_bIsVirtual = 0 );
-
-
-
-} // namespace dshelp
-
-using namespace dshelp;
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/html_kit.cxx b/autodoc/source/display/html/html_kit.cxx
deleted file mode 100644
index f6c07907..00000000
--- a/autodoc/source/display/html/html_kit.cxx
+++ /dev/null
@@ -1,307 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "html_kit.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <stdio.h>
-#include <ary/cpp/c_slntry.hxx>
-#include "hdimpl.hxx"
-
-
-namespace adcdisp
-{
-
-
-using namespace csi::xml;
-using namespace csi::html;
-
-
-void
-PageTitle_Left::operator()( XmlElement & o_rOwner,
- const char * i_sTypeTitle,
- const String & i_sLocalName )
-{
- o_rOwner
- >> *new Headline(2)
- << i_sTypeTitle
- << " "
- << i_sLocalName;
-}
-
-void
-PageTitle_Std::operator()( XmlElement & o_rOwner,
- const char * i_sTypeTitle,
- const String & i_sLocalName )
-{
- o_rOwner
- >> *new AnElement("div")
- << new ClassAttr("title")
- >> *new Headline(2)
- << i_sTypeTitle
- << " "
- << i_sLocalName;
-}
-
-XmlElement &
-PageTitle_Std::operator()( XmlElement & o_rOwner )
-{
- XmlElement & ret =
- o_rOwner
- >> *new AnElement("div")
- << new ClassAttr("title")
- >> *new Headline(2);
- return ret;
-}
-
-void
-OperationTitle::operator()( XmlElement & o_owner,
- const char * i_itemName,
- ary::cpp::Ce_id i_id,
- const ::ary::cpp::Gate & i_gate )
-{
- o_owner
- >> *new Label( OperationLabel(i_itemName, i_id, i_gate) )
- << " ";
- o_owner
- << i_itemName;
-}
-
-
-void
-TemplateClause::operator()( XmlElement & o_rOwner,
- const List_TplParams & i_rTplParams )
-{
- if ( i_rTplParams.size() == 0 )
- return;
-
- Element & rOut =
- o_rOwner
- << new LineBreak
- >> *new Paragraph
- >> *new Strong
- << "template< ";
-
- List_TplParams::const_iterator
- it = i_rTplParams.begin();
- List_TplParams::const_iterator
- itEnd = i_rTplParams.end();
-
- rOut
- << (*it).Name();
- for ( ++it; it != itEnd; ++it )
- {
- rOut
- << ", "
- << (*it).Name();
- } // end for
- rOut << " >";
-}
-
-ExplanationList::ExplanationList( XmlElement & o_rOwner,
- bool i_bMemberStyle )
- : pList( new DefList),
- pTerm(0),
- pDefinition(0),
- bMemberStyle(i_bMemberStyle)
-{
- if (bMemberStyle)
- *pList << new ClassAttr("member");
-
- o_rOwner << pList;
-}
-
-void
-ExplanationList::AddEntry( const char * i_sTerm,
- const char * i_sDifferentClass )
-{
- DefListTerm & rNewTerm = pList->AddTerm();
- if ( i_sDifferentClass != 0 )
- {
- rNewTerm << new ClassAttr(i_sDifferentClass);
- }
- else if (bMemberStyle)
- {
- rNewTerm << new ClassAttr("member");
- }
- if ( i_sTerm != 0 )
- rNewTerm << i_sTerm;
-
- pTerm = &rNewTerm;
- pDefinition = &pList->AddDefinition();
- if (bMemberStyle)
- *pDefinition << new ClassAttr("member");
-}
-
-void
-ExplanationList::AddEntry_NoTerm()
-{
- pTerm = 0;
- pDefinition = &pList->AddDefinition();
- if (bMemberStyle)
- *pDefinition << new ClassAttr("member");
-}
-
-ExplanationTable::ExplanationTable( XmlElement & o_rOwner )
- : pTable(0),
- pTerm(0),
- pDefinition(0)
-{
- pTable = new Table("0", "100%", "3", "0");
- *pTable << new AnAttribute("class", "expl-table");
- o_rOwner << pTable;
-}
-
-void
-ExplanationTable::AddEntry( const char * i_sTerm,
- const char * i_sDifferentStyle )
-{
- TableRow &
- rNewRow = pTable->AddRow();
- TableCell &
- rNewTerm = rNewRow.AddCell();
- TableCell &
- rNewDefinition = rNewRow.AddCell();
-
- if ( i_sDifferentStyle == 0 )
- {
- rNewTerm << new WidthAttr("15%")
- << new StyleAttr("vertical-align:top; font-weight:bold");
- }
- else
- {
- rNewTerm << new StyleAttr(i_sDifferentStyle);
- }
- if ( i_sTerm != 0 )
- rNewTerm << i_sTerm;
-
- pTerm = &rNewTerm;
- pDefinition = & (rNewDefinition >> *new APureElement("pre"));
-}
-
-ParameterTable::ParameterTable( XmlElement & o_rOwner )
- : pTable(0),
- pTerm(0),
- pDefinition(0)
-{
- pTable = new Table;
- *pTable << new AnAttribute("class", "param-table");
- o_rOwner << pTable;
-}
-
-void
-ParameterTable::AddEntry()
-{
- TableRow &
- rNewRow = pTable->AddRow();
- TableCell &
- rNewTerm = rNewRow.AddCell();
- TableCell &
- rNewDefinition = rNewRow.AddCell();
-
- pTerm = &rNewTerm;
- pDefinition = &rNewDefinition;
-}
-
-FlagTable::FlagTable( XmlElement & o_rOwner,
- uintt i_nNrOfColumns )
-{
- pTable = new Table;
- *pTable << new AnAttribute("class", "flag-table");
- *pTable << new AnAttribute("border", "1");
- *pTable << new AnAttribute("cellspacing", "0");
- o_rOwner << pTable;
-
- TableRow & rRow1 = pTable->AddRow();
- TableRow & rRow2 = pTable->AddRow();
-
- for ( uintt c = 0; c < i_nNrOfColumns; ++c )
- {
- TableCell & rCell1 = rRow1.AddCell();
- int nWidth = 100 / i_nNrOfColumns;
- static char sWidth[20];
- sprintf( sWidth, "%d%%", nWidth ); // SAFE SPRINTF (#100211# - checked)
-
- rCell1
- << new WidthAttr( sWidth )
- << new ClassAttr( "flagname" );
- TableCell & rCell2 = rRow2.AddCell();
- aCells.push_back( CellPair(&rCell1, &rCell2) );
- } // end for
-}
-
-void
-FlagTable::SetColumn( uintt i_nColumnPosition,
- const char * i_sColumnName,
- bool i_bValue )
-{
- csv_assert( i_nColumnPosition < aCells.size() );
-
- TableCell &
- rCell1 = *aCells[i_nColumnPosition].first;
- TableCell &
- rCell2 = *aCells[i_nColumnPosition].second;
- rCell1
- << i_sColumnName;
- if (i_bValue)
- {
- rCell2
- << new ClassAttr("flagyes")
- << "YES";
- }
- else //
- {
- rCell2
- << new ClassAttr("flagno")
- << "NO";
- } // endif
-}
-
-IndexList::IndexList( XmlElement & o_rOwner )
- : pList( new DefList ),
- pTerm(0),
- pDefinition(0)
-{
- o_rOwner << pList;
-}
-
-void
-IndexList::AddEntry()
-{
- pTerm = &pList->AddTerm();
- pDefinition = &pList->AddDefinition();
-}
-
-
-} // namespace adcdisp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/html_kit.hxx b/autodoc/source/display/html/html_kit.hxx
deleted file mode 100644
index 5df8b0b9..00000000
--- a/autodoc/source/display/html/html_kit.hxx
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_KIT_HXX
-#define ADC_DISPLAY_HTML_KIT_HXX
-
-// BASE CLASSES
-#include <udm/xml/xmlitem.hxx>
-#include <udm/html/htmlitem.hxx>
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- struct S_TplParam;
- class OperationSignature;
- class Gate;
- }
-}
-
-
-
-
-namespace adcdisp
-{
-
-typedef csi::xml::Element XmlElement;
-
-class PageTitle_Left
-{
- public:
- void operator()(
- XmlElement & o_rOwner,
- const char * i_sTypeTitle,
- const String & i_sLocalName );
-};
-
-class PageTitle_Std
-{
- public:
- void operator()(
- XmlElement & o_rOwner,
- const char * i_sTypeTitle,
- const String & i_sLocalName );
- XmlElement & operator()(
- XmlElement & o_rOwner );
-};
-
-class OperationTitle
-{
- public:
- void operator()(
- XmlElement & o_rOwner,
- const char * i_sItemName,
- ary::cpp::Ce_id i_nId,
- const ::ary::cpp::Gate &
- i_gate );
-};
-
-
-class TemplateClause
-{
- public:
- typedef std::vector< ary::cpp::S_TplParam> List_TplParams;
-
- void operator()(
- XmlElement & o_rOwner,
- const List_TplParams &
- i_rTplParams );
-};
-
-
-class ExplanationList
-{
- public:
- ExplanationList(
- XmlElement & o_rOwner,
- bool i_bMemberStyle = false );
-
- void AddEntry(
- const char * i_sTerm = 0,
- const char * i_sDifferentClass = 0 );
- void AddEntry_NoTerm();
-
- XmlElement & Term() { return *pTerm; }
- XmlElement & Def() { return *pDefinition; }
-
- private:
- csi::html::DefList* pList;
- XmlElement * pTerm;
- XmlElement * pDefinition;
- bool bMemberStyle;
-};
-
-class ExplanationTable
-{
- public:
- ExplanationTable(
- XmlElement & o_rOwner );
-
- void AddEntry(
- const char * i_sTerm = 0,
- const char * i_sDifferentStyle = 0 );
-
- XmlElement & Term() { return *pTerm; }
- XmlElement & Def() { return *pDefinition; }
-
- private:
- csi::html::Table* pTable;
- XmlElement * pTerm;
- XmlElement * pDefinition;
-};
-
-class ParameterTable
-{
- public:
- ParameterTable(
- XmlElement & o_rOwner );
-
- void AddEntry();
-
- XmlElement & Type() { return *pTerm; }
- XmlElement & Name() { return *pDefinition; }
-
- private:
- csi::html::Table* pTable;
- XmlElement * pTerm;
- XmlElement * pDefinition;
-};
-
-class FlagTable
-{
- public:
- FlagTable(
- XmlElement & o_rOwner,
- uintt i_nNrOfColumns );
-
- void SetColumn(
- uintt i_nColumnPosition, /// Starting with 0.
- const char * i_sColumnName,
- bool i_bValue ); /// "YES" or "NO"
- private:
- typedef std::pair< csi::html::TableCell*, csi::html::TableCell* > CellPair;
-
- // DATA
- csi::html::Table* pTable;
- std::vector<CellPair>
- aCells;
-};
-
-class IndexList
-{
- public:
- IndexList(
- XmlElement & o_rOwner );
-
- void AddEntry();
-
- XmlElement & Term() { return *pTerm; }
- XmlElement & Def() { return *pDefinition; }
-
- private:
- csi::html::DefList* pList;
- XmlElement * pTerm;
- XmlElement * pDefinition;
-};
-
-
-
-
-} // namespace adcdisp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/makefile.mk b/autodoc/source/display/html/makefile.mk
deleted file mode 100644
index 58046760..00000000
--- a/autodoc/source/display/html/makefile.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=display_html
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/aryattrs.obj \
- $(OBJ)$/cfrstd.obj \
- $(OBJ)$/chd_udk2.obj \
- $(OBJ)$/cre_link.obj \
- $(OBJ)$/dsply_cl.obj \
- $(OBJ)$/dsply_da.obj \
- $(OBJ)$/dsply_op.obj \
- $(OBJ)$/easywri.obj \
- $(OBJ)$/hd_chlst.obj \
- $(OBJ)$/hd_docu.obj \
- $(OBJ)$/hdimpl.obj \
- $(OBJ)$/html_kit.obj \
- $(OBJ)$/nav_main.obj \
- $(OBJ)$/navibar.obj \
- $(OBJ)$/outfile.obj \
- $(OBJ)$/opageenv.obj \
- $(OBJ)$/pagemake.obj \
- $(OBJ)$/pm_aldef.obj \
- $(OBJ)$/pm_base.obj \
- $(OBJ)$/pm_class.obj \
- $(OBJ)$/pm_help.obj \
- $(OBJ)$/pm_index.obj \
- $(OBJ)$/pm_namsp.obj \
- $(OBJ)$/pm_start.obj \
- $(OBJ)$/protarea.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/display/html/nav_main.cxx b/autodoc/source/display/html/nav_main.cxx
deleted file mode 100644
index 2ebbe0e1..00000000
--- a/autodoc/source/display/html/nav_main.cxx
+++ /dev/null
@@ -1,379 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "nav_main.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_ce.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <udm/html/htmlitem.hxx>
-#include "hdimpl.hxx"
-#include "opageenv.hxx"
-#include "strconst.hxx"
-
-
-using namespace ::csi::html;
-using namespace ::csi::xml;
-
-
-const String sOverview("Overview");
-const String sNamespace("Namespace");
-const String sClass("Class");
-const String sTree("Tree");
-const String sProject("Project");
-const String sFile("File");
-const String sIndex("Index");
-const String sHelp("Help");
-
-
-
-//******************** MainItem and derived ones ***************//
-class MainItem
-{
- public:
- virtual ~MainItem() {}
- void Write2(
- TableRow & o_rOut );
- private:
- virtual void do_Write2(
- TableRow & o_rOut ) = 0;
-};
-
-inline void
-MainItem::Write2( TableRow & o_rOut )
- { do_Write2(o_rOut); }
-
-
-namespace
-{
-
-class MainRowItem : public MainItem
-{
- public:
- MainRowItem(
- const String & i_sText,
- const char * i_sLink,
- const char * i_sTip );
- ~MainRowItem();
- private:
- enum E_Style { eSelf, eNo, eStd };
-
- virtual void do_Write2(
- TableRow & o_rOut );
- String sText;
- String sLink;
- String sTip;
-};
-
-MainRowItem::MainRowItem( const String & i_sText,
- const char * i_sLink,
- const char * i_sTip )
- : sText(i_sText),
- sLink(i_sLink),
- sTip(i_sTip)
-{
-}
-
-MainRowItem::~MainRowItem()
-{
-}
-
-void
-MainRowItem::do_Write2( TableRow & o_rOut )
-{
- TableCell & rCell = o_rOut.AddCell();
-
- rCell
- << new ClassAttr( "navimain" )
- << new XmlCode("&nbsp;")
- >> *new Link(sLink.c_str())
- << sText.c_str();
- rCell
- << new XmlCode("&nbsp;");
-}
-
-
-class SelectedItem : public MainItem
-{
- public:
- SelectedItem(
- const String & i_sText )
- : sText(i_sText) {}
- private:
- virtual void do_Write2(
- TableRow & o_rOut );
- String sText;
-};
-
-void
-SelectedItem::do_Write2( TableRow & o_rOut )
-{
- TableCell & rCell = o_rOut.AddCell();
-
- rCell
- << new ClassAttr( "navimainself" )
- << new XmlCode("&nbsp;")
- << sText.c_str()
- << new XmlCode("&nbsp;");
-}
-
-class UnavailableItem : public MainItem
-{
- public:
- UnavailableItem(
- const String & i_sText )
- : sText(i_sText) {}
- private:
- virtual void do_Write2(
- TableRow & o_rOut );
- String sText;
-};
-
-void
-UnavailableItem::do_Write2( TableRow & o_rOut )
-{
- TableCell & rCell = o_rOut.AddCell();
-
- rCell
- << new ClassAttr( "navimainnone" )
- << new XmlCode("&nbsp;")
- << sText.c_str()
- << new XmlCode("&nbsp;");
-}
-
-} // anonymous namespace
-
-//************************ MainRow ***************************//
-
-MainRow::MainRow( const OuputPage_Environment & i_rEnv )
- : // aItems,
- pEnv(&i_rEnv)
-{
-}
-
-MainRow::~MainRow()
-{
- csv::erase_container_of_heap_ptrs(aItems);
-}
-
-void
-MainRow::SetupItems_Overview()
-{
- Create_ItemList_Global( eSelf, eStd, eStd );
-}
-
-void
-MainRow::SetupItems_AllDefs()
-{
- Create_ItemList_Global( eStd, eStd, eStd );
-}
-
-void
-MainRow::SetupItems_Index()
-{
- Create_ItemList_Global( eStd, eSelf, eStd );
-}
-
-void
-MainRow::SetupItems_Help()
-{
- Create_ItemList_Global( eStd, eStd, eSelf );
-}
-
-void
-MainRow::SetupItems_Ce( const ary::cpp::CodeEntity & i_rCe )
-{
- csv_assert( pEnv->CurNamespace() != 0 );
- bool bIsNamespace = i_rCe.Id() == pEnv->CurNamespace()->Id();
- bool bHasClass = pEnv->CurClass() != 0;
- bool bIsClass = dynamic_cast< const ary::cpp::Class * >(&i_rCe) != 0;
-
- Create_ItemList_InDirTree_Cpp(
- ( bIsNamespace ? eSelf : eStd ),
- ( bIsClass ? eSelf : bHasClass ? eStd : eNo ),
- eNo, 0 );
-}
-
-void
-MainRow::SetupItems_FunctionGroup()
-{
- Create_ItemList_InDirTree_Cpp(
- eStd,
- (pEnv->CurClass() != 0 ? eStd : eNo),
- eNo, 0 );
-}
-
-void
-MainRow::SetupItems_DataGroup()
-{
- SetupItems_FunctionGroup();
-}
-
-void
-MainRow::Write2( csi::xml::Element & o_rOut ) const
-{
- Table * pTable = new Table;
- o_rOut
- >> *pTable
- << new AnAttribute( "class", "navimain" )
- << new AnAttribute( "border", "0" )
- << new AnAttribute( "cellpadding", "1" )
- << new AnAttribute( "cellspacing", "0" );
- TableRow & rRow = pTable->AddRow();
- rRow
- << new AnAttribute( "align", "center" )
- << new AnAttribute( "valign", "top" );
- for ( ItemList::const_iterator it = aItems.begin();
- it != aItems.end();
- ++it )
- {
- (*it)->Write2( rRow );
- }
-}
-
-void
-MainRow::Create_ItemList_Global( E_Style i_eOverview,
- E_Style i_eIndex,
- E_Style i_eHelp )
-{
- if ( i_eOverview == eStd )
- {
- String sLinkOverview = ( i_eIndex == eSelf
- ? dshelp::PathPerLevelsUp(
- 1,
- C_sHFN_Overview )
- : C_sHFN_Overview );
- Add_Item( i_eOverview, sOverview, sLinkOverview.c_str(), "" );
- }
- else
- {
- Add_Item( i_eOverview, sOverview, "", "" );
- }
-
- if ( i_eIndex == eSelf )
- Add_Item( eStd, sNamespace, "../names/index.html", "" );
- else
- Add_Item( eStd, sNamespace, "names/index.html", "" );
-
- Add_Item( eNo, sClass, "", "" );
-
- if ( i_eIndex == eStd )
- {
- Add_Item( i_eIndex, sIndex, C_sPath_Index, "" );
- }
- else
- {
- Add_Item( i_eIndex, sIndex, "", "" );
- }
-
- if ( i_eHelp == eStd )
- {
- String sLinkHelp = ( i_eIndex == eSelf
- ? PathPerLevelsUp(1,C_sHFN_Help)
- : C_sHFN_Help );
- Add_Item( i_eHelp, sHelp, sLinkHelp.c_str(), "" );
- }
- else
- {
- Add_Item( i_eHelp, sHelp, "", "" );
- }
-}
-
-void
-MainRow::Create_ItemList_InDirTree_Cpp( E_Style i_eNsp,
- E_Style i_eClass,
- E_Style ,
- const char * )
-{
- String
- sLinkOverview = PathPerRoot(*pEnv, C_sHFN_Overview);
- Add_Item( eStd, sOverview, sLinkOverview.c_str(), "" );
-
- if (i_eNsp == eStd)
- {
- String sLinkNamespace = PathPerNamespace(*pEnv, "index.html");
- Add_Item( i_eNsp, sNamespace, sLinkNamespace.c_str(), "" );
- }
- else
- {
- Add_Item( i_eNsp, sNamespace, "", "" );
- }
-
- if (i_eClass == eStd)
- {
- csv_assert( pEnv->CurClass() != 0 );
-
- StreamLock sLinkClass(300);
- sLinkClass() << PathPerNamespace(*pEnv, "c-")
- << pEnv->CurClass()->LocalName()
- << ".html";
- StreamLock sTipClass(300);
- sTipClass() << "Class "
- << pEnv->CurClass()->LocalName();
- Add_Item( i_eClass, sClass, sLinkClass().c_str(), sTipClass().c_str() );
- }
- else
- {
- Add_Item( i_eClass, sClass, "", "" );
- }
-
-
- Add_Item( eStd, sIndex, PathPerRoot(*pEnv, C_sPath_Index), "" );
- String
- sLinkHelp = PathPerRoot(*pEnv, "help.html");
- Add_Item( eStd, sHelp, sLinkHelp.c_str(), "" );
-}
-
-void
-MainRow::Add_Item( E_Style i_eStyle,
- const String & i_sText,
- const char * i_sLink,
- const char * i_sTip )
-{
- switch (i_eStyle)
- {
- case eStd: aItems.push_back( new MainRowItem(i_sText, i_sLink, i_sTip) );
- break;
- case eNo: aItems.push_back( new UnavailableItem(i_sText) );
- break;
- case eSelf: aItems.push_back( new SelectedItem(i_sText) );
- break;
- default:
- csv_assert(false);
- }
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/nav_main.hxx b/autodoc/source/display/html/nav_main.hxx
deleted file mode 100644
index 233a1748..00000000
--- a/autodoc/source/display/html/nav_main.hxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_NAV_MAIN_HXX
-#define ADC_DISPLAY_HTML_NAV_MAIN_HXX
-
-// USED SERVICES
-
-namespace ary
-{
-namespace cpp
-{
- class CodeEntity;
-}
-namespace loc
-{
- class File;
-}
-}
-namespace csi
-{
-namespace xml
-{
- class Element;
-}
-}
-
-class OuputPage_Environment;
-class MainItem;
-
-
-
-
-class MainRow
-{
- public:
- MainRow(
- const OuputPage_Environment &
- i_rEnv );
- ~MainRow();
-
- void SetupItems_Overview();
- void SetupItems_AllDefs();
- void SetupItems_Index();
- void SetupItems_Help();
-
- void SetupItems_Ce(
- const ary::cpp::CodeEntity &
- i_rCe );
- void SetupItems_FunctionGroup(); /// For class member methods.
- void SetupItems_DataGroup(); /// For class member data.
-
- void Write2(
- csi::xml::Element & o_rOut ) const;
- private:
- // Local
- enum E_Style
- {
- eSelf,
- eNo,
- eStd
- };
-
- /** @precond
- Only combinations of 1 eSelf and 2 eStd are allowed
- as arguments, here.
- */
- void Create_ItemList_Global(
- E_Style i_eOverview,
- E_Style i_eIndex,
- E_Style i_eHelp );
- void Create_ItemList_InDirTree_Cpp(
- E_Style i_eNsp,
- E_Style i_eClass,
- E_Style i_eTree,
- const char * i_sTreeLink );
- void Add_Item(
- E_Style i_eStyle,
- const String & i_sText,
- const char * i_sLink,
- const char * i_sTip );
- // DATA
- typedef std::vector< DYN MainItem* > ItemList;
-
-
- ItemList aItems;
- const OuputPage_Environment *
- pEnv;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/navibar.cxx b/autodoc/source/display/html/navibar.cxx
deleted file mode 100644
index ede7e432..00000000
--- a/autodoc/source/display/html/navibar.cxx
+++ /dev/null
@@ -1,318 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "navibar.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include "nav_main.hxx"
-#include "opageenv.hxx"
-
-
-using namespace csi::xml;
-using namespace csi::html;
-
-
-namespace
-{
-
-//************************ SubRowItem ***************************//
-
-class SubRowItem
-{
- public:
- SubRowItem(
- const char * i_sText,
- const char * i_sLink,
- bool i_bActive,
- bool i_bFirstOfRow = false );
- ~SubRowItem();
-
- void Write2(
- Element & o_rOut ) const;
- private:
- String sText;
- String sLink;
- bool bIsActive;
- bool bFirstOfRow;
-};
-
-SubRowItem::SubRowItem( const char * i_sText,
- const char * i_sLink,
- bool i_bActive,
- bool i_bFirstOfRow )
- : sText(i_sText),
- sLink(i_sLink),
- bIsActive(i_bActive),
- bFirstOfRow(i_bFirstOfRow)
-{
- csv_assert( NOT csv::no_str(i_sLink) );
-}
-
-SubRowItem::~SubRowItem()
-{
-}
-
-void
-SubRowItem::Write2( Element & o_rOut ) const
-{
- o_rOut << new Sbr;
- if ( NOT bFirstOfRow )
- o_rOut << new XmlCode( "|&nbsp;" );
- else
- o_rOut << new XmlCode( "&nbsp;" );
-
- if ( bIsActive )
- {
- o_rOut
- >> *new Link( sLink.c_str() )
- >> *new AnElement( "font" )
- << new AnAttribute("size","-2")
- >> *new Bold
- << sText.c_str();
- }
- else
- {
- o_rOut
- >> *new AnElement( "font" )
- << new AnAttribute("size","-2")
- << sText.c_str();
- }
-}
-
-
-
-//************************ SubRow ***************************//
-
-class SubRow
-{
- public:
- SubRow(
- const char * i_sTitle );
- ~SubRow();
-
- void AddItem(
- const char * i_sText,
- const char * i_sLink,
- bool i_bActive );
- void Write2(
- Table & o_rOut ) const;
- private:
- typedef std::vector< DYN SubRowItem * > List_Items;
-
- List_Items aItemList;
- String sTitle;
-};
-
-SubRow::SubRow( const char * i_sTitle )
-// : // aItemList,
- // sTitle
-{
- StreamStr sUp(i_sTitle,0);
- sUp.to_upper();
- sTitle = sUp.c_str();
-}
-
-SubRow::~SubRow()
-{
- for ( List_Items::iterator it = aItemList.begin();
- it != aItemList.end();
- ++it )
- {
- delete (*it);
- }
-}
-
-inline void
-SubRow::AddItem( const char * i_sText,
- const char * i_sLink,
- bool i_bActive )
-{
- aItemList.push_back( new SubRowItem(i_sText, i_sLink, i_bActive, aItemList.empty()) );
-}
-
-void
-SubRow::Write2( Table & o_rOut ) const
-{
- TableRow * pRow = new TableRow;
- o_rOut << pRow;
-
- if (sTitle.length() > 0)
- {
- Element & rCell1 = pRow->AddCell();
- rCell1
- << new WidthAttr("20%")
- >> *new AnElement( "font" )
- << new AnAttribute("size","-2")
- << sTitle
- << ":";
- }
-
- Element & rCell2 = pRow->AddCell();
- for ( List_Items::const_iterator it = aItemList.begin();
- it != aItemList.end();
- ++it )
- {
- (*it)->Write2( rCell2 );
- }
-}
-
-
-} // anonymous namespace
-
-
-
-//************************* CheshireCat ***********************//
-
-
-typedef std::vector< DYN SubRow * > List_SubRows;
-
-struct NavigationBar::CheshireCat
-{
- MainRow aMainRow;
- List_SubRows aSubRows;
- const OuputPage_Environment *
- pEnv;
-
-
- CheshireCat(
- const OuputPage_Environment &
- i_rEnv );
- ~CheshireCat();
-};
-
-NavigationBar::
-CheshireCat::CheshireCat( const OuputPage_Environment & i_rEnv )
- : aMainRow( i_rEnv ),
- pEnv( & i_rEnv )
-{
-}
-
-NavigationBar::
-CheshireCat::~CheshireCat()
-{
- csv::erase_container_of_heap_ptrs( aSubRows );
-}
-
-
-//************************ NavigationBar *******************//
-
-NavigationBar::NavigationBar( const OuputPage_Environment & i_rEnv,
- E_GlobalLocation i_eLocation )
- : pi( new CheshireCat(i_rEnv) )
-{
- switch (i_eLocation)
- {
- case LOC_Overview: pi->aMainRow.SetupItems_Overview(); break;
- case LOC_AllDefs: pi->aMainRow.SetupItems_AllDefs(); break;
- case LOC_Index: pi->aMainRow.SetupItems_Index(); break;
- case LOC_Help: pi->aMainRow.SetupItems_Help(); break;
- default:
- csv_assert(false);
- }
-}
-
-NavigationBar::NavigationBar( const OuputPage_Environment & i_rEnv,
- const ary::cpp::CodeEntity & i_rCe )
- : pi( new CheshireCat(i_rEnv) )
-{
- pi->aMainRow.SetupItems_Ce( i_rCe );
-}
-
-NavigationBar::NavigationBar( const OuputPage_Environment & i_rEnv,
- E_CeGatheringType i_eCeGatheringType )
- : pi( new CheshireCat(i_rEnv) )
-{
- switch (i_eCeGatheringType)
- {
- case CEGT_operations: pi->aMainRow.SetupItems_FunctionGroup(); break;
- case CEGT_data: pi->aMainRow.SetupItems_DataGroup(); break;
- default:
- csv_assert(false);
- }
-}
-
-NavigationBar::~NavigationBar()
-{
- csv::erase_container_of_heap_ptrs( pi->aSubRows );
-}
-
-void
-NavigationBar::MakeSubRow( const char * i_sTitle )
-{
- pi->aSubRows.push_back( new SubRow(i_sTitle) );
-}
-
-void
-NavigationBar::AddItem( const char * i_sName,
- const char * i_sLink,
- bool i_bValid )
-{
- csv_assert( pi->aSubRows.size() > 0 );
- StreamStr sName(i_sName, 0);
- sName.to_upper();
-
- StreamLock aSum(100);
- pi->aSubRows.back()->AddItem( sName.c_str(),
- aSum() << "#" << i_sLink << c_str,
- i_bValid );
-}
-
-void
-NavigationBar::Write( Element & o_rOut,
- bool i_bWithSubRows ) const
-{
- pi->aMainRow.Write2( o_rOut );
-
- const_cast< NavigationBar* >(this)->pSubRowsTable = new Table;
- o_rOut << pSubRowsTable;
- *pSubRowsTable
- << new AnAttribute( "class", "navisub" )
- << new AnAttribute( "cellpadding", "0" )
- << new AnAttribute( "cellspacing", "3" );
-
- if (i_bWithSubRows)
- {
- Write_SubRows();
- }
-}
-
-void
-NavigationBar::Write_SubRows() const
-{
- for ( List_SubRows::const_iterator it = pi->aSubRows.begin();
- it != pi->aSubRows.end();
- ++it )
- {
- (*it)->Write2( *pSubRowsTable );
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/navibar.hxx b/autodoc/source/display/html/navibar.hxx
deleted file mode 100644
index 49f83b53..00000000
--- a/autodoc/source/display/html/navibar.hxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_NAVIBAR_HXX
-#define ADC_DISPLAY_HTML_NAVIBAR_HXX
-
-// BASE CLASSES
-#include "hdimpl.hxx"
-
-namespace ary
-{
-namespace cpp
-{
- class CodeEntity;
-}
-namespace loc
-{
- class File;
-}
-}
-
-
-
-
-/** Creates a HTML navigation bar wth the following parts:
-
- A main bar with fixed items.
- Zero to several subbars with user defined items, depending of
- the contents of the page.
-
- The main bar contains those items:
-
- Overview | Namespace | Class | Tree | Project | File | Index | Help
-*/
-class NavigationBar
-{
- public:
- enum E_GlobalLocation
- {
- LOC_Overview,
- LOC_AllDefs,
- LOC_Index,
- LOC_Help
- };
- enum E_CeGatheringType
- {
- CEGT_operations,
- CEGT_data
- };
-
- /// Used for Overview, Index and Help.
- NavigationBar(
- const OuputPage_Environment &
- i_rEnv,
- E_GlobalLocation i_eLocation );
- /// Used for all Ces except operations and data.
- NavigationBar(
- const OuputPage_Environment &
- i_rEnv,
- const ary::cpp::CodeEntity &
- i_rCe );
- /** Used for operations and data.
- */
- NavigationBar(
- const OuputPage_Environment &
- i_rEnv,
- E_CeGatheringType i_eCeGatheringType );
- ~NavigationBar();
-
- void MakeSubRow(
- const char * i_sTitle );
- void AddItem( /// Items are added to last made sub-row.
- const char * i_sName,
- const char * i_sLink,
- bool i_bValid );
- /** This writes the main bar and the pSubRowTable to o_rOut.
- The pSubRowsTable stays in memory and can be filled later,
- when all SubRow items are known.
- */
- void Write(
- csi::xml::Element & o_rOut,
- bool i_bWithSubRows = false ) const;
- void Write_SubRows() const;
-
- private:
- struct CheshireCat;
- Dyn<CheshireCat> pi;
- csi::html::Table * pSubRowsTable;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/opageenv.cxx b/autodoc/source/display/html/opageenv.cxx
deleted file mode 100644
index d7fd5076..00000000
--- a/autodoc/source/display/html/opageenv.cxx
+++ /dev/null
@@ -1,492 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "opageenv.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/ploc_dir.hxx>
-#include <ary/cpp/c_ce.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <udm/html/htmlitem.hxx>
-#include <estack.hxx>
-#include "hdimpl.hxx"
-#include "strconst.hxx"
-
-
-const String C_sCppDir( "names" );
-const String C_sIndexDir( "ix" );
-
-
-//************************ Implementation ********************//
-
-namespace
-{
-
-void CreateDirectory( const csv::ploc::Path & i_rPath );
-
-void
-CreateDirectory( const csv::ploc::Path & i_rPath )
-{
- csv::ploc::Directory aDirectory(i_rPath);
- if (NOT aDirectory.Exists())
- aDirectory.PhysicalCreate();
-}
-
-//************************ CheshireCat ********************//
-
-struct InNamespaceTree
-{
- enum E_Type
- {
- t_unknown,
- t_namespace,
- t_type,
- t_operations,
- t_data
- };
-
- EStack< const ary::cpp::Namespace * >
- aNamespaces; /// never empty.
- EStack< const ary::cpp::Class * >
- aClasses; /// maybe empty.
- const ary::cpp::CodeEntity *
- pCe; /// CurFileCe, maybe 0
- E_Type eType;
-
- InNamespaceTree(
- const ary::cpp::Namespace &
- i_rNsp );
- ~InNamespaceTree();
- void GoDown(
- const ary::cpp::Namespace &
- i_rNsp );
- void GoDown(
- const ary::cpp::Class &
- i_rClass );
- void GoUp();
-};
-
-InNamespaceTree::InNamespaceTree( const ary::cpp::Namespace & i_rNsp )
- : // aNamespaces,
- // aClasses,
- pCe(0),
- eType(t_unknown)
-{
- aNamespaces.push( &i_rNsp );
-}
-
-InNamespaceTree::~InNamespaceTree()
-{
-}
-
-void
-InNamespaceTree::GoDown( const ary::cpp::Namespace & i_rNsp )
-{
- aNamespaces.push(&i_rNsp);
- aClasses.erase_all();
- pCe = 0;
- eType = t_unknown;
-}
-
-void
-InNamespaceTree::GoDown( const ary::cpp::Class & i_rClass )
-{
- aClasses.push(&i_rClass);
- pCe = 0;
- eType = t_unknown;
-}
-
-void
-InNamespaceTree::GoUp()
-{
- if ( NOT aClasses.empty() )
- aClasses.pop();
- else
- aNamespaces.pop();
- pCe = 0;
- eType = t_unknown;
-}
-
-struct InIndex
-{
- char cLetter;
-
- InIndex() : cLetter('A') {}
-};
-
-
-} // anonymous namespace
-
-
-
-
-
-struct OuputPage_Environment::CheshireCat
-{
- csv::ploc::Path aOutputRoot;
- csv::ploc::Path aMyPath;
- csv::StreamStr aFileName;
-
- const ary::cpp::Gate *
- pGate;
- const display::CorporateFrame *
- pLayout;
- intt nDepth;
-
- Dyn<InNamespaceTree>
- pInNamespace;
- Dyn<InIndex> pInIndex;
-
- CheshireCat(
- const csv::ploc::Path &
- io_rOutputDir,
- const ary::cpp::Gate &
- i_rGate,
- const display::CorporateFrame &
- i_rLayout );
- ~CheshireCat();
- void AddQualifiedName2Path(
- const ary::cpp::CodeEntity &
- i_rCe,
- bool i_bIncludeLocalName );
-
- const Dyn<InNamespaceTree> &
- NspEnv() const { return pInNamespace; }
- Dyn<InNamespaceTree> &
- NspEnv() { return pInNamespace; }
- const ary::cpp::Namespace *
- Namespace() const { return pInNamespace ? pInNamespace->aNamespaces.top() : 0; }
- const ary::cpp::Class *
- Class() const { return pInNamespace ? (pInNamespace->aClasses.empty() ? 0 : pInNamespace->aClasses.top()) : 0; }
-};
-
-OuputPage_Environment::
-CheshireCat::CheshireCat( const csv::ploc::Path & io_rOutputDir,
- const ary::cpp::Gate & i_rGate,
- const display::CorporateFrame & i_rLayout )
- : aOutputRoot(io_rOutputDir),
- aMyPath(io_rOutputDir),
- aFileName(500),
- pGate(&i_rGate),
- pLayout(&i_rLayout),
- nDepth(0),
- pInNamespace(),
- pInIndex()
-{
-}
-
-OuputPage_Environment::
-CheshireCat::~CheshireCat()
-{
-}
-
-void
-OuputPage_Environment::
-CheshireCat::AddQualifiedName2Path( const ary::cpp::CodeEntity & i_rCe,
- bool i_bIncludeLocalName )
-{
- if (NOT i_rCe.Owner().IsValid())
- {
- aMyPath.DirChain().PushBack( C_sCppDir );
- return;
- }
-
- const ary::cpp::CodeEntity &
- rParent = pGate->Ces().Find_Ce( i_rCe.Owner() );
- AddQualifiedName2Path( rParent, true );
-
- if ( i_bIncludeLocalName )
- aMyPath.DirChain().PushBack( i_rCe.LocalName() );
-}
-
-
-
-//************************ OuputPage_Environment ********************//
-
-OuputPage_Environment::OuputPage_Environment( const csv::ploc::Path & io_rOutputDir,
- const ary::cpp::Gate & i_rGate,
- const display::CorporateFrame & i_rLayout )
- : pi( new CheshireCat(io_rOutputDir, i_rGate, i_rLayout) )
-{
-}
-
-OuputPage_Environment::~OuputPage_Environment()
-{
-}
-
-void
-OuputPage_Environment::MoveDir_2Root()
-{
- pi->NspEnv() = 0;
- pi->pInIndex = 0;
- pi->nDepth = 0;
- while ( pi->aMyPath.DirChain().Size() > pi->aOutputRoot.DirChain().Size() )
- pi->aMyPath.DirChain().PopBack();
- pi->aMyPath.SetFile(String ::Null_());
-}
-
-void
-OuputPage_Environment::MoveDir_2Names()
-{
- pi->NspEnv() = new InNamespaceTree( Gate().Ces().GlobalNamespace() );
- pi->aMyPath.DirChain().PushBack( C_sCppDir );
- pi->aMyPath.SetFile(String ::Null_());
- ++pi->nDepth;
-
- CreateDirectory( pi->aMyPath );
-}
-
-void
-OuputPage_Environment::MoveDir_Down2( const ary::cpp::Namespace & i_rNsp )
-{
- csv_assert(i_rNsp.Depth() > 0);
- csv_assert( pi->NspEnv() );
- csv_assert( pi->Namespace()->CeId() == i_rNsp.Owner() );
-
- pi->NspEnv()->GoDown( i_rNsp );
- pi->aMyPath.DirChain().PushBack(i_rNsp.LocalName());
- ++pi->nDepth;
- pi->aMyPath.SetFile(String ::Null_());
-
- CreateDirectory( pi->aMyPath );
-}
-
-void
-OuputPage_Environment::MoveDir_Down2( const ary::cpp::Class & i_rClass )
-{
- csv_assert( pi->NspEnv() );
- if ( i_rClass.Protection() == ary::cpp::PROTECT_global )
- {
- csv_assert( pi->Namespace()->CeId() == i_rClass.Owner() );
- }
- else
- {
- csv_assert( pi->Class() != 0 );
- csv_assert( pi->Class()->CeId() == i_rClass.Owner() );
- }
-
- pi->NspEnv()->GoDown(i_rClass);
- pi->aMyPath.DirChain().PushBack(i_rClass.LocalName());
- pi->aMyPath.SetFile(String ::Null_());
- ++pi->nDepth;
-
- CreateDirectory( pi->aMyPath );
-}
-
-void
-OuputPage_Environment::MoveDir_2Index()
-{
- MoveDir_2Root();
- pi->pInIndex = new InIndex;
- pi->aMyPath.DirChain().PushBack( String (C_sDIR_Index) );
- pi->aMyPath.SetFile(String ::Null_());
- pi->nDepth = 1;
-
- CreateDirectory( pi->aMyPath );
-}
-
-void
-OuputPage_Environment::MoveDir_Up()
-{
- if ( pi->nDepth == 1 )
- {
- MoveDir_2Root();
- return;
- }
- else if ( pi->NspEnv() )
- {
- pi->NspEnv()->GoUp();
- pi->aMyPath.DirChain().PopBack();
- pi->aMyPath.SetFile(String ::Null_());
- --pi->nDepth;
- }
-}
-
-void
-OuputPage_Environment::SetFile_Css()
-{
- pi->aMyPath.SetFile( C_sHFN_Css );
-}
-
-void
-OuputPage_Environment::SetFile_Overview()
-{
- pi->aMyPath.SetFile( C_sHFN_Overview );
-}
-
-void
-OuputPage_Environment::SetFile_AllDefs()
-{
- // Provisorium
- pi->aMyPath.SetFile("def-all.html");
-}
-
-void
-OuputPage_Environment::SetFile_Index( char i_cLetter )
-{
- csv_assert( ( 'A' <= i_cLetter AND i_cLetter <= 'Z' ) OR i_cLetter == '_' );
-
- static StreamStr sIndexFileName(40);
- sIndexFileName.seekp(0);
- sIndexFileName << "index-";
- if ( i_cLetter == '_' )
- {
- sIndexFileName << "27";
- }
- else
- {
- sIndexFileName << int(i_cLetter -'A' + 1);
- }
- sIndexFileName << ".html";
-
- pi->aMyPath.SetFile( sIndexFileName.c_str() );
-}
-
-void
-OuputPage_Environment::SetFile_Help()
-{
- pi->aMyPath.SetFile( C_sHFN_Help );
-}
-
-void
-OuputPage_Environment::SetFile_CurNamespace()
-{
- csv_assert( pi->NspEnv() );
- pi->aMyPath.SetFile("index.html");
- pi->NspEnv()->pCe = pi->Namespace();
- pi->NspEnv()->eType = InNamespaceTree::t_namespace;
-}
-
-void
-OuputPage_Environment::SetFile_Class( const ary::cpp::Class & i_rClass )
-{
- csv_assert( pi->NspEnv() );
- pi->aMyPath.SetFile( ClassFileName(i_rClass.LocalName()) );
- pi->NspEnv()->pCe = &i_rClass;
- pi->NspEnv()->eType = InNamespaceTree::t_type;
-}
-
-void
-OuputPage_Environment::SetFile_Enum( const ary::cpp::Enum & i_rEnum )
-{
- csv_assert( pi->NspEnv() );
- pi->aMyPath.SetFile( EnumFileName(i_rEnum.LocalName()) );
- pi->NspEnv()->pCe = &i_rEnum;
- pi->NspEnv()->eType = InNamespaceTree::t_type;
-}
-
-void
-OuputPage_Environment::SetFile_Typedef( const ary::cpp::Typedef & i_rTypedef )
-{
- csv_assert( pi->NspEnv() );
- pi->aMyPath.SetFile( TypedefFileName(i_rTypedef.LocalName()) );
- pi->NspEnv()->pCe = &i_rTypedef;
- pi->NspEnv()->eType = InNamespaceTree::t_type;
-}
-
-void
-OuputPage_Environment::SetFile_Operations( const ary::loc::File * i_pFile )
-{
- csv_assert( pi->NspEnv() );
- if ( CurClass() != 0 )
- pi->aMyPath.SetFile( "o.html" );
- else
- {
- csv_assert( i_pFile != 0 );
- pi->aMyPath.SetFile( HtmlFileName("o-", i_pFile->LocalName()) );
- }
- pi->NspEnv()->pCe = 0;
- pi->NspEnv()->eType = InNamespaceTree::t_operations;
-}
-
-void
-OuputPage_Environment::SetFile_Data( const ary::loc::File * i_pFile )
-{
- csv_assert( pi->NspEnv() );
- if ( CurClass() != 0 )
- pi->aMyPath.SetFile( "d.html" );
- else
- {
- csv_assert( i_pFile != 0 );
- pi->aMyPath.SetFile( HtmlFileName("d-", i_pFile->LocalName()) );
- }
- pi->NspEnv()->pCe = 0;
- pi->NspEnv()->eType = InNamespaceTree::t_data;
-}
-
-const ary::cpp::Namespace *
-OuputPage_Environment::CurNamespace() const
-{
- return pi->Namespace();
-}
-
-const ary::cpp::Class *
-OuputPage_Environment::CurClass() const
-{
- return pi->Class();
-}
-
-const csv::ploc::Path &
-OuputPage_Environment::CurPath() const
-{
- return pi->aMyPath;
-}
-
-const ary::cpp::Gate &
-OuputPage_Environment::Gate() const
-{
- return *pi->pGate;
-}
-
-const display::CorporateFrame &
-OuputPage_Environment::Layout() const
-{
- return *pi->pLayout;
-}
-
-uintt
-OuputPage_Environment::Depth() const
-{
- return static_cast<uintt>(pi->nDepth);
-}
-
-const String &
-OuputPage_Environment::RepositoryTitle() const
-{
- return Gate().RepositoryTitle();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/opageenv.hxx b/autodoc/source/display/html/opageenv.hxx
deleted file mode 100644
index 23e4aeb9..00000000
--- a/autodoc/source/display/html/opageenv.hxx
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_OPAGEENV_HXX
-#define ADC_DISPLAY_HTML_OPAGEENV_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/ploc.hxx>
- // PARAMETERS
-
-namespace ary
-{
- namespace cpp
- {
- class Gate;
-
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- }
- namespace loc
- {
- class File;
- }
-}
-namespace display
-{
- class CorporateFrame;
-}
-
-class OuputPage_Environment
-{
- public:
- // LIFECYCLE
- OuputPage_Environment(
- const csv::ploc::Path &
- io_rOutputDir,
- const ary::cpp::Gate &
- i_rGate,
- const display::CorporateFrame &
- i_rLayout );
- ~OuputPage_Environment();
-
- // OPERATIONS
- void MoveDir_2Root();
- void MoveDir_2Names();
- void MoveDir_Down2( /// Only one level.
- const ary::cpp::Namespace &
- i_rNsp );
- void MoveDir_Down2( /// Only one level.
- const ary::cpp::Class &
- i_rClass );
- void MoveDir_2Index();
- void MoveDir_Up();
-
- void SetFile_Css();
- void SetFile_Overview();
- void SetFile_AllDefs();
- void SetFile_Index(
- char i_cLetter );
- void SetFile_Help();
- void SetFile_CurNamespace();
- void SetFile_Class(
- const ary::cpp::Class &
- i_rClass );
- void SetFile_Enum(
- const ary::cpp::Enum &
- i_rEnum );
- void SetFile_Typedef(
- const ary::cpp::Typedef &
- i_typedef );
- void SetFile_Operations(
- const ary::loc::File *
- i_pFile = 0 ); /// Only needed for global functions.
- void SetFile_Data(
- const ary::loc::File *
- i_pFile = 0 ); /// Only needed for global variables.
- // INQUIRY
- const ary::cpp::Namespace *
- CurNamespace() const;
- const ary::cpp::Class *
- CurClass() const;
- const csv::ploc::Path &
- CurPath() const;
- const ary::cpp::Gate &
- Gate() const;
- const display::CorporateFrame &
- Layout() const;
- uintt Depth() const;
- const String & RepositoryTitle() const;
-
- private:
- struct CheshireCat;
- Dyn<CheshireCat> pi;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/outfile.cxx b/autodoc/source/display/html/outfile.cxx
deleted file mode 100644
index cab2ba01..00000000
--- a/autodoc/source/display/html/outfile.cxx
+++ /dev/null
@@ -1,390 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "outfile.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/file.hxx>
-#include <udm/html/htmlitem.hxx>
-#include <toolkit/out_position.hxx>
-#include "strconst.hxx"
-
-
-namespace
-{
-bool bUse_OOoFrameDiv = true;
-const String C_sOOoFrameDiv_CppId("adc-cppref");
-}
-
-
-using namespace csi;
-using csi::xml::AnAttribute;
-
-
-
-#define CRLF "\n"
-
-const char * const
- C_sStdStyle =
- "body { background-color:#ffffff; }"CRLF
- "h1 { font-size:20pt; margin-top:3pt; margin-bottom:7pt; }"CRLF
- "h2 { font-family:Arial; font-size:16pt; margin-top:3pt; margin-bottom:5pt; }"CRLF
- "h3 { font-size:13pt; margin-top:2pt; margin-bottom:3pt; }"CRLF
- "h4 { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "dl { margin-top:1pt; margin-bottom:1pt; }"CRLF
- "dl.member { margin-top:1pt; margin-bottom:1pt; background-color:#eeeeff; }"CRLF
- "dt { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "dt.member { font-size:13pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "dt.simple { font-size:10pt; font-weight:normal; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "dd { font-size:10pt; margin-top:1pt; margin-bottom:1pt; }"CRLF
- "dd.member { font-size:10pt; margin-top:1pt; margin-bottom:1pt; background-color:#ffffff; }"CRLF
- "p { font-size:10pt; margin-top:3pt; margin-bottom:1pt; }"CRLF
- "pre { font-family:monospace; font-size:10pt; margin-top:1pt; margin-bottom:1pt; }"CRLF
- "tr { font-size:10pt; }"CRLF
- "td { font-size:10pt; }"CRLF
- CRLF
- "dt.attention { color:#dd0000; }"CRLF
- CRLF
- "div.title { text-align:center; line-height:26pt; background-color:#ccccff; }"CRLF
- ".subtitle { background-color:#ccccff; }"CRLF
- CRLF
- "td.flagname { background-color:#eeeeff; font-family:Arial; font-size:8pt; font-weight:bold; }"CRLF
- "td.flagyes { font-family:Arial; font-size:8pt; font-weight:bold; }"CRLF
- "td.flagno { font-family:Arial; font-size:8pt; }"CRLF
- "td.flagtext { font-family:Arial; font-size:8pt; font-weight:bold; }"CRLF
- CRLF
- "td.navimain, td.navimain a"CRLF
- " { background-color:#eeeeff; color:#000000;"CRLF
- " font-family:Arial; font-size:12pt; font-weight:bold; }"CRLF
- "td.navimainself"CRLF
- " { background-color:#2222ad; color:#ffffff;"CRLF
- " font-family:Arial; font-size:12pt; font-weight:bold; }"CRLF
- "td.navimainnone"CRLF
- " { background-color:#eeeeff; color:#000000;"CRLF
- " font-family:Arial; font-size:12pt; }"CRLF
- CRLF
- "div.define { font-family:Arial; background-color:#ccccff; }"CRLF
- CRLF
- ".nqclass { color:#008800; }"CRLF
- CRLF
- "h3.help { background-color:#eeeeff; margin-top:12pt; }"CRLF
- CRLF
- ".btpubl { color:#33ff33; }"CRLF
- ".btprot { color:#cc9933; }"CRLF
- ".btpriv { color:#ff6666; }"CRLF
- ".btvpubl { color:#33ff33; font-style:italic; }"CRLF
- ".btvprot { color:#cc9933; font-style:italic; }"CRLF
- ".btvpriv { color:#ff6666; font-style:italic; }"CRLF
- ".btself { font-weight:bold; }"CRLF
- ;
-
-
-const char * const
- C_sCssExplanations =
- "/* Explanation of CSS classes:"CRLF
- CRLF
- "dl.member provides coloured frame for function descriptions."CRLF
- "dd.member makes the content of this frame white"CRLF
- CRLF
- "dt.attention special colour for @attention remarks"CRLF
- CRLF
- "div.title HTML page headline"CRLF
- ".subtitle headline of lists of members and similar"CRLF
- CRLF
- " These are for the flagtables in classes:"CRLF
- "td.flagname Flag name."CRLF
- "td.flagyes flag value \"yes\""CRLF
- "td.flagno flag value \"no\""CRLF
- "td.flagtext other flag value"CRLF
- CRLF
- CRLF
- " These are for the main navigationbar:"CRLF
- "td.navimain, td.navimain a"CRLF
- " Links in navibar."CRLF
- "td.navimainself Text in navibar which refers to current page."CRLF
- "td.navimainnone Text which links to nothing."CRLF
- CRLF
- CRLF
- "div.define Subtitles on the #define/macro descriptions page"CRLF
- CRLF
- ".nqclass special color for classes in the qualification"CRLF
- " on top of type pages like in:"CRLF
- " ::nsp1::nsp2::_ClassXY_::"CRLF
- CRLF
- "h3.help Subtitles on the help page"CRLF
- CRLF
- " These are for the base class tree on class pages:"CRLF
- ".btpubl public base class"CRLF
- ".btprot protected"CRLF
- ".btpriv private"CRLF
- ".btvpubl virtual public"CRLF
- ".btvprot virtual protected"CRLF
- ".btvpriv virtual private"CRLF
- ".btself placeholder for currently displayed class"CRLF
- CRLF
- "*/"CRLF
- ;
-
-
-const char * const
- C_sStdStyle_withDivFrame =
- "body { background-color:#ffffff; }"CRLF
- "#adc-cppref h1 { font-size:20pt; margin-top:3pt; margin-bottom:7pt; }"CRLF
- "#adc-cppref h2 { font-family:Arial; font-size:16pt; margin-top:3pt; margin-bottom:5pt; }"CRLF
- "#adc-cppref h3 { font-size:13pt; margin-top:2pt; margin-bottom:3pt; }"CRLF
- "#adc-cppref h4 { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref dl { margin-top:1pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref dl.member { margin-top:1pt; margin-bottom:1pt; background-color:#eeeeff; }"CRLF
- "#adc-cppref dt { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref dt.member { font-size:13pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref dt.simple { font-size:10pt; font-weight:normal; margin-top:2pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref dd { font-size:10pt; margin-top:1pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref dd.member { font-size:10pt; margin-top:1pt; margin-bottom:1pt; background-color:#ffffff; }"CRLF
- "#adc-cppref p { font-size:10pt; margin-top:3pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref pre { font-family:monospace; font-size:10pt; margin-top:1pt; margin-bottom:1pt; }"CRLF
- "#adc-cppref tr { font-size:10pt; }"CRLF
- "#adc-cppref td { font-size:10pt; }"CRLF
- CRLF
- "#adc-cppref dt.attention { color:#dd0000; }"CRLF
- CRLF
- "#adc-cppref div.title { text-align:center; line-height:26pt; background-color:#ccccff; }"CRLF
- "#adc-cppref .subtitle { background-color:#ccccff; }"CRLF
- CRLF
- "#adc-cppref td.flagname { background-color:#eeeeff; font-family:Arial; font-size:8pt; font-weight:bold; }"CRLF
- "#adc-cppref td.flagyes { font-family:Arial; font-size:8pt; font-weight:bold; }"CRLF
- "#adc-cppref td.flagno { font-family:Arial; font-size:8pt; }"CRLF
- "#adc-cppref td.flagtext { font-family:Arial; font-size:8pt; font-weight:bold; }"CRLF
- CRLF
- "#adc-cppref td.navimain, #adc-cppref td.navimain a"CRLF
- " { background-color:#eeeeff; color:#000000;"CRLF
- " font-family:Arial; font-size:12pt; font-weight:bold; }"CRLF
- "#adc-cppref td.navimainself"CRLF
- " { background-color:#2222ad; color:#ffffff;"CRLF
- " font-family:Arial; font-size:12pt; font-weight:bold; }"CRLF
- "#adc-cppref td.navimainnone"CRLF
- " { background-color:#eeeeff; color:#000000;"CRLF
- " font-family:Arial; font-size:12pt; }"CRLF
- CRLF
- "#adc-cppref div.define { font-family:Arial; background-color:#ccccff; }"CRLF
- CRLF
- "#adc-cppref .nqclass { color:#008800; }"CRLF
- CRLF
- "#adc-cppref h3.help { background-color:#eeeeff; margin-top:12pt; }"CRLF
- CRLF
- "#adc-cppref .btpubl { color:#33ff33; }"CRLF
- "#adc-cppref .btprot { color:#cc9933; }"CRLF
- "#adc-cppref .btpriv { color:#ff6666; }"CRLF
- "#adc-cppref .btvpubl { color:#33ff33; font-style:italic; }"CRLF
- "#adc-cppref .btvprot { color:#cc9933; font-style:italic; }"CRLF
- "#adc-cppref .btvpriv { color:#ff6666; font-style:italic; }"CRLF
- "#adc-cppref .btself { font-weight:bold; }"CRLF
- ""CRLF
- "#adc-cppref table { empty-cells:show; }"CRLF
- ""CRLF
- "#adc-cppref .childlist td, "CRLF
- "#adc-cppref .commentedlinks td, "CRLF
- "#adc-cppref .memberlist td, "CRLF
- "#adc-cppref .subtitle td, "CRLF
- "#adc-cppref .crosstitle td { border: .1pt solid #000000; }"CRLF
- ""CRLF
- "#adc-cppref .flag-table td { border: .1pt solid #cccccc; } "CRLF
- ""CRLF
- "#adc-cppref .title-table td, "CRLF
- "#adc-cppref .table-in-method td, "CRLF
- "#adc-cppref .table-in-data td, "CRLF
- "#adc-cppref .navimain td, "CRLF
- "#adc-cppref .navisub td, "CRLF
- "#adc-cppref .expl-table td, "CRLF
- "#adc-cppref .param-table td { border: none; }"CRLF
- ;
-
-
-
-HtmlDocuFile::HtmlDocuFile()
- : sFilePath(),
- sTitle(),
- sLocation(),
- sCopyright(),
- nDepthInOutputTree(0),
- aBodyData(),
- aBuffer(60000) // Grows dynamically when necessary.
-{
-}
-
-void
-HtmlDocuFile::SetLocation( const csv::ploc::Path & i_rFilePath,
- uintt i_depthInOutputTree )
-{
- static StreamStr sPath_(1000);
- sPath_.seekp(0);
- i_rFilePath.Get( sPath_ );
-
- sFilePath = sPath_.c_str();
- nDepthInOutputTree = i_depthInOutputTree;
-}
-
-void
-HtmlDocuFile::SetTitle( const char * i_sTitle )
-{
- sTitle = i_sTitle;
-}
-
-void
-HtmlDocuFile::SetCopyright( const char * i_sCopyright )
-{
- sCopyright = i_sCopyright;
-}
-
-void
-HtmlDocuFile::EmptyBody()
-{
- aBodyData.SetContent(0);
-
- if (bUse_OOoFrameDiv)
- {
- // Insert <div> tag to allow better formatting for OOo.
- aBodyData
- << new xml::XmlCode("<div id=\"")
- << new xml::XmlCode(C_sOOoFrameDiv_CppId)
- << new xml::XmlCode("\">\n\n");
- }
-
- aBodyData
- >> *new html::Label( "_top_" )
- << " ";
-}
-
-bool
-HtmlDocuFile::CreateFile()
-{
- csv::File aFile(sFilePath, csv::CFM_CREATE);
- if (NOT aFile.open())
- {
- Cerr() << "Can't create file " << sFilePath << "." << Endl();
- return false;
- }
-
- WriteHeader(aFile);
- WriteBody(aFile);
-
- // Write end
- static const char sCompletion[] = "\n</html>\n";
- aFile.write( sCompletion );
-
- aFile.close();
- Cout() << '.' << Flush();
- return true;
-}
-
-void
-HtmlDocuFile::WriteCssFile( const csv::ploc::Path & i_rFilePath )
-{
- Cout() << "\nCreate css file ..." << Endl();
-
- csv::File
- aCssFile(i_rFilePath, csv::CFM_CREATE);
- csv::OpenCloseGuard
- aOpenGuard(aCssFile);
- if (NOT aOpenGuard)
- {
- Cerr() << "Can't create file " << "cpp.css" << "." << Endl();
- return;
- }
-
- aCssFile.write("/* Autodoc css file for C++ documentation */\n\n\n");
-
- if (bUse_OOoFrameDiv)
- aCssFile.write(C_sStdStyle_withDivFrame);
- else
- aCssFile.write(C_sStdStyle);
-
- aCssFile.write("\n\n\n");
- aCssFile.write(C_sCssExplanations);
-}
-
-void
-HtmlDocuFile::WriteHeader( csv::File & io_aFile )
-{
- aBuffer.reset();
-
- static const char s1[] =
- "<html>\n<head>\n"
- "<title>";
- static const char s2[] =
- "</title>\n"
- "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
- static const char s3[] =
- "\">\n</head>\n";
-
- aBuffer.write( s1 );
- aBuffer.write( sTitle );
- aBuffer.write( s2 );
- aBuffer.write( output::get_UpLink(nDepthInOutputTree) );
- aBuffer.write( C_sHFN_Css );
- aBuffer.write( s3 );
-
- io_aFile.write(aBuffer.c_str(), aBuffer.size());
-}
-
-void
-HtmlDocuFile::WriteBody( csv::File & io_aFile )
-{
- aBuffer.reset();
-
- aBodyData
- >> *new html::Link( "#_top_" )
- << new html::ClassAttr( "objchapter" )
- << "Top of Page";
-
- if ( sCopyright.length() > 0 )
- {
- aBodyData
- << new xml::XmlCode("<hr size=\"3\">");
-
- aBodyData
- >> *new html::Paragraph
- << new html::ClassAttr( "copyright" )
- << new xml::AnAttribute( "align", "center" )
- << new xml::XmlCode(sCopyright);
- }
-
- if (bUse_OOoFrameDiv)
- {
- // Insert <div> tag to allow better formatting for OOo.
- aBodyData
- << new xml::XmlCode("\n</div> <!-- id=\"")
- << new xml::XmlCode(C_sOOoFrameDiv_CppId)
- << new xml::XmlCode("\" -->\n");
- }
-
- aBodyData.WriteOut(aBuffer);
- io_aFile.write(aBuffer.c_str(), aBuffer.size());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/outfile.hxx b/autodoc/source/display/html/outfile.hxx
deleted file mode 100644
index f4d14c12..00000000
--- a/autodoc/source/display/html/outfile.hxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_OUTFILE_HXX
-#define ADC_DISPLAY_HTML_OUTFILE_HXX
-
-// USED SERVICES
-#include <udm/html/htmlitem.hxx>
-#include <cosv/ploc.hxx>
-
-
-namespace csv
-{
- class File;
-}
-
-
-
-
-class HtmlDocuFile
-{
- public:
- // LIFECYCLE
- HtmlDocuFile();
-
- void SetLocation(
- const csv::ploc::Path &
- i_rFilePath,
- uintt i_depthInOutputTree );
- void SetTitle(
- const char * i_sTitle );
- void SetCopyright(
- const char * i_sCopyright );
- void EmptyBody();
-
- Html::Body & Body() { return aBodyData; }
- bool CreateFile();
-
- static void WriteCssFile(
- const csv::ploc::Path &
- i_rFilePath );
- private:
- void WriteHeader(
- csv::File & io_aFile );
- void WriteBody(
- csv::File & io_aFile );
-
- // DATA
- String sFilePath;
- String sTitle;
- String sLocation;
- String sCopyright;
- uintt nDepthInOutputTree;
-
- Html::Body aBodyData;
- StreamStr aBuffer; // Output buffer, should be transfered into csv::File.
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pagemake.cxx b/autodoc/source/display/html/pagemake.cxx
deleted file mode 100644
index 436ab40f..00000000
--- a/autodoc/source/display/html/pagemake.cxx
+++ /dev/null
@@ -1,578 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pagemake.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <display/corframe.hxx>
-#include "hd_chlst.hxx"
-#include "hd_docu.hxx"
-#include "hdimpl.hxx"
-#include "html_kit.hxx"
-#include "navibar.hxx"
-#include "opageenv.hxx"
-#include "outfile.hxx"
-#include "pm_aldef.hxx"
-#include "pm_class.hxx"
-#include "pm_help.hxx"
-#include "pm_index.hxx"
-#include "pm_namsp.hxx"
-#include "pm_start.hxx"
-#include "strconst.hxx"
-
-
-using namespace csi;
-using csi::html::Link;
-using csi::html::HorizontalLine;
-
-
-const int C_nNrOfIndexLetters = 27;
-
-
-template <class SPECIAL_MAKER>
-inline void
-Make_SpecialPage( DYN SPECIAL_MAKER * let_dpMaker )
-{
- Dyn< SPECIAL_MAKER > pMaker( let_dpMaker );
- pMaker->MakePage();
- pMaker = 0;
-}
-
-
-PageDisplay::PageDisplay( OuputPage_Environment & io_rEnv )
- : HtmlDisplay_Impl( io_rEnv ),
- pMyFile( new HtmlDocuFile )
-{
-}
-
-PageDisplay::~PageDisplay()
-{
-
-}
-
-void
-PageDisplay::Create_OverviewFile()
-{
- Env().SetFile_Overview();
- File().SetLocation( Env().CurPath(), 0 );
-
- SetupFileOnCurEnv( C_sHFTitle_Overview );
- Make_SpecialPage( new PageMaker_Overview(*this) );
- Create_File();
-}
-
-void
-PageDisplay::Create_AllDefsFile()
-{
- // This method is a provisorium, because later this will
- // be spreaded over the files.
-
- Env().MoveDir_2Root();
- Env().SetFile_AllDefs();
- File().SetLocation( Env().CurPath(), 0 );
-
- SetupFileOnCurEnv( "Defines and Macros" );
- Make_SpecialPage( new PageMaker_AllDefs(*this) );
- Create_File();
-}
-
-void
-PageDisplay::Create_IndexFiles()
-{
- Env().MoveDir_2Index();
-
- for ( int i = 0; i < C_nNrOfIndexLetters; ++i )
- Create_IndexFile(i);
-}
-
-void
-PageDisplay::Create_HelpFile()
-{
- Env().SetFile_Help();
- File().SetLocation( Env().CurPath(), 0 );
-
- SetupFileOnCurEnv( C_sHFTitle_Help );
- Make_SpecialPage( new PageMaker_Help(*this) );
- Create_File();
-}
-
-void
-PageDisplay::Create_NamespaceFile()
-{
- csv_assert( Env().CurNamespace() != 0 );
- Env().SetFile_CurNamespace();
- File().SetLocation( Env().CurPath(), Env().Depth() );
- if (Env().CurNamespace()->Owner().IsValid())
- {
- StreamLock sNsp(100);
- SetupFileOnCurEnv( sNsp() << C_sHFTypeTitle_Namespace
- << " "
- << Env().CurNamespace()->LocalName()
- << c_str );
- }
- else
- {
- SetupFileOnCurEnv( C_sHFTitle_GlobalNamespaceCpp );
- }
-
- Make_SpecialPage( new PageMaker_Namespace(*this) );
-
- Create_File();
-}
-
-void
-PageDisplay::Setup_OperationsFile_for( const ary::loc::File & i_rFile )
-{
- csv_assert( Env().CurNamespace() != 0 );
- Env().SetFile_Operations(&i_rFile);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- StreamLock sOpFile(100);
- SetupFileOnCurEnv( sOpFile() << "Global Functions in Namespace "
- << Env().CurNamespace()->LocalName()
- << " in Sourcefile "
- << i_rFile.LocalName()
- << c_str );
- NavigationBar
- aNavi( Env(),
- NavigationBar::CEGT_operations );
- aNavi.Write( CurOut() );
- CurOut() << new HorizontalLine;
-
- adcdisp::PageTitle_Std fTitle;
- csi::xml::Element & rTitle = fTitle( CurOut() );
- if (Env().CurNamespace()->Owner().IsValid())
- {
- rTitle << "Global Functions in Namespace "
- << Env().CurNamespace()->LocalName();
- }
- else
- {
- rTitle << "Global Functions in Global Namespace C++";
- }
-
- rTitle << new html::LineBreak
- << "in Sourcefile "
- << i_rFile.LocalName();
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Setup_OperationsFile_for( const ary::cpp::Class & i_rClass )
-{
- csv_assert( Env().CurNamespace() != 0 );
- Env().SetFile_Operations(0);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- StreamLock sOpFile(100);
- SetupFileOnCurEnv( sOpFile() << "Methods of Class "
- << i_rClass.LocalName()
- << c_str );
- NavigationBar
- aNavi( Env(),
- NavigationBar::CEGT_operations );
- aNavi.Write( CurOut() );
- CurOut() << new HorizontalLine;
-
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), "Methods of Class", i_rClass.LocalName() );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Setup_DataFile_for( const ary::loc::File & i_rFile )
-{
- csv_assert( Env().CurNamespace() != 0 );
- Env().SetFile_Data(&i_rFile);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- StreamLock sDataFile(100);
- SetupFileOnCurEnv( sDataFile() << "Global Data in Namespace "
- << Env().CurNamespace()->LocalName()
- << " in Sourcefile "
- << i_rFile.LocalName()
- << c_str );
- NavigationBar
- aNavi( Env(),
- NavigationBar::CEGT_data );
- aNavi.Write( CurOut() );
- CurOut() << new HorizontalLine;
-
- adcdisp::PageTitle_Std fTitle;
- csi::xml::Element & rTitle = fTitle( CurOut() );
- if ( Env().CurNamespace()->Owner().IsValid() )
- {
- rTitle << "Global Data in Namespace "
- << Env().CurNamespace()->LocalName();
- }
- else
- {
- rTitle << "Global Data in Global Namespace C++";
- }
-
- rTitle
- << new html::LineBreak
- << "in Sourcefile "
- << i_rFile.LocalName();
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Setup_DataFile_for( const ary::cpp::Class & i_rClass )
-{
- csv_assert( Env().CurNamespace() != 0 );
- Env().SetFile_Data(0);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- StreamLock sDataFile(100);
- SetupFileOnCurEnv( sDataFile() << "Data of Class "
- << i_rClass.LocalName()
- << c_str );
-
- NavigationBar
- aNavi( Env(),
- NavigationBar::CEGT_data );
- aNavi.Write( CurOut() );
- CurOut() << new HorizontalLine;
-
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), "Data of Class", i_rClass.LocalName() );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Create_File()
-{
- Easy().Leave();
- File().CreateFile();
-}
-
-void
-PageDisplay::do_Process(const ary::cpp::Class & i_rData)
-{
- Env().SetFile_Class(i_rData);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- const char *
- sTypeTitle = i_rData.ClassKey() == ary::cpp::CK_class
- ? C_sHFTypeTitle_Class
- : i_rData.ClassKey() == ary::cpp::CK_struct
- ? C_sHFTypeTitle_Struct
- : C_sHFTypeTitle_Union;
- StreamLock sClassFile(60);
- SetupFileOnCurEnv( sClassFile() << sTypeTitle
- << " "
- << i_rData.LocalName()
- << c_str );
-
- Make_SpecialPage( new PageMaker_Class(*this, i_rData) );
-
- Create_File();
-}
-
-void
-PageDisplay::do_Process(const ary::cpp::Enum & i_rData)
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- Env().SetFile_Enum(i_rData);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- StreamLock sEnumFile(100);
- SetupFileOnCurEnv( sEnumFile() << C_sHFTypeTitle_Enum
- << " "
- << i_rData.LocalName()
- << c_str );
- Write_NavBar_Enum(i_rData);
- Write_TopArea_Enum(i_rData);
- Write_DocuArea_Enum(i_rData);
- Write_ChildList_Enum(i_rData);
-
- Create_File();
-}
-
-void
-PageDisplay::do_Process(const ary::cpp::Typedef & i_rData)
-{
- if ( Ce_IsInternal(i_rData) )
- return;
-
- Env().SetFile_Typedef(i_rData);
- File().SetLocation( Env().CurPath(), Env().Depth() );
-
- StreamLock sTypedefFile(100);
- SetupFileOnCurEnv( sTypedefFile() << C_sHFTypeTitle_Typedef
- << " "
- << i_rData.LocalName()
- << c_str );
- Write_NavBar_Typedef(i_rData);
- Write_TopArea_Typedef(i_rData);
- Write_DocuArea_Typedef(i_rData);
-
-
- Create_File();
-}
-
-void
-PageDisplay::Write_NameChainWithLinks( const ary::cpp::CodeEntity & i_rCe )
-{
- if ( Env().CurNamespace()->Id() != i_rCe.Id() )
- {
- RecursiveWrite_NamespaceLink( Env().CurNamespace() );
- if ( Env().CurClass() != 0 )
- {
- CurOut() << new html::Sbr;
- RecursiveWrite_ClassLink( Env().CurClass(), 1 );
- }
- }
- else
- {
- RecursiveWrite_NamespaceLink( Env().CurNamespace()->Parent() );
- }
-}
-
-const ary::cpp::Gate *
-PageDisplay::inq_Get_ReFinder() const
-{
- return &Env().Gate();
-}
-
-void
-PageDisplay::RecursiveWrite_NamespaceLink( const ary::cpp::Namespace * i_pNamespace )
-{
- if ( i_pNamespace == 0 )
- {
- return;
- }
- else if (NOT i_pNamespace->Owner().IsValid())
- { // Global namespace:
- StreamLock sNspDir(50);
- CurOut()
- >> *new Link( PathPerRoot(Env(),
- sNspDir() << C_sDIR_NamespacesCpp
- << "/"
- << C_sHFN_Namespace
- << c_str) )
- << new xml::AnAttribute( "alt", C_sHFTitle_GlobalNamespaceCpp )
- >> *new html::Font
- << new html::SizeAttr("+1")
- >> *new html::Bold
- << "::";
- CurOut()
- << " ";
- return;
- }
- else
- {
- RecursiveWrite_NamespaceLink( i_pNamespace->Parent() );
- }
-
- uintt nLevelDistance = Env().Depth() - ( i_pNamespace->Depth() + 1 );
- csv_assert( nLevelDistance < 100 );
- CurOut()
- >> *new Link( PathPerLevelsUp(nLevelDistance, C_sHFN_Namespace) )
- << new xml::AnAttribute( "alt", C_sHFTypeTitle_Namespace)
- >> *new html::Font
- << new html::SizeAttr("+1")
- >> *new html::Bold
- << i_pNamespace->LocalName();
- CurOut()
- >> *new html::Font
- << new html::SizeAttr("+1")
- << " :: ";
-}
-
-void
-PageDisplay::RecursiveWrite_ClassLink( const ary::cpp::Class * i_pClass,
- uintt i_nLevelDistance )
-{
- if ( i_pClass == 0 )
- return;
-
- if ( i_pClass->Protection() != ary::cpp::PROTECT_global )
- {
- RecursiveWrite_ClassLink(
- dynamic_cast< const ary::cpp::Class* >(
- Env().Gate().Ces().Search_Ce(i_pClass->Owner())),
- i_nLevelDistance + 1 );
- }
-
- CurOut()
- >> *new Link( Path2Class(i_nLevelDistance, i_pClass->LocalName()) )
- << new html::ClassAttr("nqclass")
- << i_pClass->LocalName()
- << " :: ";
-}
-
-void
-PageDisplay::SetupFileOnCurEnv( const char * i_sTitle )
-{
- File().SetLocation( Env().CurPath(), Env().Depth() );
- File().SetTitle( i_sTitle );
- File().SetCopyright( Env().Layout().CopyrightText() );
- File().EmptyBody();
-
- // This sets CurOut() to the contents of <body></body>
- // in File() :
- Easy().Enter( File().Body() );
-}
-
-void
-PageDisplay::Write_NavBar_Enum( const ary::cpp::Enum & i_rData )
-{
- NavigationBar aNavi( Env(), i_rData );
- aNavi.MakeSubRow("List of");
- aNavi.AddItem( C_sTitle_EnumValues, C_sLabel_EnumValues, true );
- aNavi.Write( CurOut(), true );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Write_TopArea_Enum( const ary::cpp::Enum & i_rData )
-{
- Write_NameChainWithLinks( i_rData );
-
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), C_sHFTypeTitle_Enum, i_rData.LocalName() );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Write_DocuArea_Enum( const ary::cpp::Enum & i_rData )
-{
- Docu_Display aDocuShow( Env() );
-
- aDocuShow.Assign_Out(CurOut());
- aDocuShow.Process(i_rData.Docu());
- aDocuShow.Unassign_Out();
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Write_ChildList_Enum( const ary::cpp::Enum & i_rData )
-{
- bool bChildrenExist = false;
- ChildList_Display::Area_Result
- aResult( bChildrenExist, CurOut() );
-
- ChildList_Display aDisplay(Env(), i_rData);
- aDisplay.Run_Simple( aResult,
- ary::cpp::Enum::SLOT_Values,
- C_sLabel_EnumValues,
- C_sTitle_EnumValues );
-
- if (NOT bChildrenExist)
- CurOut() >> *new html::Headline(4) << "This enum has no values.";
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Write_NavBar_Typedef( const ary::cpp::Typedef & i_rData )
-{
- NavigationBar aNavi( Env(), i_rData );
- aNavi.Write( CurOut(), true );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Write_TopArea_Typedef( const ary::cpp::Typedef & i_rData )
-{
- Write_NameChainWithLinks( i_rData );
-
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), C_sHFTypeTitle_Typedef, i_rData.LocalName() );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Write_DocuArea_Typedef( const ary::cpp::Typedef & i_rData )
-{
- adcdisp::ExplanationList aDef( CurOut() );
- aDef.AddEntry("Definition:");
- xml::Element & rDef = aDef.Def();
-
- ary::cpp::Type_id
- nDefiningType = i_rData.DescribingType();
-
- const ary::cpp::CodeEntity *
- pRelatedCe = Env().Gate().Search_RelatedCe(nDefiningType);
- if ( pRelatedCe != 0 )
- {
- const char * sTypeKey = Get_TypeKey(*pRelatedCe);
- if ( NOT csv::no_str(sTypeKey) )
- rDef << sTypeKey << " ";
- }
-
- dshelp::Get_LinkedTypeText( rDef, Env(), nDefiningType );
-
- Docu_Display aDocuShow( Env() );
-
- aDocuShow.Assign_Out(CurOut());
- aDocuShow.Process(i_rData.Docu());
- aDocuShow.Unassign_Out();
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageDisplay::Create_IndexFile( int i_nLetter )
-{
- static char aLetters[C_nNrOfIndexLetters+1] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
- csv_assert( 0 <= i_nLetter AND i_nLetter < C_nNrOfIndexLetters );
-
- char cCurLetter = aLetters[i_nLetter];
- Env().SetFile_Index( cCurLetter );
-
- static char sIndexFileTitle[] = "Global Index X";
- const int nPositionOfLetterInTitle = 13;
- sIndexFileTitle[nPositionOfLetterInTitle] = cCurLetter;
- SetupFileOnCurEnv( sIndexFileTitle );
-
- Make_SpecialPage( new PageMaker_Index(*this, cCurLetter ) );
-
- Create_File();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pagemake.hxx b/autodoc/source/display/html/pagemake.hxx
deleted file mode 100644
index 62fc7d4d..00000000
--- a/autodoc/source/display/html/pagemake.hxx
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PAGEMAKE_HXX
-#define ADC_DISPLAY_HTML_PAGEMAKE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/ary_disp.hxx>
-#include <cosv/tpl/processor.hxx>
-#include "hdimpl.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/cpp/c_namesp.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- }
- namespace loc
- {
- class File;
- }
-}
-
-
-class OuputPage_Environment;
-class HtmlDocuFile;
-
-
-
-class PageDisplay : public ary::Display,
- public csv::ConstProcessor<ary::cpp::Class>,
- public csv::ConstProcessor<ary::cpp::Enum>,
- public csv::ConstProcessor<ary::cpp::Typedef>,
- public HtmlDisplay_Impl
-{
- public:
- PageDisplay(
- OuputPage_Environment &
- io_rEnv );
- virtual ~PageDisplay();
-
- void Create_OverviewFile();
- void Create_AllDefsFile();
- void Create_IndexFiles();
- void Create_HelpFile();
-
- void Create_NamespaceFile();
-
- void Setup_OperationsFile_for(
- const ary::loc::File &
- i_rFile );
- void Setup_OperationsFile_for(
- const ary::cpp::Class &
- i_rClass );
- void Setup_DataFile_for(
- const ary::loc::File &
- i_rFile );
- void Setup_DataFile_for(
- const ary::cpp::Class &
- i_rClass );
- /// Used with Setup_OperatonsFile_for().
- void Create_File();
-
-
- // Interface for Children of SpecializedPageMaker:
- void Write_NameChainWithLinks(
- const ary::cpp::CodeEntity &
- i_rCe );
-
- // Necessary, to call Process() on this class.
- using csv::ConstProcessor<ary::cpp::Class>::Process;
- using csv::ConstProcessor<ary::cpp::Enum>::Process;
- using csv::ConstProcessor<ary::cpp::Typedef>::Process;
-
- private:
- // Interface csv::ConstProcessor<>:
- virtual void do_Process(
- const ary::cpp::Class &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Enum &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Typedef &
- i_rData );
- // Interface ary::cpp::Display:
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
- // Locals
- HtmlDocuFile & File() { return *pMyFile; }
- void RecursiveWrite_NamespaceLink(
- const ary::cpp::Namespace *
- i_pNamespace );
- void RecursiveWrite_ClassLink(
- const ary::cpp::Class *
- i_pClass,
- uintt i_nLevelDistance );
- void SetupFileOnCurEnv(
- const char * i_sTitle );
- void Write_NavBar_Enum(
- const ary::cpp::Enum &
- i_rData );
- void Write_TopArea_Enum(
- const ary::cpp::Enum &
- i_rData );
- void Write_DocuArea_Enum(
- const ary::cpp::Enum &
- i_rData );
- void Write_ChildList_Enum(
- const ary::cpp::Enum &
- i_rData );
- void Write_NavBar_Typedef(
- const ary::cpp::Typedef &
- i_rData );
- void Write_TopArea_Typedef(
- const ary::cpp::Typedef &
- i_rData );
- void Write_DocuArea_Typedef(
- const ary::cpp::Typedef &
- i_rData );
- void Create_IndexFile(
- int i_nLetter );
-
- // DATA
- Dyn<HtmlDocuFile> pMyFile;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_aldef.cxx b/autodoc/source/display/html/pm_aldef.cxx
deleted file mode 100644
index 1ca8743d..00000000
--- a/autodoc/source/display/html/pm_aldef.cxx
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_aldef.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/cp_def.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <ary/getncast.hxx>
-#include "hd_docu.hxx"
-#include "html_kit.hxx"
-#include "navibar.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-#include "strconst.hxx"
-
-
-using namespace csi;
-using csi::html::HorizontalLine;
-using csi::html::Link;
-using csi::html::Label;
-using csi::html::AlignAttr;
-
-
-
-PageMaker_AllDefs::PageMaker_AllDefs( PageDisplay & io_rPage )
- : SpecializedPageMaker(io_rPage),
- pDocuDisplay( new Docu_Display(io_rPage.Env()) ),
- pNavi(0)
-{
-}
-
-PageMaker_AllDefs::~PageMaker_AllDefs()
-{
-}
-
-void
-PageMaker_AllDefs::MakePage()
-{
- pNavi = new NavigationBar( Env(), NavigationBar::LOC_AllDefs );
- Write_NavBar();
-
- Write_TopArea();
-
- Write_DefinesList();
- Write_MacrosList();
-
- pNavi->Write_SubRows();
-}
-
-void
-PageMaker_AllDefs::Write_NavBar()
-{
- pNavi->MakeSubRow( "" );
- pNavi->AddItem( "Defines", "defines", true );
- pNavi->AddItem( "Macros", "macros", true );
- pNavi->Write( CurOut() );
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_AllDefs::Write_TopArea()
-{
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), "Defines and ", "Macros" );
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_AllDefs::Write_DocuArea()
-{
- // Not needed.
-}
-
-void
-PageMaker_AllDefs::Write_DefinesList()
-{
- CurOut()
- << new html::LineBreak
- << new html::LineBreak
- >> *new xml::AnElement("div")
- << new html::ClassAttr("define")
- >> *new html::Label("defines")
- >> *new html::Headline(3)
- << "Defines";
-
- ary::cpp::DefsResultList
- aAllDefines = Env().Gate().Defs().AllDefines();
- ary::cpp::DefsConstIterator
- itEnd = aAllDefines.end();
-
- if (aAllDefines.begin() != itEnd)
- {
- for ( ary::cpp::DefsConstIterator it = aAllDefines.begin();
- it != itEnd;
- ++it )
- {
- Write_Define(*it);
- }
- }
- else
- {
- CurOut() << "None.";
- }
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_AllDefs::Write_MacrosList()
-
-{
- CurOut()
- << new html::LineBreak
- << new html::LineBreak
- >> *new xml::AnElement("div")
- << new html::ClassAttr("define")
- >> *new html::Label("macros")
- >> *new html::Headline(3)
- << "Macros";
-
- ary::cpp::DefsResultList
- aAllMacros = Env().Gate().Defs().AllMacros();
- ary::cpp::DefsConstIterator
- itEnd = aAllMacros.end();
-
- if (aAllMacros.begin() != itEnd)
- {
- for ( ary::cpp::DefsConstIterator it = aAllMacros.begin();
- it != itEnd;
- ++it )
- {
- Write_Macro(*it);
- }
- }
- else
- {
- CurOut() << "None.";
- }
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_AllDefs::Write_Define(De_id i_nId)
-{
- csv_assert( ary::is_type<ary::cpp::Define>( Env().Gate().Defs().Find_Def(i_nId)) );
- const ary::cpp::Define &
- rDef = static_cast< const ary::cpp::Define& >( Env().Gate().Defs().Find_Def(i_nId) );
-
- CurOut() << new html::HorizontalLine;
-
- adcdisp::ExplanationList aDocu( CurOut(), true );
- aDocu.AddEntry();
-
- aDocu.Term()
- >> *new html::Label( rDef.LocalName() )
- << " ";
- aDocu.Term()
- << rDef.LocalName();
-
- Write_DefsDocu( aDocu.Def(), rDef );
-}
-
-void
-PageMaker_AllDefs::Write_Macro(De_id i_nId)
-{
- csv_assert( Env().Gate().Defs().Find_Def(i_nId).AryClass() == ary::cpp::Macro::class_id );
- const ary::cpp::Macro &
- rDef = static_cast< const ary::cpp::Macro& >( Env().Gate().Defs().Find_Def(i_nId) );
-
- CurOut() << new html::HorizontalLine;
-
- adcdisp::ExplanationList aDocu( CurOut(), true );
- aDocu.AddEntry();
-
- aDocu.Term()
- >> *new html::Label( rDef.LocalName() )
- << " ";
- aDocu.Term()
- << rDef.LocalName()
- << "(";
- WriteOut_TokenList( aDocu.Term(), rDef.Params(), ", " );
- aDocu.Term()
- << ")";
-
- Write_DefsDocu( aDocu.Def(), rDef );
-}
-
-
-void
-PageMaker_AllDefs::Write_DefsDocu( csi::xml::Element & o_rOut,
- const ary::cpp::DefineEntity & i_rTextReplacement )
-{
- if ( i_rTextReplacement.DefinitionText().size() > 0 )
- {
- EraseLeadingSpace( *const_cast< String * >(
- &(*i_rTextReplacement.DefinitionText().begin())
- ) );
- }
-
- adcdisp::ExplanationTable rList( o_rOut );
-
- rList.AddEntry( "Defined As" );
- WriteOut_TokenList( rList.Def(), i_rTextReplacement.DefinitionText(), " " );
-
- const ary::loc::File &
- rFile = Env().Gate().Locations().Find_File( i_rTextReplacement.Location() );
- rList.AddEntry( "In File" );
- rList.Def() << rFile.LocalName();
-
- ShowDocu_On( o_rOut, *pDocuDisplay, i_rTextReplacement );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_aldef.hxx b/autodoc/source/display/html/pm_aldef.hxx
deleted file mode 100644
index 14700e97..00000000
--- a/autodoc/source/display/html/pm_aldef.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PM_ALDEF_HXX
-#define ADC_DISPLAY_HTML_PM_ALDEF_HXX
-
-// BASE CLASSES
-#include "pm_base.hxx"
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-using ary::cpp::De_id;
-
-namespace ary
-{
- namespace cpp
- {
- class DefineEntity;
- }
-}
-
-class Docu_Display;
-class NavigationBar;
-
-
-
-
-
-class PageMaker_AllDefs : public SpecializedPageMaker
-{
- public:
- PageMaker_AllDefs(
- PageDisplay & io_rPage );
-
- virtual ~PageMaker_AllDefs();
-
- virtual void MakePage();
-
- private:
- typedef std::vector<De_id> List_Ids;
- typedef List_Ids::const_iterator ids_iterator;
-
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_DocuArea();
- virtual void Write_DefinesList();
- virtual void Write_MacrosList();
- void Write_Define(
- De_id i_nId );
- void Write_Macro(
- De_id i_nId );
- void Write_DefsDocu(
- csi::xml::Element & o_rOut,
- const ary::cpp::DefineEntity &
- i_rTextReplacement );
-
- // DATA
- Dyn<Docu_Display> pDocuDisplay;
- Dyn<NavigationBar> pNavi;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_base.cxx b/autodoc/source/display/html/pm_base.cxx
deleted file mode 100644
index 5e762d35..00000000
--- a/autodoc/source/display/html/pm_base.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_base.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-
-
-//******************** SpecializedPageMaker *********************//
-
-SpecializedPageMaker::SpecializedPageMaker( PageDisplay & io_rPage )
- : pEnv( &io_rPage.Env() ),
- pCurOut( &io_rPage.CurOut() ),
- pPage( &io_rPage )
-{
-}
-
-void
-SpecializedPageMaker::Write_NavBar()
-{
- // Dummy
-}
-
-void
-SpecializedPageMaker::Write_TopArea()
-{
- // Dummy
-}
-
-void
-SpecializedPageMaker::Write_DocuArea()
-{
- // Dummy
-}
-
-//void
-//SpecializedPageMaker::Write_ChildList( ary::SlotAccessId ,
-// const char * ,
-// const char * )
-//{
-// // Dummy
-//}
-
-csi::xml::Element &
-SpecializedPageMaker::CurOut()
-{
- return Page().CurOut();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_base.hxx b/autodoc/source/display/html/pm_base.hxx
deleted file mode 100644
index 45ef09dc..00000000
--- a/autodoc/source/display/html/pm_base.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_PM_BASE_HXX
-#define ADC_DISPLAY_PM_BASE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include "hdimpl.hxx"
-
-
-
-class OuputPage_Environment;
-namespace csi
-{
- namespace xml
- {
- class Element;
- }
-}
-class PageDisplay;
-
-
-/** Interface for making a special kind of HTML-Page
-*/
-class SpecializedPageMaker
-{
- public:
- virtual ~SpecializedPageMaker() {}
-
- virtual void MakePage() = 0;
-
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_DocuArea();
-// virtual void Write_ChildList(
-// ary::SlotAccessId i_nSlot,
-// const char * i_nListTitle,
-// const char * i_nLabel );
-
- protected:
- SpecializedPageMaker(
- PageDisplay & io_rPage );
-
- OuputPage_Environment &
- Env() const { return *pEnv; }
- csi::xml::Element & CurOut();
- PageDisplay & Page() { return *pPage; }
-
- private:
- OuputPage_Environment *
- pEnv;
- csi::xml::Element * pCurOut;
- PageDisplay * pPage;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_class.cxx b/autodoc/source/display/html/pm_class.cxx
deleted file mode 100644
index 8c22be5c..00000000
--- a/autodoc/source/display/html/pm_class.cxx
+++ /dev/null
@@ -1,813 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_class.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <ary/getncast.hxx>
-#include "hd_chlst.hxx"
-#include "hd_docu.hxx"
-#include "hdimpl.hxx"
-#include "html_kit.hxx"
-#include "navibar.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-#include "strconst.hxx"
-
-using namespace adcdisp;
-
-using namespace csi;
-using csi::html::HorizontalLine;
-using csi::html::LineBreak;
-using csi::html::Link;
-using csi::html::Table;
-using csi::html::TableRow;
-using csi::html::TableCell;
-
-using ary::cpp::CesConstIterator;
-using ary::doc::OldCppDocu;
-
-const char * const C_sTitle_InnerClasses = "Classes";
-const char * const C_sTitle_InnerStructs = "Structs";
-const char * const C_sTitle_InnerUnions = "Unions";
-const char * const C_sTitle_Methods = "Methods";
-const char * const C_sTitle_StaticMethods = "Static Methods";
-const char * const C_sTitle_Data = "Data";
-const char * const C_sTitle_StaticData = "Static Data";
-
-const char * const C_sLabel_StaticOperations = "static_ops";
-const char * const C_sLabel_StaticVariables = "static_vars";
-
-const char * const C_sTitlePublic = "Public Members";
-const char * const C_sTitleProtected = "Protected Members";
-const char * const C_sTitlePrivate = "Private Members";
-const char * const C_sMprTitles[3] = { C_sTitlePublic,
- C_sTitleProtected,
- C_sTitlePrivate
- };
-const char * const C_sSummaryTitlePublic = "Public Members";
-const char * const C_sSummaryTitleProtected = "Protected Members";
-const char * const C_sSummaryTitlePrivate = "Private Members";
-const char *
- C_sMprSummaryTitles[3] =
- { C_sSummaryTitlePublic, C_sSummaryTitleProtected, C_sSummaryTitlePrivate };
-const char *
- C_sMprPrefixes[3] =
- { "publ_", "prot_", "priv_" };
-const char *
- C_sSummaryItems_Titles[PageMaker_Class::cl_MAX] =
- { C_sTitle_InnerClasses, C_sTitle_InnerStructs, C_sTitle_InnerUnions,
- C_sTitle_Enums, C_sTitle_Typedefs,
- C_sTitle_Methods, C_sTitle_StaticMethods, C_sTitle_Data, C_sTitle_StaticData };
-const char *
- C_sSummaryItems_Labels[PageMaker_Class::cl_MAX] =
- { C_sLabel_Classes, C_sLabel_Structs, C_sLabel_Unions,
- C_sLabel_Enums, C_sLabel_Typedefs,
- C_sLabel_Operations, C_sLabel_StaticOperations,
- C_sLabel_Variables, C_sLabel_StaticVariables };
-
-
-const ary::cpp::E_Protection
- aProt[3] = { ary::cpp::PROTECT_public,
- ary::cpp::PROTECT_protected,
- ary::cpp::PROTECT_private };
-
-
-PageMaker_Class::PageMaker_Class( PageDisplay & io_rPage,
- const ary::cpp::Class & i_rClass )
- : SpecializedPageMaker(io_rPage),
- pMe( &i_rClass ),
- pChildDisplay( new ChildList_Display(io_rPage.Env(), i_rClass) ),
- pNavi(0)
- // pProtectionArea,
- // bChildLists_Exist
-{
- int i_max = 3 * cl_MAX;
- for (int i = 0; i < i_max; i++)
- {
- bChildLists_Exist[i] = false;
- } // end for
-}
-
-PageMaker_Class::~PageMaker_Class()
-{
-}
-
-void
-PageMaker_Class::MakePage()
-{
- pNavi = new NavigationBar( Env(), Me() );
-
- Write_NavBar();
- Write_TopArea();
- Write_DocuArea();
- Write_ChildLists();
-
- pNavi->Write_SubRows();
- pNavi = 0;
-}
-
-void
-PageMaker_Class::Write_NavBar()
-{
- NavigationBar aNavi( Env(), Me() );
- pNavi->Write( CurOut() );
- CurOut() << new HorizontalLine;
-}
-
-inline bool
-IsInterface(const ary::doc::Documentation & i_doc)
-{
- const OldCppDocu *
- doc = Get_CppDocu(i_doc);
- return doc != 0
- ? doc->IsInterface()
- : false;
-}
-
-void
-PageMaker_Class::Write_TopArea()
-{
- TemplateClause fTemplateClause;
- PageTitle_Std fTitle;
-
- Page().Write_NameChainWithLinks( Me() );
-
- fTemplateClause( CurOut(), Me().TemplateParameters() );
- fTitle( CurOut(), Get_ClassTypeKey(Me()), Me().LocalName() );
-
- CurOut() << new HorizontalLine;
-
- Write_BaseHierarchy();
- Write_DerivedList();
-
- CurOut() << new LineBreak;
-
- adcdisp::FlagTable
- aFlags( CurOut(), 4 );
- aFlags.SetColumn( 0, "virtual",
- Me().Virtuality() != ary::cpp::VIRTUAL_none );
- aFlags.SetColumn( 1, "abstract",
- Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
- aFlags.SetColumn( 2, "interface",
- IsInterface(Me().Docu())
- OR Me().Virtuality() == ary::cpp::VIRTUAL_abstract );
- aFlags.SetColumn( 3, "template",
- Me().TemplateParameters().size() > 0 );
-}
-
-void
-PageMaker_Class::Write_DocuArea()
-{
- Docu_Display aDocuShow( Env() );
-
- aDocuShow.Assign_Out(CurOut());
- Me().Accept( aDocuShow );
- aDocuShow.Unassign_Out();
-
- ary::loc::File &
- rFile = Env().Gate().Locations().Find_File( Me().Location() );
-
- adcdisp::ExplanationList
- aFileText( CurOut() );
- aFileText.AddEntry("File");
- aFileText.Def()
- << rFile.LocalName();
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Class::Write_ChildLists()
-{
- int i_max = 3 * cl_MAX;
- for (int i = 0; i < i_max; i++)
- {
- bChildLists_Exist[i] = false;
- } // end for
-
- csi::html::DefListDefinition &
- rPublic = Setup_MemberSegment_Out( mp_public );
- csi::html::DefListDefinition &
- rProtected = Setup_MemberSegment_Out( mp_protected );
- csi::html::DefListDefinition &
- rPrivate = Setup_MemberSegment_Out( mp_private );
-
- Write_ChildList_forClasses( rPublic,
- rProtected,
- rPrivate,
- C_sLabel_Classes,
- C_sTitle_InnerClasses,
- ary::cpp::CK_class );
- Write_ChildList_forClasses( rPublic,
- rProtected,
- rPrivate,
- C_sLabel_Structs,
- C_sTitle_InnerStructs,
- ary::cpp::CK_struct );
- Write_ChildList_forClasses( rPublic,
- rProtected,
- rPrivate,
- C_sLabel_Unions,
- C_sTitle_InnerUnions,
- ary::cpp::CK_union );
-
- Write_ChildList( ary::cpp::Class::SLOT_Enums,
- cl_Enums,
- C_sLabel_Enums,
- C_sTitle_Enums,
- rPublic,
- rProtected,
- rPrivate );
- Write_ChildList( ary::cpp::Class::SLOT_Typedefs,
- cl_Typedefs,
- C_sLabel_Typedefs,
- C_sTitle_Typedefs,
- rPublic,
- rProtected,
- rPrivate );
-
- Write_ChildList( ary::cpp::Class::SLOT_Operations,
- cl_Operations,
- C_sLabel_Operations,
- C_sTitle_Methods,
- rPublic,
- rProtected,
- rPrivate );
- Write_ChildList( ary::cpp::Class::SLOT_StaticOperations,
- cl_StaticOperations,
- C_sLabel_StaticOperations,
- C_sTitle_StaticMethods,
- rPublic,
- rProtected,
- rPrivate );
- Write_ChildList( ary::cpp::Class::SLOT_Data,
- cl_Data,
- C_sLabel_Variables,
- C_sTitle_Data,
- rPublic,
- rProtected,
- rPrivate );
- Write_ChildList( ary::cpp::Class::SLOT_StaticData,
- cl_StaticData,
- C_sLabel_StaticVariables,
- C_sTitle_StaticData,
- rPublic,
- rProtected,
- rPrivate );
-
- Create_NaviSubRow(mp_public); // Also puts out or deletes pPublic.
- Create_NaviSubRow(mp_protected); // Also puts out or deletes pProtected.
- Create_NaviSubRow(mp_private); // Also puts out or deletes pPrivate.
-}
-
-void
-PageMaker_Class::Write_ChildList( ary::SlotAccessId i_nSlot,
- E_ChidList i_eChildListIndex,
- const char * i_sLabel,
- const char * i_sListTitle,
- csi::xml::Element & o_rPublic,
- csi::xml::Element & o_rProtected,
- csi::xml::Element & o_rPrivate )
-
-{
- bool bPublic_ChildrenExist = false;
- bool bProtected_ChildrenExist = false;
- bool bPrivate_ChildrenExist = false;
-
- ChildList_Display::Area_Result
- aPublic_Result( bPublic_ChildrenExist, o_rPublic );
- ChildList_Display::Area_Result
- aProtected_Result( bProtected_ChildrenExist, o_rProtected );
- ChildList_Display::Area_Result
- aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
-
- String sLabelPublic = ChildListLabel(i_sLabel, mp_public);
- String sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
- String sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
-
- pChildDisplay->Run_Members( aPublic_Result,
- aProtected_Result,
- aPrivate_Result,
- i_nSlot,
- sLabelPublic,
- sLabelProtected,
- sLabelPrivate,
- i_sListTitle );
-
- bChildLists_Exist[i_eChildListIndex]
- = bPublic_ChildrenExist;
- bChildLists_Exist[i_eChildListIndex + cl_MAX]
- = bProtected_ChildrenExist;
- bChildLists_Exist[i_eChildListIndex + 2*cl_MAX]
- = bPrivate_ChildrenExist;
-
- if (bPublic_ChildrenExist)
- o_rPublic << new HorizontalLine;
- if (bProtected_ChildrenExist)
- o_rProtected << new HorizontalLine;
- if (bPrivate_ChildrenExist)
- o_rPrivate << new HorizontalLine;
-}
-
-void
-PageMaker_Class::Write_ChildList_forClasses( csi::xml::Element & o_rPublic,
- csi::xml::Element & o_rProtected,
- csi::xml::Element & o_rPrivate,
- const char * i_sLabel,
- const char * i_sListTitle,
- ary::cpp::E_ClassKey i_eFilter )
-{
- bool bPublic_ChildrenExist = false;
- bool bProtected_ChildrenExist = false;
- bool bPrivate_ChildrenExist = false;
-
- ChildList_Display::Area_Result
- aPublic_Result( bPublic_ChildrenExist, o_rPublic );
- ChildList_Display::Area_Result
- aProtected_Result( bProtected_ChildrenExist, o_rProtected );
- ChildList_Display::Area_Result
- aPrivate_Result( bPrivate_ChildrenExist, o_rPrivate );
-
- String sLabelPublic = ChildListLabel(i_sLabel, mp_public);
- String sLabelProtected = ChildListLabel(i_sLabel, mp_protected);
- String sLabelPrivate = ChildListLabel(i_sLabel, mp_private);
-
- pChildDisplay->Run_MemberClasses( aPublic_Result,
- aProtected_Result,
- aPrivate_Result,
- ary::cpp::Class::SLOT_NestedClasses,
- sLabelPublic,
- sLabelProtected,
- sLabelPrivate,
- i_sListTitle,
- i_eFilter );
-
- bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter)]
- = bPublic_ChildrenExist;
- bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter) + cl_MAX]
- = bProtected_ChildrenExist;
- bChildLists_Exist[int(cl_NestedClasses)+int(i_eFilter) + 2*cl_MAX]
- = bPrivate_ChildrenExist;
-
- if (bPublic_ChildrenExist)
- o_rPublic << new HorizontalLine;
- if (bProtected_ChildrenExist)
- o_rProtected << new HorizontalLine;
- if (bPrivate_ChildrenExist)
- o_rPrivate << new HorizontalLine;
-}
-
-const char *
-PageMaker_Class::ChildListLabel( const char * i_sLabel, E_MemberProtection i_eMpr )
-{
- static char sResult[100];
- strcpy( sResult, C_sMprPrefixes[i_eMpr] ); // SAFE STRCPY (#100211# - checked)
- strcat( sResult, i_sLabel ); // SAFE STRCAT (#100211# - checked)
- return sResult;
-}
-
-csi::html::DefListDefinition &
-PageMaker_Class::Setup_MemberSegment_Out( E_MemberProtection i_eMpr )
-{
- html::DefList * pDefList = new html::DefList;
- pProtectionArea[i_eMpr] = pDefList;
-
- pDefList->AddTerm()
- << new html::ClassAttr("subtitle")
- >> *new html::Label( C_sMprPrefixes[i_eMpr] )
- >> *new html::Headline(3)
- << C_sMprTitles[i_eMpr];
- return pDefList->AddDefinition();
-}
-
-void
-PageMaker_Class::Create_NaviSubRow( E_MemberProtection i_eMpr )
-{
- int nIndexAdd = int(cl_MAX) * int(i_eMpr);
-
- bool bEmpty = true;
- for (int e = 0; e < cl_MAX; e++)
- {
- if ( bChildLists_Exist[e + nIndexAdd] )
- {
- bEmpty = false;
- break;
- }
- } // end for
- if (bEmpty)
- {
- pProtectionArea[i_eMpr] = 0;
- return;
- }
- else //
- {
- CurOut() << pProtectionArea[i_eMpr].Release();
- } // endif
-
- pNavi->MakeSubRow( C_sMprSummaryTitles[i_eMpr] );
- for (int i = 0; i < cl_MAX; i++)
- {
- pNavi->AddItem( C_sSummaryItems_Titles[i],
- ChildListLabel( C_sSummaryItems_Labels[i], i_eMpr ),
- bChildLists_Exist[i+nIndexAdd] );
- } // end for
-}
-
-void
-PageMaker_Class::Write_DerivedList()
-{
- adcdisp::ExplanationList
- aDeriveds( CurOut() );
- aDeriveds.AddEntry( "Known Derived Classes" );
-
- if ( Me().KnownDerivatives().Size() == 0 )
- {
- aDeriveds.Def() << "None.";
- return;
- }
-
- typedef ary::List_Rid RidList;
-
- CesConstIterator
- itEnd = Me().KnownDerivatives().End();
- for ( CesConstIterator it = Me().KnownDerivatives().Begin();
- it != itEnd;
- ++it )
- {
- const ary::cpp::CodeEntity &
- rCe = Env().Gate().Ces().Find_Ce(*it);
-
- aDeriveds.Def()
- >> *new html::Link( Link2Ce(Env(),rCe) )
- << rCe.LocalName();
- aDeriveds.Def()
- << new html::LineBreak;
- } // end for
-}
-
-
-// ============== Creating a classes base hierarchy ====================== //
-
-
-namespace
-{
-
-class Node
-{
- public:
- Node(
- const ary::cpp::Class &
- i_rClass,
- ary::cpp::Type_id i_nClassType,
- const ary::cpp::Gate &
- i_rGate,
- intt i_nPositionOffset,
- Node * io_pDerived = 0,
- ary::cpp::E_Protection
- i_eProtection = ary::cpp::PROTECT_global,
- bool i_bVirtual = false );
- ~Node();
-
- void FillPositionList(
- std::vector< const Node* > &
- o_rPositionList ) const;
- void Write2(
- csi::xml::Element & o_rOut,
- const OuputPage_Environment &
- i_rEnv ) const;
-
- intt BaseCount() const { return nCountBases; }
- intt Position() const { return nPosition; }
- int Xpos() const { return 3*Position(); }
- int Ypos() const { return 2*Position(); }
- const Node * Derived() const { return pDerived; }
-
- private:
- typedef std::vector< DYN Node* > BaseList;
-
- void IncrBaseCount();
-
- // DATA
- BaseList aBases;
- intt nCountBases;
- Node * pDerived;
-
- String sName;
- const ary::cpp::Class *
- pClass;
- ary::cpp::Type_id nClassType;
- ary::cpp::E_Protection
- eProtection;
- bool bVirtual;
-
- intt nPosition;
-};
-
-void WriteNodeHierarchy(
- csi::xml::Element & o_rOut,
- const OuputPage_Environment &
- i_rEnv,
- const Node & i_rClass );
-
-const ary::cpp::Class *
- HereFind_Class(
- const ary::cpp::Gate &
- i_rGate,
- ary::cpp::Type_id i_nReferingTypeId );
-
-} // anonymous namespace
-
-void
-PageMaker_Class::Write_BaseHierarchy()
-{
- adcdisp::ExplanationList aBases( CurOut() );
- aBases.AddEntry( "Base Classes" );
-
- if ( Me().BaseClasses().size() == 0 )
- {
- aBases.Def() << "None.";
- }
- else
- {
- Dyn< Node >
- pBaseGraph( new Node(Me(), ary::cpp::Type_id(0), Env().Gate(), 0) );
- WriteNodeHierarchy( aBases.Def(), Env(), *pBaseGraph );
- }
-}
-
-
-
-namespace
-{
-
-void
-WriteNodeHierarchy( csi::xml::Element & o_rOut,
- const OuputPage_Environment & i_rEnv,
- const Node & i_rClass )
-{
- typedef const Node * NodePtr;
- typedef std::vector<NodePtr> NodeList;
-
- NodeList aPositionList;
- intt nSize = i_rClass.Position()+1;
- aPositionList.reserve(nSize);
- i_rClass.FillPositionList( aPositionList );
-
- xml::Element &
- rPre = o_rOut
- >> *new xml::AnElement("pre")
- << new html::StyleAttr("font-family:monospace;");
-
- for ( int line = 0; line < nSize; ++line )
- {
- char * sLine1 = new char[2 + line*5];
- char * sLine2 = new char[1 + line*5];
- *sLine1 = '\0';
- *sLine2 = '\0';
-
- bool bBaseForThisLineReached = false;
- for ( int col = 0; col < line; ++col )
- {
- intt nDerivPos = aPositionList[col]->Derived()->Position();
-
- if ( nDerivPos >= line )
- strcat(sLine1, " | ");
- else
- strcat(sLine1, " ");
-
- if ( nDerivPos > line )
- {
- strcat(sLine2, " | ");
- }
- else if ( nDerivPos == line )
- {
- if (bBaseForThisLineReached)
- strcat(sLine2, "--+--");
- else
- {
- bBaseForThisLineReached = true;
- strcat(sLine2, " +--");
- }
- }
- else // nDerivPos < line
- {
- if (bBaseForThisLineReached)
- strcat(sLine2, "-----");
- else
- strcat(sLine2, " ");
- }
- } // end for (col)
- strcat(sLine1,"\n");
- rPre
- << sLine1
- << sLine2;
- delete [] sLine1;
- delete [] sLine2;
-
- aPositionList[line]->Write2( rPre, i_rEnv );
- rPre << "\n";
- } // end for (line)
-}
-
-const ary::cpp::Class *
-HereFind_Class( const ary::cpp::Gate & i_rGate,
- ary::cpp::Type_id i_nReferingTypeId )
-{
- const ary::cpp::CodeEntity *
- pCe = i_rGate.Search_RelatedCe( i_nReferingTypeId );
-
- if ( pCe != 0 )
- {
- if ( ary::is_type<ary::cpp::Class>(*pCe) )
- {
- return ary::ary_cast<ary::cpp::Class>(pCe);
- }
- else if ( ary::is_type<ary::cpp::Typedef>(*pCe) )
- {
- const ary::cpp::Typedef *
- pTydef = ary::ary_cast<ary::cpp::Typedef>(pCe);
- return HereFind_Class( i_rGate, pTydef->DescribingType() );
- }
- }
-
- static const ary::cpp::Class aClassNull_( "Base class not found",
- ary::cpp::Ce_id(0),
- ary::cpp::PROTECT_global,
- ary::loc::Le_id(0),
- ary::cpp::CK_class );
- return &aClassNull_;
-}
-
-
-
-//********************* Node ***********************//
-
-Node::Node( const ary::cpp::Class & i_rClass,
- ary::cpp::Type_id i_nClassType,
- const ary::cpp::Gate & i_rGate,
- intt i_nPositionOffset,
- Node * io_pDerived,
- ary::cpp::E_Protection i_eProtection,
- bool i_bVirtual )
- : aBases(),
- nCountBases(0),
- pDerived(io_pDerived),
- pClass(&i_rClass),
- nClassType(i_nClassType),
- eProtection(i_eProtection),
- bVirtual(i_bVirtual),
- nPosition(i_nPositionOffset)
-{
- typedef ary::cpp::List_Bases BList;
-
- for ( BList::const_iterator it = i_rClass.BaseClasses().begin();
- it != i_rClass.BaseClasses().end();
- ++it )
- {
- const ary::cpp::Class *
- pBaseClass = HereFind_Class( i_rGate, (*it).nId );
-
- Dyn<Node>
- pBase( new Node(*pBaseClass,
- (*it).nId,
- i_rGate,
- nPosition,
- this,
- (*it).eProtection,
- (*it).eVirtuality == ary::cpp::VIRTUAL_virtual)
- );
- IncrBaseCount();
- nPosition += pBase->BaseCount() + 1;
- aBases.push_back( pBase.Release() );
- } // end for
-}
-
-Node::~Node()
-{
-}
-
-void
-Node::FillPositionList( std::vector< const Node* > & o_rPositionList ) const
-{
- for ( BaseList::const_iterator it = aBases.begin();
- it != aBases.end();
- ++it )
- {
- (*it)->FillPositionList(o_rPositionList);
- } // end for
-
- if( o_rPositionList.size() != uintt(Position()) )
- {
- csv_assert(false);
- }
- o_rPositionList.push_back(this);
-}
-
-void
-Node::Write2( csi::xml::Element & o_rOut,
- const OuputPage_Environment & i_rEnv ) const
-{
- if ( Derived() == 0 )
- {
- o_rOut
- >> *new xml::AnElement("span")
- << new html::ClassAttr("btself")
- << pClass->LocalName();
- return;
- }
-
- csi::xml::Element *
- pOut = & ( o_rOut >> *new xml::AnElement("span") );
- switch ( eProtection )
- {
- case ary::cpp::PROTECT_public:
- if (bVirtual)
- *pOut << new html::ClassAttr("btvpubl");
- else
- *pOut << new html::ClassAttr("btpubl");
- break;
- case ary::cpp::PROTECT_protected:
- if (bVirtual)
- *pOut << new html::ClassAttr("btvprot");
- else
- *pOut << new html::ClassAttr("btprot");
- break;
- case ary::cpp::PROTECT_private:
- if (bVirtual)
- *pOut << new html::ClassAttr("btvpriv");
- else
- *pOut << new html::ClassAttr("btpriv");
- break;
- default: // do nothing.
- ;
- } // end switch
-
- csi::xml::Element & rOut = *pOut;
-
- Get_LinkedTypeText( rOut, i_rEnv, nClassType, false );
- rOut << " (";
- if ( bVirtual )
- rOut << "virtual ";
- switch ( eProtection )
- {
- case ary::cpp::PROTECT_public:
- rOut << "public)";
- break;
- case ary::cpp::PROTECT_protected:
- rOut << "protected)";
- break;
- case ary::cpp::PROTECT_private:
- rOut << "private)";
- break;
- default: // do nothing.
- ;
- } // end switch
-}
-
-void
-Node::IncrBaseCount()
-{
- ++nCountBases;
- if (pDerived != 0)
- pDerived->IncrBaseCount();
-}
-
-
-} // anonymous namespace
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_class.hxx b/autodoc/source/display/html/pm_class.hxx
deleted file mode 100644
index b3c59005..00000000
--- a/autodoc/source/display/html/pm_class.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PM_CLASS_HXX
-#define ADC_DISPLAY_HTML_PM_CLASS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "pm_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
- namespace cpp
- {
- class Class;
- }
-}
-
-class ChildList_Display;
-class NavigationBar;
-
-
-class PageMaker_Class : public SpecializedPageMaker
-{
- public:
- enum E_ChidList
- {
- cl_NestedClasses = 0,
- cl_NestedStructs,
- cl_NestedUnions,
- cl_Enums,
- cl_Typedefs,
- cl_Operations,
- cl_StaticOperations,
- cl_Data,
- cl_StaticData,
- cl_MAX
- };
- PageMaker_Class(
- PageDisplay & io_rPage,
- const ary::cpp::Class &
- i_rClass );
-
- virtual ~PageMaker_Class();
-
- virtual void MakePage();
-
- private:
- enum E_MemberProtection { mp_public = 0, mp_protected, mp_private, mp_MAX };
-
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_DocuArea();
- virtual void Write_ChildList(
- ary::SlotAccessId i_nSlot,
- E_ChidList i_eChildListIndex,
- const char * i_sLabel,
- const char * i_sListTitle,
- csi::xml::Element & o_rPublic,
- csi::xml::Element & o_rProtected,
- csi::xml::Element & o_rPrivate );
- void Write_ChildList_forClasses(
- csi::xml::Element & o_rPublic,
- csi::xml::Element & o_rProtected,
- csi::xml::Element & o_rPrivate,
- const char * i_sLabel,
- const char * i_sListTitle,
- ary::cpp::E_ClassKey
- i_eFilter );
- void Write_ChildLists();
- static const char * ChildListLabel(
- const char * i_sLabel,
- E_MemberProtection i_eMpr );
- csi::html::DefListDefinition &
- Setup_MemberSegment_Out(
- E_MemberProtection i_eMpr );
- void Create_NaviSubRow(
- E_MemberProtection i_eMpr );
- void Write_BaseHierarchy();
- void Write_DerivedList();
-
- const ary::cpp::Class &
- Me() const { return *pMe; }
- // DATA
- const ary::cpp::Class *
- pMe;
- Dyn<ChildList_Display>
- pChildDisplay;
- Dyn<NavigationBar> pNavi;
-
- Dyn<csi::xml::Element>
- pProtectionArea[mp_MAX];
-
- bool bChildLists_Exist[3*cl_MAX];
-};
-
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_help.cxx b/autodoc/source/display/html/pm_help.cxx
deleted file mode 100644
index 44c5eb8f..00000000
--- a/autodoc/source/display/html/pm_help.cxx
+++ /dev/null
@@ -1,234 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_help.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include "navibar.hxx"
-#include "html_kit.hxx"
-
-using namespace csi;
-using csi::html::Paragraph;
-using csi::html::HorizontalLine;
-using csi::html::Headline;
-using csi::html::AlignAttr;
-using csi::html::Bold;
-using csi::html::Link;
-using csi::html::Sbr;
-using csi::html::LineBreak;
-using csi::xml::Element;
-
-
-
-const String C_sHelpText(
-"<div style=\"font-size:10pt;\">\n"
-"<h3 class=\"help\">The Main Navigationbar</h3>\n"
-"<p> On top of every page, there is a main navigationbar on a lightly coloured\n"
-"background with the following items:<br>\n"
-"</p>\n"
-"<ul>\n"
-" <li>Overview - the start page for this document,</li>\n"
-" <li>Namespace - the lowest/deepest namespace of the language objects, described\n"
-"on the current page,</li>\n"
-" <li>Class - the class, struct or union, which owns the methods or data,\n"
-"described on the current page,</li>\n"
-" <li>Index - the global alphabetical index,</li>\n"
-" <li>Help - this page.</li>\n"
-"</ul>\n"
-" Each item in this&nbsp; bar can be in three different states:<br>\n"
-"<ul>\n"
-" <li>Link - the item is valid and you can get there,</li>\n"
-" <li>Simple - the item does not apply (if this page described a namespace,\n"
-"there would be no owning class),</li>\n"
-" <li>Reversed (white text on dark background) - this is the current page.</li>\n"
-"</ul>\n"
-"<h3 class=\"help\">Lower Navigationbars</h3>\n"
-" Just below the main navigation bar, there may be zero to three lower navigationbars\n"
-"on white background.<br>\n"
-"<br>\n"
-"Their items are dependent of the context, but they always link to paragraphs\n"
-"on the same, current page.<br>\n"
-"Available items appear as links. Unavailable items appear as simple text.<br>\n"
-"\n"
-"\n"
-"<h3 class=\"help\">Namespace Descriptions</h3>\n"
-"\n"
-"<dl>\n"
-"<dt class=\"simple\">Parent namespaces</dt>\n"
-" </dl>\n"
-" <dl>\n"
-" <dd>In front of the namespace title, there is a linked list of the parent\n"
-"namespaces. The global namespace is linked with the first \"::\",</dd>\n"
-" <dd>the namespaces between the global and the current one are linked\n"
-"by their names.<br>\n"
-" </dd>\n"
-" <dd> </dd>\n"
-" </dl>\n"
-"After the title, the documentation of the namespace follows (which is often\n"
-"missing, because the namespace name may be self-explaining).<br>\n"
-" <br>\n"
-"Below are the lists of nested namspaces and of the classes, functions and\n"
-"other program objects, that belong within this namespace.<br>\n"
-"Each of this lists is accessible by the lower navigationbar on top of the\n"
-"page.<br>\n"
-"\n"
-"<h3 class=\"help\">Class Descriptions</h3>\n"
-"\n"
-" <dl>\n"
-" <dt class=\"simple\">Parent namespaces and classes</dt>\n"
-" </dl>\n"
-" <dl>\n"
-" <dd>In front of the class title, there is a linked list of the\n"
-"parent namespaces or classes. The global namespace is linked with the first\n"
-"\"::\",</dd>\n"
-" <dd>the namespaces between the global and the current one are\n"
-"linked by their names. Enclosing classes are linked as well, but appear in\n"
-"<span class=\"nqclass\">green</font> color.&nbsp;</dd>\n"
-" <dd>So you see on the first glance, that this is a parent class,\n"
-"no namespace.<br>\n"
-" </dd>\n"
-" <dd><br>\n"
-" </dd>\n"
-" </dl>\n"
-"After the title, the bases and derivations of the class follow. <br>\n"
-"Base classes are displayed as a graph. The text around base classes can appear\n"
-"in different styles and colours:<br>\n"
-"<ul>\n"
-" <li><span class=\"btpubl\">Green</span> - public inherited,</li>\n"
-" <li><span class=\"btprot\">Orange</span> - protected inherited,</li>\n"
-" <li><span class=\"btpriv\">Red</span> - private inherited,</li>\n"
-" <li><span class=\"btvpubl\">italic</span> - a (public inherited) virtual base class.</li>\n"
-" <li><span class=\"btself\">Bold and black</span> without a link - the placeholder\n"
-"for the currently described class.<br>\n"
-" </li>\n"
-"</ul>\n"
-"There may be many derivations of a class, but only the known ones, which\n"
-"are described within this document also, are listed.<br>\n"
-"<br>\n"
-"Below the derivations is a little table with some properties of the class:<br>\n"
-"<ul>\n"
-" <li>virtual - the class owns at least one virtual method,</li>\n"
-" <li>abstract - the class owns at least one abstract method,</li>\n"
-" <li>interface - the class may or may be not abstract,\n"
-"but it is intended by its author to be used only as an interface and never\n"
-"to be instantiated,</li>\n"
-" <li>template - the class is a template class.<br>\n"
-" </li>\n"
-"</ul>\n"
-"Next comes further documentation of the class itself.<br>\n"
-"<br>\n"
-"Lastly, there are listed all members of the class. Public members come first,\n"
-"then protected, at last the private ones.<br>\n"
-"All member lists are accessible by the lower navigationbars on top of the\n"
-"page.<br>\n"
-"\n"
-"<h3 class=\"help\">Macros and Defines</h3>\n"
-"In C++ and C, there are also program constructs, which do not fit into the\n"
-"name tree, because they are #define'd: macros and definitions.<br>\n"
-"These may be documented, too. Those comments you find <a href=\"def-all.html\">\n"
-"here</a>\n"
-" or from the \"Overview\" start page.\n"
-"<h3 class=\"help\">Links to IDL-Documentation</h3>\n"
-"Some types, which appear as links, may refer to classes, enums or other\n"
-"entities, which are direct mappings of UNO-IDL entities.<br>\n"
-"In those cases the link doesn't lead to the C++ class, enum or whatever,\n"
-"but to the description of the IDL entity.\n"
-"<h3 class=\"help\">How to Link From Extern Documents</h3>\n"
-"If you wish to write an extern html document, which links to types within\n"
-"this C++ reference, you can do so, if your links have the following format:<br>\n"
-"<br>\n"
-"&lt;RootDirectory-of-this-Document&gt;/names/&lt;Namespace-A&gt;/&lt;Namespace-XY&gt;/EnclosingClass-nn&gt;/&lt;TypePreFix&gt;-&lt;MyTypeName&gt;.html<br>\n"
-"<br>\n"
-"&lt;TypePreFix&gt; can have the following values:<br>\n"
-"<ul>\n"
-"<li>c - class, struct or union</li>\n"
-"<li>e - enum</li>\n"
-"<li>t - typedef</li>\n"
-"</ul>\n"
-"If this document would be located in directory &nbsp;\"/doc/cpp/ref\", examples\n"
-"would look like this:<br>\n"
-"<br>\n"
-"&lt;a href=\"/doc/cpp/ref/names/osl/c-File.html\"&gt;class File&lt;/a&gt;<br>\n"
-"&lt;a href=\"/doc/cpp/ref/names/osl/FileBase/e-RC.html\"&gt;enum FileBase::RC&lt;/a&gt;<br>\n"
-"&lt;a href=\"/doc/cpp/ref/names/t-oslMutex.html\"&gt;typedef oslMutex&lt;/a&gt;<br>\n"
-"<br>\n"
-"Namespaces are described in the index.html file within their directory:<br>\n"
-"<br>\n"
-"&lt;a href=\"/doc/cpp/ref/names/cppu/index.html\"&gt;namespace cppu&lt;/a&gt;<br>\n"
-"</div>" );
-
-
-
-
-PageMaker_Help::PageMaker_Help( PageDisplay & io_rPage )
- : SpecializedPageMaker(io_rPage),
- pNavi(0)
-{
-}
-
-PageMaker_Help::~PageMaker_Help()
-{
-}
-
-void
-PageMaker_Help::MakePage()
-{
- pNavi = new NavigationBar( Env(), NavigationBar::LOC_Help );
- Write_NavBar();
-
- Write_TopArea();
- Write_DocuArea();
-}
-
-void
-PageMaker_Help::Write_NavBar()
-{
- pNavi->Write( CurOut() );
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Help::Write_TopArea()
-{
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), "How to Use", "this Reference Document" );
-
- CurOut() << new xml::XmlCode(C_sHelpText);
-}
-
-void
-PageMaker_Help::Write_DocuArea()
-{
- CurOut() << new HorizontalLine;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_help.hxx b/autodoc/source/display/html/pm_help.hxx
deleted file mode 100644
index fb9c1f56..00000000
--- a/autodoc/source/display/html/pm_help.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PM_HELP_HXX
-#define ADC_DISPLAY_HTML_PM_HELP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "pm_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-class NavigationBar;
-
-class PageMaker_Help : public SpecializedPageMaker
-{
- public:
- PageMaker_Help(
- PageDisplay & io_rPage );
-
- virtual ~PageMaker_Help();
-
- virtual void MakePage();
-
- private:
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_DocuArea();
-
- // DATA
- Dyn<NavigationBar> pNavi;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_index.cxx b/autodoc/source/display/html/pm_index.cxx
deleted file mode 100644
index e70b7f19..00000000
--- a/autodoc/source/display/html/pm_index.cxx
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_index.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include "aryattrs.hxx"
-#include "hd_chlst.hxx"
-#include "hd_docu.hxx"
-#include "html_kit.hxx"
-#include "navibar.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-#include "strconst.hxx"
-
-using namespace csi;
-using ary::GlobalId;
-
-
-
-
-namespace
-{
-
-inline const char *
-F_CK_Text( ary::cpp::E_ClassKey i_eCK )
-{
- switch (i_eCK)
- {
- case ary::cpp::CK_class: return "class";
- case ary::cpp::CK_struct: return "struct";
- case ary::cpp::CK_union: return "union";
- } // end switch
- return "";
-}
-
-template <class CE>
-inline const char *
-F_OwnerType( const CE & i_rData, const ary::cpp::Gate & i_rGate )
-{
- if ( i_rData.Protection() == ary::cpp::PROTECT_global )
- return "namespace ";
-
- const ary::cpp::Class *
- pClass = dynamic_cast< const ary::cpp::Class* >(
- i_rGate.Ces().Search_Ce(i_rData.Owner()) );
- if (pClass != 0)
- return F_CK_Text(pClass->ClassKey());
- return "";
-}
-
-} // anonymous namespace
-
-PageMaker_Index::PageMaker_Index( PageDisplay & io_rPage,
- char i_c )
- : SpecializedPageMaker(io_rPage),
- pNavi(0),
- c(i_c),
- pCurIndex(0)
-{
-}
-
-PageMaker_Index::~PageMaker_Index()
-{
-}
-
-void
-PageMaker_Index::MakePage()
-{
- pNavi = new NavigationBar( Env(), NavigationBar::LOC_Index );
-
- Write_NavBar();
- Write_TopArea();
- Write_CompleteAlphabeticalList();
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Namespace & i_rData )
-{
- Write_CeIndexEntry( i_rData, "namespace", "namespace" );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Class & i_rData )
-{
- // KORR_FUTURE
- // Really throw out all anonymous classes from index?
-
- if ( strncmp(i_rData.LocalName().c_str()+1,"_Anonymous",10) == 0 )
- return;
-
- Write_CeIndexEntry( i_rData,
- F_CK_Text(i_rData.ClassKey()),
- F_OwnerType(i_rData, Env().Gate()) );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Enum & i_rData )
-{
- Write_CeIndexEntry( i_rData, "enum", F_OwnerType(i_rData, Env().Gate()) );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Typedef & i_rData )
-{
- Write_CeIndexEntry( i_rData, "typedef", F_OwnerType(i_rData, Env().Gate()) );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Function & i_rData )
-{
- Write_CeIndexEntry( i_rData, "function", F_OwnerType(i_rData, Env().Gate()) );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Variable & i_rData )
-{
- Write_CeIndexEntry( i_rData, "variable", F_OwnerType(i_rData, Env().Gate()) );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::EnumValue & i_rData )
-{
- Write_CeIndexEntry( i_rData, "enum value", "" );
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Define & i_rData )
-{
- String sFileName;
-
- pCurIndex->AddEntry();
- pCurIndex->Term()
- >> *new html::Link( Link2CppDefinition(Env(), i_rData) )
- >> *new html::Bold
- << i_rData.LocalName();
- pCurIndex->Term()
- << " - define";
- pCurIndex->Def() << " ";
-}
-
-void
-PageMaker_Index::do_Process( const ary::cpp::Macro & i_rData )
-{
- String sFileName;
-
- pCurIndex->AddEntry();
- pCurIndex->Term()
- >> *new html::Link( Link2CppDefinition(Env(), i_rData) )
- >> *new html::Bold
- << i_rData.LocalName();
- pCurIndex->Term()
- << " - macro";
-
- pCurIndex->Def() << " ";
-}
-
-const ary::cpp::Gate *
-PageMaker_Index::inq_Get_ReFinder() const
-{
- return &Env().Gate();
-}
-
-void
-PageMaker_Index::Write_NavBar()
-{
- pNavi->Write( CurOut() );
- CurOut() << new html::HorizontalLine;
-}
-
-
-const String C_sAlphabet(
-"<a href=\"index-1.html\"><B>A</B></a> <a href=\"index-2.html\"><B>B</B></a> <a href=\"index-3.html\"><B>C</B></a> <a href=\"index-4.html\"><B>D</B></a> <a href=\"index-5.html\"><B>E</B></a> "
-"<a href=\"index-6.html\"><B>F</B></a> <a href=\"index-7.html\"><B>G</B></a> <a href=\"index-8.html\"><B>H</B></a> <a href=\"index-9.html\"><B>I</B></a> <a href=\"index-10.html\"><B>J</B></a> "
-"<a href=\"index-11.html\"><B>K</B></a> <a href=\"index-12.html\"><B>L</B></a> <a href=\"index-13.html\"><B>M</B></a> <a href=\"index-14.html\"><B>N</B></a> <a href=\"index-15.html\"><B>O</B></a> "
-"<a href=\"index-16.html\"><B>P</B></a> <a href=\"index-17.html\"><B>Q</B></a> <a href=\"index-18.html\"><B>R</B></a> <a href=\"index-19.html\"><B>S</B></a> <a href=\"index-20.html\"><B>T</B></a> "
-"<a href=\"index-21.html\"><B>U</B></a> <a href=\"index-22.html\"><B>V</B></a> <a href=\"index-23.html\"><B>W</B></a> <a href=\"index-24.html\"><B>X</B></a> <a href=\"index-25.html\"><B>Y</B></a> "
-"<a href=\"index-26.html\"><B>Z</B></a> <a href=\"index-27.html\"><B>_</B></a>" );
-
-void
-PageMaker_Index::Write_TopArea()
-{
- String sLetter(&c, 1);
-
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), "Global Index", sLetter );
-
- CurOut() >>* new html::Paragraph
- << new html::AlignAttr("center")
- << new xml::XmlCode(C_sAlphabet);
-
- CurOut() << new html::HorizontalLine;
-}
-
-void
-PageMaker_Index::Write_CompleteAlphabeticalList()
-{
- std::vector<GlobalId>
- aThisPagesItems;
- const ary::cpp::Gate &
- rGate = Env().Gate();
-
- static char sBegin[] = "X";
- static char sEnd[] = "Y";
-
- switch ( c )
- {
- case 'Z': sBegin[0] = 'Z';
- sEnd[0] = '_';
- break;
- case '_': sBegin[0] = '_';
- sEnd[0] = '0';
- break;
- default: sBegin[0] = c;
- sEnd[0] = char(c + 1);
- break;
- }
-
- uintt
- nCount = rGate.Get_AlphabeticalList( aThisPagesItems, sBegin, sEnd );
- if (nCount > 0 )
- {
- adcdisp::IndexList
- aIndex(CurOut());
- pCurIndex = &aIndex;
-
- std::vector<GlobalId>::const_iterator itEnd = aThisPagesItems.end();
- for ( std::vector<GlobalId>::const_iterator it = aThisPagesItems.begin();
- it != itEnd;
- ++it )
- {
- const ary::Entity *
- pRe = rGate.Search_Entity( *it );
- if ( pRe != 0 )
- pRe->Accept(*this);
- } // end for
-
- pCurIndex = 0;
- } // endif (nCount > 0)
-}
-
-void
-PageMaker_Index::Write_CeIndexEntry( const ary::cpp::CodeEntity &
- i_rCe,
- const char * i_sType,
- const char * i_sOwnerType )
-{
- if ( Ce_IsInternal(i_rCe) )
- return;
-
- static csv::StreamStr aQualification(500);
-
- const ary::cpp::CodeEntity &
- rOwner = Env().Gate().Ces().Find_Ce(i_rCe.Owner());
-
- pCurIndex->AddEntry();
- pCurIndex->Term()
- >> *new html::Link( Link2Ce(Env(), i_rCe) )
- >> *new html::Bold
- << i_rCe.LocalName();
- pCurIndex->Term()
- << " - "
- << i_sType;
-
- if ( rOwner.Owner().IsValid() )
- {
- aQualification.seekp(0);
- Env().Gate().Ces().Get_QualifiedName( aQualification,
- rOwner.LocalName(),
- rOwner.Owner() );
-
- pCurIndex->Term()
- << " in "
- << i_sOwnerType
- << " "
- << aQualification.c_str();
- }
-
- pCurIndex->Def() << " ";
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_index.hxx b/autodoc/source/display/html/pm_index.hxx
deleted file mode 100644
index 8224f372..00000000
--- a/autodoc/source/display/html/pm_index.hxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PM_INDEX_HXX
-#define ADC_DISPLAY_HTML_PM_INDEX_HXX
-
-// BASE CLASSES
-#include "pm_base.hxx"
-#include <ary/ary_disp.hxx>
-#include <cosv/tpl/processor.hxx>
-// USED SERVICES
-namespace adcdisp
-{
- class IndexList;
-}
-namespace ary
-{
- namespace cpp
- {
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- class Function;
- class Variable;
- class EnumValue;
- class Define;
- class Macro;
- }
-}
-
-class NavigationBar;
-
-
-
-
-class PageMaker_Index : public SpecializedPageMaker,
- public ary::Display,
- public csv::ConstProcessor<ary::cpp::Namespace>,
- public csv::ConstProcessor<ary::cpp::Class>,
- public csv::ConstProcessor<ary::cpp::Enum>,
- public csv::ConstProcessor<ary::cpp::Typedef>,
- public csv::ConstProcessor<ary::cpp::Function>,
- public csv::ConstProcessor<ary::cpp::Variable>,
- public csv::ConstProcessor<ary::cpp::EnumValue>,
- public csv::ConstProcessor<ary::cpp::Define>,
- public csv::ConstProcessor<ary::cpp::Macro>
-{
- public:
- PageMaker_Index(
- PageDisplay & io_rPage,
- char i_c );
-
- virtual ~PageMaker_Index();
-
- virtual void MakePage();
-
- private:
- // Interface csv::ConstProcessor<>
- virtual void do_Process(
- const ary::cpp::Namespace &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Class &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Enum &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Typedef &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Function &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Variable &
- i_rData );
- virtual void do_Process(
- const ary::cpp::EnumValue &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Define &
- i_rData );
- virtual void do_Process(
- const ary::cpp::Macro &
- i_rData );
- // Interface ary::cpp::Display:
- virtual const ary::cpp::Gate *
- inq_Get_ReFinder() const;
- // Locals
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_CompleteAlphabeticalList();
-
- void Write_CeIndexEntry(
- const ary::cpp::CodeEntity &
- i_rCe,
- const char * i_sType,
- const char * i_sOwnerType );
-
- // DATA
- Dyn<NavigationBar> pNavi;
- char c;
- adcdisp::IndexList *
- pCurIndex;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_namsp.cxx b/autodoc/source/display/html/pm_namsp.cxx
deleted file mode 100644
index e2f88026..00000000
--- a/autodoc/source/display/html/pm_namsp.cxx
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_namsp.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include "hd_chlst.hxx"
-#include "hd_docu.hxx"
-#include "html_kit.hxx"
-#include "navibar.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-#include "strconst.hxx"
-
-
-using namespace csi;
-using csi::html::HorizontalLine;
-using csi::html::Link;
-using csi::html::Table;
-using csi::html::TableRow;
-using csi::html::TableCell;
-
-
-
-PageMaker_Namespace::PageMaker_Namespace( PageDisplay & io_rPage )
- : SpecializedPageMaker(io_rPage),
- pMe( io_rPage.Env().CurNamespace() ),
- pChildDisplay( new ChildList_Display(io_rPage.Env()) ),
- pNavi(0)
-{
- csv_assert( pMe != 0 );
-}
-
-PageMaker_Namespace::~PageMaker_Namespace()
-{
-}
-
-void
-PageMaker_Namespace::MakePage()
-{
- pNavi = new NavigationBar( Env(), Me() );
-
- Write_NavBar();
- Write_TopArea();
- Write_DocuArea();
-
- pNavi->MakeSubRow("");
- Write_ChildList( ary::cpp::Namespace::SLOT_SubNamespaces, C_sTitle_SubNamespaces, C_sLabel_SubNamespaces );
-
- Write_ChildLists_forClasses( C_sTitle_Classes,
- C_sLabel_Classes,
- ary::cpp::CK_class );
- Write_ChildLists_forClasses( C_sTitle_Structs,
- C_sLabel_Structs,
- ary::cpp::CK_struct );
- Write_ChildLists_forClasses( C_sTitle_Unions,
- C_sLabel_Unions,
- ary::cpp::CK_union );
-
- Write_ChildList( ary::cpp::Namespace::SLOT_Enums, C_sTitle_Enums, C_sLabel_Enums );
- Write_ChildList( ary::cpp::Namespace::SLOT_Typedefs, C_sTitle_Typedefs, C_sLabel_Typedefs );
- Write_ChildList( ary::cpp::Namespace::SLOT_Operations, C_sTitle_Operations, C_sLabel_Operations );
- Write_ChildList( ary::cpp::Namespace::SLOT_Constants, C_sTitle_Constants, C_sLabel_Constants );
- Write_ChildList( ary::cpp::Namespace::SLOT_Variables, C_sTitle_Variables, C_sLabel_Variables );
-
- pNavi->Write_SubRows();
-}
-
-void
-PageMaker_Namespace::Write_NavBar()
-{
- pNavi->Write( CurOut() );
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Namespace::Write_TopArea()
-{
- Page().Write_NameChainWithLinks( Me() );
-
- adcdisp::PageTitle_Std fTitle;
- xml::Element & rH3 = fTitle( CurOut() );
- if ( Env().CurNamespace()->Owner().IsValid() )
- {
- rH3 << C_sHFTypeTitle_Namespace
- << " "
- << Env().CurNamespace()->LocalName();
- }
- else
- {
- rH3 << C_sHFTitle_GlobalNamespaceCpp;
- }
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Namespace::Write_DocuArea()
-{
- Docu_Display aDocuShow( Env() );
-
- aDocuShow.Assign_Out(CurOut());
- aDocuShow.Process(Me().Docu());
- aDocuShow.Unassign_Out();
-
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Namespace::Write_ChildList( ary::SlotAccessId i_nSlot,
- const char * i_sListTitle,
- const char * i_sLabel )
-
-{
- bool bChildrenExist = false;
- ChildList_Display::Area_Result
- aResult( bChildrenExist, CurOut() );
-
- pChildDisplay->Run_Simple( aResult,
- i_nSlot,
- i_sLabel,
- i_sListTitle );
-
- pNavi->AddItem(i_sListTitle, i_sLabel, bChildrenExist);
- if (bChildrenExist)
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Namespace::Write_ChildLists_forClasses( const char * i_sListTitle,
- const char * i_sLabel,
- ary::cpp::E_ClassKey i_eFilter )
-
-{
- bool bChildrenExist = false;
- ChildList_Display::Area_Result
- aResult( bChildrenExist, CurOut() );
-
- pChildDisplay->Run_GlobalClasses( aResult,
- ary::cpp::Namespace::SLOT_Classes,
- i_sLabel,
- i_sListTitle,
- i_eFilter );
-
- pNavi->AddItem(i_sListTitle, i_sLabel, bChildrenExist);
- if ( bChildrenExist )
- CurOut() << new HorizontalLine;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_namsp.hxx b/autodoc/source/display/html/pm_namsp.hxx
deleted file mode 100644
index 5c1322c8..00000000
--- a/autodoc/source/display/html/pm_namsp.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PM_NAMSP_HXX
-#define ADC_DISPLAY_HTML_PM_NAMSP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "pm_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-class ChildList_Display;
-class NavigationBar;
-
-class PageMaker_Namespace : public SpecializedPageMaker
-{
- public:
- PageMaker_Namespace(
- PageDisplay & io_rPage );
-
- virtual ~PageMaker_Namespace();
-
- virtual void MakePage();
-
- private:
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_DocuArea();
- virtual void Write_ChildList(
- ary::SlotAccessId i_nSlot,
- const char * i_nListTitle,
- const char * i_nLabel );
- void Write_ChildLists_forClasses(
- const char * i_sListTitle,
- const char * i_sLabel,
- ary::cpp::E_ClassKey i_eFilter );
-
- const ary::cpp::Namespace &
- Me() const { return *pMe; }
- // DATA
- const ary::cpp::Namespace *
- pMe;
- Dyn<ChildList_Display>
- pChildDisplay;
- Dyn<NavigationBar> pNavi;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_start.cxx b/autodoc/source/display/html/pm_start.cxx
deleted file mode 100644
index 9efb3595..00000000
--- a/autodoc/source/display/html/pm_start.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pm_start.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary.hxx>
-#include "hd_chlst.hxx"
-#include "hd_docu.hxx"
-#include "navibar.hxx"
-#include "html_kit.hxx"
-#include "opageenv.hxx"
-#include "pagemake.hxx"
-#include "strconst.hxx"
-
-
-using namespace csi;
-using csi::html::Paragraph;
-using csi::html::HorizontalLine;
-using csi::html::AlignAttr;
-using csi::html::Bold;
-using csi::html::Link;
-using csi::html::Sbr;
-using csi::html::LineBreak;
-
-
-
-PageMaker_Overview::PageMaker_Overview( PageDisplay & io_rPage )
- : SpecializedPageMaker(io_rPage),
- pNavi(0)
-{
-}
-
-PageMaker_Overview::~PageMaker_Overview()
-{
-}
-
-void
-PageMaker_Overview::MakePage()
-{
- pNavi = new NavigationBar( Env(), NavigationBar::LOC_Overview );
- Write_NavBar();
-
- Write_TopArea();
- Write_DocuArea();
-}
-
-void
-PageMaker_Overview::Write_NavBar()
-{
- pNavi->Write( CurOut() );
- CurOut() << new HorizontalLine;
-}
-
-void
-PageMaker_Overview::Write_TopArea()
-{
- adcdisp::PageTitle_Std fTitle;
- fTitle( CurOut(), Env().RepositoryTitle(), "" );
-
- CurOut()
- >> *new Paragraph
- << new html::StyleAttr("font-size:14pt;")
- << "This is a reference documentation for the C++ source code."
- << new LineBreak
- << new LineBreak
- << "Points to start:";
-
- html::SimpleList &
- rList = *new html::SimpleList;
- CurOut() >> rList;
-
- html::ListItem & rNamedObjsItem =
- rList.AddItem();
-
- StreamLock sNspDir(50);
- rNamedObjsItem
- << new html::StyleAttr("font-size:14pt;")
- >> *new Link( sNspDir() << C_sDIR_NamespacesCpp
- << "/"
- << C_sHFN_Namespace
- << c_str )
- >> *new Bold
- << "Named Objects";
- rNamedObjsItem << " (classes, functions, namespaces, etc.)"
- << new html::LineBreak;
- rList.AddItem()
- << new html::StyleAttr("font-size:14pt;")
- >> *new Link( "def-all.html" )
- >> *new Bold
- << "Defines and Macros"
- << new html::LineBreak;
- StreamLock sIndexDir(50);
- rList.AddItem()
- << new html::StyleAttr("font-size:14pt;")
- >> *new Link( sIndexDir() << C_sDIR_Index
- << "/index-1.html"
- << c_str )
- >> *new Bold
- << "Global Index"
- << new html::LineBreak;
-}
-
-void
-PageMaker_Overview::Write_DocuArea()
-{
- CurOut() << new HorizontalLine;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/pm_start.hxx b/autodoc/source/display/html/pm_start.hxx
deleted file mode 100644
index 1085e1e5..00000000
--- a/autodoc/source/display/html/pm_start.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PM_START_HXX
-#define ADC_DISPLAY_HTML_PM_START_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "pm_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-class NavigationBar;
-
-class PageMaker_Overview : public SpecializedPageMaker
-{
- public:
- PageMaker_Overview(
- PageDisplay & io_rPage );
-
- virtual ~PageMaker_Overview();
-
- virtual void MakePage();
-
- private:
- virtual void Write_NavBar();
- virtual void Write_TopArea();
- virtual void Write_DocuArea();
-
- // DATA
- Dyn<NavigationBar> pNavi;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/protarea.cxx b/autodoc/source/display/html/protarea.cxx
deleted file mode 100644
index 6b50ad8d..00000000
--- a/autodoc/source/display/html/protarea.cxx
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "protarea.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include "hdimpl.hxx"
-
-
-inline UINT8
-ProtectionArea::Index( ary::cpp::E_ClassKey i_eClassKey ) const
-{
- return i_eClassKey == ary::cpp::CK_class
- ? 0
- : i_eClassKey == ary::cpp::CK_struct
- ? 1
- : 2;
-}
-
-
-
-ProtectionArea::ProtectionArea( const char * i_sLabel,
- const char * i_sTitle )
- : pSglTable( new S_Slot_Table(i_sTitle) ),
- aClassesTables(),
- sLabel(i_sLabel)
-{
-}
-
-ProtectionArea::~ProtectionArea()
-{
-
-}
-
-csi::html::Table &
-ProtectionArea::GetTable()
-{
- csv_assert(pSglTable);
-
- return pSglTable->GetTable();
-}
-
-csi::html::Table &
-ProtectionArea::GetTable( ary::cpp::E_ClassKey i_eClassKey )
-{
- csv_assert(aClassesTables[Index(i_eClassKey)]);
- return aClassesTables[Index(i_eClassKey)]->GetTable();
-}
-
-DYN csi::html::Table *
-ProtectionArea::ReleaseTable()
-{
- csv_assert(pSglTable);
- return pSglTable->ReleaseTable();
-}
-
-DYN csi::html::Table *
-ProtectionArea::ReleaseTable( ary::cpp::E_ClassKey i_eClassKey )
-{
- csv_assert(aClassesTables[Index(i_eClassKey)]);
- return aClassesTables[Index(i_eClassKey)]->ReleaseTable();
-}
-
-const char *
-ProtectionArea::Label() const
-{
- return sLabel;
-}
-
-
-bool
-ProtectionArea::WasUsed_Area() const
-{
- if ( pSglTable )
- {
- return pSglTable->WasUsed();
- }
-
- typedef const Dyn<ProtectionArea::S_Slot_Table> cdyntab;
-
- // Workaround a maybe compiler bug in Solaris5-CC ?
- // should normally work without the cast,
- // because that is exactly the genuine type, given:
- return static_cast< cdyntab& >(aClassesTables[0])->WasUsed()
- OR static_cast< cdyntab& >(aClassesTables[1])->WasUsed()
- OR static_cast< cdyntab& >(aClassesTables[2])->WasUsed();
-}
-
-//******************* S_Slot_Table **********************//
-
-ProtectionArea::
-S_Slot_Table::S_Slot_Table(const char * i_sTitle)
- : sTableTitle(i_sTitle)
-{
-}
-
-ProtectionArea::
-S_Slot_Table::~S_Slot_Table()
-{
-}
-
-csi::html::Table &
-ProtectionArea::
-S_Slot_Table::GetTable()
-{
- return pTable
- ? *pTable
- : *( pTable = &Create_ChildListTable(sTableTitle) );
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/protarea.hxx b/autodoc/source/display/html/protarea.hxx
deleted file mode 100644
index 007b5161..00000000
--- a/autodoc/source/display/html/protarea.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_PROTAREA_HXX
-#define ADC_DISPLAY_HTML_PROTAREA_HXX
-
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace csi
-{
-namespace html
-{
- class Table;
-}
-}
-
-
-
-
-class ProtectionArea
-{
- public:
- ProtectionArea(
- const char * i_sLabel,
- const char * i_sTitle );
- ~ProtectionArea();
-
- csi::html::Table & GetTable();
- csi::html::Table & GetTable(
- ary::cpp::E_ClassKey
- i_eClassKey );
- DYN csi::html::Table * ReleaseTable();
- DYN csi::html::Table * ReleaseTable(
- ary::cpp::E_ClassKey
- i_eClassKey );
- const char * Label() const;
-
- int Size() const { return pSglTable ? 1 : 3; }
-
- bool WasUsed_Area() const;
- private:
- struct S_Slot_Table
- {
- const char * sTableTitle;
- Dyn< csi::html::Table >
- pTable;
-
- S_Slot_Table(
- const char * i_sTitle );
- ~S_Slot_Table();
- csi::html::Table & GetTable();
- DYN csi::html::Table *
- ReleaseTable() { return pTable.Release(); }
- bool WasUsed() const { return pTable; }
- };
-
- UINT8 Index(
- ary::cpp::E_ClassKey
- i_eClassKey ) const;
- // DATA
- Dyn<S_Slot_Table> pSglTable;
- Dyn<S_Slot_Table> aClassesTables[3];
- const char * sLabel;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/html/strconst.hxx b/autodoc/source/display/html/strconst.hxx
deleted file mode 100644
index cbc131cd..00000000
--- a/autodoc/source/display/html/strconst.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_STRCONST_HXX
-#define ADC_DISPLAY_HTML_STRCONST_HXX
-
-
-const char * const C_sDIR_NamespacesCpp = "names";
-const char * const C_sDIR_Index = "index-files"; // Convention recognised by Javadoc
-
-const char * const C_sPath_Index = "index-files/index-1.html"; // Convention recognised by Javadoc
-
-const char * const C_sHFN_Css = "cpp.css";
-const char * const C_sHFN_Overview = "index.html";
-const char * const C_sHFN_Help = "help.html";
-
-const char * const C_sHFN_Namespace = "index.html";
-
-const char * const C_sTitle_SubNamespaces = "Nested Namespaces";
-const char * const C_sTitle_Classes = "Classes";
-const char * const C_sTitle_Structs = "Structs";
-const char * const C_sTitle_Unions = "Unions";
-const char * const C_sTitle_Enums = "Enums";
-const char * const C_sTitle_Typedefs = "Typedefs";
-const char * const C_sTitle_Operations = "Functions";
-const char * const C_sTitle_Constants = "Constants";
-const char * const C_sTitle_Variables = "Variables";
-const char * const C_sTitle_EnumValues = "Values";
-
-const char * const C_sLabel_SubNamespaces = "subnsps";
-const char * const C_sLabel_Classes = "classes";
-const char * const C_sLabel_Structs = "structs";
-const char * const C_sLabel_Unions = "unions";
-const char * const C_sLabel_Enums = "enums";
-const char * const C_sLabel_Typedefs = "tydefs";
-const char * const C_sLabel_Operations = "ops";
-const char * const C_sLabel_Constants = "consts";
-const char * const C_sLabel_Variables = "vars";
-const char * const C_sLabel_EnumValues = "envals";
-
-const char * const C_sHFTitle_Overview = "C++ Reference Documentation Overview";
-const char * const C_sHFTitle_Help = "How This Reference Document Is Organized";
-
-const char * const C_sHFTitle_GlobalNamespaceCpp = "Global Namespace in C++";
-const char * const C_sHFTypeTitle_Namespace = "namespace";
-const char * const C_sHFTypeTitle_Class = "class";
-const char * const C_sHFTypeTitle_Struct = "struct";
-const char * const C_sHFTypeTitle_Union = "union";
-const char * const C_sHFTypeTitle_Enum = "enum";
-const char * const C_sHFTypeTitle_Typedef = "typedef";
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_constgroup.cxx b/autodoc/source/display/idl/hfi_constgroup.cxx
deleted file mode 100644
index d61584e5..00000000
--- a/autodoc/source/display/idl/hfi_constgroup.cxx
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_constgroup.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_constgroup.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_property.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sCePrefix_Constants("constants group");
-
-
-namespace
-{
-
-const String
- C_sList_Constants("Constants");
-const String
- C_sList_Constants_Label("Constants");
-const String
- C_sList_ConstantDetails("Constants' Details");
-const String
- C_sList_ConstantDetails_Label("ConstantDetails");
-
-enum E_SubListIndices
-{
- sli_ConstantsSummary = 0,
- sli_ConstantDetails = 1
-};
-
-
-} // anonymous namespace
-
-
-
-HF_IdlConstGroup::HF_IdlConstGroup( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlConstGroup::~HF_IdlConstGroup()
-{
-}
-
-void
-HF_IdlConstGroup::Produce_byData( const client & i_ce ) const
-{
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Constants, i_ce);
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
- dyn_ce_list
- dpConstants;
- ary::idl::ifc_constgroup::attr::Get_Constants(dpConstants, i_ce);
-
- if ( (*dpConstants).operator bool() )
- {
- produce_Members( *dpConstants,
- C_sList_Constants,
- C_sList_Constants_Label,
- C_sList_ConstantDetails,
- C_sList_ConstantDetails_Label );
- pNaviSubRow->SwitchOn(sli_ConstantsSummary);
- pNaviSubRow->SwitchOn(sli_ConstantDetails);
- }
- pNaviSubRow->Produce_Row();
-}
-
-HF_NaviSubRow &
-HF_IdlConstGroup::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce,true); // true := avoid link to Use-page.
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
- ret.AddItem(C_sList_Constants, C_sList_Constants_Label, false);
- ret.AddItem(C_sList_ConstantDetails, C_sList_ConstantDetails_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-void
-HF_IdlConstGroup::produce_MemberDetails( HF_SubTitleTable & o_table,
- const client & i_ce ) const
-{
- HF_IdlConstant
- aElement( Env(), o_table );
- aElement.Produce_byData(i_ce);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_constgroup.hxx b/autodoc/source/display/idl/hfi_constgroup.hxx
deleted file mode 100644
index 4e5dd8f6..00000000
--- a/autodoc/source/display/idl/hfi_constgroup.hxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_CONSTGROUP_HXX
-#define ADC_DISPLAY_HFI_CONSTGROUP_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-class HF_IdlConstGroup : public HtmlFactory_Idl
-{
- public:
- HF_IdlConstGroup(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlConstGroup();
-
- void Produce_byData(
- const client & ce ) const;
- private:
- HF_NaviSubRow & make_Navibar(
- const client & ce ) const;
- virtual void produce_MemberDetails(
- HF_SubTitleTable & o_table,
- const client & ce ) const;
-};
-
-
-
-// IMPLEMENTATION
-
-
-extern const String
- C_sCePrefix_Constants;
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_doc.cxx b/autodoc/source/display/idl/hfi_doc.cxx
deleted file mode 100644
index 017e022b..00000000
--- a/autodoc/source/display/idl/hfi_doc.cxx
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_doc.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <ary_i/d_token.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include "hfi_tag.hxx"
-#include "hi_ary.hxx"
-
-
-
-
-HF_IdlDocu::HF_IdlDocu( Environment & io_rEnv,
- HF_DocEntryList & o_rOut )
- : HtmlFactory_Idl( io_rEnv, &o_rOut.CurOut() ),
- rOut(o_rOut)
-{
-}
-
-HF_IdlDocu::~HF_IdlDocu()
-{
-}
-
-void
-HF_IdlDocu::Produce_fromCodeEntity( const client & i_ce ) const
-{
- const ce_info *
- i_pDocu = Get_IdlDocu(i_ce.Docu());
- if (i_pDocu != 0)
- Produce_byDocuAndScope(*i_pDocu, &i_ce, i_ce);
-}
-
-void
-HF_IdlDocu::Produce_fromReference( const ce_info & i_rDocuForReference,
- const client & i_rScopeGivingCe ) const
-{
- Produce_byDocuAndScope(i_rDocuForReference, 0, i_rScopeGivingCe );
-}
-
-void
-HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu,
- const client * i_pClient,
- const client & i_rScopeGivingCe ) const
-{
- bool bShort = NOT i_rDocu.Short().IsEmpty();
- bool bDescr = NOT i_rDocu.Description().IsEmpty();
-
- if ( i_rDocu.IsDeprecated()
- OR (
- (i_pClient != 0 ? i_pClient->SightLevel() == ary::idl::sl_File : false)
- AND NOT i_rDocu.IsPublished()
- )
- OR i_rDocu.IsOptional() )
- { // any usage restriction
- rOut.Produce_Term("Usage Restrictions");
-
- if ( i_rDocu.IsDeprecated() )
- rOut.Produce_Definition() >> *new Html::Italic << "deprecated";
- if ( (i_pClient != 0 ? i_pClient->SightLevel() == ary::idl::sl_File : false)
- AND NOT i_rDocu.IsPublished() )
- rOut.Produce_Definition() >> *new Html::Italic << "not published";
- if ( i_rDocu.IsOptional() )
- rOut.Produce_Definition() >> *new Html::Italic << "optional";
-
- if ( i_rDocu.IsDeprecated() AND
- // KORR_FUTURE
- // Workaround, because DocuTex2::IsEmpty() does not
- // calculate whitespace tokens only as empty.
- i_rDocu.DeprecatedText().Tokens().size() > 1 )
- {
- rOut.Produce_Term("Deprecation Info");
-
- HF_IdlDocuTextDisplay
- aDescription( Env(), 0, i_rScopeGivingCe);
- aDescription.Out().Enter( rOut.Produce_Definition() );
- i_rDocu.DeprecatedText().DisplayAt( aDescription );
- aDescription.Out().Leave();
- }
- } // end if (<any usage restriction>)
-
- if ( bShort OR bDescr )
- {
- rOut.Produce_Term("Description");
- HF_IdlDocuTextDisplay
- aDescription( Env(), 0, i_rScopeGivingCe);
- if (bShort)
- {
- aDescription.Out().Enter( rOut.Produce_Definition() );
- i_rDocu.Short().DisplayAt( aDescription );
- aDescription.Out().Leave();
- }
- if (bDescr)
- {
- aDescription.Out().Enter( rOut.Produce_Definition() );
- i_rDocu.Description().DisplayAt( aDescription );
- aDescription.Out().Leave();
- }
- }
-
- std::vector< csi::dsapi::DT_SeeAlsoAtTag* >
- aSeeAlsosWithoutText;
- std::vector< csi::dsapi::DT_SeeAlsoAtTag* >
- aSeeAlsosWithText;
-
- for ( std::vector< ary::inf::AtTag2* >::const_iterator
- iter = i_rDocu.Tags().begin();
- iter != i_rDocu.Tags().end();
- ++iter )
- {
- csi::dsapi::DT_SeeAlsoAtTag*
- pSeeAlso = dynamic_cast< csi::dsapi::DT_SeeAlsoAtTag * >(*iter);
- if (pSeeAlso != 0 )
- {
- if ( pSeeAlso->Text().IsEmpty() )
- {
- aSeeAlsosWithoutText.push_back(pSeeAlso);
- }
- else
- {
- aSeeAlsosWithText.push_back(pSeeAlso);
- }
- continue;
- }
-
- if ( strlen( (*iter)->Title() ) > 0 )
- {
- HF_IdlTag
- aTag(Env(), i_rScopeGivingCe);
- Xml::Element &
- rTerm = rOut.Produce_Term();
- aTag.Produce_byData( rTerm,
- rOut.Produce_Definition(),
- *(*iter) );
- }
- } // end for
-
- if (!aSeeAlsosWithoutText.empty())
- {
- HF_IdlTag
- aSeeAlsoTag(Env(), i_rScopeGivingCe);
- Xml::Element &
- rTerm = rOut.Produce_Term();
- aSeeAlsoTag.Produce_byData( rTerm,
- rOut.Produce_Definition(),
- aSeeAlsosWithoutText );
- }
-
- for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator
- itSee2 = aSeeAlsosWithText.begin();
- itSee2 != aSeeAlsosWithText.end();
- ++itSee2 )
- {
- HF_IdlTag
- aTag(Env(), i_rScopeGivingCe);
- Xml::Element &
- rTerm = rOut.Produce_Term();
- aTag.Produce_byData( rTerm,
- rOut.Produce_Definition(),
- *(*itSee2) );
- } // end for
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_doc.hxx b/autodoc/source/display/idl/hfi_doc.hxx
deleted file mode 100644
index a9f28305..00000000
--- a/autodoc/source/display/idl/hfi_doc.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_DOC_HXX
-#define ADC_DISPLAY_HFI_DOC_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_DocEntryList;
-
-
-class HF_IdlDocu : public HtmlFactory_Idl
-{
- public:
- HF_IdlDocu(
- Environment & io_rEnv,
- HF_DocEntryList & o_rOut );
- virtual ~HF_IdlDocu();
-
-
- /** Produces documentation by the CodeInfo accompanying
- ->i_ce.
- */
- void Produce_fromCodeEntity(
- const client & i_ce ) const;
-
- /** Produces documentation by the CodeInfo accompanying
- a link or reference to a CodeEntity.
-
- @param i_rScopeGivingCe
- Gives the scope from which links are to be calculated.
- */
- void Produce_fromReference(
- const ce_info & i_rDocuForReference,
- const client & i_rScopeGivingCe ) const;
-
- private:
- // Locals
- /** Produces documentation.
-
- @param i_rScopeGivingCe
- Gives the scope from which links are to be calculated.
- */
- void Produce_byDocuAndScope(
- const ce_info & i_rDocu,
- const client * i_pClient, /// May be 0.
- const client & i_rScopeGivingCe ) const;
-
- // DATA
- HF_DocEntryList & rOut;
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_enum.cxx b/autodoc/source/display/idl/hfi_enum.cxx
deleted file mode 100644
index 44188191..00000000
--- a/autodoc/source/display/idl/hfi_enum.cxx
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_enum.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_enum.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_property.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sCePrefix_Enum("enum");
-
-namespace
-{
-
-const String
- C_sList_Values("Values");
-const String
- C_sList_Values_Label("Values");
-const String
- C_sList_ValueDetails("Values' Details");
-const String
- C_sList_ValueDetails_Label("ValueDetails");
-
-enum E_SubListIndices
-{
- sli_ValuesSummary = 0,
- sli_ValueDetails = 1
-};
-
-} // anonymous namespace
-
-HF_IdlEnum::HF_IdlEnum( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlEnum::~HF_IdlEnum()
-{
-}
-
-void
-HF_IdlEnum::Produce_byData( const client & i_ce ) const
-{
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
-
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Enum, i_ce);
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
- dyn_ce_list
- dpValues;
- ary::idl::ifc_enum::attr::Get_Values(dpValues, i_ce);
- if ( (*dpValues).operator bool() )
- {
- produce_Members( *dpValues,
- C_sList_Values,
- C_sList_Values_Label,
- C_sList_ValueDetails,
- C_sList_ValueDetails_Label );
- pNaviSubRow->SwitchOn(sli_ValuesSummary);
- pNaviSubRow->SwitchOn(sli_ValueDetails);
- }
- pNaviSubRow->Produce_Row();
-}
-
-HF_NaviSubRow &
-HF_IdlEnum::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce);
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
- ret.AddItem(C_sList_Values, C_sList_Values_Label, false);
- ret.AddItem(C_sList_ValueDetails, C_sList_ValueDetails_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-void
-HF_IdlEnum::produce_MemberDetails( HF_SubTitleTable & o_table,
- const client & i_ce) const
-{
- HF_IdlEnumValue
- aElement( Env(), o_table );
- aElement.Produce_byData(i_ce);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_enum.hxx b/autodoc/source/display/idl/hfi_enum.hxx
deleted file mode 100644
index 0ceafdf2..00000000
--- a/autodoc/source/display/idl/hfi_enum.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_ENUM_HXX
-#define ADC_DISPLAY_HFI_ENUM_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_IdlEnum : public HtmlFactory_Idl
-{
- public:
- HF_IdlEnum(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlEnum();
-
- void Produce_byData(
- const client & ce ) const;
- private:
- HF_NaviSubRow & make_Navibar(
- const client & ce ) const;
- virtual void produce_MemberDetails(
- HF_SubTitleTable & o_table,
- const client & ce ) const;
-};
-
-
-
-// IMPLEMENTATION
-
-
-extern const String
- C_sCePrefix_Enum;
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_globalindex.cxx b/autodoc/source/display/idl/hfi_globalindex.cxx
deleted file mode 100644
index e76a411c..00000000
--- a/autodoc/source/display/idl/hfi_globalindex.cxx
+++ /dev/null
@@ -1,278 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_globalindex.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_types4idl.hxx>
-#include <ary/idl/i_module.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-
-
-namespace
-{
-
-/**
-*/
-enum E_Types
-{
- t_service = 0,
- t_interface = 1,
- t_struct = 2,
- t_exception = 3,
- t_enum = 4,
- t_typedef = 5,
- t_constantsgroup = 6,
- t_property = 7,
- t_function = 8,
- t_structelement = 9,
- t_enumvalue = 10,
- t_constant = 11,
- t_module = 12,
- t_singleton = 13,
- t_attribute = 14,
- t_siservice = 15,
- t_sisingleton = 16,
- t_MAX
-};
-
-String G_sDummy;
-
-
-/* RC-Ids for IDL types (see reposy.cxx):
-
- Module 2000
- Interface 2001
- Function 2002
- Service 2003
- Property 2004
-
- Enum 2005
- EnumValue 2006
- Typedef 2007
- Struct 2008
- StructElement 2009
-
- Exception 2010
- ConstantGroup 2011
- Constant 2012
- Singleton 2013
- Attribute 2014
- SglIfcService 2015
- SglIfcSingleton 2016
-*/
-const int C_nNumberOfIdlTypes = 17;
-const char * C_sTypeNames[C_nNumberOfIdlTypes] =
- { "module ", "interface ", "function ", "service ", "property ",
- "enum ", "value ", "typedef ", "struct ", "field ",
- "exception ", "constants group ", "constant ","singleton ", "attribute ",
- "service", "singleton"
- };
-const char * C_sOwnerNames[C_nNumberOfIdlTypes] =
- { "module ", "module ", "interface ", "module ", "service ",
- "module ", "enum ", "module ", "module ", "", // could be struct or exception
- "module ", "module ", "constants group ", "module ", "interface ",
- "module", "module"
- };
-const intt C_nNamesArrayOffset = intt(ary::idl::Module::class_id);
-const int C_nIxField = 9;
-
-
-
-
-const char C_cAlphabet[] =
-"<a class=\"inverse\" href=\"index-1.html\"><B>A</B></a> <a class=\"inverse\" href=\"index-2.html\"><B>B</B></a> <a class=\"inverse\" href=\"index-3.html\"><B>C</B></a> <a class=\"inverse\" href=\"index-4.html\"><B>D</B></a> <a class=\"inverse\" href=\"index-5.html\"><B>E</B></a> "
-"<a class=\"inverse\" href=\"index-6.html\"><B>F</B></a> <a class=\"inverse\" href=\"index-7.html\"><B>G</B></a> <a class=\"inverse\" href=\"index-8.html\"><B>H</B></a> <a class=\"inverse\" href=\"index-9.html\"><B>I</B></a> <a class=\"inverse\" href=\"index-10.html\"><B>J</B></a> "
-"<a class=\"inverse\" href=\"index-11.html\"><B>K</B></a> <a class=\"inverse\" href=\"index-12.html\"><B>L</B></a> <a class=\"inverse\" href=\"index-13.html\"><B>M</B></a> <a class=\"inverse\" href=\"index-14.html\"><B>N</B></a> <a class=\"inverse\" href=\"index-15.html\"><B>O</B></a> "
-"<a class=\"inverse\" href=\"index-16.html\"><B>P</B></a> <a class=\"inverse\" href=\"index-17.html\"><B>Q</B></a> <a class=\"inverse\" href=\"index-18.html\"><B>R</B></a> <a class=\"inverse\" href=\"index-19.html\"><B>S</B></a> <a class=\"inverse\" href=\"index-20.html\"><B>T</B></a> "
-"<a class=\"inverse\" href=\"index-21.html\"><B>U</B></a> <a class=\"inverse\" href=\"index-22.html\"><B>V</B></a> <a class=\"inverse\" href=\"index-23.html\"><B>W</B></a> <a class=\"inverse\" href=\"index-24.html\"><B>X</B></a> <a class=\"inverse\" href=\"index-25.html\"><B>Y</B></a> "
-"<a class=\"inverse\" href=\"index-26.html\"><B>Z</B></a>";
-
-
-
-HF_IdlGlobalIndex::PageData G_PageData;
-
-} // end anonymous namespace
-
-
-inline void
-HF_IdlGlobalIndex::write_EntryItself( Xml::Element & o_destination,
- const ary::idl::CodeEntity & i_ce,
- const HF_IdlTypeText & i_typeLinkWriter ) const
-{
- i_typeLinkWriter.Produce_IndexLink(o_destination, i_ce);
- o_destination << " - ";
-}
-
-
-HF_IdlGlobalIndex::HF_IdlGlobalIndex( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlGlobalIndex::~HF_IdlGlobalIndex()
-{
-}
-
-void
-HF_IdlGlobalIndex::Produce_Page(ary::idl::alphabetical_index::E_Letter i_letter) const
-{
- make_Navibar();
-
- HF_TitleTable
- aTitle(CurOut());
- StreamLock sl(100);
- aTitle.Produce_Title( sl()
- << "Global Index "
- << ( i_letter != ary::idl::alphabetical_index::non_alpha
- ? char(int(i_letter)-'a'+'A')
- : '_' )
- << c_str );
-
- // Letters Index
- aTitle.Add_Row()
- << new Xml::XmlCode(
- "<p align=\"center\"><a href=\"index-1.html\"><b>A</b></a> <a href=\"index-2.html\"><b>B</b></a> <a href=\"index-3.html\"><b>C</b></a> <a href=\"index-4.html\"><b>D</b></a> <a href=\"index-5.html\"><b>E</b></a> <a href=\"index-6.html\"><b>F</b></a> <a href=\"index-7.html\"><b>G</b></a> <a href=\"index-8.html\"><b>H</b></a> <a href=\"index-9.html\"><b>I</b></a> <a href=\"index-10.html\"><b>J</b></a>"
- " <a href=\"index-11.html\"><b>K</b></a> <a href=\"index-12.html\"><b>L</b></a> <a href=\"index-13.html\"><b>M</b></a> <a href=\"index-14.html\"><b>N</b></a> <a href=\"index-15.html\"><b>O</b></a> <a href=\"index-16.html\"><b>P</b></a> <a href=\"index-17.html\"><b>Q</b></a> <a href=\"index-18.html\"><b>R</b></a> <a href=\"index-19.html\"><b>S</b></a> <a href=\"index-20.html\"><b>T</b></a>"
- " <a href=\"index-21.html\"><b>U</b></a> <a href=\"index-22.html\"><b>V</b></a> <a href=\"index-23.html\"><b>W</b></a> <a href=\"index-24.html\"><b>X</b></a> <a href=\"index-25.html\"><b>Y</b></a> <a href=\"index-26.html\"><b>Z</b></a> <a href=\"index-27.html\"><b>_</b></a></p>" );
-
- Out().Enter(CurOut() >> *new Html::DefList);
-
- csv::erase_container(G_PageData);
- Env().Data().Get_IndexData(G_PageData, i_letter);
-
- // Helper object to produce links to the index Entries.
- HF_IdlTypeText aTypeLinkWriter(Env(),HF_IdlTypeText::use_for_javacompatible_index);
-
- PageData::const_iterator itEnd = G_PageData.end();
- for ( PageData::const_iterator iter = G_PageData.begin();
- iter != itEnd;
- ++iter )
- {
- produce_Line(iter, aTypeLinkWriter);
- } // end for
-
- Out().Leave();
- CurOut() << new Html::HorizontalLine;
-}
-
-void
-HF_IdlGlobalIndex::make_Navibar() const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_IndexMainRow();
-
- CurOut() << new Html::HorizontalLine();
-}
-
-void
-HF_IdlGlobalIndex::produce_Line( PageData::const_iterator i_entry,
- const HF_IdlTypeText & i_typeLinkWriter) const
-{
- const client &
- rCe = Env().Data().Find_Ce(*i_entry);
- if (NOT rCe.Owner().IsValid())
- return; // Omit global namespace.
-
- // The destination for the created output:
- Xml::Element & rDT = CurOut() >> *new Html::DefListTerm;
-
- /** The following code is intended to produce an output that
- will be recognized by the context help system of Forte.
- That is reached by making it similar to the indices, that
- Javadoc produces.
- If the link to the Entry contains a hashmark, the Forte-Help
- requires following a link to the owner.
- But if there is no hashmark, the following link must go to
- the same Entry again. Doesn't make really sense :-(, but that's
- like it is.
- */
- write_EntryItself(rDT,rCe,i_typeLinkWriter);
- if (rCe.SightLevel() == ary::idl::sl_Member)
- write_OwnerOfEntry(rDT,rCe,i_typeLinkWriter);
- else
- write_EntrySecondTime(rDT,rCe,i_typeLinkWriter);
-
- // This produces an empty "<dd></dd>", which is also needed to reach
- // similarity to the Javadoc index:
- CurOut() << new Html::DefListDefinition;
-}
-
-void
-HF_IdlGlobalIndex::write_OwnerOfEntry( Xml::Element & o_destination,
- const ary::idl::CodeEntity & i_ce,
- const HF_IdlTypeText & i_typeLinkWriter ) const
-{
- const client &
- rOwner = Env().Data().Find_Ce(i_ce.Owner());
-
- int nIx = int(i_ce.AryClass() - C_nNamesArrayOffset);
- csv_assert(csv::in_range(0,nIx,C_nNumberOfIdlTypes));
-
- o_destination << C_sTypeNames[nIx]
- << "in ";
- if (nIx != C_nIxField)
- {
- o_destination << C_sOwnerNames[nIx];
- }
- else
- {
- uintt
- nOwnerIx = rOwner.AryClass() - C_nNamesArrayOffset;
- csv_assert(
- nOwnerIx < static_cast< unsigned int >(C_nNumberOfIdlTypes));
- o_destination << C_sTypeNames[nOwnerIx];
- }
- i_typeLinkWriter.Produce_IndexOwnerLink(o_destination, rOwner);
-}
-
-void
-HF_IdlGlobalIndex::write_EntrySecondTime( Xml::Element & o_destination,
- const ary::idl::CodeEntity & i_ce,
- const HF_IdlTypeText & i_typeLinkWriter ) const
-{
- int nIx = int(i_ce.AryClass() - C_nNamesArrayOffset);
- csv_assert(csv::in_range(0,nIx,C_nNumberOfIdlTypes));
-
- o_destination << C_sTypeNames[nIx]
- << " ";
- i_typeLinkWriter.Produce_IndexSecondEntryLink(o_destination, i_ce);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_globalindex.hxx b/autodoc/source/display/idl/hfi_globalindex.hxx
deleted file mode 100644
index eaf4c7d4..00000000
--- a/autodoc/source/display/idl/hfi_globalindex.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_GLOBALINDEX_HXX
-#define ADC_DISPLAY_HFI_GLOBALINDEX_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_gate.hxx>
-
-
-class HF_IdlTypeText;
-
-class HF_IdlGlobalIndex : public HtmlFactory_Idl
-{
- public:
- typedef std::vector<ary::idl::Ce_id> PageData;
-
- HF_IdlGlobalIndex(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlGlobalIndex();
-
- void Produce_Page(
- ary::idl::alphabetical_index::E_Letter
- i_letter ) const;
- private:
- void make_Navibar() const; /// Called by @->Produce_Page()
- void produce_Line( /// Called by @->Produce_Page()
- PageData::const_iterator
- i_entry,
- const HF_IdlTypeText &
- i_typeLinkWriter ) const;
-
- void write_EntryItself( /// Called by @->produceLine()
- Xml::Element & o_destination,
- const ary::idl::CodeEntity &
- i_entry,
- const HF_IdlTypeText &
- i_typeLinkWriter ) const;
-
- void write_OwnerOfEntry( /// Called by @->produceLine()
- Xml::Element & o_destination,
- const ary::idl::CodeEntity &
- i_entry,
- const HF_IdlTypeText &
- i_typeLinkWriter ) const;
-
- void write_EntrySecondTime( /// Called by @->produceLine()
- Xml::Element & o_destination,
- const ary::idl::CodeEntity &
- i_entry,
- const HF_IdlTypeText &
- i_typeLinkWriter ) const;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_hierarchy.cxx b/autodoc/source/display/idl/hfi_hierarchy.cxx
deleted file mode 100644
index 6b2f8b8f..00000000
--- a/autodoc/source/display/idl/hfi_hierarchy.cxx
+++ /dev/null
@@ -1,205 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_hierarchy.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <udm/html/htmlitem.hxx>
-#include <ary/stdconstiter.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_type.hxx>
-#include <ary/idl/ik_interface.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-#include "hfi_interface.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_env.hxx"
-
-
-
-HF_IdlBaseNode::HF_IdlBaseNode( const TYPE & i_rType,
- const GATE & i_rGate,
- intt i_nPositionOffset,
- HF_IdlBaseNode & io_rDerived )
- : nType(i_rType.TypeId()),
- aBases(),
- nCountBases(0),
- nPosition(i_nPositionOffset),
- pDerived(&io_rDerived)
-{
- Ce_id nCe = i_rGate.Types().Search_CeRelatedTo(nType);
- if (nCe.IsValid())
- {
- GatherBases(i_rGate.Ces().Find_Ce(nCe), i_rGate);
- }
-}
-
-HF_IdlBaseNode::~HF_IdlBaseNode()
-{
-}
-
-void
-HF_IdlBaseNode::FillPositionList( std::vector< const HF_IdlBaseNode* > & o_rPositionList ) const
-{
- for ( BaseList::const_iterator it = aBases.begin();
- it != aBases.end();
- ++it )
- {
- (*it)->FillPositionList(o_rPositionList);
- } // end for
-
- o_rPositionList.push_back(this);
-}
-
-void
-HF_IdlBaseNode::GatherBases( const CE & i_rCe,
- const GATE & i_rGate )
-{
- ary::Dyn_StdConstIterator<ary::idl::CommentedRelation>
- aHelp;
- ary::idl::ifc_interface::attr::Get_Bases(aHelp,i_rCe);
-
- for ( ary::StdConstIterator<ary::idl::CommentedRelation> & it = *aHelp;
- it.operator bool();
- ++it )
- {
- const TYPE &
- rBaseType = i_rGate.Types().Find_Type((*it).Type());
-
- Dyn<HF_IdlBaseNode>
- pBaseNode( new HF_IdlBaseNode( rBaseType,
- i_rGate,
- nPosition,
- *this )
- );
-
- intt nAddedBases = pBaseNode->BaseCount() + 1;
- nCountBases += nAddedBases;
- nPosition += nAddedBases;
- aBases.push_back( pBaseNode.Release() );
- } // end for
-}
-
-
-void
-Write_BaseHierarchy( csi::xml::Element & o_rOut,
- HtmlEnvironment_Idl & i_env,
- const ary::idl::CodeEntity & i_ce )
-{
- csi::xml::Element &
- rPre = o_rOut
- >> *new csi::xml::AnElement("pre")
- << new csi::html::StyleAttr("font-family:monospace;");
-
- std::vector<uintt>
- aSetColumns;
- rPre
- >> *new csi::html::Strong
- << i_ce.LocalName();
- rPre
- << "\n";
- Write_Bases( rPre,
- i_env,
- i_ce,
- aSetColumns );
- rPre
- << "\n";
-
-}
-
-
-void
-Write_Bases( csi::xml::Element & o_out,
- HtmlEnvironment_Idl & i_env,
- const ary::idl::CodeEntity & i_rCe,
- std::vector<uintt> & io_setColumns )
-{
- ary::Dyn_StdConstIterator<ary::idl::CommentedRelation>
- aHelp;
- ary::idl::ifc_interface::attr::Get_Bases(aHelp,i_rCe);
-
- for ( ary::StdConstIterator<ary::idl::CommentedRelation> & it = *aHelp;
- it.operator bool();
- // NO INCREMENT HERE, see below
- )
- {
- ary::idl::Type_id
- nType = (*it).Type();
- ++it;
- bool
- bThereComesMore = it.operator bool();
-
- ary::idl::Ce_id
- nCe = i_env.Gate().Types().Search_CeRelatedTo(nType);
- if (nCe.IsValid())
- {
- // KORR_FUTURE
- // Rather check for id(!) of com::sun::star::uno::XInterface.
- if (i_env.Gate().Ces().Find_Ce(nCe).LocalName() == "XInterface")
- continue;
- }
-
- for (uintt i = 0; i < io_setColumns.size(); ++i)
- {
- if (io_setColumns[i] == 1)
- o_out << new csi::xml::XmlCode("&#x2503");
- else
- o_out << " ";
- o_out << " ";
- }
-
- if (bThereComesMore)
- o_out << new csi::xml::XmlCode("&#x2523");
- else
- o_out << new csi::xml::XmlCode("&#x2517");
- o_out << " ";
-
- HF_IdlTypeText
- aDisplay( i_env, o_out, true, i_env.CurPageCe());
- aDisplay.Produce_byData(nType);
- o_out << "\n";
-
- if (nCe.IsValid())
- {
- io_setColumns.push_back(bThereComesMore ? 1 : 0);
-
- const ary::idl::CodeEntity &
- rCe = i_env.Gate().Ces().Find_Ce(nCe);
- Write_Bases( o_out,
- i_env,
- rCe,
- io_setColumns );
- io_setColumns.pop_back();
- }
- } // end for
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_hierarchy.hxx b/autodoc/source/display/idl/hfi_hierarchy.hxx
deleted file mode 100644
index d0a8c763..00000000
--- a/autodoc/source/display/idl/hfi_hierarchy.hxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_HIERARCHY_HXX
-#define ADC_DISPLAY_HFI_HIERARCHY_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_comrela.hxx>
-#include <ary/idl/i_types4idl.hxx>
-
-
-namespace csi
-{
-namespace xml
-{
- class Element;
-}
-}
-
-
-class HF_IdlInterface;
-class HtmlEnvironment_Idl;
-
-
-
-/** Represents a node in an pyramidic inheritance hierarchy which shall be
- displayed in text mode.
-*/
-class HF_IdlBaseNode
-{
- public:
- typedef ary::idl::CodeEntity CE;
- typedef ary::idl::Type TYPE;
- typedef ary::idl::Gate GATE;
- typedef ary::idl::Ce_id Ce_id;
- typedef ary::idl::Type_id Type_id;
-
- /** @descr
- The constructor recursively calls further constructors of
- HF_IdlBaseNode for the bases of ->i_rType, if ->i_rType matches to a
- ->CE.
- So it builds up a complete hierarchy tree of all base classes
- of ->i_pEntity.
- */
- HF_IdlBaseNode(
- const TYPE & i_rType,
- const GATE & i_rGate,
- intt i_nPositionOffset,
- HF_IdlBaseNode & io_rDerived );
- ~HF_IdlBaseNode();
-
- /** Recursively fills ->o_rPositionList with the instances of base
- classes in the order in which they will be displayed.
- */
- void FillPositionList(
- std::vector< const HF_IdlBaseNode* > &
- o_rPositionList ) const;
-
- Type_id Type() const { return nType; }
- intt BaseCount() const { return nCountBases; }
- intt Position() const { return nPosition; }
- int Xpos() const { return 3*Position(); }
- int Ypos() const { return 2*Position(); }
- const HF_IdlBaseNode * Derived() const { return pDerived; }
-
- private:
- typedef std::vector< DYN HF_IdlBaseNode* > BaseList;
-
- void GatherBases(
- const CE & i_rCe,
- const GATE & i_rGate );
-
- // DATA
- Type_id nType;
- BaseList aBases;
- intt nCountBases;
- intt nPosition;
- HF_IdlBaseNode * pDerived;
-};
-
-void Write_BaseHierarchy(
- csi::xml::Element & o_rOut,
- HtmlEnvironment_Idl &
- i_env,
- const ary::idl::CodeEntity &
- i_rCe );
-
-void Write_Bases(
- csi::xml::Element & o_rOut,
- HtmlEnvironment_Idl &
- i_env,
- const ary::idl::CodeEntity &
- i_rCe,
- std::vector<uintt> &
- io_setColumns );
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_interface.cxx b/autodoc/source/display/idl/hfi_interface.cxx
deleted file mode 100644
index 2f60a36d..00000000
--- a/autodoc/source/display/idl/hfi_interface.cxx
+++ /dev/null
@@ -1,360 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_interface.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ik_function.hxx>
-#include <ary/idl/ik_interface.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_hierarchy.hxx"
-#include "hfi_method.hxx"
-#include "hfi_navibar.hxx"
-#include "hfi_property.hxx"
-#include "hfi_tag.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sCePrefix_Interface("interface");
-
-namespace
-{
-
-const String
- C_sBaseInterface("Base Interfaces");
-const String
- C_sList_BaseComments("Comments on Base Interfaces");
-const String
- C_sList_Methods("Methods' Summary");
-const String
- C_sList_Methods_Label("MethodsSummary");
-const String
- C_sDetails_Methods("Methods' Details");
-const String
- C_sDetails_Methods_Label("MethodsDetails");
-
-const String
- C_sList_Attributes("Attributes' Summary");
-const String
- C_sList_Attributes_Label("AttributesSummary");
-const String
- C_sList_AttributesDetails("Attributes' Details");
-const String
- C_sList_AttributesDetails_Label("AttributesDetails");
-
-
-
-enum E_SubListIndices
-{
- sli_MethodsSummay = 0,
- sli_AttributesSummary = 1,
- sli_MethodDetails = 2,
- sli_AttributesDetails = 3
-};
-
-} //anonymous namespace
-
-
-
-
-HF_IdlInterface::HF_IdlInterface( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut),
- eCurProducedMembers(mem_none)
-{
-}
-
-HF_IdlInterface::~HF_IdlInterface()
-{
-}
-
-void
-HF_IdlInterface::Produce_byData( const client & i_ce ) const
-{
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
-
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
-
- produce_Title(aTitle, C_sCePrefix_Interface, i_ce);
-
- produce_BaseHierarchy( aTitle.Add_Row(),
- i_ce,
- C_sBaseInterface );
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
- dyn_ce_list dpFunctions;
- ary::idl::ifc_interface::attr::Get_Functions(dpFunctions, i_ce);
- if ( (*dpFunctions).operator bool() )
- {
- eCurProducedMembers = mem_Functions;
-
- produce_Members( *dpFunctions,
- C_sList_Methods,
- C_sList_Methods_Label,
- C_sDetails_Methods,
- C_sDetails_Methods_Label,
- HtmlFactory_Idl::viewtype_summary );
- pNaviSubRow->SwitchOn(sli_MethodsSummay);
- }
-
- dyn_ce_list
- dpAttributes;
- ary::idl::ifc_interface::attr::Get_Attributes(dpAttributes, i_ce);
- if ( (*dpAttributes).operator bool() )
- {
- eCurProducedMembers = mem_Attributes;
-
- produce_Members( *dpAttributes,
- C_sList_Attributes,
- C_sList_Attributes_Label,
- C_sList_AttributesDetails,
- C_sList_AttributesDetails_Label,
- HtmlFactory_Idl::viewtype_summary );
- pNaviSubRow->SwitchOn(sli_AttributesSummary);
- }
-
- ary::idl::ifc_interface::attr::Get_Functions(dpFunctions, i_ce);
- if ( (*dpFunctions).operator bool() )
- {
- eCurProducedMembers = mem_Functions;
-
- produce_Members( *dpFunctions,
- C_sList_Methods,
- C_sList_Methods_Label,
- C_sDetails_Methods,
- C_sDetails_Methods_Label,
- HtmlFactory_Idl::viewtype_details );
- pNaviSubRow->SwitchOn(sli_MethodDetails);
- }
-
- ary::idl::ifc_interface::attr::Get_Attributes(dpAttributes, i_ce);
- if ( (*dpAttributes).operator bool() )
- {
- eCurProducedMembers = mem_Attributes;
-
- produce_Members( *dpAttributes,
- C_sList_Attributes,
- C_sList_Attributes_Label,
- C_sList_AttributesDetails,
- C_sList_AttributesDetails_Label,
- HtmlFactory_Idl::viewtype_details );
- pNaviSubRow->SwitchOn(sli_AttributesDetails);
- }
-
- eCurProducedMembers = mem_none;
-
- pNaviSubRow->Produce_Row();
-}
-
-DYN HF_NaviSubRow &
-HF_IdlInterface::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce);
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
- ret.AddItem(C_sList_Methods, C_sList_Methods_Label, false);
- ret.AddItem(C_sList_Attributes, C_sList_Attributes_Label, false);
- ret.AddItem(C_sDetails_Methods, C_sDetails_Methods_Label, false);
- ret.AddItem(C_sList_AttributesDetails, C_sList_AttributesDetails_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-void
-HF_IdlInterface::produce_MemberDetails( HF_SubTitleTable & o_table,
- const client & i_ce ) const
-{
- switch (eCurProducedMembers)
- {
- case mem_Functions:
- break;
- case mem_Attributes:
- {
- HF_IdlAttribute
- aAttribute( Env(), o_table);
- aAttribute.Produce_byData( i_ce );
- return;
- };
- default: //Won't happen.
- return;
- } // end switch
-
- typedef ary::idl::ifc_function::attr funcAttr;
-
- HF_IdlMethod
- aFunction( Env(),
- o_table.Add_Row()
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_MDetail) );
-
- ary::Dyn_StdConstIterator<ary::idl::Parameter>
- pParameters;
- funcAttr::Get_Parameters(pParameters, i_ce);
-
- ary::Dyn_StdConstIterator<ary::idl::Type_id>
- pExceptions;
- funcAttr::Get_Exceptions(pExceptions, i_ce);
-
- aFunction.Produce_byData( i_ce.LocalName(),
- funcAttr::ReturnType(i_ce),
- *pParameters,
- *pExceptions,
- funcAttr::IsOneway(i_ce),
- funcAttr::HasEllipse(i_ce),
- i_ce );
-}
-
-void
-HF_IdlInterface::produce_BaseHierarchy( Xml::Element & o_screen,
- const client & i_ce,
- const String & i_sLabel ) const
-{
- ary::Dyn_StdConstIterator<ary::idl::CommentedRelation>
- pHelp;
- ary::idl::ifc_interface::attr::Get_Bases(pHelp, i_ce);
- if (NOT (*pHelp).operator bool())
- return;
-
- // Check for XInterface as only base:
- ary::StdConstIterator<ary::idl::CommentedRelation> &
- itTest = *pHelp;
- ary::idl::Ce_id
- nCe = Env().Gate().Types().Search_CeRelatedTo((*itTest).Type());
- if (nCe.IsValid())
- {
- // KORR_FUTURE
- // Rather check for id(!) of com::sun::star::uno::XInterface.
- if (Env().Gate().Ces().Find_Ce(nCe).LocalName() == "XInterface")
- {
- ++itTest;
- if (NOT itTest.operator bool())
- return;
- }
- }
-
- // Write hierarchy:
-
- HF_DocEntryList
- aDocList( o_screen );
- aDocList.Produce_Term(i_sLabel);
- Xml::Element &
- rBaseList = aDocList.Produce_Definition();
-
-// NEW
- Write_BaseHierarchy(rBaseList, Env(), i_ce);
-
- // Write comments:
- // KORR_FUTURE: Make sure, no empty table is constructed when comments list is empty.
- HF_SubTitleTable
- aBaseTable( aDocList.Produce_Definition(),
- "",
- C_sList_BaseComments,
- 2,
- HF_SubTitleTable::sublevel_3 );
-
- ary::Dyn_StdConstIterator<ary::idl::CommentedRelation>
- pBases;
- ary::idl::ifc_interface::attr::Get_Bases(pBases, i_ce);
- for ( ary::StdConstIterator<ary::idl::CommentedRelation> & it = *pBases;
- it.operator bool();
- ++it )
- {
- Xml::Element &
- rRow = aBaseTable.Add_Row();
-
- Xml::Element &
- rTerm = rRow
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_SummaryLeft);
- HF_IdlTypeText
- aTypeDisplay( Env(), rTerm, false, 0);
- aTypeDisplay.Produce_byData((*it).Type());
-
- Xml::Element &
- rDocu = rRow
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_SummaryRight);
-
- HF_DocEntryList
- aDocuList(rDocu);
-
- if ((*it).Info() != 0)
- {
-// aDocuList.Produce_Term("Comment on Base Reference");
-
- HF_IdlDocu
- aDocuDisplay(Env(), aDocuList);
- aDocuDisplay.Produce_fromReference(*(*it).Info(), i_ce);
- }
- else
- {
- const client *
- pCe = Env().Linker().Search_CeFromType((*it).Type());
- const ce_info *
- pShort = pCe != 0
- ? Get_IdlDocu(pCe->Docu())
- : (const ce_info *)(0);
- if ( pShort != 0 )
- {
- aDocuList.Produce_NormalTerm("(referenced interface's summary:)");
-
- Xml::Element &
- rDef = aDocuList.Produce_Definition();
- HF_IdlDocuTextDisplay
- aShortDisplay( Env(), &rDef, *pCe);
- pShort->Short().DisplayAt(aShortDisplay);
- } // end if (pShort != 0)
- } // endif ( (*i_commentedRef).Info() != 0 ) else
- } // end for
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_interface.hxx b/autodoc/source/display/idl/hfi_interface.hxx
deleted file mode 100644
index 74af1eab..00000000
--- a/autodoc/source/display/idl/hfi_interface.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_INTERFACE_HXX
-#define ADC_DISPLAY_HFI_INTERFACE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_types4idl.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-
-
-class HF_NaviSubRow;
-class HF_SubTitleTable;
-class HF_IdlBaseNode;
-
-class HF_IdlInterface : public HtmlFactory_Idl
-{
- public:
- HF_IdlInterface(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlInterface();
-
- void Produce_byData(
- const client & i_ce ) const;
- private:
- // Locals
- DYN HF_NaviSubRow & make_Navibar(
- const client & i_ce ) const;
-
- virtual void produce_MemberDetails(
- HF_SubTitleTable & o_table,
- const client & ce ) const;
- void produce_BaseHierarchy(
- Xml::Element & o_screen,
- const client & i_ce,
- const String & i_sLabel ) const;
-
- // Locals
- enum E_CurProducedMembers
- {
- mem_none,
- mem_Functions,
- mem_Attributes
- };
-
- // DATA
- mutable E_CurProducedMembers
- eCurProducedMembers;
-};
-
-
-
-// IMPLEMENTATION
-
-extern const String
- C_sCePrefix_Interface;
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_linklist.cxx b/autodoc/source/display/idl/hfi_linklist.cxx
deleted file mode 100644
index 12810b8e..00000000
--- a/autodoc/source/display/idl/hfi_linklist.cxx
+++ /dev/null
@@ -1,380 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_linklist.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_tag.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_ary.hxx"
-#include "hi_env.hxx"
-
-
-
-
-//******************* HF_CommentedLink_Table **********************************//
-
-HF_CommentedLink_Table::HF_CommentedLink_Table( Environment & io_rEnv,
- Xml::Element & o_rOut,
- const String & i_sTitle,
- const String & i_sLabel,
- bool i_bBorder )
- : HtmlFactory_Idl(io_rEnv,&o_rOut),
- pTable( new Html::Table( (i_bBorder ? "1" : "0"), "100%", "5", "0") ),
- pCurLinkColumn(0),
- pCurCommentColumn(0)
-{
- *pTable
- << new Html::ClassAttr("commentedlinks");
-
- CurOut()
- >> *new Html::Label(i_sLabel)
- << new Html::LineBreak;
- CurOut()
- << pTable;
-// HF_SubTitle aTitle(*pTable);
-// aTitle.Produce_it(i_sTitle);
-}
-
-HF_CommentedLink_Table::~HF_CommentedLink_Table()
-{
-}
-
-void
-HF_CommentedLink_Table::Add_Line()
-{
- Html::TableRow &
- rRow = pTable->AddRow();
-
- pCurLinkColumn = & (rRow.AddCell()
- << new Html::WidthAttr("30%")
- << new Xml::AnAttribute("valign","top") );
- pCurCommentColumn = & rRow.AddCell();
-}
-
-Xml::Element &
-HF_CommentedLink_Table::Cur_LinkColumn()
-{
- csv_assert(pCurLinkColumn != 0);
- return *pCurLinkColumn;
-}
-
-Xml::Element &
-HF_CommentedLink_Table::Cur_CommentColumn()
-{
- csv_assert(pCurCommentColumn != 0);
- return *pCurCommentColumn;
-}
-
-
-//******************* HF_MemberTable **********************************//
-
-HF_MemberTable::HF_MemberTable( Environment & io_rEnv,
- Xml::Element & o_rOut,
- const String & i_sTitle,
- const String & i_sLabel,
- bool i_bInline )
- : HtmlFactory_Idl(io_rEnv,&o_rOut),
- pTable( new Html::Table("1", "100%", "5", "0") ),
- pCurDeclaration(0),
- pCurDescription(0),
- bInline(i_bInline)
-{
- *pTable
- << new Html::ClassAttr("memberlist");
-
- CurOut()
- >> *new Html::Label(i_sLabel)
- << new Html::LineBreak;
- CurOut()
- << pTable;
-// HF_SubTitle aTitle(*pTable);
-// aTitle.Produce_it(i_sTitle);
-}
-
-HF_MemberTable::~HF_MemberTable()
-{
-}
-
-void
-HF_MemberTable::Add_Line()
-{
- if (bInline)
- {
- Html::TableRow & rRow = pTable->AddRow();
-
- pCurDeclaration = &( rRow.AddCell()
- << new Xml::AnAttribute("valign","top")
- << new Html::WidthAttr("30%") );
- pCurDescription = & rRow.AddCell();
- }
- else
- {
- Html::DefList *
- pMemberSpace = new Html::DefList;
- *pMemberSpace
- << new Html::ClassAttr("member");
-
- pTable->AddRow().AddCell() << pMemberSpace;
-
- pCurDeclaration =
- & ( *pMemberSpace
- >> *new Html::DefListTerm
- << new Html::ClassAttr("member") );
- pCurDescription =
- & ( *pMemberSpace
- >> *new Html::DefListDefinition()
- << new Html::ClassAttr("member") );
- }
-}
-
-Xml::Element &
-HF_MemberTable::Cur_Declaration()
-{
- csv_assert(pCurDeclaration != 0);
- return *pCurDeclaration;
-}
-
-Xml::Element &
-HF_MemberTable::Cur_Description()
-{
- csv_assert(pCurDescription != 0);
- return *pCurDescription;
-}
-
-
-
-//******************* HF_IdlLinkList **********************************//
-
-HF_IdlLinkList::HF_IdlLinkList( Environment & io_rEnv,
- Xml::Element * o_pOut )
- : HtmlFactory_Idl(io_rEnv,o_pOut)
-{
-}
-
-HF_IdlLinkList::~HF_IdlLinkList()
-{
-}
-
-void
-HF_IdlLinkList::Produce_NamespaceMembers( const String & i_sTitle,
- const String & i_sLabel,
- const std::vector<ary::idl::Ce_id> & i_rList,
- bool i_bNestedNamespaces ) const
-{
- HF_CommentedLink_Table
- aTableMaker( Env(), CurOut(),
- i_sTitle, i_sLabel,
- true );
-
- std::vector<ary::idl::Ce_id>::const_iterator itEnd = i_rList.end();
- for ( std::vector<ary::idl::Ce_id>::const_iterator it = i_rList.begin();
- it != itEnd;
- ++it )
- {
- static String sEntryName;
- static String sEntryLink;
- const ce_info *
- pDocu = 0;
- Get_EntryData_NamespaceMembers( sEntryName, sEntryLink, pDocu, *it, i_bNestedNamespaces );
- aTableMaker.Add_Line();
-
- aTableMaker.Cur_LinkColumn()
- >> *new Html::Link(sEntryLink)
- << sEntryName;
-
- if ( pDocu != 0 )
- {
- HF_IdlShortDocu
- aTextDisplay(Env(), aTableMaker.Cur_CommentColumn() );
- aTextDisplay.Produce_byData( pDocu );
- }
- } // end for
-}
-
-void
-HF_IdlLinkList::Produce_GlobalLinks( const String & i_sTitle,
- const String & i_sLabel,
- ce_list & i_rList ) const
-{
- HF_CommentedLink_Table
- aTableMaker( Env(), CurOut(),
- i_sTitle, i_sLabel,
- true );
-
- for ( ; i_rList; ++i_rList )
- {
- aTableMaker.Add_Line();
- HF_IdlTypeText
- aLinkText( Env(), aTableMaker.Cur_LinkColumn(), true );
- aLinkText.Produce_byData(*i_rList);
-
- const ce_info *
- pDocu = Get_EntryDocu(*i_rList);
- if ( pDocu != 0 )
- {
- HF_IdlShortDocu
- aTextDisplay(Env(), aTableMaker.Cur_CommentColumn() );
- aTextDisplay.Produce_byData( pDocu, *i_rList );
- }
- }
-}
-
-void
-HF_IdlLinkList::Produce_GlobalCommentedLinks( const String & i_sTitle,
- const String & i_sLabel,
- comref_list & i_rList ) const
-{
- HF_CommentedLink_Table
- aTableMaker( Env(), CurOut(),
- i_sTitle, i_sLabel,
- true );
-/*
- for ( ; i_rList; ++i_rList )
- {
- aTableMaker.Add_Line();
- HF_IdlTypeText
- aLinkText( Env(), aTableMaker.Cur_LinkColumn(), true );
- aLinkText.Produce_byData( (*i_rList).first );
-
- HF_DocEntryList
- aDocList( aTableMaker.Cur_CommentColumn() );
- if ( (*i_rList).second != 0 )
- {
- HF_IdlDocu
- aDocuDisplay( Env(), aDocList );
- aDocuDisplay.Produce_byData( (*i_rList).second );
- }
- else
- {
- const ce_info *
- pShort = Get_EntryDocu(
- Env().Gate().Types().Search_CeRelatedTo(
- (*i_rList).first) );
- if ( pShort != 0 )
- {
- if (pShort->IsDeprecated())
- {
- aDocList.Produce_Term()
- << "[ DEPRECATED ]";
- }
- if (pShort->IsOptional())
- {
- aDocList.Produce_Term()
- << "[ OPTIONAL ]";
- }
-
- aDocList.Produce_Term()
- << "Description";
-
- HF_IdlDocuTextDisplay
- aShortDisplay( Env(), &aDocList.Produce_Definition() );
- aShortDisplay.Set_CurScopeTo(
- Env().Gate().Types().Search_CeRelatedTo((*i_rList).first) );
- pShort->Short().DisplayAt(aShortDisplay);
- }
- }
- }
-*/
-}
-
-void
-HF_IdlLinkList::Produce_MemberLinks( const String & i_sTitle,
- const String & i_sLabel,
- ce_list & i_rList ) const
-{
- HF_CommentedLink_Table
- aTableMaker( Env(), CurOut(),
- i_sTitle, i_sLabel,
- true );
-
-/*
- for ( ; i_rList; ++i_rList )
- {
- const ary::idl::CodeEntity &
- rCe = Env().Gate().Ces().Find_Ce(*i_rList);
-
- aTableMaker.Add_Line();
- aTableMaker.Cur_LinkColumn()
- >> *new Html::Link(
- StreamLock(200)() << "#" << rCe.LocalName() << c_str)
- << rCe.LocalName();
-
- const ce_info *
- pDocu = rCe.Docu();
- if ( pDocu != 0 )
- {
- HF_IdlShortDocu
- aTextDisplay(Env(), aTableMaker.Cur_CommentColumn() );
- aTextDisplay.Produce_byData( *pDocu );
- }
- } // end for
-*/
-}
-
-void
-HF_IdlLinkList::Get_EntryData_NamespaceMembers(
- String & o_sEntryName,
- String & o_sEntryLink,
- const ce_info * & o_pDocu,
- ce_id i_nMemberId,
- bool i_bIsNestedNamespace ) const
-{
- const ary::idl::CodeEntity &
- rCe = Env().Data().Find_Ce(i_nMemberId);
-
- o_sEntryName = rCe.LocalName();
- o_sEntryLink = StreamLock(200)() << rCe.LocalName()
- << ( i_bIsNestedNamespace
- ? "/module-ix"
- : "" )
- << ".html"
- << c_str;
- o_pDocu = rCe.Docu();
-}
-
-const ary::doc::OldIdlDocu *
-HF_IdlLinkList::Get_EntryDocu(ce_id i_nMemberId) const
-{
- if (i_nMemberId.IsValid())
- return Env().Data().Find_Ce(i_nMemberId).Docu();
- else
- return 0;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_linklist.hxx b/autodoc/source/display/idl/hfi_linklist.hxx
deleted file mode 100644
index 4cfe3d8d..00000000
--- a/autodoc/source/display/idl/hfi_linklist.hxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_LINKLIST_HXX
-#define ADC_DISPLAY_HFI_LINKLIST_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_comrela.hxx>
-#include <ary_i/ci_text2.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-
-
-
-
-class HF_CommentedLink_Table : public HtmlFactory_Idl
-{
- public:
- HF_CommentedLink_Table(
- Environment & io_rEnv,
- Xml::Element & o_rOut,
- const String & i_sTitle,
- const String & i_sLabel,
- bool i_bBorder = false );
- virtual ~HF_CommentedLink_Table();
-
- void Add_Line();
- Xml::Element & Cur_LinkColumn();
- Xml::Element & Cur_CommentColumn();
-
- private:
- // DATA
- Html::Table * pTable;
- Xml::Element * pCurLinkColumn;
- Xml::Element * pCurCommentColumn;
-};
-
-class HF_MemberTable : public HtmlFactory_Idl
-{
- public:
- HF_MemberTable(
- Environment & io_rEnv,
- Xml::Element & o_rOut,
- const String & i_sTitle,
- const String & i_sLabel,
- bool i_bInline = false );
- virtual ~HF_MemberTable();
-
- void Add_Line();
- Xml::Element & Cur_Declaration();
- Xml::Element & Cur_Description();
-
- private:
- // DATA
- Html::Table * pTable;
- Xml::Element * pCurDeclaration;
- Xml::Element * pCurDescription;
- bool bInline;
-};
-
-
-
-
-class HF_IdlLinkList : public HtmlFactory_Idl
-{
- public:
- typedef ary::StdConstIterator<ary::idl::CommentedRelation>
- comref_list;
-
- HF_IdlLinkList(
- Environment & io_rEnv,
- Xml::Element * o_pOut );
- virtual ~HF_IdlLinkList();
-
- void Produce_NamespaceMembers(
- const String & i_sTitle,
- const String & i_sLabel,
- const std::vector<ary::idl::Ce_id> &
- i_rList,
- bool i_bNestedNamespaces = false ) const;
- void Produce_GlobalLinks(
- const String & i_sTitle,
- const String & i_sLabel,
- ce_list & i_rList ) const;
- void Produce_GlobalCommentedLinks(
- const String & i_sTitle,
- const String & i_sLabel,
- comref_list & i_rList ) const;
- void Produce_MemberLinks(
- const String & i_sTitle,
- const String & i_sLabel,
- ce_list & i_rList ) const;
- private:
- void Get_EntryData_NamespaceMembers(
- String & o_sEntryName,
- String & o_sEntryLink,
- const ce_info * & o_pDocuText,
- ce_id i_nMemberId,
- bool i_bIsNestedNamespace ) const;
- const ce_info * Get_EntryDocu(
- ce_id i_nMemberId ) const;
-};
-
-
-
-
-
-
-
-
-// IMPLEMENTATION
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_method.cxx b/autodoc/source/display/idl/hfi_method.cxx
deleted file mode 100644
index 288f1dea..00000000
--- a/autodoc/source/display/idl/hfi_method.cxx
+++ /dev/null
@@ -1,238 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_method.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/i_param.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_funcdecl.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_globalindex.hxx"
-#include "hfi_typetext.hxx"
-
-
-
-
-
-HF_IdlMethod::HF_IdlMethod( Environment & io_rEnv,
- Xml::Element & o_cell)
- : HtmlFactory_Idl(io_rEnv,&o_cell)
-{
-}
-
-
-HF_IdlMethod::~HF_IdlMethod()
-{
-}
-
-
-void
-HF_IdlMethod::Produce_byData( const String & i_sName,
- type_id i_nReturnType,
- param_list & i_rParams,
- type_list & i_rExceptions,
- bool i_bOneway,
- bool i_bEllipse,
- const client & i_ce ) const
-{
- CurOut()
- >> *new Html::Label(i_sName)
- << new Html::ClassAttr(C_sMemberTitle)
- << i_sName;
- enter_ContentCell();
- write_Declaration( i_sName,
- i_nReturnType,
- i_rParams,
- i_rExceptions,
- i_bOneway,
- i_bEllipse );
- CurOut() << new Html::HorizontalLine;
- write_Docu(CurOut(), i_ce);
- leave_ContentCell();
-}
-
-void
-HF_IdlMethod::write_Declaration( const String & i_sName,
- type_id i_nReturnType,
- param_list & i_rParams,
- type_list & i_rExceptions,
- bool i_bOneway,
- bool i_bEllipse ) const
-{
- HF_FunctionDeclaration
- aDecl(CurOut(), "raises") ;
- Xml::Element &
- rReturnLine = aDecl.ReturnCell();
-
- // Return line:
- if (i_bOneway)
- rReturnLine << "[oneway] ";
- if (i_nReturnType.IsValid())
- { // Normal function, but not constructors:
- HF_IdlTypeText
- aReturn(Env(), rReturnLine, true);
- aReturn.Produce_byData(i_nReturnType);
- }
-
- // Main line:
- Xml::Element &
- rNameCell = aDecl.NameCell();
- rNameCell
- >> *new Html::Bold
- << i_sName;
-
- Xml::Element *
- pParamEnd = 0;
-
- bool bParams = i_rParams.operator bool();
- if (bParams)
- {
- rNameCell
- << "(";
-
- pParamEnd = write_Param( aDecl, *i_rParams );
- for (++i_rParams; i_rParams; ++i_rParams)
- {
- *pParamEnd << ",";
- pParamEnd = write_Param( aDecl, *i_rParams );
- } // end for
-
- if (i_bEllipse)
- {
- Xml::Element &
- rParamType = aDecl.NewParamTypeCell();
- rParamType
- << " ...";
- pParamEnd = &rParamType;
- }
- *pParamEnd
- << " )";
- }
- else
- {
- rNameCell
- << "()";
- }
-
- if ( i_rExceptions.operator bool() )
- {
- Xml::Element &
- rExcOut = aDecl.ExceptionCell();
- HF_IdlTypeText
- aExc(Env(), rExcOut, true);
- aExc.Produce_byData(*i_rExceptions);
-
- for (++i_rExceptions; i_rExceptions; ++i_rExceptions)
- {
- rExcOut
- << ","
- << new Html::LineBreak;
- aExc.Produce_byData(*i_rExceptions);
- } // end for
-
- rExcOut << " );";
- }
- else if (bParams)
- {
- *pParamEnd << ";";
- }
- else
- {
- rNameCell << ";";
- }
-}
-
-Xml::Element *
-HF_IdlMethod::write_Param( HF_FunctionDeclaration & o_decl,
- const ary::idl::Parameter & i_param ) const
-{
- Xml::Element &
- rTypeCell = o_decl.NewParamTypeCell();
- Xml::Element &
- rNameCell = o_decl.ParamNameCell();
-
- switch ( i_param.Direction() )
- {
- case ary::idl::param_in:
- rTypeCell << "[in] ";
- break;
- case ary::idl::param_out:
- rTypeCell << "[out] ";
- break;
- case ary::idl::param_inout:
- rTypeCell << "[inout] ";
- break;
- } // end switch
-
- HF_IdlTypeText
- aTypeWriter(Env(), rTypeCell, true);
- aTypeWriter.Produce_byData( i_param.Type() );
-
- rNameCell
- << i_param.Name();
- return &rNameCell;
-}
-
-const String sContentBorder("0");
-const String sContentWidth("96%");
-const String sContentPadding("5");
-const String sContentSpacing("0");
-
-const String sBgWhite("#ffffff");
-const String sCenter("center");
-
-void
-HF_IdlMethod::enter_ContentCell() const
-{
-
- Xml::Element &
- rContentCell = CurOut()
- >> *new Html::Table( sContentBorder,
- sContentWidth,
- sContentPadding,
- sContentSpacing )
- << new Html::ClassAttr("table-in-method")
- << new Html::BgColorAttr(sBgWhite)
- << new Html::AlignAttr(sCenter)
- >> *new Html::TableRow
- >> *new Html::TableCell;
- Out().Enter(rContentCell);
-}
-
-
-void
-HF_IdlMethod::leave_ContentCell() const
-{
- Out().Leave();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_method.hxx b/autodoc/source/display/idl/hfi_method.hxx
deleted file mode 100644
index eea58978..00000000
--- a/autodoc/source/display/idl/hfi_method.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_METHOD_HXX
-#define ADC_DISPLAY_HFI_METHOD_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_param.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-typedef ary::doc::OldIdlDocu CodeInfo;
-#include "hfi_linklist.hxx"
-
-
-
-namespace csi
-{
- namespace idl
- {
- class Parameter;
- }
-}
-
-class HF_FunctionDeclaration;
-
-class HF_IdlMethod : public HtmlFactory_Idl
-{
- public:
- typedef ary::StdConstIterator<ary::idl::Parameter> param_list;
-
- HF_IdlMethod(
- Environment & io_rEnv,
- Xml::Element & o_cell );
- virtual ~HF_IdlMethod();
-
- void Produce_byData(
- const String & i_sName,
- type_id i_nReturnType,
- param_list & i_rParams,
- type_list & i_rExceptions,
- bool i_bOneway,
- bool i_bEllipse,
- const client & i_ce ) const;
- private:
- void write_Declaration(
- const String & i_sName,
- type_id i_nReturnType,
- param_list & i_rParams,
- type_list & i_rExceptions,
- bool i_bOneway,
- bool i_bEllipse ) const;
-// void write_Param(
-// HF_IdlTypeText & o_type,
-// Xml::Element & o_names,
-// const ary::idl::Parameter &
-// i_param ) const;
-
- Xml::Element * write_Param(
- HF_FunctionDeclaration &
- o_decl,
- const ary::idl::Parameter &
- i_param ) const;
- void enter_ContentCell() const;
- void leave_ContentCell() const;
-};
-
-
-
-// IMPLEMENTATION
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_module.cxx b/autodoc/source/display/idl/hfi_module.cxx
deleted file mode 100644
index e2923c91..00000000
--- a/autodoc/source/display/idl/hfi_module.cxx
+++ /dev/null
@@ -1,302 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_module.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ik_module.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <ary/getncast.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_navibar.hxx"
-#include "hfi_tag.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sCePrefix_Module("module");
-
-namespace
-{
-
-const String
- C_sList_NestedModules("Nested Modules");
-const String
- C_sList_NestedModules_Label("NestedModules");
-const String
- C_sList_Services("Services");
-const String
- C_sList_Singletons("Singletons");
-const String
- C_sList_Interfaces("Interfaces");
-const String
- C_sList_Structs("Structs");
-const String
- C_sList_Exceptions("Exceptions");
-const String
- C_sList_Enums("Enums");
-const String
- C_sList_Typedefs("Typedefs");
-const String
- C_sList_ConstGroups("Constant Groups");
-const String
- C_sList_ConstGroups_Label("ConstantGroups");
-
-
-enum E_SubListIndices
-{ // In case of changes, also adapt make_Navibar() !!
- sli_NestedModules = 0,
- sli_Services = 1,
- sli_Singletons = 2,
- sli_Interfaces = 3,
- sli_Structs = 4,
- sli_Exceptions = 5,
- sli_Enums = 6,
- sli_Typedefs = 7,
- sli_ConstGroups = 8
-};
-
-} //anonymous namespace
-
-
-HF_IdlModule::HF_IdlModule( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlModule::~HF_IdlModule()
-{
-}
-
-typedef ary::idl::ifc_module::attr ModuleAttr;
-
-
-void
-HF_IdlModule::Produce_byData( const client & i_ce ) const
-{
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- if ( Env().CurPosition().Depth() > 0 )
- {
- aNameChain.Produce_CompleteChain_forModule(Env().CurPosition(), nameChainLinker);
-
- StreamLock
- sl(200);
- aTitle.Produce_Title( sl()
- << C_sCePrefix_Module
- << " "
- << i_ce.LocalName()
- << c_str );
- }
- else
- {
- aTitle.Produce_Title( "Global Module" );
- }
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
-
- // Write children lists:
- ce_ptr_list aNestedModules;
- ce_ptr_list aServices;
- ce_ptr_list aInterfaces;
- ce_ptr_list aStructs;
- ce_ptr_list aExceptions;
- ce_ptr_list aEnums;
- ce_ptr_list aTypedefs;
- ce_ptr_list aConstantGroups;
- ce_ptr_list aSingletons;
-
- ModuleAttr::Get_AllChildrenSeparated(
- aNestedModules,
- aServices,
- aInterfaces,
- aStructs,
- aExceptions,
- aEnums,
- aTypedefs,
- aConstantGroups,
- aSingletons,
- Env().Data().Ces(),
- i_ce );
-
- // Has this to be in the order of enum E_SubListIndices ???
- if (produce_ChildList(C_sList_NestedModules, C_sList_NestedModules_Label, aNestedModules ))
- pNaviSubRow->SwitchOn(sli_NestedModules);
- if (produce_ChildList(C_sList_Services, C_sList_Services, aServices))
- pNaviSubRow->SwitchOn(sli_Services);
- if (produce_ChildList(C_sList_Singletons, C_sList_Singletons, aSingletons))
- pNaviSubRow->SwitchOn(sli_Singletons);
- if (produce_ChildList(C_sList_Interfaces, C_sList_Interfaces, aInterfaces))
- pNaviSubRow->SwitchOn(sli_Interfaces);
- if (produce_ChildList(C_sList_Structs, C_sList_Structs, aStructs))
- pNaviSubRow->SwitchOn(sli_Structs);
- if (produce_ChildList(C_sList_Exceptions, C_sList_Exceptions, aExceptions))
- pNaviSubRow->SwitchOn(sli_Exceptions);
- if (produce_ChildList(C_sList_Enums, C_sList_Enums, aEnums))
- pNaviSubRow->SwitchOn(sli_Enums);
- if (produce_ChildList(C_sList_Typedefs, C_sList_Typedefs, aTypedefs))
- pNaviSubRow->SwitchOn(sli_Typedefs);
- if (produce_ChildList(C_sList_ConstGroups, C_sList_ConstGroups_Label, aConstantGroups))
- pNaviSubRow->SwitchOn(sli_ConstGroups);
- pNaviSubRow->Produce_Row();
-}
-
-DYN HF_NaviSubRow &
-HF_IdlModule::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_ModuleMainRow(i_ce);
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
-
- // Has to be in the order of E_SubListIndices:
- ret.AddItem(C_sList_NestedModules, C_sList_NestedModules_Label, false);
- ret.AddItem(C_sList_Services, C_sList_Services, false);
- ret.AddItem(C_sList_Singletons, C_sList_Singletons, false);
- ret.AddItem(C_sList_Interfaces, C_sList_Interfaces, false);
- ret.AddItem(C_sList_Structs, C_sList_Structs, false);
- ret.AddItem(C_sList_Exceptions, C_sList_Exceptions, false);
- ret.AddItem(C_sList_Enums, C_sList_Enums, false);
- ret.AddItem(C_sList_Typedefs, C_sList_Typedefs, false);
- ret.AddItem(C_sList_ConstGroups, C_sList_ConstGroups_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-bool
-HF_IdlModule::produce_ChildList( const String & i_sName,
- const String & i_sLabel,
- const ce_ptr_list & i_list ) const
-{
- if ( i_list.size() == 0 )
- return false;
-
- HF_SubTitleTable
- aTable( CurOut(),
- i_sLabel,
- i_sName,
- 2 );
-
- ce_ptr_list::const_iterator
- itEnd = i_list.end();
- for ( ce_ptr_list::const_iterator it = i_list.begin();
- it != itEnd;
- ++it )
- {
- Xml::Element &
- rRow = aTable.Add_Row();
- produce_Link(rRow, *it);
- produce_LinkDoc(rRow, *it);
- } // end for
-
- return true;
-}
-
-void
-HF_IdlModule::produce_Link( Xml::Element & o_row,
- const client * i_ce ) const
-{
- csv_assert(i_ce != 0);
- Xml::Element &
- rCell = o_row
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_SummaryLeft);
-
- if ( NOT ary::is_type<ary::idl::Module>(*i_ce) )
- {
- HF_IdlTypeText
- aText(Env(), rCell, true);
- aText.Produce_byData(i_ce->CeId());
- }
- else
- {
- StreamLock slBuf(100);
- rCell
- >> *new Html::Link( slBuf() << i_ce->LocalName()
- << "/module-ix.html"
- << c_str )
- << i_ce->LocalName();
- }
-}
-
-void
-HF_IdlModule::produce_LinkDoc( Xml::Element & o_row,
- const client * i_ce ) const
-{
- csv_assert(i_ce != 0);
-
- // We need the cell in any case, because, the rendering may be hurt else.
- Xml::Element &
- rCell = o_row
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_SummaryRight);
-
- const client &
- rCe = *i_ce;
- const ce_info *
- pShort = Get_IdlDocu(rCe.Docu());
- if ( pShort == 0 )
- return;
-
-
- if (pShort->IsDeprecated())
- {
- rCell << "[ DEPRECATED ]" << new Html::LineBreak;
- }
- if (pShort->IsOptional())
- {
- rCell << "[ OPTIONAL ]" << new Html::LineBreak;
- }
-
- HF_IdlDocuTextDisplay
- aShortDisplay(Env(), &rCell, *i_ce);
- pShort->Short().DisplayAt(aShortDisplay);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_module.hxx b/autodoc/source/display/idl/hfi_module.hxx
deleted file mode 100644
index 4af2f334..00000000
--- a/autodoc/source/display/idl/hfi_module.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_MODULE_HXX
-#define ADC_DISPLAY_HFI_MODULE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_NaviSubRow;
-
-class HF_IdlModule : public HtmlFactory_Idl
-{
- public:
- HF_IdlModule(
- Environment & io_rEnv, // The CurDirectory() is the one of the here displayed Module.
- Xml::Element & o_rOut );
- virtual ~HF_IdlModule();
-
- void Produce_byData(
- const client & i_ce ) const;
- private:
- typedef std::vector< const ary::idl::CodeEntity* > ce_ptr_list;
-
- DYN HF_NaviSubRow & make_Navibar(
- const client & i_ce ) const;
- bool produce_ChildList(
- const String & i_sName,
- const String & i_sLabel,
- const ce_ptr_list & i_list ) const;
- void produce_Link(
- Xml::Element & o_row,
- const client * i_ce ) const;
- void produce_LinkDoc(
- Xml::Element & o_row,
- const client * i_ce ) const;
-};
-
-
-
-// IMPLEMENTATION
-
-
-extern const String
- C_sCePrefix_Module;
-
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_navibar.cxx b/autodoc/source/display/idl/hfi_navibar.cxx
deleted file mode 100644
index 098361fe..00000000
--- a/autodoc/source/display/idl/hfi_navibar.cxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_navibar.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <toolkit/hf_navi_main.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include "hfi_interface.hxx"
-#include "hfi_module.hxx"
-#include "hfi_service.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sLocalManualLinks("#devmanual");
-
-
-const String C_sTop = "Overview";
-const String C_sModule = "Module";
-const String C_sUse = "Use";
-const String C_sManual = "Devguide";
-const String C_sIndex = "Index";
-
-
-
-
-HF_IdlNavigationBar::HF_IdlNavigationBar( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlNavigationBar::~HF_IdlNavigationBar()
-{
-}
-
-void
-HF_IdlNavigationBar::Produce_CeMainRow( const client & i_ce,
- bool i_bNoUsePage )
-{
- HF_NaviMainRow
- aNaviMain( CurOut() );
-
- StreamLock aLink(500);
- StreamStr & rLink = aLink();
-
- Env().Get_LinkTo( rLink.reset(),
- Env().OutputTree().Overview() );
- aNaviMain.Add_StdItem( C_sTop, rLink.c_str() );
-
- Env().Get_LinkTo( rLink.reset(),
- Env().Linker().PositionOf_CurModule() );
- aNaviMain.Add_StdItem( C_sModule, rLink.c_str() );
-
- if (i_bNoUsePage)
- {
- aNaviMain.Add_NoneItem( C_sUse );
- }
- else
- {
- Env().Get_LinkTo( rLink.reset(),
- Env().Linker().PositionOf_CurXRefs(i_ce.LocalName()) );
- aNaviMain.Add_StdItem( C_sUse, rLink.c_str() );
- }
-
- const StringVector &
- rManualDescrs = i_ce.Secondaries().Links2DescriptionInManual();
- if (rManualDescrs.size() == 2)
- {
- aNaviMain.Add_StdItem(C_sManual, Env().Link2Manual( rManualDescrs.front() ));
- }
- else if (rManualDescrs.size() > 2)
- {
- aNaviMain.Add_StdItem(C_sManual, C_sLocalManualLinks);
- }
- else
- {
- aNaviMain.Add_NoneItem( C_sManual );
- }
-
- Env().Get_LinkTo( rLink.reset(),
- Env().Linker().PositionOf_Index() );
- aNaviMain.Add_StdItem( C_sIndex, rLink.c_str() );
-
- aNaviMain.Produce_Row();
-}
-
-void
-HF_IdlNavigationBar::Produce_CeXrefsMainRow( const client & i_ce )
-{
- HF_NaviMainRow
- aNaviMain( CurOut() );
-
- StreamLock aLink(500);
- StreamStr & rLink = aLink();
-
- Env().Get_LinkTo( rLink.reset(),
- Env().OutputTree().Overview() );
- aNaviMain.Add_StdItem( C_sTop, rLink.c_str() );
-
- Env().Get_LinkTo( rLink.reset(),
- Env().Linker().PositionOf_CurModule() );
- aNaviMain.Add_StdItem( C_sModule, rLink.c_str() );
-
- aNaviMain.Add_SelfItem( C_sUse );
-
- const StringVector &
- rManualDescrs = i_ce.Secondaries().Links2DescriptionInManual();
- if (rManualDescrs.size() == 2)
- {
- aNaviMain.Add_StdItem(C_sManual, Env().Link2Manual( rManualDescrs.front() ));
- }
- else if (rManualDescrs.size() > 2)
- {
- aNaviMain.Add_StdItem(C_sManual, C_sLocalManualLinks);
- }
- else
- {
- aNaviMain.Add_NoneItem( C_sManual );
- }
-
- Env().Get_LinkTo( rLink.reset(),
- Env().Linker().PositionOf_Index() );
- aNaviMain.Add_StdItem( C_sIndex, rLink.c_str() );
-
- aNaviMain.Produce_Row();
-}
-
-void
-HF_IdlNavigationBar::Produce_ModuleMainRow( const client & i_ce )
-{
- HF_NaviMainRow
- aNaviMain( CurOut() );
-
- StreamLock aLink(500);
- StreamStr & rLink = aLink();
-
- Env().Get_LinkTo( rLink.reset(),
- Env().OutputTree().Overview() );
- aNaviMain.Add_StdItem( C_sTop, rLink.c_str() );
-
- aNaviMain.Add_SelfItem( C_sModule );
-
- aNaviMain.Add_NoneItem( C_sUse );
-
- const StringVector &
- rManualDescrs = i_ce.Secondaries().Links2DescriptionInManual();
- if (rManualDescrs.size() == 1)
- {
- aNaviMain.Add_StdItem(C_sManual, Env().Link2Manual( rManualDescrs.front() ));
- }
- else if (rManualDescrs.size() > 1)
- {
- aNaviMain.Add_StdItem(C_sManual, C_sLocalManualLinks);
- }
- else
- {
- aNaviMain.Add_NoneItem( C_sManual );
- }
-
- Env().Get_LinkTo( rLink.reset(),
- Env().Linker().PositionOf_Index() );
- aNaviMain.Add_StdItem( C_sIndex, rLink.c_str() );
-
- aNaviMain.Produce_Row();
-}
-
-void
-HF_IdlNavigationBar::Produce_IndexMainRow()
-{
- HF_NaviMainRow
- aNaviMain( CurOut() );
-
- StreamLock aLink(500);
- StreamStr & rLink = aLink();
-
- Env().Get_LinkTo( rLink.reset(),
- Env().OutputTree().Overview() );
- aNaviMain.Add_StdItem( C_sTop, rLink.c_str() );
-
- aNaviMain.Add_NoneItem( C_sModule );
- aNaviMain.Add_NoneItem( C_sUse );
- aNaviMain.Add_NoneItem( C_sManual );
-
- aNaviMain.Add_SelfItem( C_sIndex );
-
- aNaviMain.Produce_Row();
-
- CurOut() << new Html::HorizontalLine();
-}
-
-DYN HF_NaviSubRow &
-HF_IdlNavigationBar::Add_SubRow()
-{
- return *new HF_NaviSubRow( CurOut() );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_navibar.hxx b/autodoc/source/display/idl/hfi_navibar.hxx
deleted file mode 100644
index 70edf205..00000000
--- a/autodoc/source/display/idl/hfi_navibar.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_NAVIBAR_HXX
-#define ADC_DISPLAY_HFI_NAVIBAR_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include "hi_factory.hxx"
- // PARAMETERS
-
-namespace ary
-{
-namespace idl
-{
-class CodeEntity;
-}
-}
-
-
-class HF_NaviSubRow;
-
-/** @resp
- Creates a navigation bar for an IDL HTML documentation page.
-*/
-class HF_IdlNavigationBar : public HtmlFactory_Idl
-{
- public:
- HF_IdlNavigationBar(
- HtmlEnvironment_Idl &
- io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlNavigationBar();
-
- void Produce_CeMainRow(
- const client & i_ce,
- bool i_bNoUsePage = false );
- void Produce_CeXrefsMainRow(
- const client & i_ce );
- void Produce_ModuleMainRow(
- const client & i_ce );
- void Produce_IndexMainRow();
-
- /** Adds the subrow to the o_rOut argument of the constructor.
- */
- DYN HF_NaviSubRow & Add_SubRow();
-
- private:
- const ary::idl::CodeEntity *
- pCe;
-};
-
-extern const String
- C_sLocalManualLinks;
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_property.cxx b/autodoc/source/display/idl/hfi_property.cxx
deleted file mode 100644
index 22c132e7..00000000
--- a/autodoc/source/display/idl/hfi_property.cxx
+++ /dev/null
@@ -1,453 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_property.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_attribute.hxx>
-#include <ary/idl/ik_constant.hxx>
-#include <ary/idl/ik_enumvalue.hxx>
-#include <ary/idl/ik_property.hxx>
-#include <ary/idl/ik_structelem.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_typetext.hxx"
-#include "hfi_doc.hxx"
-#include "hfi_tag.hxx"
-#include "hi_env.hxx"
-#include "hi_ary.hxx"
-#include "hi_linkhelper.hxx"
-
-void
-HF_IdlDataMember::Produce_byData( const client & ce ) const
-{
- write_Title(ce);
- enter_ContentCell();
- write_Declaration(ce);
- write_Description(ce);
- leave_ContentCell();
-}
-
-HF_IdlDataMember::HF_IdlDataMember( Environment & io_rEnv,
- HF_SubTitleTable & o_table )
- : HtmlFactory_Idl( io_rEnv,
- &(o_table.Add_Row()
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_MDetail))
- )
-{
-}
-
-const String sContentBorder("0");
-const String sContentWidth("96%");
-const String sContentPadding("5");
-const String sContentSpacing("0");
-
-const String sBgWhite("#ffffff");
-const String sCenter("center");
-
-void
-HF_IdlDataMember::write_Title( const client & i_ce ) const
-{
- CurOut()
- >> *new Html::Label(i_ce.LocalName())
- << new Html::ClassAttr(C_sMemberTitle)
- << i_ce.LocalName();
-}
-
-void
-HF_IdlDataMember::write_Description( const client & i_ce ) const
-{
- CurOut() << new Html::HorizontalLine;
- write_Docu(CurOut(), i_ce);
-}
-
-void
-HF_IdlDataMember::enter_ContentCell() const
-{
-
- Xml::Element &
- rContentCell = CurOut()
- >> *new Html::Table( sContentBorder,
- sContentWidth,
- sContentPadding,
- sContentSpacing )
- << new Html::ClassAttr("table-in-data")
- << new Html::BgColorAttr(sBgWhite)
- << new Html::AlignAttr(sCenter)
- >> *new Html::TableRow
- >> *new Html::TableCell;
- Out().Enter(rContentCell);
-}
-
-
-void
-HF_IdlDataMember::leave_ContentCell() const
-{
- Out().Leave();
-}
-
-
-HF_IdlProperty::~HF_IdlProperty()
-{
-}
-
-typedef ary::idl::ifc_property::attr PropertyAttr;
-
-void
-HF_IdlProperty::write_Declaration( const client & i_ce ) const
-{
- if (PropertyAttr::HasAnyStereotype(i_ce))
- {
- CurOut() << "[ ";
- if (PropertyAttr::IsReadOnly(i_ce))
- CurOut() << "readonly ";
- if (PropertyAttr::IsBound(i_ce))
- CurOut() << "bound ";
- if (PropertyAttr::IsConstrained(i_ce))
- CurOut() << "constrained ";
- if (PropertyAttr::IsMayBeAmbiguous(i_ce))
- CurOut() << "maybeambiguous ";
- if (PropertyAttr::IsMayBeDefault(i_ce))
- CurOut() << "maybedefault ";
- if (PropertyAttr::IsMayBeVoid(i_ce))
- CurOut() << "maybevoid ";
- if (PropertyAttr::IsRemovable(i_ce))
- CurOut() << "removable ";
- if (PropertyAttr::IsTransient(i_ce))
- CurOut() << "transient ";
- CurOut() << "] ";
- } // end if
-
- HF_IdlTypeText
- aType( Env(), CurOut(), true );
- aType.Produce_byData( PropertyAttr::Type(i_ce) );
-
- CurOut() << " " >> *new Html::Bold << i_ce.LocalName();
- CurOut() << ";";
-}
-
-
-
-
-HF_IdlAttribute::~HF_IdlAttribute()
-{
-}
-
-typedef ary::idl::ifc_attribute::attr AttributeAttr;
-
-void
-HF_IdlAttribute::write_Declaration( const client & i_ce ) const
-{
- if (AttributeAttr::HasAnyStereotype(i_ce))
- {
- CurOut() << "[ ";
- if (AttributeAttr::IsReadOnly(i_ce))
- CurOut() << "readonly ";
- if (AttributeAttr::IsBound(i_ce))
- CurOut() << "bound ";
- CurOut() << "] ";
- }
-
- HF_IdlTypeText
- aType( Env(), CurOut(), true );
- aType.Produce_byData( AttributeAttr::Type(i_ce) );
-
- CurOut()
- << " "
- >> *new Html::Bold
- << i_ce.LocalName();
-
- dyn_type_list pGetExceptions;
- dyn_type_list pSetExceptions;
- AttributeAttr::Get_GetExceptions(pGetExceptions, i_ce);
- AttributeAttr::Get_SetExceptions(pSetExceptions, i_ce);
-
- bool bGetRaises = (*pGetExceptions).IsValid();
- bool bSetRaises = (*pSetExceptions).IsValid();
- bool bRaises = bGetRaises OR bSetRaises;
- if (bRaises)
- {
- HF_DocEntryList aSub(CurOut());
-
- if (bGetRaises)
- {
- Xml::Element &
- rGet = aSub.Produce_Definition();
- HF_IdlTypeText
- aExc(Env(), rGet, true);
- type_list & itExc = *pGetExceptions;
-
- rGet << "get raises (";
- aExc.Produce_byData(*itExc);
- for (++itExc; itExc.operator bool(); ++itExc)
- {
- rGet
- << ",";
- aExc.Produce_byData(*itExc);
- } // end for
- rGet << ")";
- if (NOT bSetRaises)
- rGet << ";";
- } // end if (bGetRaises)
-
- if (bSetRaises)
- {
- Xml::Element &
- rSet = aSub.Produce_Definition();
- HF_IdlTypeText
- aExc(Env(), rSet, true);
- type_list & itExc = *pSetExceptions;
-
- rSet << "set raises (";
- aExc.Produce_byData(*itExc);
- for (++itExc; itExc.operator bool(); ++itExc)
- {
- rSet
- << ",";
- aExc.Produce_byData(*itExc);
- } // end for
- rSet << ");";
- } // end if (bSetRaises)
- }
- else
- {
- CurOut() << ";";
- }
-}
-
-
-
-
-HF_IdlEnumValue::~HF_IdlEnumValue()
-{
-}
-
-typedef ary::idl::ifc_enumvalue::attr EnumValueAttr;
-
-void
-HF_IdlEnumValue::write_Declaration( const client & i_ce ) const
-{
- CurOut()
- >> *new Html::Bold
- << i_ce.LocalName();
-
- const String &
- rValue = EnumValueAttr::Value(i_ce);
- if ( NOT rValue.empty() )
- { CurOut() << " " // << " = " // In the moment this is somehow in the value
- << rValue;
- // CurOut() << ","; // In the moment this is somehow in the value
- }
- else
- CurOut() << ",";
-}
-
-
-HF_IdlConstant::~HF_IdlConstant()
-{
-}
-
-typedef ary::idl::ifc_constant::attr ConstantAttr;
-
-void
-HF_IdlConstant::write_Declaration( const client & i_ce ) const
-{
- CurOut() << "const ";
- HF_IdlTypeText
- aType( Env(), CurOut(), true );
- aType.Produce_byData(ConstantAttr::Type(i_ce));
- CurOut()
- << " "
- >> *new Html::Bold
- << i_ce.LocalName();
- const String &
- rValue = ConstantAttr::Value(i_ce);
- CurOut() << " " // << " = " // In the moment this is somehow in the value
- << rValue;
- // << ";"; // In the moment this is somehow in the value
-}
-
-
-HF_IdlStructElement::~HF_IdlStructElement()
-{
-}
-
-typedef ary::idl::ifc_structelement::attr StructElementAttr;
-
-void
-HF_IdlStructElement::write_Declaration( const client & i_ce ) const
-{
- HF_IdlTypeText
- aType( Env(), CurOut(), true );
- aType.Produce_byData(StructElementAttr::Type(i_ce));
- CurOut()
- << " "
- >> *new Html::Bold
- << i_ce.LocalName();
- CurOut()
- << ";";
-}
-
-HF_IdlCommentedRelationElement::~HF_IdlCommentedRelationElement()
-{
-}
-
-void
-HF_IdlCommentedRelationElement::produce_Summary( Environment & io_env,
- Xml::Element & io_context,
- const comref & i_commentedRef,
- const client & i_rScopeGivingCe )
-{
- csv_assert( i_commentedRef.Info() );
-
- const ce_info & rDocu = *i_commentedRef.Info();
-
- bool bShort = NOT rDocu.Short().IsEmpty();
- bool bDescr = NOT rDocu.Description().IsEmpty();
-
- if ( bShort )
- {
- HF_IdlDocuTextDisplay
- aDescription(io_env, 0, i_rScopeGivingCe);
-
- Xml::Element& rPara = io_context >> *new Html::Paragraph;
- aDescription.Out().Enter( rPara );
- rDocu.Short().DisplayAt( aDescription );
-
- // if there's more than just the summary - i.e. a description, or usage restrictions, or tags -,
- // then add a link to the details section
- if ( bDescr OR rDocu.IsDeprecated() OR rDocu.IsOptional() OR NOT rDocu.Tags().empty() )
- {
- StreamLock aLocalLink(100);
- aLocalLink() << "#" << get_LocalLinkName(io_env, i_commentedRef);
-
- aDescription.Out().Out() << "(";
- aDescription.Out().Out()
- >> *new Html::Link( aLocalLink().c_str() )
- << "details";
- aDescription.Out().Out() << ")";
- }
-
- aDescription.Out().Leave();
- }
-}
-
-void
-HF_IdlCommentedRelationElement::produce_LinkDoc( Environment & io_env,
- const client & i_ce,
- Xml::Element & io_context,
- const comref & i_commentedRef,
- const E_DocType i_docType )
-{
- if ( i_commentedRef.Info() != 0 )
- {
- if ( i_docType == doctype_complete )
- {
- HF_DocEntryList aDocList(io_context);
- HF_IdlDocu aDocuDisplay(io_env, aDocList);
-
- aDocuDisplay.Produce_fromReference(*i_commentedRef.Info(), i_ce);
- }
- else
- {
- produce_Summary(io_env, io_context, i_commentedRef, i_ce);
- }
- }
- else
- {
- HF_DocEntryList aDocList(io_context);
-
- const client *
- pCe = io_env.Linker().Search_CeFromType(i_commentedRef.Type());
- const ce_info *
- pShort = pCe != 0
- ? Get_IdlDocu(pCe->Docu())
- : (const ce_info *)(0);
- if ( pShort != 0 )
- {
- aDocList.Produce_NormalTerm("(referenced entity's summary:)");
- Xml::Element &
- rDef = aDocList.Produce_Definition();
- HF_IdlDocuTextDisplay
- aShortDisplay( io_env, &rDef, *pCe);
- pShort->Short().DisplayAt(aShortDisplay);
- } // end if (pShort != 0)
- } // endif ( (*i_commentedRef).Info() != 0 ) else
-}
-
-
-String
-HF_IdlCommentedRelationElement::get_LocalLinkName( Environment & io_env,
- const comref & i_commentedRef )
-{
- StringVector aModules;
- String sLocalName;
- ce_id nCe;
- int nSequenceCount = 0;
-
- const ary::idl::Type &
- rType = io_env.Data().Find_Type(i_commentedRef.Type());
- io_env.Data().Get_TypeText(aModules, sLocalName, nCe, nSequenceCount, rType);
-
- // speaking strictly, this is not correct: If we have two interfaces with the same local
- // name, but in different modules, then the link name will be ambiguous. However, this should
- // be too seldom a case to really make the link names that ugly by adding the module information.
- return sLocalName;
-}
-
-void
-HF_IdlCommentedRelationElement::write_Title( const client & /*i_ce*/ ) const
-{
-
- Xml::Element &
- rAnchor = CurOut()
- >> *new Html::Label(get_LocalLinkName(Env(), m_relation))
- << new Html::ClassAttr(C_sMemberTitle);
-
- HF_IdlTypeText
- aText(Env(), rAnchor, true);
- aText.Produce_byData(m_relation.Type());
-}
-
-void
-HF_IdlCommentedRelationElement::write_Declaration( const client & /*i_ce*/ ) const
-{
- // nothing to do here - an entity which is a commented relation does not have a declaration
-}
-
-void
-HF_IdlCommentedRelationElement::write_Description( const client & i_ce ) const
-{
- produce_LinkDoc( Env(), i_ce, CurOut(), m_relation, doctype_complete );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_property.hxx b/autodoc/source/display/idl/hfi_property.hxx
deleted file mode 100644
index 7c6a2400..00000000
--- a/autodoc/source/display/idl/hfi_property.hxx
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_PROPERTY_HXX
-#define ADC_DISPLAY_HFI_PROPERTY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_comrela.hxx>
-
-class HF_SubTitleTable;
-
-class HF_IdlDataMember : public HtmlFactory_Idl
-{
- public:
- void Produce_byData(
- const client & ce ) const;
- protected:
- HF_IdlDataMember(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table );
- virtual ~HF_IdlDataMember() {}
-
- private:
- virtual void write_Title(
- const client & i_ce ) const;
-
- virtual void write_Declaration(
- const client & i_ce ) const = 0;
-
- virtual void write_Description(
- const client & i_ce ) const;
-
- void enter_ContentCell() const;
- void leave_ContentCell() const;
-};
-
-
-
-class HF_IdlProperty : public HF_IdlDataMember
-{
- public:
- HF_IdlProperty(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table )
- : HF_IdlDataMember(io_rEnv, o_table) {}
- virtual ~HF_IdlProperty();
- private:
- virtual void write_Declaration(
- const client & i_ce ) const;
-};
-
-class HF_IdlAttribute : public HF_IdlDataMember
-{
- public:
- HF_IdlAttribute(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table )
- : HF_IdlDataMember(io_rEnv, o_table) {}
- virtual ~HF_IdlAttribute();
-
- private:
- virtual void write_Declaration(
- const client & i_ce ) const;
-};
-
-
-class HF_IdlEnumValue : public HF_IdlDataMember
-{
- public:
- HF_IdlEnumValue(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table )
- : HF_IdlDataMember(io_rEnv, o_table) {}
- virtual ~HF_IdlEnumValue();
-
- private:
- virtual void write_Declaration(
- const client & i_ce ) const;
-};
-
-class HF_IdlConstant : public HF_IdlDataMember
-{
- public:
- HF_IdlConstant(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table )
- : HF_IdlDataMember(io_rEnv, o_table) {}
- virtual ~HF_IdlConstant();
-
- private:
- virtual void write_Declaration(
- const client & i_ce ) const;
-};
-
-
-class HF_IdlStructElement : public HF_IdlDataMember
-{
- public:
- HF_IdlStructElement(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table )
- : HF_IdlDataMember(io_rEnv, o_table) {}
- virtual ~HF_IdlStructElement();
-
- private:
- virtual void write_Declaration(
- const client & i_ce ) const;
-};
-
-class HF_IdlCommentedRelationElement : public HF_IdlDataMember
-{
- public:
- HF_IdlCommentedRelationElement(
- Environment & io_rEnv,
- HF_SubTitleTable & o_table,
- const ary::idl::CommentedRelation& i_relation )
- : HF_IdlDataMember(io_rEnv, o_table)
- , m_relation( i_relation )
- {
- }
- virtual ~HF_IdlCommentedRelationElement();
-
- typedef ::ary::idl::CommentedRelation comref;
-
- static void produce_LinkDoc(
- Environment & io_env,
- const client & i_ce,
- Xml::Element & io_context,
- const comref & i_commentedRef,
- const E_DocType i_docType );
-
- private:
- virtual void write_Title(
- const client & i_ce ) const;
- virtual void write_Declaration(
- const client & i_ce ) const;
- virtual void write_Description(
- const client & i_ce ) const;
- private:
- static void produce_Summary( Environment & io_env,
- Xml::Element & io_context,
- const comref & i_commentedRef,
- const client & i_rScopeGivingCe );
-
- static String get_LocalLinkName( Environment & io_env,
- const comref & i_commentedRef );
-
- private:
- const ary::idl::CommentedRelation& m_relation;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_service.cxx b/autodoc/source/display/idl/hfi_service.cxx
deleted file mode 100644
index f7887402..00000000
--- a/autodoc/source/display/idl/hfi_service.cxx
+++ /dev/null
@@ -1,365 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_service.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_property.hxx>
-#include <ary/idl/ik_service.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_navibar.hxx"
-#include "hfi_property.hxx"
-#include "hfi_tag.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-
-
-extern const String
- C_sCePrefix_Service("service");
-
-namespace
-{
-
-const String
- C_sList_IncludedServices("Services' Summary");
-const String
- C_sList_IncludedServices_Heading("Included Services - Summary");
-const String
- C_sList_IncludedServices_Label("ServicesSummary");
-const String
- C_sList_IncludedServicesDetails("Services' Details");
-const String
- C_sList_IncludedServicesDetails_Heading("Included Services - Details");
-const String
- C_sList_IncludedServicesDetails_Label("ServicesDetails");
-const String
- C_sList_ExportedInterfaces("Interfaces' Summary");
-const String
- C_sList_ExportedInterfaces_Heading("Exported Interfaces - Summary");
-const String
- C_sList_ExportedInterfaces_Label("InterfacesSummary");
-const String
- C_sList_ExportedInterfacesDetails("Interfaces' Details");
-const String
- C_sList_ExportedInterfacesDetails_Heading("Exported Interfaces - Details");
-const String
- C_sList_ExportedInterfacesDetails_Label("InterfacesDetails");
-const String
- C_sList_Properties("Properties' Summary");
-const String
- C_sList_Properties_Label("PropertiesSummary");
-const String
- C_sList_PropertiesDetails("Properties' Details");
-const String
- C_sList_PropertiesDetails_Label("PropertiesDetails");
-
-
-enum E_SubListIndices
-{
- sli_IncludedServicesSummary = 0,
- sli_InterfacesSummary = 1,
- sli_PropertiesSummary = 2,
- sli_IncludedServicesDetails = 3,
- sli_InterfacesDetails = 4,
- sli_PropertiesDetails = 5
-};
-
-} //anonymous namespace
-
-
-HF_IdlService::HF_IdlService( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlService::~HF_IdlService()
-{
-
-}
-
-typedef ::ary::idl::ifc_service::attr
- ServiceAttr;
-typedef ::ary::Dyn_StdConstIterator< ::ary::idl::CommentedRelation >
- dyn_comref_list;
-
-void
-HF_IdlService::produce_CommentedRelations( const client & i_ce,
- comref_list & it_list,
- const String & i_summaryTitle,
- const String & i_summaryLabel,
- const String & i_detailsTitle,
- const String & i_detailsLabel,
- const E_DocType i_docType ) const
-{
- csv_assert( it_list );
-
- bool bSummaryOnly = ( i_docType == doctype_summaryOnly );
- HF_SubTitleTable aTable(
- CurOut(),
- bSummaryOnly ? i_summaryLabel : i_detailsLabel,
- bSummaryOnly ? i_summaryTitle : i_detailsTitle,
- 2 );
-
- for ( ; it_list; ++it_list )
- {
- Xml::Element &
- rRow = aTable.Add_Row();
-
- if ( bSummaryOnly )
- {
- produce_Link(rRow, (*it_list).Type());
- produce_LinkSummary(i_ce, rRow, *it_list);
- }
- else
- {
- HF_IdlCommentedRelationElement
- aRelation( Env(), aTable, *it_list );
- aRelation.Produce_byData( i_ce );
- }
- } // end for
-}
-
-void
-HF_IdlService::Produce_byData( const client & i_ce ) const
-{
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Service, i_ce);
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
- // produce ...
- // - included services: summary
- dyn_comref_list dpIncludedServices;
- ServiceAttr::Get_IncludedServices(dpIncludedServices, i_ce);
- if ( (*dpIncludedServices).operator bool() )
- {
- produce_CommentedRelations( i_ce, *dpIncludedServices,
- C_sList_IncludedServices_Heading,
- C_sList_IncludedServices_Label,
- C_sList_IncludedServicesDetails_Heading,
- C_sList_IncludedServicesDetails_Label,
- doctype_summaryOnly );
- pNaviSubRow->SwitchOn(sli_IncludedServicesSummary);
- }
-
- // - exported interfaces: summary
- dyn_comref_list dpExportedInterfaces;
- ServiceAttr::Get_ExportedInterfaces(dpExportedInterfaces, i_ce);
- if ( (*dpExportedInterfaces).operator bool() )
- {
- produce_CommentedRelations( i_ce, *dpExportedInterfaces,
- C_sList_ExportedInterfaces_Heading,
- C_sList_ExportedInterfaces_Label,
- C_sList_ExportedInterfacesDetails_Heading,
- C_sList_ExportedInterfacesDetails_Label,
- doctype_summaryOnly );
- pNaviSubRow->SwitchOn(sli_InterfacesSummary);
- }
-
- // - supported properties: summary
- dyn_ce_list dpProperties;
- ServiceAttr::Get_Properties(dpProperties, i_ce);
- if ( (*dpProperties).operator bool() )
- {
- produce_Members( *dpProperties,
- C_sList_Properties,
- C_sList_Properties_Label,
- C_sList_PropertiesDetails,
- C_sList_PropertiesDetails_Label,
- viewtype_summary );
- pNaviSubRow->SwitchOn(sli_PropertiesSummary);
- }
-
- // - included services: details
- ServiceAttr::Get_IncludedServices(dpIncludedServices, i_ce);
- if ( (*dpIncludedServices).operator bool() )
- {
- produce_CommentedRelations( i_ce, *dpIncludedServices,
- C_sList_IncludedServices_Heading,
- C_sList_IncludedServices_Label,
- C_sList_IncludedServicesDetails_Heading,
- C_sList_IncludedServicesDetails_Label,
- doctype_complete );
- pNaviSubRow->SwitchOn(sli_IncludedServicesDetails);
- }
-
- // - exported interfaces: details
- ServiceAttr::Get_ExportedInterfaces(dpExportedInterfaces, i_ce);
- if ( (*dpExportedInterfaces).operator bool() )
- {
- produce_CommentedRelations( i_ce, *dpExportedInterfaces,
- C_sList_ExportedInterfaces_Heading,
- C_sList_ExportedInterfaces_Label,
- C_sList_ExportedInterfacesDetails_Heading,
- C_sList_ExportedInterfacesDetails_Label,
- doctype_complete );
- pNaviSubRow->SwitchOn(sli_InterfacesDetails);
- }
-
- // supported properties: details
- ServiceAttr::Get_Properties(dpProperties, i_ce);
- if ( (*dpProperties).operator bool() )
- {
- produce_Members( *dpProperties,
- C_sList_Properties,
- C_sList_Properties_Label,
- C_sList_PropertiesDetails,
- C_sList_PropertiesDetails_Label,
- viewtype_details );
- pNaviSubRow->SwitchOn(sli_PropertiesDetails);
- }
-
- pNaviSubRow->Produce_Row();
- CurOut() << new Xml::XmlCode("<br>&nbsp;");
-}
-
-typedef ary::idl::ifc_property::attr PropertyAttr;
-
-void
-HF_IdlService::produce_SummaryDeclaration( Xml::Element & o_row,
- const client & i_property ) const
-{
- // KORR_FUTURE
- // Put this in to HF_IdlProperty!
-
- Xml::Element &
- rCell = o_row
- >> *new Html::TableCell
- << new Html::ClassAttr( C_sCellStyle_SummaryLeft );
-
- if (PropertyAttr::HasAnyStereotype(i_property))
- {
- rCell << "[ ";
- if (PropertyAttr::IsReadOnly(i_property))
- rCell << "readonly ";
- if (PropertyAttr::IsBound(i_property))
- rCell << "bound ";
- if (PropertyAttr::IsConstrained(i_property))
- rCell << "constrained ";
- if (PropertyAttr::IsMayBeAmbiguous(i_property))
- rCell << "maybeambiguous ";
- if (PropertyAttr::IsMayBeDefault(i_property))
- rCell << "maybedefault ";
- if (PropertyAttr::IsMayBeVoid(i_property))
- rCell << "maybevoid ";
- if (PropertyAttr::IsRemovable(i_property))
- rCell << "removable ";
- if (PropertyAttr::IsTransient(i_property))
- rCell << "transient ";
- rCell << "] ";
- } // end if
-
- HF_IdlTypeText
- aType( Env(), rCell, true );
- aType.Produce_byData( PropertyAttr::Type(i_property) );
-
- StreamLock aLocalLink(100);
- aLocalLink() << "#" << i_property.LocalName();
- rCell
- << new Html::LineBreak
- >> *new Html::Link( aLocalLink().c_str() )
- << i_property.LocalName();
-}
-
-DYN HF_NaviSubRow &
-HF_IdlService::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce);
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
- ret.AddItem(C_sList_IncludedServices, C_sList_IncludedServices_Label, false);
- ret.AddItem(C_sList_ExportedInterfaces, C_sList_ExportedInterfaces_Label, false);
- ret.AddItem(C_sList_Properties, C_sList_Properties_Label, false);
- ret.AddItem(C_sList_IncludedServicesDetails, C_sList_IncludedServicesDetails_Label, false);
- ret.AddItem(C_sList_ExportedInterfacesDetails, C_sList_ExportedInterfacesDetails_Label, false);
- ret.AddItem(C_sList_PropertiesDetails, C_sList_PropertiesDetails_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-void
-HF_IdlService::produce_Link( Xml::Element & o_row,
- type_id i_type ) const
-{
- Xml::Element &
- rCell = o_row
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_SummaryLeft);
- HF_IdlTypeText
- aText(Env(), rCell, true);
- aText.Produce_byData(i_type);
-}
-
-void
-HF_IdlService::produce_LinkSummary( const client & i_ce,
- Xml::Element & o_row,
- const comref & i_commentedRef ) const
-{
- Xml::Element &
- rCell = o_row
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_SummaryRight);
-
- HF_IdlCommentedRelationElement::produce_LinkDoc( Env(), i_ce, rCell, i_commentedRef, doctype_summaryOnly );
-}
-
-void
-HF_IdlService::produce_MemberDetails( HF_SubTitleTable & o_table,
- const client & i_ce ) const
-{
- HF_IdlProperty
- aProperty( Env(), o_table);
- aProperty.Produce_byData( i_ce );
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_service.hxx b/autodoc/source/display/idl/hfi_service.hxx
deleted file mode 100644
index 9ca4530e..00000000
--- a/autodoc/source/display/idl/hfi_service.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_SERVICE_HXX
-#define ADC_DISPLAY_HFI_SERVICE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_comrela.hxx>
-
-class HF_NaviSubRow;
-class HF_SubTitleTable;
-
-class HF_IdlService : public HtmlFactory_Idl
-{
- public:
- typedef ::ary::idl::CommentedRelation comref;
- typedef ::ary::StdConstIterator< comref > comref_list;
-
- HF_IdlService(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlService();
-
- void Produce_byData(
- const client & i_ce ) const;
- private:
- // Overwritten from HtmlFactory_Idl:
- virtual void produce_SummaryDeclaration(
- Xml::Element & o_row,
- const client & i_ce ) const;
-
- // Locals
- DYN HF_NaviSubRow & make_Navibar(
- const client & i_ce ) const;
-
- void produce_Link(
- Xml::Element & o_row,
- type_id i_type ) const;
- void produce_LinkSummary(
- const client & i_ce,
- Xml::Element & o_row,
- const comref & i_commentedRef ) const;
-
- void produce_MemberDetails( /// of property
- HF_SubTitleTable & o_table,
- const client & i_ce ) const;
-
- void produce_CommentedRelations(
- const client & i_ce,
- comref_list & it_list,
- const String & i_summaryTitle,
- const String & i_summaryLabel,
- const String & i_detailsTitle,
- const String & i_detailsLabel,
- const E_DocType i_docType ) const;
-
-};
-
-
-
-// IMPLEMENTATION
-
-extern const String
- C_sCePrefix_Service;
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_singleton.cxx b/autodoc/source/display/idl/hfi_singleton.cxx
deleted file mode 100644
index 04f87e78..00000000
--- a/autodoc/source/display/idl/hfi_singleton.cxx
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_singleton.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_singleton.hxx>
-#include <ary/idl/ik_sisingleton.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-
-extern const String
- C_sCePrefix_Singleton("singleton");
-
-const String
- C_sAssociatedService("Associated Service");
-const String
- C_sImplementedInterface("Supported Interface");
-
-
-
-HF_IdlSingleton::HF_IdlSingleton( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlSingleton::~HF_IdlSingleton()
-{
-
-}
-
-typedef ::ary::idl::ifc_singleton::attr SingletonAttr;
-typedef ::ary::idl::ifc_sglifcsingleton::attr SglIfcSingletonAttr;
-
-void
-HF_IdlSingleton::Produce_byData_ServiceBased( const client & i_ce ) const
-{
- make_Navibar(i_ce);
-
- HF_TitleTable
- aTitle(CurOut());
-
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Singleton, i_ce);
-
- HF_DocEntryList
- aTopList( aTitle.Add_Row() );
- aTopList.Produce_Term(C_sAssociatedService);
-
- HF_IdlTypeText
- aAssociatedService( Env(), aTopList.Produce_Definition(), true );
- aAssociatedService.Produce_byData( SingletonAttr::AssociatedService(i_ce) );
-
- CurOut() << new Html::HorizontalLine;
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-}
-
-void
-HF_IdlSingleton::Produce_byData_InterfaceBased( const client & i_ce ) const
-{
- make_Navibar(i_ce);
-
- HF_TitleTable
- aTitle(CurOut());
-
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Singleton, i_ce);
-
- HF_DocEntryList
- aTopList( aTitle.Add_Row() );
- aTopList.Produce_Term(C_sImplementedInterface);
-
- HF_IdlTypeText
- aImplementedInterface( Env(), aTopList.Produce_Definition(), true );
- aImplementedInterface.Produce_byData( SglIfcSingletonAttr::BaseInterface(i_ce) );
-
- CurOut() << new Html::HorizontalLine;
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-}
-
-void
-HF_IdlSingleton::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce,true); // true := avoid link to Use-page.
-
- CurOut() << new Html::HorizontalLine();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_singleton.hxx b/autodoc/source/display/idl/hfi_singleton.hxx
deleted file mode 100644
index 2b1c28e6..00000000
--- a/autodoc/source/display/idl/hfi_singleton.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_SINGLETON_HXX
-#define ADC_DISPLAY_HFI_SINGLETON_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-class HF_NaviSubRow;
-
-
-class HF_IdlSingleton : public HtmlFactory_Idl
-{
- public:
- HF_IdlSingleton(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlSingleton();
-
- void Produce_byData_ServiceBased(
- const client & i_ce ) const;
- void Produce_byData_InterfaceBased(
- const client & i_ce ) const;
- private:
- void make_Navibar(
- const client & i_ce ) const;
-};
-
-
-
-// IMPLEMENTATION
-
-extern const String
- C_sCePrefix_Singleton;
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_siservice.cxx b/autodoc/source/display/idl/hfi_siservice.cxx
deleted file mode 100644
index 1a2c9fa7..00000000
--- a/autodoc/source/display/idl/hfi_siservice.cxx
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_siservice.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_function.hxx>
-#include <ary/idl/ik_siservice.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_method.hxx"
-#include "hfi_navibar.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_env.hxx"
-#include "hi_linkhelper.hxx"
-
-
-
-namespace
-{
-
-const String
- C_sImplementedInterface("Supported Interface");
-
-const String
- C_sList_Constructors("Constructors' Summary");
-const String
- C_sList_Constructors_Label("ConstructorsSummary");
-const String
- C_sDetails_Constructors("Constructors' Details");
-const String
- C_sDetails_Constructors_Label("ConstructorsDetails");
-
-
-enum E_SubListIndices
-{
- sli_ConstructorsSummary = 0,
- sli_ConstructorsDetails = 1
-};
-
-} //anonymous namespace
-
-
-HF_IdlSglIfcService::HF_IdlSglIfcService( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlSglIfcService::~HF_IdlSglIfcService()
-{
-}
-
-typedef ::ary::idl::ifc_sglifcservice::attr SglIfcServiceAttr;
-
-void
-HF_IdlSglIfcService::Produce_byData( const client & i_ce ) const
-{
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Service, i_ce);
-
- HF_DocEntryList
- aTopList( aTitle.Add_Row() );
- aTopList.Produce_Term(C_sImplementedInterface);
-
- HF_IdlTypeText
- aImplementedInterface( Env(), aTopList.Produce_Definition(), true, &i_ce);
- aImplementedInterface.Produce_byData( SglIfcServiceAttr::BaseInterface(i_ce) );
-
- CurOut() << new Html::HorizontalLine;
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
- dyn_ce_list
- dpConstructors;
- SglIfcServiceAttr::Get_Constructors(dpConstructors, i_ce);
- if ( (*dpConstructors).operator bool() )
- {
- produce_Members( *dpConstructors,
- C_sList_Constructors,
- C_sList_Constructors_Label,
- C_sDetails_Constructors,
- C_sDetails_Constructors_Label );
- pNaviSubRow->SwitchOn(sli_ConstructorsSummary);
- pNaviSubRow->SwitchOn(sli_ConstructorsDetails);
- }
-
- pNaviSubRow->Produce_Row();
- CurOut() << new Xml::XmlCode("<br>&nbsp;");
-}
-
-DYN HF_NaviSubRow &
-HF_IdlSglIfcService::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce, true);
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
- ret.AddItem(C_sList_Constructors, C_sList_Constructors_Label, false);
- ret.AddItem(C_sDetails_Constructors, C_sDetails_Constructors_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-typedef ary::idl::ifc_function::attr funcAttr;
-
-void
-HF_IdlSglIfcService::produce_MemberDetails( HF_SubTitleTable & o_table,
- const client & i_ce ) const
-{
- HF_IdlMethod
- aConstructor( Env(),
- o_table.Add_Row()
- >> *new Html::TableCell
- << new Html::ClassAttr(C_sCellStyle_MDetail) );
-
- ary::Dyn_StdConstIterator<ary::idl::Parameter>
- pParameters;
- funcAttr::Get_Parameters(pParameters, i_ce);
-
- ary::Dyn_StdConstIterator<ary::idl::Type_id>
- pExceptions;
- funcAttr::Get_Exceptions(pExceptions, i_ce);
-
- aConstructor.Produce_byData( i_ce.LocalName(),
- funcAttr::ReturnType(i_ce),
- *pParameters,
- *pExceptions,
- funcAttr::IsOneway(i_ce),
- funcAttr::HasEllipse(i_ce),
- i_ce );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_siservice.hxx b/autodoc/source/display/idl/hfi_siservice.hxx
deleted file mode 100644
index 03fef81d..00000000
--- a/autodoc/source/display/idl/hfi_siservice.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_SISERVICE_HXX
-#define ADC_DISPLAY_HFI_SISERVICE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_comrela.hxx>
-
-class HF_NaviSubRow;
-class HF_SubTitleTable;
-
-class HF_IdlSglIfcService : public HtmlFactory_Idl
-{
- public:
- HF_IdlSglIfcService(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlSglIfcService();
-
- void Produce_byData(
- const client & i_ce ) const;
- private:
- DYN HF_NaviSubRow & make_Navibar(
- const client & i_ce ) const;
-
- void produce_MemberDetails(
- HF_SubTitleTable & o_table,
- const client & i_ce ) const;
-};
-
-
-
-// IMPLEMENTATION
-
-extern const String
- C_sCePrefix_Service;
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_struct.cxx b/autodoc/source/display/idl/hfi_struct.cxx
deleted file mode 100644
index 37fab0fa..00000000
--- a/autodoc/source/display/idl/hfi_struct.cxx
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_struct.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/ik_exception.hxx>
-#include <ary/idl/ik_struct.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_navi_sub.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_property.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sCePrefix_Struct("struct");
-extern const String
- C_sCePrefix_Exception("exception");
-
-
-namespace
-{
-
-const String
- C_sBaseStruct("Base Hierarchy");
-const String
- C_sBaseException("Base Hierarchy");
-
-const String
- C_sList_Elements("Elements' Summary");
-const String
- C_sList_Elements_Label("Elements");
-
-const String
- C_sList_ElementDetails("Elements' Details");
-const String
- C_sList_ElementDetails_Label("ElementDetails");
-
-enum E_SubListIndices
-{
- sli_ElementsSummary = 0,
- sli_ElementsDetails = 1
-};
-
-} // anonymous namespace
-
-
-
-HF_IdlStruct::HF_IdlStruct( Environment & io_rEnv,
- Xml::Element & o_rOut,
- bool i_bIsException )
- : HtmlFactory_Idl(io_rEnv, &o_rOut),
- bIsException(i_bIsException)
-{
-}
-
-HF_IdlStruct::~HF_IdlStruct()
-{
-}
-
-void
-HF_IdlStruct::Produce_byData( const client & i_ce ) const
-{
- const ary::idl::Struct *
- pStruct =
- bIsException
- ? 0
- : static_cast< const ary::idl::Struct* >(&i_ce);
- bool bIsTemplate =
- pStruct != 0
- ? pStruct->TemplateParameterType().IsValid()
- : false;
-
- Dyn<HF_NaviSubRow>
- pNaviSubRow( &make_Navibar(i_ce) );
-
- HF_TitleTable
- aTitle(CurOut());
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
-
- // Title:
- StreamLock
- slAnnotations(200);
- get_Annotations(slAnnotations(), i_ce);
-
- StreamLock rTitle(200);
- if (bIsTemplate)
- rTitle() << "template ";
- rTitle()
- << (bIsException
- ? C_sCePrefix_Exception
- : C_sCePrefix_Struct)
- << " "
- << i_ce.LocalName();
- if (bIsTemplate)
- {
- csv_assert(pStruct != 0);
- rTitle()
- << "<"
- << pStruct->TemplateParameter()
- << ">";
- }
- aTitle.Produce_Title(slAnnotations().c_str(), rTitle().c_str());
-
- // Bases:
- produce_Bases( aTitle.Add_Row(),
- i_ce,
- bIsException
- ? C_sBaseException
- : C_sBaseStruct );
-
- // Docu:
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-
- // Elements:
- dyn_ce_list
- dpElements;
- if (bIsException)
- ary::idl::ifc_exception::attr::Get_Elements(dpElements, i_ce);
- else
- ary::idl::ifc_struct::attr::Get_Elements(dpElements, i_ce);
-
- if ( (*dpElements).operator bool() )
- {
- produce_Members( *dpElements,
- C_sList_Elements,
- C_sList_Elements_Label,
- C_sList_ElementDetails,
- C_sList_ElementDetails_Label );
- pNaviSubRow->SwitchOn(sli_ElementsSummary);
- pNaviSubRow->SwitchOn(sli_ElementsDetails);
- }
- pNaviSubRow->Produce_Row();
-}
-
-HtmlFactory_Idl::type_id
-HF_IdlStruct::inq_BaseOf( const client & i_ce ) const
-{
- return bIsException
- ? ary::idl::ifc_exception::attr::Base(i_ce)
- : ary::idl::ifc_struct::attr::Base(i_ce);
-}
-
-HF_NaviSubRow &
-HF_IdlStruct::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce);
-
- DYN HF_NaviSubRow &
- ret = aNaviBar.Add_SubRow();
- ret.AddItem(C_sList_Elements, C_sList_Elements_Label, false);
- ret.AddItem(C_sList_ElementDetails, C_sList_ElementDetails_Label, false);
-
- CurOut() << new Html::HorizontalLine();
- return ret;
-}
-
-void
-HF_IdlStruct::produce_MemberDetails( HF_SubTitleTable & o_table,
- const client & i_ce) const
-{
- HF_IdlStructElement
- aElement( Env(), o_table );
- aElement.Produce_byData(i_ce);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_struct.hxx b/autodoc/source/display/idl/hfi_struct.hxx
deleted file mode 100644
index c56439fc..00000000
--- a/autodoc/source/display/idl/hfi_struct.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_STRUCT_HXX
-#define ADC_DISPLAY_HFI_STRUCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-/** Is used to display ->ary::idl::Exception s as well as ->ary::idl::Struct s.
-*/
-class HF_IdlStruct : public HtmlFactory_Idl
-{
- public:
-
- HF_IdlStruct(
- Environment & io_rEnv,
- Xml::Element & o_rOut,
- bool i_bIsException );
- virtual ~HF_IdlStruct();
-
- void Produce_byData(
- const client & ce ) const;
- private:
- // Interface HtmlFactory_Idl:
- virtual type_id inq_BaseOf(
- const client & i_ce ) const;
- // Locals
- HF_NaviSubRow & make_Navibar(
- const client & ce ) const;
- virtual void produce_MemberDetails(
- HF_SubTitleTable & o_table,
- const client & ce ) const;
- // DATA
- bool bIsException;
-};
-
-
-
-// IMPLEMENTATION
-
-
-extern const String
- C_sCePrefix_Struct;
-extern const String
- C_sCePrefix_Exception;
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_tag.cxx b/autodoc/source/display/idl/hfi_tag.cxx
deleted file mode 100644
index b75e8683..00000000
--- a/autodoc/source/display/idl/hfi_tag.cxx
+++ /dev/null
@@ -1,357 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_tag.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary_i/ci_text2.hxx>
-#include <ary_i/d_token.hxx>
-#include <toolkit/out_tree.hxx>
-#include <adc_cl.hxx>
-#include <adc_msg.hxx>
-#include "hfi_typetext.hxx"
-#include "hi_ary.hxx"
-#include "hi_env.hxx"
-#include "hi_linkhelper.hxx"
-
-
-using ary::inf::DocuTex2;
-
-
-inline void
-HF_IdlTag::Enter_TextOut( Xml::Element & o_rText ) const
-{
- aTextOut.Out().Enter(o_rText);
-}
-
-inline void
-HF_IdlTag::Leave_TextOut() const
-{
- aTextOut.Out().Leave();
-}
-
-inline void
-HF_IdlTag::PutText_Out( const ary::inf::DocuTex2 & i_rText ) const
-{
- i_rText.DisplayAt( const_cast< HF_IdlDocuTextDisplay& >(aTextOut) );
-}
-
-
-
-HF_IdlTag::HF_IdlTag( Environment & io_rEnv,
- const ary::idl::CodeEntity & i_rScopeGivingCe )
- : HtmlFactory_Idl( io_rEnv, 0 ),
- pTitleOut(0),
- aTextOut(io_rEnv, 0, i_rScopeGivingCe)
-{
-}
-
-HF_IdlTag::~HF_IdlTag()
-{
-}
-
-void
-HF_IdlTag::Produce_byData( Xml::Element & o_rTitle,
- Xml::Element & o_rText,
- const ary::inf::AtTag2 & i_rTag ) const
-{
- pTitleOut = &o_rTitle;
- Enter_TextOut(o_rText);
- i_rTag.DisplayAt( const_cast< HF_IdlTag& >(*this) );
- Leave_TextOut();
-}
-
-void
-HF_IdlTag::Produce_byData( Xml::Element & o_rTitle,
- Xml::Element & o_rText,
- const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > &
- i_seeAlsoVector ) const
-{
- o_rTitle << "See also";
- for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator
- it = i_seeAlsoVector.begin();
- it != i_seeAlsoVector.end();
- ++it )
- {
- if (it != i_seeAlsoVector.begin())
- {
- o_rText << ", ";
- }
- HF_IdlTypeText
- aLinkText(Env(), o_rText, true, &aTextOut.ScopeGivingCe());
- aLinkText.Produce_byData( (*it)->LinkText() );
- }
-}
-
-void
-HF_IdlTag::Display_StdAtTag( const csi::dsapi::DT_StdAtTag & i_rTag )
-{
- if ( i_rTag.Text().IsEmpty() )
- return;
-
- csv_assert( pTitleOut != 0 );
- *pTitleOut << i_rTag.Title();
- PutText_Out( i_rTag.Text() );
-}
-
-void
-HF_IdlTag::Display_SeeAlsoAtTag( const csi::dsapi::DT_SeeAlsoAtTag & i_rTag )
-{
- if ( i_rTag.Text().IsEmpty() )
- return;
-
- csv_assert( pTitleOut != 0 );
- *pTitleOut << "See also";
-
- HF_IdlTypeText aLinkText(Env(),aTextOut.CurOut(),true, &aTextOut.ScopeGivingCe());
- aLinkText.Produce_byData( i_rTag.LinkText() );
-
- aTextOut.CurOut() << new Html::LineBreak;
- PutText_Out( i_rTag.Text() );
-}
-
-void
-HF_IdlTag::Display_ParameterAtTag( const csi::dsapi::DT_ParameterAtTag & i_rTag )
-{
- csv_assert( pTitleOut != 0 );
- StreamLock sl(100);
- *pTitleOut
- << ( sl() << "Parameter " << i_rTag.Title() << c_str );
- PutText_Out( i_rTag.Text() );
-}
-
-void
-HF_IdlTag::Display_SinceAtTag( const csi::dsapi::DT_SinceAtTag & i_rTag )
-{
- csv_assert(pTitleOut != 0);
-
- if ( i_rTag.Text().IsEmpty() )
- {
- return;
- }
-
- // Transform the value of the @since tag into the text to be displayed.
- String sDisplay =
- autodoc::CommandLine::Get_().DisplayOf_SinceTagValue(
- i_rTag.Text().TextOfFirstToken() );
- if (sDisplay.empty())
- return;
-
- *pTitleOut << "Since ";
- DocuTex2 aHelp;
- aHelp.AddToken(* new csi::dsapi::DT_TextToken(sDisplay));
- PutText_Out(aHelp);
-}
-
-
-//******************** HF_IdlShortDocu *********************/
-
-HF_IdlShortDocu::HF_IdlShortDocu( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl( io_rEnv, &o_rOut )
-{
-}
-
-HF_IdlShortDocu::~HF_IdlShortDocu()
-{
-}
-
-void
-HF_IdlShortDocu::Produce_byData( const ary::idl::CodeEntity & i_rCe )
-{
- const ce_info *
- pDocu = Get_IdlDocu(i_rCe.Docu());
- if (pDocu == 0)
- return;
-
- const ce_info &
- rDocu = *pDocu;
- if ( rDocu.IsDeprecated() )
- {
- CurOut()
- >> *new Html::Bold
- << "[ DEPRECATED ]" << new Html::LineBreak;
- }
- if ( rDocu.IsOptional() )
- {
- CurOut()
- >> *new Html::Bold
- << "[ OPTIONAL ]" << new Html::LineBreak;
- }
-
- HF_IdlDocuTextDisplay
- aText( Env(), &CurOut(), i_rCe);
- rDocu.Short().DisplayAt(aText);
-}
-
-
-//******************** HF_IdlDocuTextDisplay *********************/
-
-
-HF_IdlDocuTextDisplay::HF_IdlDocuTextDisplay( Environment & io_rEnv,
- Xml::Element * o_pOut,
- const ary::idl::CodeEntity & i_rScopeGivingCe )
- : HtmlFactory_Idl(io_rEnv, o_pOut),
- sScope(),
- sLinkToken(),
- bGatherLink(false),
- pScopeGivingCe(&i_rScopeGivingCe)
-{
-}
-
-HF_IdlDocuTextDisplay::~HF_IdlDocuTextDisplay()
-{
-}
-
-void
-HF_IdlDocuTextDisplay::Display_TextToken( const csi::dsapi::DT_TextToken & i_rToken )
-{
- if (bGatherLink)
- {
- if (sLinkToken.length() == 0)
- {
- sLinkToken = i_rToken.GetText();
- return;
- }
- else
- {
- if ( pScopeGivingCe == 0 )
- { // only in original file
- TheMessages().Out_TypeVsMemberMisuse(sLinkToken, Env().CurPageCe_AsText(), 0);
- }
-
- StopLinkGathering();
- }
- } // endif (bGatherLink)
-
- CurOut() << new Xml::XmlCode( i_rToken.GetText() );
-}
-
-void
-HF_IdlDocuTextDisplay::Display_White()
-{
- CurOut() << " ";
-}
-
-void
-HF_IdlDocuTextDisplay::Display_MupType( const csi::dsapi::DT_MupType & i_rToken )
-{
- if (i_rToken.IsBegin())
- {
- StartLinkGathering(i_rToken.Scope());
- }
- else
- {
- if (bGatherLink)
- {
- CreateTypeLink();
- StopLinkGathering();
- }
- }
-}
-
-void
-HF_IdlDocuTextDisplay::Display_MupMember( const csi::dsapi::DT_MupMember & i_rToken )
-{
- if (i_rToken.IsBegin())
- {
- StartLinkGathering(i_rToken.Scope());
- }
- else
- {
- if (bGatherLink)
- {
- CreateMemberLink();
- StopLinkGathering();
- }
- }
-}
-
-void
-HF_IdlDocuTextDisplay::Display_MupConst( const csi::dsapi::DT_MupConst & i_rToken )
-{
- CurOut()
- >> *new Html::Bold
- << i_rToken.GetText();
-}
-
-void
-HF_IdlDocuTextDisplay::Display_Style( const csi::dsapi::DT_Style & i_rToken )
-{
- CurOut() << new Xml::XmlCode( i_rToken.GetText() );
-}
-
-void
-HF_IdlDocuTextDisplay::Display_EOL()
-{
- CurOut() << "\n";
-}
-
-void
-HF_IdlDocuTextDisplay::CreateTypeLink()
-{
- if (strchr(sLinkToken,':') != 0)
- {
- TheMessages().Out_TypeVsMemberMisuse(sLinkToken, Env().CurPageCe_AsFile(".idl"), 0);
- CurOut() << sLinkToken;
- return;
- }
- HF_IdlTypeText aLink(Env(), CurOut(), true, &ScopeGivingCe());
- aLink.Produce_LinkInDocu(sScope, sLinkToken, String::Null_());
-}
-
-void
-HF_IdlDocuTextDisplay::CreateMemberLink()
-{
-
- HF_IdlTypeText aLink(Env(), CurOut(), true, &ScopeGivingCe());
-
- const char *
- sSplit = strchr(sLinkToken,':');
-
- if (sSplit != 0)
- {
- String sCe(sLinkToken.c_str(), sSplit - sLinkToken.c_str());
- String sMember(sSplit+2);
-
- if (NOT sScope.empty() OR ScopeGivingCe().LocalName() != sCe )
- aLink.Produce_LinkInDocu(sScope, sCe, sMember);
- else
- aLink.Produce_LocalLinkInDocu(sMember);
- }
- else
- {
- aLink.Produce_LocalLinkInDocu(sLinkToken);
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_tag.hxx b/autodoc/source/display/idl/hfi_tag.hxx
deleted file mode 100644
index cde541ee..00000000
--- a/autodoc/source/display/idl/hfi_tag.hxx
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_TAG_HXX
-#define ADC_DISPLAY_HFI_TAG_HXX
-
-// BASE CLASSES
-#include "hi_factory.hxx"
-#include <ary_i/disdocum.hxx>
-// USED SERVICES
-#include <ary/idl/i_types4idl.hxx>
-#include <ary_i/ci_atag2.hxx>
-#include <ary_i/ci_text2.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-
-#include <toolkit/hf_docentry.hxx>
-
-namespace ary
-{
-namespace idl
-{
- class Module;
-}
-}
-
-
-
-
-/** This class is an implementation of ary::inf::DocuText_Display
- and will be used by that interface.
-*/
-class HF_IdlDocuTextDisplay : public HtmlFactory_Idl,
- public ary::inf::DocuText_Display
-{
- public:
- HF_IdlDocuTextDisplay(
- Environment & io_rEnv,
- Xml::Element * o_pOut,
- const ary::idl::CodeEntity &
- i_rScopeGivingCe );
- virtual ~HF_IdlDocuTextDisplay();
-
- const ary::idl::CodeEntity &
- ScopeGivingCe() const { return *pScopeGivingCe; }
- private:
- virtual void Display_TextToken(
- const csi::dsapi::DT_TextToken &
- i_rToken );
- virtual void Display_White();
-
- virtual void Display_MupType(
- const csi::dsapi::DT_MupType &
- i_rToken );
- virtual void Display_MupMember(
- const csi::dsapi::DT_MupMember &
- i_rToken );
- virtual void Display_MupConst(
- const csi::dsapi::DT_MupConst &
- i_rToken );
- virtual void Display_Style(
- const csi::dsapi::DT_Style & i_rToken );
- virtual void Display_EOL();
-
- // Local
- void StartLinkGathering(
- const String & i_sScope )
- { sLinkToken = ""; sScope = i_sScope; bGatherLink = true; }
- void StopLinkGathering() { bGatherLink = false; }
- /** @precond
- The scope is in sScope, the name is in sLinkToken.
- */
- void CreateTypeLink();
- /** @precond
- The scope is in sScope, the qualified member-name is in sLinkToken.
- */
- void CreateMemberLink();
-
- // DATA
- String sScope;
- String sLinkToken;
- bool bGatherLink;
- const ary::idl::CodeEntity *
- pScopeGivingCe;
-};
-
-
-
-class HF_IdlShortDocu : public HtmlFactory_Idl
-{
- public:
- HF_IdlShortDocu(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlShortDocu();
-
- void Produce_byData(
- const ary::idl::CodeEntity &
- i_rCe );
-};
-
-
-
-class HF_IdlTag : public HtmlFactory_Idl,
- public ary::inf::DocuTag_Display
-{
- public:
- HF_IdlTag(
- Environment & io_rEnv,
- const ary::idl::CodeEntity &
- i_rScopeGivingCe );
- virtual ~HF_IdlTag();
-
- void Produce_byData(
- Xml::Element & o_rTitle,
- Xml::Element & o_rText,
- const ary::inf::AtTag2 &
- i_rTag ) const;
- void Produce_byData(
- Xml::Element & o_rTitle,
- Xml::Element & o_rText,
- const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > &
- i_seeAlsoVector ) const;
- private:
- virtual void Display_StdAtTag(
- const csi::dsapi::DT_StdAtTag &
- i_rToken );
- virtual void Display_SeeAlsoAtTag(
- const csi::dsapi::DT_SeeAlsoAtTag &
- i_rToken );
- virtual void Display_ParameterAtTag(
- const csi::dsapi::DT_ParameterAtTag &
- i_rToken );
- virtual void Display_SinceAtTag(
- const csi::dsapi::DT_SinceAtTag &
- i_rToken );
-
- void Enter_TextOut(
- Xml::Element & o_rText ) const;
- void Leave_TextOut() const;
- void PutText_Out(
- const ary::inf::DocuTex2 &
- i_rText ) const;
- // DATA
- mutable Xml::Element *
- pTitleOut;
- mutable HF_IdlDocuTextDisplay
- aTextOut;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_typedef.cxx b/autodoc/source/display/idl/hfi_typedef.cxx
deleted file mode 100644
index 67bb685a..00000000
--- a/autodoc/source/display/idl/hfi_typedef.cxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_typedef.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_typedef.hxx>
-#include <toolkit/hf_docentry.hxx>
-#include <toolkit/hf_linachain.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-
-HF_IdlTypedef::HF_IdlTypedef( Environment & io_rEnv,
- Xml::Element & o_rOut )
- : HtmlFactory_Idl(io_rEnv, &o_rOut)
-{
-}
-
-HF_IdlTypedef::~HF_IdlTypedef()
-{
-}
-
-typedef ary::idl::ifc_typedef::attr TypedefAttr;
-
-void
-HF_IdlTypedef::Produce_byData( const client & i_ce ) const
-{
- make_Navibar(i_ce);
-
- HF_TitleTable
- aTitle(CurOut());
-
- HF_LinkedNameChain
- aNameChain(aTitle.Add_Row());
-
- aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
- produce_Title(aTitle, C_sCePrefix_Typedef, i_ce);
-
- HF_DocEntryList
- aTopList( aTitle.Add_Row() );
- aTopList.Produce_Term("Defining Type");
-
- HF_IdlTypeText
- aDefinition( Env(), aTopList.Produce_Definition(), true );
- aDefinition.Produce_byData( TypedefAttr::DefiningType(i_ce) );
-
- CurOut() << new Html::HorizontalLine;
-
- write_Docu(aTitle.Add_Row(), i_ce);
- CurOut() << new Html::HorizontalLine();
-}
-
-void
-HF_IdlTypedef::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeMainRow(i_ce);
-
- CurOut() << new Html::HorizontalLine();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_typedef.hxx b/autodoc/source/display/idl/hfi_typedef.hxx
deleted file mode 100644
index d1fcbb9d..00000000
--- a/autodoc/source/display/idl/hfi_typedef.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_TYPEDEF_HXX
-#define ADC_DISPLAY_HFI_TYPEDEF_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_IdlTypedef : public HtmlFactory_Idl
-{
- public:
- HF_IdlTypedef(
- Environment & io_rEnv,
- Xml::Element & o_rOut );
- virtual ~HF_IdlTypedef();
-
- void Produce_byData(
- const client & ce ) const;
- private:
- void make_Navibar(
- const client & ce ) const;
-};
-
-
-
-// IMPLEMENTATION
-
-
-const String
- C_sCePrefix_Typedef("typedef");
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_typetext.cxx b/autodoc/source/display/idl/hfi_typetext.cxx
deleted file mode 100644
index e8171445..00000000
--- a/autodoc/source/display/idl/hfi_typetext.cxx
+++ /dev/null
@@ -1,760 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_typetext.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <string.h>
-#include <ary/idl/i_type.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ik_ce.hxx>
-#include <adc_cl.hxx>
-#include <adc_msg.hxx>
-#include "hi_linkhelper.hxx"
-
-
-
-
-
-
-inline const ary::idl::Module *
-HF_IdlTypeText::referingModule() const
-{
- if (pReferingCe == 0)
- return Env().Linker().Search_CurModule();
- else
- return &Env().Data().Find_Module(pReferingCe->NameRoom());
-}
-
-inline const HF_IdlTypeText::client *
-HF_IdlTypeText::referingCe() const
-{
- return pReferingCe;
-}
-
-
-HF_IdlTypeText::HF_IdlTypeText( Environment & io_rEnv,
- Xml::Element & o_rOut,
- bool i_bWithLink,
- const client * i_pScopeGivingCe )
- : HtmlFactory_Idl(io_rEnv, &o_rOut),
- pReferingCe( i_pScopeGivingCe ),
- bWithLink(i_bWithLink)
-{
-}
-
-HF_IdlTypeText::HF_IdlTypeText( Environment & io_rEnv,
- E_Index )
- : HtmlFactory_Idl(io_rEnv, 0),
- pReferingCe( 0 ),
- bWithLink(true)
-{
-}
-
-HF_IdlTypeText::~HF_IdlTypeText()
-{
-}
-
-void
-HF_IdlTypeText::Produce_byData(ary::idl::Type_id i_idType) const
-{
- StringVector aModule_;
- String sName;
- ce_id nCe;
- int nSequenceCount = 0;
- csv::erase_container(aModule_);
-
- const ary::idl::Type &
- rType = Env().Data().Find_Type(i_idType);
- Env().Data().Get_TypeText(aModule_, sName, nCe, nSequenceCount, rType);
-
- if ( Env().Data().IsBuiltInOrRelated(rType) )
- {
- produce_BuiltIn(sName,nSequenceCount);
- }
- else
- {
- produce_FromStd( aModule_,
- sName,
- String::Null_(),
- nSequenceCount,
- (nCe.IsValid() ? exists_yes : exists_no),
- rType.FirstEnclosedNonSequenceType(Env().Gate()).TemplateParameters() );
- }
-}
-
-void
-HF_IdlTypeText::Produce_byData( ary::idl::Ce_id i_idCe ) const
-{
- StringVector aModule_;
- String sCe;
- String sMember;
- csv::erase_container(aModule_);
-
- const ary::idl::CodeEntity &
- rCe = Env().Data().Find_Ce(i_idCe);
- Env().Data().Get_CeText(aModule_, sCe, sMember, rCe);
- produce_FromStd(aModule_, sCe, sMember, 0, exists_yes);
-}
-
-void
-HF_IdlTypeText::Produce_byData( const String & i_sFullName ) const
-{
- if ( strncmp(i_sFullName,"http://", 7) == 0 )
- {
- CurOut()
- >> *new Html::Link(i_sFullName)
- << i_sFullName;
- return;
- }
-
- StringVector aModule_;
- String sCe,
- sMember;
- int nSequence = 0;
- String sTypeText;
- csv::erase_container(aModule_);
-
- const ary::idl::Module *
- pScopeModule = referingModule();
- if (pScopeModule == 0)
- {
- // SYNTAX_ERR, but rather logical error: Missing module.
- CurOut() << i_sFullName;
- // KORR_FUTURE
- // How to put a message about this?
- // errorOut_UnresolvedLink(i_sFullName);
- return;
- }
-
- const char * sTypeStart = strrchr(i_sFullName,'<');
- if ( sTypeStart != 0 )
- {
- const char * sTypeEnd = strchr(i_sFullName,'>');
- if (sTypeEnd == 0)
- { // SYNTAX_ERR
- CurOut() << i_sFullName;
- // KORR_FUTURE
- // How to put a message about this?
- // errorOut_UnresolvedLink(i_sFullName);
- return;
- }
-
- nSequence = count_Sequences(i_sFullName);
- sTypeStart++;
- sTypeText.assign(sTypeStart, sTypeEnd-sTypeStart);
- }
- else
- {
- sTypeText = i_sFullName;
- }
-
- csv::erase_container(aModule_);
- bool bFound = // KORR : Check the semantics of this, see if ce really exists, if it is a member?
- Env().Data().Search_Ce( aModule_,
- sCe,sMember,
- sTypeText,
- *pScopeModule );
- if (NOT bFound)
- {
- if ( strchr(sTypeText,':') == 0
- AND
- *sTypeText.c_str() != 'X' ) // This is a HACK, make this correct!
- {
- Produce_LocalLinkInDocu(sTypeText);
- return;
- }
- CurOut() << i_sFullName;
- // KORR
- // How to put a message about this?
- // errorOut_UnresolvedLink(i_sFullName);
- return;
- }
-
- produce_FromStd(aModule_, sCe, sMember, nSequence, exists_yes);
-}
-
-void
-HF_IdlTypeText::Produce_LinkInDocu( const String & i_scope,
- const String & i_name,
- const String & i_member ) const
-{
- StringVector aModule_;
- String sName;
- csv::erase_container(aModule_);
-
- const ary::idl::Module *
- pScopeModule = referingModule();
- if (pScopeModule == 0)
- {
- // SYNTAX_ERR, but rather logical error: Missing module.
- CurOut() << i_scope << "::" << i_name;
- if (NOT i_member.empty())
- CurOut() << "::" << i_member;
- return;
- }
-
- bool
- bFound = Env().Data().Search_CesModule( aModule_,
- i_scope,
- i_name,
- *pScopeModule );
- if (NOT bFound)
- {
- CurOut() << i_scope << "::" << i_name;
- if (NOT i_member.empty())
- CurOut() << "::" << i_member;
- return;
- }
- produce_FromStd(aModule_, i_name, i_member, 0, exists_yes);
-}
-
-void
-HF_IdlTypeText::Produce_LocalLinkInDocu( const String & i_member ) const
-{
- StringVector aModule_;
- String sName;
- csv::erase_container(aModule_);
-
- csv_assert(referingCe() != 0);
- if ( referingModule() == Env().Linker().Search_CurModule() )
- {
- StreamLock slLink(200);
- if (referingCe()->SightLevel() == ary::idl::sl_Member)
- {
- slLink() << "#" << i_member;
- }
- else
- {
- slLink() << referingCe()->LocalName()
- << ".html#"
- << i_member;
- }
- CurOut()
- >> *new Html::Link(slLink().c_str())
- << i_member;
- return;
- }
-
- String sDummyMember;
- Env().Data().Get_CeText(aModule_, sName, sDummyMember, *referingCe());
- produce_FromStd(aModule_, sName, i_member, 0, exists_yes);
-}
-
-void
-HF_IdlTypeText::Produce_IndexLink( Xml::Element & o_out,
- const client & i_ce ) const
-{
- StringVector aModule_;
- String sCe;
- String sMember;
- csv::erase_container(aModule_);
-
- Out().Enter(o_out);
-
- Env().Data().Get_CeText(aModule_, sCe, sMember, i_ce);
- produce_IndexLink(aModule_, sCe, sMember, false);
-
- Out().Leave();
-}
-
-void
-HF_IdlTypeText::Produce_IndexOwnerLink( Xml::Element & o_out,
- const client & i_owner ) const
-{
- StringVector aModule_;
- String sCe;
- String sMember;
- csv::erase_container(aModule_);
-
- Out().Enter(o_out);
-
- if (i_owner.Owner().IsValid())
- {
- Env().Data().Get_CeText(aModule_, sCe, sMember, i_owner);
- produce_IndexLink(aModule_, sCe, sMember, true);
- }
- else
- { // global namespace:
-
- CurOut()
- << "."
- >> *new Html::Link("../module-ix.html")
- << "global namespace";
- }
-
-
- Out().Leave();
-}
-
-void
-HF_IdlTypeText::Produce_IndexSecondEntryLink( Xml::Element & o_out,
- const client & i_ce ) const
-{
- StringVector aModule_;
- String sCe;
- String sMember;
- csv::erase_container(aModule_);
-
- Out().Enter(o_out);
-
- Env().Data().Get_CeText(aModule_, sCe, sMember, i_ce);
- produce_IndexLink(aModule_, sCe, sMember, true);
- Out().Leave();
-}
-
-
-void
-HF_IdlTypeText::produce_FromStd( const StringVector & i_module,
- const String & i_ce,
- const String & i_member,
- int i_sequenceCount,
- E_Existence i_ceExists,
- const std::vector<ary::idl::Type_id> *
- i_templateParameters ) const
-{
- if (i_ceExists == exists_no)
- {
- if ( is_ExternLink(i_module) )
- {
- produce_ExternLink(i_module,i_ce,i_member,i_sequenceCount,i_templateParameters);
- return;
- }
- errorOut_UnresolvedLink(i_module, i_ce, i_member);
- }
-
- output::Node &
- rCeNode = Env().OutputTree().Provide_Node(i_module);
- output::Position
- aTargetPos(rCeNode);
- bool
- bShowModule = rCeNode != Env().CurPosition().RelatedNode()
- ? i_module.size() > 0
- : false;
- bool
- bUseMember = NOT i_member.empty();
- bool
- bLink2Module = i_ceExists == exists_yes;
- bool
- bLink2Ce = i_ceExists == exists_yes;
- bool
- bLink2Member = NOT Env().Is_MemberExistenceCheckRequired()
- AND i_ceExists == exists_yes;
- bool
- bHasCeOrName = NOT i_ce.empty();
-
- if (i_sequenceCount > 0)
- start_Sequence(i_sequenceCount);
-
- StreamLock aLink(300);
- StreamStr & rLink = aLink();
-
- // Produce output: module
- if (bShowModule)
- {
- int nMax = i_module.size() - 1;
- int nCount = 0;
- StringVector::const_iterator
- itm = i_module.begin();
- for ( ;
- nCount < nMax;
- ++itm, ++nCount )
- {
- CurOut() << "::" << *itm;
- }
-
- CurOut() << "::";
- if (bLink2Module)
- {
- aTargetPos.Set_File(output::ModuleFileName());
- Env().Linker().Get_Link2Position(rLink, aTargetPos);
- CurOut()
- >> *new Html::Link( rLink.c_str() )
- << *itm;
- rLink.reset();
- }
- else
- {
- CurOut() << *itm;
- }
-
- if (bHasCeOrName)
- CurOut() << "::";
- } // end if (bShowModule)
-
- // CodeEntity and member:
- aTargetPos.Set_File( rLink << i_ce << ".html" << c_str );
- rLink.reset();
-
- if (bHasCeOrName)
- {
- if (bLink2Ce)
- {
- Env().Linker().Get_Link2Position(rLink, aTargetPos);
- CurOut()
- >> *new Html::Link(rLink.c_str())
- << i_ce;
- rLink.reset();
- }
- else
- {
- CurOut() << i_ce;
- }
-
- if (i_templateParameters != 0)
- write_TemplateParameterList(*i_templateParameters);
-
- if (bUseMember)
- {
- CurOut() << "::";
-
- if (bLink2Member)
- {
- bool bFunction = strstr(i_member,"()") != 0;
- String sMember( i_member );
- if (bFunction)
- sMember.assign(i_member.c_str(), sMember.length()-2);
-
- Env().Linker().Get_Link2Member(rLink, aTargetPos, sMember);
- CurOut()
- >> *new Html::Link(rLink.c_str())
- << i_member;
- rLink.reset();
- }
- else
- {
- CurOut()
- << i_member;
- }
- } // endif (bUseMember)
- } // endif (bHasCeOrName)
-
- if (i_sequenceCount > 0)
- finish_Sequence(i_sequenceCount);
-}
-
-void
-HF_IdlTypeText::produce_BuiltIn( const String & i_type,
- int i_sequenceCount ) const
-{
- if (i_sequenceCount > 0)
- start_Sequence(i_sequenceCount);
- CurOut() << i_type;
- if (i_sequenceCount > 0)
- finish_Sequence(i_sequenceCount);
-}
-
-void
-HF_IdlTypeText::produce_IndexLink( const StringVector & i_module,
- const String & i_ce,
- const String & i_member,
- bool i_bIsOwner ) const
-{
- output::Node &
- rCeNode = Env().OutputTree().Provide_Node(i_module);
- output::Position
- aTargetPos(rCeNode);
- bool
- bShowModule = i_bIsOwner OR (i_module.size() > 0 AND i_ce.empty());
- bool
- bShowNonModule = NOT bShowModule OR (i_bIsOwner AND NOT i_ce.empty());
- bool
- bUseMember = NOT i_member.empty();
-
- StreamLock aLink(300);
- StreamStr & rLink = aLink();
-
- // Produce output: module
- if (bShowModule)
- {
- if (i_bIsOwner)
- {
- int nMax = bShowNonModule ? i_module.size() : i_module.size() - 1;
- int nCount = 0;
- for ( StringVector::const_iterator itm = i_module.begin();
- nCount < nMax;
- ++itm, ++nCount )
- {
- CurOut() << "::" << *itm;
- }
- CurOut() << ":: .";
- }
-
- if (NOT bShowNonModule)
- {
- aTargetPos.Set_File(output::ModuleFileName());
- Env().Linker().Get_Link2Position(rLink, aTargetPos);
- CurOut()
- >> *new Html::Link( rLink.c_str() )
- >> *new Html::Bold
- << i_module.back();
- rLink.reset();
- }
- } // end if (bShowModule)
-
- if (bShowNonModule)
- {
- aTargetPos.Set_File( rLink << i_ce << ".html" << c_str );
- rLink.reset();
-
- if (bUseMember)
- {
- bool bFunction = strstr(i_member,"()") != 0;
- String sMember( i_member );
- if (bFunction)
- sMember.assign(i_member.c_str(), sMember.length()-2);
- Env().Linker().Get_Link2Member(rLink, aTargetPos, sMember);
- CurOut()
- >> *new Html::Link(rLink.c_str())
- >> *new Html::Bold
- << i_member;
- rLink.reset();
- }
- else
- {
- Env().Linker().Get_Link2Position(rLink, aTargetPos);
- if (i_bIsOwner)
- {
- CurOut()
- >> *new Html::Link(rLink.c_str())
- << i_ce;
- }
- else
- {
- CurOut()
- >> *new Html::Link(rLink.c_str())
- >> *new Html::Bold
- << i_ce;
- }
- rLink.reset();
- }
- } // endif (bHasCeOrName)
-}
-
-int
-HF_IdlTypeText::count_Sequences( const char * i_sFullType ) const
-{
- int ret = 0;
-
- for ( const char * pCount = i_sFullType;
- *pCount != 0;
- )
- {
- pCount = strstr(pCount,"sequence");
- if (pCount != 0)
- {
- pCount += sizeof("sequence"); // = strlen(sequence) + 1 for '<'.
- if ( *(pCount-1) == '\0' )
- {
- // SYNTAX_ERR
- return 0;
- }
- ++ret;
- }
- } // end for
-
- return ret;
-}
-
-void
-HF_IdlTypeText::start_Sequence( int i_count ) const
-{
- csv_assert( i_count > 0 );
- for (int i = 0; i < i_count; ++i )
- {
- CurOut() << "sequence< ";
- }
-}
-
-void
-HF_IdlTypeText::finish_Sequence( int i_count ) const
-{
- csv_assert( i_count > 0 );
- for (int i = 0; i < i_count; ++i )
- {
- CurOut() << " >";
- }
-}
-
-void
-HF_IdlTypeText::errorOut_UnresolvedLink( const char * i_name ) const
-{
- StreamLock slFile(1000);
-
- // KORR
- // Handle links in cited documentation from other entities.
- slFile() << Env().CurPageCe_AsText();
- slFile().pop_back(5);
- slFile() << ".idl";
-
- // KORR
- // Retrieve, correct line number.
- TheMessages().Out_UnresolvedLink( i_name,
- slFile().c_str(),
- 0 );
-}
-
-void
-HF_IdlTypeText::errorOut_UnresolvedLink( const StringVector & i_module,
- const String & i_ce,
- const String & i_member ) const
-{
- StreamLock slName(500);
-
- if (i_module.size() > 0)
- {
- slName().operator_join(i_module.begin(), i_module.end(), "::");
- if (NOT i_ce.empty())
- slName() << "::";
- }
- if (NOT i_ce.empty())
- {
- slName() << i_ce;
- if (NOT i_member.empty())
- slName() << "::" << i_member;
- }
- errorOut_UnresolvedLink(slName().c_str());
-}
-
-bool
-HF_IdlTypeText::is_ExternLink( const StringVector & i_module ) const
-{
- const autodoc::CommandLine &
- rCmdLine = autodoc::CommandLine::Get_();
- uintt nExtNspLength = rCmdLine.ExternNamespace().length();
- if (nExtNspLength == 0)
- return false;
-
- StreamStr s(1000);
- s << "::";
- s.operator_join( i_module.begin(),
- i_module.end(),
- "::" );
-
- if (s.length() < nExtNspLength)
- return false;
- return ( strncmp( rCmdLine.ExternNamespace().c_str(),
- s.c_str(),
- nExtNspLength ) == 0 );
-}
-
-void
-HF_IdlTypeText::produce_ExternLink( const StringVector & i_module,
- const String & i_ce,
- const String & i_member,
- int i_sequenceCount,
- const std::vector<ary::idl::Type_id> *
- i_templateParameters ) const
-{
- // KORR
- // Look again at this code and take some time.
-
- StreamLock aLink(1000);
- StreamStr & rLink = aLink();
-
- rLink << autodoc::CommandLine::Get_().ExternRoot();
- rLink.operator_join( i_module.begin(),
- i_module.end(),
- "/" );
- rLink << '/'
- << i_ce
- << ".html";
- if (i_member.length() > 0)
- rLink << "/#" << i_member;
-
- if (i_sequenceCount > 0)
- start_Sequence(i_sequenceCount);
-
- // module
- int nMax = i_module.size();
- int nCount = 0;
- StringVector::const_iterator
- itm = i_module.begin();
- for ( ;
- nCount < nMax;
- ++itm, ++nCount )
- {
- CurOut() << "::" << *itm;
- }
- CurOut() << "::";
-
-
- // CodeEntity
- if (i_member.length() == 0)
- {
- CurOut()
- >> *new Html::Link(rLink.c_str())
- << i_ce;
- }
- else
- {
- CurOut()
- << i_ce;
- }
-
- if (i_templateParameters != 0)
- write_TemplateParameterList(*i_templateParameters);
-
- // Member
- if (i_member.length() > 0)
- {
- CurOut()
- >> *new Html::Link(rLink.c_str())
- << i_member;
- }
-
- if (i_sequenceCount > 0)
- finish_Sequence(i_sequenceCount);
-}
-
-void
-HF_IdlTypeText::write_TemplateParameterList(
- const std::vector<ary::idl::Type_id> & i_templateParameters ) const
-{
- if (i_templateParameters.empty())
- return;
-
- HF_IdlTypeText
- aTemplateParamWriter(Env(), CurOut(), true, pReferingCe);
- CurOut() << "< ";
- std::vector<ary::idl::Type_id>::const_iterator
- it = i_templateParameters.begin();
- aTemplateParamWriter.Produce_byData(*it);
- for ( ++it; it != i_templateParameters.end(); ++it )
- {
- CurOut() << ", ";
- aTemplateParamWriter.Produce_byData(*it);
- }
- CurOut() << " >";
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_typetext.hxx b/autodoc/source/display/idl/hfi_typetext.hxx
deleted file mode 100644
index e7ec21d6..00000000
--- a/autodoc/source/display/idl/hfi_typetext.hxx
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_TYPETEXT_HXX
-#define ADC_DISPLAY_HFI_TYPETEXT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_IdlTypeText : public HtmlFactory_Idl
-{
- public:
- enum E_Index { use_for_javacompatible_index };
-
- HF_IdlTypeText(
- Environment & io_rEnv,
- Xml::Element & o_rOut,
- bool i_bWithLink,
- const client * i_pScopeGivingCe = 0 );
- HF_IdlTypeText(
- Environment & io_rEnv,
- E_Index e );
- virtual ~HF_IdlTypeText();
-
- void Produce_byData(
- ary::idl::Type_id i_idType ) const;
- void Produce_byData(
- ary::idl::Ce_id i_idCe ) const;
- void Produce_byData(
- const String & i_sFullName ) const;
- void Produce_LinkInDocu(
- const String & i_scope,
- const String & i_name,
- const String & i_member ) const;
- void Produce_LocalLinkInDocu(
- const String & i_member ) const;
-
- /// Produce the first link for Java-help understood index entries.
- void Produce_IndexLink(
- Xml::Element & o_out,
- const client & i_ce ) const;
- /** Produce the second link for Java-help understood index entries.
- For members this will be a link to their owner (this function is
- used), else see @->Produce_IndexSecondEntryLink();
- */
- void Produce_IndexOwnerLink(
- Xml::Element & o_out,
- const client & i_owner ) const;
- /** Produce the second link for Java-help understood index entries.
- For non- members this will again be a link to to the entry itself
- (this function is used), else see @->Produce_IndexOwnerLink();
- */
- void Produce_IndexSecondEntryLink(
- Xml::Element & o_out,
- const client & i_ce ) const;
- private:
- // Locals
- enum E_Existence
- {
- exists_dontknow,
- exists_yes,
- exists_no
- };
-
- void produce_FromStd(
- const StringVector &
- i_module,
- const String & i_ce,
- const String & i_member,
- int i_sequenceCount,
- E_Existence i_ceExists,
- const std::vector<ary::idl::Type_id> *
- i_templateParameters = 0 ) const;
- void produce_BuiltIn(
- const String & i_type,
- int i_sequenceCount ) const;
- void produce_IndexLink(
- const StringVector &
- i_module,
- const String & i_ce,
- const String & i_member,
- bool i_bIsOwner ) const;
- int count_Sequences(
- const char * i_sFullType ) const;
- void start_Sequence(
- int i_count ) const;
- void finish_Sequence(
- int i_count ) const;
- void errorOut_UnresolvedLink(
- const char * i_name ) const;
- void errorOut_UnresolvedLink(
- const StringVector &
- i_module,
- const String & i_ce,
- const String & i_member ) const;
- bool is_ExternLink(
- const StringVector &
- i_module ) const;
- void produce_ExternLink(
- const StringVector &
- i_module,
- const String & i_ce,
- const String & i_member,
- int i_sequenceCount,
- const std::vector<ary::idl::Type_id> *
- i_templateParameters ) const;
- void write_TemplateParameterList(
- const std::vector<ary::idl::Type_id> &
- i_templateParameters ) const;
- const ary::idl::Module *
- referingModule() const;
- const client * referingCe() const;
-
- // DATA
- mutable const client *
- pReferingCe;
- bool bWithLink;
-};
-
-
-
-// IMPLEMENTATION
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_xrefpage.cxx b/autodoc/source/display/idl/hfi_xrefpage.cxx
deleted file mode 100644
index 4afea859..00000000
--- a/autodoc/source/display/idl/hfi_xrefpage.cxx
+++ /dev/null
@@ -1,276 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hfi_xrefpage.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_navibar.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_env.hxx"
-
-
-namespace
-{
-
-const String
- C_sTitleStart("uses of ");
-const String
- C_sCRLF("\n");
-const String
- C_sDevMan("References in Developers Guide");
-
-} // anonymous namespace
-
-
-
-HF_IdlXrefs::HF_IdlXrefs( Environment & io_rEnv,
- Xml::Element & o_rOut,
- const String & i_prefix,
- const client & i_ce )
- : HtmlFactory_Idl(io_rEnv, &o_rOut),
- rContentDirectory(*new Html::Paragraph),
- pClient(&i_ce)
-{
- produce_Main(i_prefix, i_ce);
-}
-
-HF_IdlXrefs::~HF_IdlXrefs()
-{
-}
-
-void
-HF_IdlXrefs::Write_ManualLinks( const client & i_ce ) const
-{
- const StringVector &
- rLinks2Refs = i_ce.Secondaries().Links2RefsInManual();
- if ( rLinks2Refs.size() == 0 )
- {
- rContentDirectory
- << C_sDevMan
- << new Html::LineBreak
- << C_sCRLF;
- return;
- }
-
-
- rContentDirectory
- >> *new Html::Link("#devmanrefs")
- << C_sDevMan
- << new Html::LineBreak
- << C_sCRLF;
-
- HF_SubTitleTable
- aList(CurOut(), "devmanrefs", C_sDevMan, 1);
- Xml::Element &
- rOutCell = aList.Add_Row() >>* new Html::TableCell;
-
- csv_assert(rLinks2Refs.size() % 2 == 0);
- for ( StringVector::const_iterator it = rLinks2Refs.begin();
- it != rLinks2Refs.end();
- ++it )
- {
- Xml::Element &
- rLink = rOutCell >> *new Html::Link( Env().Link2Manual(*it));
- if ( (*(it+1)).empty() )
-
- // HACK KORR_FUTURE
- // Research what happens with manual links which contain normal characters
- // in non-utf-8 texts. And research, why utfF-8 does not work here.
- rLink << new Xml::XmlCode(*it);
- else
- // HACK KORR_FUTURE, see above.
- rLink << new Xml::XmlCode( *(it+1) );
- rOutCell
- << new Html::LineBreak
- << C_sCRLF;
- ++it;
- } // end for
-}
-
-void
-HF_IdlXrefs::Produce_List( const char * i_title,
- const char * i_label,
- ce_list & i_iterator ) const
-{
- if (NOT i_iterator)
- {
- rContentDirectory
- << i_title
- << new Html::LineBreak
- << C_sCRLF;
- return;
- }
-
- csv_assert(*i_label == '#');
-
- rContentDirectory
- >> *new Html::Link(i_label)
- << i_title
- << new Html::LineBreak
- << C_sCRLF;
-
- HF_SubTitleTable
- aList(CurOut(), i_label+1, i_title, 1);
- Xml::Element &
- rOutCell = aList.Add_Row() >>* new Html::TableCell;
- HF_IdlTypeText
- aTypeWriter(Env(), rOutCell, true, pClient);
- for ( ce_list & it = i_iterator; it; ++it )
- {
- aTypeWriter.Produce_byData(*it);
- rOutCell << new Html::LineBreak;
- } // end for
-}
-
-void
-HF_IdlXrefs::Produce_Tree( const char * i_title,
- const char * i_label,
- const client & i_ce,
- F_GET_SUBLIST i_sublistcreator ) const
-{
- dyn_ce_list pResult;
- (*i_sublistcreator)(pResult, i_ce);
-
- if (NOT (*pResult).operator bool())
- {
- rContentDirectory
- << i_title
- << new Html::LineBreak
- << C_sCRLF;
- return;
- }
-
- csv_assert(*i_label == '#');
-
- rContentDirectory
- >> *new Html::Link(i_label)
- << i_title
- << new Html::LineBreak
- << C_sCRLF;
-
- HF_SubTitleTable
- aList(CurOut(), i_label+1, i_title, 1);
- Xml::Element &
- rOut = aList.Add_Row()
- >>* new Html::TableCell
- >> *new csi::xml::AnElement("pre")
- << new csi::html::StyleAttr("font-family:monospace;");
-
- recursive_make_ListInTree( rOut,
- 0,
- i_ce,
- *pResult,
- i_sublistcreator );
-}
-
-void
-HF_IdlXrefs::produce_Main( const String & i_prefix,
- const client & i_ce ) const
-{
- make_Navibar(i_ce);
-
- HF_TitleTable
- aTitle(CurOut());
- StreamLock sl(200);
- aTitle.Produce_Title( sl()
- << C_sTitleStart
- << i_prefix
- << " "
- << i_ce.LocalName()
- << c_str );
-
- aTitle.Add_Row() << &rContentDirectory;
- sl().reset();
- rContentDirectory
- >> *new Html::Link( sl() << i_ce.LocalName()
- << ".html"
- << c_str )
- >> *new Html::Bold
- << "back to "
- << i_prefix
- << " "
- << i_ce.LocalName();
- rContentDirectory
- << new Html::LineBreak
- << new Html::LineBreak
- << C_sCRLF;
-
- CurOut() << new Html::HorizontalLine();
-}
-
-void
-HF_IdlXrefs::make_Navibar( const client & i_ce ) const
-{
- HF_IdlNavigationBar
- aNaviBar(Env(), CurOut());
- aNaviBar.Produce_CeXrefsMainRow(i_ce);
- CurOut() << new Html::HorizontalLine();
-}
-
-void
-HF_IdlXrefs::recursive_make_ListInTree( Xml::Element & o_rDisplay,
- uintt i_level,
- const client & i_ce,
- ce_list & i_iterator,
- F_GET_SUBLIST i_sublistcreator ) const
-{
- const char * sLevelIndentation = " ";
-
- HF_IdlTypeText
- aTypeWriter(Env(), o_rDisplay, true, &i_ce);
- for ( ; i_iterator.operator bool(); ++i_iterator )
- {
- for (uintt i = 0; i < i_level; ++i)
- {
- o_rDisplay << sLevelIndentation;
- } // end for
-
- aTypeWriter.Produce_byData(*i_iterator);
- o_rDisplay << C_sCRLF;
-
- dyn_ce_list pResult;
- const client & rCe = Env().Gate().Ces().Find_Ce(*i_iterator);
- (*i_sublistcreator)(pResult, rCe);
- if ( (*pResult).operator bool() )
- {
- recursive_make_ListInTree( o_rDisplay,
- i_level + 1,
- rCe,
- *pResult,
- i_sublistcreator );
- }
- } // end for
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hfi_xrefpage.hxx b/autodoc/source/display/idl/hfi_xrefpage.hxx
deleted file mode 100644
index 0f0ca26c..00000000
--- a/autodoc/source/display/idl/hfi_xrefpage.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFI_XREFPAGE_HXX
-#define ADC_DISPLAY_HFI_XREFPAGE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "hi_factory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_IdlXrefs : public HtmlFactory_Idl
-{
- public:
- typedef void (*F_GET_SUBLIST)(dyn_ce_list&, const client&);
-
- HF_IdlXrefs(
- Environment & io_rEnv,
- Xml::Element & o_rOut,
- const String & i_prefix,
- const client & i_ce);
- virtual ~HF_IdlXrefs();
-
- /** @descr
- Only lists which are tried to be produced by Produce_List() or
- Produce_Tree(), will occur in the content directory of the page.
- They will have links, if the list or tree has at least one element,
- else the list is mentioned in the directory without link.
-
- @param i_label [*i_label == '#']
- */
- void Produce_List(
- const char * i_title,
- const char * i_label,
- ce_list & i_iterator ) const;
- void Write_ManualLinks(
- const client & i_ce ) const;
- /** @descr
- Only lists which are tried to be produced by Produce_List() or
- Produce_Tree(), will occur in the content directory of the page.
- They will have links, if the list or tree has at least one element,
- else the list is mentioned in the directory without link.
-
- @param i_label [*i_label == '#']
- */
- void Produce_Tree(
- const char * i_title,
- const char * i_label,
- const client & i_ce,
- F_GET_SUBLIST i_sublistcreator ) const;
-
- private:
- // Locals
- void produce_Main(
- const String & i_prefix,
- const client & i_ce ) const;
- void make_Navibar(
- const client & i_ce ) const;
- /// @return true if there are any elements in sub lists.
- void recursive_make_ListInTree(
- Xml::Element & o_rDisplay,
- uintt i_level, /// 0 is highest
- const client & i_ce,
- ce_list & i_iterator,
- F_GET_SUBLIST i_sublistcreator ) const;
-
- // DATA
- Xml::Element & rContentDirectory;
- const client * pClient;
-};
-
-
-
-// IMPLEMENTATION
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_ary.cxx b/autodoc/source/display/idl/hi_ary.cxx
deleted file mode 100644
index fa789cac..00000000
--- a/autodoc/source/display/idl/hi_ary.cxx
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hi_ary.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/ploc_dir.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_type.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-
-
-inline const ary::idl::Gate &
-AryAccess::gate() const
- { return rGate; }
-
-inline const ary::idl::CePilot &
-AryAccess::ces() const
- { return rGate.Ces(); }
-
-inline const ary::idl::TypePilot &
-AryAccess::types() const
- { return rGate.Types(); }
-
-inline const ary::idl::Module *
-AryAccess::find_SubModule( const ary::idl::Module & i_parent,
- const String & i_name ) const
-{
- ary::idl::Ce_id
- nModule = i_parent.Search_Name(i_name);
- return ces().Search_Module(nModule);
-}
-
-bool
-AryAccess::nextName( const char * & io_TextPtr,
- String & o_name ) const
-{
- if ( strncmp(io_TextPtr,"::", 2) == 0 )
- io_TextPtr += 2;
-
- const char * pEnd = strchr(io_TextPtr,':');
- size_t nLen = pEnd == 0
- ? strlen(io_TextPtr)
- : pEnd - io_TextPtr;
- o_name.assign(io_TextPtr, nLen);
- io_TextPtr += nLen;
-
- return nLen > 0;
-}
-
-
-
-AryAccess::AryAccess( const ary::idl::Gate & i_rGate )
- : rGate(i_rGate)
-{
-}
-
-const ary::idl::Module &
-AryAccess::GlobalNamespace() const
-{
- return ces().GlobalNamespace();
-}
-
-const ary::idl::Module &
-AryAccess::Find_Module( ary::idl::Ce_id i_ce ) const
-{
- return ces().Find_Module(i_ce);
-}
-
-
-const ary::idl::CodeEntity &
-AryAccess::Find_Ce( ary::idl::Ce_id i_ce ) const
-{
- return ces().Find_Ce(i_ce);
-}
-
-const ary::idl::Type &
-AryAccess::Find_Type( ary::idl::Type_id i_type ) const
-{
- return types().Find_Type(i_type);
-}
-
-ary::idl::Ce_id
-AryAccess::CeFromType( ary::idl::Type_id i_type ) const
-{
- return types().Search_CeRelatedTo(i_type);
-}
-
-bool
-AryAccess::IsBuiltInOrRelated( const ary::idl::Type & i_type ) const
-{
- return types().IsBuiltInOrRelated(i_type);
-}
-
-bool
-AryAccess::Search_Ce( StringVector & o_module,
- String & o_mainEntity,
- String & o_memberEntity,
- const char * i_sText,
- const ary::idl::Module & i_referingScope ) const
-{
- o_module.erase(o_module.begin(),o_module.end());
- o_mainEntity = String::Null_();
- o_memberEntity = String::Null_();
-
- const ary::idl::Module * pModule = 0;
-
- if ( strncmp(i_sText, "::", 2) == 0
- OR strncmp(i_sText, "com::sun::star", 14) == 0 )
- pModule = &GlobalNamespace();
- else
- {
- pModule = &i_referingScope;
- ces().Get_Text(o_module, o_mainEntity, o_memberEntity, *pModule);
- }
-
- const char * pNext = i_sText;
- String sNextName;
-
- // Find Module:
- while ( nextName(pNext, sNextName) )
- {
- const ary::idl::Module *
- pSub = find_SubModule(*pModule, sNextName);
- if (pSub != 0)
- {
- pModule = pSub;
- o_module.push_back(sNextName);
- }
- else
- break;
- }
-
- // Find main CodeEntity:
- if ( sNextName.length() == 0 )
- return true;
- const ary::idl::Ce_id
- nCe = pModule->Search_Name(sNextName);
- if (NOT nCe.IsValid())
- return false;
- o_mainEntity = sNextName;
-
- // Find member:
- if ( *pNext == 0 )
- return true;
- nextName(pNext, o_memberEntity);
- if (strchr(o_memberEntity,':') != 0)
- return false; // This must not happen in IDL
-
- return true;
-}
-
-bool
-AryAccess::Search_CesModule( StringVector & o_module,
- const String & i_scope,
- const String & i_ce,
- const ary::idl::Module & i_referingScope ) const
-{
- o_module.erase(o_module.begin(),o_module.end());
-
- const ary::idl::Module *
- pModule = 0;
-
- if ( strncmp(i_scope, "::", 2) == 0
- OR strncmp(i_scope, "com::sun::star", 14) == 0 )
- pModule = &GlobalNamespace();
- else
- {
- pModule = &i_referingScope;
- static String Dummy1;
- static String Dummy2;
- ces().Get_Text(o_module, Dummy1, Dummy2, *pModule);
- }
-
- const char * pNext = i_scope;
- String sNextName;
-
- // Find Module:
- while ( nextName(pNext, sNextName) )
- {
- const ary::idl::Module *
- pSub = find_SubModule(*pModule, sNextName);
- if (pSub != 0)
- {
- pModule = pSub;
- o_module.push_back(sNextName);
- }
- else
- return false;
- } // end while
- return pModule->Search_Name(i_ce).IsValid();
-}
-
-const ary::idl::Module *
-AryAccess::Search_Module( const StringVector & i_nameChain ) const
-{
- const ary::idl::Module * ret =
- &GlobalNamespace();
- for ( StringVector::const_iterator it = i_nameChain.begin();
- it != i_nameChain.end();
- ++it )
- {
- ret = find_SubModule(*ret, *it);
- if (ret == 0)
- break;
- } // end for
- return ret;
-}
-
-void
-AryAccess::Get_CeText( StringVector & o_module,
- String & o_ce,
- String & o_member,
- const ary::idl::CodeEntity & i_ce ) const
-{
- ces().Get_Text(o_module, o_ce, o_member, i_ce);
-}
-
-void
-AryAccess::Get_TypeText( StringVector & o_module,
- String & o_sCe,
- ary::idl::Ce_id & o_nCe,
- int & o_sequenceCount,
- const ary::idl::Type & i_type ) const
-{
- i_type.Get_Text(o_module, o_sCe, o_nCe, o_sequenceCount, gate());
-}
-
-void
-AryAccess::Get_IndexData( std::vector<ary::idl::Ce_id> & o_data,
- ary::idl::alphabetical_index::E_Letter i_letter ) const
-{
- rGate.Ces().Get_AlphabeticalIndex(o_data, i_letter);
-}
-
-
-const ary::idl::CePilot &
-AryAccess::Ces() const
-{
- return rGate.Ces();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_ary.hxx b/autodoc/source/display/idl/hi_ary.hxx
deleted file mode 100644
index 99ae6372..00000000
--- a/autodoc/source/display/idl/hi_ary.hxx
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HI_ARY_HXX
-#define ADC_DISPLAY_HI_ARY_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <ary/idl/i_types4idl.hxx>
- // PARAMETERS
-#include <ary/idl/i_gate.hxx>
-#include <ary/doc/d_docu.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
- class Module;
- class Gate;
- class CePilot;
- class TypePilot;
-}
-}
-namespace output
-{
- class Position;
-}
-
-
-
-
-inline const ary::doc::OldIdlDocu *
-Get_IdlDocu(const ary::doc::Documentation & i_doc)
-{
- return dynamic_cast< const ary::doc::OldIdlDocu* >(i_doc.Data());
-}
-
-
-
-
-
-/** A helper class to wrap the access to data in the Autodoc Repository.
-*/
-class AryAccess
-{
- public:
- // LIFECYCLE
- AryAccess(
- const ary::idl::Gate &
- i_rGate );
- // INQUIRY
- const ary::idl::Module &
- GlobalNamespace() const;
- const ary::idl::Module &
- Find_Module(
- ary::idl::Ce_id i_ce ) const;
- const ary::idl::CodeEntity &
- Find_Ce(
- ary::idl::Ce_id i_ce ) const;
- const ary::idl::Type &
- Find_Type(
- ary::idl::Type_id i_type ) const;
- ary::idl::Ce_id CeFromType(
- ary::idl::Type_id i_type ) const;
- bool IsBuiltInOrRelated(
- const ary::idl::Type &
- i_type ) const;
- bool Search_Ce(
- StringVector & o_module,
- String & o_mainEntity,
- String & o_memberEntity,
- const char * i_sText,
- const ary::idl::Module &
- i_referingScope ) const;
- bool Search_CesModule(
- StringVector & o_module,
- const String & i_scope,
- const String & i_ce,
- const ary::idl::Module &
- i_referingScope ) const;
- const ary::idl::Module *
- Search_Module(
- const StringVector &
- i_nameChain ) const;
-
- void Get_CeText(
- StringVector & o_module,
- String & o_ce,
- String & o_member,
- const ary::idl::CodeEntity &
- i_ce ) const;
- void Get_TypeText(
- StringVector & o_module,
- String & o_sCe,
- ary::idl::Ce_id & o_nCe,
- int & o_sequenceCount,
- const ary::idl::Type &
- i_type ) const;
- void Get_IndexData(
- std::vector<ary::idl::Ce_id> &
- o_data,
- ary::idl::alphabetical_index::E_Letter
- i_letter ) const;
-
- const ary::idl::CePilot &
- Ces() const;
- private:
- const ary::idl::Module *
- find_SubModule(
- const ary::idl::Module &
- i_parent,
- const String & i_name ) const;
-
- /// Gets "::"-separated names out of a string.
- bool nextName(
- const char * & io_TextPtr,
- String & o_name ) const;
-
-
- const ary::idl::Gate &
- gate() const;
- const ary::idl::CePilot &
- ces() const;
- const ary::idl::TypePilot &
- types() const;
- // DATA
- const ary::idl::Gate &
- rGate;
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_display.cxx b/autodoc/source/display/idl/hi_display.cxx
deleted file mode 100644
index 170450e9..00000000
--- a/autodoc/source/display/idl/hi_display.cxx
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <idl/hi_display.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/file.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/getncast.hxx>
-#include <toolkit/out_tree.hxx>
-#include <cfrstd.hxx>
-#include "hi_ary.hxx"
-#include "hi_env.hxx"
-#include "hi_main.hxx"
-
-
-extern const String C_sCssFilename_Idl;
-
-
-inline bool
-HtmlDisplay_Idl::IsModule( const ary::idl::CodeEntity & i_ce ) const
-{
- return ary::is_type<ary::idl::Module>(i_ce);
-}
-
-inline const ary::idl::Module &
-HtmlDisplay_Idl::Module_Cast( const ary::idl::CodeEntity & i_ce ) const
-{
- return ary::ary_cast<ary::idl::Module>(i_ce);
-}
-
-
-
-
-HtmlDisplay_Idl::HtmlDisplay_Idl()
- : pCurPageEnv(),
- pMainDisplay()
-{
-}
-
-HtmlDisplay_Idl::~HtmlDisplay_Idl()
-{
-}
-
-void
-HtmlDisplay_Idl::do_Run( const char * i_sOutputDirectory,
- const ary::idl::Gate & i_rAryGate,
- const display::CorporateFrame & i_rLayout )
-{
- SetRunData( i_sOutputDirectory, i_rAryGate, i_rLayout );
-
- Create_StartFile();
- Create_CssFile();
- Create_FilesInNameTree();
- Create_IndexFiles();
- Create_FilesInProjectTree();
- Create_PackageList();
- Create_HelpFile();
-}
-
-void
-HtmlDisplay_Idl::SetRunData( const char * i_sOutputDirectory,
- const ary::idl::Gate & i_rAryGate,
- const display::CorporateFrame & i_rLayout )
-{
- csv::ploc::Path aOutputDir( i_sOutputDirectory, true );
- pCurPageEnv = new HtmlEnvironment_Idl( aOutputDir, i_rAryGate, i_rLayout );
- pMainDisplay = new MainDisplay_Idl(*pCurPageEnv);
-}
-
-void
-HtmlDisplay_Idl::Create_StartFile()
-{
-}
-
-void
-HtmlDisplay_Idl::Create_FilesInNameTree()
-{
- Cout() << "\nCreate files in subtree namespaces ..." << Endl();
-
- const ary::idl::Module &
- rGlobalNamespace = pCurPageEnv->Data().GlobalNamespace();
- pCurPageEnv->Goto_Directory( pCurPageEnv->OutputTree().NamesRoot(), true );
-
- RecursiveDisplay_Module(rGlobalNamespace);
-
- Cout() << "... done." << Endl();
-}
-
-void
-HtmlDisplay_Idl::Create_IndexFiles()
-{
- Cout() << "\nCreate files in subtree index ..." << Endl();
- pCurPageEnv->Goto_Directory( pCurPageEnv->OutputTree().IndexRoot(), true );
- pMainDisplay->WriteGlobalIndices();
- Cout() << "... done.\n" << Endl();
-}
-
-typedef ary::Dyn_StdConstIterator<ary::idl::Ce_id> Dyn_CeIterator;
-typedef ary::StdConstIterator<ary::idl::Ce_id> CeIterator;
-
-void
-HtmlDisplay_Idl::RecursiveDisplay_Module( const ary::idl::Module & i_module )
-{
- i_module.Accept(*pMainDisplay);
-
- Dyn_CeIterator
- aMembers;
- i_module.Get_Names(aMembers);
-
- for ( CeIterator & iter = *aMembers;
- iter;
- ++iter )
- {
- const ary::idl::CodeEntity &
- rCe = pCurPageEnv->Data().Find_Ce(*iter);
-
- if ( NOT IsModule(rCe) )
- rCe.Accept(*pMainDisplay);
- else
- {
- pCurPageEnv->Goto_DirectoryLevelDown( rCe.LocalName(), true );
- RecursiveDisplay_Module( Module_Cast(rCe) );
- pCurPageEnv->Goto_DirectoryLevelUp();
- }
- } // end for
-}
-
-void
-HtmlDisplay_Idl::Create_FilesInProjectTree()
-{
-}
-
-void
-HtmlDisplay_Idl::Create_PackageList()
-{
-}
-
-void
-HtmlDisplay_Idl::Create_HelpFile()
-{
-}
-
-void
-HtmlDisplay_Idl::Create_CssFile()
-{
- Cout() << "\nCreate css file ..." << Endl();
-
- pCurPageEnv->Goto_Directory( pCurPageEnv->OutputTree().Root(), true );
- pCurPageEnv->Set_CurFile( C_sCssFilename_Idl );
-
- StreamLock
- slCurFilePath(700);
- pCurPageEnv->Get_CurFilePath(slCurFilePath());
-
- csv::File
- aCssFile(slCurFilePath().c_str(), csv::CFM_CREATE);
- csv::OpenCloseGuard
- aOpenGuard(aCssFile);
- if (NOT aOpenGuard)
- {
- Cerr() << "Can't create file " << slCurFilePath().c_str() << "." << Endl();
- return;
- }
-
- aCssFile.write("/* Autodoc css file for IDL documentation */\n\n\n");
- aCssFile.write(pCurPageEnv->Layout().CssStyle());
- aCssFile.write("\n\n\n");
- aCssFile.write(pCurPageEnv->Layout().CssStylesExplanation());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_env.cxx b/autodoc/source/display/idl/hi_env.cxx
deleted file mode 100644
index 668e8532..00000000
--- a/autodoc/source/display/idl/hi_env.cxx
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hi_env.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/ploc_dir.hxx>
-#include <cfrstd.hxx>
-#include <toolkit/out_tree.hxx>
-#include "hi_ary.hxx"
-#include "hi_linkhelper.hxx"
-
-
-
-const String C_s_index_files("index-files");
-
-const String C_sUseFileSuffix("-use.html");
-const String C_IndexA_FileName("index-1.html");
-
-
-HtmlEnvironment_Idl::HtmlEnvironment_Idl( const csv::ploc::Path & i_rOutputDir,
- const ary::idl::Gate & i_rGate,
- const display::CorporateFrame & i_rLayout )
- : aOutputRoot(i_rOutputDir),
- pData(new AryAccess(i_rGate)),
- pGate(&i_rGate),
- pOutputTree(new output::Tree),
- aCurPosition(pOutputTree->Root()),
- pCurPageCe(0),
- pLayout(&i_rLayout),
- pLinker()
-{
- StringVector aHelp;
- pOutputTree->Set_NamesRoot(aHelp);
-
- aHelp.push_back(output::IndexFilesDirName());
- pOutputTree->Set_IndexRoot(aHelp);
-
- (*aHelp.begin()) = String("com");
- aHelp.push_back(String("sun"));
- aHelp.push_back(String("star"));
- pOutputTree->Set_Overview(aHelp, output::ModuleFileName() );
-
- pLinker = new LinkHelper(*this);
-}
-
-HtmlEnvironment_Idl::~HtmlEnvironment_Idl()
-{
-}
-
-namespace
-{
-StringVector G_aChain;
-}
-
-void
-HtmlEnvironment_Idl::Goto_Directory( output::Position i_pos,
- bool i_bCreateDirectoryIfNecessary )
-{
- aCurPosition = i_pos;
- aCurPath = aOutputRoot.MyPath();
-
- aCurPosition.Get_Chain(G_aChain);
- for ( StringVector::const_iterator it = G_aChain.begin();
- it != G_aChain.end();
- ++it )
- {
- aCurPath.DirChain() += *it;
- }
-
- if (i_bCreateDirectoryIfNecessary)
- create_Directory(aCurPath);
-}
-
-void
-HtmlEnvironment_Idl::Goto_DirectoryLevelDown( const String & i_subDirName,
- bool i_bCreateDirectoryIfNecessary )
-{
- aCurPosition +=(i_subDirName);
-
- aCurPath.SetFile(String::Null_());
- aCurPath.DirChain() += i_subDirName;
-
- if (i_bCreateDirectoryIfNecessary)
- create_Directory(aCurPath);
-}
-
-void
-HtmlEnvironment_Idl::Goto_DirectoryLevelUp()
-{
- aCurPosition -= 1;
-
- aCurPath.SetFile(String::Null_());
- aCurPath.DirChain() -= 1;
-}
-
-void
-HtmlEnvironment_Idl::Set_CurFile( const String & i_fileName )
-{
- aCurPath.SetFile(i_fileName);
-}
-
-void
-HtmlEnvironment_Idl::create_Directory( const csv::ploc::Path & i_path )
-
-{
- csv::ploc::Directory aCurDir(i_path);
- if (NOT aCurDir.Exists())
- aCurDir.PhysicalCreate();
-}
-
-inline bool
-IsAbsoluteLink(const char * i_link)
-{
- const char
- shttp[] = "http://";
- const char
- sfile[] = "file://";
- const int
- csize = sizeof shttp - 1;
- csv_assert(csize == sizeof sfile - 1);
-
- return strncmp(i_link,shttp,csize) == 0
- OR strncmp(i_link,sfile,csize) == 0;
-}
-
-
-const char *
-HtmlEnvironment_Idl::Link2Manual( const String & i_link ) const
-{
- if ( IsAbsoluteLink(i_link.c_str()) )
- return i_link;
-
- static StreamStr aLink_(200);
- aLink_.reset();
- String
- sDvgRoot(pLayout->DevelopersGuideHtmlRoot());
- if (sDvgRoot.empty())
- sDvgRoot = "../DevelopersGuide";
-
- // KORR_FUTURE
- // Enhance performance by calculating this only one time:
- if ( NOT IsAbsoluteLink(sDvgRoot.c_str()) )
- aCurPosition.Get_LinkToRoot(aLink_);
- aLink_ << sDvgRoot
- << "/"
- << i_link;
- return aLink_.c_str();
-}
-
-String
-HtmlEnvironment_Idl::CurPageCe_AsText() const
-{
- return CurPageCe_AsFile(".html");
-}
-
-String
-HtmlEnvironment_Idl::CurPageCe_AsFile(const char * i_sEnding) const
-{
- if (pCurPageCe == 0)
- return String::Null_();
-
- static StringVector aModule_;
- String sCe;
- String sDummy;
- Data().Get_CeText(aModule_, sCe, sDummy, *pCurPageCe);
- StreamLock slCe(500);
- if (aModule_.size() > 0)
- slCe().operator_join(aModule_.begin(), aModule_.end(), "/");
- if (NOT sCe.empty())
- slCe() << "/" << sCe << i_sEnding;
- return String(slCe().c_str());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_env.hxx b/autodoc/source/display/idl/hi_env.hxx
deleted file mode 100644
index a081e07f..00000000
--- a/autodoc/source/display/idl/hi_env.hxx
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HI_ENV_HXX
-#define ADC_DISPLAY_HI_ENV_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/ploc.hxx>
-#include <cosv/ploc_dir.hxx>
- // PARAMETERS
-#include <toolkit/out_position.hxx>
-
-namespace ary
-{
-namespace idl
-{
- class Gate;
- class CodeEntity;
-}
-}
-namespace display
-{
- class CorporateFrame;
-}
-namespace output
-{
- class Tree;
-}
-
-class AryAccess;
-class LinkHelper;
-
-/** @resp
- Provides enviroment information to the HTML factory
- classes.
-
- @descr
- All information that is not included in the data, especially
- about the layout of the output tree and the access to
- information from the repository are provided here.
-
- @see HtmlFactory
-*/
-class HtmlEnvironment_Idl
-{
- public:
- // LIFECYCLE
- HtmlEnvironment_Idl(
- const csv::ploc::Path &
- io_rOutputDir,
- const ary::idl::Gate &
- i_rGate,
- const display::CorporateFrame &
- i_rLayout );
- ~HtmlEnvironment_Idl();
-
- // OPERATIONS
- void Goto_Directory(
- output::Position i_pos,
- bool i_bCreateDirectoryIfNecessary );
- void Goto_DirectoryLevelDown(
- const String & i_subDirName,
- bool i_bCreateDirectoryIfNecessary );
- void Goto_DirectoryLevelUp();
- void Set_CurFile(
- const String & i_fileName );
- void Set_CurPageCe(
- const ary::idl::CodeEntity *
- i_ce )
- { pCurPageCe = i_ce; }
- // INQUIRY
- const ary::idl::Gate &
- Gate() const { return *pGate; }
- const AryAccess & Data() const { return *pData; }
- const char * Link2Manual(
- const String & i_link ) const;
-
- /// This may be reimplemented for removing dead links to members.
- bool Is_MemberExistenceCheckRequired() const
- { return false; }
-
- /// @return Holds only the current directory, not the current file.
- output::Position & CurPosition() const { return aCurPosition; }
- void Get_CurFilePath(
- StreamStr & o_buffer ) const
- { o_buffer << aCurPath; }
-
- const display::CorporateFrame &
- Layout() const { return *pLayout; }
- const LinkHelper & Linker() const { return *pLinker; }
-
- void Get_LinkTo(
- StreamStr & o_result,
- output::Position i_destination )
- { CurPosition().Get_LinkTo(o_result, i_destination); }
- String CurPageCe_AsText() const;
- String CurPageCe_AsFile(
- const char * i_sEnding) const;
- const ary::idl::CodeEntity *
- CurPageCe() const { return pCurPageCe; }
-
- // ACCESS
- output::Tree & OutputTree() { return *pOutputTree; }
-
- private:
- // Local
- void create_Directory(
- const csv::ploc::Path &
- i_path );
-
- // DATA
- csv::ploc::Directory
- aOutputRoot;
- csv::ploc::Path aCurPath;
-
- Dyn<AryAccess> pData; /// @invariant *pData is valid.
- const ary::idl::Gate *
- pGate; /// @invariant pGate != 0.
- Dyn<output::Tree> pOutputTree; /// @invariant *pOutputTree is valid.
- mutable output::Position
- aCurPosition;
- const ary::idl::CodeEntity *
- pCurPageCe;
-
- const display::CorporateFrame *
- pLayout;
-
- Dyn<LinkHelper> pLinker;
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_factory.cxx b/autodoc/source/display/idl/hi_factory.cxx
deleted file mode 100644
index 1e9c091b..00000000
--- a/autodoc/source/display/idl/hi_factory.cxx
+++ /dev/null
@@ -1,323 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hi_factory.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_ce.hxx>
-#include <toolkit/hf_title.hxx>
-#include "hfi_doc.hxx"
-#include "hfi_navibar.hxx"
-#include "hfi_tag.hxx"
-#include "hfi_typetext.hxx"
-#include "hi_linkhelper.hxx"
-
-
-extern const String
- C_sCellStyle_SummaryLeft("imsum_left");
-extern const String
- C_sCellStyle_SummaryRight("imsum_right");
-extern const String
- C_sCellStyle_MDetail("imdetail");
-extern const String
- C_sMemberTitle("membertitle");
-
-
-namespace
-{
-
-const char C_sSpace[92] = " "
- " "
- " ";
-}
-
-
-void
-HtmlFactory_Idl::produce_SummaryDeclaration( Xml::Element & o_row,
- const client & i_ce ) const
-{
- produce_InternalLink(o_row, i_ce);
-}
-
-void
-HtmlFactory_Idl::produce_InternalLink( Xml::Element & o_screen,
- const client & i_ce ) const
-{
- StreamLock aLocalLink(100);
- aLocalLink() << "#" << i_ce.LocalName();
-
- o_screen
- >> *new Html::TableCell
- << new Html::ClassAttr( C_sCellStyle_SummaryLeft )
- >> *new Html::Link( aLocalLink().c_str() )
- << i_ce.LocalName();
-}
-
-void
-HtmlFactory_Idl::produce_ShortDoc( Xml::Element & o_screen,
- const client & i_ce ) const
-{
- Xml::Element &
- rDetailsRowCell = o_screen
- >> *new Html::TableCell
- << new Html::ClassAttr( C_sCellStyle_SummaryRight );
- HF_IdlShortDocu
- aLinkDoc(Env(), rDetailsRowCell);
- aLinkDoc.Produce_byData( i_ce );
-
- rDetailsRowCell << new Xml::XmlCode("&nbsp;");
-}
-
-// KORR_FUTURE: Does not belong here (implementation inheritance)!
-void
-HtmlFactory_Idl::produce_Bases( Xml::Element & o_screen,
- const client & i_ce,
- const String & i_sLabel ) const
-{
- ary::idl::Type_id nBaseT = baseOf(i_ce);
- if ( nBaseT.IsValid() )
- {
- HF_DocEntryList
- aDocList( o_screen );
- aDocList.Produce_Term(i_sLabel);
-
- int nDepth = 0;
- Xml::Element &
- rBaseList = aDocList.Produce_Definition()
- >> *new Xml::AnElement("pre")
- << new Xml::AnAttribute("style","font-family:monospace;");
- rBaseList
- >> *new Html::Strong
- << i_ce.LocalName();
- rBaseList
- << "\n";
- recursive_ShowBases( rBaseList,
- nBaseT,
- nDepth );
- }
-}
-
-void
-HtmlFactory_Idl::produce_Members( ce_list & it_list,
- const String & i_summaryTitle,
- const String & i_summaryLabel,
- const String & i_detailsTitle,
- const String & i_detailsLabel,
- const E_MemberViewType i_viewType ) const
-{
- csv_assert( it_list );
-
- Dyn< HF_SubTitleTable > pSummary;
- if ( ( i_viewType == viewtype_summary )
- || ( i_viewType == viewtype_complete )
- )
- {
- pSummary = new HF_SubTitleTable(
- CurOut(),
- i_summaryLabel,
- i_summaryTitle,
- 2 );
- }
-
- Dyn< HF_SubTitleTable > pDetails;
- if ( ( i_viewType == viewtype_details )
- || ( i_viewType == viewtype_complete )
- )
- {
- pDetails = new HF_SubTitleTable(
- CurOut(),
- i_detailsLabel,
- i_detailsTitle,
- 1 );
- }
-
- for ( ; it_list.operator bool(); ++it_list )
- {
- const ary::idl::CodeEntity &
- rCe = Env().Data().Find_Ce(*it_list);
-
- if ( pSummary )
- {
- Xml::Element &
- rSummaryRow = pSummary->Add_Row();
- produce_SummaryDeclaration(rSummaryRow, rCe);
-// produce_InternalLink(rSummaryRow, rCe);
- produce_ShortDoc(rSummaryRow, rCe);
- }
-
- if ( pDetails )
- produce_MemberDetails(*pDetails, rCe);
- }
-}
-
-void
-HtmlFactory_Idl::produce_Title( HF_TitleTable & o_title,
- const String & i_label,
- const client & i_ce ) const
-{
- StreamLock
- slAnnotations(200);
- get_Annotations(slAnnotations(), i_ce);
- StreamLock
- slTitle(200);
- slTitle() << i_label << " " << i_ce.LocalName();
- o_title.Produce_Title( slAnnotations().c_str(),
- slTitle().c_str() );
-}
-
-void
-HtmlFactory_Idl::get_Annotations( StreamStr & o_out,
- const client & i_ce ) const
-{
- const ary::doc::OldIdlDocu *
- doc = Get_IdlDocu(i_ce.Docu());
- if (doc != 0)
- {
- if (doc->IsDeprecated())
- o_out << "deprecated ";
- if (NOT doc->IsPublished())
- o_out << "unpublished ";
- }
-
- // KORR
- // Need to display "unpublished", if there is no docu.
-}
-
-void
-HtmlFactory_Idl::write_Docu( Xml::Element & o_screen,
- const client & i_ce ) const
-{
- const ary::doc::OldIdlDocu *
- doc = Get_IdlDocu(i_ce.Docu());
- if (doc != 0)
- {
- HF_DocEntryList
- aDocuList( o_screen );
- HF_IdlDocu
- aDocu( Env(), aDocuList );
- aDocu.Produce_fromCodeEntity(i_ce);
- }
-
- write_ManualLinks(o_screen, i_ce);
-}
-
-void
-HtmlFactory_Idl::write_ManualLinks( Xml::Element & o_screen,
- const client & i_ce ) const
-{
- const StringVector &
- rLinks2Descrs = i_ce.Secondaries().Links2DescriptionInManual();
- if ( rLinks2Descrs.size() == 0 )
- return;
-
- o_screen
- >> *new Html::Label(C_sLocalManualLinks.c_str()+1) // Leave out the leading '#'.
- << " ";
- HF_DocEntryList
- aDocuList( o_screen );
- aDocuList.Produce_Term("Developers Guide");
- csv_assert(rLinks2Descrs.size() % 2 == 0);
- for ( StringVector::const_iterator it = rLinks2Descrs.begin();
- it != rLinks2Descrs.end();
- ++it )
- {
- Xml::Element &
- rLink = aDocuList.Produce_Definition() >> *new Html::Link( Env().Link2Manual(*it));
- if ( (*(it+1)).empty() )
- // HACK KORR_FUTURE
- // Research what happens with manual links which contain normal characters
- // in non-utf-8 texts. And research, why utfF-8 does not work here.
- rLink << new Xml::XmlCode(*it);
- else
- rLink << new Xml::XmlCode( *(it+1) );
- ++it;
- } // end for
-}
-
-void
-HtmlFactory_Idl::produce_MemberDetails( HF_SubTitleTable & ,
- const client & ) const
-{
- // Dummy, which does not need to do anything.
-}
-
-void
-HtmlFactory_Idl::recursive_ShowBases( Xml::Element & o_screen,
- type_id i_baseType,
- int & io_nDepth ) const
-{
- // Show this base
- ++io_nDepth;
- const ary::idl::CodeEntity *
- pCe = Env().Linker().Search_CeFromType(i_baseType);
-
- csv_assert(io_nDepth > 0);
- if (io_nDepth > 30)
- io_nDepth = 30;
- o_screen
- << (C_sSpace + 93 - 3*io_nDepth)
- << new csi::xml::XmlCode("&#x2517")
- << " ";
-
- if (pCe == 0)
- {
- HF_IdlTypeText
- aText( Env(), o_screen, false );
- aText.Produce_byData( i_baseType );
- o_screen
- << "\n";
- --io_nDepth;
- return;
- }
-
- HF_IdlTypeText
- aBaseLink( Env(), o_screen, true );
- aBaseLink.Produce_byData(pCe->CeId());
- o_screen
- << "\n";
-
- // Bases
- ary::idl::Type_id
- nBaseT = baseOf(*pCe);
- if (nBaseT.IsValid())
- recursive_ShowBases(o_screen,nBaseT,io_nDepth);
-
- --io_nDepth;
- return;
-}
-
-HtmlFactory_Idl::type_id
-HtmlFactory_Idl::inq_BaseOf( const client & ) const
-{
- // Unused dummy.
- return type_id(0);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_factory.hxx b/autodoc/source/display/idl/hi_factory.hxx
deleted file mode 100644
index 2ff41228..00000000
--- a/autodoc/source/display/idl/hi_factory.hxx
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HI_FACTORY_HXX
-#define ADC_DISPLAY_HI_FACTORY_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <toolkit/htmlfactory.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/stdconstiter.hxx>
-#include <ary/idl/i_types4idl.hxx>
-#include <toolkit/out_position.hxx>
-
-
-namespace ary
-{
-namespace idl
-{
- class Module;
-}
-namespace doc
-{
- class OldIdlDocu;
-}
-}
-
-
-class HtmlEnvironment_Idl;
-class LinkHelper;
-class HF_NaviSubRow;
-class HF_TitleTable;
-class HF_SubTitleTable;
-
-
-class HtmlFactory_Idl : public HtmlFactory<HtmlEnvironment_Idl>
-{
- public:
- enum E_MemberViewType
- {
- viewtype_summary, // the summary of the members
- viewtype_details, // the details of the members
- viewtype_complete // everything
- };
-
- enum E_DocType
- {
- doctype_summaryOnly, // only the summary
- doctype_complete // the complete documentation
- };
-
- public:
- typedef ary::idl::CodeEntity client;
- typedef ary::idl::Ce_id ce_id;
- typedef ary::idl::Type_id type_id;
- typedef ary::doc::OldIdlDocu ce_info;
-
- typedef ary::Dyn_StdConstIterator<ce_id> dyn_ce_list;
- typedef ary::Dyn_StdConstIterator<type_id> dyn_type_list;
- typedef ary::StdConstIterator<ce_id> ce_list;
- typedef ary::StdConstIterator<type_id> type_list;
-
- typedef HtmlEnvironment_Idl Environment;
- typedef output::Position OutPosition;
-
- protected:
- HtmlFactory_Idl(
- Environment & io_rEnv,
- Xml::Element * o_pOut = 0 )
- : HtmlFactory<Environment>(io_rEnv, o_pOut)
- { }
- virtual ~HtmlFactory_Idl() {}
-
- /** The default version only calls ->produce_InternalLink().
- This may be overwritten by derived classes.
- */
- virtual void produce_SummaryDeclaration(
- Xml::Element & o_row,
- const client & i_ce ) const;
- void produce_InternalLink(
- Xml::Element & o_row,
- const client & i_ce ) const;
- void produce_ShortDoc(
- Xml::Element & o_row,
- const client & i_ce ) const;
-
- // KORR_FUTURE: Does not belong here (implementation inheritance)!
- void produce_Bases(
- Xml::Element & o_screen,
- const client & i_ce,
- const String & i_sLabel ) const;
- void produce_Members(
- ce_list & it_list,
- const String & i_summaryTitle,
- const String & i_summaryLabel,
- const String & i_detailsTitle,
- const String & i_detailsLabel,
- const E_MemberViewType i_viewType = viewtype_complete ) const;
-
- void produce_Title(
- HF_TitleTable & o_title,
- const String & i_label,
- const client & i_ce ) const;
- void get_Annotations(
- StreamStr & o_out,
- const client & i_ce ) const;
-
- /// Writes complete docu in standard format.
- void write_Docu(
- Xml::Element & o_screen,
- const client & i_ce ) const;
-
- void write_ManualLinks(
- Xml::Element & o_screen,
- const client & i_ce ) const;
- private:
- // Dummy does nothing
- virtual void produce_MemberDetails(
- HF_SubTitleTable & o_table,
- const client & i_ce ) const;
- void recursive_ShowBases(
- Xml::Element & o_screen,
- type_id i_baseType,
- int & io_nDepth ) const;
- type_id baseOf(
- const client & i_ce ) const
- { return inq_BaseOf(i_ce); }
- virtual type_id inq_BaseOf(
- const client & i_ce ) const;
-};
-
-
-extern const String
- C_sCellStyle_SummaryLeft;
-extern const String
- C_sCellStyle_SummaryRight;
-extern const String
- C_sCellStyle_MDetail;
-extern const String
- C_sMemberTitle;
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_linkhelper.cxx b/autodoc/source/display/idl/hi_linkhelper.cxx
deleted file mode 100644
index 4d5f5d9d..00000000
--- a/autodoc/source/display/idl/hi_linkhelper.cxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hi_linkhelper.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_module.hxx>
-
-
-
-
-const ary::idl::Module *
-LinkHelper::Search_CurModule() const
-{
- return Search_Module( rEnv.CurPosition().RelatedNode() );
-}
-
-const ary::idl::Module *
-LinkHelper::Search_Module( output::Node & i_node ) const
-{
- static StringVector aNames_;
-
- output::Node::relative_id
- nId = i_node.RelatedNameRoom();
- if (nId == 0)
- {
- csv::erase_container(aNames_);
- i_node.Get_Chain(aNames_);
- const ary::idl::Module * pModule =
- rEnv.Data().Search_Module(aNames_);
- if ( pModule == 0 )
- return 0;
- nId = static_cast<output::Node::relative_id>(pModule->Id());
- rEnv.CurPosition().RelatedNode().Set_RelatedNameRoom(nId);
- }
-
- return & rEnv.Data().Find_Module( ary::idl::Ce_id(nId) );
-}
-
-namespace
-{
- const String C_sXrefsSuffix("-xref");
-}
-
-
-LinkHelper::OutPosition
-LinkHelper::PositionOf_CurXRefs( const String & i_ceName ) const
-{
- StreamLock sl(100);
- return OutPosition( rEnv.CurPosition(),
- sl() << i_ceName
- << C_sXrefsSuffix
- << ".html"
- << c_str );
-}
-
-const String &
-LinkHelper::XrefsSuffix() const
-{
- return C_sXrefsSuffix;
-}
-
-
-String
-nameChainLinker( const char * )
-{
- static const String
- sModuleFileName_( output::ModuleFileName() );
- return sModuleFileName_;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_linkhelper.hxx b/autodoc/source/display/idl/hi_linkhelper.hxx
deleted file mode 100644
index 1cdfaa7d..00000000
--- a/autodoc/source/display/idl/hi_linkhelper.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HI_LINKHELPER_HXX
-#define ADC_DISPLAY_HI_LINKHELPER_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include "hi_ary.hxx"
-#include "hi_env.hxx"
-#include <toolkit/out_position.hxx>
-#include <toolkit/out_tree.hxx>
-
-
-class LinkHelper
-{
- public:
- typedef ary::idl::CodeEntity CE;
- typedef output::Position OutPosition;
-
- LinkHelper(
- HtmlEnvironment_Idl &
- io_rEnv )
- : rEnv(io_rEnv) {}
-
- OutPosition PositionOf_CurModule() const
- { return OutPosition( rEnv.CurPosition(),
- output::ModuleFileName()); }
-
- OutPosition PositionOf_CurXRefs(
- const String & i_ceName) const;
- OutPosition PositionOf_Index() const
- { OutPosition ret1 = rEnv.OutputTree().IndexRoot();
- return OutPosition( ret1, String(output::IndexFile_A()) ); }
-
-
- const ary::idl::Module *
- Search_CurModule() const;
- const ary::idl::Module *
- Search_Module(
- output::Node & i_node ) const;
-
- const CE * Search_CeFromType(
- ary::idl::Type_id i_type ) const;
-
- void Get_Link2Position(
- StreamStr & o_link,
- OutPosition & i_pos ) const
- { rEnv.CurPosition().Get_LinkTo(o_link, i_pos); }
-
- void Get_Link2Member(
- StreamStr & o_link,
- OutPosition & i_ownerPos,
- const String & i_memberName ) const
- { Get_Link2Position(o_link, i_ownerPos);
- o_link << "#" << i_memberName; }
- const String & XrefsSuffix() const;
-
- private:
- HtmlEnvironment_Idl & rEnv;
-};
-
-inline const ary::idl::CodeEntity *
-LinkHelper::Search_CeFromType( ary::idl::Type_id i_type ) const
-{
- ary::idl::Ce_id nCe = rEnv.Data().CeFromType(i_type);
- if (nCe.IsValid())
- return &rEnv.Data().Find_Ce(nCe);
- return 0;
-}
-
-
-
-String nameChainLinker(
- const char * i_levelName );
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_main.cxx b/autodoc/source/display/idl/hi_main.cxx
deleted file mode 100644
index 4217c93b..00000000
--- a/autodoc/source/display/idl/hi_main.cxx
+++ /dev/null
@@ -1,766 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "hi_main.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <algorithm>
-#include <cosv/ploc.hxx>
-#include <cosv/file.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/ik_ce.hxx>
-#include <ary/idl/ik_enum.hxx>
-#include <ary/idl/ik_typedef.hxx>
-#include <ary/idl/ik_interface.hxx>
-#include <ary/idl/ik_struct.hxx>
-#include <ary/idl/ik_exception.hxx>
-#include <ary/idl/i_constant.hxx>
-#include <ary/idl/i_constgroup.hxx>
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/i_singleton.hxx>
-#include <ary/idl/i_sisingleton.hxx>
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/i_interface.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/i_siservice.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/i_typedef.hxx>
-#include <ary/idl/i_module.hxx>
-#include <cfrstd.hxx>
-#include <toolkit/htmlfile.hxx>
-#include <toolkit/out_position.hxx>
-#include <toolkit/out_tree.hxx>
-#include "hfi_constgroup.hxx"
-#include "hfi_enum.hxx"
-#include "hfi_globalindex.hxx"
-#include "hfi_interface.hxx"
-#include "hfi_module.hxx"
-#include "hfi_struct.hxx"
-#include "hfi_service.hxx"
-#include "hfi_singleton.hxx"
-#include "hfi_siservice.hxx"
-#include "hfi_typedef.hxx"
-#include "hfi_xrefpage.hxx"
-#include "hi_env.hxx"
-#include "hi_linkhelper.hxx"
-
-
-using ::ary::idl::Ce_id;
-using ::ary::idl::Type_id;
-using ::ary::idl::ifc_ce::Dyn_CeIterator;
-
-
-
-extern const String C_sCssFilename_Idl("idl.css");
-
-/*
-typedef ::ary::Dyn_StdConstIterator< ::ary::idl::CommentedRelation>
- Dyn_ComRefIterator;
-namespace read_module = ::ary::idl::ifc_module;
-namespace read_interface = ::ary::idl::ifc_interface;
-namespace read_service = ::ary::idl::ifc_service;
-namespace read_struct = ::ary::idl::ifc_struct;
-namespace read_exception = ::ary::idl::ifc_exception;
-namespace read_enum = ::ary::idl::ifc_enum;
-namespace read_typedef = ::ary::idl::ifc_typedef;
-namespace read_constgroup = ::ary::idl::ifc_constantsgroup;
-*/
-
-namespace
-{
-
-/** @resp
- Inits (constructor) and creates (destructor) the current
- html documentation file ( MainDisplay_Idl.pMyFile ).
-*/
-class Guard_CurFile
-{
- public:
- Guard_CurFile( /// For CodeEntities
- DocuFile_Html & io_client,
- HtmlEnvironment_Idl &
- io_env,
- const ary::idl::CodeEntity &
- i_ce,
- const String & i_titlePrefix );
- Guard_CurFile( /// For Use pages
- DocuFile_Html & io_client,
- HtmlEnvironment_Idl &
- io_env,
- const String & i_fileName,
- const String & i_titlePrefix );
- Guard_CurFile( /// For Modules
- DocuFile_Html & io_client,
- HtmlEnvironment_Idl &
- io_env,
- const ary::idl::CodeEntity &
- i_ce );
- Guard_CurFile( /// For Indices
- DocuFile_Html & io_client,
- HtmlEnvironment_Idl &
- io_env,
- char i_letter );
- ~Guard_CurFile();
- private:
- DocuFile_Html & rClient;
- HtmlEnvironment_Idl &
- rEnv;
-
-};
-
-/** @resp
- Sets and releases the current factory pointer
- ( MainDisplay_Idl.pCurFactory ).
-*/
-class Guard_CurFactoryPtr
-{
- public:
- Guard_CurFactoryPtr(
- HtmlFactory_Idl *& io_client,
- HtmlFactory_Idl & i_factory )
- : rpClient(io_client)
- { rpClient = &i_factory; }
-
- ~Guard_CurFactoryPtr()
- { rpClient = 0; }
-
- private:
- HtmlFactory_Idl *& rpClient;
-
-};
-
-
-Guard_CurFile::Guard_CurFile( DocuFile_Html & io_client,
- HtmlEnvironment_Idl & io_env,
- const ary::idl::CodeEntity & i_ce,
- const String & i_titlePrefix )
- : rClient(io_client),
- rEnv(io_env)
-{ // For Ces
- StreamLock sl(300);
- io_env.Set_CurFile( sl() << i_ce.LocalName()
- << ".html"
- << c_str );
- StreamLock aCurFilePath(700);
- io_env.Get_CurFilePath(aCurFilePath());
-
- rClient.EmptyBody();
- csv::ploc::Path
- aLocation(aCurFilePath().c_str());
- rClient.SetLocation(aLocation);
- sl().reset();
- rClient.SetTitle( sl() << i_titlePrefix
- << " "
- << i_ce.LocalName()
- << c_str );
- sl().reset();
- rClient.SetRelativeCssPath(
- sl() << io_env.CurPosition().LinkToRoot()
- << C_sCssFilename_Idl
- << c_str );
-
- io_env.Set_CurPageCe(&i_ce);
-}
-
-Guard_CurFile::Guard_CurFile( DocuFile_Html & io_client,
- HtmlEnvironment_Idl & io_env,
- const String & i_fileName,
- const String & i_titlePrefix )
- : rClient(io_client),
- rEnv(io_env)
-{ // For Use pages
- StreamLock sl(300);
- io_env.Set_CurFile( sl() << i_fileName
- << ".html"
- << c_str );
- StreamLock aCurFilePath(700);
- io_env.Get_CurFilePath(aCurFilePath());
- csv::ploc::Path
- aLocation(aCurFilePath().c_str());
-
- rClient.EmptyBody();
- rClient.SetLocation(aLocation);
- sl().reset();
- rClient.SetTitle( sl() << i_titlePrefix << " " << i_fileName << c_str );
- sl().reset();
- rClient.SetRelativeCssPath(
- sl() << io_env.CurPosition().LinkToRoot()
- << C_sCssFilename_Idl
- << c_str );
-
- io_env.Set_CurPageCe(0);
-}
-
-Guard_CurFile::Guard_CurFile( DocuFile_Html & io_client,
- HtmlEnvironment_Idl & io_env,
- const ary::idl::CodeEntity & i_ce )
- : rClient(io_client),
- rEnv(io_env)
-{ // For Modules
- io_env.Set_CurFile( output::ModuleFileName() );
- StreamLock aCurFilePath(700);
- io_env.Get_CurFilePath(aCurFilePath());
- csv::ploc::Path
- aLocation(aCurFilePath().c_str());
-
- rClient.EmptyBody();
- rClient.SetLocation(aLocation);
- StreamLock sl(300);
- rClient.SetTitle( sl() << "Module " << io_env.CurPosition().Name() << c_str );
- sl().reset();
- rClient.SetRelativeCssPath(
- sl() << io_env.CurPosition().LinkToRoot()
- << C_sCssFilename_Idl
- << c_str );
-
- io_env.Set_CurPageCe(&i_ce);
-}
-
-Guard_CurFile::Guard_CurFile( DocuFile_Html & io_client,
- HtmlEnvironment_Idl & io_env,
- char i_letter )
- : rClient(io_client),
- rEnv(io_env)
-{ // For Index pages
- StreamLock sl(300);
- io_env.Set_CurFile( sl() << "index-"
- << ( i_letter != '_'
- ? int(i_letter)-'a'+1
- : 27 )
- << ".html"
- << c_str );
- StreamLock aCurFilePath(700);
- io_env.Get_CurFilePath(aCurFilePath());
- csv::ploc::Path
- aLocation(aCurFilePath().c_str());
-
- rClient.EmptyBody();
- rClient.SetLocation(aLocation);
- sl().reset();
- rClient.SetTitle( sl() << "Global Index "
- << ( i_letter != '_'
- ? char(i_letter-'a'+'A')
- : '_' )
- << c_str );
- sl().reset();
- rClient.SetRelativeCssPath(
- sl() << "../"
- << C_sCssFilename_Idl
- << c_str );
-}
-
-Guard_CurFile::~Guard_CurFile()
-{
- rClient.CreateFile();
- rEnv.Set_CurPageCe(0);
-}
-
-
-} // anonymous namespace
-
-
-
-
-MainDisplay_Idl::MainDisplay_Idl( HtmlEnvironment_Idl & io_rEnv )
- : pEnv(&io_rEnv),
- pMyFile(new DocuFile_Html),
- pCurFactory(0)
-{
-// pMyFile->SetStyle( Env().Layout().CssStyle() );
- pMyFile->SetCopyright( Env().Layout().CopyrightText() );
-}
-
-MainDisplay_Idl::~MainDisplay_Idl()
-{
-}
-
-
-void
-MainDisplay_Idl::WriteGlobalIndices()
-{
- for ( const char * pLetter = "abcdefghijklmnopqrstuvwxyz_X"; *pLetter != 'X'; ++pLetter )
- {
- Guard_CurFile gFile( *pMyFile, Env(), *pLetter );
-
- HF_IdlGlobalIndex aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_Page( ary::idl::alphabetical_index::E_Letter(*pLetter) );
- } // end for
-}
-
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Module & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce );
- HF_IdlModule aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Interface & i_ce )
-{
- do_InterfaceDescr(i_ce);
- do_Interface2s(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Service & i_ce )
-{
- do_ServiceDescr(i_ce);
- do_Service2s(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::SglIfcService & i_ce )
-{
- do_SglIfcServiceDescr(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Struct & i_ce )
-{
- do_StructDescr(i_ce);
- do_Struct2s(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Exception & i_ce )
-{
- do_ExceptionDescr(i_ce);
- do_Exception2s(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Enum & i_ce )
-{
- do_EnumDescr(i_ce);
- do_Enum2s(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Typedef & i_ce )
-{
- do_TypedefDescr(i_ce);
- do_Typedef2s(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::ConstantsGroup & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Constants' Group" );
- HF_IdlConstGroup aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::Singleton & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Singleton" );
- HF_IdlSingleton aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData_ServiceBased(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Process( const ary::idl::SglIfcSingleton & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Singleton" );
- HF_IdlSingleton aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData_InterfaceBased(i_ce);
-}
-
-void
-MainDisplay_Idl::do_InterfaceDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Interface" );
- HF_IdlInterface aInterface( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aInterface);
-
- aInterface.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_ServiceDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Service" );
- HF_IdlService aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_SglIfcServiceDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Service" );
- HF_IdlSglIfcService aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_StructDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Struct" );
- HF_IdlStruct aFactory( *pEnv, pMyFile->Body(), false );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_ExceptionDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Exception" );
- HF_IdlStruct aFactory( *pEnv, pMyFile->Body(), true );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_EnumDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Enum" );
- HF_IdlEnum aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_TypedefDescr( const ary::idl::CodeEntity & i_ce )
-{
- Guard_CurFile gFile( *pMyFile,
- Env(),
- i_ce,
- "Typedef" );
- HF_IdlTypedef aFactory( *pEnv, pMyFile->Body() );
- Guard_CurFactoryPtr gFactory(pCurFactory,aFactory);
-
- aFactory.Produce_byData(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Interface2s( const ary::idl::CodeEntity & i_ce )
-{
- StreamLock sl(100);
- String sUsesFileName(
- sl()
- << i_ce.LocalName()
- << Env().Linker().XrefsSuffix()
- << c_str );
- Guard_CurFile gFile( *pMyFile,
- Env(),
- sUsesFileName,
- "Uses of Interface" );
- HF_IdlXrefs aUses( *pEnv,
- pMyFile->Body(),
- C_sCePrefix_Interface,
- i_ce );
-
-
- aUses.Produce_Tree(
- "Derived Interfaces",
- "#Deriveds",
- i_ce,
- &ary::idl::ifc_interface::xref::Get_Derivations );
-
- Dyn_CeIterator pXrefList;
-
- ary::idl::ifc_interface::xref::Get_SynonymTypedefs(pXrefList,i_ce);
- aUses.Produce_List(
- "Synonym Typedefs",
- "#Synonyms",
- *pXrefList );
- ary::idl::ifc_interface::xref::Get_ExportingServices(pXrefList,i_ce);
- aUses.Produce_List(
- "Services which Support this Interface",
- "#SupportingServices",
- *pXrefList );
- ary::idl::ifc_interface::xref::Get_ExportingSingletons(pXrefList,i_ce);
- aUses.Produce_List(
- "Singletons which Support this Interface",
- "#SupportingSingletons",
- *pXrefList );
- ary::idl::ifc_interface::xref::Get_AsReturns(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Return Type",
- "#Returns",
- *pXrefList );
- ary::idl::ifc_interface::xref::Get_AsParameters(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Parameter",
- "#Parameters",
- *pXrefList );
- ary::idl::ifc_interface::xref::Get_AsDataTypes(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Data Type",
- "#DataTypes",
- *pXrefList );
- aUses.Write_ManualLinks(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Service2s( const ary::idl::CodeEntity & i_ce )
-{
- StreamLock sl(100);
- String sUsesFileName(
- sl()
- << i_ce.LocalName()
- << Env().Linker().XrefsSuffix()
- << c_str );
- Guard_CurFile gFile( *pMyFile,
- Env(),
- sUsesFileName,
- "Uses of Service" );
- HF_IdlXrefs aUses( *pEnv,
- pMyFile->Body(),
- C_sCePrefix_Service,
- i_ce );
- Dyn_CeIterator pXrefList;
- ary::idl::ifc_service::xref::Get_IncludingServices(pXrefList,i_ce);
- aUses.Produce_List(
- "Services which Include this Service",
- "#IncludingServices",
- *pXrefList );
-
- ary::idl::ifc_service::xref::Get_InstantiatingSingletons(pXrefList,i_ce);
- aUses.Produce_List(
- "Singletons which Instantiate this Service",
- "#Singletons",
- *pXrefList );
- aUses.Write_ManualLinks(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Struct2s( const ary::idl::CodeEntity & i_ce )
-{
- StreamLock sl(100);
- String sUsesFileName(
- sl()
- << i_ce.LocalName()
- << Env().Linker().XrefsSuffix()
- << c_str );
- Guard_CurFile gFile( *pMyFile,
- Env(),
- sUsesFileName,
- "Uses of Struct" );
- HF_IdlXrefs aUses( *pEnv,
- pMyFile->Body(),
- C_sCePrefix_Struct,
- i_ce );
-
- aUses.Produce_Tree(
- "Derived Structs",
- "#Deriveds",
- i_ce,
- &ary::idl::ifc_struct::xref::Get_Derivations );
-
- Dyn_CeIterator pXrefList;
-
- ary::idl::ifc_struct::xref::Get_SynonymTypedefs(pXrefList,i_ce);
- aUses.Produce_List(
- "Synonym Typedefs",
- "#Synonyms",
- *pXrefList );
- ary::idl::ifc_struct::xref::Get_AsReturns(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Return Type",
- "#Returns",
- *pXrefList );
- ary::idl::ifc_struct::xref::Get_AsParameters(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Parameter",
- "#Parameters",
- *pXrefList );
- ary::idl::ifc_struct::xref::Get_AsDataTypes(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Data Type",
- "#DataTypes",
- *pXrefList );
- aUses.Write_ManualLinks(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Exception2s( const ary::idl::CodeEntity & i_ce )
-{
- StreamLock sl(100);
- String sUsesFileName(
- sl()
- << i_ce.LocalName()
- << Env().Linker().XrefsSuffix()
- << c_str );
- Guard_CurFile gFile( *pMyFile,
- Env(),
- sUsesFileName,
- "Uses of Exception" );
- HF_IdlXrefs aUses( *pEnv,
- pMyFile->Body(),
- C_sCePrefix_Exception,
- i_ce );
-
- aUses.Produce_Tree(
- "Derived Exceptions",
- "#Deriveds",
- i_ce,
- &ary::idl::ifc_exception::xref::Get_Derivations );
-
- Dyn_CeIterator pXrefList;
-
- ary::idl::ifc_exception::xref::Get_RaisingFunctions(pXrefList,i_ce);
- aUses.Produce_List(
- "Raising Functions",
- "#Raisers",
- *pXrefList );
- aUses.Write_ManualLinks(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Enum2s( const ary::idl::CodeEntity & i_ce )
-{
- StreamLock sl(100);
- String sUsesFileName(
- sl()
- << i_ce.LocalName()
- << Env().Linker().XrefsSuffix()
- << c_str );
- Guard_CurFile gFile( *pMyFile,
- Env(),
- sUsesFileName,
- "Uses of Enum" );
- HF_IdlXrefs aUses( *pEnv,
- pMyFile->Body(),
- C_sCePrefix_Enum,
- i_ce );
- Dyn_CeIterator pXrefList;
- ary::idl::ifc_enum::xref::Get_SynonymTypedefs(pXrefList,i_ce);
- aUses.Produce_List(
- "Synonym Typedefs",
- "#Synonyms",
- *pXrefList );
- ary::idl::ifc_enum::xref::Get_AsReturns(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Return Type",
- "#Returns",
- *pXrefList );
- ary::idl::ifc_enum::xref::Get_AsParameters(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Parameter",
- "#Parameters",
- *pXrefList );
- ary::idl::ifc_enum::xref::Get_AsDataTypes(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Data Type",
- "#DataTypes",
- *pXrefList );
- aUses.Write_ManualLinks(i_ce);
-}
-
-void
-MainDisplay_Idl::do_Typedef2s( const ary::idl::CodeEntity & i_ce )
-{
- StreamLock sl(100);
- String sUsesFileName(
- sl() << i_ce.LocalName()
- << Env().Linker().XrefsSuffix()
- << c_str );
- Guard_CurFile gFile( *pMyFile,
- Env(),
- sUsesFileName,
- "Uses of Typedef" );
- HF_IdlXrefs aUses( *pEnv,
- pMyFile->Body(),
- C_sCePrefix_Typedef,
- i_ce );
- Dyn_CeIterator pXrefList;
- ary::idl::ifc_typedef::xref::Get_SynonymTypedefs(pXrefList,i_ce);
- aUses.Produce_List(
- "Synonym Typedefs",
- "#Synonyms",
- *pXrefList );
- ary::idl::ifc_typedef::xref::Get_AsReturns(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Return Type",
- "#Returns",
- *pXrefList );
- ary::idl::ifc_typedef::xref::Get_AsParameters(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Parameter",
- "#Parameters",
- *pXrefList );
- ary::idl::ifc_typedef::xref::Get_AsDataTypes(pXrefList,i_ce);
- aUses.Produce_List(
- "Uses as Data Type",
- "#DataTypes",
- *pXrefList );
- aUses.Write_ManualLinks(i_ce);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/hi_main.hxx b/autodoc/source/display/idl/hi_main.hxx
deleted file mode 100644
index 2e52def8..00000000
--- a/autodoc/source/display/idl/hi_main.hxx
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HFIDMAIN_HXX
-#define ADC_DISPLAY_HFIDMAIN_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/tpl/processor.hxx>
- // COMPONENTS
-#include "hi_factory.hxx"
- // PARAMETERS
-
-
-class HtmlEnvironment_Idl;
-class HtmlFactory_Idl;
-class DocuFile_Html;
-
-namespace ary
-{
-namespace idl
-{
-
- class Module;
- class Service;
- class SglIfcService;
- class Interface;
- class Struct;
- class Exception;
- class Enum;
- class Typedef;
- class ConstantsGroup;
- class Singleton;
- class SglIfcSingleton;
-
-} // namespace idl
-} // namespace ary
-
-
-class MainDisplay_Idl : public csv::ProcessorIfc,
- public csv::ConstProcessor<ary::idl::Module>,
- public csv::ConstProcessor<ary::idl::Service>,
- public csv::ConstProcessor<ary::idl::SglIfcService>,
- public csv::ConstProcessor<ary::idl::Interface>,
- public csv::ConstProcessor<ary::idl::Struct>,
- public csv::ConstProcessor<ary::idl::Exception>,
- public csv::ConstProcessor<ary::idl::Enum>,
- public csv::ConstProcessor<ary::idl::Typedef>,
- public csv::ConstProcessor<ary::idl::ConstantsGroup>,
- public csv::ConstProcessor<ary::idl::Singleton>,
- public csv::ConstProcessor<ary::idl::SglIfcSingleton>
-{
- public:
- MainDisplay_Idl(
- HtmlEnvironment_Idl &
- io_rEnv );
- virtual ~MainDisplay_Idl();
-
- void WriteGlobalIndices();
-
- void Display_NamedEntityHierarchy();
-
- private:
- // Interface csv::ProcessorIfc:
- virtual void do_Process(
- const ary::idl::Module & i_client );
- virtual void do_Process(
- const ary::idl::Service & i_client );
- virtual void do_Process(
- const ary::idl::SglIfcService &
- i_client );
- virtual void do_Process(
- const ary::idl::Interface & i_client );
- virtual void do_Process(
- const ary::idl::Struct & i_client );
- virtual void do_Process(
- const ary::idl::Exception & i_client );
- virtual void do_Process(
- const ary::idl::Enum & i_client );
- virtual void do_Process(
- const ary::idl::Typedef & i_client );
- virtual void do_Process(
- const ary::idl::ConstantsGroup &
- i_client );
- virtual void do_Process(
- const ary::idl::Singleton & i_client );
- virtual void do_Process(
- const ary::idl::SglIfcSingleton &
- i_client );
- // Locals
- void do_ServiceDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_SglIfcServiceDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_InterfaceDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_StructDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_ExceptionDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_EnumDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_TypedefDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_SingletonDescr(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Service2s(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Interface2s(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Struct2s(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Exception2s(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Enum2s(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Typedef2s(
- const ary::idl::CodeEntity &
- i_rData );
- void do_Singleton2s(
- const ary::idl::CodeEntity &
- i_rData );
-
- const HtmlEnvironment_Idl &
- Env() const { return *pEnv; }
- HtmlEnvironment_Idl &
- Env() { return *pEnv; }
- Xml::Element & CurHtmlOut() { return pCurFactory->CurOut(); }
-
- // DATA
- HtmlEnvironment_Idl *
- pEnv;
- Dyn<DocuFile_Html> pMyFile;
- HtmlFactory_Idl * pCurFactory;
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/idl/makefile.mk b/autodoc/source/display/idl/makefile.mk
deleted file mode 100644
index 383983a1..00000000
--- a/autodoc/source/display/idl/makefile.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=display_idl
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/hfi_constgroup.obj \
- $(OBJ)$/hfi_doc.obj \
- $(OBJ)$/hfi_enum.obj \
- $(OBJ)$/hfi_globalindex.obj \
- $(OBJ)$/hfi_hierarchy.obj \
- $(OBJ)$/hfi_interface.obj \
- $(OBJ)$/hfi_method.obj \
- $(OBJ)$/hfi_module.obj \
- $(OBJ)$/hfi_navibar.obj \
- $(OBJ)$/hfi_property.obj \
- $(OBJ)$/hfi_service.obj \
- $(OBJ)$/hfi_singleton.obj \
- $(OBJ)$/hfi_siservice.obj \
- $(OBJ)$/hfi_struct.obj \
- $(OBJ)$/hfi_tag.obj \
- $(OBJ)$/hfi_typedef.obj \
- $(OBJ)$/hfi_typetext.obj \
- $(OBJ)$/hfi_xrefpage.obj \
- $(OBJ)$/hi_ary.obj \
- $(OBJ)$/hi_display.obj \
- $(OBJ)$/hi_env.obj \
- $(OBJ)$/hi_factory.obj \
- $(OBJ)$/hi_linkhelper.obj \
- $(OBJ)$/hi_main.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/display/inc/cfrstd.hxx b/autodoc/source/display/inc/cfrstd.hxx
deleted file mode 100644
index e2e0cd87..00000000
--- a/autodoc/source/display/inc/cfrstd.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CFRSTD_HXX
-#define ADC_CFRSTD_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <display/corframe.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-
-class StdFrame : public display::CorporateFrame
-{
- public:
- // LIFECYCLE
- StdFrame();
-
- // INQUIRY
- virtual DYN Html_Image *
- LogoSrc() const;
- virtual const char *
- LogoLink() const;
- virtual const char *
- CopyrightText() const;
- virtual const char *
- CssStyle() const;
- virtual const char *
- CssStylesExplanation() const;
- virtual const char *
- DevelopersGuideHtmlRoot() const;
- virtual bool SimpleLinks() const;
-
- // ACCESS
- virtual void Set_DevelopersGuideHtmlRoot(
- const String & i_directory );
- virtual void Set_SimpleLinks();
-
- private:
- String sDevelopersGuideHtmlRoot;
- bool bSimpleLinks;
-};
-
-
-
-// IMPLEMENTATION
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/html/chd_udk2.hxx b/autodoc/source/display/inc/html/chd_udk2.hxx
deleted file mode 100644
index c7f0e50f..00000000
--- a/autodoc/source/display/inc/html/chd_udk2.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTML_CHD_UDK2_HXX
-#define ADC_DISPLAY_HTML_CHD_UDK2_HXX
-
-// BASE CLASSES
-#include <autodoc/dsp_html_std.hxx>
-// USED SERVICES
-#include <cosv/ploc.hxx>
-
-namespace ary
-{
-namespace cpp
-{
- class Namespace;
- class Gate;
-}
-}
-
-class OuputPage_Environment;
-
-
-
-
-class CppHtmlDisplay_Udk2 : public autodoc::HtmlDisplay_UdkStd
-{
- public:
- CppHtmlDisplay_Udk2();
- ~CppHtmlDisplay_Udk2();
- private:
- // Interface CppHtmlDisplay_UdkStd:
- virtual void do_Run(
- const char * i_sOutputDirectory,
- const ary::cpp::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout );
-
- // Local
- void SetRunData(
- const char * i_sOutputDirectory,
- const ary::cpp::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout );
-
- void Create_Css_File();
- void Create_Overview_File();
- void Create_Help_File();
- void Create_AllDefs_File();
- void CreateFiles_InSubTree_Namespaces();
- void CreateFiles_InSubTree_Index();
-
- void RecursiveDisplay_Namespace(
- const ary::cpp::Namespace &
- i_rNsp );
- void DisplayFiles_InNamespace(
- const ary::cpp::Namespace &
- i_rNsp );
- const ary::cpp::Gate &
- Gate() const;
- // DATA
- Dyn<OuputPage_Environment>
- pCurPageEnv;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/idl/hi_display.hxx b/autodoc/source/display/inc/idl/hi_display.hxx
deleted file mode 100644
index aec860f7..00000000
--- a/autodoc/source/display/inc/idl/hi_display.hxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HI_DISPLAY_HXX
-#define ADC_DISPLAY_HI_DISPLAY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <autodoc/dsp_html_std.hxx>
- // COMPONENTS
-#include <cosv/ploc.hxx>
- // PARAMETERS
-
-
-
-namespace ary
-{
- namespace idl
- {
- class Module;
- class CodeEntity;
- } // namspace idl
-} // namspace csi
-
-
-class MainDisplay_Idl;
-class HtmlEnvironment_Idl;
-
-class HtmlDisplay_Idl : public autodoc::HtmlDisplay_Idl_Ifc
-{
- public:
- HtmlDisplay_Idl();
- ~HtmlDisplay_Idl();
- private:
- // Interface HtmlDisplay_Idl_Ifc:
- virtual void do_Run(
- const char * i_sOutputDirectory,
- const ary::idl::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout );
- void SetRunData(
- const char * i_sOutputDirectory,
- const ary::idl::Gate &
- i_rAryGate,
- const display::CorporateFrame &
- i_rLayout );
- void Create_StartFile();
- void Create_FilesInNameTree();
- void Create_IndexFiles();
- void Create_FilesInProjectTree();
- void Create_PackageList();
- void Create_HelpFile();
- void Create_CssFile();
-
- /** @descr
- - makes sure, the module's directory exists
- - creates the module's docu file
- - creates docu files for all members of the module
- - does the same recursive for all sub-modules.
- */
- void RecursiveDisplay_Module(
- const ary::idl::Module &
- i_rNamespace );
- bool IsModule(
- const ary::idl::CodeEntity &
- i_ce ) const;
- const ary::idl::Module &
- Module_Cast( /// @precond Cast must be valid.
- const ary::idl::CodeEntity &
- i_ce ) const;
- // DATA
- Dyn<HtmlEnvironment_Idl>
- pCurPageEnv;
- Dyn<MainDisplay_Idl>
- pMainDisplay;
-};
-
-
-
-// IMPLEMENTATION
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/hf_docentry.hxx b/autodoc/source/display/inc/toolkit/hf_docentry.hxx
deleted file mode 100644
index 174c71c8..00000000
--- a/autodoc/source/display/inc/toolkit/hf_docentry.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HF_DOCENTRY_HXX
-#define ADC_DISPLAY_HF_DOCENTRY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "htmlfactory.hxx"
- // COMPONENTS
- // PARAMETERS
-
-/** @resp
- Produces a list of <DT>..</DT> and <DD>.
-*/
-class HF_DocEntryList : public HtmlMaker
-{
- public:
-
- HF_DocEntryList(
- Xml::Element & o_rOut );
- virtual ~HF_DocEntryList();
-
- Xml::Element & Produce_Term(
- const char * i_sTerm = 0 );
- Xml::Element & Produce_NormalTerm( /// Font will not be bold.
- const char * i_sTerm = 0 );
- Xml::Element & Produce_Definition();
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/hf_funcdecl.hxx b/autodoc/source/display/inc/toolkit/hf_funcdecl.hxx
deleted file mode 100644
index 0ae73d75..00000000
--- a/autodoc/source/display/inc/toolkit/hf_funcdecl.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HF_FUNCDECL_HXX
-#define ADC_DISPLAY_HF_FUNCDECL_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <toolkit/htmlfactory.hxx>
- // COMPONENTS
- // PARAMETERS
-
-class HF_FunctionDeclaration : public HtmlMaker
-{
- public:
- HF_FunctionDeclaration(
- Xml::Element & o_rParent,
- const String & i_sRaisesText );
- virtual ~HF_FunctionDeclaration();
-
- // OPERATIONS
- Xml::Element & ReturnCell();
- Xml::Element & NameCell();
- Xml::Element & NewParamTypeCell();
- Xml::Element & ParamNameCell();
- Xml::Element & ExceptionCell();
-
- private:
- Html::TableRow & ParameterLine();
-
- // DATA
- String sRaisesText;
- Html::Table * pTable;
- Xml::Element * pReturnCell;
- Xml::Element * pNameCell;
- Html::TableRow * pParameterLine;
- Xml::Element * pLastParameterCell;
- Xml::Element * pExceptionCell;
-};
-
-
-// IMPLEMENTATION
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/hf_linachain.hxx b/autodoc/source/display/inc/toolkit/hf_linachain.hxx
deleted file mode 100644
index 08055f99..00000000
--- a/autodoc/source/display/inc/toolkit/hf_linachain.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HF_LINACHAIN_HXX
-#define ADC_DISPLAY_HF_LINACHAIN_HXX
-
-// BASE CLASSES
-#include "htmlfactory.hxx"
-#include "out_position.hxx"
-
-
-
-
-class HF_LinkedNameChain : public HtmlMaker
-{
- public:
- /** F_LinkMaker makes a link out of the name of the
- parent position.
-
- Returns true, if there is a link, false if not.
- */
- typedef String (*F_LinkMaker)(const char *);
-
-
- HF_LinkedNameChain(
- Xml::Element & o_rOut );
- virtual ~HF_LinkedNameChain();
-
- void Produce_CompleteChain(
- const output::Position &
- i_curPosition,
- F_LinkMaker i_linkMaker ) const;
- void Produce_CompleteChain_forModule(
- const output::Position &
- i_curPosition, /// current Module's node
- F_LinkMaker i_linkMaker ) const;
- private:
- void produce_Level(
- output::Node & i_levelNode,
- const output::Position &
- i_startPosition,
- F_LinkMaker i_linkMaker ) const;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/hf_navi_main.hxx b/autodoc/source/display/inc/toolkit/hf_navi_main.hxx
deleted file mode 100644
index 357031b5..00000000
--- a/autodoc/source/display/inc/toolkit/hf_navi_main.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HF_NAVI_MAIN_HXX
-#define ADC_DISPLAY_HF_NAVI_MAIN_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include "htmlfactory.hxx"
- // PARAMETERS
-
-
-class HF_MainItem;
-
-
-/** @task
- Create a HTML navigation bar with lightly coloured background.
-
- @descr
- There are three kinds of items:
- Item with link: Add_StdItem(),
- Item without link: Add_NoneItem(),
- Item that is current page: Add_SelfItem().
-*/
-class HF_NaviMainRow : public HtmlMaker
-{
- public:
- enum E_Style
- {
- eStd,
- eSelf,
- eNo
- };
- HF_NaviMainRow(
- Xml::Element & o_out );
- ~HF_NaviMainRow();
-
- void Add_StdItem(
- const char * i_sText,
- const char * i_sLink );
- void Add_SelfItem(
- const char * i_sText );
- void Add_NoneItem(
- const char * i_sText );
-
- void Produce_Row();
-
- private:
- // DATA
- typedef std::vector< DYN HF_MainItem* > ItemList;
-
- ItemList aItems;
- Xml::Element * pRow;
-};
-
-
-
-// IMPLEMENTATION
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/hf_navi_sub.hxx b/autodoc/source/display/inc/toolkit/hf_navi_sub.hxx
deleted file mode 100644
index d24bfeb3..00000000
--- a/autodoc/source/display/inc/toolkit/hf_navi_sub.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HF_NAVI_SUB_HXX
-#define ADC_DISPLAY_HFI_NAVI_SUB_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include "htmlfactory.hxx"
- // PARAMETERS
-
-
-class HF_NaviSubRow : public HtmlMaker
-{
- public:
- HF_NaviSubRow(
- Xml::Element & o_rOut );
- virtual ~HF_NaviSubRow();
-
- void AddItem(
- const String & i_sText,
- const String & i_sLink,
- bool i_bSwitchOn );
- void SwitchOn(
- int i_nIndex );
- void Produce_Row();
-
- private:
- typedef std::pair<String,String> SubRow_Data;
- typedef std::pair<SubRow_Data,bool> SubRow_Item;
- typedef std::vector<SubRow_Item> SubRow;
-
- /** Puts the row's table into the parent XML-element, but
- doesn't write the items, because the actvity-status of
- the subitems isn't known yet.
- */
- void Setup_Row();
-
- // DATA
- SubRow aRow;
- Xml::Element * pMyRow;
-};
-
-
-
-
-// IMPLEMENTATION
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/hf_title.hxx b/autodoc/source/display/inc/toolkit/hf_title.hxx
deleted file mode 100644
index 36b51c91..00000000
--- a/autodoc/source/display/inc/toolkit/hf_title.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HF_TITLE_HXX
-#define ADC_DISPLAY_HF_TITLE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <toolkit/htmlfactory.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class HF_TitleTable : public HtmlMaker
-{
- public:
- HF_TitleTable(
- Xml::Element & o_rOut );
- virtual ~HF_TitleTable();
-
- void Produce_Title(
- const char * i_title );
- void Produce_Title(
- const char * i_annotations,
-// const char * i_label,
- const char * i_title );
-
- /// @return a Html::TableCell reference.
- Xml::Element & Add_Row();
-};
-
-
-class HF_SubTitleTable : public HtmlMaker
-{
- public:
- enum E_SubLevel
- {
- sublevel_1, /// Big title.
- sublevel_2, /// Small title.
- sublevel_3 /// No title.
- };
-
- /** @param i_nColumns [1 .. n]
- @param i_nSubTitleLevel [1 .. 2]
- 1 is a bit bigger than 2.
- */
-
- HF_SubTitleTable(
- Xml::Element & o_rOut,
- const String & i_label,
- const String & i_title,
- int i_nColumns,
- E_SubLevel i_eSubTitleLevel = sublevel_1 );
- virtual ~HF_SubTitleTable();
-
- /// @return an Html::TableRow reference.
- Xml::Element & Add_Row();
-};
-
-
-// IMPLEMENTATION
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/htmlfactory.hxx b/autodoc/source/display/inc/toolkit/htmlfactory.hxx
deleted file mode 100644
index 1ded9847..00000000
--- a/autodoc/source/display/inc/toolkit/htmlfactory.hxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTMLFACTORY_HXX
-#define ADC_DISPLAY_HTMLFACTORY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include "outputstack.hxx"
- // PARAMETERS
-#include <udm/xml/xmlitem.hxx>
-#include <udm/html/htmlitem.hxx>
-
-namespace Xml = ::csi::xml;
-namespace Html = ::csi::html;
-
-/** @resp
- Base class for HTML page creators (factories) for code entites or
- similar items.
-*/
-template <class ENV>
-class HtmlFactory
-{
- public:
- // INQUIRY
- ENV & Env() const { return *pEnv; }
- Xml::Element & CurOut() const { return aDestination.Out(); }
-
- // ACCESS
- OutputStack & Out() const { return aDestination; }
-
- protected:
- HtmlFactory(
- ENV & io_rEnv,
- Xml::Element * o_pOut = 0 )
- : pEnv(&io_rEnv) { if (o_pOut != 0) aDestination.Enter(*o_pOut); }
- ~HtmlFactory() {}
- private:
- // DATA
- ENV * pEnv;
- mutable OutputStack aDestination;
-};
-
-
-/** @resp
- Base class for HTML paragraph creators, which are to be put into
- a parent HTML element.
-*/
-class HtmlMaker
-{
- public:
-
- // INQUIRY
- Xml::Element & CurOut() const { return *pOut; }
-
- protected:
- HtmlMaker(
- Xml::Element & o_rOut )
- : pOut(&o_rOut) {}
- private:
- // DATA
- Xml::Element * pOut;
-};
-
-
-
-
-// IMPLEMENTATION
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/htmlfile.hxx b/autodoc/source/display/inc/toolkit/htmlfile.hxx
deleted file mode 100644
index 5c096473..00000000
--- a/autodoc/source/display/inc/toolkit/htmlfile.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_HTMLFILE_HXX
-#define ADC_DISPLAY_HTMLFILE_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <udm/html/htmlitem.hxx>
- // PARAMETERS
-#include <cosv/ploc.hxx>
-
-namespace csv
-{
- class File;
-}
-
-/** Represents an HTML output file.
-*/
-class DocuFile_Html
-{
- public:
- // LIFECYCLE
- DocuFile_Html();
-
- void SetLocation(
- const csv::ploc::Path &
- i_rFilePath );
- void SetTitle(
- const char * i_sTitle );
- void SetRelativeCssPath(
- const char * i_sCssFile_relativePath );
- void SetCopyright(
- const char * i_sCopyright );
- void EmptyBody();
-
- Html::Body & Body() { return aBodyData; }
- bool CreateFile();
-
- private:
- void WriteHeader(
- csv::File & io_aFile );
- void WriteBody(
- csv::File & io_aFile );
- // DATA
- String sFilePath;
- String sTitle;
- String sLocation;
- String sStyle;
- String sCssFile;
- String sCopyright;
-
- Html::Body aBodyData;
- StreamStr aBuffer;
-};
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/out_node.hxx b/autodoc/source/display/inc/toolkit/out_node.hxx
deleted file mode 100644
index 558ab742..00000000
--- a/autodoc/source/display/inc/toolkit/out_node.hxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_OUT_NODE_HXX
-#define ADC_DISPLAY_OUT_NODE_HXX
-
-
-
-
-namespace output
-{
-
-
-/** @resp
- Represents a tree of names where each node can have only one parent,
- but a list of children.
-
- @see Position
- @see Tree
-*/
-class Node
-{
- public:
- typedef std::vector< Node* > List;
- typedef UINT32 relative_id;
-
- // LIFECYCLE
- enum E_NullObject { null_object };
-
- Node();
- explicit Node(
- E_NullObject );
- ~Node();
-
- // OPERATORS
- bool operator==(
- const Node & i_node ) const
- { return pParent == i_node.pParent AND sName == i_node.sName; }
- bool operator!=(
- const Node & i_node ) const
- { return NOT operator==(i_node); }
-
- // OPERATIONS
- /// Seek, and if not existent, create.
- Node & Provide_Child(
- const String & i_name );
- /// Seek, and if not existent, create.
- Node & Provide_Child(
- const StringVector &
- i_path )
- { return provide_Child(i_path.begin(), i_path.end()); }
- // INQUIRY
- intt Depth() const { return nDepth; }
-
- const String & Name() const { return sName; }
- /// @return Id of a namespace or class etc. this directory represents.
- relative_id RelatedNameRoom() const { return nNameRoomId; }
- /// @return No delimiter at start, with delimiter at end.
- void Get_Path(
- StreamStr & o_result,
- intt i_maxDepth = -1 ) const;
- void Get_Chain(
- StringVector & o_result,
- intt i_maxDepth = -1 ) const;
- // ACCESS
- void Set_RelatedNameRoom(
- relative_id i_nNameRoomId )
- { nNameRoomId = i_nNameRoomId; }
- Node * Parent() { return pParent; }
- Node * Child(
- const String & i_name )
- { return find_Child(i_name); }
- List & Children() { return aChildren; }
-
- /// @return a reference to a Node with Depth() == -1.
- static Node & Null_();
-
- private:
- // Local
- Node(
- const String & i_name,
- Node & i_parent );
-
- Node * find_Child(
- const String & i_name );
- Node & add_Child(
- const String & i_name );
- Node & provide_Child(
- StringVector::const_iterator
- i_next,
- StringVector::const_iterator
- i_end );
- // Data
- String sName;
- Node * pParent;
- List aChildren;
- intt nDepth;
- relative_id nNameRoomId;
-};
-
-
-
-
-} // namespace output
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/out_position.hxx b/autodoc/source/display/inc/toolkit/out_position.hxx
deleted file mode 100644
index aefce423..00000000
--- a/autodoc/source/display/inc/toolkit/out_position.hxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_OUT_POSITION_HXX
-#define ADC_DISPLAY_OUT_POSITION_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <toolkit/out_node.hxx>
- // PARAMETERS
-
-
-
-namespace output
-{
-
-
-
-class Position
-{
- public:
- // LIFECYCLE
- Position();
- explicit Position(
- Node & i_directory,
- const String & i_file = String::Null_() );
- Position(
- const Position & i_directory,
- const String & i_rDifferentFile );
- ~Position();
-
- // OPERATIONS
- Position & operator=(
- Node & i_node );
- Position & operator+=(
- const String & i_nodeName );
- Position & operator-=(
- intt i_levels );
-
- // INQUIRY
- bool IsValid() const { return pDirectory->Depth() >= 0; }
- const String & Name() const { return pDirectory->Name(); }
- const String & File() const { return sFile; }
- intt Depth() const { return pDirectory->Depth(); }
-
- void Get_Chain(
- StringVector & o_result ) const
- { pDirectory->Get_Chain(o_result); }
- String LinkToRoot(
- const String & i_localLabel = String::Null_() ) const;
-
- void Get_LinkTo(
- StreamStr & o_result,
- const Position & i_destination,
- const String & i_localLabel = String::Null_() ) const;
- void Get_LinkToRoot(
- StreamStr & o_result,
- const String & i_localLabel = String::Null_() ) const;
-
- static char Delimiter() { return '/'; }
-
- // ACCESS
- Node & RelatedNode() const { return *pDirectory; }
-
- void Set(
- Node & i_node,
- const String & i_file = String::Null_() );
- void Set_File(
- const String & i_file );
-
- private:
- // DATA
- String sFile;
- Node * pDirectory;
-};
-
-
-/// @return No delimiter at start, with delimiter at end.
-const char * get_UpLink(
- uintt i_depth );
-
-
-// IMPLEMENTATION
-
-inline void
-Position::Set_File( const String & i_file )
- { sFile = i_file; }
-
-} // namespace output
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/out_tree.hxx b/autodoc/source/display/inc/toolkit/out_tree.hxx
deleted file mode 100644
index 1fc60374..00000000
--- a/autodoc/source/display/inc/toolkit/out_tree.hxx
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_OUT_TREE_HXX
-#define ADC_DISPLAY_OUT_TREE_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include "out_position.hxx"
- // PARAMETERS
-
-
-namespace output
-{
-
-inline const char *
-ModuleFileName()
-{ return "module-ix.html"; }
-inline const char *
-IndexFilesDirName()
-{ return "index-files"; }
-inline const char *
-IndexFile_A()
-{ return "index-1.html"; }
-
-
-class Tree
-{
- public:
- // LIFECYCLE
- Tree();
- ~Tree();
-
- // OPERATIONS
- void Set_Overview(
- const StringVector &
- i_path,
- const String & i_sFileName );
- Node & Set_NamesRoot(
- const StringVector &
- i_path );
- Node & Set_IndexRoot(
- const StringVector &
- i_path );
- Node & Set_ProjectsRoot(
- const StringVector &
- i_path );
- Node & Provide_Node(
- const StringVector &
- i_path );
-
- // ACCESS
- Node & RootNode() { return *pRoot; }
- Node & NamesRootNode() { return *pNamesRoot; }
- Node & IndexRootNode() { return *pIndexRoot; }
- Node & ProjectsRootNode() { return *pProjectsRoot; }
-
- Position Root() { return Position(*pRoot); }
- Position Overview() { return aOverview; }
- Position NamesRoot() { return Position(*pNamesRoot); }
- Position IndexRoot() { return Position(*pIndexRoot); }
- Position ProjectsRoot() { return Position(*pProjectsRoot); }
-
- private:
- // forbidden:
- Tree(const Tree&);
- Tree & operator=(const Tree&);
-
- // DATA
- Dyn<Node> pRoot;
- Node * pNamesRoot;
- Node * pIndexRoot;
- Node * pProjectsRoot;
- Position aOverview;
-};
-
-
-// IMPLEMENTATION
-
-inline Node &
-Tree::Provide_Node( const StringVector & i_path )
- { return pRoot->Provide_Child(i_path); }
-
-
-inline void
-Tree::Set_Overview( const StringVector & i_path,
- const String & i_sFileName )
- { aOverview.Set(Provide_Node(i_path), i_sFileName); }
-
-inline Node &
-Tree::Set_NamesRoot( const StringVector & i_path )
- { pNamesRoot = &Provide_Node(i_path);
- return *pNamesRoot; }
-
-inline Node &
-Tree::Set_IndexRoot( const StringVector & i_path )
- { pIndexRoot = &Provide_Node(i_path);
- return *pIndexRoot; }
-
-inline Node &
-Tree::Set_ProjectsRoot( const StringVector & i_path )
- { pProjectsRoot = &Provide_Node(i_path);
- return *pProjectsRoot; }
-
-
-
-} // namespace output
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/inc/toolkit/outputstack.hxx b/autodoc/source/display/inc/toolkit/outputstack.hxx
deleted file mode 100644
index d71cba3b..00000000
--- a/autodoc/source/display/inc/toolkit/outputstack.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_OUTPUTSTACK_HXX
-#define ADC_DISPLAY_OUTPUTSTACK_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <estack.hxx>
- // PARAMETERS
-#include <udm/xml/xmlitem.hxx>
-
-
-class OutputStack
-{
- public:
- // LIFECYCLE
- OutputStack();
- ~OutputStack();
-
- // OPERATIONS
- void Enter(
- csi::xml::Element & io_rDestination );
- void Leave();
-
- // ACCESS
- csi::xml::Element & Out() const; // CurOutputNode
-
- private:
- EStack< csi::xml::Element * >
- aCurDestination; // The front element is the currently used.
- // The later ones are the parents.
-};
-
-inline csi::xml::Element &
-OutputStack::Out() const
-{
- csv_assert( aCurDestination.size() > 0 );
- return *aCurDestination.top();
-}
-
-// IMPLEMENTATION
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/kernel/displfct.cxx b/autodoc/source/display/kernel/displfct.cxx
deleted file mode 100644
index 81ea5566..00000000
--- a/autodoc/source/display/kernel/displfct.cxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "displfct.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <html/chd_udk2.hxx>
-#include <idl/hi_display.hxx>
-#include <cfrstd.hxx>
-
-
-DYN DisplayToolsFactory * DisplayToolsFactory::dpTheInstance_ = 0;
-
-
-namespace autodoc
-{
-
-DisplayToolsFactory_Ifc &
-DisplayToolsFactory_Ifc::GetIt_()
-{
- if ( DisplayToolsFactory::dpTheInstance_ == 0 )
- DisplayToolsFactory::dpTheInstance_ = new DisplayToolsFactory;
- return *DisplayToolsFactory::dpTheInstance_;
-}
-
-} // namespace autodoc
-
-
-DisplayToolsFactory::DisplayToolsFactory()
-{
-}
-
-DisplayToolsFactory::~DisplayToolsFactory()
-{
-}
-
-// DYN autodoc::TextDisplay_FunctionList_Ifc *
-// DisplayToolsFactory::Create_TextDisplay_FunctionList() const
-// {
-// return new CppTextDisplay_FunctionList;
-// }
-
-
-DYN autodoc::HtmlDisplay_UdkStd *
-DisplayToolsFactory::Create_HtmlDisplay_UdkStd() const
-{
- return new CppHtmlDisplay_Udk2;
-}
-
-DYN autodoc::HtmlDisplay_Idl_Ifc *
-DisplayToolsFactory::Create_HtmlDisplay_Idl() const
-{
- return new HtmlDisplay_Idl;
-}
-
-const display::CorporateFrame &
-DisplayToolsFactory::Create_StdFrame() const
-{
- static StdFrame aFrame;
- return aFrame;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/kernel/displfct.hxx b/autodoc/source/display/kernel/displfct.hxx
deleted file mode 100644
index b0854912..00000000
--- a/autodoc/source/display/kernel/displfct.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DISPLAY_DISPLFCT_HXX
-#define ADC_DISPLAY_DISPLFCT_HXX
-
-
-#include <autodoc/displaying.hxx>
-
-
-/** Interface for parsing code of a programming language and
- delivering the information into an Autodoc Repository.
-**/
-class DisplayToolsFactory : public autodoc::DisplayToolsFactory_Ifc
-{
- public:
- DisplayToolsFactory();
- virtual ~DisplayToolsFactory();
-
-// virtual DYN autodoc::TextDisplay_FunctionList_Ifc *
-// Create_TextDisplay_FunctionList() const;
-
- virtual DYN autodoc::HtmlDisplay_UdkStd *
- Create_HtmlDisplay_UdkStd() const;
- virtual DYN autodoc::HtmlDisplay_Idl_Ifc *
- Create_HtmlDisplay_Idl() const;
-
- virtual const display::CorporateFrame &
- Create_StdFrame() const;
- private:
- static DYN DisplayToolsFactory *
- dpTheInstance_;
-
- friend class autodoc::DisplayToolsFactory_Ifc;
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/kernel/makefile.mk b/autodoc/source/display/kernel/makefile.mk
deleted file mode 100644
index 992456dc..00000000
--- a/autodoc/source/display/kernel/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=display_kernel
-TARGETTYPE=CUI
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/displfct.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/display/toolkit/hf_docentry.cxx b/autodoc/source/display/toolkit/hf_docentry.cxx
deleted file mode 100644
index 7e5ae458..00000000
--- a/autodoc/source/display/toolkit/hf_docentry.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/hf_docentry.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-HF_DocEntryList::HF_DocEntryList( Xml::Element & o_out )
- : HtmlMaker( o_out >>* new Html::DefList )
-{
-}
-
-HF_DocEntryList::~HF_DocEntryList()
-{
-}
-
-Xml::Element &
-HF_DocEntryList::Produce_Term(const char * i_sTerm )
-{
- Xml::Element &
- ret = CurOut()
- >> *new Html::DefListTerm
- >> *new Html::Bold;
- if ( NOT csv::no_str(i_sTerm))
- ret
- << i_sTerm;
- return ret;
-}
-
-Xml::Element &
-HF_DocEntryList::Produce_NormalTerm(const char * i_sTerm)
-{
- Xml::Element &
- ret = CurOut()
- >> *new Html::DefListTerm;
- if ( NOT csv::no_str(i_sTerm))
- ret
- << i_sTerm;
- return ret;
-}
-
-Xml::Element &
-HF_DocEntryList::Produce_Definition()
-{
- return CurOut()
- >> *new Html::DefListDefinition;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/hf_funcdecl.cxx b/autodoc/source/display/toolkit/hf_funcdecl.cxx
deleted file mode 100644
index 4ef1d545..00000000
--- a/autodoc/source/display/toolkit/hf_funcdecl.cxx
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/hf_funcdecl.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-const String C_sValignTop("top");
-const String C_sValignBottom("bottom");
-
-
-
-HF_FunctionDeclaration::HF_FunctionDeclaration( Xml::Element & o_rParent,
- const String & i_sRaisesText )
- : HtmlMaker(o_rParent),
- sRaisesText(i_sRaisesText),
- pTable(0),
- pReturnCell(0),
- pNameCell(0),
- pParameterLine(0),
- pLastParameterCell(0),
- pExceptionCell(0)
-{
- pTable = new Html::Table;
- CurOut()
- >> *pTable
- << new Html::ClassAttr("table-in-method")
- << new Xml::AnAttribute("border","0");
-}
-
-HF_FunctionDeclaration::~HF_FunctionDeclaration()
-{
-}
-
-Xml::Element &
-HF_FunctionDeclaration::ReturnCell()
-{
- if (pReturnCell != 0)
- return *pReturnCell;
-
- pReturnCell = &( *pTable
- >> *new Html::TableRow
- >> *new Html::TableCell
- << new Html::VAlignAttr(C_sValignTop)
- << new Xml::AnAttribute("colspan", "3")
- );
- return *pReturnCell;
-}
-
-Xml::Element &
-HF_FunctionDeclaration::NameCell()
-{
- if (pNameCell != 0)
- return *pNameCell;
-
- pNameCell = &( ParameterLine()
- >> *new Html::TableCell
- << new Html::VAlignAttr(C_sValignTop)
- );
- pLastParameterCell = pNameCell;
-
- return *pNameCell;
-}
-
-Xml::Element &
-HF_FunctionDeclaration::NewParamTypeCell()
-{
- if (pLastParameterCell != pNameCell)
- {
- pParameterLine = 0;
- ParameterLine()
- >> *new Html::TableCell;
- }
-
- Xml::Element &
- rParamType = ParameterLine()
- >> *new Html::TableCell
- << new Html::VAlignAttr(C_sValignTop);
- pLastParameterCell
- = &( ParameterLine()
- >> *new Html::TableCell
- << new Html::VAlignAttr(C_sValignBottom)
- << new Xml::XmlCode("&nbsp;")
- );
- return rParamType;
-}
-
-Xml::Element &
-HF_FunctionDeclaration::ParamNameCell()
-{
- csv_assert(pLastParameterCell != pNameCell);
- return *pLastParameterCell;
-}
-
-Xml::Element &
-HF_FunctionDeclaration::ExceptionCell()
-{
- if (pExceptionCell != 0)
- return *pExceptionCell;
-
- Xml::Element &
- rExceptionRow = *pTable
- >> *new Html::TableRow;
- rExceptionRow
- >> *new Html::TableCell
- << new Html::VAlignAttr(C_sValignTop)
- << new Xml::AnAttribute("align", "right")
- << sRaisesText
- << "( ";
-
- pExceptionCell = &( rExceptionRow
- >> *new Html::TableCell
- << new Html::VAlignAttr(C_sValignTop)
- << new Xml::AnAttribute("colspan", "2")
- );
- return *pExceptionCell;
-}
-
-Html::TableRow &
-HF_FunctionDeclaration::ParameterLine()
-{
- if (pParameterLine != 0)
- return *pParameterLine;
-
- pParameterLine = new Html::TableRow;
- *pTable
- >> *pParameterLine;
-
- return *pParameterLine;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/hf_linachain.cxx b/autodoc/source/display/toolkit/hf_linachain.cxx
deleted file mode 100644
index c4bba8e4..00000000
--- a/autodoc/source/display/toolkit/hf_linachain.cxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/hf_linachain.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <toolkit/out_position.hxx>
-
-
-
-HF_LinkedNameChain::HF_LinkedNameChain( Xml::Element & o_rOut )
- : HtmlMaker( o_rOut
- >> *new Html::Paragraph
- << new Html::ClassAttr("namechain") )
-{
-}
-
-HF_LinkedNameChain::~HF_LinkedNameChain()
-{
-}
-
-void
-HF_LinkedNameChain::Produce_CompleteChain( const output::Position & i_curPosition,
- F_LinkMaker i_linkMaker ) const
-{
- produce_Level(i_curPosition.RelatedNode(), i_curPosition, i_linkMaker);
-}
-
-void
-HF_LinkedNameChain::Produce_CompleteChain_forModule( const output::Position & i_curPosition,
- F_LinkMaker i_linkMaker ) const
-{
- if (i_curPosition.Depth() == 0)
- return;
- produce_Level(*i_curPosition.RelatedNode().Parent(), i_curPosition, i_linkMaker);
-}
-
-
-
-namespace
-{
-
-StreamStr aLinkBuf(200);
-
-}
-
-void
-HF_LinkedNameChain::produce_Level( output::Node & i_levelNode,
- const output::Position & i_startPosition,
- F_LinkMaker i_linkMaker ) const
-{
- if ( i_levelNode.Depth() > 0 )
- {
- produce_Level( *i_levelNode.Parent(),
- i_startPosition,
- i_linkMaker );
- }
-
- aLinkBuf.reset();
-
- String
- sFileName = (*i_linkMaker)(i_levelNode.Name());
- output::Position
- aLevelPos(i_levelNode, sFileName);
-
- i_startPosition.Get_LinkTo(aLinkBuf, aLevelPos);
-
- if ( i_levelNode.Depth() > 0 )
- {
- CurOut()
- >> *new Html::Link(aLinkBuf.c_str())
- << new Html::ClassAttr("namechain")
- << i_levelNode.Name();
- CurOut() << " :: ";
- }
- else
- {
- CurOut()
- >> *new Html::Link(aLinkBuf.c_str())
- << new Html::ClassAttr("namechain")
- << "::";
- CurOut() << " ";
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/hf_navi_main.cxx b/autodoc/source/display/toolkit/hf_navi_main.cxx
deleted file mode 100644
index de5fca30..00000000
--- a/autodoc/source/display/toolkit/hf_navi_main.cxx
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/hf_navi_main.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-
-
-
-//******************** MainItem and derived ones ***************//
-class HF_MainItem : public HtmlMaker
-{
- public:
- virtual ~HF_MainItem() {}
- void Produce_Item() const { do_ProduceItem(); }
- protected:
- HF_MainItem(
- Xml::Element & o_out )
- : HtmlMaker(o_out) {}
- private:
- virtual void do_ProduceItem() const = 0;
-};
-
-
-namespace
-{
-
-class StdItem : public HF_MainItem
-{
- public:
- StdItem(
- Xml::Element & o_out,
- const char * i_sText,
- const char * i_sLink );
-
- ~StdItem();
- private:
- virtual void do_ProduceItem() const;
-
- // DATA
- String sText;
- String sLink;
-};
-
-class SelfItem : public HF_MainItem
-{
- public:
- SelfItem(
- Xml::Element & o_out,
- const char * i_sText );
- ~SelfItem();
- private:
- virtual void do_ProduceItem() const;
-
- // DATA
- String sText;
-};
-
-class NoneItem : public HF_MainItem
-{
- public:
- NoneItem(
- Xml::Element & o_out,
- const char * i_sText );
- ~NoneItem();
- private:
- virtual void do_ProduceItem() const;
-
- // DATA
- String sText;
-};
-
-} // anonymous namespace
-
-
-
-//******************** HF_NaviMainRow ***************//
-
-
-
-HF_NaviMainRow::HF_NaviMainRow( Xml::Element & o_out )
- : HtmlMaker(o_out),
- aItems(),
- pRow(0)
-{
- aItems.reserve(5);
-
- pRow =
- &( CurOut()
- >> *new Html::Table
- << new Html::ClassAttr("navimain")
- << new Xml::AnAttribute( "border", "0" )
- << new Xml::AnAttribute( "cellpadding", "3" )
- >> *new Html::TableRow
- );
-}
-
-HF_NaviMainRow::~HF_NaviMainRow()
-{
- csv::erase_container_of_heap_ptrs(aItems);
-}
-
-void
-HF_NaviMainRow::Add_StdItem( const char * i_sText,
- const char * i_sLink )
-{
- aItems.push_back(new StdItem( *pRow,i_sText,i_sLink ));
-}
-
-void
-HF_NaviMainRow::Add_SelfItem( const char * i_sText )
-{
- aItems.push_back(new SelfItem( *pRow,i_sText ));
-}
-
-void
-HF_NaviMainRow::Add_NoneItem( const char * i_sText )
-{
- aItems.push_back(new NoneItem( *pRow,i_sText ));
-}
-
-void
-HF_NaviMainRow::Produce_Row()
-{
- ItemList::iterator itEnd = aItems.end();
- for ( ItemList::iterator iter = aItems.begin();
- iter != itEnd;
- ++iter )
- {
- (*iter)->Produce_Item();
- }
-}
-
-
-
-
-//******************** MainItem and derived ones ***************//
-
-namespace
-{
-
-StdItem::StdItem( Xml::Element & o_out,
- const char * i_sText,
- const char * i_sLink )
- : HF_MainItem(o_out),
- sText(i_sText),
- sLink(i_sLink)
-{
-}
-
-StdItem::~StdItem()
-{
-}
-
-void
-StdItem::do_ProduceItem() const
-{
- Xml::Element &
- rCell = CurOut() >>* new Html::TableCell;
- rCell
- << new Html::ClassAttr( "navimain" )
- >> *new Html::Link(sLink.c_str())
- << new Html::ClassAttr( "navimain" )
- << sText.c_str();
-}
-
-SelfItem::SelfItem( Xml::Element & o_out,
- const char * i_sText )
- : HF_MainItem(o_out),
- sText(i_sText)
-{
-}
-
-SelfItem::~SelfItem()
-{
-}
-
-void
-SelfItem::do_ProduceItem() const
-{
- Xml::Element &
- rCell = CurOut() >>* new Html::TableCell;
- rCell
- << new Html::ClassAttr( "navimainself" )
- << sText.c_str();
-}
-
-NoneItem::NoneItem( Xml::Element & o_out,
- const char * i_sText )
- : HF_MainItem(o_out),
- sText(i_sText)
-{
-}
-
-NoneItem::~NoneItem()
-{
-}
-
-void
-NoneItem::do_ProduceItem() const
-{
- Xml::Element &
- rCell = CurOut() >>* new Html::TableCell;
- rCell
- << new Html::ClassAttr( "navimainnone" )
- << sText.c_str();
-}
-
-} // anonymous namespace
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/hf_navi_sub.cxx b/autodoc/source/display/toolkit/hf_navi_sub.cxx
deleted file mode 100644
index 2b9758f1..00000000
--- a/autodoc/source/display/toolkit/hf_navi_sub.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/hf_navi_sub.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-HF_NaviSubRow::HF_NaviSubRow( Xml::Element & o_rOut )
- : HtmlMaker(o_rOut),
- aRow(),
- pMyRow(0)
-{
- Setup_Row();
-}
-
-HF_NaviSubRow::~HF_NaviSubRow()
-{
-}
-
-void
-HF_NaviSubRow::AddItem( const String & i_sText,
- const String & i_sLink,
- bool i_bSwitchOn )
-{
- aRow.push_back( SubRow_Item( SubRow_Data(i_sText,i_sLink),
- i_bSwitchOn ));
-}
-
-void
-HF_NaviSubRow::SwitchOn( int i_nIndex )
-{
- if ( i_nIndex < int(aRow.size()) )
- aRow[i_nIndex].second = true;
-}
-
-void
-HF_NaviSubRow::Setup_Row()
-{
- Html::Table *
- pTable = new Html::Table;
- CurOut()
- >> *pTable
- << new Html::ClassAttr("navisub")
- << new Xml::AnAttribute( "border", "0" )
- << new Xml::AnAttribute( "cellpadding", "0" );
- pMyRow = &pTable->AddRow();
-}
-
-void
-HF_NaviSubRow::Produce_Row()
-{
- for ( SubRow::const_iterator it = aRow.begin();
- it != aRow.end();
- ++it )
- {
- Xml::Element &
- rCell = *pMyRow
- >> *new Html::TableCell
- << new Html::ClassAttr("navisub");
- StreamLock sl(100);
- Xml::Element &
- rGoon = (*it).second
- ? ( rCell
- >> *new Html::Link( sl()
- << "#"
- << (*it).first.second
- << c_str )
- << new Html::ClassAttr("navisub")
- )
- : rCell;
- rGoon
- << (*it).first.first;
- }
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/hf_title.cxx b/autodoc/source/display/toolkit/hf_title.cxx
deleted file mode 100644
index 4341595f..00000000
--- a/autodoc/source/display/toolkit/hf_title.cxx
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/hf_title.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <stdlib.h>
-
-
-const String C_sTitleBorder("0");
-const String C_sTitleWidth("100%");
-const String C_sTitlePadding("5");
-const String C_sTitleSpacing("3");
-
-const String C_sSubTitleBorder("1");
-const String C_sSubTitleWidth("100%");
-const String C_sSubTitlePadding("5");
-const String C_sSubTitleSpacing("0");
-const String C_sColSpan("colspan");
-
-
-HF_TitleTable::HF_TitleTable( Xml::Element & o_rOut )
- : HtmlMaker(o_rOut >> *new Html::Table( C_sTitleBorder,
- C_sTitleWidth,
- C_sTitlePadding,
- C_sTitleSpacing )
- << new Html::ClassAttr("title-table")
- << new Html::StyleAttr("margin-bottom:6pt;") )
-{
-}
-
-HF_TitleTable::~HF_TitleTable()
-{
-}
-
-void
-HF_TitleTable::Produce_Title( const char * i_title )
-{
- Add_Row()
- << new Html::ClassAttr("title")
- << i_title;
-}
-
-void
-HF_TitleTable::Produce_Title( const char * i_annotations,
- const char * i_title )
-{
- if (csv::no_str(i_annotations))
- {
- Produce_Title(i_title);
- return;
- }
-
- Xml::Element &
- rRow = Add_Row();
- rRow
- << new Html::ClassAttr("title");
-
- Xml::Element &
- rTable = rRow
- >> *new Html::Table()
- << new Html::ClassAttr("title-table")
- << new Html::WidthAttr("99%");
- Xml::Element &
- rInnerRow = rTable
- >> *new Html::TableRow;
- rInnerRow
- >> *new Html::TableCell
- << new Html::WidthAttr("25%")
- << new Html::ClassAttr("title2")
- << i_annotations;
- rInnerRow
- >> *new Html::TableCell
- << new Html::WidthAttr("50%")
- << new Html::ClassAttr("title")
- << i_title;
- rInnerRow
- >> *new Html::TableCell
- << new Html::WidthAttr("*");
-}
-
-Xml::Element &
-HF_TitleTable::Add_Row()
-{
- return CurOut()
- >> *new Html::TableRow
- >> *new Html::TableCell;
-}
-
-
-inline const char *
-get_SubTitleCssClass(HF_SubTitleTable::E_SubLevel i_eSubTitleLevel)
-{
- return i_eSubTitleLevel == HF_SubTitleTable::sublevel_1
- ? "subtitle"
- : "crosstitle";
-}
-
-
-HF_SubTitleTable::HF_SubTitleTable( Xml::Element & o_rOut,
- const String & i_label,
- const String & i_title,
- int i_nColumns,
- E_SubLevel i_eSubTitleLevel )
- : HtmlMaker( o_rOut
- << new Html::Label(i_label)
- >> *new Html::Table( C_sSubTitleBorder,
- C_sSubTitleWidth,
- C_sSubTitlePadding,
- C_sSubTitleSpacing )
- << new Html::ClassAttr(get_SubTitleCssClass(i_eSubTitleLevel)) )
-{
- csv_assert(i_nColumns > 0);
-
- if (i_eSubTitleLevel == sublevel_3)
- return;
-
- Xml::Element &
- rCell = CurOut()
- >> *new Html::TableRow
- >> *new Html::TableCell
- << new Html::ClassAttr(get_SubTitleCssClass(i_eSubTitleLevel)) ;
-
- if (i_nColumns > 1)
- {
- StreamLock sl(20);
- String sColumns = sl() << i_nColumns << c_str;
- rCell
- << new Xml::AnAttribute(C_sColSpan, sColumns);
- }
- rCell
- << i_title;
-}
-
-HF_SubTitleTable::~HF_SubTitleTable()
-{
-}
-
-Xml::Element &
-HF_SubTitleTable::Add_Row()
-{
- return CurOut() >> *new Html::TableRow;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/htmlfile.cxx b/autodoc/source/display/toolkit/htmlfile.cxx
deleted file mode 100644
index 6d91f9d0..00000000
--- a/autodoc/source/display/toolkit/htmlfile.cxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/htmlfile.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/file.hxx>
-#include <udm/html/htmlitem.hxx>
-
-namespace
-{
-bool bUse_OOoFrameDiv = true;
-const String C_sOOoFrameDiv_IdlId("adc-idlref");
-}
-
-using namespace csi;
-using csi::xml::AnAttribute;
-
-DocuFile_Html::DocuFile_Html()
- : sFilePath(),
- sTitle(),
- sLocation(),
- sStyle(),
- sCssFile(),
- sCopyright(),
- aBodyData(),
- aBuffer(60000) // Grows dynamically, when necessary.
-{
-}
-
-void
-DocuFile_Html::SetLocation( const csv::ploc::Path & i_rFilePath )
-{
- StreamLock sPath(1000);
- i_rFilePath.Get( sPath() );
-
- sFilePath = sPath().c_str();
-}
-
-void
-DocuFile_Html::SetTitle( const char * i_sTitle )
-{
- sTitle = i_sTitle;
-}
-
-void
-DocuFile_Html::SetRelativeCssPath( const char * i_sCssFile_relativePath )
-{
- sCssFile = i_sCssFile_relativePath;
-}
-
-void
-DocuFile_Html::SetCopyright( const char * i_sCopyright )
-{
- sCopyright = i_sCopyright;
-}
-
-void
-DocuFile_Html::EmptyBody()
-{
- aBodyData.SetContent(0);
-
- if (bUse_OOoFrameDiv)
- {
- // Insert <div> tag to allow better formatting for OOo.
- aBodyData
- << new xml::XmlCode("<div id=\"")
- << new xml::XmlCode(C_sOOoFrameDiv_IdlId)
- << new xml::XmlCode("\">\n\n");
- }
-
- aBodyData
- >> *new html::Label( "_top_" )
- << " ";
-}
-
-bool
-DocuFile_Html::CreateFile()
-{
- csv::File aFile(sFilePath, csv::CFM_CREATE);
- if (NOT aFile.open())
- {
- Cerr() << "Can't create file " << sFilePath << "." << Endl();
- return false;
- }
-
- WriteHeader(aFile);
- WriteBody(aFile);
-
- // Write end
- static const char sCompletion[] = "\n</html>\n";
- aFile.write( sCompletion );
-
- aFile.close();
- Cout() << '.' << Flush();
- return true;
-}
-
-
-void
-DocuFile_Html::WriteHeader( csv::File & io_aFile )
-{
- aBuffer.reset();
-
- static const char s1[] =
- "<html>\n<head>\n<title>";
- static const char s2[] =
- "</title>\n"
- "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n";
-
- aBuffer.write( s1 );
- aBuffer.write( sTitle );
- aBuffer.write( s2 );
-
-
- if (NOT sCssFile.empty())
- {
- static const char s3[] =
- "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
- static const char s4[] =
- "\">\n";
-
- aBuffer.write(s3);
- aBuffer.write(sCssFile);
- aBuffer.write(s4);
- }
-
- if (NOT sStyle.empty())
- {
- static const char s5[] =
- "<style>";
- static const char s6[] =
- "</style>\n";
-
- aBuffer.write(s5);
- aBuffer.write(sStyle);
- aBuffer.write(s6);
- }
-
- static const char s7[] =
- "</head>\n";
- aBuffer.write(s7);
-
- io_aFile.write(aBuffer.c_str(), aBuffer.size());
-}
-
-void
-DocuFile_Html::WriteBody( csv::File & io_aFile )
-{
- aBuffer.reset();
-
- aBodyData
- >> *new html::Link( "#_top_" )
- << "Top of Page";
-
- if ( sCopyright.length() > 0 )
- {
- aBodyData
- << new xml::XmlCode("<hr size=\"3\">");
-
- aBodyData
- >> *new html::Paragraph
- << new html::ClassAttr( "copyright" )
- << new xml::AnAttribute( "align", "center" )
- << new xml::XmlCode(sCopyright);
- }
-
- if (bUse_OOoFrameDiv)
- {
- // Insert <div> tag to allow better formatting for OOo.
- aBodyData
- << new xml::XmlCode("\n</div> <!-- id=\"")
- << new xml::XmlCode(C_sOOoFrameDiv_IdlId)
- << new xml::XmlCode("\" -->\n");
- }
-
- aBodyData.WriteOut(aBuffer);
- io_aFile.write(aBuffer.c_str(), aBuffer.size());
-}
-
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/makefile.mk b/autodoc/source/display/toolkit/makefile.mk
deleted file mode 100644
index ab374990..00000000
--- a/autodoc/source/display/toolkit/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=display_toolkit
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/hf_docentry.obj \
- $(OBJ)$/hf_funcdecl.obj \
- $(OBJ)$/hf_linachain.obj \
- $(OBJ)$/hf_navi_main.obj \
- $(OBJ)$/hf_navi_sub.obj \
- $(OBJ)$/hf_title.obj \
- $(OBJ)$/htmlfile.obj \
- $(OBJ)$/out_node.obj \
- $(OBJ)$/out_position.obj \
- $(OBJ)$/out_tree.obj \
- $(OBJ)$/outputstack.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/display/toolkit/out_node.cxx b/autodoc/source/display/toolkit/out_node.cxx
deleted file mode 100644
index ad6a7f07..00000000
--- a/autodoc/source/display/toolkit/out_node.cxx
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/out_node.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <algorithm>
-
-
-namespace output
-{
-
-
-namespace
-{
-
-struct Less_NodePtr
-{
- bool operator()(
- Node * p1,
- Node * p2 ) const
- { return p1->Name() < p2->Name(); }
-};
-
-struct Less_NodePtr C_Less_NodePtr;
-
-
-Node C_aNullNode(Node::null_object);
-
-
-} // namepace anonymous
-
-
-//********************** Node ***************************//
-
-
-Node::Node()
- : sName(),
- pParent(0),
- aChildren(),
- nDepth(0),
- nNameRoomId(0)
-{
-}
-
-Node::Node( E_NullObject )
- : sName(),
- pParent(0),
- aChildren(),
- nDepth(-1),
- nNameRoomId(0)
-{
-}
-
-Node::Node( const String & i_name,
- Node & i_parent )
- : sName(i_name),
- pParent(&i_parent),
- aChildren(),
- nDepth(i_parent.Depth()+1),
- nNameRoomId(0)
-{
-}
-
-Node::~Node()
-{
- for ( List::iterator it = aChildren.begin();
- it != aChildren.end();
- ++it )
- {
- delete *it;
- }
-}
-
-Node &
-Node::Provide_Child( const String & i_name )
-{
- Node *
- ret = find_Child(i_name);
- if (ret != 0)
- return *ret;
- return add_Child(i_name);
-}
-
-void
-Node::Get_Path( StreamStr & o_result,
- intt i_maxDepth ) const
-{
- // Intentionally 'i_maxDepth != 0', so max_Depth == -1 sets no limit:
- if (i_maxDepth != 0)
- {
- if (pParent != 0)
- pParent->Get_Path(o_result, i_maxDepth-1);
- o_result << sName << '/';
- }
-}
-
-void
-Node::Get_Chain( StringVector & o_result,
- intt i_maxDepth ) const
-{
- if (i_maxDepth != 0)
- {
- // This is called also for the toplevel Node,
- // but there happens nothing:
- if (pParent != 0)
- {
- pParent->Get_Chain(o_result, i_maxDepth-1);
- o_result.push_back(sName);
- }
- }
-}
-
-Node *
-Node::find_Child( const String & i_name )
-{
- Node aSearch;
- aSearch.sName = i_name;
-
- List::const_iterator
- ret = std::lower_bound( aChildren.begin(),
- aChildren.end(),
- &aSearch,
- C_Less_NodePtr );
- if ( ret != aChildren.end() ? (*ret)->Name() == i_name : false )
- return *ret;
-
- return 0;
-}
-
-Node &
-Node::add_Child( const String & i_name )
-{
- DYN Node *
- pNew = new Node(i_name,*this);
- aChildren.insert( std::lower_bound( aChildren.begin(),
- aChildren.end(),
- pNew,
- C_Less_NodePtr ),
- pNew );
- return *pNew;
-}
-
-Node &
-Node::provide_Child( StringVector::const_iterator i_next,
- StringVector::const_iterator i_end )
-{
- if (i_next == i_end)
- return *this;
- return Provide_Child(*i_next).provide_Child(i_next+1,i_end);
-}
-
-
-
-
-Node &
-Node::Null_()
-{
- return C_aNullNode;
-}
-
-
-} // namespace output
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/out_position.cxx b/autodoc/source/display/toolkit/out_position.cxx
deleted file mode 100644
index 6753976e..00000000
--- a/autodoc/source/display/toolkit/out_position.cxx
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/out_position.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-namespace output
-{
-
-
-
-namespace
-{
-
-const int C_nAssumedMaxLinkLength = 500;
-
-void move_ToParent(
- Node * & io_node,
- intt i_levels = 1 );
-
-void
-move_ToParent( Node * & io_node,
- intt i_levels )
-{
- for ( intt n = 0; n < i_levels; ++n )
- {
- csv_assert(io_node != 0);
- io_node = io_node->Parent();
- }
-}
-
-
-
-} // namepace anonymous
-
-
-
-Position::Position()
- : sFile(),
- pDirectory(&Node::Null_())
-{
-}
-
-
-Position::Position( Node & i_directory,
- const String & i_file )
- : sFile(i_file),
- pDirectory(&i_directory)
-{
-}
-
-Position::Position( const Position & i_directory,
- const String & i_sDifferentFile )
- : sFile(i_sDifferentFile),
- pDirectory(i_directory.pDirectory)
-{
-}
-
-
-Position::~Position()
-{
-}
-
-
-Position &
-Position::operator=( Node & i_node )
-{
- pDirectory = &i_node;
- sFile.clear();
- return *this;
-}
-
-Position &
-Position::operator+=( const String & i_nodeName )
-{
- csv_assert(pDirectory != 0);
-
- pDirectory = &pDirectory->Provide_Child(i_nodeName);
- sFile.clear();
-
- return *this;
-}
-
-Position &
-Position::operator-=( intt i_levels )
-{
- csv_assert(pDirectory != 0);
-
- for ( intt i = i_levels; i > 0; --i )
- {
- pDirectory = pDirectory->Parent();
- if (pDirectory == 0)
- {
- pDirectory = &Node::Null_();
- i = 0;
- }
- }
- sFile.clear();
-
- return *this;
-}
-
-String
-Position::LinkToRoot( const String & ) const
-{
- StreamLock sl(C_nAssumedMaxLinkLength);
- return sl() << get_UpLink(Depth()) << c_str;
-}
-
-void
-Position::Get_LinkTo( StreamStr & o_result,
- const Position & i_destination,
- const String & i_localLabel ) const
-{
- Node * p1 = pDirectory;
- Node * p2 = i_destination.pDirectory;
-
- intt diff = Depth() - i_destination.Depth();
- intt pathLength1 = 0;
- intt pathLength2 = 0;
-
- if ( diff > 0 )
- {
- pathLength1 = diff;
- move_ToParent(p1,pathLength1);
- }
- else if ( diff < 0 )
- {
- pathLength2 = -diff;
- move_ToParent(p2,pathLength2);
- }
-
- while ( p1 != p2 )
- {
- move_ToParent(p1);
- move_ToParent(p2);
- ++pathLength1;
- ++pathLength2;
- }
-
- o_result << get_UpLink(pathLength1);
- i_destination.pDirectory->Get_Path(o_result, pathLength2);
- o_result << i_destination.sFile;
- if (i_localLabel.length())
- o_result << "#" << i_localLabel;
-}
-
-void
-Position::Get_LinkToRoot( StreamStr & o_result,
- const String & ) const
-{
- o_result << get_UpLink(Depth());
-}
-
-void
-Position::Set( Node & i_node,
- const String & i_file )
-{
- sFile = i_file;
- pDirectory = &i_node;
-}
-
-
-
-
-const char *
-get_UpLink(uintt i_depth)
-{
- static const uintt
- C_nMaxDepth = 30;
- static const char
- C_sUpLinkArray[3*C_nMaxDepth+1] =
- "../../../../../../../../../../"
- "../../../../../../../../../../"
- "../../../../../../../../../../";
- static const char *
- C_sUpLink = &C_sUpLinkArray[0];
-
- if ( i_depth <= C_nMaxDepth )
- {
- return C_sUpLink + 3*(C_nMaxDepth - i_depth);
- }
- else
- { // not THREAD fast
- static std::vector<char>
- aRet;
- uintt nNeededSize = i_depth * 3 + 1;
-
- if (aRet.size() < nNeededSize)
- {
- aRet.resize(nNeededSize);
- char * pEnd = &aRet[nNeededSize-1];
- *pEnd = '\0';
-
- for ( char * pFill = &(*aRet.begin());
- pFill != pEnd;
- pFill += 3 )
- {
- memcpy(pFill, C_sUpLink, 3);
- }
- } // end if
-
- return &aRet[aRet.size() - 1 - 3*i_depth];
- }
-}
-
-
-
-
-} // namespace output
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/out_tree.cxx b/autodoc/source/display/toolkit/out_tree.cxx
deleted file mode 100644
index ebe1228b..00000000
--- a/autodoc/source/display/toolkit/out_tree.cxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/out_tree.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-namespace output
-{
-
-Tree::Tree()
- : pRoot(new Node),
- pNamesRoot(pRoot.Ptr()),
- pIndexRoot(pRoot.Ptr()),
- pProjectsRoot(pRoot.Ptr()),
- aOverview()
-{
-}
-
-Tree::~Tree()
-{
-}
-
-
-
-} // namespace output
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/display/toolkit/outputstack.cxx b/autodoc/source/display/toolkit/outputstack.cxx
deleted file mode 100644
index 074c385d..00000000
--- a/autodoc/source/display/toolkit/outputstack.cxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <toolkit/outputstack.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-OutputStack::OutputStack()
-{
-}
-
-OutputStack::~OutputStack()
-{
-}
-
-void
-OutputStack::Enter( csi::xml::Element & io_rDestination )
-{
- aCurDestination.push(&io_rDestination);
-}
-
-void
-OutputStack::Leave()
-{
- csv_assert( NOT aCurDestination.empty() );
- aCurDestination.pop();
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cl.cxx b/autodoc/source/exes/adc_uni/adc_cl.cxx
deleted file mode 100644
index 9c6aa56e..00000000
--- a/autodoc/source/exes/adc_uni/adc_cl.cxx
+++ /dev/null
@@ -1,402 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adc_cl.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <algorithm>
-#include <cosv/x.hxx>
-#include <cosv/file.hxx>
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/ary.hxx>
-#include <tools/tkpchars.hxx>
-#include <adc_msg.hxx>
-#include "adc_cmds.hxx"
-#include "adc_cmd_parse.hxx"
-#include "cmd_sincedata.hxx"
-
-
-namespace autodoc
-{
-
-CommandLine * CommandLine::pTheInstance_ = 0;
-
-const char * const C_sUserGuide =
-"\n\n\n"
-" General Use of Autodoc\n"
-" ----------------------\n"
-"\n"
-" Example for C++:\n"
-"\n"
-" -html <OutputDirectory> -name \"UDK 3.x anything\" -lg c++\n"
-" -p <ProjName> <ProjectRootDirectory>\n"
-" -t <SourceDir_relativeToProjectRoot>\n"
-"\n"
-" There may be several projects specified by -p.\n"
-"\n"
-"\n"
-" Example for IDL:\n"
-"\n"
-" -html <OutputDirectory> -name \"UDK 3.x anything\" -lg idl\n"
-" -t <SourceDir1> <SourceDir2>\n"
-"\n"
-" For both languages, instead of or in addition to -t may be\n"
-" used -d (no subdirectories) or -f (just one file). There can\n"
-" be multiple arguments after each of these options (-t -d -f).\n"
-"\n"
-"\n"
-" Replacing @since Tag Content\n"
-" ----------------------------\n"
-"\n"
-" In both languages you can give a transformation file to replace\n"
-" entries in @since tags by different entries.\n"
-" This file is given by the option\n"
-" -sincefile <TransformationFilePath>\n"
-" This option has to appear between the -html and the -lg option.\n"
-" Example:\n"
-" -html <OutputDirectory> -sincefile replacesince.txt\n"
-" -name \"UDK 3.x anything\" -lg idl -t <SourceDir>\n"
-"\n"
-"\n";
-
-CommandLine::CommandLine()
- : nDebugStyle(0),
- pSinceTransformator(new command::SinceTagTransformationData),
- aCommands(),
- bInitOk(false),
- pCommand_CreateHtml(0),
- pReposy( & ary::Repository::Create_() ),
- bCpp(false),
- bIdl(false)
-{
- csv_assert(pTheInstance_ == 0);
- pTheInstance_ = this;
-}
-
-CommandLine::~CommandLine()
-{
- csv::erase_container_of_heap_ptrs(aCommands);
- pTheInstance_ = 0;
-}
-
-int
-CommandLine::Run() const
-{
- Cout() << "\nAutodoc version 2.2.5"
- << "\n---------------------"
- << "\n" << Endl();
-
- bool
- ok = true;
- for ( CommandList::const_iterator it = aCommands.begin();
- ok AND it != aCommands.end();
- ++it )
- {
- ok = (*it)->Run();
- }
-
- if (pCommand_CreateHtml != 0)
- {
- StreamStr aDiagnosticMessagesFile(700);
- aDiagnosticMessagesFile
- << pCommand_CreateHtml->OutputDir()
- << csv::ploc::Delimiter()
- << "Autodoc_DiagnosticMessages.txt";
- TheMessages().WriteFile(aDiagnosticMessagesFile.c_str());
- }
-
- return ok ? 0 : 1;
-}
-
-CommandLine &
-CommandLine::Get_()
-{
- csv_assert(pTheInstance_ != 0);
- return *pTheInstance_;
-}
-
-bool
-CommandLine::DoesTransform_SinceTag() const
-{
- return pSinceTransformator->DoesTransform();
-}
-
-//bool
-//CommandLine::Strip_SinceTagText( String & io_sSinceTagValue ) const
-//{
-// return pSinceTransformator->StripSinceTagText(io_sSinceTagValue);
-//}
-
-const String &
-CommandLine::DisplayOf_SinceTagValue( const String & i_sVersionNumber ) const
-{
- return pSinceTransformator->DisplayOf(i_sVersionNumber);
-}
-
-void
-CommandLine::do_Init( int argc,
- char * argv[] )
-{
- try
- {
- bInitOk = false;
- StringVector aParameters;
-
- char * * itpEnd = &argv[0] + argc;
- for ( char * * itp = &argv[1]; itp != itpEnd; ++itp )
- {
- if ( strncmp(*itp, "-I:", 3) != 0 )
- aParameters.push_back(String(*itp));
- else
- load_IncludedCommands(aParameters, (*itp)+3);
- }
-
- StringVector::const_iterator itEnd = aParameters.end();
- for ( StringVector::const_iterator it = aParameters.begin();
- it != itEnd;
- )
- {
- if ( *it == command::C_opt_Verbose )
- do_clVerbose(it,itEnd);
- else if ( *it == command::C_opt_LangAll
- OR *it == command::C_opt_Name
- OR *it == command::C_opt_DevmanFile )
- do_clParse(it,itEnd);
- else if (*it == command::C_opt_CreateHtml)
- do_clCreateHtml(it,itEnd);
- else if (*it == command::C_opt_SinceFile)
- do_clSinceFile(it,itEnd);
- else if (*it == command::C_opt_ExternNamespace)
- {
- sExternNamespace = *(++it);
- ++it;
- if ( strncmp(sExternNamespace.c_str(), "::", 2) != 0)
- {
- throw command::X_CommandLine(
- "-extnsp needs an absolute qualified namespace, starting with \"::\"."
- );
- }
- }
- else if (*it == command::C_opt_ExternRoot)
- {
- ++it;
- StreamLock sl(1000);
- if ( csv::compare(*it, 0, "http://", 7) != 0 )
- {
- sl() << "http://" << *it;
- }
- if ( *(sl().end()-1) != '/')
- sl() << '/';
- sExternRoot = sl().c_str();
-
- ++it;
- }
-// else if (*it == command::C_opt_CreateXml)
-// do_clCreateXml(it,itEnd);
-// else if (command::C_opt_Load)
-// do_clLoad(it,itEnd);
-// else if (*it == command::C_opt_Save)
-// do_clSave(it,itEnd);
- else if (*it == "-h" OR *it == "-?" OR *it == "?")
- // Leads to displaying help, because bInitOk stays on false.
- return;
- else if ( *it == command::C_opt_Parse )
- // Only for backwards compatibility.
- // Just ignore "-parse".
- ++it;
- else
- {
- StreamLock sl(200);
- throw command::X_CommandLine(
- sl() << "Unknown commandline option \""
- << *it
- << "\"."
- << c_str );
- }
- } // end for
- sort_Commands();
-
- bInitOk = true;
-
- } // end try
- catch ( command::X_CommandLine & xxx )
- {
- xxx.Report( Cerr() );
- }
- catch ( csv::Exception & xxx )
- {
- xxx.GetInfo( Cerr() );
- }
-}
-
-void
-CommandLine::do_PrintUse() const
-{
- Cout() << C_sUserGuide << Endl();
-}
-
-bool
-CommandLine::inq_CheckParameters() const
-{
- if (NOT bInitOk OR aCommands.size() == 0)
- return false;
- return true;
-}
-
-void
-CommandLine::load_IncludedCommands( StringVector & out,
- const char * i_filePath )
-{
- CharacterSource
- aIncludedCommands;
- csv::File
- aFile(i_filePath, csv::CFM_READ);
- if (NOT aFile.open())
- {
- Cerr() << "Command include file \""
- << i_filePath
- << "\" not found."
- << Endl();
- throw command::X_CommandLine("Invalid file in option -I:<command-file>.");
- }
- aIncludedCommands.LoadText(aFile);
- aFile.close();
-
- bool bInToken = false;
- StreamLock aTransmit(200);
- for ( ; NOT aIncludedCommands.IsFinished(); aIncludedCommands.MoveOn() )
- {
- if (bInToken)
- {
- if (aIncludedCommands.CurChar() <= 32)
- {
- const char *
- pToken = aIncludedCommands.CutToken();
- bInToken = false;
-
- if ( strncmp(pToken, "-I:", 3) != 0 )
- {
- aTransmit().seekp(0);
- aTransmit() << pToken;
- aTransmit().replace_all('\\', *csv::ploc::Delimiter());
- aTransmit().replace_all('/', *csv::ploc::Delimiter());
- out.push_back(String(aTransmit().c_str()));
- }
- else
- load_IncludedCommands(out, pToken+3);
- }
- }
- else
- {
- if (aIncludedCommands.CurChar() > 32)
- {
- aIncludedCommands.CutToken();
- bInToken = true;
- }
- } // endif (bInToken) else
-
- } // end while()
-}
-
-namespace
-{
-inline int
-v_nr(StringVector::const_iterator it)
-{
- return int( *(*it).c_str() ) - int('0');
-}
-} // anonymous namespace
-
-void
-CommandLine::do_clVerbose( opt_iter & it,
- opt_iter itEnd )
-{
- ++it;
- if ( it == itEnd ? true : v_nr(it) < 0 OR v_nr(it) > 7 )
- throw command::X_CommandLine( "Missing or invalid number in -v option." );
- nDebugStyle = v_nr(it);
- ++it;
-}
-
-void
-CommandLine::do_clParse( opt_iter & it,
- opt_iter itEnd )
-{
- command::Command *
- pCmd_Parse = new command::Parse;
- pCmd_Parse->Init(it, itEnd);
- aCommands.push_back(pCmd_Parse);
-}
-
-void
-CommandLine::do_clCreateHtml( opt_iter & it,
- opt_iter itEnd )
-{
- pCommand_CreateHtml = new command::CreateHtml;
- pCommand_CreateHtml->Init(it, itEnd);
- aCommands.push_back(pCommand_CreateHtml);
-}
-
-void
-CommandLine::do_clSinceFile( opt_iter & it,
- opt_iter itEnd )
-{
- pSinceTransformator->Init(it, itEnd);
-}
-
-
-namespace
-{
-
-struct Less_RunningRank
-{
- bool operator()(
- const command::Command * const &
- i1,
- const command::Command * const &
- i2 ) const
- { return i1->RunningRank() < i2->RunningRank(); }
-};
-
-} // anonymous namespace
-
-
-
-void
-CommandLine::sort_Commands()
-{
- std::sort( aCommands.begin(),
- aCommands.end(),
- Less_RunningRank() );
-}
-
-} // namespace autodoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmd.hxx b/autodoc/source/exes/adc_uni/adc_cmd.hxx
deleted file mode 100644
index 72e75ff8..00000000
--- a/autodoc/source/exes/adc_uni/adc_cmd.hxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADC_CMD_HXX
-#define ADC_ADC_CMD_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/comdline.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace autodoc
-{
-namespace command
-{
-
-/** Context for a command, which can be read from the command line.
-*/
-class Context
-{
- public:
- typedef StringVector::const_iterator opt_iter;
-
- virtual ~Context() {}
-
- void Init(
- opt_iter & it,
- opt_iter itEnd );
- private:
- virtual void do_Init(
- opt_iter & it,
- opt_iter itEnd ) = 0;
-};
-
-// IMPLEMENTATION
-inline void
-Context::Init( opt_iter & i_nCurArgsBegin,
- opt_iter i_nEndOfAllArgs )
-
-{ do_Init(i_nCurArgsBegin, i_nEndOfAllArgs); }
-
-
-
-/** Interface for commands, autodoc is able to perform.
-*/
-class Command : public Context
-{
- public:
- /** Running ranks of the commands are to be maintained at one location:
- Here!
- */
- enum E_Ranks
- {
- rank_Load = 10,
- rank_Parse = 20,
- rank_Save = 30,
- rank_CreateHtml = 40,
- rank_CreateXml = 50
- };
-
-
- bool Run() const;
- int RunningRank() const;
-
- private:
- virtual bool do_Run() const = 0;
- virtual int inq_RunningRank() const = 0;
-};
-
-// IMPLEMENTATION
-inline bool
-Command::Run() const
-{ return do_Run(); }
-inline int
-Command::RunningRank() const
-{ return inq_RunningRank(); }
-
-
-
-
-/** The exception thrown, if the command line is invalid.
-*/
-class X_CommandLine
-{
- public:
- X_CommandLine(
- const char * i_sExplanation )
- : sExplanation(i_sExplanation) {}
-
- void Report(
- std::ostream & o_rOut )
- { o_rOut << "Error in command line: "
- << sExplanation << Endl(); }
- private:
- String sExplanation;
-};
-
-
-
-
-} // namespace command
-} // namespace autodoc
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx b/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
deleted file mode 100644
index 1077c9cb..00000000
--- a/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
+++ /dev/null
@@ -1,345 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "adc_cmd_parse.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <adc_cl.hxx>
-#include "adc_cmds.hxx"
-#include "cmd_run.hxx"
-
-
-
-namespace autodoc
-{
-namespace command
-{
-
-namespace
-{
-
-const String C_FileEnding_hxx("*.hxx");
-const String C_FileEnding_h("*.h");
-const String C_FileEnding_idl("*.idl");
-const String C_FileEnding_java("*.java");
-
-inline void
-CHECK( bool b, const String & text )
-{
- if (NOT b)
- throw X_CommandLine( text );
-}
-
-} // anonymous namespace
-
-
-
-//************************** S_LanguageInfo ***********************//
-
-S_LanguageInfo::~S_LanguageInfo()
-{
-}
-
-void
-S_LanguageInfo::do_Init( opt_iter & it,
- opt_iter itEnd )
-{
- ++it; // Cur is language.
- CHECKOPT( it != itEnd AND
- ( *it == C_arg_Cplusplus OR
- *it == C_arg_Idl OR
- *it == C_arg_Java ),
- "language",
- C_opt_LangAll );
-
- if ( *it == C_arg_Cplusplus ) {
- eLanguage = cpp;
- }
- else if ( *it == C_arg_Idl ) {
- eLanguage = idl;
- }
- else if ( *it == C_arg_Java ) {
- eLanguage = java;
- }
- else {
- csv_assert(false);
- }
-
- switch (eLanguage)
- {
- case cpp: aExtensions.push_back( C_FileEnding_hxx );
- aExtensions.push_back( C_FileEnding_h );
- CommandLine::Get_().Set_CppUsed();
- break;
- case idl: aExtensions.push_back( C_FileEnding_idl );
- CommandLine::Get_().Set_IdlUsed();
- break;
- case java: aExtensions.push_back( C_FileEnding_java );
- break;
- default: // do nothing.
- ;
- }
-
- ++it; // Cur is next option.
-}
-
-void
-S_LanguageInfo::InitExtensions( opt_iter & it,
- opt_iter itEnd )
-{
- ++it;
- CHECKOPT( it != itEnd AND (*it).char_at(0) == '.',
- "extensions",
- C_opt_ExtensionsAll );
-
- StreamLock slCheck(150);
- slCheck() << C_opt_ExtensionsAll
- << " used without previous "
- << C_opt_LangAll;
-
- CHECK( eLanguage != none,
- slCheck().c_str() );
-
- do {
- aExtensions.push_back(*it);
- ++it;
- } while (it != itEnd AND (*it).char_at(0) == '.');
-}
-
-
-
-//************************** Parse ***********************//
-
-Parse::Parse()
- : sRepositoryName(),
- aGlobalLanguage(),
- aProjects(),
- sDevelopersManual_RefFilePath()
-{
-}
-
-Parse::~Parse()
-{
- csv::erase_container_of_heap_ptrs(aProjects);
-}
-
-void
-Parse::do_Init( opt_iter & it,
- opt_iter itEnd )
-{
- for ( ; it != itEnd; )
- {
- if (*it == C_opt_Name)
- do_clName(it, itEnd);
- else if (*it == C_opt_LangAll)
- aGlobalLanguage.Init(it, itEnd);
- else if (*it == C_opt_ExtensionsAll)
- aGlobalLanguage.InitExtensions(it, itEnd);
- else if (*it == C_opt_DevmanFile)
- do_clDevManual(it, itEnd);
- else if (*it == C_opt_Project)
- do_clProject(it, itEnd);
- else if ( *it == C_opt_SourceTree
- OR *it == C_opt_SourceDir
- OR *it == C_opt_SourceFile )
- do_clDefaultProject(it, itEnd);
- else
- break;
- } // for
-}
-
-void
-Parse::do_clName( opt_iter & it,
- opt_iter itEnd )
-{
- ++it;
- CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
- "name",
- C_opt_Name );
- sRepositoryName = *it;
- ++it;
-}
-
-void
-Parse::do_clDevManual( opt_iter & it,
- opt_iter itEnd )
-{
- ++it;
- CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
- "link file path",
- C_opt_DevmanFile );
- sDevelopersManual_RefFilePath = *it;
- ++it;
-}
-
-void
-Parse::do_clProject( opt_iter & it,
- opt_iter itEnd )
-{
- if ( aProjects.size() == 1 )
- {
- if ( aProjects.front()->IsDefault() )
- throw X_CommandLine( "Both, named projects and a default project, cannot be used together." );
- }
-
- S_ProjectData * dpProject = new S_ProjectData(aGlobalLanguage);
- ++it;
- dpProject->Init(it, itEnd);
- aProjects.push_back(dpProject);
-}
-
-void
-Parse::do_clDefaultProject( opt_iter & it,
- opt_iter itEnd )
-{
- if ( !aProjects.empty() )
- {
- throw X_CommandLine( "Both, named projects and a default project, cannot be used together." );
- }
-
- S_ProjectData * dpProject = new S_ProjectData( aGlobalLanguage,
- S_ProjectData::default_prj );
- dpProject->Init(it, itEnd);
- aProjects.push_back(dpProject);
-}
-
-bool
-Parse::do_Run() const
-{
- run::Parser
- aParser(*this);
- return aParser.Perform();
-}
-
-int
-Parse::inq_RunningRank() const
-{
- return static_cast<int>(rank_Parse);
-}
-
-
-
-//************************** S_Sources ***********************//
-
-void
-S_Sources::do_Init( opt_iter & it,
- opt_iter itEnd )
-{
- StringVector *
- pList = 0;
- csv_assert((*it)[0] == '-');
-
- for ( ; it != itEnd; ++it)
- {
- if ((*it)[0] == '-')
- {
- if (*it == C_opt_SourceTree)
- pList = &aTrees;
- else if (*it == C_opt_SourceDir)
- pList = &aDirectories;
- else if (*it == C_opt_SourceFile)
- pList = &aFiles;
- else
- return;
- }
- else
- pList->push_back(*it);
- } // end for
-}
-
-
-
-//************************** S_ProjectData ***********************//
-
-
-S_ProjectData::S_ProjectData( const S_LanguageInfo & i_globalLanguage )
- : sName(),
- aRootDirectory(),
- aLanguage(i_globalLanguage),
- aFiles(),
- bIsDefault(false)
-{
-}
-
-S_ProjectData::S_ProjectData( const S_LanguageInfo & i_globalLanguage,
- E_Default )
- : sName(),
- aRootDirectory("."),
- aLanguage(i_globalLanguage),
- aFiles(),
- bIsDefault(true)
-{
-}
-
-S_ProjectData::~S_ProjectData()
-{
-}
-
-void
-S_ProjectData::do_Init( opt_iter & it,
- opt_iter itEnd )
-{
- if (NOT IsDefault())
- {
- CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
- "name",
- C_opt_Project );
- sName = *it;
- ++it;
-
- CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
- "root directory",
- C_opt_Project );
- aRootDirectory.Set((*it).c_str(), true);
- ++it;
- }
-
- for ( ; it != itEnd; )
- {
- if ( *it == C_opt_SourceTree
- OR *it == C_opt_SourceDir
- OR *it == C_opt_SourceFile )
- aFiles.Init(it, itEnd);
-// else if (*it == C_opt_Lang)
-// aLanguage.Init(it, itEnd);
-// else if (*it == C_opt_Extensions)
-// aLanguage.InitExtensions(it, itEnd);
- else
- break;
- } // for
-}
-
-} // namespace command
-} // namespace autodoc
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmd_parse.hxx b/autodoc/source/exes/adc_uni/adc_cmd_parse.hxx
deleted file mode 100644
index 0f15f49a..00000000
--- a/autodoc/source/exes/adc_uni/adc_cmd_parse.hxx
+++ /dev/null
@@ -1,211 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADC_CMD_PARSE_HXX
-#define ADC_ADC_CMD_PARSE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "adc_cmd.hxx"
- // COMPONENTS
-#include <cosv/ploc.hxx>
- // PARAMETERS
-
-namespace autodoc
-{
-namespace command
-{
-
-/** A command context which holds the currently parsed programing language
- and its valid file extensions.
-*/
-struct S_LanguageInfo : public Context
-{
- enum E_ProgrammingLanguage
- {
- none,
- cpp,
- idl,
- java
- };
- S_LanguageInfo()
- : eLanguage(none),
- aExtensions() {}
- ~S_LanguageInfo();
-
- void InitExtensions(
- opt_iter & it,
- opt_iter itEnd );
- // DATA
- E_ProgrammingLanguage
- eLanguage;
- StringVector aExtensions; // An empty string is possible and means exactly that: files without extension.
-
- private:
- // Interface Context:
- virtual void do_Init(
- opt_iter & it,
- opt_iter itEnd );
-};
-
-
-class S_ProjectData;
-
-
-/** A command that parses source code into the Autodoc Repository.
-*/
-class Parse : public Command
-{
- public:
- typedef std::vector< DYN S_ProjectData * > ProjectList;
- typedef ProjectList::const_iterator ProjectIterator;
-
- Parse();
- ~Parse();
-
- // INQUIRY
- const String & ReposyName() const;
- const S_LanguageInfo &
- GlobalLanguage() const;
- ProjectIterator ProjectsBegin() const;
- ProjectIterator ProjectsEnd() const;
- const String & DevelopersManual_RefFilePath() const
- { return sDevelopersManual_RefFilePath; }
-
- private:
- // Interface Context:
- virtual void do_Init(
- opt_iter & i_nCurArgsBegin,
- opt_iter i_nEndOfAllArgs );
- // Interface Command:
- virtual bool do_Run() const;
- virtual int inq_RunningRank() const;
-
- // Locals
- void do_clName(
- opt_iter & it,
- opt_iter itEnd );
- void do_clDevManual(
- opt_iter & it,
- opt_iter itEnd );
- void do_clProject(
- opt_iter & it,
- opt_iter itEnd );
- void do_clDefaultProject(
- opt_iter & it,
- opt_iter itEnd );
-
- // DATA
- String sRepositoryName;
- S_LanguageInfo aGlobalLanguage;
-
- ProjectList aProjects;
-
- String sDevelopersManual_RefFilePath;
-};
-
-inline const String &
-Parse::ReposyName() const
- { return sRepositoryName; }
-inline const S_LanguageInfo &
-Parse::GlobalLanguage() const
- { return aGlobalLanguage; }
-inline Parse::ProjectIterator
-Parse::ProjectsBegin() const
- { return aProjects.begin(); }
-inline Parse::ProjectIterator
-Parse::ProjectsEnd() const
- { return aProjects.end(); }
-//inline const String &
-//Parse::DevelopersManual_RefFilePath() const
-// { return sDevelopersManual_RefFilePath; }
-//inline const String &
-//Parse::DevelopersManual_HtmlRoot() const
-// { return sDevelopersManual_HtmlRoot; }
-
-
-struct S_Sources : public Context
-{
- StringVector aTrees;
- StringVector aDirectories;
- StringVector aFiles;
-
- private:
- // Interface Context:
- virtual void do_Init(
- opt_iter & it,
- opt_iter itEnd );
-};
-
-class S_ProjectData : public Context
-{
- public:
- enum E_Default { default_prj };
-
- S_ProjectData(
- const S_LanguageInfo &
- i_globalLanguage );
- S_ProjectData(
- const S_LanguageInfo &
- i_globalLanguage,
- E_Default unused );
- ~S_ProjectData();
-
- bool IsDefault() const { return bIsDefault; }
- const String & Name() const { return sName; }
- const csv::ploc::Path &
- RootDirectory() const { return aRootDirectory; }
- const S_LanguageInfo &
- Language() const { return aLanguage; }
- const S_Sources Sources() const { return aFiles; }
-
- private:
- // Interface Context:
- virtual void do_Init(
- opt_iter & it,
- opt_iter itEnd );
- // Locals
-
- // DATA
- String sName;
- csv::ploc::Path aRootDirectory;
- S_LanguageInfo aLanguage;
- S_Sources aFiles;
- bool bIsDefault;
-};
-
-
-} // namespace command
-} // namespace autodoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmds.cxx b/autodoc/source/exes/adc_uni/adc_cmds.cxx
deleted file mode 100644
index c54adea0..00000000
--- a/autodoc/source/exes/adc_uni/adc_cmds.cxx
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "adc_cmds.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary.hxx>
-#include <autodoc/displaying.hxx>
-#include <autodoc/dsp_html_std.hxx>
-#include <display/corframe.hxx>
-#include <adc_cl.hxx>
-
-
-namespace autodoc
-{
-namespace command
-{
-
-extern const String C_opt_Include("-I:");
-
-extern const String C_opt_Verbose("-v");
-
-extern const String C_opt_Parse("-parse");
-extern const String C_opt_Name("-name");
-extern const String C_opt_LangAll("-lg");
-extern const String C_opt_ExtensionsAll("-extg");
-extern const String C_opt_DevmanFile("-dvgfile");
-extern const String C_opt_SinceFile("-sincefile");
-
-extern const String C_arg_Cplusplus("c++");
-extern const String C_arg_Idl("idl");
-extern const String C_arg_Java("java");
-
-extern const String C_opt_Project("-p");
-//extern const String C_opt_Lang;
-//extern const String C_opt_Extensions;
-extern const String C_opt_SourceDir("-d");
-extern const String C_opt_SourceTree("-t");
-extern const String C_opt_SourceFile("-f");
-
-extern const String C_opt_CreateHtml("-html");
-extern const String C_opt_DevmanRoot("-dvgroot");
-
-//extern const String C_opt_CreateXml("-xml");
-//extern const String C_opt_Load("-load");
-//extern const String C_opt_Save("-save");
-
-extern const String C_opt_ExternNamespace("-extnsp");
-extern const String C_opt_ExternRoot("-extroot");
-
-
-
-//************************** CreateHTML ***********************//
-
-CreateHtml::CreateHtml()
- : sOutputRootDirectory(),
- sDevelopersManual_HtmlRoot()
-{
-}
-
-CreateHtml::~CreateHtml()
-{
-}
-
-void
-CreateHtml::do_Init( opt_iter & it,
- opt_iter itEnd )
-{
- ++it;
- CHECKOPT( it != itEnd && (*it).char_at(0) != '-',
- "output directory", C_opt_CreateHtml );
- sOutputRootDirectory = *it;
-
- for ( ++it;
- it != itEnd AND (*it == C_opt_DevmanRoot);
- ++it )
- {
- if (*it == C_opt_DevmanRoot)
- {
- ++it;
- CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
- "HTML root directory of Developers Guide",
- C_opt_DevmanRoot );
- sDevelopersManual_HtmlRoot = *it;
- }
- } // end for
-}
-
-bool
-CreateHtml::do_Run() const
-{
- if ( CommandLine::Get_().IdlUsed() )
- run_Idl();
- if ( CommandLine::Get_().CppUsed() )
- run_Cpp();
- return true;
-}
-
-int
-CreateHtml::inq_RunningRank() const
-{
- return static_cast<int>(rank_CreateHtml);
-}
-
-void
-CreateHtml::run_Idl() const
-{
- const ary::idl::Gate &
- rGate = CommandLine::Get_().TheRepository().Gate_Idl();
-
- Cout() << "Creating HTML-output into the directory "
- << sOutputRootDirectory
- << "."
- << Endl();
-
- const DisplayToolsFactory_Ifc &
- rToolsFactory = DisplayToolsFactory_Ifc::GetIt_();
- Dyn<autodoc::HtmlDisplay_Idl_Ifc>
- pDisplay( rToolsFactory.Create_HtmlDisplay_Idl() );
-
- DYN display::CorporateFrame & // KORR_FUTURE: Remove the need for const_cast
- drFrame = const_cast< display::CorporateFrame& >(rToolsFactory.Create_StdFrame());
- if (NOT DevelopersManual_HtmlRoot().empty())
- drFrame.Set_DevelopersGuideHtmlRoot( DevelopersManual_HtmlRoot() );
-
- pDisplay->Run( sOutputRootDirectory,
- rGate,
- drFrame );
-}
-
-void
-CreateHtml::run_Cpp() const
-{
- const ary::Repository &
- rReposy = CommandLine::Get_().TheRepository();
- const ary::cpp::Gate &
- rGate = rReposy.Gate_Cpp();
-
- const DisplayToolsFactory_Ifc &
- rToolsFactory = DisplayToolsFactory_Ifc::GetIt_();
- Dyn< autodoc::HtmlDisplay_UdkStd >
- pDisplay( rToolsFactory.Create_HtmlDisplay_UdkStd() );
-
- pDisplay->Run( sOutputRootDirectory,
- rGate,
- rToolsFactory.Create_StdFrame() );
-}
-
-
-} // namespace command
-} // namespace autodoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmds.hxx b/autodoc/source/exes/adc_uni/adc_cmds.hxx
deleted file mode 100644
index 784a5040..00000000
--- a/autodoc/source/exes/adc_uni/adc_cmds.hxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADC_CMDS_HXX
-#define ADC_ADC_CMDS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "adc_cmd.hxx"
- // COMPONENTS
- // PARAMETERS
-
-namespace autodoc
-{
-namespace command
-{
-
-
-/** A command that produces HTML output from the Autodoc Repository.
-*/
-class CreateHtml : public Command
-{
- public:
- CreateHtml();
- ~CreateHtml();
-
- const String & OutputDir() const;
- const String & DevelopersManual_HtmlRoot() const
- { return sDevelopersManual_HtmlRoot; }
-
- private:
- // Interface Context:
- virtual void do_Init(
- opt_iter & i_nCurArgsBegin,
- opt_iter i_nEndOfAllArgs );
- // Interface Command:
- virtual bool do_Run() const;
- virtual int inq_RunningRank() const;
-
- // Locals
- void run_Cpp() const;
- void run_Idl() const;
-
- // DATA
- String sOutputRootDirectory;
- String sDevelopersManual_HtmlRoot;
-};
-
-inline const String &
-CreateHtml::OutputDir() const
- { return sOutputRootDirectory; }
-
-
-extern const String C_opt_Verbose;
-
-extern const String C_opt_Parse;
-extern const String C_opt_Name;
-extern const String C_opt_LangAll;
-extern const String C_opt_ExtensionsAll;
-extern const String C_opt_DevmanFile;
-extern const String C_opt_SinceFile;
-
-extern const String C_arg_Cplusplus;
-extern const String C_arg_Idl;
-extern const String C_arg_Java;
-
-extern const String C_opt_Project;
-//extern const String C_opt_Lang;
-//extern const String C_opt_Extensions;
-extern const String C_opt_SourceTree;
-extern const String C_opt_SourceDir;
-extern const String C_opt_SourceFile;
-
-extern const String C_opt_CreateHtml;
-extern const String C_opt_DevmanRoot;
-
-//extern const String C_opt_CreateXml;
-//extern const String C_opt_Load;
-//extern const String C_opt_Save;
-
-extern const String C_opt_ExternNamespace;
-extern const String C_opt_ExternRoot;
-
-
-inline void
-CHECKOPT( bool b, const char * miss, const String & opt )
-{
- if ( NOT b )
- {
- StreamLock slMsg(100);
- throw X_CommandLine( slMsg() << "Missing " << miss <<" after " << opt << "." << c_str );
- }
-}
-
-} // namespace command
-} // namespace autodoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_msg.cxx b/autodoc/source/exes/adc_uni/adc_msg.cxx
deleted file mode 100644
index 15f8377f..00000000
--- a/autodoc/source/exes/adc_uni/adc_msg.cxx
+++ /dev/null
@@ -1,211 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adc_msg.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/file.hxx>
-#include <cosv/tpl/tpltools.hxx>
-
-
-namespace autodoc
-{
-
-
-Messages::Messages()
- : aMissingDocs(),
- aParseErrors(),
- aInvalidConstSymbols(),
- aUnresolvedLinks(),
- aTypeVsMemberMisuses()
-{
-}
-
-Messages::~Messages()
-{
-}
-
-void
-Messages::WriteFile(const String & i_sOutputFilePath)
-{
- csv::File
- aOut(i_sOutputFilePath, csv::CFM_CREATE);
- aOut.open();
-
- // KORR_FUTURE Enable this when appropriate:
- WriteParagraph( aOut,
- aParseErrors,
- "Incompletely Parsed Files",
- "Stopped parsing at " );
-
- WriteParagraph( aOut,
- aMissingDocs,
- "Entities Without Documentation",
- " in " );
-
- WriteParagraph( aOut,
- aInvalidConstSymbols,
- "Incorrectly Written Const Symbols",
- " in " );
-
- WriteParagraph( aOut,
- aUnresolvedLinks,
- "Unresolved Links",
- " in\n " );
-
- WriteParagraph( aOut,
- aTypeVsMemberMisuses,
- "Confusion or Misuse of <Type> vs. <Member>",
- " in " );
- aOut.close();
-}
-
-void
-Messages::Out_MissingDoc( const String & i_sEntity,
- const String & i_sFile,
- uintt i_nLine)
-{
- AddValue( aMissingDocs,
- i_sEntity,
- i_sFile,
- i_nLine );
-}
-
-void
-Messages::Out_ParseError( const String & i_sFile,
- uintt i_nLine)
-{
- aParseErrors[Location(i_sFile,i_nLine)] = String::Null_();
-}
-
-void
-Messages::Out_InvalidConstSymbol( const String & i_sText,
- const String & i_sFile,
- uintt i_nLine)
-{
- AddValue( aInvalidConstSymbols,
- i_sText,
- i_sFile,
- i_nLine );
-}
-
-void
-Messages::Out_UnresolvedLink( const String & i_sLinkText,
- const String & i_sFile,
- uintt i_nLine)
-{
- AddValue( aUnresolvedLinks,
- i_sLinkText,
- i_sFile,
- i_nLine );
-}
-
-void
-Messages::Out_TypeVsMemberMisuse( const String & i_sLinkText,
- const String & i_sFile,
- uintt i_nLine)
-{
- AddValue( aTypeVsMemberMisuses,
- i_sLinkText,
- i_sFile,
- i_nLine );
-}
-
-Messages &
-Messages::The_()
-{
- static Messages TheMessages_;
- return TheMessages_;
-}
-
-void
-Messages::AddValue( MessageMap & o_dest,
- const String & i_sText,
- const String & i_sFile,
- uintt i_nLine )
-{
- String &
- rDest = o_dest[Location(i_sFile,i_nLine)];
- StreamLock
- slDest(2000);
- if (NOT rDest.empty())
- slDest() << rDest;
- slDest() << "\n " << i_sText;
- rDest = slDest().c_str();
-}
-
-void
-Messages::WriteParagraph( csv::File & o_out,
- const MessageMap & i_source,
- const String & i_title,
- const String & )
-{
- StreamStr aLine(2000);
-
- // Write title of paragraph:
- aLine << i_title
- << "\n";
- o_out.write(aLine.c_str());
-
- aLine.seekp(0);
- for (uintt i = i_title.size(); i > 0; --i)
- {
- aLine << '-';
- }
- aLine << "\n\n";
- o_out.write(aLine.c_str());
-
- // Write Content
- MessageMap::const_iterator it = i_source.begin();
- MessageMap::const_iterator itEnd = i_source.end();
- for ( ; it != itEnd; ++it )
- {
- aLine.seekp(0);
- aLine << (*it).first.sFile;
- // Nobody wants to see this, if we don't know the line:
- if ((*it).first.nLine != 0)
- {
- aLine << ", line "
- << (*it).first.nLine;
- }
- if (NOT (*it).second.empty())
- {
- aLine << ':'
- << (*it).second
- << "\n";
- }
- o_out.write(aLine.c_str());
- }
- o_out.write("\n\n\n");
-}
-
-} // namespace autodoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_run.cxx b/autodoc/source/exes/adc_uni/cmd_run.cxx
deleted file mode 100644
index 24eb9f40..00000000
--- a/autodoc/source/exes/adc_uni/cmd_run.cxx
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cmd_run.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/file.hxx>
-#include <cosv/x.hxx>
-#include <ary/ary.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <autodoc/filecoli.hxx>
-#include <autodoc/parsing.hxx>
-#include <autodoc/prs_code.hxx>
-#include <autodoc/prs_docu.hxx>
-#include <parser/unoidl.hxx>
-#include <adc_cl.hxx>
-#include "adc_cmd_parse.hxx"
-#include "adc_cmds.hxx"
-
-namespace autodoc
-{
-namespace command
-{
-namespace run
-{
-
-Parser::Parser( const Parse & i_command )
- : rCommand(i_command),
- pCppParser(),
- pCppDocuInterpreter(),
- pIdlParser()
-{
-}
-
-Parser::~Parser()
-{
-}
-
-bool
-Parser::Perform()
-{
- Cout() << "Parsing the repository "
- << rCommand.ReposyName()
- << " ..."
- << Endl();
- try
- {
- ::ary::Repository &
- rAry = CommandLine::Get_().TheRepository();
- rAry.Set_Title(rCommand.ReposyName());
-
- Dyn< FileCollector_Ifc >
- pFiles( ParseToolsFactory().Create_FileCollector(6000) );
-
- bool bIDL = false;
- bool bCpp = false;
-
- command::Parse::ProjectIterator
- itEnd = rCommand.ProjectsEnd();
- for ( command::Parse::ProjectIterator it = rCommand.ProjectsBegin();
- it != itEnd;
- ++it )
- {
- uintt nCount = GatherFiles( *pFiles, *(*it) );
- Cout() << nCount
- << " files found to parse in project "
- << (*it)->Name()
- << "."
- << Endl();
-
- switch ( (*it)->Language().eLanguage )
- {
- case command::S_LanguageInfo::idl:
- {
- Get_IdlParser().Run(*pFiles);
- bIDL = true;
- } break;
- case command::S_LanguageInfo::cpp:
- {
- Get_CppParser().Run( *pFiles );
- bCpp = true;
- } break;
- default:
- Cerr() << "Project in yet unimplemented language skipped."
- << Endl();
- }
- } // end for
-
- if (bCpp)
- {
- rAry.Gate_Cpp().Calculate_AllSecondaryInformation();
- }
- if (bIDL)
- {
- rAry.Gate_Idl().Calculate_AllSecondaryInformation(
- rCommand.DevelopersManual_RefFilePath() );
-
-// ::ary::idl::SecondariesPilot &
-// rIdl2sPilot = rAry.Gate_Idl().Secondaries();
-//
-// rIdl2sPilot.CheckAllInterfaceBases( rAry.Gate_Idl() );
-// rIdl2sPilot.Connect_Types2Ces();
-// rIdl2sPilot.Gather_CrossReferences();
-//
-// if (NOT rCommand.DevelopersManual_RefFilePath().empty())
-// {
-// csv::File
-// aFile(rCommand.DevelopersManual_RefFilePath(), csv::CFM_READ);
-// if ( aFile.open() )
-// {
-// rIdl2sPilot.Read_Links2DevManual(aFile);
-// aFile.close();
-// }
-// }
- } // endif (bIDL)
-
- return true;
-
- } // end try
- catch (csv::Exception & xx)
- {
- xx.GetInfo(Cerr());
- Cerr() << " program will exit." << Endl();
-
- return false;
- }
-}
-
-CodeParser_Ifc &
-Parser::Get_CppParser()
-{
- if ( NOT pCppParser )
- Create_CppParser();
- return *pCppParser;
-}
-
-IdlParser &
-Parser::Get_IdlParser()
-{
- if ( NOT pIdlParser )
- Create_IdlParser();
- return *pIdlParser;
-}
-
-void
-Parser::Create_CppParser()
-{
- pCppParser = ParseToolsFactory().Create_Parser_Cplusplus();
- pCppDocuInterpreter = ParseToolsFactory().Create_DocuParser_AutodocStyle();
-
- pCppParser->Setup( CommandLine::Get_().TheRepository(),
- *pCppDocuInterpreter );
-}
-
-void
-Parser::Create_IdlParser()
-{
- pIdlParser = new IdlParser(CommandLine::Get_().TheRepository());
-}
-
-const ParseToolsFactory_Ifc &
-Parser::ParseToolsFactory()
-{
- return ParseToolsFactory_Ifc::GetIt_();
-}
-
-uintt
-Parser::GatherFiles( FileCollector_Ifc & o_rFiles,
- const S_ProjectData & i_rProject )
-{
- uintt ret = 0;
- o_rFiles.EraseAll();
-
- typedef StringVector StrVector;
- typedef StrVector::const_iterator StrIterator;
- const S_Sources &
- rSources = i_rProject.Sources();
- const StrVector &
- rExtensions = i_rProject.Language().aExtensions;
-
- StrIterator it;
- StrIterator itTreesEnd = rSources.aTrees.end();
- StrIterator itDirsEnd = rSources.aDirectories.end();
- StrIterator itFilesEnd = rSources.aFiles.end();
- StrIterator itExt;
- StrIterator itExtEnd = rExtensions.end();
-
- csv::StreamStr aDir(500);
- i_rProject.RootDirectory().Get( aDir );
-
- uintt nProjectDir_AddPosition =
- ( strcmp(aDir.c_str(),".\\") == 0 OR strcmp(aDir.c_str(),"./") == 0 )
- ? 0
- : uintt( aDir.tellp() );
-
- for ( it = rSources.aDirectories.begin();
- it != itDirsEnd;
- ++it )
- {
- aDir.seekp( nProjectDir_AddPosition );
- aDir << *it;
-
- for ( itExt = rExtensions.begin();
- itExt != itExtEnd;
- ++itExt )
- {
- ret += o_rFiles.AddFilesFrom( aDir.c_str(),
- *itExt,
- FileCollector_Ifc::flat );
- } // end for itExt
- } // end for it
- for ( it = rSources.aTrees.begin();
- it != itTreesEnd;
- ++it )
- {
- aDir.seekp( nProjectDir_AddPosition );
- aDir << *it;
-
- for ( itExt = rExtensions.begin();
- itExt != itExtEnd;
- ++itExt )
- {
- ret += o_rFiles.AddFilesFrom( aDir.c_str(),
- *itExt,
- FileCollector_Ifc::recursive );
- } // end for itExt
- } // end for it
- for ( it = rSources.aFiles.begin();
- it != itFilesEnd;
- ++it )
- {
- aDir.seekp( nProjectDir_AddPosition );
- aDir << *it;
-
- o_rFiles.AddFile( aDir.c_str() );
- } // end for it
- ret += rSources.aFiles.size();
-
- return ret;
-}
-
-
-} // namespace run
-} // namespace command
-} // namespace autodoc
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_run.hxx b/autodoc/source/exes/adc_uni/cmd_run.hxx
deleted file mode 100644
index c316037a..00000000
--- a/autodoc/source/exes/adc_uni/cmd_run.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CMD_RUN_HXX
-#define ADC_CMD_RUN_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/comdline.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
- class Repository;
-}
-
-namespace autodoc
-{
- class FileCollector_Ifc;
- class ParseToolsFactory_Ifc;
- class CodeParser_Ifc;
- class DocumentationParser_Ifc;
- class IdlParser;
-
-
-namespace command
-{
- class Parse;
- class S_ProjectData;
- struct S_LanguageInfo;
-
-namespace run
-{
-
-/** Performs an ::autodoc::command::Parse .
-*/
-class Parser
-{
- public:
- Parser(
- const Parse & i_command );
- ~Parser();
-
- bool Perform();
-
- private:
- // Locals
- CodeParser_Ifc & Get_CppParser();
- IdlParser & Get_IdlParser();
- void Create_CppParser();
- void Create_IdlParser();
- const ParseToolsFactory_Ifc &
- ParseToolsFactory();
- uintt GatherFiles(
- FileCollector_Ifc & o_rFiles,
- const S_ProjectData &
- i_rProject );
- // DATA
- const Parse & rCommand;
-
- Dyn<CodeParser_Ifc> pCppParser;
- Dyn<DocumentationParser_Ifc>
- pCppDocuInterpreter;
- Dyn<IdlParser> pIdlParser;
-};
-
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace run
-} // namespace command
-} // namespace autodoc
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_sincedata.cxx b/autodoc/source/exes/adc_uni/cmd_sincedata.cxx
deleted file mode 100644
index bb21028e..00000000
--- a/autodoc/source/exes/adc_uni/cmd_sincedata.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cmd_sincedata.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/file.hxx>
-#include <cosv/tpl/tpltools.hxx>
-#include "adc_cmds.hxx"
-
-
-
-namespace autodoc
-{
-namespace command
-{
-
-SinceTagTransformationData::SinceTagTransformationData()
- : aTransformationTable()
-{
-}
-
-SinceTagTransformationData::~SinceTagTransformationData()
-{
-}
-
-bool
-SinceTagTransformationData::DoesTransform() const
-{
- return NOT aTransformationTable.empty();
-}
-
-const String &
-SinceTagTransformationData::DisplayOf( const String & i_versionNumber ) const
-{
- if (DoesTransform())
- {
- StreamLock
- sl(200);
- sl() << i_versionNumber;
- sl().strip_frontback_whitespace();
- String
- sVersionNumber(sl().c_str());
-
- const String *
- ret = csv::find_in_map(aTransformationTable, sVersionNumber);
- return ret != 0
- ? *ret
- : String::Null_();
- }
- else
- {
- return i_versionNumber;
- }
-}
-
-void
-SinceTagTransformationData::do_Init( opt_iter & it,
- opt_iter itEnd )
-{
- ++it; // Cur is since-file path.
-
- CHECKOPT( it != itEnd ,
- "file path",
- C_opt_SinceFile );
-
- csv::File aSinceFile(*it);
- csv::OpenCloseGuard aSinceFileGuard(aSinceFile);
- StreamStr sLine(200);
-
- if (aSinceFileGuard)
- {
- for ( sLine.operator_read_line(aSinceFile);
- NOT sLine.empty();
- sLine.operator_read_line(aSinceFile) )
- {
-
- if (*sLine.begin() != '"')
- continue;
-
- const char * pVersion = sLine.c_str() + 1;
- const char * pVersionEnd = strchr(pVersion, '"');
- if (pVersionEnd == 0)
- continue;
- const char * pDisplay = strchr(pVersionEnd+1, '"');
- if (pDisplay == 0)
- continue;
- ++pDisplay;
- const char * pDisplayEnd = strchr(pDisplay, '"');
- if (pDisplayEnd == 0)
- continue;
-
- aTransformationTable[ String(pVersion,pVersionEnd) ]
- = String(pDisplay,pDisplayEnd);
- sLine.clear();
- } // end for
- } // end if
-
- ++it; // Cur is next option.
-}
-
-} // namespace command
-} // namespace autodoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_sincedata.hxx b/autodoc/source/exes/adc_uni/cmd_sincedata.hxx
deleted file mode 100644
index f6bb5cac..00000000
--- a/autodoc/source/exes/adc_uni/cmd_sincedata.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CMD_SINCEDATA_HXX
-#define ADC_CMD_SINCEDATA_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "adc_cmd.hxx"
- // COMPONENTS
- // PARAMETERS
-
-namespace autodoc
-{
-namespace command
-{
-
-
-/** Provides replacements for the contents of the @@since documentation tag.
-
- Because the @@since tag is part of the source code, it allows only one kind
- of version information there. If this is to be mapped for different products
- (example: from OpenOffice.org versions in the @@since tag to StarOffice or
- StarSuite products), the value of @@since needs a replacement, which is provided
- by this class.
-
-*/
-class SinceTagTransformationData : public Context
-{
- public:
- /** The key of this map are the version numbers within @since.
- The value is the string to display for each version number.
- */
- typedef std::map<String,String> Map_Version2Display;
-
- // LIFECYCLE
- SinceTagTransformationData();
- virtual ~SinceTagTransformationData();
-
- // INQUIRY
- /// False, if no transformation table exists.
- bool DoesTransform() const;
-
- /** Gets the string to display for a version number.
-
- @param i_sVersionNumber
- Usually should be the result of ->StripSinceTagValue().
- */
- const String & DisplayOf(
- const String & i_sVersionNumber ) const;
- private:
- // Interface Context:
- virtual void do_Init(
- opt_iter & i_nCurArgsBegin,
- opt_iter i_nEndOfAllArgs );
- // DATA
- Map_Version2Display aTransformationTable;
-};
-
-
-} // namespace command
-} // namespace autodoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/main.cxx b/autodoc/source/exes/adc_uni/main.cxx
deleted file mode 100644
index f0f0b89d..00000000
--- a/autodoc/source/exes/adc_uni/main.cxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-
-
-// NOT FULLY DECLARED SERVICES
-
-#include <adc_cl.hxx>
-#include "cmd_run.hxx"
-
-
-int
-#ifdef WNT
- _cdecl
-#endif
-main( int argc,
- char * argv[] )
-{
- autodoc::CommandLine aCL;
- aCL.Init(argc, argv);
- if (NOT aCL.CheckParameters() )
- return 1;
-
- int ret = aCL.Run();
- return ret;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/makefile.mk b/autodoc/source/exes/adc_uni/makefile.mk
deleted file mode 100644
index bf959e72..00000000
--- a/autodoc/source/exes/adc_uni/makefile.mk
+++ /dev/null
@@ -1,104 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=autodoc
-TARGETTYPE=CUI
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-UWINAPILIB=$(0)
-LIBSALCPPRT=$(0)
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/adc_cl.obj \
- $(OBJ)$/adc_cmd_parse.obj \
- $(OBJ)$/adc_cmds.obj \
- $(OBJ)$/adc_msg.obj \
- $(OBJ)$/cmd_run.obj \
- $(OBJ)$/cmd_sincedata.obj
-
-
-# --- Targets ------------------------------------------------------
-
-LIB1TARGET=$(LB)$/atdoc.lib
-LIB1FILES= \
- $(LB)$/$(TARGET).lib $(LB)$/autodoc_tools.lib \
- $(LB)$/ary_kernel.lib $(LB)$/ary_cpp.lib $(LB)$/ary_idl.lib \
- $(LB)$/ary_info.lib $(LB)$/ary_loc.lib \
- $(LB)$/parser_kernel.lib $(LB)$/parser_tokens.lib $(LB)$/parser_semantic.lib \
- $(LB)$/parser_cpp.lib $(LB)$/parser_adoc.lib \
- $(LB)$/display_kernel.lib $(LB)$/display_html.lib $(LB)$/display_idl.lib \
- $(LB)$/display_toolkit.lib $(LB)$/parser2_tokens.lib \
- $(LB)$/parser2_s2_luidl.lib $(LB)$/parser2_s2_dsapi.lib \
- $(LB)$/ary2_cinfo.lib $(LB)$/ary_doc.lib
-
-
-
-APP1TARGET= $(TARGET)
-APP1STACK= 1000000
-APP1OBJS= $(OBJ)$/main.obj
-
-APP1RPATH=SDK
-
-.IF "$(GUI)"=="WNT"
-APP1STDLIBS= $(COSVLIB) $(UDMLIB)
-.ELSE
-.IF "$(OS)"=="MACOSX"
-# See <http://porting.openoffice.org/servlets/ReadMsg?list=mac&msgNo=6911>:
-APP1STDLIBS= -Wl,-all_load -ludm -lcosv
-.ELSE
-APP1STDLIBS= -lcosv -ludm
-.ENDIF
-.ENDIF
-
-APP1LIBS=$(LB)$/atdoc.lib
-
-DEPOBJFILES += $(APP1OBJS)
-
-APP1DEPN= $(LB)$/$(TARGET).lib $(LB)$/autodoc_tools.lib \
- $(LB)$/ary_kernel.lib $(LB)$/ary_cpp.lib $(LB)$/ary_idl.lib \
- $(LB)$/ary_info.lib $(LB)$/ary_loc.lib \
- $(LB)$/parser_kernel.lib $(LB)$/parser_tokens.lib $(LB)$/parser_semantic.lib \
- $(LB)$/parser_cpp.lib $(LB)$/parser_adoc.lib \
- $(LB)$/display_kernel.lib $(LB)$/display_html.lib $(LB)$/display_idl.lib \
- $(LB)$/display_toolkit.lib $(LB)$/parser2_tokens.lib \
- $(LB)$/parser2_s2_luidl.lib $(LB)$/parser2_s2_dsapi.lib \
- $(LB)$/ary2_cinfo.lib $(LB)$/ary_doc.lib
-
-
-.INCLUDE : target.mk
diff --git a/autodoc/source/exes/adc_uni/spec-CommandLine.txt b/autodoc/source/exes/adc_uni/spec-CommandLine.txt
deleted file mode 100644
index 756b3184..00000000
--- a/autodoc/source/exes/adc_uni/spec-CommandLine.txt
+++ /dev/null
@@ -1,181 +0,0 @@
- Command Line Options
- --------------------
-
-autodoc [-v <level>]
- -html <out>
- [-extroot <externroot> -extnsp <externnamespace>]
- -lg <proglang>
- [-t <sourcetree>[ <sourcetree> ...]
- [-d <sourcedir>[ <sourcedir> ...]
- [-f <sourcefile>[ <sourcefile> ...]
-
-
- -html <OutputDirectory>
- Directory where the output will be created.
-
- -lg <ProgrammingLanguage>
- Allowed values: "c++" or "idl"
-
- -extroot <externroot>
- Only together with "-lg idl" and -extnsp.
- Links to code entities not found within the current parsed
- code, will be linked there, but only if -extnsp is given and
- the linked entity is in the given namespace.
- <externroot> is a http link, it needs no "http://" at the
- beginning nor slash at the end.
-
- -extnsp <externnamespace>
- Only together with "-lg idl" and -extroot.
- If a code entity is not found in the current parsed code, but
- dwells in the namespace (or its children) given here, it is
- linked into the locátion given by -extroot.
- <externnamespace> is an absolute qualified namespace,
- starting with "::".
-
- -t <SourceTree>*
- Directory with all subdirectories.
-
- -d <SourceDirectory>*
- Directory without subdirectories.
-
- -f <SourceFile>*
- Any file. Here also files with extensions not matching the
- language are accepted.
-
- -I:<ResponseFile>
- Each line in the response file has to have one command line
- option. No whitespace at start of line.
-
- -C:<ConfigurationFile>
- Format see below.
-
- -v <VerboseLevel>
- Only for debugging. Bits 1, 2 and 4 in any combination give
- different output.
-
- -h
- Displays help.
- -?
- Displays help.
-
-
-
-
-
- Command Line Options especially for the OpenOffice.org SDK
- ----------------------------------------------------------
-
- -dvgroot <DevelopersGuide>
- Root directory of the SDK Developers Guide.
-
- -dvgfile <ReferenceFile>
- File with references to the SDK Developers Guide.
-
- -sincefile <@since-AssociationFile>
- File that maps OpenOffice versions to the wished displayed version names.
-
- -idlref <IdlDocumentationRoot> <Namespace[,Namespace ...]>
- Gives the outputdirectory of an IDL documentation, where
- symbols not found in the currently parsed namespaces of C++
- or Java can be found.
-
-
-
- Configure File Format
- ---------------------
-
-<AutodocConfiguration>
- <RepositoryName></RepositoryName>
- // Base name of the binary repository files.
- // Has to be a valid file name.
-
- <HtmlOutputTitle></HtmlOutputTitle>
- // Title on the "welcome page" of the created HTML documentation.
- // Can be any text.
-
- <CppExtensions></CppExtensions>
- // Overwrites the default. Default is: .hxx .h .hpp
- // Format: File extensions with a dot in front, like ".hcc".
-
- <IdlExtensions></IdlExtensions>
- // Overwrites the default. Default is: .idl
- // Format: File extensions with a dot in front, like ".txt".
-
- <CppDocu html="(on|off) off"/>
-
- <IdlDocu html="(on|off) on"/>
-
-</AutodocConfiguration>
-
-
-
-
-
-
- Historical Command Line Options
- -------------------------------
-
-autodoc.exe
- [ -v <VerboseNr> ]
- -html <OutputDirectory>
- {
- [ -parse ]
- [ -name <RepositoryName> ]
- -lg <ProgrammingLanguage>
- {
- [ -p <ProjectName> <ProjectRootDirectory> ]
- {
- -t <SourceDirectory>*
- -d <SourceDirectory>*
- -f <SourceFile>*
- }+
- }+
- }
-
-Legend:
- <Text>
- command line parameter
- [ ]
- optional
- { }
- Block of connected options.
- The sequence of not connected options does not matter. So the -html or -v options can be used before or after all the parsing options.
- +
- once or more times
- *
- none or more times
-
-
-Explanation of the Options
- -v <VerboseNr> Only for debugging. Bits 1, 2 and 4 in any combination give different output.
- -html <OutputDirectory>
- Gives the directory, where a HTML version of the docu shall be generated.
- -parse Starts the block, where all the parse options are given. This can be omitted, because the parse options are identifiable without it, but it may make a commandline more readable.
- -name <RepositoryName> This name appears as title of the documentation (currently only in the in the C++ version).
- -lg <ProgrammingLanguage>
-
-
- Possible values are:
-
- c++
- This parses all files with the endings .hxx and .h .
- idl
- This parses all files with the ending .idl .
-
- -p with -t/-d/-f: If there are more than one project, the -p option is required for each one.
-
- The directory given wit the -p option is the root directory of the project.
- If there is no -p option, the working directory is seen as root.
-
- All paths given with -t/-d/-f are relative to that root directory. It is possible to use "." as argument for -t or -d.
-
- Each of -t/-d/-f can have several arguments:
- One could write "-f file1.hxx file2.hxx file_xyz.hxx"
- After each -p (or after -lg, if there is no -p option), there has to be at least one of the following three:
- -t Tree, which means: include subdirectories
- -d Directory, which means: no subdirectories
- -f File", which means: single file name with ending.
- This option also allows to parse some files with an ending different from those, the -lg option implies.
-
-
-
diff --git a/autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt b/autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt
deleted file mode 100644
index e69de29b..00000000
--- a/autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt
+++ /dev/null
diff --git a/autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt b/autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt
deleted file mode 100644
index 7cf264e7..00000000
--- a/autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt
+++ /dev/null
@@ -1,49 +0,0 @@
- General Handling
- ----------------
-
-- The developer inserts the OpenOffice.org version into the @since tag.
-
-- @since-Tag may contain any string which needs to end with a Version number.
- The first cipher following immediately on a white space is interpreted as start of the version number.
-
-- The @since Tag must stay completely within one line to allow tool support for retargeting.
-
-- To replace @since entries in the generated documentation, one needs to use
- the command line option
-
- -sincefile <TransformationFile-path>
-
- This option has to occur immediately after the -html option.
- If this option is not given, the original text of the @since tag is
- displayed.
-
- If the TransformationFile does not contain a specific entry,
- nothing is displayed for this entry.
-
-
-
- Format of the @since Tag Transformation File
- --------------------------------------------
-
-Example
--------
-
-***** BEGIN OF FILE ******
-"1.1" "StarOffice 7.0"
-"2.0" "StarOffice 8.0"
-"2.1" "StarOffice 9.0"
-***** END OF FILE ******
-
-
-
-Rules and Restrictions
-----------------------
-
-* Each line contains two strings within "".
- The first string is the OpenOffice.org version number which is found in the @since tag.
- The second string is the string to display for this version.
-* No specific order among product versions is needed.
-* Empty lines and whitespaces are allowed, except:
- - Non empty lines must not start with white space.
- - Within OpenOffice.org version strings, no whitespace is allowed.
-* Whitespace within display strings is displayed as it is.
diff --git a/autodoc/source/inc/adc_cl.hxx b/autodoc/source/inc/adc_cl.hxx
deleted file mode 100644
index b7820eae..00000000
--- a/autodoc/source/inc/adc_cl.hxx
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADC_CL_HXX
-#define ADC_ADC_CL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/comdline.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
- class Repository;
-}
-
-namespace autodoc
-{
-namespace command
-{
- class Command;
- class CreateHtml;
- class SinceTagTransformationData;
-}
-
-
-/** Reads and runs an Autodoc command line.
-*/
-class CommandLine : public csv::CommandLine_Ifc
-{
- public:
- // LIFECYCLE
- CommandLine();
- ~CommandLine();
- // OPERATIONS
- int Run() const;
-
- // INQUIRY
- // debugging
- bool DebugStyle_ShowText() const;
- bool DebugStyle_ShowStoredObjects() const;
- bool DebugStyle_ShowTokens() const;
-
- // @since tags
- bool DoesTransform_SinceTag() const;
-
-// /// @see command::SinceTagTransformationData::StripSinceTagValue()
-// bool Strip_SinceTagText(
-// String & io_sSinceTagValue ) const;
-
- /// @see command::SinceTagTransformationData::DisplayOf()
- const String & DisplayOf_SinceTagValue(
- const String & i_sVersionNumber ) const;
-
- // extern IDL links
- const String & ExternRoot() const { return sExternRoot; }
- const String & ExternNamespace() const { return sExternNamespace; }
-
- bool CppUsed() const { return bCpp; }
- bool IdlUsed() const { return bIdl; }
-
- // ACCESS
- static CommandLine &
- Get_();
- void Set_ExternRoot(
- const String & i_s )
- { sExternRoot = i_s; }
- void Set_ExternNamespace(
- const String & i_s )
- { sExternNamespace = i_s; }
- ary::Repository & TheRepository() const { csv_assert(pReposy != 0);
- return *pReposy; }
- void Set_CppUsed() { bCpp = true; }
- void Set_IdlUsed() { bIdl = true; }
-
- private:
- // Interface cosv::CommandLine_Ifc:
- virtual void do_Init(
- int argc,
- char * argv[] );
- virtual void do_PrintUse() const;
- virtual bool inq_CheckParameters() const;
-
- // Locals
- typedef StringVector::const_iterator opt_iter;
- typedef std::vector< DYN command::Command* > CommandList;
-
- void load_IncludedCommands(
- StringVector & out,
- const char * i_filePath );
-
- void do_clVerbose(
- opt_iter & it,
- opt_iter itEnd );
- void do_clParse(
- opt_iter & it,
- opt_iter itEnd );
- void do_clCreateHtml(
- opt_iter & it,
- opt_iter itEnd );
- void do_clSinceFile(
- opt_iter & it,
- opt_iter itEnd );
-
-// void do_clCreateXml(
-// opt_iter & it,
-// opt_iter itEnd );
-// void do_clLoad(
-// opt_iter & it,
-// opt_iter itEnd );
-// void do_clSave(
-// opt_iter & it,
-// opt_iter itEnd );
-
- void sort_Commands();
-
- // DATA
- uintt nDebugStyle;
- Dyn<command::SinceTagTransformationData>
- pSinceTransformator;
-
- CommandList aCommands;
- bool bInitOk;
- command::CreateHtml *
- pCommand_CreateHtml;
-
- String sExternRoot;
- String sExternNamespace;
-
- mutable Dyn<ary::Repository>
- pReposy;
- bool bCpp;
- bool bIdl;
-
- static CommandLine *
- pTheInstance_;
-};
-
-
-
-// IMPLEMENTATION
-inline bool
-CommandLine::DebugStyle_ShowText() const
- { return (nDebugStyle & 2) != 0; }
-inline bool
-CommandLine::DebugStyle_ShowStoredObjects() const
- { return (nDebugStyle & 4) != 0; }
-inline bool
-CommandLine::DebugStyle_ShowTokens() const
- { return (nDebugStyle & 1) != 0; }
-
-} // namespace autodoc
-
-
-inline bool
-DEBUG_ShowText()
- { return autodoc::CommandLine::Get_().DebugStyle_ShowText(); }
-inline bool
-DEBUG_ShowStoring()
- { return autodoc::CommandLine::Get_().DebugStyle_ShowStoredObjects(); }
-inline bool
-DEBUG_ShowTokens()
- { return autodoc::CommandLine::Get_().DebugStyle_ShowTokens(); }
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/adc_msg.hxx b/autodoc/source/inc/adc_msg.hxx
deleted file mode 100644
index 8562056e..00000000
--- a/autodoc/source/inc/adc_msg.hxx
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADC_MSG_HXX
-#define ADC_ADC_MSG_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-namespace csv
-{
- class File;
-}
-
-
-namespace autodoc
-{
-
-
-/** Gathers, sorts and displays (mainly diagnostic) messages to the
- user of Autodoc.
-*/
-class Messages
-{
- public:
- // LIFECYCLE
- Messages();
- ~Messages();
- // OPERATIONS
- void WriteFile(
- const String & i_sOutputFilePath);
- // INQUIRY
-
- // ACCESS
- void Out_MissingDoc(
- const String & i_sEntity,
- const String & i_sFile,
- uintt i_nLine);
- void Out_ParseError(
- const String & i_sFile,
- uintt i_nLine);
- void Out_InvalidConstSymbol(
- const String & i_sText,
- const String & i_sFile,
- uintt i_nLine);
- void Out_UnresolvedLink(
- const String & i_sLinkText,
- const String & i_sFile,
- uintt i_nLine);
- void Out_TypeVsMemberMisuse(
- const String & i_sLinkText,
- const String & i_sFile,
- uintt i_nLine);
-
- static Messages & The_();
-
- private:
- struct Location
- {
- String sFile;
- uintt nLine;
-
- Location(
- const String & i_file,
- uintt i_line)
- : sFile(i_file),
- nLine(i_line) {}
- bool operator<(
- const Location & i_other) const
- { int cmp = csv::compare(sFile,i_other.sFile);
- return cmp < 0
- ? true
- : cmp > 0
- ? false
- : nLine < i_other.nLine;
- }
- };
-
- typedef std::map<Location,String> MessageMap;
-
- // Locals
- void AddValue(
- MessageMap & o_dest,
- const String & i_sText,
- const String & i_sFile,
- uintt i_nLine );
- void WriteParagraph(
- csv::File & o_out,
- const MessageMap & i_source,
- const String & i_title,
- const String & i_firstIntermediateText );
-
- // DATA
- MessageMap aMissingDocs;
- MessageMap aParseErrors;
- MessageMap aInvalidConstSymbols;
- MessageMap aUnresolvedLinks;
- MessageMap aTypeVsMemberMisuses;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace autodoc
-
-inline autodoc::Messages &
-TheMessages()
-{
- return autodoc::Messages::The_();
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/docu_node_ids.hxx b/autodoc/source/inc/docu_node_ids.hxx
deleted file mode 100644
index 474a9aa6..00000000
--- a/autodoc/source/inc/docu_node_ids.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DOCU_NODE_IDS_HXX
-#define ADC_DOCU_NODE_IDS_HXX
-
-
-
-namespace ary
-{
-namespace doc
-{
-namespace nodetype
-{
-enum E_Ids
-{
-
- nt_none,
- nt_OldCppDocu,
- nt_OldIdlDocu
-
-
-
-
-
-
-
-
-
-};
-} // namespace nodetype
-} // namespace doc
-} // namespace ary
-
-namespace docnt = ::ary::doc::nodetype;
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/estack.hxx b/autodoc/source/inc/estack.hxx
deleted file mode 100644
index bd926d3b..00000000
--- a/autodoc/source/inc/estack.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_ESTACK_HXX
-#define ARY_ESTACK_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <list>
- // COMPONENTS
- // PARAMETERS
-
-
-
-template <class ELEM>
-class EStack : private std::list<ELEM>
-{
- private:
- typedef std::list<ELEM> base;
- const base & Base() const { return *this; }
- base & Base() { return *this; }
-
- public:
- typedef ELEM value_type;
- typedef typename std::list<ELEM>::size_type size_type;
-
- // LIFECYCLE
- EStack() {}
- EStack(
- const EStack & i_rStack )
- : base( (const base &)(i_rStack) ) {}
- ~EStack() {}
- // OPERATORS
- EStack & operator=(
- const EStack & i_rStack )
- { base::operator=( i_rStack.Base() );
- return *this; }
- bool operator==(
- const EStack<ELEM> &
- i_r2 ) const
- { return std::operator==( Base(), this->i_rStack.Base() ); }
- bool operator<(
- const EStack<ELEM> &
- i_r2 ) const
- { return std::operator<( Base(), this->i_rStack.Base() ); }
- // OPERATIONS
- void push(
- const value_type & i_rElem )
- { base::push_front(i_rElem); }
- void pop() { base::pop_front(); }
- void erase_all() { while (NOT empty()) pop(); }
-
- // INQUIRY
- const value_type & top() const { return base::front(); }
- size_type size() const { return base::size(); }
- bool empty() const { return base::empty(); }
-
- // ACCESS
- value_type & top() { return base::front(); }
-};
-
-
-
-// IMPLEMENTATION
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/luxenum.hxx b/autodoc/source/inc/luxenum.hxx
deleted file mode 100644
index e75d6a3f..00000000
--- a/autodoc/source/inc/luxenum.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 UDM_LUXENUM_HXX
-#define UDM_LUXENUM_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <map>
-#include <algorithm>
-
-
-namespace lux
-{
-
-typedef std::map< intt, String > EnumValueMap;
-
-
-template <class DIFF>
-class Enum // : public Template_Base
-{
- public:
- // TYPES
- typedef Enum< DIFF > self;
-
- // LIFECYCLE
- Enum(
- DIFF i_nValue,
- const char * i_sText )
- : nValue(i_nValue) { Values_()[nValue] = i_sText;
- // Sequence_().insert(
- // std::lower_bound( Sequence_().begin(), Sequence_().end(), i_nValue ),
- // i_nValue );
- }
- Enum(
- DIFF i_nValue )
- : nValue(i_nValue) { ; }
- Enum(
- intt i_nValue = 0 )
- : nValue(i_nValue) { if ( NOT CheckIntt(i_nValue) ) { csv_assert(false); } }
- Enum(
- const self & i_rEnum )
- : nValue(i_rEnum.nValue) {;}
-
- self & operator=(
- DIFF i_nValue )
- { nValue = i_nValue; return *this; }
- self & operator=(
- intt i_nValue )
- { if ( CheckIntt(i_nValue) ) {nValue = DIFF(i_nValue);}
- else {csv_assert(false);} return *this; }
- self & operator=(
- const self & i_rEnum )
- { nValue = i_rEnum.nValue; return *this; }
- operator DIFF() const { return DIFF(nValue); }
-
- DIFF operator()() const { return nValue; }
- const String & Text() const { return Values_()[nValue]; }
-
- private:
- static EnumValueMap &
- Values_();
- bool CheckIntt(
- intt i_nNumber )
- { return Values_().find(i_nNumber) != Values_().end(); }
- // DATA
- intt nValue;
-};
-
-
-
-
-} // namespace lux
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/manip.hxx b/autodoc/source/inc/manip.hxx
deleted file mode 100644
index b74bdbf7..00000000
--- a/autodoc/source/inc/manip.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_MANIP_HXX
-#define ARY_MANIP_HXX
-
-template <class XY >
-class Manipulator
-{
- public:
- virtual ~Manipulator() {}
-
- void operator()(
- XY & io_r ) const
- { op_fcall(io_r); }
- private:
- virtual void op_fcall(
- XY & io_r ) const = 0;
-};
-
-template <class XY >
-class Const_Manipulator
-{
- public:
- virtual ~Const_Manipulator() {}
-
- void operator()(
- const XY & io_r ) const
- { op_fcall(io_r); }
- private:
- virtual void op_fcall(
- const XY & io_r ) const = 0;
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/precomp.h b/autodoc/source/inc/precomp.h
deleted file mode 100644
index c7cdb20a..00000000
--- a/autodoc/source/inc/precomp.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PRECOMP_H_06071998
-#define ADC_PRECOMP_H_06071998
-
-
-// For en/disabling csv_assertions:
-#ifndef DEBUG
-#define CSV_NO_ASSERTIONS
-#endif
-
-#include <cosv/csv_precomp.h>
-
-#include <vector>
-#include <map>
-#include <set>
-
-
-
-// Shortcuts to access csv::-types:
-using csv::String;
-using csv::StringVector;
-using csv::StreamStr;
-using csv::c_str;
-typedef csv::StreamStrLock StreamLock;
-
-
-
-inline std::ostream &
-Cout() { return std::cout; }
-inline std::ostream &
-Cerr() { return std::cerr; }
-
-inline csv::F_FLUSHING_FUNC
-Endl() { return csv::Endl; }
-inline csv::F_FLUSHING_FUNC
-Flush() { return csv::Flush; }
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/prprpr.hxx b/autodoc/source/inc/prprpr.hxx
deleted file mode 100644
index ba1c1fdb..00000000
--- a/autodoc/source/inc/prprpr.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_PRPRPR_HXX // PRePRocessorPRocessing
-#define ARY_CPP_PRPRPR_HXX
-
-
-
-// Implemented in autodoc/source/parser/cpp/defdescr.cxx .
-
-bool CheckForOperator(
- bool & o_bStringify,
- bool & o_bConcatenate,
- const String & i_sTextItem );
-void Do_bConcatenate(
- csv::StreamStr & o_rText,
- bool & io_bConcatenate );
-void Do_bStringify_begin(
- csv::StreamStr & o_rText,
- bool i_bStringify );
-void Do_bStringify_end(
- csv::StreamStr & o_rText,
- bool & io_bStringify );
-bool HandleOperatorsBeforeTextItem( /// @return true, if text item is done here
- csv::StreamStr & o_rText,
- bool & io_bStringify,
- bool & io_bConcatenate,
- const String & i_sTextItem );
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/tools/filecoll.hxx b/autodoc/source/inc/tools/filecoll.hxx
deleted file mode 100644
index 89756c52..00000000
--- a/autodoc/source/inc/tools/filecoll.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_FILECOLL_HXX
-#define ADC_FILECOLL_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <autodoc/filecoli.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-
-class FileCollector : public autodoc::FileCollector_Ifc
-{
- public:
- // LIFECYCLE
- FileCollector(
- uintt i_nRoughNrOfFiles = 0 );
-
- // OPERATIONS
- virtual uintt AddFilesFrom(
- const char * i_sRootDir,
- const char * i_sFilter,
- E_SearchMode i_eSearchMode );
- virtual uintt AddFile(
- const char * i_sFilePath );
- virtual void EraseAll();
-
- // INQUIRY
- virtual const_iterator
- Begin() const;
- virtual const_iterator
- End() const;
- virtual uintt Size() const;
-
- private:
- // DATA
- StringVector aFoundFiles;
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/inc/tools/tkpchars.hxx b/autodoc/source/inc/tools/tkpchars.hxx
deleted file mode 100644
index a1aa7970..00000000
--- a/autodoc/source/inc/tools/tkpchars.hxx
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKPCHARS_HXX
-#define ADC_TKPCHARS_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETRS
-#include <adc_cl.hxx>
-#include <stack>
-
-
-
-/** @descr
-
- dpSource:
-
- 1||||||||||||||||||||||a||||||||||||b|||c||||||||||||||||||||...
-
-
- 1 := first character of Sourcecode.
- a := nLastTokenStart, there starts the last cut token.
- b := nLastCut, there is a '\0'-char which marks the end of
- the last cut token. The original character at b is stored
- in cCharAtLastCut and will replace the '\0'-char, when the
- next token is cut.
- c := The current cursor position.
-
-
- @needs cosv.lib
-
- @use This class can be used by any parser to get the chars of a
- text one by one and separate them to tokens.
-**/
-
-class CharacterSource
-{
- public:
- // LIFECYCLE
- CharacterSource();
- ~CharacterSource();
-
- // OPERATIONS
- /** Loads the complete contents of in_rSource into the classes private memory.
- If in_rSource is a file, it has to be open of course.
- After loading the text, the CurChar() is set on the begin of the text.
- **/
- void LoadText(
- csv::bstream & io_rSource);
-
- void InsertTextAtCurPos(
- const char * i_sText2Insert );
-
- /// @return CurChar() after moving forward one char.
- char MoveOn();
- /** @return
- The token which starts at the char which was CurChar(), when
- CutToken() was called the last time - or at the beginning of the text.
- The token ends by the CurChar() being replaced by a '\0'.
-
- Value is valid until the next call of CutToken() or ~CharacterSource().
- **/
- const char * CutToken();
-
- // INQUIRY
- char CurChar() const;
- /// @return The result of the last CutToken(). Or NULL, if there was none yet.
- const char * CurToken() const;
-
- // INQUIRY
- /// @return true, if
- bool IsFinished() const;
-
- private:
- struct S_SourceState
- {
- DYN char * dpSource;
- intt nSourceSize;
-
- intt nCurPos;
- intt nLastCut;
- intt nLastTokenStart;
- char cCharAtLastCut;
-
- S_SourceState(
- DYN char * dpSource,
- intt nSourceSize,
- intt nCurPos,
- intt nLastCut,
- intt nLastTokenStart,
- char cCharAtLastCut );
- };
-
- void BeginSource();
- intt CurPos() const;
- char MoveOn_OverStack();
-
- // DATA
- std::stack< S_SourceState >
- aSourcesStack;
-
- DYN char * dpSource;
- intt nSourceSize;
-
- intt nCurPos;
- intt nLastCut;
- intt nLastTokenStart;
- char cCharAtLastCut;
-};
-
-
-inline char
-CharacterSource::MoveOn()
- {
-if (DEBUG_ShowText())
-{
- Cerr() << char(dpSource[nCurPos+1]) << Flush();
-}
- if ( nCurPos < nSourceSize-1 )
- return dpSource[++nCurPos];
- else if ( aSourcesStack.size() > 0 )
- return MoveOn_OverStack();
- else
- return dpSource[nCurPos = nSourceSize];
- }
-inline char
-CharacterSource::CurChar() const
- { return nCurPos != nLastCut ? dpSource[nCurPos] : cCharAtLastCut; }
-inline const char *
-CharacterSource::CurToken() const
- { return &dpSource[nLastTokenStart]; }
-inline bool
-CharacterSource::IsFinished() const
- { return nCurPos >= nSourceSize; }
-inline intt
-CharacterSource::CurPos() const
- { return nCurPos; }
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/mkinc/fullcpp.mk b/autodoc/source/mkinc/fullcpp.mk
deleted file mode 100644
index 00f08bda..00000000
--- a/autodoc/source/mkinc/fullcpp.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-
-
-# --- Settings -----------------------------------------------------
-# Has to be included AFTER settings.mk !
-
-
-# RTTI
-.IF "$(COM)"=="MSC"
-CFLAGS+= -GR
-.ENDIF
-.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || \
- "$(OS)"=="DRAGONFLY" || $(COM) == "GCC"
-CFLAGSCXX+= -frtti
-.ENDIF
-
-
-
-# Precompiled Headers
-.IF "$(NP_LOCALBUILD)"!="" && "$(GUI)"=="WNT"
-
-PCH_NAME=autodoc
-.IF "$(debug)"==""
-CFLAGS+= -YX"precomp.h" -Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pch
-.ELSE
-CFLAGS+= -YX"precomp.h" -Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pcd
-.ENDIF
-
-.ENDIF # "$(NP_LOCALBUILD)"!="" && "$(GUI)"=="WNT"
diff --git a/autodoc/source/parser/adoc/a_rdocu.cxx b/autodoc/source/parser/adoc/a_rdocu.cxx
deleted file mode 100644
index 016de553..00000000
--- a/autodoc/source/parser/adoc/a_rdocu.cxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/a_rdocu.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <adoc/docu_pe.hxx>
-#include <adoc/adoc_tok.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <doc_deal.hxx>
-
-
-
-namespace adoc
-{
-
-
-DocuExplorer::DocuExplorer()
- : pDocuDistributor(0),
- pPE(new Adoc_PE),
- bIsPassedFirstDocu(false)
-{
-}
-
-DocuExplorer::~DocuExplorer()
-{
-}
-
-void
-DocuExplorer::StartNewFile( DocuDealer & o_rDocuDistributor )
-{
- pDocuDistributor = &o_rDocuDistributor;
- bIsPassedFirstDocu = false;
-}
-
-
-void
-DocuExplorer::Process_Token( DYN adoc::Token & let_drToken )
-{
- csv_assert(pDocuDistributor != 0);
-
- let_drToken.Trigger(*pPE);
- if ( pPE->IsComplete() )
- {
- ary::doc::OldCppDocu *
- pDocu = pPE->ReleaseJustParsedDocu();
- if ( pDocu != 0 )
- {
- if (bIsPassedFirstDocu)
- pDocuDistributor->TakeDocu( *pDocu );
- else
- {
- delete pDocu;
- bIsPassedFirstDocu = true;
- }
- }
- }
-
- delete &let_drToken;
-}
-
-
-} // namespace adoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/adoc_tok.cxx b/autodoc/source/parser/adoc/adoc_tok.cxx
deleted file mode 100644
index e2cca6e6..00000000
--- a/autodoc/source/parser/adoc/adoc_tok.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/adoc_tok.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <adoc/atokdeal.hxx>
-#include <../cpp/c_dealer.hxx>
-
-
-namespace adoc {
-
-void
-Token::DealOut( ::TokenDealer & o_rDealer )
-{
- o_rDealer.AsDistributor()->Deal_AdcDocu(*this);
-}
-
-
-} // namespace adoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/cx_a_std.cxx b/autodoc/source/parser/adoc/cx_a_std.cxx
deleted file mode 100644
index 974218d9..00000000
--- a/autodoc/source/parser/adoc/cx_a_std.cxx
+++ /dev/null
@@ -1,518 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/cx_a_std.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <adoc/cx_a_sub.hxx>
-#include <x_parse.hxx>
-#include <tools/tkpchars.hxx>
-#include <adoc/tk_attag.hxx>
-#include <adoc/tk_docw.hxx>
-#include <tokens/tokdeal.hxx>
-
-
-
-namespace adoc {
-
-
-const intt C_nStatusSize = 128;
-const intt C_nCppInitialNrOfStati = 400;
-
-
-const uintt nF_fin_Error = 1;
-const uintt nF_fin_Ignore = 2;
-const uintt nF_fin_LineStart = 3;
-const uintt nF_fin_Eol = 4;
-const uintt nF_fin_Eof = 5;
-const uintt nF_fin_AnyWord = 6;
-const uintt nF_fin_Whitespace = 7;
-
-const uintt nF_goto_AtTag = 20;
-const uintt nF_goto_CheckStar = 21;
-
-DYN TextToken * TCF_DocWord(const char * text) { return new Tok_DocWord(text); }
-
-DYN TextToken * TCF_atstd_ATT(const char * ) { return new Tok_at_std(ary::info::atid_ATT); }
-DYN TextToken * TCF_atstd_author(const char * ) { return new Tok_at_std(ary::info::atid_author); }
-DYN TextToken * TCF_atstd_change(const char * ) { return new Tok_at_std(ary::info::atid_change); }
-DYN TextToken * TCF_atstd_collab(const char * ) { return new Tok_at_std(ary::info::atid_collab); }
-DYN TextToken * TCF_atstd_contact(const char * ) { return new Tok_at_std(ary::info::atid_contact); }
-DYN TextToken * TCF_atstd_copyright(const char * ) { return new Tok_at_std(ary::info::atid_copyright); }
-DYN TextToken * TCF_atstd_descr(const char * ) { return new Tok_at_std(ary::info::atid_descr); }
-DYN TextToken * TCF_atstd_docdate(const char * ) { return new Tok_at_std(ary::info::atid_docdate); }
-DYN TextToken * TCF_atstd_derive(const char * ) { return new Tok_at_std(ary::info::atid_derive); }
-DYN TextToken * TCF_atstd_instance(const char * ) { return new Tok_at_std(ary::info::atid_instance); }
-DYN TextToken * TCF_atstd_life(const char * ) { return new Tok_at_std(ary::info::atid_life); }
-DYN TextToken * TCF_atstd_multi(const char * ) { return new Tok_at_std(ary::info::atid_multi); }
-DYN TextToken * TCF_atstd_onerror(const char * ) { return new Tok_at_std(ary::info::atid_onerror); }
-DYN TextToken * TCF_atstd_persist(const char * ) { return new Tok_at_std(ary::info::atid_persist); }
-DYN TextToken * TCF_atstd_postcond(const char * ) { return new Tok_at_std(ary::info::atid_postcond); }
-DYN TextToken * TCF_atstd_precond(const char * ) { return new Tok_at_std(ary::info::atid_precond); }
-DYN TextToken * TCF_atstd_responsibility(const char * ) { return new Tok_at_std(ary::info::atid_resp); }
-DYN TextToken * TCF_atstd_return(const char * ) { return new Tok_at_std(ary::info::atid_return); }
-DYN TextToken * TCF_atstd_short(const char * ) { return new Tok_at_std(ary::info::atid_short); }
-DYN TextToken * TCF_atstd_todo(const char * ) { return new Tok_at_std(ary::info::atid_todo); }
-DYN TextToken * TCF_atstd_version(const char * ) { return new Tok_at_std(ary::info::atid_version); }
-
-DYN TextToken * TCF_at_base(const char *) { return new Tok_at_base; }
-DYN TextToken * TCF_at_exception(const char *) { return new Tok_at_exception; }
-DYN TextToken * TCF_at_impl(const char *) { return new Tok_at_impl; }
-DYN TextToken * TCF_at_interface(const char *) { return new Tok_at_interface; }
-DYN TextToken * TCF_at_key(const char *) { return new Tok_at_key; }
-DYN TextToken * TCF_at_param(const char *) { return new Tok_at_param; }
-DYN TextToken * TCF_at_see(const char *) { return new Tok_at_see; }
-DYN TextToken * TCF_at_template(const char *) { return new Tok_at_template; }
-DYN TextToken * TCF_at_internal(const char *) { return new Tok_at_internal; }
-DYN TextToken * TCF_at_obsolete(const char *) { return new Tok_at_obsolete; }
-DYN TextToken * TCF_at_module(const char *) { return new Tok_at_module; }
-DYN TextToken * TCF_at_file(const char *) { return new Tok_at_file; }
-DYN TextToken * TCF_at_gloss(const char *) { return new Tok_at_gloss; }
-DYN TextToken * TCF_at_global(const char *) { return new Tok_at_global; }
-DYN TextToken * TCF_at_include(const char *) { return new Tok_at_include; }
-DYN TextToken * TCF_at_label(const char *) { return new Tok_at_label; }
-DYN TextToken * TCF_at_since(const char *) { return new Tok_at_since; }
-DYN TextToken * TCF_at_HTML(const char *) { return new Tok_at_HTML; }
-DYN TextToken * TCF_at_NOHTML(const char *) { return new Tok_at_NOHTML; }
-DYN TextToken * TCF_Whitespace(const char * i_sText);
-DYN TextToken * TCF_EoDocu(const char *) { return new Tok_EoDocu; }
-DYN TextToken * TCF_EoLine(const char *) { return new Tok_Eol; }
-DYN TextToken * TCF_Eof(const char *) { return new Tok_Eof; }
-
-
-
-
-Context_AdocStd::Context_AdocStd()
- : aStateMachine(C_nStatusSize, C_nCppInitialNrOfStati),
- pDealer(0),
- pParentContext(0),
- pFollowUpContext(0),
- pCx_LineStart(0),
- pCx_CheckStar(0),
- pCx_AtTagCompletion(0),
- pNewToken(0),
- bIsMultiline(false)
-{
- pCx_LineStart = new Cx_LineStart(*this);
- pCx_CheckStar = new Cx_CheckStar(*this);
- pCx_AtTagCompletion = new Cx_AtTagCompletion(*this);
-
- SetupStateMachine();
-}
-
-void
-Context_AdocStd::SetParentContext( TkpContext & io_rParentContext,
- const char * )
-{
- pFollowUpContext = pParentContext = &io_rParentContext;
- pCx_CheckStar->Set_End_FollowUpContext(io_rParentContext);
-}
-
-Context_AdocStd::~Context_AdocStd()
-{
-}
-
-void
-Context_AdocStd::AssignDealer( TokenDealer & o_rDealer )
-{
- pDealer = &o_rDealer;
- pCx_LineStart->AssignDealer(o_rDealer);
- pCx_CheckStar->AssignDealer(o_rDealer);
- pCx_AtTagCompletion->AssignDealer(o_rDealer);
-}
-
-void
-Context_AdocStd::ReadCharChain( CharacterSource & io_rText )
-{
- csv_assert(pParentContext != 0);
- pNewToken = 0;
-
- TextToken::F_CRTOK fTokenCreateFunction = 0;
- StmBoundsStatus & rBound = aStateMachine.GetCharChain(fTokenCreateFunction, io_rText);
-
- // !!!
- // The order of the next two lines is essential, because
- // pFollowUpContext may be changed by PerformStatusFunction() also,
- // which then MUST override the previous assignment.
- pFollowUpContext = rBound.FollowUpContext();
- PerformStatusFunction(rBound.StatusFunctionNr(), fTokenCreateFunction, io_rText);
-}
-
-bool
-Context_AdocStd::PassNewToken()
-{
- if (pNewToken)
- {
- pNewToken.Release()->DealOut(*pDealer);
- return true;
- }
- return false;
-}
-
-TkpContext &
-Context_AdocStd::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Context_AdocStd::PerformStatusFunction( uintt i_nStatusSignal,
- F_CRTOK i_fTokenCreateFunction,
- CharacterSource & io_rText )
-{
- switch (i_nStatusSignal)
- {
- case nF_fin_Error:
- {
- char cCC = io_rText.CurChar();
- String sChar( &cCC, 1 );
- throw X_Parser(X_Parser::x_InvalidChar, sChar, String ::Null_(), 0);
- } // no break, because of throw
- case nF_fin_Ignore:
- io_rText.CutToken();
- pNewToken = 0;
- break;
- case nF_fin_LineStart:
- csv_assert(i_fTokenCreateFunction != 0);
- pNewToken = (*i_fTokenCreateFunction)(io_rText.CutToken());
- break;
- case nF_fin_Eol:
- io_rText.CutToken();
- pDealer->Deal_Eol();
- if ( bIsMultiline )
- {
- pNewToken = TCF_EoLine(0);
- pFollowUpContext = pCx_LineStart.Ptr();
- }
- else
- {
- pNewToken = TCF_EoDocu(0);
- pFollowUpContext = pParentContext;
- }
- break;
- case nF_fin_Eof:
- pNewToken = TCF_Eof(0);
- break;
- case nF_fin_AnyWord:
- if (i_fTokenCreateFunction != 0)
- pNewToken = (*i_fTokenCreateFunction)(io_rText.CutToken());
- else
- pNewToken = TCF_DocWord(io_rText.CutToken());
- break;
- case nF_fin_Whitespace:
- pNewToken = TCF_Whitespace(io_rText.CutToken());
- break;
- case nF_goto_AtTag:
- pNewToken = 0;
- pCx_AtTagCompletion->SetCurToken(i_fTokenCreateFunction);
- break;
- case nF_goto_CheckStar:
- pNewToken = 0;
- pCx_CheckStar->SetCanBeEnd( bIsMultiline );
- break;
- default:
- {
- char cCC = io_rText.CurChar();
- String sChar( &cCC, 1 );
- throw X_Parser(X_Parser::x_InvalidChar, sChar, String::Null_(), 0);
- }
- } // end switch (i_nStatusSignal)
-}
-
-void
-Context_AdocStd::SetupStateMachine()
-{
- // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
-// const INT16 bas = 0; // Base-Status
- const INT16 wht = 1; // Whitespace-Status
- const INT16 awd = 2; // Any-Word-Read-Status
-
- // Kontextwechsel-Stati:
- const INT16 goto_CheckStar = 3;
- const INT16 goto_AtTag = 4;
-
- // Tokenfinish-Stati:
- const INT16 finError = 5;
-// const INT16 finIgnore = 6;
- const INT16 finEol = 7;
- const INT16 finEof = 8;
- const INT16 finAnyWord = 9;
- const INT16 finWhitespace = 10;
-
- // Konstanten zur Benutzung in der Tabelle:
- const INT16 fof = finEof;
- const INT16 err = finError;
- const INT16 faw = finAnyWord;
-// const INT16 fig = finIgnore;
- const INT16 fwh = finWhitespace;
-
- /// The '0's will be replaced by calls of AddToken().
-
- const INT16 A_nTopStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
- wht,awd,awd,awd,awd,awd,awd,awd,awd,awd, 0,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 63
- 0,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
- };
-
- const INT16 A_nWhitespaceStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht,fwh,wht,wht,fwh,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
- wht,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 63
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 95
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh // ... 127
- };
-
- const INT16 A_nWordStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
- err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
- faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 63
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
- };
-
- const INT16 A_nAtTagDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
- err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
- faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 63
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
- };
-
- const INT16 A_nPunctDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err // 112 ...
- };
-
- DYN StmArrayStatus * dpStatusTop
- = new StmArrayStatus( C_nStatusSize, A_nTopStatus, 0, true);
- DYN StmArrayStatus * dpStatusWhite
- = new StmArrayStatus( C_nStatusSize, A_nWhitespaceStatus, 0, true);
- DYN StmArrayStatus * dpStatusWord
- = new StmArrayStatus( C_nStatusSize, A_nWordStatus, TCF_DocWord, true);
-
- DYN StmBoundsStatus * dpBst_goto_CheckStar
- = new StmBoundsStatus( *this, *pCx_CheckStar, nF_goto_CheckStar, true );
- DYN StmBoundsStatus * dpBst_goto_AtTag
- = new StmBoundsStatus( *this, *pCx_AtTagCompletion, nF_goto_AtTag, true );
-
- DYN StmBoundsStatus * dpBst_finError
- = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_Error, true );
- DYN StmBoundsStatus * dpBst_finIgnore
- = new StmBoundsStatus( *this, *this, nF_fin_Ignore, true);
- DYN StmBoundsStatus * dpBst_finEol
- = new StmBoundsStatus( *this, *pCx_LineStart, nF_fin_Eol, false);
- DYN StmBoundsStatus * dpBst_finEof
- = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_Eof, false);
- DYN StmBoundsStatus * dpBst_finAnyWord
- = new StmBoundsStatus( *this, *this, nF_fin_AnyWord, true);
- DYN StmBoundsStatus * dpBst_finWhitespace
- = new StmBoundsStatus( *this, *this, nF_fin_Whitespace, true);
-
- // dpMain aufbauen:
- aStateMachine.AddStatus(dpStatusTop);
- aStateMachine.AddStatus(dpStatusWhite);
- aStateMachine.AddStatus(dpStatusWord);
-
- aStateMachine.AddStatus(dpBst_goto_CheckStar);
- aStateMachine.AddStatus(dpBst_goto_AtTag);
-
- aStateMachine.AddStatus(dpBst_finError);
- aStateMachine.AddStatus(dpBst_finIgnore);
- aStateMachine.AddStatus(dpBst_finEol);
- aStateMachine.AddStatus(dpBst_finEof);
- aStateMachine.AddStatus(dpBst_finAnyWord);
- aStateMachine.AddStatus(dpBst_finWhitespace);
-
- aStateMachine.AddToken( "*", 0, A_nPunctDefStatus, goto_CheckStar );
- aStateMachine.AddToken( "@ATT", TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@att", TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@ATTENTION",
- TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@attention",
- TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@author", TCF_atstd_author, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@change", TCF_atstd_change, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@collab", TCF_atstd_collab, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@collaborator",
- TCF_atstd_collab, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@contact", TCF_atstd_contact, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@copyright",TCF_atstd_copyright, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@descr", TCF_atstd_descr, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@docdate", TCF_atstd_docdate, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@derive", TCF_atstd_derive, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@instance",TCF_atstd_instance, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@life", TCF_atstd_life, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@lifecycle",
- TCF_atstd_life, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@multi", TCF_atstd_multi, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@multiplicity",
- TCF_atstd_multi, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@onerror", TCF_atstd_onerror, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@persist", TCF_atstd_persist, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@postcond",TCF_atstd_postcond,A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@precond", TCF_atstd_precond, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@resp", TCF_atstd_responsibility,
- A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@responsibility",
- TCF_atstd_return, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@return", TCF_atstd_return, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@short", TCF_atstd_short, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@todo", TCF_atstd_todo, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@version", TCF_atstd_version, A_nAtTagDefStatus, goto_AtTag );
-
- aStateMachine.AddToken( "@base", TCF_at_base, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@exception",TCF_at_exception, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@impl", TCF_at_impl, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@key", TCF_at_key, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@param", TCF_at_param, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@see", TCF_at_see, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@seealso", TCF_at_see, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@since", TCF_at_since, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@tpl", TCF_at_template, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@tplparam",
- TCF_at_template, A_nAtTagDefStatus, goto_AtTag );
-
- aStateMachine.AddToken( "@interface",TCF_at_interface, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@internal",TCF_at_internal, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@obsolete",TCF_at_obsolete, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@deprecated",TCF_at_obsolete, A_nAtTagDefStatus, goto_AtTag );
-
- aStateMachine.AddToken( "@module", TCF_at_module, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@file", TCF_at_file, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@gloss", TCF_at_gloss, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@global#", TCF_at_global, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@include#",TCF_at_include, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@#", TCF_at_label, A_nAtTagDefStatus, goto_AtTag );
-
- aStateMachine.AddToken( "@HTML", TCF_at_HTML, A_nAtTagDefStatus, goto_AtTag );
- aStateMachine.AddToken( "@NOHTML", TCF_at_NOHTML, A_nAtTagDefStatus, goto_AtTag );
-
- aStateMachine.AddToken( "\r\n", 0, A_nPunctDefStatus, finEol );
- aStateMachine.AddToken( "\n", 0, A_nPunctDefStatus, finEol );
- aStateMachine.AddToken( "\r", 0, A_nPunctDefStatus, finEol );
-};
-
-void
-Context_AdocStd::SetMode_IsMultiLine( bool i_bTrue )
-{
- bIsMultiline = i_bTrue;
-}
-
-DYN TextToken *
-TCF_Whitespace(const char * i_sText)
-{
- UINT8 nSize = static_cast<UINT8>(strlen(i_sText));
- for ( const char * pTab = strchr(i_sText,'\t');
- pTab != 0;
- pTab = strchr(pTab+1,'\t') )
- {
- nSize += 3;
- }
-
- return new Tok_Whitespace(nSize);
-}
-
-
-} // namespace adoc
-
-
-/*
-@ATT[ENTION]
-@author
-@change[s]
-@collab[orators]
-@contact
-@copyright
-@descr
-@devstat[e]
-@docdate
-@derive
-@instance
-@life[cycle]
-@multi[plicity]
-@onerror
-@persist[ence]
-@postcond
-@precond
-@return
-@short
-@todo
-
-@module
-@file
-@gloss[ary]
-
-
-@base <BasisklassenName>
-@exception <ExceptionName>
-@impl[ements] <IDL-Construct>
-@key[words]|[s]
-@param <FunctionParameterName> [<Range of valid values>]
-@see[also]
-@templ[ate] <FormalTemplateParameterName>
-
-@internal
-@obsolete
-
-@#<Label>
-
-@global#<Label> Global comment.
-@include#<Label>
-
-
-*/
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/cx_a_sub.cxx b/autodoc/source/parser/adoc/cx_a_sub.cxx
deleted file mode 100644
index 03c6b8a4..00000000
--- a/autodoc/source/parser/adoc/cx_a_sub.cxx
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/cx_a_sub.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <tokens/parseinc.hxx>
-#include <x_parse.hxx>
-#include <adoc/tk_docw.hxx>
-
-
-namespace adoc {
-
-//************************ Cx_LineStart ************************//
-
-Cx_LineStart::Cx_LineStart( TkpContext & i_rFollowUpContext )
- : pDealer(0),
- pFollowUpContext(&i_rFollowUpContext)
-{
-}
-
-void
-Cx_LineStart::ReadCharChain( CharacterSource & io_rText )
-{
- uintt nCount = 0;
- for ( char cNext = io_rText.CurChar(); cNext == 32 OR cNext == 9; cNext = io_rText.MoveOn() )
- {
- if (cNext == 32)
- nCount++;
- else if (cNext == 9)
- nCount += 4;
- }
- io_rText.CutToken();
-
- if (nCount < 50)
- pNewToken = new Tok_LineStart(UINT8(nCount));
- else
- pNewToken = new Tok_LineStart(0);
-}
-
-bool
-Cx_LineStart::PassNewToken()
-{
- if (pNewToken)
- {
- pNewToken.Release()->DealOut(*pDealer);
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_LineStart::FollowUpContext()
-{
- return *pFollowUpContext;
-}
-
-
-//************************ Cx_CheckStar ************************//
-
-Cx_CheckStar::Cx_CheckStar( TkpContext & i_rFollowUpContext )
- : pDealer(0),
- pFollowUpContext(&i_rFollowUpContext),
- pEnd_FollowUpContext(0),
- bCanBeEnd(false),
- bEndTokenFound(false)
-{
-}
-
-
-void
-Cx_CheckStar::ReadCharChain( CharacterSource & io_rText )
-{
- bEndTokenFound = false;
- if (bCanBeEnd)
- {
- char cNext = jumpOver(io_rText,'*');
- if ( NULCH == cNext )
- throw X_Parser(X_Parser::x_UnexpectedEOF, "", String::Null_(), 0);
- if (cNext == '/')
- {
- io_rText.MoveOn();
- pNewToken = new Tok_EoDocu;
- bEndTokenFound = true;
- }
- else
- {
- pNewToken = new Tok_DocWord(io_rText.CutToken());
- }
- }
- else
- {
- jumpToWhite(io_rText);
- pNewToken = new Tok_DocWord(io_rText.CutToken());
- }
-}
-
-bool
-Cx_CheckStar::PassNewToken()
-{
- if (pNewToken)
- {
- pNewToken.Release()->DealOut(*pDealer);
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_CheckStar::FollowUpContext()
-{
- if (bEndTokenFound)
- return *pEnd_FollowUpContext;
- else
- return *pFollowUpContext;
-}
-
-
-//************************ Cx_AtTagCompletion ************************//
-
-Cx_AtTagCompletion::Cx_AtTagCompletion( TkpContext & i_rFollowUpContext )
- : pDealer(0),
- pFollowUpContext(&i_rFollowUpContext)
-{
-}
-
-void
-Cx_AtTagCompletion::ReadCharChain( CharacterSource & io_rText )
-{
- jumpToWhite(io_rText);
- csv_assert(fCur_TokenCreateFunction != 0);
- pNewToken = (*fCur_TokenCreateFunction)(io_rText.CutToken());
-}
-
-bool
-Cx_AtTagCompletion::PassNewToken()
-{
- if (pNewToken)
- {
- pNewToken.Release()->DealOut(*pDealer);
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_AtTagCompletion::FollowUpContext()
-{
- return *pFollowUpContext;
-}
-
-
-
-
-} // namespace adoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/docu_pe.cxx b/autodoc/source/parser/adoc/docu_pe.cxx
deleted file mode 100644
index 78b0ab86..00000000
--- a/autodoc/source/parser/adoc/docu_pe.cxx
+++ /dev/null
@@ -1,405 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/docu_pe.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <ary/info/ci_attag.hxx>
-#include <ary/info/ci_text.hxx>
-#include <adoc/adoc_tok.hxx>
-#include <adoc/tk_attag.hxx>
-#include <adoc/tk_docw.hxx>
-
-
-namespace adoc
-{
-
-
-inline bool
-Adoc_PE::UsesHtmlInDocuText()
-{
- return bUsesHtmlInDocuText;
-}
-
-
-
-
-Adoc_PE::Adoc_PE()
- : pCurDocu(0),
- pCurAtTag(0),
- nLineCountInDocu(0),
- nCurSpecialMeaningTokens(0),
- nCurSubtractFromLineStart(0),
- eCurTagState(ts_new),
- eDocuState(ds_wait_for_short),
- bIsComplete(false),
- bUsesHtmlInDocuText(false)
-{
-}
-
-Adoc_PE::~Adoc_PE()
-{
-}
-
-void
-Adoc_PE::Hdl_at_std( const Tok_at_std & i_rTok )
-{
- InstallAtTag(
- CurDocu().Create_StdTag(i_rTok.Id()) );
-}
-
-void
-Adoc_PE::Hdl_at_base( const Tok_at_base & )
-{
- InstallAtTag(
- CurDocu().CheckIn_BaseTag() );
-}
-
-void
-Adoc_PE::Hdl_at_exception( const Tok_at_exception & )
-{
- InstallAtTag(
- CurDocu().CheckIn_ExceptionTag() );
-}
-
-void
-Adoc_PE::Hdl_at_impl( const Tok_at_impl & )
-{
- InstallAtTag(
- CurDocu().Create_ImplementsTag() );
-}
-
-void
-Adoc_PE::Hdl_at_key( const Tok_at_key & )
-{
- InstallAtTag(
- CurDocu().Create_KeywordTag() );
-}
-
-void
-Adoc_PE::Hdl_at_param( const Tok_at_param & )
-{
- InstallAtTag(
- CurDocu().CheckIn_ParameterTag() );
-}
-
-void
-Adoc_PE::Hdl_at_see( const Tok_at_see & )
-{
- InstallAtTag(
- CurDocu().CheckIn_SeeTag() );
-}
-
-void
-Adoc_PE::Hdl_at_template( const Tok_at_template & )
-{
- InstallAtTag(
- CurDocu().CheckIn_TemplateTag() );
-}
-
-void
-Adoc_PE::Hdl_at_interface( const Tok_at_interface & )
-{
- CurDocu().Set_Interface();
-}
-
-void
-Adoc_PE::Hdl_at_internal( const Tok_at_internal & )
-{
- CurDocu().Set_Internal();
-}
-
-void
-Adoc_PE::Hdl_at_obsolete( const Tok_at_obsolete & )
-{
- CurDocu().Set_Obsolete();
-}
-
-void
-Adoc_PE::Hdl_at_module( const Tok_at_module & )
-{
- // KORR_FUTURE
-
-// pCurAtTag = CurDocu().Assign2_ModuleTag();
-// nCurSpecialMeaningTokens = pCurAtTag->NrOfSpecialMeaningTokens();
-}
-
-void
-Adoc_PE::Hdl_at_file( const Tok_at_file & )
-{
- // KORR_FUTURE
-
-// pCurAtTag = CurDocu().Assign2_FileTag();
-// nCurSpecialMeaningTokens = pCurAtTag->NrOfSpecialMeaningTokens();
-}
-
-void
-Adoc_PE::Hdl_at_gloss( const Tok_at_gloss & )
-{
- // KORR_FUTURE
-
-// Create_GlossaryEntry();
-}
-
-void
-Adoc_PE::Hdl_at_global( const Tok_at_global & )
-{
- // KORR_FUTURE
-// Create_GlobalTextComponent();
-}
-
-void
-Adoc_PE::Hdl_at_include( const Tok_at_include & )
-{
- // KORR_FUTURE
-}
-
-void
-Adoc_PE::Hdl_at_label( const Tok_at_label & )
-{
- InstallAtTag(
- CurDocu().Create_LabelTag() );
-}
-
-void
-Adoc_PE::Hdl_at_since( const Tok_at_since & )
-{
- InstallAtTag(
- CurDocu().Create_SinceTag() );
-}
-
-void
-Adoc_PE::Hdl_at_HTML( const Tok_at_HTML & )
-{
- bUsesHtmlInDocuText = true;
-}
-
-void
-Adoc_PE::Hdl_at_NOHTML( const Tok_at_NOHTML & )
-{
- bUsesHtmlInDocuText = false;
-}
-
-void
-Adoc_PE::Hdl_DocWord( const Tok_DocWord & i_rTok )
-{
- bool bIsSpecial = false;
- if ( nCurSpecialMeaningTokens > 0 )
- {
- bIsSpecial = CurAtTag().Add_SpecialMeaningToken(
- i_rTok.Text(),
- CurAtTag().NrOfSpecialMeaningTokens()
- - (--nCurSpecialMeaningTokens) );
- }
-
- if ( NOT bIsSpecial )
- {
- if ( eDocuState == ds_wait_for_short OR eDocuState == ds_1newline_after_short )
- eDocuState = ds_in_short;
- if (nLineCountInDocu == 0)
- nLineCountInDocu = 1;
-
- uintt nLength = i_rTok.Length();
- if ( nLength > 2 )
- {
- bool bMaybeGlobalLink = strncmp( "::", i_rTok.Text(), 2 ) == 0;
- bool bMayBeFunction = *(i_rTok.Text() + nLength - 2) == '('
- AND *(i_rTok.Text() + nLength - 1) == ')';
- if ( bMaybeGlobalLink OR bMayBeFunction )
- {
- CurAtTag().Add_PotentialLink( i_rTok.Text(),
- bMaybeGlobalLink,
- bMayBeFunction );
- return;
- }
- }
-
- CurAtTag().Add_Token( i_rTok.Text() );
- eCurTagState = ts_std;
- }
-}
-
-void
-Adoc_PE::Hdl_Whitespace( const Tok_Whitespace & i_rTok )
-{
- if ( eCurTagState == ts_std )
- {
-
- CurAtTag().Add_Whitespace(i_rTok.Size());
- }
-}
-
-void
-Adoc_PE::Hdl_LineStart( const Tok_LineStart & i_rTok )
-{
- if ( pCurAtTag == 0 )
- return;
-
- if ( nLineCountInDocu == 2 )
- {
- nCurSubtractFromLineStart = i_rTok.Size();
- eCurTagState = ts_std;
- }
- else if ( nLineCountInDocu > 2 )
- {
- if ( i_rTok.Size() > nCurSubtractFromLineStart )
- {
- CurAtTag().Add_Whitespace( i_rTok.Size()
- - nCurSubtractFromLineStart );
- }
- // else do nothing, because there is no whitespace.
- }
-}
-
-void
-Adoc_PE::Hdl_Eol( const Tok_Eol & )
-{
- if ( pCurAtTag == 0 )
- return;
-
- nLineCountInDocu++;
-
- if ( nCurSpecialMeaningTokens == 0 )
- {
- CurAtTag().Add_Eol();
-
- switch ( eDocuState )
- {
- case ds_wait_for_short: break;
- case ds_in_short: if ( nLineCountInDocu < 4 )
- eDocuState = ds_1newline_after_short;
- else
- {
- RenameCurShortTag();
- eDocuState = ds_in_descr;
- }
- break;
- case ds_1newline_after_short: FinishCurShortTag();
- eDocuState = ds_in_descr;
- break;
- default:
- ; // Do noting.
- }
- }
- else
- {
- nCurSpecialMeaningTokens = 0;
- }
-
-
-}
-
-void
-Adoc_PE::Hdl_EoDocu( const Tok_EoDocu & )
-{
- bIsComplete = true;
-}
-
-DYN ary::doc::OldCppDocu *
-Adoc_PE::ReleaseJustParsedDocu()
-{
- pCurAtTag = 0;
- nLineCountInDocu = 0;
- nCurSpecialMeaningTokens = 0;
- nCurSubtractFromLineStart = 0;
- eCurTagState = ts_new;
- eDocuState = ds_wait_for_short;
- bIsComplete = false;
- return pCurDocu.Release();
-}
-
-void
-Adoc_PE::InstallAtTag( DYN ary::info::AtTag * let_dpTag,
- bool i_bImplicit )
-{
- pCurAtTag = let_dpTag;
- if ( pCurAtTag != 0 )
- {
- nCurSpecialMeaningTokens = pCurAtTag->NrOfSpecialMeaningTokens();
- pCurAtTag->Set_HtmlUseInDocuText( bUsesHtmlInDocuText );
- }
-
- eCurTagState = ts_new;
- if ( NOT i_bImplicit )
- eDocuState = ds_std;
-}
-
-ary::doc::OldCppDocu &
-Adoc_PE::CurDocu()
-{
- if (NOT pCurDocu)
- pCurDocu = new ary::doc::OldCppDocu;
- return *pCurDocu;
-}
-
-ary::info::AtTag &
-Adoc_PE::CurAtTag()
-{
- if (NOT pCurAtTag)
- {
- if ( int(eDocuState) < int(ds_in_descr) )
- {
- InstallAtTag(
- CurDocu().Create_StdTag(ary::info::atid_short),
- true );
- }
- else
- {
- InstallAtTag(
- CurDocu().Create_StdTag(ary::info::atid_descr),
- true );
- }
- }
- return *pCurAtTag;
-}
-
-void
-Adoc_PE::RenameCurShortTag()
-{
- CurDocu().Replace_AtShort_By_AtDescr();
-}
-
-void
-Adoc_PE::FinishCurShortTag()
-{
- InstallAtTag(
- CurDocu().Create_StdTag(ary::info::atid_descr),
- true );
-}
-
-
-} // namespace adoc
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/makefile.mk b/autodoc/source/parser/adoc/makefile.mk
deleted file mode 100644
index 48e4084e..00000000
--- a/autodoc/source/parser/adoc/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=parser_adoc
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/adoc_tok.obj \
- $(OBJ)$/a_rdocu.obj \
- $(OBJ)$/cx_a_std.obj \
- $(OBJ)$/cx_a_sub.obj \
- $(OBJ)$/docu_pe.obj \
- $(OBJ)$/prs_adoc.obj \
- $(OBJ)$/tk_attag.obj \
- $(OBJ)$/tk_docw.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser/adoc/prs_adoc.cxx b/autodoc/source/parser/adoc/prs_adoc.cxx
deleted file mode 100644
index 5767b422..00000000
--- a/autodoc/source/parser/adoc/prs_adoc.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/prs_adoc.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <adoc/cx_a_std.hxx>
-
-
-
-namespace adoc
-{
-
-DocuParser_AutodocStyle::DocuParser_AutodocStyle()
-{
-}
-
-DocuParser_AutodocStyle::~DocuParser_AutodocStyle()
-{
-}
-
-DYN autodoc::TkpDocuContext *
-DocuParser_AutodocStyle::Create_DocuContext() const
-{
- return new Context_AdocStd;
-}
-
-} // namespace adoc
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/tk_attag.cxx b/autodoc/source/parser/adoc/tk_attag.cxx
deleted file mode 100644
index 2d7a9b5f..00000000
--- a/autodoc/source/parser/adoc/tk_attag.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/tk_attag.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <adoc/tokintpr.hxx>
-
-
-
-namespace adoc {
-
-void
-Tok_at_std::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Hdl_at_std(*this);
-}
-
-const char *
-Tok_at_std::Text() const
-{
- // KORR_FUTURE
- return "A Tag";
-
-// return eId.Text();
-}
-
-
-#define DEFINE_TOKEN_CLASS(name, text) \
-void \
-Tok_##name::Trigger( TokenInterpreter & io_rInterpreter ) const \
-{ io_rInterpreter.Hdl_##name(*this); } \
-const char * \
-Tok_##name::Text() const \
-{ return text; }
-
-DEFINE_TOKEN_CLASS(at_base, "Base Classes")
-DEFINE_TOKEN_CLASS(at_exception, "Exceptions")
-DEFINE_TOKEN_CLASS(at_impl, "Implements")
-DEFINE_TOKEN_CLASS(at_key, "Keywords")
-DEFINE_TOKEN_CLASS(at_param, "Parameters")
-DEFINE_TOKEN_CLASS(at_see, "See Also")
-DEFINE_TOKEN_CLASS(at_template, "Template Parameters")
-DEFINE_TOKEN_CLASS(at_interface, "Interface")
-DEFINE_TOKEN_CLASS(at_internal, "[ INTERNAL ]")
-DEFINE_TOKEN_CLASS(at_obsolete, "[ DEPRECATED ]")
-DEFINE_TOKEN_CLASS(at_module, "Module")
-DEFINE_TOKEN_CLASS(at_file, "File")
-DEFINE_TOKEN_CLASS(at_gloss, "Glossary")
-DEFINE_TOKEN_CLASS(at_global, "<global doc text>")
-DEFINE_TOKEN_CLASS(at_include, "<included text>")
-DEFINE_TOKEN_CLASS(at_label, "Label")
-DEFINE_TOKEN_CLASS(at_HTML, "")
-DEFINE_TOKEN_CLASS(at_NOHTML, "")
-DEFINE_TOKEN_CLASS(at_since, "Since");
-
-} // namespace adoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/adoc/tk_docw.cxx b/autodoc/source/parser/adoc/tk_docw.cxx
deleted file mode 100644
index 7141d320..00000000
--- a/autodoc/source/parser/adoc/tk_docw.cxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <adoc/tk_docw.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <adoc/tokintpr.hxx>
-
-
-
-namespace adoc {
-
-
- static const char C_sSpace[300] =
- " "
- " "
- " "
- " "
- " "
- " ";
-
-
-//*********************** Tok_DocWord ******************//
-
-void
-Tok_DocWord::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Hdl_DocWord(*this);
-}
-
-const char *
-Tok_DocWord::Text() const
-{
- return sText;
-}
-
-//*********************** Tok_Whitespace ******************//
-
-
-void
-Tok_Whitespace::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Hdl_Whitespace(*this);
-}
-
-const char *
-Tok_Whitespace::Text() const
-{
- return C_sSpace + 299 - nSize;
-}
-
-
-
-//*********************** Tok_LineStart ******************//
-
-
-void
-Tok_LineStart::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Hdl_LineStart(*this);
-}
-
-const char *
-Tok_LineStart::Text() const
-{
- return C_sSpace + 299 - nSize;
-}
-
-
-//*********************** Tok_Eol ******************//
-
-void
-Tok_Eol::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Hdl_Eol(*this);
-}
-
-const char *
-Tok_Eol::Text() const
-{
- return "\n";
-}
-
-
-
-//*********************** Tok_EoDocu ******************//
-
-void
-Tok_EoDocu::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Hdl_EoDocu(*this);
-}
-
-const char *
-Tok_EoDocu::Text() const
-{
- return "*/";
-}
-
-} // namespace adoc
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/all_toks.cxx b/autodoc/source/parser/cpp/all_toks.cxx
deleted file mode 100644
index 8934e2e8..00000000
--- a/autodoc/source/parser/cpp/all_toks.cxx
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <all_toks.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cpp/ctokdeal.hxx>
-#include "c_dealer.hxx"
-#include "tokintpr.hxx"
-
-
-
-namespace cpp {
-
-
-void
-Token::DealOut( ::TokenDealer & o_rDealer )
-{
- // KORR_FUTURE HACK (casting to derivation cpp::TokenDealer)
- o_rDealer.AsDistributor()->Deal_CppCode(*this);
-}
-
-
-#define DEF_TOKEN_CLASS(name) \
-void \
-Tok_##name::Trigger( TokenInterpreter & io_rInterpreter ) const \
-{ io_rInterpreter.Hdl_##name(*this); } \
-INT16 \
-Tok_##name::TypeId() const { return Tid_##name; } \
-const char * \
-Tok_##name::Text() const { return #name; }
-
-#define DEF_TOKEN_CLASS_WITHTEXT(name, text ) \
-void \
-Tok_##name::Trigger( TokenInterpreter & io_rInterpreter ) const \
-{ io_rInterpreter.Hdl_##name(*this); } \
-INT16 \
-Tok_##name::TypeId() const { return Tid_##name; } \
-const char * \
-Tok_##name::Text() const { return text; }
-
-
-DEF_TOKEN_CLASS_WITHTEXT(Identifier,sText)
-DEF_TOKEN_CLASS_WITHTEXT(Operator,sText)
-
-DEF_TOKEN_CLASS(operator)
-DEF_TOKEN_CLASS(class)
-DEF_TOKEN_CLASS(struct)
-DEF_TOKEN_CLASS(union)
-DEF_TOKEN_CLASS(enum)
-DEF_TOKEN_CLASS(typedef)
-DEF_TOKEN_CLASS(public)
-DEF_TOKEN_CLASS(protected)
-DEF_TOKEN_CLASS(private)
-DEF_TOKEN_CLASS(template)
-DEF_TOKEN_CLASS(virtual)
-DEF_TOKEN_CLASS(friend)
-DEF_TOKEN_CLASS_WITHTEXT(Tilde,"~")
-DEF_TOKEN_CLASS(const)
-DEF_TOKEN_CLASS(volatile)
-DEF_TOKEN_CLASS(extern)
-DEF_TOKEN_CLASS(static)
-DEF_TOKEN_CLASS(mutable)
-DEF_TOKEN_CLASS(register)
-DEF_TOKEN_CLASS(inline)
-DEF_TOKEN_CLASS(explicit)
-DEF_TOKEN_CLASS(namespace)
-DEF_TOKEN_CLASS(using)
-DEF_TOKEN_CLASS(throw)
-DEF_TOKEN_CLASS_WITHTEXT(SwBracket_Left,"{")
-DEF_TOKEN_CLASS_WITHTEXT(SwBracket_Right,"}")
-DEF_TOKEN_CLASS_WITHTEXT(ArrayBracket_Left,"[")
-DEF_TOKEN_CLASS_WITHTEXT(ArrayBracket_Right,"]")
-DEF_TOKEN_CLASS_WITHTEXT(Bracket_Left,"(")
-DEF_TOKEN_CLASS_WITHTEXT(Bracket_Right,")")
-DEF_TOKEN_CLASS_WITHTEXT(DoubleColon,"::")
-DEF_TOKEN_CLASS_WITHTEXT(Semicolon,";")
-DEF_TOKEN_CLASS_WITHTEXT(Comma,",")
-DEF_TOKEN_CLASS_WITHTEXT(Colon,":")
-DEF_TOKEN_CLASS_WITHTEXT(Assign,"=")
-DEF_TOKEN_CLASS_WITHTEXT(Less,"<")
-DEF_TOKEN_CLASS_WITHTEXT(Greater,">")
-DEF_TOKEN_CLASS_WITHTEXT(Asterix,"*")
-DEF_TOKEN_CLASS_WITHTEXT(AmpersAnd,"&")
-DEF_TOKEN_CLASS_WITHTEXT(Ellipse,"...")
-DEF_TOKEN_CLASS(typename)
-
-DEF_TOKEN_CLASS_WITHTEXT(DefineName,sText)
-DEF_TOKEN_CLASS_WITHTEXT(MacroName,sText)
-DEF_TOKEN_CLASS_WITHTEXT(MacroParameter,sText)
-// DEF_TOKEN_CLASS_WITHTEXT(PreProDefinition,sText)
-
-void
-Tok_PreProDefinition::Trigger( TokenInterpreter & io_rInterpreter ) const
-{ io_rInterpreter.Hdl_PreProDefinition(*this); }
-
-INT16
-Tok_PreProDefinition::TypeId() const { return Tid_PreProDefinition; }
-
-const char *
-Tok_PreProDefinition::Text() const
-{
- return sText;
-}
-
-
-
-DEF_TOKEN_CLASS_WITHTEXT(BuiltInType,sText)
-DEF_TOKEN_CLASS_WITHTEXT(TypeSpecializer,sText)
-DEF_TOKEN_CLASS_WITHTEXT(Constant,sText)
-
-const char *
-Tok_UnblockMacro::Text() const
-{
- return sMacroName;
-}
-
-void
-Tok_UnblockMacro::DealOut( ::TokenDealer & o_rDealer )
-{
- // KORR_FUTURE HACK (casting to derivation cpp::TokenDealer)
- o_rDealer.AsDistributor()->Deal_Cpp_UnblockMacro(*this);
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/all_toks.hxx b/autodoc/source/parser/cpp/all_toks.hxx
deleted file mode 100644
index e2b7a7f4..00000000
--- a/autodoc/source/parser/cpp/all_toks.hxx
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_ALL_TOKS_HXX
-#define ADC_CPP_ALL_TOKS_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_tok.hxx"
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp {
-
-class Tok_Identifier : public cpp::Token
-{
- public:
- Tok_Identifier(
- const char * i_sText ) : sText(i_sText) {}
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual INT16 TypeId() const;
- virtual const char *
- Text() const;
- private:
- String sText;
-};
-const INT16 Tid_Identifier = 1;
-
-/** == != <= >= && || !
-
- new delete sizeof typeid
- + - / % ^ | << >>
- . -> ?
- += -= *= /= %= &= |= ^= <<= >>=
-*/
-class Tok_Operator : public cpp::Token
-{
- public:
- Tok_Operator(
- const char * i_sText ) : sText(i_sText) {}
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual INT16 TypeId() const;
- virtual const char *
- Text() const;
- private:
- String sText;
-};
-const INT16 Tid_Operator = 2;
-
-
-
-#define DECL_TOKEN_CLASS(name,tid) \
-class Tok_##name : public cpp::Token \
-{ public: \
- virtual void Trigger( \
- TokenInterpreter & io_rInterpreter ) const; \
- virtual INT16 TypeId() const; \
- virtual const char * \
- Text() const; \
-}; \
-const INT16 Tid_##name = tid
-
-DECL_TOKEN_CLASS(operator,3);
-DECL_TOKEN_CLASS(class,4);
-DECL_TOKEN_CLASS(struct,5);
-DECL_TOKEN_CLASS(union,6);
-DECL_TOKEN_CLASS(enum,7);
-DECL_TOKEN_CLASS(typedef,8);
-DECL_TOKEN_CLASS(public,9);
-DECL_TOKEN_CLASS(protected,10);
-DECL_TOKEN_CLASS(private,11);
-DECL_TOKEN_CLASS(template,12);
-DECL_TOKEN_CLASS(virtual,13);
-DECL_TOKEN_CLASS(friend,14);
-DECL_TOKEN_CLASS(Tilde,15);
-DECL_TOKEN_CLASS(const,16);
-DECL_TOKEN_CLASS(volatile,17);
-DECL_TOKEN_CLASS(extern,18);
-DECL_TOKEN_CLASS(static,19);
-DECL_TOKEN_CLASS(mutable,20);
-DECL_TOKEN_CLASS(register,21);
-DECL_TOKEN_CLASS(inline,22);
-DECL_TOKEN_CLASS(explicit,23);
-DECL_TOKEN_CLASS(namespace,24);
-DECL_TOKEN_CLASS(using,25);
-DECL_TOKEN_CLASS(throw,26);
-DECL_TOKEN_CLASS(SwBracket_Left,27);
-DECL_TOKEN_CLASS(SwBracket_Right,28);
-DECL_TOKEN_CLASS(ArrayBracket_Left,29);
-DECL_TOKEN_CLASS(ArrayBracket_Right,30);
-DECL_TOKEN_CLASS(Bracket_Left,31);
-DECL_TOKEN_CLASS(Bracket_Right,32);
-DECL_TOKEN_CLASS(DoubleColon,33);
-DECL_TOKEN_CLASS(Semicolon,34);
-DECL_TOKEN_CLASS(Comma,35);
-DECL_TOKEN_CLASS(Colon,36);
-DECL_TOKEN_CLASS(Assign,37);
-DECL_TOKEN_CLASS(Less,38);
-DECL_TOKEN_CLASS(Greater,39);
-DECL_TOKEN_CLASS(Asterix,40);
-DECL_TOKEN_CLASS(AmpersAnd,41);
-DECL_TOKEN_CLASS(Ellipse,42);
-DECL_TOKEN_CLASS(typename,43);
-
-#undef DECL_TOKEN_CLASS
-
-#define DECL_TOKEN_CLASS_WITHTEXT(name,tid) \
-class Tok_##name : public cpp::Token \
-{ public: \
- Tok_##name( \
- const char * i_sText ) : sText(i_sText) {} \
- virtual void Trigger( \
- TokenInterpreter & io_rInterpreter ) const; \
- virtual INT16 TypeId() const; \
- virtual const char * \
- Text() const; \
- private: \
- String sText; \
-}; \
-const INT16 Tid_##name = tid
-
-
-
-DECL_TOKEN_CLASS_WITHTEXT(DefineName,44);
-DECL_TOKEN_CLASS_WITHTEXT(MacroName,45);
-DECL_TOKEN_CLASS_WITHTEXT(MacroParameter,46);
-DECL_TOKEN_CLASS_WITHTEXT(PreProDefinition,47);
-
-/** char short int long float double wchar_t size_t
-*/
-DECL_TOKEN_CLASS_WITHTEXT(BuiltInType, 48);
-
-/** signed unsigned
-*/
-DECL_TOKEN_CLASS_WITHTEXT(TypeSpecializer, 49);
-DECL_TOKEN_CLASS_WITHTEXT(Constant, 50);
-
-
-
-/** This token does nothing in C++ code. It is added by the
- internal macro-replacer to mark the position, where a
- define or macro becomes valid again, which was until then
- invalid, because the text was a replacement of this macro.
- ( Avoiding endless recursive macro replacement. )
-*/
-class Tok_UnblockMacro : public ::TextToken
-{
- public:
- Tok_UnblockMacro(
- const char * i_sMacroName ) : sMacroName(i_sMacroName) {}
- virtual const char* Text() const;
-
- virtual void DealOut(
- ::TokenDealer & o_rDealer );
- private:
- String sMacroName;
-};
-
-
-
-/* just for viewing:
-class Tok_TypeKey : public cpp::Token // file-><type-PE>
-class Tok_Template : public cpp::Token // file
-class Tok_Namespace : public cpp::Token // file
-class Tok_Bracket : public cpp::Token // ueberall
-class Tok_Separator : public cpp::Token // ueberall
-
-class Tok_Identifier : public cpp::Token // ueberall
-class Tok_NameSeparator : public cpp::Token // Type, Name
-class Tok_BuiltInType : public cpp::Token // ueberall
-class Tok_ConVol : public cpp::Token // class-><FuVa>
-class Tok_StorageClass : public cpp::Token // file-><type>,<FuVa>
-class Tok_OperatorFunctionName : public cpp::Token // class
-
-class Tok_Protection : public cpp::Token // class
-class Tok_Virtual : public cpp::Token // class
-class Tok_Friend : public cpp::Token // class
-class Tok_Tilde : public cpp::Token // class, expression
-
-class Tok_Ellipse : public cpp::Token // function-ParaList
-class Tok_Assignment : public cpp::Token // VariableDeclaraton, Function, Parameter
-class Tok_Throw : public cpp::Token // function
-class Tok_LessMore : public cpp::Token
-class Tok_Operator : public cpp::Token // expression
-
-class Tok_Ignore : public cpp::Token
-class Tok_ContextChanger : public cpp::Token
-*/
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_dealer.cxx b/autodoc/source/parser/cpp/c_dealer.cxx
deleted file mode 100644
index a3abd15b..00000000
--- a/autodoc/source/parser/cpp/c_dealer.cxx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "c_dealer.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <ary/loc/loc_root.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <adoc/a_rdocu.hxx>
-#include "all_toks.hxx"
-#include "c_rcode.hxx"
-
-
-namespace ary
-{
-namespace loc
-{
- class Root;
-}
-}
-
-
-
-
-namespace cpp
-{
-
-Distributor::Distributor( ary::cpp::Gate & io_rAryGate )
- : aCppPreProcessor(),
- aCodeExplorer(io_rAryGate),
- aDocuExplorer(),
- pGate(&io_rAryGate),
- pFileEventHandler(0),
- pDocuDistributor(0)
-{
- pFileEventHandler = & aCodeExplorer.FileEventHandler();
- pDocuDistributor = & aCodeExplorer.DocuDistributor();
-}
-
-void
-Distributor::AssignPartners( CharacterSource & io_rSourceText,
- const MacroMap & i_rValidMacros )
-{
- aCppPreProcessor.AssignPartners(aCodeExplorer, io_rSourceText, i_rValidMacros);
-}
-
-Distributor::~Distributor()
-{
-}
-
-void
-Distributor::StartNewFile( const csv::ploc::Path & i_file )
-{
- const csv::ploc::Root &
- root_dir = i_file.RootDir();
- StreamLock
- sl(700);
- root_dir.Get(sl());
- csv::ploc::Path
- root_path( sl().c_str(), true );
- ary::loc::Le_id
- root_id = pGate->Locations().CheckIn_Root(root_path).LeId();
- ary::loc::File &
- rFile = pGate->Locations().CheckIn_File(
- i_file.File(),
- i_file.DirChain(),
- root_id );
- pFileEventHandler->SetCurFile(rFile);
-
- aCodeExplorer.StartNewFile();
-
- csv_assert( pDocuDistributor != 0 );
- aDocuExplorer.StartNewFile(*pDocuDistributor);
-}
-
-
-void
-Distributor::Deal_Eol()
-{
- pFileEventHandler->Event_IncrLineCount();
-}
-
-void
-Distributor::Deal_Eof()
-{
- // Do nothing yet.
-}
-
-void
-Distributor::Deal_Cpp_UnblockMacro( Tok_UnblockMacro & let_drToken )
-{
- aCppPreProcessor.UnblockMacro(let_drToken.Text());
- delete &let_drToken;
-}
-
-void
-Distributor::Deal_CppCode( cpp::Token & let_drToken )
-{
- aCppPreProcessor.Process_Token(let_drToken);
-}
-
-void
-Distributor::Deal_AdcDocu( adoc::Token & let_drToken )
-{
- aDocuExplorer.Process_Token(let_drToken);
-}
-
-Distributor *
-Distributor::AsDistributor()
-{
- return this;
-}
-
-
-
-
-
-} // namespace cpp
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_dealer.hxx b/autodoc/source/parser/cpp/c_dealer.hxx
deleted file mode 100644
index 040bcdab..00000000
--- a/autodoc/source/parser/cpp/c_dealer.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_C_DEALER_HXX
-#define ADC_CPP_C_DEALER_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cpp/ctokdeal.hxx>
-#include <adoc/atokdeal.hxx>
-#include <ary/info/docstore.hxx>
- // COMPONENTS
-#include "preproc.hxx"
-#include "c_rcode.hxx"
-#include <adoc/a_rdocu.hxx>
- // PARAMETERS
-
-namespace csv
-{
- namespace ploc
- {
- class Path;
- class DirectoryChain;
- }
-}
-
-
-class TokenParser;
-
-
-namespace cpp
-{
-
-class PE_File;
-class DefineDescription;
-
-
-class Distributor : public cpp::TokenDealer, /// Handle C++ code tokens.
- public adoc::TokenDealer /// Handle Autodoc documentation tokens.
-{
- public:
- typedef std::map< String, DefineDescription* > MacroMap;
-
- // LIFECYCLE
- Distributor(
- ary::cpp::Gate & io_rGate );
- ~Distributor();
- // OPERATIONS
- void AssignPartners(
- CharacterSource & io_rSourceText,
- const MacroMap & i_rValidMacros );
- void StartNewFile(
- const csv::ploc::Path &
- i_file );
- virtual void Deal_Eol();
- virtual void Deal_Eof();
-
- virtual void Deal_CppCode(
- cpp::Token & let_drToken );
- virtual void Deal_Cpp_UnblockMacro(
- Tok_UnblockMacro & let_drToken );
-
- virtual void Deal_AdcDocu(
- adoc::Token & let_drToken );
- virtual Distributor *
- AsDistributor();
- private:
- // DATA
- PreProcessor aCppPreProcessor;
- CodeExplorer aCodeExplorer;
- adoc::DocuExplorer aDocuExplorer;
- ary::cpp::Gate * pGate;
- FileScope_EventHandler *
- pFileEventHandler;
- DocuDealer * pDocuDistributor;
-};
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_rcode.cxx b/autodoc/source/parser/cpp/c_rcode.cxx
deleted file mode 100644
index 4979e2a4..00000000
--- a/autodoc/source/parser/cpp/c_rcode.cxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "c_rcode.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/loc/locp_le.hxx>
-#include "cpp_pe.hxx"
-#include <adc_cl.hxx>
-#include <x_parse.hxx>
-#include "pe_file.hxx"
-
-const uintt C_nNO_TRY = uintt(-1);
-
-
-namespace cpp {
-
-
-CodeExplorer::CodeExplorer( ary::cpp::Gate & io_rAryGate )
- : aGlobalParseContext(io_rAryGate),
- // aEnvironments,
- pPE_File(0),
- pGate(&io_rAryGate),
- dpCurToken(0)
-{
- pPE_File = new PE_File( aGlobalParseContext );
-}
-
-CodeExplorer::~CodeExplorer()
-{
-}
-
-void
-CodeExplorer::StartNewFile()
-{
- csv::erase_container(aEnvironments);
-
- aEnvironments.push_back( pPE_File.MutablePtr() );
- pPE_File->Enter(push);
-}
-
-void
-CodeExplorer::Process_Token( DYN cpp::Token & let_drToken )
-{
-if (DEBUG_ShowTokens())
-{
- Cout() << let_drToken.Text() << Endl();
-}
- dpCurToken = &let_drToken;
- aGlobalParseContext.ResetResult();
-
- do {
- CurToken().Trigger( CurEnv() );
- AcknowledgeResult();
- } while ( dpCurToken );
-}
-
-void
-CodeExplorer::AcknowledgeResult()
-{
- if (CurResult().eDone == done)
- dpCurToken = 0;
-
- switch ( CurResult().eStackAction )
- {
- case stay:
- break;
- case push:
- CurEnv().Leave(push);
- aEnvironments.push_back( &PushEnv() );
- PushEnv().Enter(push);
- break;
- case pop_success:
- CurEnv().Leave(pop_success);
- aEnvironments.pop_back();
- CurEnv().Enter(pop_success);
- break;
- case pop_failure:
- {
- Cpp_PE * pRecover = 0;
- do {
- CurEnv().Leave(pop_failure);
- aEnvironments.pop_back();
- if ( aEnvironments.empty() )
- break;
- pRecover = CurEnv().Handle_ChildFailure();
- } while ( pRecover == 0 );
- if ( pRecover != 0 )
- {
- aEnvironments.push_back(pRecover);
- pRecover->Enter(push);
- }
- else
- {
- throw X_Parser( X_Parser::x_UnexpectedToken, CurToken().Text(), aGlobalParseContext.CurFileName(), aGlobalParseContext.LineCount() );
- }
- } break;
- default:
- csv_assert(false);
- } // end switch(CurResult().eStackAction)
-}
-
-const Token &
-CodeExplorer::CurToken() const
-{
- csv_assert(dpCurToken);
-
- return *dpCurToken;
-}
-
-Cpp_PE &
-CodeExplorer::CurEnv() const
-{
- csv_assert(!aEnvironments.empty());
- csv_assert(aEnvironments.back() != 0);
-
- return *aEnvironments.back();
-}
-
-Cpp_PE &
-CodeExplorer::PushEnv() const
-{
- TokenProcessing_Result & rCurResult = const_cast< TokenProcessing_Result& >(aGlobalParseContext.CurResult());
- Cpp_PE * ret = dynamic_cast< Cpp_PE* >(rCurResult.pEnv2Push);
- csv_assert( ret != 0 );
- return *ret;
-}
-
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_rcode.hxx b/autodoc/source/parser/cpp/c_rcode.hxx
deleted file mode 100644
index ddc60b2d..00000000
--- a/autodoc/source/parser/cpp/c_rcode.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_C_RCODE_HXX
-#define ADC_CPP_C_RCODE_HXX
-
-// BASE CLASSES
-#include <tokens/tokproct.hxx>
-// USED SERVICES
-#include <cosv/ploc.hxx>
-#include "cxt2ary.hxx"
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/loc/loc_types4loc.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
-}
-namespace doc
-{
- class OldCppDocu;
-}
-}
-
-namespace cpp
-{
- class PE_File;
- class Token;
- class Cpp_PE;
-
-
-
-
-class CodeExplorer : private TokenProcessing_Types
-
-{
- public:
- CodeExplorer(
- ary::cpp::Gate & io_rAryGate );
- ~CodeExplorer();
-
- void StartNewFile();
- void Process_Token(
- DYN cpp::Token & let_drToken );
- // ACCESS
- FileScope_EventHandler &
- FileEventHandler() { return aGlobalParseContext; }
- DocuDealer & DocuDistributor() { return aGlobalParseContext; }
-
- private:
- typedef std::vector< cpp::Cpp_PE* > EnvironmentStack;
-
- void AcknowledgeResult();
- const Token & CurToken() const;
- Cpp_PE & CurEnv() const;
- Cpp_PE & PushEnv() const;
- TokenProcessing_Result &
- CurResult() { return aGlobalParseContext.CurResult(); }
-
- // DATA
- ContextForAry aGlobalParseContext;
-
- EnvironmentStack aEnvironments;
- Dyn<PE_File> pPE_File;
-
- ary::cpp::Gate * pGate;
- cpp::Token * dpCurToken;
-};
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cpp_pe.cxx b/autodoc/source/parser/cpp/cpp_pe.cxx
deleted file mode 100644
index 45c4e84a..00000000
--- a/autodoc/source/parser/cpp/cpp_pe.cxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cpp_pe.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/doc/d_oldcppdocu.hxx>
-#include "cpp_tok.hxx"
-
-
-
-
-namespace cpp {
-
-void
-Cpp_PE::SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push )
-{
- rMyEnv.SetTokenResult( i_eDone,
- i_eWhat2DoWithEnvStack,
- i_pParseEnv2Push );
-}
-
-Cpp_PE::Cpp_PE( Cpp_PE * io_pParent )
- : ParseEnvironment( io_pParent ),
- rMyEnv( io_pParent->Env() )
-{
- csv_assert(io_pParent != 0);
-}
-
-Cpp_PE::Cpp_PE( EnvData & i_rEnv )
- : ParseEnvironment(0),
- rMyEnv(i_rEnv)
-{
-}
-
-void
-Cpp_PE::StdHandlingOfSyntaxError( const char * )
-{
- SetTokenResult(not_done, pop_failure);
-}
-
-
-Cpp_PE *
-Cpp_PE::Handle_ChildFailure()
-{
- return 0;
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cpp_pe.hxx b/autodoc/source/parser/cpp/cpp_pe.hxx
deleted file mode 100644
index c1b0b558..00000000
--- a/autodoc/source/parser/cpp/cpp_pe.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CPP_PE_HXX
-#define ADC_CPP_CPP_PE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <semantic/parseenv.hxx>
-#include "tokintpr.hxx"
- // COMPONENTS
-#include "pev.hxx"
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-namespace cpp {
-
-class Cpp_PE : public ::ParseEnvironment,
- public TokenInterpreter
-{
- public:
- typedef cpp::PeEnvironment EnvData;
-
- void SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push = 0 );
-
- virtual Cpp_PE * Handle_ChildFailure(); // Defaulted to 0.
-
- protected:
- Cpp_PE(
- Cpp_PE * io_pParent );
- Cpp_PE(
- EnvData & i_rEnv );
-
- EnvData & Env() const;
-
- void StdHandlingOfSyntaxError(
- const char * i_sText );
-
- private:
- // DATA
- EnvData & rMyEnv;
-};
-
-inline Cpp_PE::EnvData &
-Cpp_PE::Env() const
- { return rMyEnv; }
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cpp_tok.hxx b/autodoc/source/parser/cpp/cpp_tok.hxx
deleted file mode 100644
index 960ad0dc..00000000
--- a/autodoc/source/parser/cpp/cpp_tok.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_TOK_HXX
-#define ADC_CPP_TOK_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/token.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class TokenInterpreter;
-
-
-class Token : public TextToken
-{
- public:
- // LIFECYCLE
- virtual ~Token() {}
-
- // OPERATIONS
- virtual INT16 TypeId() const = 0;
- virtual void DealOut(
- ::TokenDealer & o_rDealer );
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const = 0;
-};
-
-
-} // namespace cpp
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_base.cxx b/autodoc/source/parser/cpp/cx_base.cxx
deleted file mode 100644
index 2493a700..00000000
--- a/autodoc/source/parser/cpp/cx_base.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cx_base.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <tokens/token.hxx>
-#include "c_dealer.hxx"
-
-
-
-namespace cpp {
-
-
-
-Cx_Base::Cx_Base( TkpContext * io_pFollowUpContext )
- : pDealer(0),
- pFollowUpContext(io_pFollowUpContext)
- // pNewToken
-{
-}
-
-bool
-Cx_Base::PassNewToken()
-{
- if (pNewToken)
- {
- pNewToken.Release()->DealOut(Dealer());
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_Base::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Cx_Base::AssignDealer( Distributor & o_rDealer )
-{
- pDealer = &o_rDealer;
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_base.hxx b/autodoc/source/parser/cpp/cx_base.hxx
deleted file mode 100644
index 0bdbb6e5..00000000
--- a/autodoc/source/parser/cpp/cx_base.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CX_BASE_HXX
-#define ADC_CPP_CX_BASE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class TextToken;
-
-
-namespace cpp
-{
-
-class Distributor;
-
-
-class Cx_Base : public ::TkpContext
-{
- public:
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
-
- virtual void AssignDealer(
- Distributor & o_rDealer );
- protected:
- // LIFECYCLE
- Cx_Base(
- TkpContext * io_pFollowUpContext );
-
- void SetNewToken(
- DYN ::TextToken * let_dpToken );
- void SetFollowUpContext(
- TkpContext * io_pContext );
-
- Distributor & Dealer() const;
-
- private:
- // DATA
- Distributor * pDealer;
- TkpContext * pFollowUpContext;
- Dyn< ::TextToken > pNewToken;
-};
-
-
-
-
-inline void
-Cx_Base::SetNewToken( DYN ::TextToken * let_dpToken )
- { pNewToken = let_dpToken; }
-inline void
-Cx_Base::SetFollowUpContext( TkpContext * io_pContext )
- { pFollowUpContext = io_pContext; }
-inline Distributor &
-Cx_Base::Dealer() const
- { csv_assert(pDealer != 0);
- return *pDealer; }
-
-
-
-
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_pp.cxx b/autodoc/source/parser/cpp/cx_c_pp.cxx
deleted file mode 100644
index 6e494e9f..00000000
--- a/autodoc/source/parser/cpp/cx_c_pp.cxx
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cx_c_pp.hxx"
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include "c_dealer.hxx"
-#include <tokens/parseinc.hxx>
-#include <x_parse.hxx>
-#include "all_toks.hxx"
-
-
-namespace cpp
-{
-
-Context_Preprocessor::Context_Preprocessor( TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext),
- pContext_Parent(&i_rFollowUpContext),
- pContext_PP_MacroParams( 0 ),
- pContext_PP_Definition( new Context_PP_Definition(i_rFollowUpContext) )
-{
- pContext_PP_MacroParams = new Context_PP_MacroParams(*pContext_PP_Definition);
-}
-
-void
-Context_Preprocessor::ReadCharChain( CharacterSource & io_rText )
-{
- jumpOverWhite( io_rText );
- jumpToWhite( io_rText );
- const char * sPP_Keyword = io_rText.CutToken();
- if ( strcmp(sPP_Keyword, "define") == 0 )
- ReadDefine(io_rText);
- else
- ReadDefault(io_rText);
-}
-
-void
-Context_Preprocessor::AssignDealer( Distributor & o_rDealer )
-{
- Cx_Base::AssignDealer(o_rDealer);
- pContext_PP_MacroParams->AssignDealer(o_rDealer);
- pContext_PP_Definition->AssignDealer(o_rDealer);
-}
-
-void
-Context_Preprocessor::ReadDefault( CharacterSource & io_rText )
-{
- int o_rCount_BackslashedLineBreaks = 0;
- jumpToEol(io_rText,o_rCount_BackslashedLineBreaks);
- for ( ; o_rCount_BackslashedLineBreaks > 0; --o_rCount_BackslashedLineBreaks )
- Dealer().Deal_Eol();
-
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- io_rText.CutToken();
- Dealer().Deal_Eol();
- SetNewToken(0);
- SetFollowUpContext( pContext_Parent );
-}
-
-void
-Context_Preprocessor::ReadDefine( CharacterSource & io_rText )
-{
- jumpOverWhite( io_rText );
- io_rText.CutToken();
-
- char cNext = '\0';
- for ( cNext = io_rText.CurChar();
- static_cast<UINT8>(cNext) > 32 AND cNext != '(';
- cNext = io_rText.MoveOn() )
- { }
-
- bool bMacro = cNext == '(';
-
- if ( NOT bMacro )
- {
- SetNewToken( new Tok_DefineName(io_rText.CutToken()) );
- SetFollowUpContext( pContext_PP_Definition.Ptr() );
- }
- else
- {
- SetNewToken( new Tok_MacroName(io_rText.CutToken()) );
- io_rText.MoveOn();
- io_rText.CutToken();
- SetFollowUpContext( pContext_PP_MacroParams.Ptr() );
- }
-}
-
-
-Context_PP_MacroParams::Context_PP_MacroParams( Cx_Base & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext),
- pContext_PP_Definition(&i_rFollowUpContext)
-{
-}
-
-void
-Context_PP_MacroParams::ReadCharChain( CharacterSource & io_rText )
-{
- uintt nLen;
-
- jumpOverWhite( io_rText );
- // KORR_FUTURE Handling line breaks within macro parameters:
- char cSeparator = jumpTo( io_rText, ',', ')' );
- csv_assert( cSeparator != 0 );
-
- static char cBuf[500];
- // KORR_FUTURE, make it still safer, here:
- strcpy( cBuf, io_rText.CutToken() ); // SAFE STRCPY (#100211# - checked)
- for ( nLen = strlen(cBuf);
- nLen > 0 AND cBuf[nLen-1] < 33;
- --nLen )
- { }
- cBuf[nLen] = '\0';
- SetNewToken( new Tok_MacroParameter(cBuf) );
-
- io_rText.MoveOn();
- io_rText.CutToken();
- if ( cSeparator == ',')
- SetFollowUpContext( this );
- else // Must be ')'
- SetFollowUpContext( pContext_PP_Definition );
-}
-
-Context_PP_Definition::Context_PP_Definition( TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext),
- pContext_Parent(&i_rFollowUpContext)
-{
-}
-
-void
-Context_PP_Definition::ReadCharChain( CharacterSource & io_rText )
-{
- int o_rCount_BackslashedLineBreaks = 0;
- jumpToEol(io_rText,o_rCount_BackslashedLineBreaks);
- for ( ; o_rCount_BackslashedLineBreaks > 0; --o_rCount_BackslashedLineBreaks )
- Dealer().Deal_Eol();
- SetNewToken( new Tok_PreProDefinition(io_rText.CutToken()) );
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- Dealer().Deal_Eol();
-}
-
-
-} // namespace cpp
-
-
-
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_pp.hxx b/autodoc/source/parser/cpp/cx_c_pp.hxx
deleted file mode 100644
index a2320fe6..00000000
--- a/autodoc/source/parser/cpp/cx_c_pp.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CX_C_PP_HXX
-#define ADC_CPP_CX_C_PP_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
-#include "cx_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp
-{
-
-class Context_Preprocessor : public Cx_Base
-{
- public:
- Context_Preprocessor(
- TkpContext & i_rFollowUpContext );
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual void AssignDealer(
- Distributor & o_rDealer );
- private:
- // Locals
- void ReadDefault(
- CharacterSource & io_rText );
- void ReadDefine(
- CharacterSource & io_rText );
-
- // DATA
- TkpContext * pContext_Parent;
- Dyn<Cx_Base> pContext_PP_MacroParams;
- Dyn<Cx_Base> pContext_PP_Definition;
-};
-
-class Context_PP_MacroParams : public Cx_Base
-{
- public:
- Context_PP_MacroParams(
- Cx_Base & i_rFollowUpContext );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- private:
- // DATA
- Cx_Base * pContext_PP_Definition;
-};
-
-class Context_PP_Definition : public Cx_Base
-{
- public:
- Context_PP_Definition(
- TkpContext & i_rFollowUpContext );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-
- private:
- // DATA
- TkpContext * pContext_Parent;
-};
-
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_std.cxx b/autodoc/source/parser/cpp/cx_c_std.cxx
deleted file mode 100644
index 74133628..00000000
--- a/autodoc/source/parser/cpp/cx_c_std.cxx
+++ /dev/null
@@ -1,531 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cx_c_std.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include "all_toks.hxx"
-#include "cx_c_pp.hxx"
-#include "cx_c_sub.hxx"
-#include <tools/tkpchars.hxx>
-#include <tokens/tkpstama.hxx>
-#include <x_parse.hxx>
-#include "c_dealer.hxx"
-
-
-namespace cpp {
-
-
-const intt C_nCppInitialNrOfStati = 600;
-const intt C_nStatusSize = 128;
-
-
-
-const uintt nF_fin_Error = 1;
-const uintt nF_fin_CreateWithoutText = 2;
-const uintt nF_fin_CreateWithText = 3;
-const uintt nF_fin_Ignore = 4;
-const uintt nF_fin_EOL = 5;
-const uintt nF_fin_EOF = 6;
-const uintt nF_fin_Bezeichner = 7;
-
-const uintt nF_goto_Preprocessor = 10;
-const uintt nF_goto_Comment = 11;
-const uintt nF_goto_Docu = 12;
-const uintt nF_goto_Const = 13;
-const uintt nF_goto_UnblockMacro = 14;
-
-// Token create functions for the state machine:
-DYN TextToken * TCF_Identifier(const char * text) { return new Tok_Identifier(text); }
-
-DYN TextToken * TCF_operator(const char *) { return new Tok_operator; }
-DYN TextToken * TCF_class(const char *) { return new Tok_class; }
-DYN TextToken * TCF_struct(const char *) { return new Tok_struct; }
-DYN TextToken * TCF_union(const char *) { return new Tok_union; }
-DYN TextToken * TCF_enum(const char *) { return new Tok_enum; }
-DYN TextToken * TCF_typedef(const char *) { return new Tok_typedef; }
-DYN TextToken * TCF_public(const char *) { return new Tok_public; }
-DYN TextToken * TCF_protected(const char *) { return new Tok_protected; }
-DYN TextToken * TCF_private(const char *) { return new Tok_private; }
-DYN TextToken * TCF_template(const char *) { return new Tok_template; }
-DYN TextToken * TCF_virtual(const char *) { return new Tok_virtual; }
-DYN TextToken * TCF_friend(const char *) { return new Tok_friend; }
-DYN TextToken * TCF_Tilde(const char *) { return new Tok_Tilde; }
-DYN TextToken * TCF_const(const char *) { return new Tok_const; }
-DYN TextToken * TCF_volatile(const char *) { return new Tok_volatile; }
-DYN TextToken * TCF_extern(const char *) { return new Tok_extern; }
-DYN TextToken * TCF_static(const char *) { return new Tok_static; }
-DYN TextToken * TCF_mutable(const char *) { return new Tok_mutable; }
-DYN TextToken * TCF_register(const char *) { return new Tok_register; }
-DYN TextToken * TCF_inline(const char *) { return new Tok_inline; }
-DYN TextToken * TCF_explicit(const char *) { return new Tok_explicit; }
-DYN TextToken * TCF_namespace(const char *) { return new Tok_namespace; }
-DYN TextToken * TCF_using(const char *) { return new Tok_using; }
-DYN TextToken * TCF_throw(const char *) { return new Tok_throw; }
-DYN TextToken * TCF_SwBracketOpen(const char *) { return new Tok_SwBracket_Left; }
-DYN TextToken * TCF_SwBracketClose(const char *) { return new Tok_SwBracket_Right; }
-DYN TextToken * TCF_ArBracketOpen(const char *) { return new Tok_ArrayBracket_Left; }
-DYN TextToken * TCF_ArBracketClose(const char *) { return new Tok_ArrayBracket_Right; }
-DYN TextToken * TCF_BracketOpen(const char *) { return new Tok_Bracket_Left; }
-DYN TextToken * TCF_BracketClose(const char *) { return new Tok_Bracket_Right; }
-DYN TextToken * TCF_DblColon(const char *) { return new Tok_DoubleColon; }
-DYN TextToken * TCF_Semikolon(const char *) { return new Tok_Semicolon; }
-DYN TextToken * TCF_Komma(const char *) { return new Tok_Comma; }
-DYN TextToken * TCF_Colon(const char *) { return new Tok_Colon; }
-DYN TextToken * TCF_Zuweisung(const char *) { return new Tok_Assign; }
-DYN TextToken * TCF_Smaller(const char *) { return new Tok_Less; }
-DYN TextToken * TCF_Bigger(const char *) { return new Tok_Greater; }
-DYN TextToken * TCF_Stern(const char *) { return new Tok_Asterix; }
-DYN TextToken * TCF_Ampersand(const char *) { return new Tok_AmpersAnd; }
-DYN TextToken * TCF_Ellipse(const char *) { return new Tok_Ellipse; }
-DYN TextToken * TCF_typename(const char *) { return new Tok_typename; }
-
- // Operators
-DYN TextToken * TCF_Operator(const char * text) { return new Tok_Operator(text); }
-
-DYN TextToken * TCF_BuiltInType(const char * text) { return new Tok_BuiltInType(text); }
-DYN TextToken * TCF_TypeModifier(const char * text) { return new Tok_TypeSpecializer(text); }
-
-DYN TextToken * TCF_Eof(const char *) { return new Tok_Eof; }
-
-
-
-Context_CppStd::Context_CppStd( DYN autodoc::TkpDocuContext & let_drContext_Docu )
- : Cx_Base(0),
- aStateMachine(C_nStatusSize,C_nCppInitialNrOfStati),
- pDocuContext(&let_drContext_Docu),
- pContext_Comment(0),
- pContext_Preprocessor(0),
- pContext_ConstString(0),
- pContext_ConstChar(0),
- pContext_ConstNumeric(0),
- pContext_UnblockMacro(0)
-{
- pDocuContext->SetParentContext(*this,"*/");
-
- pContext_Comment = new Context_Comment(*this);
- pContext_Preprocessor = new Context_Preprocessor(*this);
- pContext_ConstString = new Context_ConstString(*this);
- pContext_ConstChar = new Context_ConstChar(*this);
- pContext_ConstNumeric = new Context_ConstNumeric(*this);
- pContext_UnblockMacro = new Context_UnblockMacro(*this);
-
- SetupStateMachine();
-}
-
-Context_CppStd::~Context_CppStd()
-{
-}
-
-void
-Context_CppStd::ReadCharChain( CharacterSource & io_rText )
-{
- SetNewToken(0);
-
- TextToken::F_CRTOK fTokenCreateFunction = 0;
- StmBoundsStatus & rBound = aStateMachine.GetCharChain(fTokenCreateFunction, io_rText);
-
- // !!!
- // The order of the next two lines is essential, because
- // pFollowUpContext may be changed by PerformStatusFunction() also,
- // which then MUST override the previous assignment.
- SetFollowUpContext(rBound.FollowUpContext());
- PerformStatusFunction(rBound.StatusFunctionNr(), fTokenCreateFunction, io_rText);
-}
-
-void
-Context_CppStd::AssignDealer( Distributor & o_rDealer )
-{
- Cx_Base::AssignDealer(o_rDealer);
-
- pDocuContext->AssignDealer(o_rDealer);
- pContext_Comment->AssignDealer(o_rDealer);
- pContext_Preprocessor->AssignDealer(o_rDealer);
- pContext_ConstString->AssignDealer(o_rDealer);
- pContext_ConstChar->AssignDealer(o_rDealer);
- pContext_ConstNumeric->AssignDealer(o_rDealer);
- pContext_UnblockMacro->AssignDealer(o_rDealer);
-}
-
-void
-Context_CppStd::PerformStatusFunction( uintt i_nStatusSignal,
- F_CRTOK i_fTokenCreateFunction,
- CharacterSource & io_rText )
-{
- switch (i_nStatusSignal)
- {
- case nF_fin_CreateWithoutText:
- io_rText.CutToken();
- csv_assert(i_fTokenCreateFunction != 0);
- SetNewToken( (*i_fTokenCreateFunction)(0) );
- break;
- case nF_fin_CreateWithText:
- csv_assert(i_fTokenCreateFunction != 0);
- SetNewToken( (*i_fTokenCreateFunction)(io_rText.CutToken()) );
- break;
- case nF_fin_Ignore:
- io_rText.CutToken();
- SetNewToken(0);
- break;
- case nF_fin_EOL:
- io_rText.CutToken();
- SetNewToken(0);
- Dealer().Deal_Eol();
- break;
- case nF_fin_EOF:
- io_rText.CutToken();
- SetNewToken( TCF_Eof(0) );
- break;
- case nF_fin_Bezeichner:
- SetNewToken( TCF_Identifier(io_rText.CutToken()) );
- break;
-
- case nF_goto_Preprocessor:
- io_rText.CutToken();
- SetNewToken(0);
- break;
- case nF_goto_Comment:
- SetNewToken(0);
- pContext_Comment->SetMode_IsMultiLine( io_rText.CutToken()[1] == '*' );
- break;
- case nF_goto_Docu:
- SetNewToken(0);
- pDocuContext->SetMode_IsMultiLine( io_rText.CutToken()[1] == '*' );
- break;
- case nF_goto_Const:
- SetNewToken(0);
- break;
- case nF_goto_UnblockMacro:
- SetNewToken(0);
- break;
-
- case nF_fin_Error:
- default:
- {
- char cCC = io_rText.CurChar();
- String sCurChar( &cCC, 1 );
- throw X_Parser( X_Parser::x_InvalidChar, sCurChar, String::Null_(), 0 );
- }
- } // end switch (i_nStatusSignal)
-}
-
-void
-Context_CppStd::SetupStateMachine()
-{
- // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
-// const INT16 top = 0; // Top-Status
- const INT16 wht = 1; // Whitespace-überlese-Status
- const INT16 bez = 2; // Bezeichner-lese-Status
-
- // Tokenfinish-Stati:
- const INT16 finError = 3;
- const INT16 finIgnore = 4;
- const INT16 finBezeichner = 5;
- const INT16 finKeyword = 6;
- const INT16 finPunctuation = 7;
- const INT16 finBiType = 8;
- const INT16 finTypeModifier = 9;
- const INT16 finEOL = 10;
- const INT16 finEOF = 11;
-
- // Kontextwechsel-Stati:
- const INT16 gotoComment = 12;
- const INT16 gotoDocu = 13;
- const INT16 gotoPreprocessor = 14;
- const INT16 gotoConstString = 15;
- const INT16 gotoConstChar = 16;
- const INT16 gotoConstNumeric = 17;
- const INT16 gotoUnblockMacro = 18;
-
- // Abbreviations to be used in status tables:
- const INT16 err = finError;
- const INT16 fig = finIgnore;
- const INT16 fbz = finBezeichner;
- const INT16 fof = finEOF;
- const INT16 cst = gotoConstString;
- const INT16 cch = gotoConstChar;
- const INT16 cnr = gotoConstNumeric;
-
-
- /// Zeros - '0' - will be replaced by AddToken().
-
- const INT16 A_nTopStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // 16 ...
- wht, 0,cst, 0,err, 0, 0,cch, 0, 0, 0, 0, 0, 0, 0, 0,
- cnr,cnr,cnr,cnr,cnr,cnr,cnr,cnr,cnr,cnr, 0, 0, 0, 0, 0, 0, // 48 ...
- 0,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez, 0, 0, 0, 0,bez, // 80 ...
- 0,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez, 0, 0, 0, 0,err, // 80 ...
- };
-
- const INT16 A_nWhitespaceStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht,fig,wht,wht,fig,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // 16 ...
- wht,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig, // 48 ...
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig, // 80 ...
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,err
- };
-
- const INT16 A_nBezeichnerStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fbz,err,err,err,err,err,err,err,err,fbz,fbz,fbz,fbz,fbz,err,err,
- err,err,err,err,err,err,err,err,err,err,fbz,err,err,err,err,err, // 16 ...
- fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,fbz,fbz, // 48 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,bez, // 80 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,err
- };
-
-
- const INT16 A_nOperatorDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err
- };
-
- const INT16 A_nBezDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fbz,err,err,err,err,err,err,err,err,fbz,fbz,fbz,fbz,fbz,err,err,
- err,err,err,err,err,err,err,err,err,err,fbz,err,err,err,err,err, // 16 ...
- fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,fbz,fbz, // 48 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,bez, // 80 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,err
- };
-
- DYN StmArrayStatus * dpStatusTop
- = new StmArrayStatus( C_nStatusSize, A_nTopStatus, 0, true);
- DYN StmArrayStatus * dpStatusWhite
- = new StmArrayStatus( C_nStatusSize, A_nWhitespaceStatus, 0, true);
- DYN StmArrayStatus * dpStatusBez
- = new StmArrayStatus( C_nStatusSize, A_nBezeichnerStatus, TCF_Identifier, true);
-
- DYN StmBoundsStatus * dpBst_finError
- = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_Error, true );
- DYN StmBoundsStatus * dpBst_finIgnore
- = new StmBoundsStatus( *this, *this, nF_fin_Ignore, true );
- DYN StmBoundsStatus * dpBst_finBezeichner
- = new StmBoundsStatus( *this, *this, nF_fin_Bezeichner, true );
- DYN StmBoundsStatus * dpBst_finKeyword
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithoutText, false );
- DYN StmBoundsStatus * dpBst_finPunctuation
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithText, false );
- DYN StmBoundsStatus * dpBst_finBiType
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithText, false );
- DYN StmBoundsStatus * dpBst_finTypeModifier
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithText, false );
- DYN StmBoundsStatus * dpBst_finEOL
- = new StmBoundsStatus( *this, *this, nF_fin_EOL, false );
- DYN StmBoundsStatus * dpBst_finEOF
- = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_EOF, false );
-
- DYN StmBoundsStatus * dpBst_gotoComment
- = new StmBoundsStatus( *this, *pContext_Comment, nF_goto_Comment, false );
- DYN StmBoundsStatus * dpBst_gotoDocu
- = new StmBoundsStatus( *this, *pDocuContext, nF_goto_Docu, false );
- DYN StmBoundsStatus * dpBst_gotoPreprocessor
- = new StmBoundsStatus( *this, *pContext_Preprocessor, nF_goto_Preprocessor, false );
- DYN StmBoundsStatus * dpBst_gotoConstString
- = new StmBoundsStatus( *this, *pContext_ConstString, nF_goto_Const, false );
- DYN StmBoundsStatus * dpBst_gotoConstChar
- = new StmBoundsStatus( *this, *pContext_ConstChar, nF_goto_Const, false );
- DYN StmBoundsStatus * dpBst_gotoConstNumeric
- = new StmBoundsStatus( *this, *pContext_ConstNumeric, nF_goto_Const, false );
- DYN StmBoundsStatus * dpBst_gotoUnblockMacro
- = new StmBoundsStatus( *this, *pContext_UnblockMacro, nF_goto_UnblockMacro, false );
-
- // dpMain aufbauen:
- aStateMachine.AddStatus(dpStatusTop);
-
- aStateMachine.AddStatus(dpStatusWhite);
- aStateMachine.AddStatus(dpStatusBez);
-
- aStateMachine.AddStatus(dpBst_finError);
- aStateMachine.AddStatus(dpBst_finIgnore);
- aStateMachine.AddStatus(dpBst_finBezeichner);
- aStateMachine.AddStatus(dpBst_finKeyword);
- aStateMachine.AddStatus(dpBst_finPunctuation);
- aStateMachine.AddStatus(dpBst_finBiType);
- aStateMachine.AddStatus(dpBst_finTypeModifier);
- aStateMachine.AddStatus(dpBst_finEOL);
- aStateMachine.AddStatus(dpBst_finEOF);
-
- aStateMachine.AddStatus(dpBst_gotoComment);
- aStateMachine.AddStatus(dpBst_gotoDocu);
- aStateMachine.AddStatus(dpBst_gotoPreprocessor);
- aStateMachine.AddStatus(dpBst_gotoConstString);
- aStateMachine.AddStatus(dpBst_gotoConstChar);
- aStateMachine.AddStatus(dpBst_gotoConstNumeric);
- aStateMachine.AddStatus(dpBst_gotoUnblockMacro);
-
- // Identifier
-
- // Keywords and other unique Tokens
- aStateMachine.AddToken("operator",TCF_operator,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("class",TCF_class,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("struct",TCF_struct,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("union",TCF_union,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("enum",TCF_enum,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("typedef",TCF_typedef,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("public",TCF_public,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("protected",TCF_protected,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("private",TCF_private,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("template",TCF_template,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("virtual",TCF_virtual,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("friend",TCF_friend,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("~",TCF_Tilde,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("const",TCF_const,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("volatile",TCF_volatile,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("extern",TCF_extern,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("static",TCF_static,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("mutable",TCF_mutable,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("register",TCF_register,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("inline",TCF_inline,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("explicit",TCF_explicit,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("namespace",TCF_namespace,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("using",TCF_using,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("throw",TCF_throw,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("{",TCF_SwBracketOpen,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("}",TCF_SwBracketClose,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("[",TCF_ArBracketOpen,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("]",TCF_ArBracketClose,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("(",TCF_BracketOpen,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(")",TCF_BracketClose,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("::",TCF_DblColon,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(";",TCF_Semikolon,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(",",TCF_Komma,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(":",TCF_Colon,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("=",TCF_Zuweisung,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("<",TCF_Smaller,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(">",TCF_Bigger,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("*",TCF_Stern,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("&",TCF_Ampersand,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("...",TCF_Ellipse,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("typename",TCF_typename,A_nOperatorDefStatus,finKeyword);
-
- // Operators
- aStateMachine.AddToken("==",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("!=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("<=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(">=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("&&",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("||",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("!",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("new",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("delete",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("sizeof",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("typeid",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("+",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("-",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("/",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("%",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("^",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("|",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("<<",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(">>",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(".",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("->",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("?",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("+=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("-=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("*=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("/=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("%=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("&=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("|=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("^=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("<<=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(">>=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
-
- // Builtin types
- aStateMachine.AddToken("char", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("short", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("int", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("long", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("float", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("double",TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("wchar_t",TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("size_t",TCF_BuiltInType, A_nBezDefStatus, finBiType);
-
- // Type modifiers
- aStateMachine.AddToken("signed", TCF_TypeModifier, A_nBezDefStatus, finTypeModifier);
- aStateMachine.AddToken("unsigned", TCF_TypeModifier, A_nBezDefStatus, finTypeModifier);
-
- // To ignore
- aStateMachine.AddToken("auto", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("_cdecl", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("__cdecl", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("__stdcall", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("__fastcall",0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("/**/", 0, A_nOperatorDefStatus,finIgnore);
-
- // Context changers
- aStateMachine.AddToken("#", 0, A_nOperatorDefStatus, gotoPreprocessor);
- aStateMachine.AddToken("#undef",0, A_nOperatorDefStatus, gotoPreprocessor);
- aStateMachine.AddToken("#unblock-",
- 0, A_nOperatorDefStatus, gotoUnblockMacro);
- aStateMachine.AddToken("/*", 0, A_nOperatorDefStatus, gotoComment);
- aStateMachine.AddToken("//", 0, A_nOperatorDefStatus, gotoComment);
- aStateMachine.AddToken("/**", 0, A_nOperatorDefStatus, gotoDocu);
- aStateMachine.AddToken("///", 0, A_nOperatorDefStatus, gotoDocu);
-
- // Line ends
- // regular
- aStateMachine.AddToken("\r\n", 0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\n", 0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\r", 0, A_nOperatorDefStatus, finEOL);
- // To ignore in some cases(may be only at preprocessor?), but
- // linecount has to be incremented.
- aStateMachine.AddToken("\\\r\n",0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\\\n", 0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\\\r", 0, A_nOperatorDefStatus, finEOL);
-};
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_std.hxx b/autodoc/source/parser/cpp/cx_c_std.hxx
deleted file mode 100644
index fadbde3c..00000000
--- a/autodoc/source/parser/cpp/cx_c_std.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CX_C_STD_HXX
-#define ADC_CPP_CX_C_STD_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
-#include "cx_base.hxx"
- // COMPONENTS
-#include <tokens/tkpstama.hxx>
- // PARAMETERS
-
-
-
-namespace cpp {
-
-class Context_Comment;
-
-/**
-*/
-class Context_CppStd : public Cx_Base,
- private StateMachineContext
-{
- public:
- // LIFECYCLE
- Context_CppStd(
- DYN autodoc::TkpDocuContext &
- let_drContext_Docu );
- ~Context_CppStd();
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual void AssignDealer(
- Distributor & o_rDealer );
- private:
- // SERVICE FUNCTIONS
- void PerformStatusFunction(
- uintt i_nStatusSignal,
- StmArrayStatus::F_CRTOK
- i_fTokenCreateFunction,
- CharacterSource & io_rText );
- void SetupStateMachine();
-
- // DATA
- StateMachine aStateMachine;
-
- // Contexts
- Dyn<autodoc::TkpDocuContext>
- pDocuContext;
-
- Dyn<Context_Comment>
- pContext_Comment;
- Dyn<Cx_Base> pContext_Preprocessor;
- Dyn<Cx_Base> pContext_ConstString;
- Dyn<Cx_Base> pContext_ConstChar;
- Dyn<Cx_Base> pContext_ConstNumeric;
- Dyn<Cx_Base> pContext_UnblockMacro;
-};
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_sub.cxx b/autodoc/source/parser/cpp/cx_c_sub.cxx
deleted file mode 100644
index 9031342e..00000000
--- a/autodoc/source/parser/cpp/cx_c_sub.cxx
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cx_c_sub.hxx"
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ctype.h>
-#include "c_dealer.hxx"
-#include <tokens/parseinc.hxx>
-#include <x_parse.hxx>
-#include "all_toks.hxx"
-
-
-namespace cpp {
-
-
-
-void
-Context_Comment::ReadCharChain( CharacterSource & io_rText )
-{
- // KORR_FUTURE
- // Counting of lines must be implemented.
- if (bCurrentModeIsMultiline)
- {
- char cNext = NULCH;
-
- do {
- do {
- cNext = jumpTo( io_rText,'*',char(10) );
- if (cNext == NULCH)
- throw X_Parser( X_Parser::x_UnexpectedEOF, "", String::Null_(), 0 );
- else if ( cNext == char(10) )
- {
- jumpOverEol(io_rText);
- Dealer().Deal_Eol();
- }
- } while ( cNext != '*');
- cNext = jumpOver(io_rText,'*');
- if (cNext == NULCH)
- throw X_Parser( X_Parser::x_UnexpectedEOF, "", String::Null_(), 0 );
- } while (cNext != '/');
- io_rText.MoveOn();
- io_rText.CutToken();
- SetNewToken(0);
- }
- else //
- {
- int o_rCount_BackslashedLineBreaks = 0;
- jumpToEol(io_rText,o_rCount_BackslashedLineBreaks);
- for ( ; o_rCount_BackslashedLineBreaks > 0; --o_rCount_BackslashedLineBreaks )
- Dealer().Deal_Eol();
-
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- io_rText.CutToken();
- Dealer().Deal_Eol();
- SetNewToken(0);
- } // endif
-}
-
-
-void
-Context_ConstString::ReadCharChain( CharacterSource & io_rText )
-{
- char cNext = io_rText.MoveOn();
-
- while (cNext != '"')
- { // Get one complete string constant: "...."
- while (cNext != '"' AND cNext != '\\')
- { // Get string till next '\\'
- cNext = io_rText.MoveOn();
- }
- if (cNext == '\\')
- {
- io_rText.MoveOn();
- cNext = io_rText.MoveOn();
- }
- }
- io_rText.MoveOn();
- SetNewToken(new Tok_Constant(io_rText.CutToken()));
-}
-
-void
-Context_ConstChar::ReadCharChain( CharacterSource & io_rText )
-{
- char cNext = io_rText.MoveOn();
-
- while (cNext != '\'')
- { // Get one complete char constant: "...."
- while (cNext != '\'' AND cNext != '\\')
- { // Get string till next '\\'
- cNext = io_rText.MoveOn();
- }
- if (cNext == '\\')
- {
- io_rText.MoveOn();
- cNext = io_rText.MoveOn();
- }
- }
- io_rText.MoveOn();
- SetNewToken(new Tok_Constant(io_rText.CutToken()));
-}
-
-void
-Context_ConstNumeric::ReadCharChain(CharacterSource & io_rText)
-{
- char cNext = 0;
-
- do {
- do {
- cNext = static_cast<char>( tolower(io_rText.MoveOn()) );
- } while ( (cNext != 'e' AND isalnum(cNext)) OR cNext == '.');
- if (cNext == 'e')
- {
- cNext = io_rText.MoveOn();
- if (cNext == '+' OR cNext == '-')
- cNext = io_rText.MoveOn();
- } // endif
- } while (isalnum(cNext) OR cNext == '.'); // Reicht aus, wenn Zahlen korrekt geschrieben sind
- SetNewToken(new Tok_Constant(io_rText.CutToken()));
-}
-
-void
-Context_UnblockMacro::ReadCharChain(CharacterSource & io_rText)
-{
- jumpToWhite(io_rText);
- SetNewToken(new Tok_UnblockMacro( io_rText.CutToken() + strlen("#unblock-") ));
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_sub.hxx b/autodoc/source/parser/cpp/cx_c_sub.hxx
deleted file mode 100644
index 8f7c12f6..00000000
--- a/autodoc/source/parser/cpp/cx_c_sub.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CX_C_SUB_HXX
-#define ADC_CPP_CX_C_SUB_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
-#include "cx_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class Context_Comment : public Cx_Base
-{
- public:
- Context_Comment(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetMode_IsMultiLine(
- bool i_bTrue )
- { bCurrentModeIsMultiline = i_bTrue; }
- private:
- bool bCurrentModeIsMultiline;
-};
-
-class Context_ConstString : public Cx_Base
-{
- public:
- Context_ConstString(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_ConstChar : public Cx_Base
-{
- public:
- Context_ConstChar(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_ConstNumeric : public Cx_Base
-{
- public:
- Context_ConstNumeric(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_UnblockMacro : public Cx_Base
-{
- public:
- Context_UnblockMacro(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cxt2ary.cxx b/autodoc/source/parser/cpp/cxt2ary.cxx
deleted file mode 100644
index 8a1deaef..00000000
--- a/autodoc/source/parser/cpp/cxt2ary.cxx
+++ /dev/null
@@ -1,360 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "cxt2ary.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/entity.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <ary/info/docstore.hxx>
-#include "icprivow.hxx"
-
-// Implementationheaders, only to be used in this file!
-#include "sfscope.hxx"
-#include "sownstck.hxx"
-#include "sdocdist.hxx"
-#include "srecover.hxx"
-
-
-
-
-
-namespace cpp
-{
-
-using ary::cpp::E_Protection;
-
-ContextForAry::ContextForAry( ary::cpp::Gate & io_rAryGate )
- : pGate(&io_rAryGate),
- aTokenResult(),
- pFileScopeInfo( new S_FileScopeInfo ),
- pOwnerStack( new S_OwnerStack ),
- pDocuDistributor( new S_DocuDistributor ),
- pRecoveryGuard( new S_RecoveryGuard )
-{
- OpenNamespace( pGate->Ces().GlobalNamespace() );
-}
-
-ContextForAry::~ContextForAry()
-{
-}
-
-ary::loc::File &
-ContextForAry::inq_CurFile() const
-{
- csv_assert(pFileScopeInfo->pCurFile != 0);
-
- return *pFileScopeInfo->pCurFile;
-}
-
-ary::cpp::Namespace &
-ContextForAry::inq_CurNamespace() const
-{
- return pOwnerStack->CurNamespace();
-}
-
-ary::cpp::Class *
-ContextForAry::inq_CurClass() const
-{
- return pOwnerStack->CurClass();
-}
-
-ary::cpp::Enum *
-ContextForAry::inq_CurEnum() const
-{
- return pOwnerStack->CurEnum();
-}
-
-
-ary::cpp::InputContext::Owner &
-ContextForAry::inq_CurOwner() const
-{
- return pOwnerStack->CurOwner();
-}
-
-E_Protection
-ContextForAry::inq_CurProtection() const
-{
- return pOwnerStack->CurProtection();
-}
-
-void
-ContextForAry::do_SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push )
-{
- aTokenResult.eDone = i_eDone;
- aTokenResult.eStackAction = i_eWhat2DoWithEnvStack;
- aTokenResult.pEnv2Push = i_pParseEnv2Push;
-}
-
-void
-ContextForAry::do_OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
-{
- pOwnerStack->OpenNamespace( io_rOpenedNamespace );
-}
-
-void
-ContextForAry::do_OpenExternC( bool )
-{
- pOwnerStack->OpenExternC();
- // KORR_FUTURE
- // use i_bOnlyForOneDeclaration
-}
-
-void
-ContextForAry::do_OpenClass( ary::cpp::Class & io_rOpenedClass )
-{
- pOwnerStack->OpenClass(io_rOpenedClass);
- pDocuDistributor->SetCurrentlyStoredRe(io_rOpenedClass);
-}
-
-void
-ContextForAry::do_OpenEnum( ary::cpp::Enum & io_rOpenedEnum )
-{
- pOwnerStack->OpenEnum(io_rOpenedEnum);
- pDocuDistributor->SetCurrentlyStoredRe(io_rOpenedEnum);
-}
-
-void
-ContextForAry::do_CloseBlock()
-{
- pOwnerStack->CloseBlock();
-}
-
-void
-ContextForAry::do_CloseClass()
-{
- pOwnerStack->CloseClass();
-}
-
-void
-ContextForAry::do_CloseEnum()
-{
- pOwnerStack->CloseEnum();
-}
-
-void
-ContextForAry::do_SetCurProtection( ary::cpp::E_Protection i_eProtection )
-{
- pOwnerStack->SetCurProtection(i_eProtection);
-}
-
-void
-ContextForAry::do_OpenTemplate( const StringVector & i_rParameters )
-{
- pFileScopeInfo->pCurTemplateParameters = new StringVector(i_rParameters);
-}
-
-DYN StringVector *
-ContextForAry::do_Get_CurTemplateParameters()
-{
- return pFileScopeInfo->pCurTemplateParameters.Release();
-}
-
-void
-ContextForAry::do_Close_OpenTemplate()
-{
- if (pFileScopeInfo->pCurTemplateParameters)
- delete pFileScopeInfo->pCurTemplateParameters.Release();
-}
-
-void
-ContextForAry::do_Event_Class_FinishedBase( const String & )
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_Store_Typedef( ary::cpp::Typedef & io_rTypedef )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rTypedef);
-}
-
-void
-ContextForAry::do_Event_Store_EnumValue( ary::cpp::EnumValue & io_rEnumValue )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rEnumValue);
-}
-
-void
-ContextForAry::do_Event_Store_CppDefinition( ary::cpp::DefineEntity & io_rDefinition )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rDefinition);
-}
-
-void
-ContextForAry::do_Event_EnterFunction_ParameterList()
-{
- // KORR_FUTURE
- // Inform pDocuDistributor about possibility of parameters' inline documentation.
-}
-
-void
-ContextForAry::do_Event_Function_FinishedParameter( const String & )
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_LeaveFunction_ParameterList()
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_EnterFunction_Implementation()
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_LeaveFunction_Implementation()
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_Store_Function( ary::cpp::Function & io_rFunction )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rFunction);
-}
-
-
-void
-ContextForAry::do_Event_Store_Variable( ary::cpp::Variable & io_rVariable )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rVariable);
-}
-
-void
-ContextForAry::do_TakeDocu( DYN ary::doc::OldCppDocu & let_drInfo )
-{
- let_drInfo.Store2(*pDocuDistributor);
-}
-
-void
-ContextForAry::do_StartWaitingFor_Recovery()
-{
- pRecoveryGuard->StartWaitingFor_Recovery();
-}
-
-ary::cpp::Gate &
-ContextForAry::inq_AryGate() const
-{
- return * const_cast< ary::cpp::Gate* >(pGate);
-}
-
-const ary::cpp::InputContext &
-ContextForAry::inq_Context() const
-{
- return *this;
-}
-
-String
-ContextForAry::inq_CurFileName() const
-{
- return pFileScopeInfo->pCurFile != 0
- ? pFileScopeInfo->pCurFile->LocalName()
- : String::Null_();
-}
-
-uintt
-ContextForAry::inq_LineCount() const
-{
- return pFileScopeInfo->nLineCount;
-}
-
-bool
-ContextForAry::inq_IsWaitingFor_Recovery() const
-{
- return pRecoveryGuard->IsWithinRecovery();
-}
-
-bool
-ContextForAry::inq_IsExternC() const
-{
- return pOwnerStack->IsExternC();
-}
-
-void
-ContextForAry::do_SetCurFile( ary::loc::File & io_rCurFile )
-{
- pFileScopeInfo->pCurFile = &io_rCurFile;
- pFileScopeInfo->nLineCount = 0;
- pFileScopeInfo->pCurTemplateParameters = 0;
-
- pOwnerStack->Reset();
- pDocuDistributor->Reset();
- pRecoveryGuard->Reset();
-}
-
-void
-ContextForAry::do_Event_IncrLineCount()
-{
- ++pFileScopeInfo->nLineCount;
- pDocuDistributor->Event_LineBreak();
-}
-
-void
-ContextForAry::do_Event_SwBracketOpen()
-{
- pRecoveryGuard->Hdl_SwBracketOpen();
-}
-
-void
-ContextForAry::do_Event_SwBracketClose()
-{
- pRecoveryGuard->Hdl_SwBracketClose();
-}
-
-void
-ContextForAry::do_Event_Semicolon()
-{
- pRecoveryGuard->Hdl_Semicolon();
-}
-
-
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cxt2ary.hxx b/autodoc/source/parser/cpp/cxt2ary.hxx
deleted file mode 100644
index 1e3b1428..00000000
--- a/autodoc/source/parser/cpp/cxt2ary.hxx
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CTX2ARY_HXX
-#define ADC_CPP_CTX2ARY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/inpcontx.hxx>
-#include <doc_deal.hxx>
-#include "pev.hxx"
-#include "fevnthdl.hxx"
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-namespace loc
-{
- class File;
-}
-}
-
-
-
-namespace cpp
-{
-
-
-/** @descr
- This class provides information about the context of an
- CodeEntity, which is going to be stored in the repository.
- The information is used mainly by class ary::cpp::Gate.
-
- Also it provides information for the parser about actual
- state of several public variables.
-
- @todo
- Include events, which allow correct storing of inline
- documentation after enum values, parameters,
- base classes.
-*/
-class ContextForAry : public ary::cpp::InputContext,
- public cpp::PeEnvironment,
- public cpp::FileScope_EventHandler,
- public DocuDealer
-{
- public:
- // LIFECYCLE
- ContextForAry(
- ary::cpp::Gate & io_rAryGate );
- virtual ~ContextForAry();
-
- // OPERATIONS
- void ResetResult() { aTokenResult.Reset(); }
-
- // INQUIRY
- const TokenProcessing_Result &
- CurResult() const { return aTokenResult; }
- // ACCESS
- TokenProcessing_Result &
- CurResult() { return aTokenResult; }
-
- private:
- // Interface ary::cpp::InputContext:
- virtual ary::loc::File &
- inq_CurFile() const;
- virtual ary::cpp::Namespace &
- inq_CurNamespace() const;
- virtual ary::cpp::Class *
- inq_CurClass() const;
- virtual ary::cpp::Enum *
- inq_CurEnum() const;
-
- virtual Owner & inq_CurOwner() const;
- virtual ary::cpp::E_Protection
- inq_CurProtection() const;
-
- // Interface PeEnvironment
- virtual void do_SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push );
- virtual void do_OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace );
- virtual void do_OpenExternC(
- bool i_bOnlyForOneDeclaration );
- virtual void do_OpenClass(
- ary::cpp::Class & io_rOpenedClass );
- virtual void do_OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum );
- virtual void do_CloseBlock();
- virtual void do_CloseClass();
- virtual void do_CloseEnum();
- virtual void do_SetCurProtection(
- ary::cpp::E_Protection
- i_eProtection );
- virtual void do_OpenTemplate(
- const StringVector &
- i_rParameters );
- virtual DYN StringVector *
- do_Get_CurTemplateParameters();
- virtual void do_Close_OpenTemplate();
- virtual void do_Event_Class_FinishedBase(
- const String & i_sBaseName );
-
- virtual void do_Event_Store_Typedef(
- ary::cpp::Typedef & io_rTypedef );
- virtual void do_Event_Store_EnumValue(
- ary::cpp::EnumValue &
- io_rEnumValue );
- virtual void do_Event_Store_CppDefinition(
- ary::cpp::DefineEntity &
- io_rDefinition );
- virtual void do_Event_EnterFunction_ParameterList();
- virtual void do_Event_Function_FinishedParameter(
- const String & i_sParameterName );
- virtual void do_Event_LeaveFunction_ParameterList();
- virtual void do_Event_EnterFunction_Implementation();
- virtual void do_Event_LeaveFunction_Implementation();
- virtual void do_Event_Store_Function(
- ary::cpp::Function &
- io_rFunction );
- virtual void do_Event_Store_Variable(
- ary::cpp::Variable &
- io_rVariable );
- virtual void do_TakeDocu(
- DYN ary::doc::OldCppDocu &
- let_drInfo );
- virtual void do_StartWaitingFor_Recovery();
- virtual ary::cpp::Gate &
- inq_AryGate() const;
- virtual const ary::cpp::InputContext &
- inq_Context() const;
- virtual String inq_CurFileName() const;
- virtual uintt inq_LineCount() const;
- virtual bool inq_IsWaitingFor_Recovery() const;
- virtual bool inq_IsExternC() const;
-
- // Interface FileScope_EventHandler
- virtual void do_SetCurFile(
- ary::loc::File & io_rCurFile );
- virtual void do_Event_IncrLineCount();
- virtual void do_Event_SwBracketOpen();
- virtual void do_Event_SwBracketClose();
- virtual void do_Event_Semicolon();
-
- // Local types
- struct S_FileScopeInfo;
- struct S_OwnerStack;
- struct S_DocuDistributor;
- struct S_RecoveryGuard;
-
- // DATA
- ary::cpp::Gate * pGate;
- TokenProcessing_Result
- aTokenResult;
- Dyn<S_FileScopeInfo>
- pFileScopeInfo;
- Dyn<S_OwnerStack> pOwnerStack;
- Dyn<S_DocuDistributor>
- pDocuDistributor;
- Dyn<S_RecoveryGuard>
- pRecoveryGuard;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/defdescr.cxx b/autodoc/source/parser/cpp/defdescr.cxx
deleted file mode 100644
index e4751427..00000000
--- a/autodoc/source/parser/cpp/defdescr.cxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "defdescr.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <prprpr.hxx>
-
-
-
-
-namespace cpp
-{
-
-
-
-
-DefineDescription::DefineDescription( const String & i_sName,
- const str_vector & i_rDefinition )
- : sName(i_sName),
- // aParams,
- aDefinition(i_rDefinition),
- eDefineType(type_define)
-{
-}
-
-DefineDescription::DefineDescription( const String & i_sName,
- const str_vector & i_rParams,
- const str_vector & i_rDefinition )
- : sName(i_sName),
- aParams(i_rParams),
- aDefinition(i_rDefinition),
- eDefineType(type_macro)
-{
-}
-
-DefineDescription::~DefineDescription()
-{
-}
-
-void
-DefineDescription::GetDefineText( csv::StreamStr & o_rText ) const
-{
- if ( aDefinition.begin() == aDefinition.end() OR eDefineType != type_define )
- return;
-
-
- bool bSwitch_Stringify = false;
- bool bSwitch_Concatenate = false;
-
- for ( str_vector::const_iterator it = aDefinition.begin();
- it != aDefinition.end();
- ++it )
- {
- if ( HandleOperatorsBeforeTextItem( o_rText,
- bSwitch_Stringify,
- bSwitch_Concatenate,
- *it ) )
- {
- continue;
- }
-
- o_rText << (*it);
-
- Do_bStringify_end(o_rText, bSwitch_Stringify);
- o_rText << " ";
- }
- o_rText.seekp(-1, csv::cur);
-}
-
-void
-DefineDescription::GetMacroText( csv::StreamStr & o_rText,
- const StringVector & i_rGivenArguments ) const
-{
- bool bSwitch_Stringify = false;
- bool bSwitch_Concatenate = false;
- intt nActiveParamNr = -1;
-
- if ( aDefinition.begin() == aDefinition.end() OR eDefineType != type_macro )
- return;
-
- for ( str_vector::const_iterator it = aDefinition.begin();
- it != aDefinition.end();
- ++it )
- {
- if ( HandleOperatorsBeforeTextItem( o_rText,
- bSwitch_Stringify,
- bSwitch_Concatenate,
- *it ) )
- {
- continue;
- }
-
- for ( str_vector::const_iterator param_it = aParams.begin();
- param_it != aParams.end() AND nActiveParamNr == -1;
- ++param_it )
- {
- if ( strcmp(*it, *param_it) == 0 )
- nActiveParamNr = param_it - aParams.begin();
- }
- if ( nActiveParamNr == -1 )
- {
- o_rText << (*it);
- }
- else
- {
- o_rText << i_rGivenArguments[nActiveParamNr];
- nActiveParamNr = -1;
- }
-
- Do_bStringify_end(o_rText, bSwitch_Stringify);
- o_rText << " ";
- }
- o_rText.seekp(-1, csv::cur);
-}
-
-
-
-} // end namespace cpp
-
-
-
-
-
-bool
-CheckForOperator( bool & o_bStringify,
- bool & o_bConcatenate,
- const String & i_sTextItem )
-{
- if ( strcmp(i_sTextItem, "##") == 0 )
- {
- o_bConcatenate = true;
- return true;
- }
- else if ( strcmp(i_sTextItem, "#") == 0 )
- {
- o_bStringify = true;
- return true;
- }
- return false;
-}
-
-void
-Do_bConcatenate( csv::StreamStr & o_rText,
- bool & io_bConcatenate )
-{
- if ( io_bConcatenate )
- {
- uintt nPos;
- for ( nPos = o_rText.tellp() - 1;
- nPos > 0 ? o_rText.c_str()[nPos] == ' ' : false;
- --nPos ) ;
- o_rText.seekp(nPos+1);
- io_bConcatenate = false;
- }
-}
-
-void
-Do_bStringify_begin( csv::StreamStr & o_rText,
- bool i_bStringify )
-{
- if ( i_bStringify )
- {
- o_rText << "\"";
- }
-}
-
-void
-Do_bStringify_end( csv::StreamStr & o_rText,
- bool & io_bStringify )
-{
- if ( io_bStringify )
- {
- o_rText << "\"";
- io_bStringify = false;
- }
-}
-
-
-bool
-HandleOperatorsBeforeTextItem( csv::StreamStr & o_rText,
- bool & io_bStringify,
- bool & io_bConcatenate,
- const String & i_sTextItem )
-{
- if ( CheckForOperator( io_bStringify,
- io_bConcatenate,
- i_sTextItem) )
- {
- return true;
- }
- Do_bConcatenate(o_rText, io_bConcatenate);
- Do_bStringify_begin(o_rText, io_bStringify);
-
- return false;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/defdescr.hxx b/autodoc/source/parser/cpp/defdescr.hxx
deleted file mode 100644
index feb78a7c..00000000
--- a/autodoc/source/parser/cpp/defdescr.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_DEFDESCR_HXX
-#define ADC_CPP_DEFDESCR_HXX
-
-
-
-
-namespace cpp
-{
-
-/** Describes a C/C++ #define statement. May be a define or a macro, for which
- two cases the two different constructors are to be used.
-
- This class is used by cpp::PreProcessor.
-*/
-class DefineDescription
-{
- public:
- enum E_DefineType
- {
- type_define,
- type_macro
- };
- typedef StringVector str_vector;
-
- DefineDescription( /// Used for: #define DEFINE xyz
- const String & i_sName,
- const str_vector & i_rDefinition );
- DefineDescription( /// Used for: #define MACRO(...) abc
- const String & i_sName,
- const str_vector & i_rParams,
- const str_vector & i_rDefinition );
- ~DefineDescription();
-
- /// Only vaild if (eDefineType == type_define) else returns "".
- void GetDefineText(
- csv::StreamStr & o_rText ) const;
-
- /// Only vaild if (eDefineType == type_macro) else returns "".
- void GetMacroText(
- csv::StreamStr & o_rText,
- const StringVector &
- i_rGivenArguments ) const;
-
- uintt ParamCount() const;
- E_DefineType DefineType() const;
-
- private:
- // DATA
- String sName;
- str_vector aParams;
- str_vector aDefinition;
- E_DefineType eDefineType;
-};
-
-
-
-
-// IMPLEMENTATION
-inline uintt
-DefineDescription::ParamCount() const
- { return aParams.size(); }
-inline DefineDescription::E_DefineType
-DefineDescription::DefineType() const
- { return eDefineType; }
-
-
-
-
-} // end namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/fevnthdl.hxx b/autodoc/source/parser/cpp/fevnthdl.hxx
deleted file mode 100644
index 1068448e..00000000
--- a/autodoc/source/parser/cpp/fevnthdl.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_FEVNTHDL_HXX
-#define ADC_CPP_FEVNTHDL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace loc
-{
- class File;
-}
-}
-
-
-
-
-namespace cpp
-{
-
-
-/** This is an interface, which accepts the file scope events that may
- be important for parsing. It is implementation-dependant, where to
- put or what to do with them.
-*/
-class FileScope_EventHandler
-{
- public:
- // LIFECYCLE
- virtual ~FileScope_EventHandler() {}
-
- // OPERATIONS
- void SetCurFile(
- ary::loc::File & io_rCurFile );
- void Event_IncrLineCount();
- void Event_SwBracketOpen();
- void Event_SwBracketClose();
- void Event_Semicolon();
-
- private:
- virtual void do_SetCurFile(
- ary::loc::File & io_rCurFile ) = 0;
- virtual void do_Event_IncrLineCount() = 0;
- virtual void do_Event_SwBracketOpen() = 0;
- virtual void do_Event_SwBracketClose() = 0;
- virtual void do_Event_Semicolon() = 0;
-};
-
-
-// IMPLEMENTATION
-
-inline void
-FileScope_EventHandler::SetCurFile( ary::loc::File & io_rCurFile )
- { do_SetCurFile(io_rCurFile); }
-inline void
-FileScope_EventHandler::Event_IncrLineCount()
- { do_Event_IncrLineCount(); }
-inline void
-FileScope_EventHandler::Event_SwBracketOpen()
- { do_Event_SwBracketOpen(); }
-inline void
-FileScope_EventHandler::Event_SwBracketClose()
- { do_Event_SwBracketClose(); }
-inline void
-FileScope_EventHandler::Event_Semicolon()
- { do_Event_Semicolon(); }
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/icprivow.cxx b/autodoc/source/parser/cpp/icprivow.cxx
deleted file mode 100644
index 526236f5..00000000
--- a/autodoc/source/parser/cpp/icprivow.cxx
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <icprivow.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-
-
-
-namespace cpp
-{
-
-
-
-//****************** Owner_Namespace ********************//
-Owner_Namespace::Owner_Namespace()
- : pScope(0)
-{
-}
-
-void
-Owner_Namespace::SetAnotherNamespace( ary::cpp::Namespace & io_rScope )
-{
- pScope = &io_rScope;
-}
-
-bool
-Owner_Namespace::HasClass( const String & i_sLocalName )
-{
- return pScope->Search_LocalClass(i_sLocalName).IsValid();
-}
-
-void
-Owner_Namespace::do_Add_Class( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalClass(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Enum( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalEnum(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Typedef( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalTypedef(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Operation( const String & i_sLocalName,
- Cid i_nId,
- bool )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalOperation(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Variable( const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool )
-{
- csv_assert(pScope != 0);
- if (i_bIsConst)
- pScope->Add_LocalConstant(i_sLocalName, i_nId);
- else
- pScope->Add_LocalVariable(i_sLocalName, i_nId);
-}
-
-
-Cid
-Owner_Namespace::inq_CeId() const
-{
- csv_assert(pScope != 0);
- return pScope->CeId();
-}
-
-
-//****************** Owner_Class ********************//
-
-Owner_Class::Owner_Class()
- : pScope(0)
-{
-}
-
-void
-Owner_Class::SetAnotherClass( ary::cpp::Class & io_rScope )
-{
- pScope = &io_rScope;
-}
-
-bool
-Owner_Class::HasClass( const String & )
-{
- return false;
-}
-
-void
-Owner_Class::do_Add_Class( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalClass(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Enum( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalEnum(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Typedef( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalTypedef(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Operation( const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStatic )
-{
- csv_assert(pScope != 0);
- if (i_bIsStatic)
- pScope->Add_LocalStaticOperation(i_sLocalName, i_nId);
- else
- pScope->Add_LocalOperation(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Variable( const String & i_sLocalName,
- Cid i_nId,
- bool ,
- bool i_bIsStatic )
-{
- csv_assert(pScope != 0);
- if (i_bIsStatic)
- pScope->Add_LocalStaticData(i_sLocalName, i_nId);
- else
- pScope->Add_LocalData(i_sLocalName, i_nId);
-}
-
-Cid
-Owner_Class::inq_CeId() const
-{
- csv_assert(pScope != 0);
- return pScope->CeId();
-}
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/icprivow.hxx b/autodoc/source/parser/cpp/icprivow.hxx
deleted file mode 100644
index bf688a7c..00000000
--- a/autodoc/source/parser/cpp/icprivow.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ARY_CPP_ICPRIVOW_HXX
-#define ARY_CPP_ICPRIVOW_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/inpcontx.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-
-
-typedef ary::cpp::Ce_id Cid;
-
-
-class Owner_Namespace : public ary::cpp::InputContext::Owner
-{
- public:
- Owner_Namespace();
- void SetAnotherNamespace(
- ary::cpp::Namespace &
- io_rScope );
- virtual bool HasClass(
- const String & i_sLocalName );
- private:
- virtual void do_Add_Class(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Enum(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Typedef(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Operation(
- const String & i_sLocalName,
- Cid i_nId,
- bool );
- virtual void do_Add_Variable(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStatic );
- virtual Cid inq_CeId() const;
-
- // DATA
- ary::cpp::Namespace *
- pScope;
-};
-
-class Owner_Class : public ary::cpp::InputContext::Owner
-{
- public:
- Owner_Class();
- void SetAnotherClass(
- ary::cpp::Class & io_rScope );
-
- /** @attention Only a dummy for use at ary::cpp::Gate!
- Will work nerver!
- */
- virtual bool HasClass(
- const String & i_sLocalName );
- private:
- virtual void do_Add_Class(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Enum(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Typedef(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Operation(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStaticMember );
- virtual void do_Add_Variable(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStatic );
- virtual Cid inq_CeId() const;
-
- // DATA
- ary::cpp::Class * pScope;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/makefile.mk b/autodoc/source/parser/cpp/makefile.mk
deleted file mode 100644
index 9729ee2d..00000000
--- a/autodoc/source/parser/cpp/makefile.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=parser_cpp
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/all_toks.obj \
- $(OBJ)$/c_dealer.obj \
- $(OBJ)$/c_rcode.obj \
- $(OBJ)$/cpp_pe.obj \
- $(OBJ)$/cx_base.obj \
- $(OBJ)$/cx_c_pp.obj \
- $(OBJ)$/cx_c_std.obj \
- $(OBJ)$/cx_c_sub.obj \
- $(OBJ)$/cxt2ary.obj \
- $(OBJ)$/defdescr.obj \
- $(OBJ)$/icprivow.obj \
- $(OBJ)$/pe_base.obj \
- $(OBJ)$/pe_class.obj \
- $(OBJ)$/pe_defs.obj \
- $(OBJ)$/pe_expr.obj \
- $(OBJ)$/pe_enum.obj \
- $(OBJ)$/pe_enval.obj \
- $(OBJ)$/pe_file.obj \
- $(OBJ)$/pe_funct.obj \
- $(OBJ)$/pe_ignor.obj \
- $(OBJ)$/pe_namsp.obj \
- $(OBJ)$/pe_param.obj \
- $(OBJ)$/pe_tpltp.obj \
- $(OBJ)$/pe_type.obj \
- $(OBJ)$/pe_tydef.obj \
- $(OBJ)$/pe_vafu.obj \
- $(OBJ)$/pe_vari.obj \
- $(OBJ)$/preproc.obj \
- $(OBJ)$/prs_cpp.obj \
- $(OBJ)$/tkp_cpp.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser/cpp/pe_base.cxx b/autodoc/source/parser/cpp/pe_base.cxx
deleted file mode 100644
index a4ff9857..00000000
--- a/autodoc/source/parser/cpp/pe_base.cxx
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_base.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_type.hxx>
-#include "pe_type.hxx"
-
-
-
-
-namespace cpp
-{
-
-
-static const PE_Base::Base aNullBase_;
-
-
-PE_Base::PE_Base( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati(new PeStatusArray<PE_Base>)
- // aBaseIds,
- // pSpType,
- // pSpuBaseName
-{
- Setup_StatusFunctions();
- aBaseIds.reserve(4);
-
- pSpType = new SP_Type(*this);
- pSpuBaseName = new SPU_BaseName(*pSpType, 0, &PE_Base::SpReturn_BaseName);
-}
-
-
-PE_Base::~PE_Base()
-{
-}
-
-void
-PE_Base::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Base::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Base>::F_Tok F_Tok;
- static F_Tok stateF_startOfNext[] = { &PE_Base::On_startOfNext_Identifier,
- &PE_Base::On_startOfNext_public,
- &PE_Base::On_startOfNext_protected,
- &PE_Base::On_startOfNext_private,
- &PE_Base::On_startOfNext_virtual,
- &PE_Base::On_startOfNext_DoubleColon };
- static INT16 stateT_startOfNext[] = { Tid_Identifier,
- Tid_public,
- Tid_protected,
- Tid_private,
- Tid_virtual,
- Tid_DoubleColon };
- static F_Tok stateF_inName[] = { &PE_Base::On_inName_Identifier,
- &PE_Base::On_inName_virtual,
- &PE_Base::On_inName_SwBracket_Left,
- &PE_Base::On_inName_DoubleColon,
- &PE_Base::On_inName_Comma };
- static INT16 stateT_inName[] = { Tid_Identifier,
- Tid_virtual,
- Tid_SwBracket_Left,
- Tid_DoubleColon,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Base, startOfNext, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Base, inName, Hdl_SyntaxError);
-}
-
-void
-PE_Base::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Base::InitData()
-{
- pStati->SetCur(startOfNext);
- csv::erase_container(aBaseIds);
- aBaseIds.push_back(aNullBase_);
-}
-
-void
-PE_Base::TransferData()
-{
- // Does nothing.
-}
-
-void
-PE_Base::SpReturn_BaseName()
-{
- CurObject().nId = pSpuBaseName->Child().Result_Type().Id();
-
- static StreamStr aBaseName(100);
- aBaseName.seekp(0);
- pSpuBaseName->Child().Result_Type().Get_Text( aBaseName, Env().AryGate() );
-
- Env().Event_Class_FinishedBase(aBaseName.c_str());
-}
-
-void
-PE_Base::On_startOfNext_public(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inName);
-
- CurObject().eProtection = ary::cpp::PROTECT_public;
-}
-
-void
-PE_Base::On_startOfNext_protected(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inName);
-
- CurObject().eProtection = ary::cpp::PROTECT_protected;
-}
-
-void
-PE_Base::On_startOfNext_private(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inName);
-
- CurObject().eProtection = ary::cpp::PROTECT_private;
-}
-
-void
-PE_Base::On_startOfNext_virtual(const char *)
-{
- SetTokenResult(done, stay);
-
- CurObject().eVirtuality = ary::cpp::VIRTUAL_virtual;
-}
-
-void
-PE_Base::On_startOfNext_Identifier(const char * )
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_startOfNext_DoubleColon(const char *)
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_inName_Identifier(const char * )
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_inName_virtual(const char *)
-{
- SetTokenResult(done, stay);
-
- CurObject().eVirtuality = ary::cpp::VIRTUAL_virtual;
-}
-
-void
-PE_Base::On_inName_DoubleColon(const char *)
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_inName_Comma(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(startOfNext);
-
- aBaseIds.push_back( aNullBase_ );
-}
-
-void
-PE_Base::On_inName_SwBracket_Left(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_base.hxx b/autodoc/source/parser/cpp/pe_base.hxx
deleted file mode 100644
index 933d596b..00000000
--- a/autodoc/source/parser/cpp/pe_base.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_BASE_HXX
-#define ADC_CPP_PE_BASE_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-
-
-
-namespace cpp
-{
-
-class PE_Type;
-
-class PE_Base : public Cpp_PE
-{
- public:
- enum E_State
- {
- startOfNext,
- inName,
- size_of_states
- };
-
- typedef ary::cpp::List_Bases BaseList;
- typedef ary::cpp::S_Classes_Base Base;
-
- PE_Base(
- Cpp_PE * i_pParent );
- ~PE_Base();
-
- const BaseList & Result_BaseIds() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- typedef SubPe< PE_Base, PE_Type > SP_Type;
- typedef SubPeUse< PE_Base, PE_Type> SPU_BaseName;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_BaseName();
-
- void On_startOfNext_Identifier(const char *);
- void On_startOfNext_public(const char *);
- void On_startOfNext_protected(const char *);
- void On_startOfNext_private(const char *);
- void On_startOfNext_virtual(const char *);
- void On_startOfNext_DoubleColon(const char *);
-
- void On_inName_Identifier(const char *);
- void On_inName_virtual(const char *);
- void On_inName_SwBracket_Left(const char *);
- void On_inName_DoubleColon(const char *);
- void On_inName_Comma(const char *);
-
- Base & CurObject();
-
- // DATA
- Dyn< PeStatusArray<PE_Base> >
- pStati;
-
- Dyn<SP_Type> pSpType; /// till "{" incl.
- Dyn<SPU_BaseName> pSpuBaseName;
-
- BaseList aBaseIds;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const PE_Base::BaseList &
-PE_Base::Result_BaseIds() const
- { return aBaseIds; }
-
-
-inline PE_Base::Base &
-PE_Base::CurObject()
- { return aBaseIds.back(); }
-
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_class.cxx b/autodoc/source/parser/cpp/pe_class.cxx
deleted file mode 100644
index 5a4d2465..00000000
--- a/autodoc/source/parser/cpp/pe_class.cxx
+++ /dev/null
@@ -1,496 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_class.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <all_toks.hxx>
-#include "pe_base.hxx"
-#include "pe_defs.hxx"
-#include "pe_enum.hxx"
-#include "pe_tydef.hxx"
-#include "pe_vafu.hxx"
-#include "pe_ignor.hxx"
-
-
-namespace cpp {
-
-// using ary::Cid;
-
-PE_Class::PE_Class(Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Class> ),
- // pSpBase,
- // pSpTypedef,
- // pSpVarFunc,
- // pSpIgnore,
- // pSpuBase,
- // pSpuTypedef,
- // pSpuVarFunc,
- // pSpuUsing,
- // pSpuIgnoreFailure,
- // sLocalName,
- eClassKey(ary::cpp::CK_class),
- pCurObject(0),
- // aBases,
- eResult_KindOf(is_declaration)
-{
- Setup_StatusFunctions();
-
- pSpBase = new SP_Base(*this);
- pSpTypedef = new SP_Typedef(*this);
- pSpVarFunc = new SP_VarFunc(*this);
- pSpIgnore = new SP_Ignore(*this);
- pSpDefs = new SP_Defines(*this);
-
- pSpuBase = new SPU_Base(*pSpBase, 0, &PE_Class::SpReturn_Base);
- pSpuTypedef = new SPU_Typedef(*pSpTypedef, 0, 0);
- pSpuVarFunc = new SPU_VarFunc(*pSpVarFunc, 0, 0);
-
- pSpuTemplate= new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuUsing = new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuIgnoreFailure
- = new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuDefs = new SPU_Defines(*pSpDefs, 0, 0);
-}
-
-
-PE_Class::~PE_Class()
-{
-}
-
-void
-PE_Class::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-Cpp_PE *
-PE_Class::Handle_ChildFailure()
-{
- SetCurSPU(pSpuIgnoreFailure.Ptr());
- return &pSpuIgnoreFailure->Child();
-}
-
-void
-PE_Class::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Class>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_Class::On_start_class,
- &PE_Class::On_start_struct,
- &PE_Class::On_start_union };
- static INT16 stateT_start[] = { Tid_class,
- Tid_struct,
- Tid_union };
-
- static F_Tok stateF_expectName[] = { &PE_Class::On_expectName_Identifier,
- &PE_Class::On_expectName_SwBracket_Left,
- &PE_Class::On_expectName_Colon
- };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_SwBracket_Left,
- Tid_Colon
- };
-
- static F_Tok stateF_gotName[] = { &PE_Class::On_gotName_SwBracket_Left,
- &PE_Class::On_gotName_Semicolon,
- &PE_Class::On_gotName_Colon };
- static INT16 stateT_gotName[] = { Tid_SwBracket_Left,
- Tid_Semicolon,
- Tid_Colon };
-
- static F_Tok stateF_bodyStd[] = { &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_ClassKey,
- &PE_Class::On_bodyStd_ClassKey,
- &PE_Class::On_bodyStd_ClassKey,
-
- &PE_Class::On_bodyStd_enum,
- &PE_Class::On_bodyStd_typedef,
- &PE_Class::On_bodyStd_public,
- &PE_Class::On_bodyStd_protected,
- &PE_Class::On_bodyStd_private,
-
- &PE_Class::On_bodyStd_template,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_friend,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
-
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
-
- &PE_Class::On_bodyStd_using,
- &PE_Class::On_bodyStd_SwBracket_Right,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_DefineName,
- &PE_Class::On_bodyStd_MacroName,
-
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc, };
-
- static INT16 stateT_bodyStd[] = { Tid_Identifier,
- Tid_operator,
- Tid_class,
- Tid_struct,
- Tid_union,
-
- Tid_enum,
- Tid_typedef,
- Tid_public,
- Tid_protected,
- Tid_private,
-
- Tid_template,
- Tid_virtual,
- Tid_friend,
- Tid_Tilde,
- Tid_const,
-
- Tid_volatile,
- Tid_static,
- Tid_mutable,
- Tid_inline,
- Tid_explicit,
-
- Tid_using,
- Tid_SwBracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_DefineName,
-
- Tid_MacroName,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_inProtection[] = { &PE_Class::On_inProtection_Colon };
- static INT16 stateT_inProtection[] = { Tid_Colon };
-
- static F_Tok stateF_afterDecl[] = { &PE_Class::On_afterDecl_Semicolon };
- static INT16 stateT_afterDecl[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Class, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, gotName, On_gotName_Return2Type);
- SEMPARSE_CREATE_STATUS(PE_Class, bodyStd, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, inProtection, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, afterDecl, On_afterDecl_Return2Type);
-
-}
-
-void
-PE_Class::InitData()
-{
- pStati->SetCur(start);
- sLocalName.clear();
- eClassKey = ary::cpp::CK_class;
- pCurObject = 0;
- csv::erase_container(aBases);
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Class::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Class::Hdl_SyntaxError( const char * i_sText)
-{
- if ( *i_sText == ';' )
- {
- Cerr() << Env().CurFileName() << ", line "
- << Env().LineCount()
- << ": Sourcecode warning: ';' as a toplevel declaration is deprecated."
- << Endl();
- SetTokenResult(done,stay);
- return;
- }
-
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Class::Init_CurObject()
-{
- // KORR_FUTURE
- // This will have to be done before parsing base classes, because of
- // possible inline documentation for base classes.
- pCurObject = & Env().AryGate().Ces().Store_Class( Env().Context(), sLocalName, eClassKey );
-
- for ( PE_Base::BaseList::const_iterator it = aBases.begin();
- it != aBases.end();
- ++it )
- {
- pCurObject->Add_BaseClass( *it );
- } // end for
-
- Dyn< StringVector >
- pTplParams( Env().Get_CurTemplateParameters() );
- if ( pTplParams )
- {
- for ( StringVector::const_iterator it = pTplParams->begin();
- it != pTplParams->end();
- ++it )
- {
- pCurObject->Add_TemplateParameterType( *it, ary::cpp::Type_id(0) );
- } // end for
- }
-}
-
-void
-PE_Class::SpReturn_Base()
-{
- aBases = pSpuBase->Child().Result_BaseIds();
- pStati->SetCur(gotName);
-}
-
-void
-PE_Class::On_start_class( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
- eClassKey = ary::cpp::CK_class;
-}
-
-void
-PE_Class::On_start_struct( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
- eClassKey = ary::cpp::CK_struct;
-}
-
-void
-PE_Class::On_start_union( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
- eClassKey = ary::cpp::CK_union;
-}
-
-void
-PE_Class::On_expectName_Identifier( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotName);
- sLocalName = i_sText;
-}
-
-void
-PE_Class::On_expectName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-
- sLocalName = "";
- Init_CurObject();
- sLocalName = pCurObject->LocalName();
-
- Env().OpenClass(*pCurObject);
-}
-
-void
-PE_Class::On_expectName_Colon( const char * )
-{
- pStati->SetCur(gotName);
- sLocalName = "";
-
- pSpuBase->Push(done);
-}
-
-void
-PE_Class::On_gotName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-
- Init_CurObject();
- if ( sLocalName.empty() )
- sLocalName = pCurObject->LocalName();
-
- Env().OpenClass(*pCurObject);
-}
-
-void
-PE_Class::On_gotName_Semicolon( const char * )
-{
- SetTokenResult(not_done, pop_success);
-
- eResult_KindOf = is_predeclaration;
-}
-
-void
-PE_Class::On_gotName_Colon( const char * )
-{
- pSpuBase->Push(done);
-}
-
-void
-PE_Class::On_gotName_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
-
- eResult_KindOf = is_qualified_typename;
-}
-
-void
-PE_Class::On_bodyStd_VarFunc( const char * )
-{
- pSpuVarFunc->Push(not_done);
-}
-
-void
-PE_Class::On_bodyStd_ClassKey( const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // classes are parsed via PE_Type.
-}
-
-void
-PE_Class::On_bodyStd_enum( const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // enums are parsed via PE_Type.
-}
-
-void
-PE_Class::On_bodyStd_typedef( const char * )
-{
- pSpuTypedef->Push(not_done);
-}
-
-void
-PE_Class::On_bodyStd_public( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inProtection);
-
- Env().SetCurProtection(ary::cpp::PROTECT_public);
-}
-
-void
-PE_Class::On_bodyStd_protected( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inProtection);
-
- Env().SetCurProtection(ary::cpp::PROTECT_protected);
-}
-
-void
-PE_Class::On_bodyStd_private( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inProtection);
-
- Env().SetCurProtection(ary::cpp::PROTECT_private);
-}
-
-void
-PE_Class::On_bodyStd_template( const char * )
-{
- pSpuTemplate->Push(done);
-}
-
-void
-PE_Class::On_bodyStd_friend( const char * )
-{
- // KORR_FUTURE
- pSpuUsing->Push(done);
-}
-
-void
-PE_Class::On_bodyStd_using( const char * )
-{
- pSpuUsing->Push(done);
-}
-
-void
-PE_Class::On_bodyStd_SwBracket_Right( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterDecl);
-
- Env().CloseClass();
-}
-
-void
-PE_Class::On_bodyStd_DefineName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-void
-PE_Class::On_bodyStd_MacroName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-
-void
-PE_Class::On_inProtection_Colon( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-}
-
-void
-PE_Class::On_afterDecl_Semicolon( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Class::On_afterDecl_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_implicit_declaration;
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_class.hxx b/autodoc/source/parser/cpp/pe_class.hxx
deleted file mode 100644
index 518594ed..00000000
--- a/autodoc/source/parser/cpp/pe_class.hxx
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_CLASS_HXX
-#define ADC_CPP_PE_CLASS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // OTHER
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-#include "all_toks.hxx"
-
-namespace ary
-{
-namespace cpp
-{
- class Class;
-}
-}
-
-
-namespace cpp
-{
-
-
-using ary::cpp::E_Protection;
-using ary::cpp::E_Virtuality;
-
-
-class PE_Base;
-class PE_Enum;
-class PE_Typedef;
-class PE_VarFunc;
-class PE_Ignore;
-class PE_Defines;
-
-
-class PE_Class : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- start, /// before class, struct or union
- expectName, /// after class, struct or union
- gotName, /// after name, before : or {
- bodyStd, /// after {
- inProtection, /// after public, protected or private and before ":"
- afterDecl, /// after ending }
- size_of_states
- };
-
- enum E_KindOfResult
- {
- is_declaration, // normal
- is_implicit_declaration, // like in: class Abc { public int n; } aAbc;
- is_predeclaration, // like: class Abc;
- is_qualified_typename // like in: class Abc * fx();
-
- };
-
- PE_Class(
- Cpp_PE * i_pParent );
- ~PE_Class();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- virtual Cpp_PE * Handle_ChildFailure();
-
- E_KindOfResult Result_KindOf() const;
- const String & Result_LocalName() const;
- const String & Result_FirstNameSegment() const;
-
- private:
- typedef SubPe< PE_Class, PE_Base > SP_Base;
-// typedef SubPe< PE_Class, PE_Enum> SP_Enum;
- typedef SubPe< PE_Class, PE_Typedef> SP_Typedef;
- typedef SubPe< PE_Class, PE_VarFunc> SP_VarFunc;
- typedef SubPe< PE_Class, PE_Ignore > SP_Ignore;
- typedef SubPe< PE_Class, PE_Defines> SP_Defines;
-
- typedef SubPeUse< PE_Class, PE_Base> SPU_Base;
-// typedef SubPeUse< PE_Class, PE_Enum> SPU_Enum;
- typedef SubPeUse< PE_Class, PE_Typedef> SPU_Typedef;
- typedef SubPeUse< PE_Class, PE_VarFunc> SPU_VarFunc;
- typedef SubPeUse< PE_Class, PE_Ignore> SPU_Ignore;
- typedef SubPeUse< PE_Class, PE_Defines> SPU_Defines;
-
- typedef ary::cpp::List_Bases BaseList;
- typedef ary::cpp::S_Classes_Base Base;
- typedef ary::cpp::E_Protection E_Protection;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
- void Init_CurObject();
-
- void SpReturn_Base();
-
- void On_start_class( const char * );
- void On_start_struct( const char * );
- void On_start_union( const char * );
-
- void On_expectName_Identifier( const char * );
- void On_expectName_SwBracket_Left( const char * );
- void On_expectName_Colon( const char * );
-
- void On_gotName_SwBracket_Left( const char * );
- void On_gotName_Semicolon( const char * );
- void On_gotName_Colon( const char * );
- void On_gotName_Return2Type( const char * );
-
- void On_bodyStd_VarFunc( const char * );
- void On_bodyStd_ClassKey( const char * );
- void On_bodyStd_enum( const char * );
- void On_bodyStd_typedef( const char * );
- void On_bodyStd_public( const char * );
- void On_bodyStd_protected( const char * );
- void On_bodyStd_private( const char * );
- void On_bodyStd_template( const char * );
- void On_bodyStd_friend( const char * );
- void On_bodyStd_using( const char * );
- void On_bodyStd_SwBracket_Right( const char * );
- void On_bodyStd_DefineName(const char * );
- void On_bodyStd_MacroName(const char * );
-
- void On_inProtection_Colon( const char * );
-
- void On_afterDecl_Semicolon( const char * );
- void On_afterDecl_Return2Type( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Class> >
- pStati;
-
- Dyn<SP_Base> pSpBase;
-// Dyn<SP_Enum> pSpEnum;
- Dyn<SP_Typedef> pSpTypedef;
- Dyn<SP_VarFunc> pSpVarFunc;
- Dyn<SP_Ignore> pSpIgnore;
- Dyn<SP_Defines> pSpDefs;
-
- Dyn<SPU_Base> pSpuBase;
-// Dyn<SPU_Enum> pSpuEnum;
- Dyn<SPU_Typedef> pSpuTypedef;
- Dyn<SPU_VarFunc> pSpuVarFunc;
-
- Dyn<SPU_Ignore> pSpuTemplate;
- Dyn<SPU_Ignore> pSpuUsing;
- Dyn<SPU_Ignore> pSpuIgnoreFailure;
- Dyn<SPU_Defines> pSpuDefs;
-
-
-
- String sLocalName;
- ary::cpp::E_ClassKey
- eClassKey;
- ary::cpp::Class * pCurObject;
- BaseList aBases;
-
- E_KindOfResult eResult_KindOf;
-};
-
-
-
-// IMPLEMENTATION
-
-inline PE_Class::E_KindOfResult
-PE_Class::Result_KindOf() const
-{
- return eResult_KindOf;
-}
-
-inline const String &
-PE_Class::Result_LocalName() const
-{
- return sLocalName;
-}
-
-inline const String &
-PE_Class::Result_FirstNameSegment() const
-{
- return sLocalName;
-}
-
-
-
-
-} // namespace cpp
-
-
-/* // Branches
-
-class struct union
- -> Class
- -> Predeclaration
-
-typedef
- -> Typedef
-
-enum
- -> Enum
-
-TypeDeclaration
- -> Function In Class
- -> Variable
-
-public, protected, private
- -> Protection declaration
-
-friend
- -> Friend Class
- -> Friend Function
-
-virtual
- -> Function In Class
-
-using
- -> Using Declaration
-*/
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_defs.cxx b/autodoc/source/parser/cpp/pe_defs.cxx
deleted file mode 100644
index fc251533..00000000
--- a/autodoc/source/parser/cpp/pe_defs.cxx
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_defs.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/cp_def.hxx>
-#include "all_toks.hxx"
-
-
-namespace cpp
-{
-
-
-PE_Defines::PE_Defines( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Defines> ),
- // sName,
- // aParameters,
- // sDefinition,
- bIsMacro(false)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_Defines::~PE_Defines()
-{
-}
-
-void
-PE_Defines::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Defines::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Defines>::F_Tok F_Tok;
- static F_Tok stateF_expectName[] = { &PE_Defines::On_expectName_DefineName,
- &PE_Defines::On_expectName_MacroName
- };
- static INT16 stateT_expectName[] = { Tid_DefineName,
- Tid_MacroName
- };
-
- static F_Tok stateF_gotDefineName[] = { &PE_Defines::On_gotDefineName_PreProDefinition };
- static INT16 stateT_gotDefineName[] = { Tid_PreProDefinition };
-
- static F_Tok stateF_expectMacroParameters[] =
- { &PE_Defines::On_expectMacroParameters_MacroParameter,
- &PE_Defines::On_expectMacroParameters_PreProDefinition
- };
- static INT16 stateT_expectMacroParameters[] =
- { Tid_MacroParameter,
- Tid_PreProDefinition
- };
-
- SEMPARSE_CREATE_STATUS(PE_Defines, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Defines, gotDefineName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Defines, expectMacroParameters, Hdl_SyntaxError);
-}
-
-void
-PE_Defines::InitData()
-{
- pStati->SetCur(expectName);
-
- sName.clear();
- csv::erase_container( aParameters );
- csv::erase_container( aDefinition );
- bIsMacro = false;
-}
-
-void
-PE_Defines::TransferData()
-{
- if (NOT bIsMacro)
- {
- if (aDefinition.empty() OR aDefinition.front().empty())
- return;
-
- ary::cpp::Define &
- rNew = Env().AryGate().Defs().Store_Define(
- Env().Context(), sName, aDefinition );
- Env().Event_Store_CppDefinition(rNew);
- }
- else
- {
- ary::cpp::Macro &
- rNew = Env().AryGate().Defs().Store_Macro(
- Env().Context(), sName, aParameters, aDefinition );
- Env().Event_Store_CppDefinition(rNew);
- }
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Defines::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Defines::On_expectName_DefineName( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotDefineName);
-
- sName = i_sText;
- bIsMacro = false;
-}
-
-void
-PE_Defines::On_expectName_MacroName( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectMacroParameters);
-
- sName = i_sText;
- bIsMacro = true;
-}
-
-void
-PE_Defines::On_gotDefineName_PreProDefinition( const char * i_sText )
-{
- SetTokenResult(done, pop_success);
-
- aDefinition.push_back( String (i_sText) );
-}
-
-void
-PE_Defines::On_expectMacroParameters_MacroParameter( const char * i_sText )
-{
- SetTokenResult(done, stay);
- aParameters.push_back( String (i_sText) );
-}
-
-void
-PE_Defines::On_expectMacroParameters_PreProDefinition( const char * i_sText )
-{
- SetTokenResult(done, pop_success);
-
- aDefinition.push_back( String (i_sText) );
-}
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_defs.hxx b/autodoc/source/parser/cpp/pe_defs.hxx
deleted file mode 100644
index b179dda8..00000000
--- a/autodoc/source/parser/cpp/pe_defs.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_DEFS_HXX
-#define ADC_CPP_PE_DEFS_HXX
-
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp
-{
-
-
-
-class PE_Defines : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- expectName,
- gotDefineName,
- expectMacroParameters,
- size_of_states
- };
-
- PE_Defines(
- Cpp_PE * i_pParent );
- ~PE_Defines();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void On_expectName_DefineName( const char * );
- void On_expectName_MacroName( const char * );
-
- void On_gotDefineName_PreProDefinition( const char * );
-
- void On_expectMacroParameters_MacroParameter( const char * );
- void On_expectMacroParameters_PreProDefinition( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Defines> >
- pStati;
-
- String sName;
- StringVector aParameters;
- StringVector aDefinition;
- bool bIsMacro;
-};
-
-
-
-} //namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enum.cxx b/autodoc/source/parser/cpp/pe_enum.cxx
deleted file mode 100644
index abed323d..00000000
--- a/autodoc/source/parser/cpp/pe_enum.cxx
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_enum.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <all_toks.hxx>
-#include "pe_enval.hxx"
-
-
-namespace cpp {
-
-
-PE_Enum::PE_Enum(Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Enum> ),
- // pSpValue,
- // pSpuValue,
- // sLocalName,
- pCurObject(0),
- eResult_KindOf(is_declaration)
-{
- Setup_StatusFunctions();
-
- pSpValue = new SP_EnumValue(*this);
- pSpuValue = new SPU_EnumValue(*pSpValue, 0, 0);
-}
-
-
-PE_Enum::~PE_Enum()
-{
-}
-
-void
-PE_Enum::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Enum::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Enum>::F_Tok F_Tok;
- static F_Tok stateF_expectName[] = { &PE_Enum::On_expectName_Identifier,
- &PE_Enum::On_expectName_SwBracket_Left
- };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_SwBracket_Left
- };
-
- static F_Tok stateF_gotName[] = { &PE_Enum::On_gotName_SwBracket_Left };
- static INT16 stateT_gotName[] = { Tid_SwBracket_Left };
-
- static F_Tok stateF_bodyStd[] = { &PE_Enum::On_bodyStd_Identifier,
- &PE_Enum::On_bodyStd_SwBracket_Right };
- static INT16 stateT_bodyStd[] = { Tid_Identifier,
- Tid_SwBracket_Right };
-
- static F_Tok stateF_afterBlock[] = { &PE_Enum::On_afterBlock_Semicolon };
- static INT16 stateT_afterBlock[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Enum, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Enum, gotName, On_gotName_Return2Type);
- SEMPARSE_CREATE_STATUS(PE_Enum, bodyStd, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Enum, afterBlock, On_afterBlock_Return2Type);
-}
-
-void
-PE_Enum::InitData()
-{
- pStati->SetCur(expectName);
- pCurObject = 0;
- sLocalName.clear();
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Enum::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Enum::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Enum::On_expectName_Identifier( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotName);
-
- sLocalName = i_sText;
- pCurObject = & Env().AryGate().Ces().Store_Enum( Env().Context(), sLocalName );
-}
-
-void
-PE_Enum::On_expectName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-
- sLocalName = "";
- pCurObject = & Env().AryGate().Ces().Store_Enum( Env().Context(), sLocalName );
- sLocalName = pCurObject->LocalName();
-
- Env().OpenEnum(*pCurObject);
-}
-
-void
-PE_Enum::On_gotName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
- Env().OpenEnum(*pCurObject);
-}
-
-void
-PE_Enum::On_gotName_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
-
- eResult_KindOf = is_qualified_typename;
-}
-
-void
-PE_Enum::On_bodyStd_Identifier( const char * )
-{
- pSpuValue->Push(not_done);
-}
-
-void
-PE_Enum::On_bodyStd_SwBracket_Right( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterBlock);
-
- Env().CloseEnum();
-}
-
-void
-PE_Enum::On_afterBlock_Semicolon( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Enum::On_afterBlock_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_implicit_declaration;
-}
-
-} // namespace cpp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enum.hxx b/autodoc/source/parser/cpp/pe_enum.hxx
deleted file mode 100644
index 98de9793..00000000
--- a/autodoc/source/parser/cpp/pe_enum.hxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_ENUM_HXX
-#define ADC_CPP_PE_ENUM_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-
-namespace cpp {
-
-
-class PE_EnumValue;
-
-class PE_Enum : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- expectName, /// after "enum"
- gotName, /// after name, before : or {
- bodyStd, /// after {
- afterBlock, /// after ending }
- size_of_states
- };
-
- enum E_KindOfResult
- {
- is_declaration, // normal
- is_implicit_declaration, // like in: enum Abc { rot, gelb, blau } aAbc;
- is_qualified_typename // like in: enum Abc * fx();
-
- };
- PE_Enum(
- Cpp_PE * i_pParent );
- ~PE_Enum();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- E_KindOfResult Result_KindOf() const;
- const String & Result_LocalName() const;
- const String & Result_FirstNameSegment() const;
-
- private:
- typedef SubPe< PE_Enum, PE_EnumValue > SP_EnumValue;
- typedef SubPeUse< PE_Enum, PE_EnumValue> SPU_EnumValue;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void On_expectName_Identifier( const char * );
- void On_expectName_SwBracket_Left( const char * );
-
- void On_gotName_SwBracket_Left( const char * );
- void On_gotName_Return2Type( const char * );
-
- void On_bodyStd_Identifier( const char * );
- void On_bodyStd_SwBracket_Right( const char * );
-
- void On_afterBlock_Semicolon( const char * );
- void On_afterBlock_Return2Type( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Enum> >
- pStati;
- Dyn<SP_EnumValue> pSpValue;
- Dyn<SPU_EnumValue> pSpuValue;
-
- String sLocalName;
- ary::cpp::Enum * pCurObject;
-
- E_KindOfResult eResult_KindOf;
-};
-
-
-
-// IMPLEMENTATION
-inline PE_Enum::E_KindOfResult
-PE_Enum::Result_KindOf() const
-{
- return eResult_KindOf;
-}
-
-inline const String &
-PE_Enum::Result_LocalName() const
-{
- return sLocalName;
-}
-
-inline const String &
-PE_Enum::Result_FirstNameSegment() const
-{
- return sLocalName;
-}
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enval.cxx b/autodoc/source/parser/cpp/pe_enval.cxx
deleted file mode 100644
index 88b09779..00000000
--- a/autodoc/source/parser/cpp/pe_enval.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_enval.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include "pe_expr.hxx"
-
-
-
-namespace cpp {
-
-
-PE_EnumValue::PE_EnumValue( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_EnumValue> )
- // pSpExpression,
- // pSpuInitExpression
-{
- Setup_StatusFunctions();
-
- pSpExpression = new SP_Expression(*this);
- pSpuInitExpression = new SPU_Expression(*pSpExpression, 0, &PE_EnumValue::SpReturn_InitExpression);
-}
-
-PE_EnumValue::~PE_EnumValue()
-{
-}
-
-void
-PE_EnumValue::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_EnumValue::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_EnumValue>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_EnumValue::On_start_Identifier };
- static INT16 stateT_start[] = { Tid_Identifier };
-
- static F_Tok stateF_afterName[] = { &PE_EnumValue::On_afterName_SwBracket_Right,
- &PE_EnumValue::On_afterName_Comma,
- &PE_EnumValue::On_afterName_Assign };
- static INT16 stateT_afterName[] = { Tid_SwBracket_Right,
- Tid_Comma,
- Tid_Assign };
-
- static F_Tok stateF_expectFinish[] = { &PE_EnumValue::On_expectFinish_SwBracket_Right,
- &PE_EnumValue::On_expectFinish_Comma };
- static INT16 stateT_expectFinish[] = { Tid_SwBracket_Right,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_EnumValue, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_EnumValue, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_EnumValue, expectFinish, Hdl_SyntaxError);
-}
-
-void
-PE_EnumValue::InitData()
-{
- pStati->SetCur(start);
-
- sName.clear();
- sInitExpression.clear();
-}
-
-void
-PE_EnumValue::TransferData()
-{
- pStati->SetCur(size_of_states);
-
- ary::cpp::EnumValue &
- rEnVal = Env().AryGate().Ces().Store_EnumValue(
- Env().Context(), sName, sInitExpression );
- Env().Event_Store_EnumValue(rEnVal);
-}
-
-void
-PE_EnumValue::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_EnumValue::SpReturn_InitExpression()
-{
- pStati->SetCur(expectFinish);
-
- sInitExpression = pSpuInitExpression->Child().Result_Text();
-}
-
-void
-PE_EnumValue::On_start_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-
- sName = i_sText;
-}
-
-void
-PE_EnumValue::On_afterName_SwBracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_EnumValue::On_afterName_Comma(const char * )
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_EnumValue::On_afterName_Assign(const char * )
-{
- pSpuInitExpression->Push(done);
-}
-
-void
-PE_EnumValue::On_expectFinish_SwBracket_Right(const char * )
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_EnumValue::On_expectFinish_Comma(const char * )
-{
- SetTokenResult(done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enval.hxx b/autodoc/source/parser/cpp/pe_enval.hxx
deleted file mode 100644
index dde11b13..00000000
--- a/autodoc/source/parser/cpp/pe_enval.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_ENVAL_HXX
-#define ADC_CPP_PE_ENVAL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-class PE_Expression;
-
-
-class PE_EnumValue : public Cpp_PE
-{
- public:
- enum E_State
- {
- start, // before name
- afterName,
- expectFinish, // after init-expression
- size_of_states
- };
- PE_EnumValue(
- Cpp_PE * i_pParent );
- ~PE_EnumValue();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- typedef SubPe< PE_EnumValue, PE_Expression > SP_Expression;
- typedef SubPeUse< PE_EnumValue, PE_Expression> SPU_Expression;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char *);
-
- void SpReturn_InitExpression();
-
- void On_start_Identifier(const char * );
-
- void On_afterName_SwBracket_Right(const char * );
- void On_afterName_Comma(const char * );
- void On_afterName_Assign(const char * );
-
- void On_expectFinish_SwBracket_Right(const char * );
- void On_expectFinish_Comma(const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_EnumValue> >
- pStati;
- Dyn<SP_Expression> pSpExpression;
- Dyn<SPU_Expression> pSpuInitExpression;
-
- String sName;
- String sInitExpression;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_expr.cxx b/autodoc/source/parser/cpp/pe_expr.cxx
deleted file mode 100644
index 9a34a86b..00000000
--- a/autodoc/source/parser/cpp/pe_expr.cxx
+++ /dev/null
@@ -1,179 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_expr.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace cpp {
-
-
-
-PE_Expression::PE_Expression( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Expression> ),
- aResult_Text(100),
- nBracketCounter(0)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_Expression::~PE_Expression()
-{
-}
-
-void
-PE_Expression::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Expression::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Expression>::F_Tok F_Tok;
-
- static F_Tok stateF_std[] = { &PE_Expression::On_std_SwBracket_Left,
- &PE_Expression::On_std_SwBracket_Right,
- &PE_Expression::On_std_ArrayBracket_Left,
- &PE_Expression::On_std_ArrayBracket_Right,
- &PE_Expression::On_std_Bracket_Left,
- &PE_Expression::On_std_Bracket_Right,
- &PE_Expression::On_std_Semicolon,
- &PE_Expression::On_std_Comma };
- static INT16 stateT_std[] = { Tid_SwBracket_Left,
- Tid_SwBracket_Right,
- Tid_ArrayBracket_Left,
- Tid_ArrayBracket_Right,
- Tid_Bracket_Left,
- Tid_Bracket_Right,
- Tid_Semicolon,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Expression, std, On_std_Default);
-}
-
-void
-PE_Expression::InitData()
-{
- pStati->SetCur(std);
- aResult_Text.seekp(0);
- nBracketCounter = 0;
-}
-
-void
-PE_Expression::TransferData()
-{
- pStati->SetCur(size_of_states);
- if ( aResult_Text.tellp() > 0)
- aResult_Text.pop_back(1);
-}
-
-void
-PE_Expression::On_std_Default( const char * i_sText)
-{
- SetTokenResult(done, stay);
- aResult_Text << i_sText << " ";
-}
-
-void
-PE_Expression::On_std_SwBracket_Left( const char *)
-{
- SetTokenResult(done, stay);
- nBracketCounter++;
-}
-
-void
-PE_Expression::On_std_SwBracket_Right( const char *)
-{
- nBracketCounter--;
- if ( nBracketCounter >= 0 )
- SetTokenResult(done, stay);
- else
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_ArrayBracket_Left( const char *)
-{
- SetTokenResult(done, stay);
- nBracketCounter++;
-}
-
-void
-PE_Expression::On_std_ArrayBracket_Right( const char *)
-{
- nBracketCounter--;
- if ( nBracketCounter >= 0 )
- SetTokenResult(done, stay);
- else
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_Bracket_Left( const char *)
-{
- SetTokenResult(done, stay);
- nBracketCounter++;
-}
-
-void
-PE_Expression::On_std_Bracket_Right( const char *)
-{
- nBracketCounter--;
- if ( nBracketCounter >= 0 )
- SetTokenResult(done, stay);
- else
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_Semicolon( const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_Comma( const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_expr.hxx b/autodoc/source/parser/cpp/pe_expr.hxx
deleted file mode 100644
index 29365183..00000000
--- a/autodoc/source/parser/cpp/pe_expr.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_EXPR_HXX
-#define ADC_CPP_PE_EXPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class PE_Expression : public Cpp_PE
-{
- public:
- enum E_State
- {
- std,
- size_of_states
- };
- PE_Expression(
- Cpp_PE * i_pParent );
- ~PE_Expression();
-
- const char * Result_Text() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void On_std_Default( const char *);
-
- void On_std_SwBracket_Left( const char *);
- void On_std_SwBracket_Right( const char *);
- void On_std_ArrayBracket_Left( const char *);
- void On_std_ArrayBracket_Right( const char *);
- void On_std_Bracket_Left( const char *);
- void On_std_Bracket_Right( const char *);
- void On_std_Semicolon( const char *);
- void On_std_Comma( const char *);
-
- // DATA
- Dyn< PeStatusArray<PE_Expression> >
- pStati;
-
- csv::StreamStr aResult_Text;
-
- intt nBracketCounter;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const char *
-PE_Expression::Result_Text() const
-{
- return aResult_Text.c_str();
-}
-
-
-} // namespace cpp
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_file.cxx b/autodoc/source/parser/cpp/pe_file.cxx
deleted file mode 100644
index 78e9898d..00000000
--- a/autodoc/source/parser/cpp/pe_file.cxx
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_file.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include "pe_defs.hxx"
-#include "pe_enum.hxx"
-#include "pe_namsp.hxx"
-#include "pe_tpltp.hxx"
-#include "pe_tydef.hxx"
-#include "pe_vafu.hxx"
-#include "pe_ignor.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace cpp
-{
-
-PE_File::PE_File( cpp::PeEnvironment & io_rEnv)
- : Cpp_PE(io_rEnv),
- pEnv(&io_rEnv),
- pStati( new PeStatusArray<PE_File> ),
- // pSpNamespace,
- // pSpTypedef,
- // pSpVarFunc,
- // pSpIgnore,
- // pSpuNamespace,
- // pSpuClass,
- // pSpuTypedef,
- // pSpuVarFunc,
- // pSpuTemplate,
- // pSpuUsing,
- // pSpuIgnoreFailure,
- bWithinSingleExternC(false)
-{
- Setup_StatusFunctions();
-
- pSpNamespace = new SP_Namespace(*this);
- pSpTypedef = new SP_Typedef(*this);
- pSpVarFunc = new SP_VarFunc(*this);
- pSpTemplate = new SP_Template(*this);
- pSpDefs = new SP_Defines(*this);
- pSpIgnore = new SP_Ignore(*this);
-
- pSpuNamespace = new SPU_Namespace(*pSpNamespace, 0, 0);
- pSpuTypedef = new SPU_Typedef(*pSpTypedef, 0, 0);
- pSpuVarFunc = new SPU_VarFunc(*pSpVarFunc, 0, &PE_File::SpReturn_VarFunc);
- pSpuTemplate = new SPU_Template(*pSpTemplate, 0, &PE_File::SpReturn_Template);
- pSpuDefs = new SPU_Defines(*pSpDefs, 0, 0);
- pSpuUsing = new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuIgnoreFailure
- = new SPU_Ignore(*pSpIgnore, 0, 0);
-}
-
-PE_File::~PE_File()
-{
-}
-
-void
-PE_File::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-Cpp_PE *
-PE_File::Handle_ChildFailure()
-{
- SetCurSPU(pSpuIgnoreFailure.Ptr());
- return &pSpuIgnoreFailure->Child();
-}
-
-void
-PE_File::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_File>::F_Tok F_Tok;
- static F_Tok stateF_std[] = { &PE_File::On_std_VarFunc,
- &PE_File::On_std_ClassKey,
- &PE_File::On_std_ClassKey,
- &PE_File::On_std_ClassKey,
- &PE_File::On_std_enum,
-
- &PE_File::On_std_typedef,
- &PE_File::On_std_template,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_extern,
-
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_namespace,
- &PE_File::On_std_using,
-
- &PE_File::On_std_SwBracketRight,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_DefineName,
- &PE_File::On_std_MacroName,
-
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc };
-
- static INT16 stateT_std[] = { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
-
- Tid_typedef,
- Tid_template,
- Tid_const,
- Tid_volatile,
- Tid_extern,
-
- Tid_static,
- Tid_register,
- Tid_inline,
- Tid_namespace,
- Tid_using,
-
- Tid_SwBracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_DefineName,
- Tid_MacroName,
-
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_in_extern[] = { &PE_File::On_in_extern_Constant };
- static INT16 stateT_in_extern[] = { Tid_Constant };
-
- static F_Tok stateF_in_externC[] = { &PE_File::On_in_externC_SwBracket_Left };
- static INT16 stateT_in_externC[] = { Tid_SwBracket_Left };
-
-
- SEMPARSE_CREATE_STATUS(PE_File, std, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_File, in_extern, On_in_extern_Ignore);
- SEMPARSE_CREATE_STATUS(PE_File, in_externC, On_in_externC_NoBlock);
-}
-
-void
-PE_File::InitData()
-{
- pStati->SetCur(std);
-}
-
-void
-PE_File::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_File::Hdl_SyntaxError( const char * i_sText)
-{
- if ( *i_sText == ';' )
- {
- Cerr() << Env().CurFileName() << ", line "
- << Env().LineCount()
- << ": Sourcecode warning: ';' as a toplevel declaration is deprecated."
- << Endl();
- SetTokenResult(done,stay);
- return;
- }
-
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_File::SpReturn_VarFunc()
-{
- if (bWithinSingleExternC)
- {
- access_Env().CloseBlock();
- bWithinSingleExternC = false;
- }
-}
-
-void
-PE_File::SpReturn_Template()
-{
- access_Env().OpenTemplate( pSpuTemplate->Child().Result_Parameters() );
-}
-
-void
-PE_File::On_std_namespace(const char * )
-{
- pSpuNamespace->Push(done);
-}
-
-void
-PE_File::On_std_ClassKey(const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // classes are parsed via PE_Type.
-}
-
-void
-PE_File::On_std_typedef(const char * )
-{
- pSpuTypedef->Push(not_done);
-}
-
-void
-PE_File::On_std_enum(const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // enums are parsed via PE_Type.
-}
-
-void
-PE_File::On_std_VarFunc(const char * )
-{
- pSpuVarFunc->Push(not_done);
-}
-
-void
-PE_File::On_std_template(const char * )
-{
- pSpuTemplate->Push(done);
-}
-
-void
-PE_File::On_std_extern(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(in_extern);
-}
-
-void
-PE_File::On_std_using(const char * )
-{
- pSpuUsing->Push(done);
-}
-
-void
-PE_File::On_std_SwBracketRight(const char * )
-{
- SetTokenResult(done,stay);
- access_Env().CloseBlock();
-}
-
-void
-PE_File::On_std_DefineName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-void
-PE_File::On_std_MacroName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-void
-PE_File::On_in_extern_Constant(const char * )
-{
- SetTokenResult(done,stay);
- pStati->SetCur(in_externC);
-
- access_Env().OpenExternC();
-}
-
-void
-PE_File::On_in_extern_Ignore(const char * )
-{
- SetTokenResult(not_done, stay);
- pStati->SetCur(std);
-}
-
-void
-PE_File::On_in_externC_SwBracket_Left(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(std);
-}
-
-void
-PE_File::On_in_externC_NoBlock(const char * )
-{
- SetTokenResult(not_done, stay);
- pStati->SetCur(std);
-
- bWithinSingleExternC = true;
-}
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_file.hxx b/autodoc/source/parser/cpp/pe_file.hxx
deleted file mode 100644
index b8d15abe..00000000
--- a/autodoc/source/parser/cpp/pe_file.hxx
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_FILE_HXX
-#define ADC_CPP_PE_FILE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
- class PeEnvironment;
-
- class PE_Namespace;
- class PE_Enum;
- class PE_Typedef;
- class PE_VarFunc;
- class PE_TemplateTop;
- class PE_Defines;
- class PE_Ignore;
-
-class PE_File : public Cpp_PE
-{
- public:
- enum E_State
- {
- std, /// before class, struct or union
- in_extern,
- in_externC,
- size_of_states
- };
-
- PE_File(
- PeEnvironment & io_rEnv );
- ~PE_File();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- virtual Cpp_PE * Handle_ChildFailure();
-
- private:
- typedef SubPe< PE_File, PE_Namespace> SP_Namespace;
- typedef SubPe< PE_File, PE_Typedef> SP_Typedef;
- typedef SubPe< PE_File, PE_VarFunc> SP_VarFunc;
- typedef SubPe< PE_File, PE_TemplateTop> SP_Template;
- typedef SubPe< PE_File, PE_Defines> SP_Defines;
- typedef SubPe< PE_File, PE_Ignore > SP_Ignore;
-
- typedef SubPeUse< PE_File, PE_Namespace> SPU_Namespace;
- typedef SubPeUse< PE_File, PE_Typedef> SPU_Typedef;
- typedef SubPeUse< PE_File, PE_VarFunc> SPU_VarFunc;
- typedef SubPeUse< PE_File, PE_TemplateTop> SPU_Template;
- typedef SubPeUse< PE_File, PE_Defines> SPU_Defines;
- typedef SubPeUse< PE_File, PE_Ignore> SPU_Ignore;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_VarFunc();
- void SpReturn_Template();
-
- void On_std_namespace(const char * i_sText);
- void On_std_ClassKey(const char * i_sText);
- void On_std_typedef(const char * i_sText);
- void On_std_enum(const char * i_sText);
- void On_std_VarFunc(const char * i_sText);
- void On_std_template(const char * i_sText);
- void On_std_extern(const char * i_sText);
- void On_std_using(const char * i_sText);
- void On_std_SwBracketRight(const char * i_sText);
-
- void On_std_DefineName(const char * i_sText);
- void On_std_MacroName(const char * i_sText);
-
- void On_in_extern_Constant(const char * i_sText);
- void On_in_extern_Ignore(const char * i_sText);
- void On_in_externC_SwBracket_Left(const char * i_sText);
- void On_in_externC_NoBlock(const char * i_sText);
-
- PeEnvironment & access_Env() { return *pEnv; }
-
-
- // DATA
- PeEnvironment * pEnv;
-
- Dyn< PeStatusArray<PE_File> >
- pStati;
-
- Dyn<SP_Namespace> pSpNamespace;
- Dyn<SP_Typedef> pSpTypedef;
- Dyn<SP_VarFunc> pSpVarFunc;
- Dyn<SP_Template> pSpTemplate;
- Dyn<SP_Defines> pSpDefs;
-
- Dyn<SP_Ignore> pSpIgnore;
-
- Dyn<SPU_Namespace> pSpuNamespace;
- Dyn<SPU_Typedef> pSpuTypedef;
- Dyn<SPU_VarFunc> pSpuVarFunc;
- Dyn<SPU_Template> pSpuTemplate;
- Dyn<SPU_Defines> pSpuDefs;
-
- Dyn<SPU_Ignore> pSpuUsing;
- Dyn<SPU_Ignore> pSpuIgnoreFailure;
-
- bool bWithinSingleExternC; /** After 'extern "C"' without following '{',
- waiting for the next function or variable to
- set back to false.
- */
-};
-
-} // namespace cpp
-
-
-
-/* // Branches
-
-namespace
- -> Named Namespace declaration
- -> Unnamed Namespace declaration
- -> Namespace alias definition
-
-class struct union
- -> Class
- -> Predeclaration
-
-typedef
- -> Typedef
-
-enum
- -> Enum
-
-extern
- -> Extern-"C"
- -> TypeDeclaration
-
-TypeDeclaration
- -> FunctionDecl
- -> FunctionDef
- -> Variable
-
-template
- -> TemplateClass
- -> TemplateFunction
- -> TemplateFunction/Method-Implementation
- -> TemplatePredeclaration
-
-}
- -> End of Namespace
- -> End of Extern-"C"
-
-asm
- -> AssemblerDeclaration
-
-using
- -> Using-Declaration
- -> Using-Directive
-
-*/
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_funct.cxx b/autodoc/source/parser/cpp/pe_funct.cxx
deleted file mode 100644
index c5e1ff8b..00000000
--- a/autodoc/source/parser/cpp/pe_funct.cxx
+++ /dev/null
@@ -1,612 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_funct.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include <ary/cpp/inpcontx.hxx>
-#include "pe_type.hxx"
-#include "pe_param.hxx"
-
-
-
-
-namespace cpp
-{
-
-
-inline void
-PE_Function::PerformFinishingPunctuation()
-{
- SetTokenResult(not_done,pop_success);
-}
-
-
-PE_Function::PE_Function( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Function> ),
- // pSpParameter,
- // pSpuParameter,
- // pSpType,
- // pSpuException,
- // pSpuCastOperatorType,
- nResult(0),
- bResult_WithImplementation(false),
- aName(60),
- eVirtuality(ary::cpp::VIRTUAL_none),
- eConVol(ary::cpp::CONVOL_none),
- // aFlags,
- nReturnType(0),
- // aParameters
- // aExceptions,
- bThrow(false),
- nBracketCounterInImplementation(0)
-{
- Setup_StatusFunctions();
-
- pSpParameter = new SP_Parameter(*this);
- pSpType = new SP_Type(*this);
-
- pSpuParameter = new SPU_Parameter(*pSpParameter, 0, &PE_Function::SpReturn_Parameter);
- pSpuException = new SPU_Type(*pSpType, 0, &PE_Function::SpReturn_Exception);
- pSpuCastOperatorType = new SPU_Type(*pSpType, &PE_Function::SpInit_CastOperatorType, &PE_Function::SpReturn_CastOperatorType);
-}
-
-PE_Function::~PE_Function()
-{
-
-}
-
-void
-PE_Function::Init_Std( const String & i_sName,
- ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << i_sName;
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = i_nReturnType;
- pStati->SetCur(afterName);
-}
-
-void
-PE_Function::Init_Ctor( const String & i_sName,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << i_sName;
- eVirtuality = ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = 0;
- pStati->SetCur(afterName);
-}
-
-void
-PE_Function::Init_Dtor( const String & i_sName,
- bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << "~" << i_sName;
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = 0;
- pStati->SetCur(afterName);
-}
-
-void
-PE_Function::Init_CastOperator( bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << "operator ";
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = 0;
- pStati->SetCur(afterCastOperator);
-}
-
-void
-PE_Function::Init_NormalOperator( ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << "operator";
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = i_nReturnType;
- pStati->SetCur(afterStdOperator);
-}
-
-ary::cpp::Ce_id
-PE_Function::Result_Id() const
-{
- return nResult;
-}
-
-void
-PE_Function::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Function::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Function>::F_Tok F_Tok;
-
- static F_Tok stateF_afterStdOperator[] =
- { &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_LeftBracket,
- &PE_Function::On_afterOperator_Std_LeftBracket,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator };
- static INT16 stateT_afterStdOperator[] =
- { Tid_Operator,
- Tid_ArrayBracket_Left,
- Tid_Bracket_Left,
- Tid_Comma,
- Tid_Assign,
- Tid_Less,
- Tid_Greater,
- Tid_Asterix,
- Tid_AmpersAnd };
-
- static F_Tok stateF_afterStdOperatorLeftBracket[] =
- { &PE_Function::On_afterStdOperatorLeftBracket_RightBracket,
- &PE_Function::On_afterStdOperatorLeftBracket_RightBracket };
- static INT16 stateT_afterStdOperatorLeftBracket[] =
- { Tid_ArrayBracket_Right,
- Tid_Bracket_Right };
-
- static F_Tok stateF_afterCastOperator[] =
- { &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type };
- static INT16 stateT_afterCastOperator[] =
- { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
- Tid_const,
- Tid_volatile,
- Tid_DoubleColon,
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_afterName[] = { &PE_Function::On_afterName_Bracket_Left };
- static INT16 stateT_afterName[] = { Tid_Bracket_Left };
-
- static F_Tok stateF_expectParameterSeparator[] =
- { &PE_Function::On_expectParameterSeparator_BracketRight,
- &PE_Function::On_expectParameterSeparator_Comma };
- static INT16 stateT_expectParameterSeparator[] =
- { Tid_Bracket_Right,
- Tid_Comma };
-
- static F_Tok stateF_afterParameters[] = { &PE_Function::On_afterParameters_const,
- &PE_Function::On_afterParameters_volatile,
- &PE_Function::On_afterParameters_throw,
- &PE_Function::On_afterParameters_SwBracket_Left,
- &PE_Function::On_afterParameters_Semicolon,
- &PE_Function::On_afterParameters_Comma,
- &PE_Function::On_afterParameters_Colon,
- &PE_Function::On_afterParameters_Assign };
- static INT16 stateT_afterParameters[] = { Tid_const,
- Tid_volatile,
- Tid_throw,
- Tid_SwBracket_Left,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Colon,
- Tid_Assign };
-
- static F_Tok stateF_afterThrow[] = { &PE_Function::On_afterThrow_Bracket_Left };
- static INT16 stateT_afterThrow[] = { Tid_Bracket_Left };
-
- static F_Tok stateF_expectExceptionSeparator[] =
- { &PE_Function::On_expectExceptionSeparator_BracketRight,
- &PE_Function::On_expectExceptionSeparator_Comma };
- static INT16 stateT_expectExceptionSeparator[] =
- { Tid_Bracket_Right,
- Tid_Comma };
-
- static F_Tok stateF_afterExceptions[] = { &PE_Function::On_afterExceptions_SwBracket_Left,
- &PE_Function::On_afterExceptions_Semicolon,
- &PE_Function::On_afterExceptions_Comma,
- &PE_Function::On_afterExceptions_Colon,
- &PE_Function::On_afterExceptions_Assign };
- static INT16 stateT_afterExceptions[] = { Tid_SwBracket_Left,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Colon,
- Tid_Assign };
-
- static F_Tok stateF_expectZero[] = { &PE_Function::On_expectZero_Constant };
- static INT16 stateT_expectZero[] = { Tid_Constant };
-
- static F_Tok stateF_inImplementation[] =
- { &PE_Function::On_inImplementation_SwBracket_Left,
- &PE_Function::On_inImplementation_SwBracket_Right };
- static INT16 stateT_inImplementation[] =
- { Tid_SwBracket_Left,
- Tid_SwBracket_Right };
-
- SEMPARSE_CREATE_STATUS(PE_Function, afterStdOperator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterStdOperatorLeftBracket, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterCastOperator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, expectParameterSeparator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterParameters, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterThrow, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, expectExceptionSeparator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterExceptions, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, expectZero, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, inImplementation, On_inImplementation_Default );
-}
-
-void
-PE_Function::InitData()
-{
- pStati->SetCur( afterName ),
- nResult = 0;
- bResult_WithImplementation = false;
- aName.seekp(0);
- eVirtuality = ary::cpp::VIRTUAL_none;
- eConVol = ary::cpp::CONVOL_none;
- aFlags.Reset();
- nReturnType = 0;
- csv::erase_container(aParameters);
- csv::erase_container(aExceptions);
- bThrow = false;
-}
-
-void
-PE_Function::TransferData()
-{
- String sName( aName.c_str() );
- ary::cpp::Function *
- pFunction = Env().AryGate().Ces().Store_Operation(
- Env().Context(),
- sName,
- nReturnType,
- aParameters,
- eVirtuality,
- eConVol,
- aFlags,
- bThrow,
- aExceptions );
- if (pFunction != 0)
- {
- // KORR_FUTURE: How to handle differing documentation?
-
- Dyn< StringVector >
- pTplParams ( Env().Get_CurTemplateParameters() );
- if ( pTplParams )
- {
- for ( StringVector::const_iterator it = pTplParams->begin();
- it != pTplParams->end();
- ++it )
- {
- pFunction->Add_TemplateParameterType( *it, ary::cpp::Type_id(0) );
- } // end for
- }
-
- Env().Event_Store_Function(*pFunction);
- }
-
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Function::Hdl_SyntaxError(const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Function::SpInit_CastOperatorType()
-{
- pSpuCastOperatorType->Child().Init_AsCastOperatorType();
-}
-
-void
-PE_Function::SpReturn_Parameter()
-{
- pStati->SetCur(expectParameterSeparator);
-
- ary::cpp::Type_id nParamType = pSpuParameter->Child().Result_FrontType();
- if ( nParamType.IsValid() ) // Check, if there was a parameter, or only the closing ')'.
- {
- aParameters.push_back( pSpuParameter->Child().Result_ParamInfo() );
- }
-}
-
-void
-PE_Function::SpReturn_Exception()
-{
- pStati->SetCur(expectExceptionSeparator);
-
- ary::cpp::Type_id
- nException = pSpuException->Child().Result_Type().TypeId();
- if ( nException.IsValid() AND pSpuException->Child().Result_KindOf() == PE_Type::is_type )
- {
- aExceptions.push_back( nException );
- }
-}
-
-void
-PE_Function::SpReturn_CastOperatorType()
-{
- pStati->SetCur(afterName);
-
- Env().AryGate().Types().Get_TypeText(
- aName, pSpuCastOperatorType->Child().Result_Type().TypeId() );
-}
-
-void
-PE_Function::On_afterOperator_Std_Operator(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterName);
-
- if ( 'a' <= *i_sText AND *i_sText <= 'z' )
- aName << ' ';
- aName << i_sText;
-}
-
-void
-PE_Function::On_afterOperator_Std_LeftBracket(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterStdOperatorLeftBracket);
-
- aName << i_sText;
-}
-
-void
-PE_Function::On_afterStdOperatorLeftBracket_RightBracket(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterName);
-
- aName << i_sText;
-}
-
-void
-PE_Function::On_afterOperator_Cast_Type(const char *)
-{
- pSpuCastOperatorType->Push(not_done);
-}
-
-void
-PE_Function::On_afterName_Bracket_Left(const char *)
-{
- pSpuParameter->Push(done);
-}
-
-void
-PE_Function::On_expectParameterSeparator_BracketRight(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterParameters);
-}
-
-void
-PE_Function::On_expectParameterSeparator_Comma(const char *)
-{
- pSpuParameter->Push(done);
-}
-
-void
-PE_Function::On_afterParameters_const(const char *)
-{
- SetTokenResult(done,stay);
- eConVol = static_cast<E_ConVol>(
- static_cast<int>(eConVol) | static_cast<int>(ary::cpp::CONVOL_const) );
-}
-
-void
-PE_Function::On_afterParameters_volatile(const char *)
-{
- SetTokenResult(done,stay);
- eConVol = static_cast<E_ConVol>(
- static_cast<int>(eConVol) | static_cast<int>(ary::cpp::CONVOL_volatile) );
-}
-
-void
-PE_Function::On_afterParameters_throw(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterThrow);
- bThrow = true;
-}
-
-void
-PE_Function::On_afterParameters_SwBracket_Left(const char *)
-{
- EnterImplementation(1);
-}
-
-void
-PE_Function::On_afterParameters_Semicolon(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterParameters_Comma(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterParameters_Colon(const char *)
-{
- EnterImplementation(0);
-}
-
-void
-PE_Function::On_afterParameters_Assign(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(expectZero);
-}
-
-void
-PE_Function::On_afterThrow_Bracket_Left(const char *)
-{
- pSpuException->Push(done);
-}
-
-void
-PE_Function::On_expectExceptionSeparator_BracketRight(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterExceptions);
-}
-
-void
-PE_Function::On_expectExceptionSeparator_Comma(const char *)
-{
- pSpuException->Push(done);
-}
-
-void
-PE_Function::On_afterExceptions_SwBracket_Left(const char *)
-{
- EnterImplementation(1);
-}
-
-void
-PE_Function::On_afterExceptions_Semicolon(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterExceptions_Comma(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterExceptions_Colon(const char *)
-{
- EnterImplementation(0);
-}
-
-void
-PE_Function::On_afterExceptions_Assign(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(expectZero);
-}
-
-void
-PE_Function::On_expectZero_Constant(const char * i_sText)
-{
- if ( strcmp(i_sText,"0") != 0 )
- Hdl_SyntaxError(i_sText);
-
- SetTokenResult(done,stay);
- pStati->SetCur(afterExceptions);
-
- eVirtuality = ary::cpp::VIRTUAL_abstract;
-}
-
-void
-PE_Function::On_inImplementation_SwBracket_Left(const char *)
-{
- SetTokenResult(done,stay);
- nBracketCounterInImplementation++;
-}
-
-void
-PE_Function::On_inImplementation_SwBracket_Right(const char *)
-{
- nBracketCounterInImplementation--;
- if (nBracketCounterInImplementation == 0)
- {
- SetTokenResult(done,pop_success);
- }
- else
- {
- SetTokenResult(done,stay);
- }
-}
-
-void
-PE_Function::On_inImplementation_Default(const char *)
-{
- SetTokenResult(done,stay);
-}
-
-void
-PE_Function::EnterImplementation( intt i_nBracketCountStart )
-{
- SetTokenResult(done,stay);
- pStati->SetCur(inImplementation);
-
- bResult_WithImplementation = true;
- nBracketCounterInImplementation = i_nBracketCountStart;
- if ( Env().Context().CurClass() != 0 )
- {
- aFlags.SetInline();
- }
-}
-
-
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_funct.hxx b/autodoc/source/parser/cpp/pe_funct.hxx
deleted file mode 100644
index 647180ca..00000000
--- a/autodoc/source/parser/cpp/pe_funct.hxx
+++ /dev/null
@@ -1,284 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_FUNCT_HXX
-#define ADC_CPP_PE_FUNCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
- // PARAMETERS
-
-
-namespace ary
-{
-namespace cpp
-{
-class Function;
-struct S_VariableInfo;
-}
-}
-
-namespace cpp
-{
-
-class PE_Type;
-class PE_Parameter;
-
-class PE_Function : public Cpp_PE
-{
- public:
- enum E_State
- {
- afterStdOperator, // if initializes as operator
- afterStdOperatorLeftBracket,
- // if initializes as operator with ( or [
- afterCastOperator, // if initializes as operator
- afterName, // undecided
- expectParameterSeparator, //
- afterParameters, // before const, volatile throw or = 0.
- afterThrow, // expect (
- expectExceptionSeparator, //
- afterExceptions, // = 0 oder ; oder ,
- expectZero, // after '='
- inImplementation, // after {
- size_of_states
- };
- typedef ary::cpp::E_Protection E_Protection;
- typedef ary::cpp::E_Virtuality E_Virtuality;
- typedef ary::cpp::E_ConVol E_ConVol;
-
- PE_Function(
- Cpp_PE * i_pParent );
- ~PE_Function();
-
- void Init_Std(
- const String & i_sName,
- ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_Ctor(
- const String & i_sName,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_Dtor(
- const String & i_sName,
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_CastOperator(
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_NormalOperator(
- ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
-
- ary::cpp::Ce_id Result_Id() const;
- bool Result_WithImplementation() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- typedef SubPe< PE_Function, PE_Type > SP_Type;
- typedef SubPeUse< PE_Function, PE_Type > SPU_Type;
- typedef SubPe< PE_Function, PE_Parameter> SP_Parameter;
- typedef SubPeUse<PE_Function, PE_Parameter> SPU_Parameter;
-
- typedef std::vector<ary::cpp::S_Parameter> ParameterList;
- typedef std::vector<ary::cpp::Type_id> ExceptionTypeList;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char * i_sText);
-
- void SpInit_CastOperatorType();
-
- void SpReturn_Parameter();
- void SpReturn_Exception();
- void SpReturn_CastOperatorType();
-
- void On_afterOperator_Std_Operator(const char * i_sText); // Operator+() etc.
- void On_afterOperator_Std_LeftBracket(const char * i_sText); // operator [] or ()
- void On_afterStdOperatorLeftBracket_RightBracket(const char * i_sText);
- void On_afterOperator_Cast_Type(const char * i_sText); // Type
-
- void On_afterName_Bracket_Left(const char * i_sText);
-
- void On_expectParameterSeparator_BracketRight(const char * i_sText);
- void On_expectParameterSeparator_Comma(const char * i_sText);
-
- void On_afterParameters_const(const char * i_sText);
- void On_afterParameters_volatile(const char * i_sText);
- void On_afterParameters_throw(const char * i_sText);
- void On_afterParameters_SwBracket_Left(const char * i_sText);
- void On_afterParameters_Semicolon(const char * i_sText);
- void On_afterParameters_Comma(const char * i_sText);
- void On_afterParameters_Colon(const char * i_sText);
- void On_afterParameters_Assign(const char * i_sText);
-
- void On_afterThrow_Bracket_Left(const char * i_sText);
-
- void On_expectExceptionSeparator_BracketRight(const char * i_sText);
- void On_expectExceptionSeparator_Comma(const char * i_sText);
-
- void On_afterExceptions_SwBracket_Left(const char * i_sText);
- void On_afterExceptions_Semicolon(const char * i_sText);
- void On_afterExceptions_Comma(const char * i_sText);
- void On_afterExceptions_Colon(const char * i_sText);
- void On_afterExceptions_Assign(const char * i_sText);
-
- void On_expectZero_Constant(const char * i_sText);
-
- void On_inImplementation_SwBracket_Left(const char * i_sText);
- void On_inImplementation_SwBracket_Right(const char * i_sText);
- void On_inImplementation_Default(const char * i_sText);
-
- void PerformFinishingPunctuation();
- void EnterImplementation(
- intt i_nBracketCountStart ); /// 1 normally, 0 in initialisation section of c'tors.
-
- // DATA
- Dyn< PeStatusArray<PE_Function> >
- pStati;
-
- Dyn< SP_Parameter > pSpParameter;
- Dyn< SPU_Parameter> pSpuParameter;
- Dyn< SP_Type > pSpType;
- Dyn< SPU_Type > pSpuException;
- Dyn< SPU_Type > pSpuCastOperatorType; // in "operator int()" or "operator ThatClass *()"
-
- ary::cpp::Ce_id nResult;
- bool bResult_WithImplementation; // Necessary for the parent ParseEnvironment
- // to know, there is no semicolon or comma following.
- // Pre results
- StreamStr aName;
- E_Virtuality eVirtuality;
- E_ConVol eConVol;
- ary::cpp::FunctionFlags
- aFlags;
- ary::cpp::Type_id nReturnType;
- ParameterList aParameters;
- ExceptionTypeList aExceptions;
- bool bThrow; // Indicates, if there is a throw - important, if there are 0 exceptions listed.
- intt nBracketCounterInImplementation;
-};
-
-
-
-
-// IMPLEMENTATION
-inline bool
-PE_Function::Result_WithImplementation() const
- { return bResult_WithImplementation; }
-
-
-
-
-} // namespace cpp
-#endif
-
-
-
-
-
-/* // Overview of Stati
-
-Undecided
----------
-
-start // vor und während storage class specifiern
-
-->Typ
-
-expectName // Typ ist da
-
-afterName
-
-
-
-
-Variable
---------
-
-start // vor und während storage class specifiern
-
-->Typ
-
-expectName // Typ ist da -> im Falle von '(': notyetimplemented
-afterName
-
-expectSize // after [
-expectFinish
- // vor ; oder ,
-expectNextVarName // anders als bei expectName kann hier auch * oder & kommen
-
-
-
-
-
-Function
---------
-
-start // vor und während storage class specifiern
-
-->Typ
-
-expectName // Typ ist da
-expectBracket // Nach Name
-expectParameter // nach ( oder ,
--> Parameter
-after Parameters // before const, volatile throw or = 0.
-after throw // expect (
-expectException // after (
-after exceptions // = 0 oder ; oder ,
-
-
-expectNextVarName // anders als bei expectName kann hier auch * oder & kommen
-
-
-
-
-
-
-
-*/
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_ignor.cxx b/autodoc/source/parser/cpp/pe_ignor.cxx
deleted file mode 100644
index 8453c8d6..00000000
--- a/autodoc/source/parser/cpp/pe_ignor.cxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_ignor.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace cpp {
-
-
-
-PE_Ignore::PE_Ignore( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- nBracketCounter(0),
- bBlockOpened(false)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_Ignore::~PE_Ignore()
-{
-}
-
-void
-PE_Ignore::Call_Handler( const cpp::Token & i_rTok )
-{
- if ( NOT bBlockOpened )
- {
- switch (i_rTok.TypeId())
- {
- case Tid_SwBracket_Left: SetTokenResult(done, stay);
- nBracketCounter++;
- bBlockOpened = true;
- break;
- case Tid_Semicolon: SetTokenResult(done, pop_success);
- break;
- default:
- SetTokenResult(done, stay);
- } // end switch
- }
- else if ( nBracketCounter > 0 )
- {
- SetTokenResult(done, stay);
-
- switch (i_rTok.TypeId())
- {
- case Tid_SwBracket_Left: nBracketCounter++;
- break;
- case Tid_SwBracket_Right: nBracketCounter--;
- break;
- } // end switch
- }
- else if ( i_rTok.TypeId() == Tid_Semicolon )
- {
- SetTokenResult(done, pop_success);
- }
- else
- {
- SetTokenResult(not_done, pop_success);
- }
-}
-
-void
-PE_Ignore::Setup_StatusFunctions()
-{
- // Does nothing.
-}
-
-void
-PE_Ignore::InitData()
-{
- nBracketCounter = 0;
- bBlockOpened = false;
-}
-
-void
-PE_Ignore::TransferData()
-{
- // Does nothing.
-}
-
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_ignor.hxx b/autodoc/source/parser/cpp/pe_ignor.hxx
deleted file mode 100644
index b9a1cec2..00000000
--- a/autodoc/source/parser/cpp/pe_ignor.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_IGNOR_HXX
-#define ADC_CPP_PE_IGNOR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cpp_pe.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class PE_Ignore : public Cpp_PE
-{
- public:
- PE_Ignore(
- Cpp_PE * i_pParent );
- ~PE_Ignore();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
-
- // DATA
- uintt nBracketCounter;
- bool bBlockOpened;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace cpp
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_namsp.cxx b/autodoc/source/parser/cpp/pe_namsp.cxx
deleted file mode 100644
index 741699a2..00000000
--- a/autodoc/source/parser/cpp/pe_namsp.cxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <pe_namsp.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <all_toks.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <semantic/callf.hxx>
-#include "x_parse.hxx"
-
-
-
-
-namespace cpp
-{
-
-PE_Namespace::PE_Namespace( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Namespace> ),
- // sLocalname
- bPush(false)
-{
- Setup_StatusFunctions();
-}
-
-PE_Namespace::~PE_Namespace()
-{
-}
-
-void
-PE_Namespace::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Namespace>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Namespace::On_start_Identifier,
- &PE_Namespace::On_start_SwBracket_Left };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_SwBracket_Left };
- static F_Tok stateF_gotName[] = { &PE_Namespace::On_gotName_SwBracket_Left,
- &PE_Namespace::On_gotName_Assign };
- static INT16 stateT_gotName[] = { Tid_SwBracket_Left,
- Tid_Assign };
- static F_Tok stateF_expectSemicolon[] = { &PE_Namespace::On_expectSemicolon_Semicolon };
- static INT16 stateT_expectSemicolon[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Namespace, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Namespace, gotName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Namespace, expectSemicolon, Hdl_SyntaxError);
-}
-
-void
-PE_Namespace::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Namespace::InitData()
-{
- pStati->SetCur(start);
- sLocalName = "";
- bPush = false;
-}
-
-void
-PE_Namespace::TransferData()
-{
- if (bPush)
- {
- ary::cpp::Namespace &
- rNew = Env().AryGate().Ces().CheckIn_Namespace(
- Env().Context(),
- sLocalName );
- Env().OpenNamespace(rNew);
- }
-}
-
-void
-PE_Namespace::Hdl_SyntaxError( const char * i_sText)
-{
- throw X_Parser( X_Parser::x_UnexpectedToken,
- i_sText != 0 ? i_sText : "",
- Env().CurFileName(),
- Env().LineCount() );
-}
-
-void
-PE_Namespace::On_start_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotName);
-
- sLocalName = i_sText;
-}
-
-void
-PE_Namespace::On_start_SwBracket_Left(const char * )
-{
- SetTokenResult(done, pop_success);
- pStati->SetCur(size_of_states);
-
- sLocalName = ""; // Anonymous namespace, a name is created in
- // Gate().CheckIn_Namespace() .
-
- bPush = true;
-}
-
-void
-PE_Namespace::On_gotName_SwBracket_Left(const char * )
-{
- SetTokenResult(done, pop_success);
- pStati->SetCur(size_of_states);
-
- bPush = true;
-}
-
-void
-PE_Namespace::On_gotName_Assign(const char * )
-{
- // KORR_FUTURE
- Hdl_SyntaxError(0);
-}
-
-void
-PE_Namespace::On_expectSemicolon_Semicolon(const char * )
-{
- SetTokenResult(done,pop_success);
- pStati->SetCur(size_of_states);
-}
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_namsp.hxx b/autodoc/source/parser/cpp/pe_namsp.hxx
deleted file mode 100644
index 386aded5..00000000
--- a/autodoc/source/parser/cpp/pe_namsp.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_NAMSP_HXX
-#define ADC_CPP_PE_NAMSP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_pe.hxx>
- // PARAMETERS
-
-namespace ary
-{
-namespace cpp
-{
-class Namespace;
-}
-}
-
-
-namespace cpp
-{
-
-
-class PE_Namespace : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- gotName,
- expectSemicolon, /// after namespace assignment
- size_of_states
- };
- PE_Namespace(
- Cpp_PE * i_pParent );
- ~PE_Namespace();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- ary::cpp::Namespace *
- Result_OpenedNamespace() const;
- private:
- void Setup_StatusFunctions();
-
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void On_start_Identifier(const char * i_sText);
- void On_start_SwBracket_Left(const char * i_sText);
- void On_gotName_SwBracket_Left(const char * i_sText);
- void On_gotName_Assign(const char * i_sText);
- void On_expectSemicolon_Semicolon(const char * i_sText);
-
- // DATA
- Dyn< PeStatusArray<PE_Namespace> >
- pStati;
-
- String sLocalName;
- bool bPush;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_param.cxx b/autodoc/source/parser/cpp/pe_param.cxx
deleted file mode 100644
index c00f81db..00000000
--- a/autodoc/source/parser/cpp/pe_param.cxx
+++ /dev/null
@@ -1,282 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_param.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include "pe_type.hxx"
-#include "pe_vari.hxx"
-
-
-namespace cpp {
-
-
-
-//*********************** PE_Parameter ***********************//
-
-
-PE_Parameter::PE_Parameter( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Parameter> )
- // pSpType,
- // pSpuType,
- // pSpVariable,
- // pSpuVariable,
- // aResultParamInfo
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpuType = new SPU_Type(*pSpType, &PE_Parameter::SpInit_Type, &PE_Parameter::SpReturn_Type);
- pSpVariable = new SP_Variable(*this);
- pSpuVariable = new SPU_Variable(*pSpVariable, &PE_Parameter::SpInit_Variable, &PE_Parameter::SpReturn_Variable);
-}
-
-PE_Parameter::~PE_Parameter()
-{
-}
-
-void
-PE_Parameter::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Parameter::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Parameter>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
-
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Bracket_Right,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Ellipse,
-
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
-
- Tid_const,
- Tid_volatile,
- Tid_Bracket_Right,
- Tid_DoubleColon,
- Tid_Ellipse,
-
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_expectName[] = { &PE_Parameter::On_expectName_Identifier,
- &PE_Parameter::On_expectName_ArrayBracket_Left,
- &PE_Parameter::On_expectName_Bracket_Right,
- &PE_Parameter::On_expectName_Comma,
- &PE_Parameter::On_afterName_Assign };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_ArrayBracket_Left,
- Tid_Bracket_Right,
- Tid_Comma,
- Tid_Assign };
- static F_Tok stateF_afterName[] = { &PE_Parameter::On_afterName_ArrayBracket_Left,
- &PE_Parameter::On_afterName_Bracket_Right,
- &PE_Parameter::On_afterName_Comma,
- &PE_Parameter::On_afterName_Assign };
- static INT16 stateT_afterName[] = { Tid_ArrayBracket_Left,
- Tid_Bracket_Right,
- Tid_Comma,
- Tid_Assign };
- static F_Tok stateF_finished[] = { &PE_Parameter::On_finished_Comma,
- &PE_Parameter::On_finished_Bracket_Right };
- static INT16 stateT_finished[] = { Tid_Bracket_Right,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Parameter, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Parameter, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Parameter, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Parameter, finished, Hdl_SyntaxError);
-}
-
-
-void
-PE_Parameter::InitData()
-{
- pStati->SetCur(start);
- aResultParamInfo.Empty();
-}
-
-void
-PE_Parameter::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Parameter::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Parameter::SpInit_Type()
-{
- // Does nothing.
-}
-
-void
-PE_Parameter::SpInit_Variable()
-{
- // Does nothing.
-}
-
-void
-PE_Parameter::SpReturn_Type()
-{
- aResultParamInfo.nType = pSpuType->Child().Result_Type().Id();
- pStati->SetCur(expectName);
-}
-
-void
-PE_Parameter::SpReturn_Variable()
-{
- if (pSpuVariable->Child().Result_Pattern() > 0)
- {
- aResultParamInfo.sSizeExpression = pSpuVariable->Child().Result_SizeExpression();
- aResultParamInfo.sInitExpression = pSpuVariable->Child().Result_InitExpression();
- }
-}
-
-void
-PE_Parameter::On_start_Type(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_Parameter::On_start_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_start_Ellipse(const char *)
-{
- SetTokenResult(done, pop_success);
-
- aResultParamInfo.nType = Env().AryGate().Types().Tid_Ellipse();
-}
-
-void
-PE_Parameter::On_expectName_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-
- aResultParamInfo.sName = i_sText;
-}
-
-void
-PE_Parameter::On_expectName_ArrayBracket_Left(const char * i_sText)
-{
- On_afterName_ArrayBracket_Left(i_sText);
-}
-
-void
-PE_Parameter::On_expectName_Bracket_Right(const char * i_sText)
-{
- On_afterName_Bracket_Right(i_sText);
-}
-
-void
-PE_Parameter::On_expectName_Comma(const char * i_sText)
-{
- On_afterName_Comma(i_sText);
-}
-
-void
-PE_Parameter::On_afterName_ArrayBracket_Left(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_Parameter::On_afterName_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_afterName_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_afterName_Assign(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_Parameter::On_finished_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_finished_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_param.hxx b/autodoc/source/parser/cpp/pe_param.hxx
deleted file mode 100644
index a4312b41..00000000
--- a/autodoc/source/parser/cpp/pe_param.hxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_PARAM_HXX
-#define ADC_CPP_PE_PARAM_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-
-
-
-
-namespace cpp
-{
- class PE_Type;
- class PE_Variable;
-
-
-
-
-class PE_Parameter : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expectName,
- afterName,
- finished,
- size_of_states
- };
- typedef ary::cpp::S_Parameter S_ParamInfo;
-
- explicit PE_Parameter(
- Cpp_PE * i_pParent );
- ~PE_Parameter();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- ary::cpp::Type_id Result_FrontType() const;
- const S_ParamInfo & Result_ParamInfo() const;
-
- private:
- typedef SubPe< PE_Parameter, PE_Type > SP_Type;
- typedef SubPeUse< PE_Parameter, PE_Type > SPU_Type;
- typedef SubPe< PE_Parameter, PE_Variable > SP_Variable;
- typedef SubPeUse< PE_Parameter, PE_Variable > SPU_Variable;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpInit_Type(); // Type and Ignore.
- void SpInit_Variable();
- void SpReturn_Type();
- void SpReturn_Variable();
-
- void On_start_Type(const char * i_sText);
- void On_start_Bracket_Right(const char * i_sText);
- void On_start_Ellipse(const char * i_sText);
-
- void On_expectName_Identifier(const char * i_sText);
- void On_expectName_ArrayBracket_Left(const char * i_sText);
- void On_expectName_Bracket_Right(const char * i_sText);
- void On_expectName_Comma(const char * i_sText);
-
- void On_afterName_ArrayBracket_Left(const char * i_sText);
- void On_afterName_Bracket_Right(const char * i_sText);
- void On_afterName_Comma(const char * i_sText);
- void On_afterName_Assign(const char * i_sText);
-
- void On_finished_Bracket_Right(const char * i_sText);
- void On_finished_Comma(const char * i_sText);
-
- // DATA
- Dyn< PeStatusArray<PE_Parameter> >
- pStati;
-
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType;
- Dyn<SP_Variable> pSpVariable;
- Dyn<SPU_Variable> pSpuVariable;
-
- S_ParamInfo aResultParamInfo;
-};
-
-
-
-
-// IMPLEMENTATION
-inline ary::cpp::Type_id
-PE_Parameter::Result_FrontType() const
-{
- return aResultParamInfo.nType;
-}
-
-inline const PE_Parameter::S_ParamInfo &
-PE_Parameter::Result_ParamInfo() const
-{
- return aResultParamInfo;
-}
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tpltp.cxx b/autodoc/source/parser/cpp/pe_tpltp.cxx
deleted file mode 100644
index 9c6986f0..00000000
--- a/autodoc/source/parser/cpp/pe_tpltp.cxx
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_tpltp.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-
-
-
-namespace cpp {
-
-
-
-PE_TemplateTop::PE_TemplateTop( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_TemplateTop> ),
- // aResult_Parameters,
- bCurIsConstant(false)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_TemplateTop::~PE_TemplateTop()
-{
-}
-
-void
-PE_TemplateTop::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_TemplateTop::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_TemplateTop>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_TemplateTop::On_start_Less };
- static INT16 stateT_start[] = { Tid_Less };
-
- static F_Tok stateF_expect_qualifier[]= { &PE_TemplateTop::On_expect_qualifier_ClassOrTypename,
- &PE_TemplateTop::On_expect_qualifier_Greater,
- &PE_TemplateTop::On_expect_qualifier_ClassOrTypename };
- static INT16 stateT_expect_qualifier[]= { Tid_class,
- Tid_Greater,
- Tid_typename };
-
- static F_Tok stateF_expect_name[] = { &PE_TemplateTop::On_expect_name_Identifier };
- static INT16 stateT_expect_name[] = { Tid_Identifier };
-
- static F_Tok stateF_expect_separator[]= { &PE_TemplateTop::On_expect_separator_Comma,
- &PE_TemplateTop::On_expect_separator_Greater };
- static INT16 stateT_expect_separator[]= { Tid_Comma,
- Tid_Greater };
-
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, expect_qualifier, On_expect_qualifier_Other);
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, expect_name, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, expect_separator, Hdl_SyntaxError);
-}
-
-void
-PE_TemplateTop::InitData()
-{
- pStati->SetCur(start);
- csv::erase_container(aResult_Parameters);
- bCurIsConstant = false;
-}
-
-void
-PE_TemplateTop::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_TemplateTop::Hdl_SyntaxError(const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_TemplateTop::On_start_Less( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_qualifier);
-}
-
-void
-PE_TemplateTop::On_expect_qualifier_ClassOrTypename( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_name);
-}
-
-void
-PE_TemplateTop::On_expect_qualifier_Greater(const char *)
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_TemplateTop::On_expect_qualifier_Other( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_name);
-
- bCurIsConstant = true;
-}
-
-void
-PE_TemplateTop::On_expect_name_Identifier( const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_separator);
-
- StreamLock sl(50);
- if ( NOT bCurIsConstant )
- {
- String sText( sl() << "typename " << i_sText << c_str );
- aResult_Parameters.push_back(sText);
- }
- else //
- {
- String sText( sl() << "constant " << i_sText << c_str );
- aResult_Parameters.push_back(sText);
- bCurIsConstant = false;
- } // endif
-}
-
-void
-PE_TemplateTop::On_expect_separator_Comma( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_qualifier);
-}
-
-void
-PE_TemplateTop::On_expect_separator_Greater( const char *)
-{
- SetTokenResult(done, pop_success);
-}
-
-
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tpltp.hxx b/autodoc/source/parser/cpp/pe_tpltp.hxx
deleted file mode 100644
index 99c6545b..00000000
--- a/autodoc/source/parser/cpp/pe_tpltp.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_TPLTP_HXX
-#define ADC_CPP_PE_TPLTP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-
-
-class PE_TemplateTop : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expect_qualifier,
- expect_name,
- expect_separator,
- size_of_states
- };
- PE_TemplateTop(
- Cpp_PE * i_pParent );
- ~PE_TemplateTop();
-
- const StringVector &
- Result_Parameters() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char *);
-
-
- void On_start_Less(const char *);
-
- void On_expect_qualifier_ClassOrTypename(const char *);
- void On_expect_qualifier_Greater(const char *);
- void On_expect_qualifier_Other(const char *);
-
- void On_expect_name_Identifier(const char *);
-
- void On_expect_separator_Comma(const char *);
- void On_expect_separator_Greater(const char *);
-
- // DATA
- Dyn< PeStatusArray<PE_TemplateTop> >
- pStati;
-
- StringVector
- aResult_Parameters;
- bool bCurIsConstant;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const StringVector &
-PE_TemplateTop::Result_Parameters() const
- { return aResult_Parameters; }
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tydef.cxx b/autodoc/source/parser/cpp/pe_tydef.cxx
deleted file mode 100644
index 01c49816..00000000
--- a/autodoc/source/parser/cpp/pe_tydef.cxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_tydef.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <all_toks.hxx>
-#include "pe_type.hxx"
-
-
-namespace cpp {
-
-
-PE_Typedef::PE_Typedef(Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Typedef> ),
- // pSpType,
- // pSpuType,
- // sName
- nType(0)
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpuType = new SPU_Type(*pSpType, 0, &PE_Typedef::SpReturn_Type);
-}
-
-PE_Typedef::~PE_Typedef()
-{
-}
-
-void
-PE_Typedef::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Typedef::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Typedef>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Typedef::On_start_typedef };
- static INT16 stateT_start[] = { Tid_typedef };
-
- static F_Tok stateF_expectName[] = { &PE_Typedef::On_expectName_Identifier };
- static INT16 stateT_expectName[] = { Tid_Identifier };
-
- static F_Tok stateF_afterName[] = { &PE_Typedef::On_afterName_Semicolon };
- static INT16 stateT_afterName[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Typedef, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Typedef, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Typedef, afterName, Hdl_SyntaxError);
-}
-
-void
-PE_Typedef::InitData()
-{
- pStati->SetCur(start);
-
- sName.clear();
- nType = 0;
-}
-
-void
-PE_Typedef::TransferData()
-{
- pStati->SetCur(size_of_states);
-
- ary::cpp::Typedef &
- rTypedef = Env().AryGate().Ces().Store_Typedef(
- Env().Context(), sName, nType );
- Env().Event_Store_Typedef(rTypedef);
-}
-
-void
-PE_Typedef::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Typedef::SpReturn_Type()
-{
- pStati->SetCur(expectName);
-
- nType = pSpuType->Child().Result_Type().Id();
-}
-
-void
-PE_Typedef::On_start_typedef( const char * )
-{
- pSpuType->Push(done);
-}
-
-void
-PE_Typedef::On_expectName_Identifier( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-
- sName = i_sText;
-}
-
-void
-PE_Typedef::On_afterName_Semicolon( const char * )
-{
- SetTokenResult(done, pop_success);
-}
-
-} // namespace cpp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tydef.hxx b/autodoc/source/parser/cpp/pe_tydef.hxx
deleted file mode 100644
index 12b4749b..00000000
--- a/autodoc/source/parser/cpp/pe_tydef.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_TYDEF_HXX
-#define ADC_CPP_PE_TYDEF_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-
-
-namespace cpp
-{
- class PE_Type;
-
-
-
-
-class PE_Typedef : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expectName,
- afterName,
- size_of_states
- };
- PE_Typedef(
- Cpp_PE * i_pParent );
- ~PE_Typedef();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- typedef SubPe< PE_Typedef, PE_Type > SP_Type;
- typedef SubPeUse< PE_Typedef, PE_Type> SPU_Type;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_Type();
-
- void On_start_typedef( const char * );
- void On_expectName_Identifier( const char * );
- void On_afterName_Semicolon( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Typedef> >
- pStati;
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType;
-
- String sName;
- ary::cpp::Type_id nType;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_type.cxx b/autodoc/source/parser/cpp/pe_type.cxx
deleted file mode 100644
index 69f84859..00000000
--- a/autodoc/source/parser/cpp/pe_type.cxx
+++ /dev/null
@@ -1,556 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_type.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/inpcontx.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include "pe_class.hxx"
-#include "pe_enum.hxx"
-#include <x_parse.hxx>
-
-
-
-class NullType : public ary::cpp::Type
-{
- private:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- virtual ary::ClassId
- get_AryClass() const;
- virtual bool inq_IsConst() const;
- virtual void inq_Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const ary::cpp::Gate &
- i_rGate ) const;
-};
-
-void
-NullType::do_Accept(csv::ProcessorIfc & ) const
-{
- // Does nothing.
-}
-
-ary::ClassId
-NullType::get_AryClass() const
-{
- return 0;
-}
-
-bool
-NullType::inq_IsConst() const
-{
- return true;
-}
-
-void
-NullType::inq_Get_Text( StreamStr & ,
- StreamStr & ,
- StreamStr & ,
- const ary::cpp::Gate & ) const
-{
- // Does nothing.
-}
-
-
-
-
-namespace cpp
-{
-
-
-inline bool
-PE_Type::IsType() const
- { return eResult_KindOf == is_type; }
-
-
-PE_Type::PE_Type( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Type> ),
- pSpType(0),
- pSpuType_TemplateParameter(0),
- // pSpClass,
- // pSpuClass,
- // pSpEnum,
- // pSpuEnum,
- pType(0),
- pCurTemplate_ParameterList(0),
- // sOwningClassName,
- // sParsedClass_Name,
- pResult_Type(0),
- eResult_KindOf(is_none),
- bIsCastOperatorType(false)
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpClass = new SP_Class(*this);
- pSpEnum = new SP_Enum(*this);
-
- pSpuType_TemplateParameter
- = new SPU_Type( *pSpType, 0,
- &PE_Type::SpReturn_Type_TemplateParameter );
- pSpuClass = new SPU_Class( *pSpClass, 0,
- & PE_Type::SpReturn_Class );
- pSpuEnum = new SPU_Enum( *pSpEnum, 0,
- & PE_Type::SpReturn_Enum );
-}
-
-PE_Type::~PE_Type()
-{
-}
-
-void
-PE_Type::Init_AsCastOperatorType()
-{
- bIsCastOperatorType = true;
-}
-
-void
-PE_Type::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Type::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Type>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Type::On_start_Identifier,
- &PE_Type::On_start_class,
- &PE_Type::On_start_class,
- &PE_Type::On_start_class,
- &PE_Type::On_start_enum,
- &PE_Type::On_start_const,
- &PE_Type::On_start_volatile,
- &PE_Type::On_start_Bracket_Right,
- &PE_Type::On_start_DoubleColon,
- &PE_Type::On_start_typename,
- &PE_Type::On_start_BuiltInType,
- &PE_Type::On_start_TypeSpecializer };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
- Tid_const,
- Tid_volatile,
- Tid_Bracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_expect_namesegment[] = { &PE_Type::On_expect_namesegment_Identifier,
- &PE_Type::On_expect_namesegment_Identifier };
- static INT16 stateT_expect_namesegment[] = { Tid_Identifier,
- Tid_BuiltInType };
-
- static F_Tok stateF_after_namesegment[] = { &PE_Type::On_after_namesegment_const,
- &PE_Type::On_after_namesegment_volatile,
- &PE_Type::On_after_namesegment_Bracket_Left,
- &PE_Type::On_after_namesegment_DoubleColon,
- &PE_Type::On_after_namesegment_Less,
- &PE_Type::On_after_namesegment_Asterix,
- &PE_Type::On_after_namesegment_AmpersAnd };
- static INT16 stateT_after_namesegment[] = { Tid_const,
- Tid_volatile,
- Tid_Bracket_Left,
- Tid_DoubleColon,
- Tid_Less,
- Tid_Asterix,
- Tid_AmpersAnd };
-
- static F_Tok stateF_afterclass_expect_semicolon[] =
- { &PE_Type::On_afterclass_expect_semicolon_Semicolon };
- static INT16 stateT_afterclass_expect_semicolon[] =
- { Tid_Semicolon };
-
- static F_Tok stateF_within_template[] = { &PE_Type::On_within_template_Comma,
- &PE_Type::On_within_template_Greater,
- &PE_Type::On_within_template_Constant };
- static INT16 stateT_within_template[] = { Tid_Comma,
- Tid_Greater,
- Tid_Constant };
-
- static F_Tok stateF_within_indirection[] = { &PE_Type::On_within_indirection_const,
- &PE_Type::On_within_indirection_volatile,
- &PE_Type::On_within_indirection_Asterix,
- &PE_Type::On_within_indirection_AmpersAnd };
- static INT16 stateT_within_indirection[] = { Tid_const,
- Tid_volatile,
- Tid_Asterix,
- Tid_AmpersAnd };
-
- SEMPARSE_CREATE_STATUS(PE_Type, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Type, expect_namesegment, On_EndOfType);
- SEMPARSE_CREATE_STATUS(PE_Type, after_namesegment, On_EndOfType);
- SEMPARSE_CREATE_STATUS(PE_Type, afterclass_expect_semicolon, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Type, within_template, On_within_template_TypeStart);
- SEMPARSE_CREATE_STATUS(PE_Type, within_indirection, On_EndOfType);
-}
-
-void
-PE_Type::InitData()
-{
- pStati->SetCur(start);
-
- ary::cpp::Ce_id
- scope_id = Env().Context().CurClass() != 0
- ? Env().Context().CurClass()->CeId()
- : Env().Context().CurNamespace().CeId();
-
- pType = new ary::cpp::UsedType(scope_id);
- pCurTemplate_ParameterList = 0;
- sOwningClassName
- = Env().Context().CurClass() != 0
- ? Env().Context().CurClass()->LocalName().c_str()
- : "";
- sParsedClass_Name.clear();
- pResult_Type = 0;
- eResult_KindOf = is_type;
- bIsCastOperatorType = false;
-}
-
-void
-PE_Type::TransferData()
-{
- pStati->SetCur(size_of_states);
-
- if ( IsType() )
- pResult_Type = & Env().AryGate().Types().CheckIn_UsedType(
- Env().Context(),
- *pType.Release() );
- else
- pResult_Type = new NullType;
-}
-
-void
-PE_Type::Hdl_SyntaxError( const char * i_sText )
-{
- StdHandlingOfSyntaxError( i_sText );
-}
-
-void
-PE_Type::SpReturn_Type_TemplateParameter()
-{
- if ( pSpuType_TemplateParameter->Child().Result_KindOf() != is_type )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- pCurTemplate_ParameterList->AddParam_Type(
- pSpuType_TemplateParameter->Child().Result_Type().TypeId() );
-}
-
-void
-PE_Type::SpReturn_Class()
-{
- switch ( pSpuClass->Child().Result_KindOf() )
- {
- case PE_Class::is_declaration:
- pStati->SetCur(afterclass_expect_semicolon);
- eResult_KindOf = is_explicit_class_declaration;
- break;
- case PE_Class::is_implicit_declaration:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuClass->Child().Result_LocalName() );
- break;
- case PE_Class::is_predeclaration:
- pStati->SetCur(afterclass_expect_semicolon);
- eResult_KindOf = is_class_predeclaration;
- break;
- case PE_Class::is_qualified_typename:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuClass->Child().Result_FirstNameSegment() );
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_Type::SpReturn_Enum()
-{
- switch ( pSpuEnum->Child().Result_KindOf() )
- {
- case PE_Enum::is_declaration:
- pStati->SetCur(afterclass_expect_semicolon);
- eResult_KindOf = is_explicit_enum_declaration;
- break;
- case PE_Enum::is_implicit_declaration:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuEnum->Child().Result_LocalName() );
- break;
- case PE_Enum::is_qualified_typename:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuEnum->Child().Result_FirstNameSegment() );
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_Type::On_EndOfType(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Type::On_start_Identifier( const char * i_sText )
-{
- SetTokenResult(done,stay);
- pStati->SetCur(after_namesegment);
-
- pType->Add_NameSegment(i_sText);
-}
-
-void
-PE_Type::On_start_class(const char *)
-{
- pSpuClass->Push(not_done);
-}
-
-void
-PE_Type::On_start_enum(const char *)
-{
- pSpuEnum->Push(done);
-}
-
-void
-PE_Type::On_start_const(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Const();
-}
-
-void
-PE_Type::On_start_volatile(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Volatile();
-}
-
-void
-PE_Type::On_start_Bracket_Right(const char *)
-{
- SetTokenResult(not_done,pop_success);
-
- eResult_KindOf = is_none;
-}
-
-void
-PE_Type::On_start_DoubleColon(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Absolute();
-}
-
-void
-PE_Type::On_start_BuiltInType(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(after_namesegment);
- pType->Set_BuiltIn(i_sText);
-}
-
-void
-PE_Type::On_start_TypeSpecializer(const char * i_sText)
-{
- SetTokenResult(done,stay);
- if (*i_sText == 'u') {
- pType->Set_Unsigned();
- }
- else if (*i_sText == 's') {
- pType->Set_Signed();
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_Type::On_start_typename(const char *)
-{
- SetTokenResult(done,stay);
-}
-
-void
-PE_Type::On_expect_namesegment_Identifier(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(i_sText);
-}
-
-void
-PE_Type::On_after_namesegment_const(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Const();
-}
-
-void
-PE_Type::On_after_namesegment_volatile(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Volatile();
-}
-
-void
-PE_Type::On_after_namesegment_Bracket_Left(const char * i_sText)
-{
- if ( bIsCastOperatorType )
- {
- SetTokenResult(not_done, pop_success);
- }
- else if ( pType->LocalName() == sOwningClassName )
- {
- SetTokenResult(not_done,pop_success);
- eResult_KindOf = is_constructor;
-
- }
- else //
- {
- On_EndOfType(i_sText);
- } // endif
-}
-
-void
-PE_Type::On_after_namesegment_DoubleColon(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(expect_namesegment);
-}
-
-void
-PE_Type::On_after_namesegment_Less(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(within_template);
-
- pCurTemplate_ParameterList = & pType->Enter_Template();
-}
-
-void
-PE_Type::On_after_namesegment_Asterix(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(within_indirection);
- pType->Add_PtrLevel();
-}
-
-void
-PE_Type::On_after_namesegment_AmpersAnd(const char *)
-{
- SetTokenResult(done,pop_success);
- pType->Set_Reference();
-}
-
-void
-PE_Type::On_afterclass_expect_semicolon_Semicolon(const char *)
-{
- csv_assert( NOT IsType() );
- SetTokenResult(not_done,pop_success);
-}
-
-void
-PE_Type::On_within_template_Comma(const char *)
-{
- SetTokenResult(done,stay);
-}
-
-void
-PE_Type::On_within_template_Greater(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(after_namesegment);
-
- pCurTemplate_ParameterList = 0;
-}
-
-void
-PE_Type::On_within_template_Constant(const char * i_sText)
-{
- // KORR_FUTURE
- Cerr() << "Templates with constants as parameters are not yet supported by Autodoc" << Endl();
- Hdl_SyntaxError(i_sText);
-}
-
-void
-PE_Type::On_within_template_TypeStart(const char *)
-{
- pSpuType_TemplateParameter->Push(not_done);
-}
-
-void
-PE_Type::On_within_indirection_const(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Const();
-}
-
-void
-PE_Type::On_within_indirection_volatile(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Volatile();
-}
-
-void
-PE_Type::On_within_indirection_Asterix(const char *)
-{
- SetTokenResult(done,stay);
- pType->Add_PtrLevel();
-}
-
-void
-PE_Type::On_within_indirection_AmpersAnd(const char *)
-{
- SetTokenResult(done,pop_success);
- pType->Set_Reference();
-}
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_type.hxx b/autodoc/source/parser/cpp/pe_type.hxx
deleted file mode 100644
index 33afdaa8..00000000
--- a/autodoc/source/parser/cpp/pe_type.hxx
+++ /dev/null
@@ -1,187 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_TYPE_HXX
-#define ADC_CPP_PE_TYPE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <ary/cpp/usedtype.hxx>
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace cpp {
-
-class PE_Class;
-class PE_Enum;
-class PE_Expression;
-
-class PE_Type : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expect_namesegment,
- after_namesegment,
- afterclass_expect_semicolon,
- within_template,
- within_indirection,
- size_of_states
- };
- enum E_KindOfResult
- {
- is_none,
- is_type,
- is_constructor,
- is_explicit_class_declaration,
- is_class_predeclaration,
- is_explicit_enum_declaration
- };
-
- PE_Type(
- Cpp_PE * i_pParent );
- ~PE_Type();
-
- void Init_AsCastOperatorType();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- E_KindOfResult Result_KindOf() const;
- const ary::cpp::Type &
- Result_Type() const;
- private:
- typedef SubPe< PE_Type, PE_Type > SP_Type;
- typedef SubPe< PE_Type, PE_Class > SP_Class;
- typedef SubPe< PE_Type, PE_Enum > SP_Enum;
- typedef SubPeUse< PE_Type, PE_Type > SPU_Type;
- typedef SubPeUse< PE_Type, PE_Class > SPU_Class;
- typedef SubPeUse< PE_Type, PE_Enum > SPU_Enum;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_Type_TemplateParameter();
- void SpReturn_Class();
- void SpReturn_Enum();
-
- void On_EndOfType(const char *);
-
- void On_start_Identifier(const char *);
- void On_start_class(const char *);
- void On_start_enum(const char *);
- void On_start_const(const char *);
- void On_start_volatile(const char *);
- void On_start_Bracket_Right(const char *);
- void On_start_DoubleColon(const char *);
- void On_start_BuiltInType(const char *);
- void On_start_TypeSpecializer(const char *);
- void On_start_typename(const char *);
-
- void On_expect_namesegment_Identifier(const char *);
-
- void On_after_namesegment_const(const char *);
- void On_after_namesegment_volatile(const char *);
- void On_after_namesegment_Bracket_Left(const char *);
- void On_after_namesegment_DoubleColon(const char *);
- void On_after_namesegment_Less(const char *);
- void On_after_namesegment_Asterix(const char *);
- void On_after_namesegment_AmpersAnd(const char *);
-
- void On_afterclass_expect_semicolon_Semicolon(const char *);
-
- void On_within_template_Comma(const char *);
- void On_within_template_Greater(const char *);
- void On_within_template_Constant(const char *);
- void On_within_template_TypeStart(const char *);
-
- void On_within_indirection_const(const char *);
- void On_within_indirection_volatile(const char *);
- void On_within_indirection_Asterix(const char *);
- void On_within_indirection_AmpersAnd(const char *);
-
- bool IsType() const;
-
- // DATA
- Dyn< PeStatusArray<PE_Type> >
- pStati;
-
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType_TemplateParameter;
- Dyn<SP_Class> pSpClass;
- Dyn<SPU_Class> pSpuClass;
- Dyn<SP_Enum> pSpEnum;
- Dyn<SPU_Enum> pSpuEnum;
-
- Dyn<ary::cpp::UsedType>
- pType;
- ary::cpp::ut::List_TplParameter *
- pCurTemplate_ParameterList;
- String sOwningClassName;
- String sParsedClass_Name;
-
- const ary::cpp::Type *
- pResult_Type;
- E_KindOfResult eResult_KindOf;
- bool bIsCastOperatorType;
-};
-
-
-
-// IMPLEMENTATION
-
-
-inline const ary::cpp::Type &
-PE_Type::Result_Type() const
- { csv_assert(pResult_Type != 0);
- return *pResult_Type; }
-inline PE_Type::E_KindOfResult
-PE_Type::Result_KindOf() const
- { return eResult_KindOf; }
-
-
-} // namespace cpp
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vafu.cxx b/autodoc/source/parser/cpp/pe_vafu.cxx
deleted file mode 100644
index be771157..00000000
--- a/autodoc/source/parser/cpp/pe_vafu.cxx
+++ /dev/null
@@ -1,651 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_vafu.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/inpcontx.hxx>
-#include "pe_type.hxx"
-#include "pe_vari.hxx"
-#include "pe_funct.hxx"
-#include "pe_ignor.hxx"
-#include <x_parse.hxx>
-
-
-
-
-namespace cpp {
-
-
-
-//*********************** PE_VarFunc ***********************//
-
-
-PE_VarFunc::PE_VarFunc( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_VarFunc> ),
- // pSpType,
- // pSpuType,
- // pSpVariable,
- // pSpuVariable,
- // pSpFunction,
- // pSpuFunctionStd,
- // pSpuFunctionCtor,
- // pSpuFunctionDtor,
- // pSpuFunctionCastOperator,
- // pSpuFunctionNormalOperator
- // pSpIgnore,
- // pSpuIgnore,
- nCounter_TemplateBrackets(0),
- bInDestructor(false),
- // aResultIds,
- nResultFrontType(0),
- eResultType(result_unknown),
- bVirtual(false),
- bStatic(false),
- bExtern(false),
- bExternC(false),
- bMutable(false),
- bInline(false),
- bRegister(false),
- bExplicit(false)
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpuType = new SPU_Type(*pSpType, 0, &PE_VarFunc::SpReturn_Type);
- pSpVariable = new SP_Variable(*this);
- pSpuVariable = new SPU_Variable(*pSpVariable, 0, &PE_VarFunc::SpReturn_Variable);
- pSpFunction = new SP_Function(*this);
- pSpuFunctionStd = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionStd, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionCtor = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionCtor, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionDtor = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionDtor, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionCastOperator
- = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionCastOperator, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionNormalOperator
- = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionNormalOperator, &PE_VarFunc::SpReturn_FunctionStd);
- pSpIgnore = new SP_Ignore(*this);
- pSpuIgnore = new SPU_Ignore(*pSpIgnore, 0, &PE_VarFunc::SpReturn_Ignore);
-}
-
-PE_VarFunc::~PE_VarFunc()
-{
-}
-
-void
-PE_VarFunc::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_VarFunc::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_VarFunc>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_VarFunc::On_start_Identifier,
- &PE_VarFunc::On_start_operator,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_virtual,
- &PE_VarFunc::On_start_Tilde,
- &PE_VarFunc::On_start_const,
- &PE_VarFunc::On_start_volatile,
- &PE_VarFunc::On_start_extern,
- &PE_VarFunc::On_start_static,
- &PE_VarFunc::On_start_mutable,
- &PE_VarFunc::On_start_register,
- &PE_VarFunc::On_start_inline,
- &PE_VarFunc::On_start_explicit,
- &PE_VarFunc::On_start_Bracket_Right,
- &PE_VarFunc::On_start_Identifier,
- &PE_VarFunc::On_start_typename,
- &PE_VarFunc::On_start_Identifier,
- &PE_VarFunc::On_start_Identifier };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_operator,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
- Tid_virtual,
- Tid_Tilde,
- Tid_const,
- Tid_volatile,
- Tid_extern,
- Tid_static,
- Tid_mutable,
- Tid_register,
- Tid_inline,
- Tid_explicit,
- Tid_Bracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_expectCtor[] = { &PE_VarFunc::On_expectCtor_Bracket_Left };
- static INT16 stateT_expectCtor[] = { Tid_Bracket_Left };
-
- static F_Tok stateF_afterClassDecl[] = { &PE_VarFunc::On_afterClassDecl_Semicolon };
- static INT16 stateT_afterClassDecl[] = { Tid_Semicolon };
-
- static F_Tok stateF_expectName[] = { &PE_VarFunc::On_expectName_Identifier,
- &PE_VarFunc::On_expectName_operator,
- &PE_VarFunc::On_expectName_Bracket_Left };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_operator,
- Tid_Bracket_Left };
-
- static F_Tok stateF_afterName[] = { &PE_VarFunc::On_afterName_ArrayBracket_Left,
- &PE_VarFunc::On_afterName_Bracket_Left,
- &PE_VarFunc::On_afterName_DoubleColon,
- &PE_VarFunc::On_afterName_Semicolon,
- &PE_VarFunc::On_afterName_Comma,
- &PE_VarFunc::On_afterName_Assign,
- &PE_VarFunc::On_afterName_Less };
- static INT16 stateT_afterName[] = { Tid_ArrayBracket_Left,
- Tid_Bracket_Left,
- Tid_DoubleColon,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Assign,
- Tid_Less };
-
- static F_Tok stateF_afterName_inErraneousTemplate[] =
- { &PE_VarFunc::On_afterName_inErraneousTemplate_Less,
- &PE_VarFunc::On_afterName_inErraneousTemplate_Greater };
- static INT16 stateT_afterName_inErraneousTemplate[] =
- { Tid_Less,
- Tid_Greater };
-
- static F_Tok stateF_finished[] = { &PE_VarFunc::On_finished_Semicolon,
- &PE_VarFunc::On_finished_Comma };
- static INT16 stateT_finished[] = { Tid_Semicolon,
- Tid_Comma };
-
- static F_Tok stateF_finishedIncludingFunctionImplementation[] =
- { &PE_VarFunc::On_finishedIncludingFunctionImplementation_Default
- };
- static INT16 stateT_finishedIncludingFunctionImplementation[] =
- { Tid_BuiltInType // Just to have one entry, but it is default handled, too.
- };
-
- SEMPARSE_CREATE_STATUS(PE_VarFunc, start, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, expectCtor, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, afterClassDecl, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, expectName, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, afterName, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, afterName_inErraneousTemplate, On_afterName_inErraneousTemplate_Default);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, finished, On_finished_Default);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, finishedIncludingFunctionImplementation, On_finishedIncludingFunctionImplementation_Default);
-}
-
-void
-PE_VarFunc::InitData()
-{
- pStati->SetCur(start);
- csv::erase_container(aResultIds);
-
- nCounter_TemplateBrackets = 0;
- bInDestructor = false;
-
- nResultFrontType = 0;
- eResultType = result_unknown;
- sName.clear();
- bVirtual = ary::cpp::VIRTUAL_none;
- bStatic = false;
- bExtern = false;
- bExternC = false;
- bMutable = false;
- bInline = false;
- bRegister = false;
- bExplicit = false;
-}
-
-void
-PE_VarFunc::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_VarFunc::Hdl_UnknownToken( const char *)
-{
- pSpuIgnore->Push(not_done);
-}
-
-void
-PE_VarFunc::SpInit_FunctionStd()
-{
- if ( nResultFrontType.IsValid() AND sName.length() > 0 )
- {
- pSpuFunctionStd->Child().Init_Std(
- sName,
- nResultFrontType,
- bVirtual,
- CreateFunctionFlags() );
- }
- else
- {
- throw X_Parser( X_Parser::x_UnexpectedToken,
- "",
- Env().CurFileName(),
- Env().LineCount() );
- }
-}
-
-void
-PE_VarFunc::SpInit_FunctionCtor()
-{
- ary::cpp::Class * pOwnerClass = Env().Context().CurClass();
- csv_assert( pOwnerClass != 0 );
- pSpuFunctionStd->Child().Init_Ctor( pOwnerClass->LocalName(),
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpInit_FunctionDtor()
-{
- pSpuFunctionStd->Child().Init_Dtor( sName,
- bVirtual,
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpInit_FunctionCastOperator()
-{
- pSpuFunctionStd->Child().Init_CastOperator( bVirtual,
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpInit_FunctionNormalOperator()
-{
- pSpuFunctionStd->Child().Init_NormalOperator( nResultFrontType,
- bVirtual,
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpReturn_Type()
-{
- switch ( pSpuType->Child().Result_KindOf() )
- {
- case PE_Type::is_type:
- pStati->SetCur(expectName);
- nResultFrontType
- = pSpuType->Child().Result_Type().Id();
- break;
- case PE_Type::is_constructor:
- pStati->SetCur(expectCtor);
- eResultType = result_function;
- break;
- case PE_Type::is_explicit_class_declaration:
- case PE_Type::is_explicit_enum_declaration:
- pStati->SetCur(afterClassDecl);
- eResultType = result_ignore;
- break;
- case PE_Type::is_class_predeclaration:
- pStati->SetCur(afterClassDecl);
- eResultType = result_ignore;
- break;
- default:
- ;
- }
-}
-
-void
-PE_VarFunc::SpReturn_Variable()
-{
- typedef ary::cpp::VariableFlags VarFlags;
-
- if ( NOT bExtern )
- {
- VarFlags aFlags( UINT16(
- ( bStatic AND Env().Context().CurClass() == 0 ? VarFlags::f_static_local : 0 )
- | ( bStatic AND Env().Context().CurClass() != 0 ? VarFlags::f_static_member : 0 )
- | ( bMutable ? VarFlags::f_mutable : 0 ) )
- );
-
-// ary::S_InitData aData( 0, Env().CurCeSpace().Id(), i_sName, 0 );
- ary::cpp::Variable & rCurParsedVariable
- = Env().AryGate().Ces().Store_Variable( Env().Context(),
- sName,
- nResultFrontType,
- aFlags,
- pSpuVariable->Child().Result_SizeExpression(),
- pSpuVariable->Child().Result_InitExpression() );
- Env().Event_Store_Variable(rCurParsedVariable);
- aResultIds.push_back( rCurParsedVariable.CeId() );
- eResultType = result_variable;
- }
- else if (bExtern)
- {
- eResultType = result_ignore;
- }
-
- pStati->SetCur(finished);
-}
-
-void
-PE_VarFunc::SpReturn_FunctionStd()
-{
- if ( (NOT bExtern) OR bExternC )
- {
- aResultIds.push_back(pSpuFunctionStd->Child().Result_Id());
- eResultType = result_function;
- }
- else
- {
- eResultType = result_ignore;
- }
-
- if ( NOT pSpuFunctionStd->Child().Result_WithImplementation() )
- pStati->SetCur(finished);
- else
- pStati->SetCur(finishedIncludingFunctionImplementation);
-}
-
-void
-PE_VarFunc::SpReturn_Ignore()
-{
- pStati->SetCur(finished);
-}
-
-void
-PE_VarFunc::On_start_Identifier(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_operator(const char *)
-{
- pSpuFunctionCastOperator->Push(done);
-}
-
-void
-PE_VarFunc::On_start_TypeKey(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_virtual(const char *)
-{
- SetTokenResult(done, stay);
- bVirtual = true;
-}
-
-void
-PE_VarFunc::On_start_Tilde(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
-
- bInDestructor = true;
-}
-
-void
-PE_VarFunc::On_start_const(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_volatile(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_extern(const char *)
-{
- SetTokenResult(done, stay);
- bExtern = true;
-}
-
-void
-PE_VarFunc::On_start_static(const char *)
-{
- SetTokenResult(done, stay);
- bStatic = true;
-}
-
-void
-PE_VarFunc::On_start_mutable(const char *)
-{
- SetTokenResult(done, stay);
- bMutable = true;
-}
-
-void
-PE_VarFunc::On_start_register(const char *)
-{
- SetTokenResult(done, stay);
- bRegister = true;
-}
-
-void
-PE_VarFunc::On_start_inline(const char *)
-{
- SetTokenResult(done, stay);
-
- bInline = true;
-}
-
-void
-PE_VarFunc::On_start_explicit(const char *)
-{
- SetTokenResult(done, stay);
- bExplicit = true;
-}
-
-void
-PE_VarFunc::On_start_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_VarFunc::On_start_typename(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_expectCtor_Bracket_Left(const char *)
-{
- pSpuFunctionCtor->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterClassDecl_Semicolon(const char *)
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_VarFunc::On_expectName_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
- sName = i_sText;
-}
-
-void
-PE_VarFunc::On_expectName_operator(const char *)
-{
- pSpuFunctionNormalOperator->Push(done);
-}
-
-void
-PE_VarFunc::On_expectName_Bracket_Left(const char *)
-{
- // Function pointer declaration
- pSpuIgnore->Push(not_done);
- // TODO
-}
-
-
-void
-PE_VarFunc::On_afterName_ArrayBracket_Left(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Bracket_Left(const char *)
-{
- if ( NOT bInDestructor)
- pSpuFunctionStd->Push(not_done);
- else
- pSpuFunctionDtor->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_DoubleColon(const char *)
-{
- pSpuIgnore->Push(done); // This seems to be only an implementation.
-
- // This may have been a template.
- // In that case, the declaration needs to be closed.
- Env().Close_OpenTemplate();
-}
-
-void
-PE_VarFunc::On_afterName_Semicolon(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Comma(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Assign(const char * )
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Less(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName_inErraneousTemplate);
-
- nCounter_TemplateBrackets = 1;
-}
-
-void
-PE_VarFunc::On_afterName_inErraneousTemplate_Less(const char * )
-{
- SetTokenResult(done, stay);
-
- nCounter_TemplateBrackets++;
-}
-
-void
-PE_VarFunc::On_afterName_inErraneousTemplate_Greater(const char * )
-{
- SetTokenResult(done, stay);
-
- nCounter_TemplateBrackets--;
- if ( nCounter_TemplateBrackets == 0 )
- pStati->SetCur(afterName);
-}
-
-void
-PE_VarFunc::On_afterName_inErraneousTemplate_Default(const char * )
-{
- SetTokenResult(done, stay);
-}
-
-void
-PE_VarFunc::On_finished_Semicolon(const char * ) // Should be Semicolon !!!
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_VarFunc::On_finished_Comma(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
-}
-
-void
-PE_VarFunc::On_finished_Default(const char * )
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_VarFunc::On_finishedIncludingFunctionImplementation_Default(const char * )
-{
- SetTokenResult(not_done, pop_success);
-}
-
-ary::cpp::FunctionFlags
-PE_VarFunc::CreateFunctionFlags()
-{
- typedef ary::cpp::FunctionFlags FuncFlags;
-
- return FuncFlags( UINT16(
- ( bStatic AND Env().Context().CurClass() == 0 ? FuncFlags::f_static_local : 0 )
- | ( bStatic AND Env().Context().CurClass() != 0 ? FuncFlags::f_static_member : 0 )
- | ( bExtern ? FuncFlags::f_extern : 0 )
- | ( Env().IsExternC() ? FuncFlags::f_externC : 0 )
- | ( bMutable ? FuncFlags::f_mutable : 0 )
- | ( bInline ? FuncFlags::f_inline : 0 )
- | ( bRegister ? FuncFlags::f_register : 0 )
- | ( bExplicit ? FuncFlags::f_explicit : 0 ) )
- );
-
-}
-
-
-} // namespace cpp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vafu.hxx b/autodoc/source/parser/cpp/pe_vafu.hxx
deleted file mode 100644
index 1f3f4ff1..00000000
--- a/autodoc/source/parser/cpp/pe_vafu.hxx
+++ /dev/null
@@ -1,292 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_VAFU_HXX
-#define ADC_CPP_PE_VAFU_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-
-
-
-namespace cpp
-{
-
-class PE_Type;
-class PE_Variable;
-class PE_Function;
-class PE_Ignore;
-
-
-
-
-class PE_VarFunc : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expectCtor,
- afterClassDecl, // Also used for after enum declaration.
- expectName,
- afterName,
- afterName_inErraneousTemplate,
- finished,
- finishedIncludingFunctionImplementation,
- size_of_states
- };
- enum E_ResultType
- {
- result_unknown = 0,
- result_ignore, /// Used for class and enum declarations and predeclarations and for extern variables and functions.
- result_variable,
- result_function
- };
-
- typedef ary::cpp::E_Protection E_Protection;
-
-
- PE_VarFunc(
- Cpp_PE * i_pParent );
- ~PE_VarFunc();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- const std::vector<ary::cpp::Ce_id> &
- Result_Ids() const;
- ary::cpp::Type_id Result_FrontType() const;
- const StringVector &
- Result_Names() const;
- E_ResultType Result_CeType() const;
-
- private:
- typedef SubPe< PE_VarFunc, PE_Type > SP_Type;
- typedef SubPeUse< PE_VarFunc, PE_Type > SPU_Type;
- typedef SubPe< PE_VarFunc, PE_Variable > SP_Variable;
- typedef SubPeUse< PE_VarFunc, PE_Variable > SPU_Variable;
- typedef SubPe< PE_VarFunc, PE_Function > SP_Function;
- typedef SubPeUse< PE_VarFunc, PE_Function > SPU_Function;
- typedef SubPe< PE_VarFunc, PE_Ignore > SP_Ignore;
- typedef SubPeUse< PE_VarFunc, PE_Ignore > SPU_Ignore;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_UnknownToken( const char *);
-
- void SpInit_FunctionStd();
- void SpInit_FunctionCtor();
- void SpInit_FunctionDtor();
- void SpInit_FunctionCastOperator();
- void SpInit_FunctionNormalOperator();
- void SpReturn_Type();
- void SpReturn_Variable();
- void SpReturn_FunctionStd();
- void SpReturn_Ignore();
-
- void On_start_Identifier(const char * i_sText);
- void On_start_operator(const char * i_sText);
- void On_start_TypeKey(const char * i_sText);
- void On_start_virtual(const char * i_sText);
- void On_start_Tilde(const char * i_sText);
- void On_start_const(const char * i_sText);
- void On_start_volatile(const char * i_sText);
- void On_start_extern(const char * i_sText);
- void On_start_static(const char * i_sText);
- void On_start_mutable(const char * i_sText);
- void On_start_register(const char * i_sText);
- void On_start_inline(const char * i_sText);
- void On_start_explicit(const char * i_sText);
- void On_start_Bracket_Right(const char * i_sText);
- void On_start_typename(const char * i_sText);
-
- void On_expectCtor_Bracket_Left(const char * i_sText);
-
- void On_afterClassDecl_Semicolon(const char * i_sText);
-
- void On_expectName_Identifier(const char * i_sText);
- void On_expectName_operator(const char * i_sText);
- void On_expectName_Bracket_Left(const char * i_sText);
-
- void On_afterName_ArrayBracket_Left(const char * i_sText);
- void On_afterName_Bracket_Left(const char * i_sText);
- void On_afterName_DoubleColon(const char * i_sText);
- void On_afterName_Semicolon(const char * i_sText);
- void On_afterName_Comma(const char * i_sText);
- void On_afterName_Assign(const char * i_sText);
- void On_afterName_Less(const char * i_sText);
-
- void On_afterName_inErraneousTemplate_Less(const char * i_sText);
- void On_afterName_inErraneousTemplate_Greater(const char * i_sText);
- void On_afterName_inErraneousTemplate_Default(const char * i_sText);
-
- void On_finished_Semicolon(const char * i_sText);
- void On_finished_Comma(const char * i_sText);
- void On_finished_Default(const char * i_sText);
-
- void On_finishedIncludingFunctionImplementation_Default(const char * i_sText);
-
- ary::cpp::FunctionFlags
- CreateFunctionFlags();
-
- // DATA
- Dyn< PeStatusArray<PE_VarFunc> >
- pStati;
-
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType;
- Dyn<SP_Variable> pSpVariable;
- Dyn<SPU_Variable> pSpuVariable;
- Dyn<SP_Function> pSpFunction;
- Dyn<SPU_Function> pSpuFunctionStd;
- Dyn<SPU_Function> pSpuFunctionCtor;
- Dyn<SPU_Function> pSpuFunctionDtor;
- Dyn<SPU_Function> pSpuFunctionCastOperator;
- Dyn<SPU_Function> pSpuFunctionNormalOperator;
- Dyn<SP_Ignore> pSpIgnore;
- Dyn<SPU_Ignore> pSpuIgnore;
-
- intt nCounter_TemplateBrackets;
- bool bInDestructor;
-
- std::vector<ary::cpp::Ce_id>
- aResultIds;
- ary::cpp::Type_id nResultFrontType;
- E_ResultType eResultType;
-
- // Pre-Results
- String sName;
-
- bool bVirtual;
- bool bStatic;
- bool bExtern;
- bool bExternC;
- bool bMutable;
- bool bInline;
- bool bRegister;
- bool bExplicit;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const std::vector<ary::cpp::Ce_id> &
-PE_VarFunc::Result_Ids() const
- { return aResultIds; }
-inline ary::cpp::Type_id
-PE_VarFunc::Result_FrontType() const
- { return nResultFrontType; }
-inline PE_VarFunc::E_ResultType
-PE_VarFunc::Result_CeType() const
- { return eResultType; }
-
-
-
-} // namespace cpp
-
-
-
-
-#endif
-
-
-/* // Overview of Stati
-
-Undecided
----------
-
-start // vor und während storage class specifiern
- any ->stay
- operaator ->goto Function
-
-->Typ
-
-expectName
- Identifier ->stay
- operator ->goto Function
-
-afterName ->goto Variable or Function
-
-
-
-
-Variable
---------
-
-start // vor und während storage class specifiern
-
-->Typ
-
-expectName // Typ ist da -> im Falle von '(': notyetimplemented
-afterName
-
-expectSize // after [
-expectFinish
- // vor ; oder ,
-expectNextVarName // anders als bei expectName kann hier auch * oder & kommen
-
-
-
-
-
-Function
---------
-
-start // vor und während storage class specifiern
-
-->Typ
-
-expectName // Typ ist da
-expectBracket // Nach Name
-expectParameter // nach ( oder ,
--> Parameter
-after Parameters // before const, volatile throw or = 0.
-after throw // expect (
-expectException // after (
-after exceptions // = 0 oder ; oder ,
-
-
-expectNextVarName // anders als bei expectName kann hier auch * oder & kommen
-
-
-
-
-
-
-
-*/
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vari.cxx b/autodoc/source/parser/cpp/pe_vari.cxx
deleted file mode 100644
index 25753721..00000000
--- a/autodoc/source/parser/cpp/pe_vari.cxx
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "pe_vari.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include "pe_expr.hxx"
-
-
-
-
-namespace cpp {
-
-
-PE_Variable::PE_Variable( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Variable> )
- // pSpExpression,
- // pSpuArraySizeExpression,
- // pSpuInitExpression,
- // sResultSizeExpression,
- // sResultInitExpression
-{
- Setup_StatusFunctions();
-
- pSpExpression = new SP_Expression(*this);
-
- pSpuArraySizeExpression = new SPU_Expression(*pSpExpression, 0, &PE_Variable::SpReturn_ArraySizeExpression);
- pSpuInitExpression = new SPU_Expression(*pSpExpression, 0, &PE_Variable::SpReturn_InitExpression);
-}
-
-PE_Variable::~PE_Variable()
-{
-}
-
-void
-PE_Variable::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Variable::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Variable>::F_Tok F_Tok;
-
- static F_Tok stateF_afterName[] = { &PE_Variable::On_afterName_ArrayBracket_Left,
- &PE_Variable::On_afterName_Semicolon,
- &PE_Variable::On_afterName_Comma,
- &PE_Variable::On_afterName_Assign };
- static INT16 stateT_afterName[] = { Tid_ArrayBracket_Left,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Assign };
- static F_Tok stateF_afterSize[] = { &PE_Variable::On_afterSize_ArrayBracket_Right };
- static INT16 stateT_afterSize[] = { Tid_ArrayBracket_Right };
- static F_Tok stateF_expectFinish[] = { &PE_Variable::On_expectFinish_Bracket_Right,
- &PE_Variable::On_expectFinish_Semicolon,
- &PE_Variable::On_expectFinish_Comma };
- static INT16 stateT_expectFinish[] = { Tid_Bracket_Right,
- Tid_Semicolon,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Variable, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Variable, afterSize, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Variable, expectFinish, Hdl_SyntaxError);
-}
-
-void
-PE_Variable::InitData()
-{
- pStati->SetCur(afterName);
-
- sResultSizeExpression.clear();
- sResultInitExpression.clear();
-}
-
-void
-PE_Variable::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Variable::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Variable::SpReturn_ArraySizeExpression()
-{
- pStati->SetCur(afterSize);
-
- sResultSizeExpression = pSpuArraySizeExpression->Child().Result_Text();
-}
-
-void
-PE_Variable::SpReturn_InitExpression()
-{
- pStati->SetCur(expectFinish);
-
- sResultInitExpression = pSpuInitExpression->Child().Result_Text();
-}
-
-void
-PE_Variable::On_afterName_ArrayBracket_Left(const char *)
-{
- pSpuArraySizeExpression->Push(done);
-}
-
-void
-PE_Variable::On_afterName_Semicolon(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_afterName_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_afterName_Assign(const char *)
-{
- pSpuInitExpression->Push(done);
-}
-
-void
-PE_Variable::On_afterSize_ArrayBracket_Right(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-}
-
-void
-PE_Variable::On_expectFinish_Semicolon(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_expectFinish_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_expectFinish_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vari.hxx b/autodoc/source/parser/cpp/pe_vari.hxx
deleted file mode 100644
index 8f3ce687..00000000
--- a/autodoc/source/parser/cpp/pe_vari.hxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PE_VARI_HXX
-#define ADC_CPP_PE_VARI_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-class PE_Expression;
-
-
-class PE_Variable : public Cpp_PE
-{
- public:
- enum E_State
- {
- afterName, //
- afterSize, // after ]
- expectFinish, // after InitExpression
- size_of_states
- };
- PE_Variable(
- Cpp_PE * i_pParent );
- ~PE_Variable();
-
- /** @return
- Bit 0x0001 != 0, if there is a size and
- bit 0x0002 != 0, if there is an initialisation.
- */
- UINT16 Result_Pattern() const;
- const String & Result_SizeExpression() const;
- const String & Result_InitExpression() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- typedef SubPe< PE_Variable, PE_Expression > SP_Expression;
- typedef SubPeUse< PE_Variable, PE_Expression> SPU_Expression;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char *);
-
- void SpReturn_ArraySizeExpression();
- void SpReturn_InitExpression();
-
- void On_afterName_ArrayBracket_Left(const char * i_sText);
- void On_afterName_Semicolon(const char * i_sText);
- void On_afterName_Comma(const char * i_sText);
- void On_afterName_Assign(const char * i_sText);
-
- void On_afterSize_ArrayBracket_Right(const char * i_sText);
-
- void On_expectFinish_Semicolon(const char * i_sText);
- void On_expectFinish_Comma(const char * i_sText);
- void On_expectFinish_Bracket_Right(const char * i_sText);
-
- // DATA
- Dyn< PeStatusArray<PE_Variable> >
- pStati;
-
- Dyn<SP_Expression> pSpExpression;
- Dyn<SPU_Expression> pSpuArraySizeExpression;
- Dyn<SPU_Expression> pSpuInitExpression;
-
- String sResultSizeExpression;
- String sResultInitExpression;
-};
-
-
-
-// IMPLEMENTATION
-
-
-inline UINT16
-PE_Variable::Result_Pattern() const
- { return ( sResultSizeExpression.length() > 0 ? 1 : 0 )
- + ( sResultInitExpression.length() > 0 ? 2 : 0 ); }
-inline const String &
-PE_Variable::Result_SizeExpression() const
- { return sResultSizeExpression; }
-inline const String &
-PE_Variable::Result_InitExpression() const
- { return sResultInitExpression; }
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pev.hxx b/autodoc/source/parser/cpp/pev.hxx
deleted file mode 100644
index eb10ecbd..00000000
--- a/autodoc/source/parser/cpp/pev.hxx
+++ /dev/null
@@ -1,306 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PEV_HXX
-#define ADC_CPP_PEV_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- class Gate;
- class InputContext;
-
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- class Function;
- class Variable;
- class EnumValue;
-
- class DefineEntity;
- }
-
- class Documentation;
-}
-
-
-namespace cpp
-{
-
-
-class PeEnvironment : protected TokenProcessing_Types
-{
- public:
- // INQUIRY
- virtual ~PeEnvironment() {}
-
- // OPERATIONS
- // Token results
- void SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push = 0 );
-
- // Owner stack
- void OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace );
- void OpenExternC(
- bool i_bOnlyForOneDeclaration = false );
- void OpenClass(
- ary::cpp::Class & io_rOpenedClass );
- void OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum );
- void CloseBlock(); /// Handles a '}' on file scope.
- void CloseClass();
- void CloseEnum();
- void SetCurProtection( /// Handles 'public:', 'protected:' and 'private:' on class scope.
- ary::cpp::E_Protection
- i_eProtection );
- void OpenTemplate(
- const StringVector &
- i_rParameters );
- /// Removes parameters from this object.
- DYN StringVector * Get_CurTemplateParameters();
- /// Checks, if a template is still open, and if yes, closes it.
- void Close_OpenTemplate();
-
- // Special events
- void Event_Class_FinishedBase(
- const String & i_sParameterName );
-
- void Event_Store_Typedef(
- ary::cpp::Typedef & io_rTypedef );
- void Event_Store_EnumValue(
- ary::cpp::EnumValue &
- io_rEnumValue );
- void Event_Store_CppDefinition(
- ary::cpp::DefineEntity &
- io_rDefinition );
-
- void Event_EnterFunction_ParameterList();
- void Event_Function_FinishedParameter(
- const String & i_sParameterName );
- void Event_LeaveFunction_ParameterList();
- void Event_EnterFunction_Implementation();
- void Event_LeaveFunction_Implementation();
-
- void Event_Store_Function(
- ary::cpp::Function &
- io_rFunction );
- void Event_Store_Variable(
- ary::cpp::Variable &
- io_rVariable );
- // Error recovery
- void StartWaitingFor_Recovery();
-
- // INQUIRY
- ary::cpp::Gate & AryGate() const;
- const ary::cpp::InputContext &
- Context() const;
- String CurFileName() const;
- uintt LineCount() const;
- bool IsWaitingFor_Recovery() const;
- bool IsExternC() const;
-
- private:
- virtual void do_SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push ) = 0;
- virtual void do_OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace ) = 0;
- virtual void do_OpenExternC(
- bool i_bOnlyForOneDeclaration ) = 0;
- virtual void do_OpenClass(
- ary::cpp::Class & io_rOpenedClass ) = 0;
- virtual void do_OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum ) = 0;
- virtual void do_CloseBlock() = 0;
- virtual void do_CloseClass() = 0;
- virtual void do_CloseEnum() = 0;
- virtual void do_SetCurProtection(
- ary::cpp::E_Protection
- i_eProtection ) = 0;
- virtual void do_OpenTemplate(
- const StringVector &
- i_rParameters ) = 0;
- virtual DYN StringVector *
- do_Get_CurTemplateParameters() = 0;
- virtual void do_Close_OpenTemplate() = 0;
- virtual void do_Event_Class_FinishedBase(
- const String & i_sBaseName ) = 0;
-
- virtual void do_Event_Store_Typedef(
- ary::cpp::Typedef & io_rTypedef ) = 0;
- virtual void do_Event_Store_EnumValue(
- ary::cpp::EnumValue &
- io_rEnumValue ) = 0;
- virtual void do_Event_Store_CppDefinition(
- ary::cpp::DefineEntity &
- io_rDefinition ) = 0;
- virtual void do_Event_EnterFunction_ParameterList() = 0;
- virtual void do_Event_Function_FinishedParameter(
- const String & i_sParameterName ) = 0;
- virtual void do_Event_LeaveFunction_ParameterList() = 0;
- virtual void do_Event_EnterFunction_Implementation() = 0;
- virtual void do_Event_LeaveFunction_Implementation() = 0;
- virtual void do_Event_Store_Function(
- ary::cpp::Function &
- io_rFunction ) = 0;
- virtual void do_Event_Store_Variable(
- ary::cpp::Variable &
- io_rVariable ) = 0;
- virtual void do_StartWaitingFor_Recovery() = 0;
- virtual ary::cpp::Gate &
- inq_AryGate() const = 0;
- virtual const ary::cpp::InputContext &
- inq_Context() const = 0;
- virtual String inq_CurFileName() const = 0;
- virtual uintt inq_LineCount() const = 0;
- virtual bool inq_IsWaitingFor_Recovery() const = 0;
- virtual bool inq_IsExternC() const = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-inline void
-PeEnvironment::SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push )
- { do_SetTokenResult(i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push); }
-inline void
-PeEnvironment::OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
- { do_OpenNamespace(io_rOpenedNamespace); }
-inline void
-PeEnvironment::OpenExternC( bool i_bOnlyForOneDeclaration )
- { do_OpenExternC(i_bOnlyForOneDeclaration); }
-inline void
-PeEnvironment::OpenClass( ary::cpp::Class & io_rOpenedClass )
- { do_OpenClass(io_rOpenedClass); }
-inline void
-PeEnvironment::OpenEnum( ary::cpp::Enum & io_rOpenedEnum )
- { do_OpenEnum(io_rOpenedEnum); }
-inline void
-PeEnvironment::CloseBlock()
- { do_CloseBlock(); }
-inline void
-PeEnvironment::CloseClass()
- { do_CloseClass(); }
-inline void
-PeEnvironment::CloseEnum()
- { do_CloseEnum(); }
-inline void
-PeEnvironment::SetCurProtection( ary::cpp::E_Protection i_eProtection )
- { do_SetCurProtection(i_eProtection); }
-inline void
-PeEnvironment::OpenTemplate( const StringVector & i_rParameters )
- { do_OpenTemplate(i_rParameters); }
-inline DYN StringVector *
-PeEnvironment::Get_CurTemplateParameters()
- { return do_Get_CurTemplateParameters(); }
-inline void
-PeEnvironment::Close_OpenTemplate()
- { do_Close_OpenTemplate(); }
-inline void
-PeEnvironment::Event_Class_FinishedBase( const String & i_sBaseName )
- { do_Event_Class_FinishedBase(i_sBaseName); }
-inline void
-PeEnvironment::Event_Store_Typedef( ary::cpp::Typedef & io_rTypedef )
- { do_Event_Store_Typedef(io_rTypedef); }
-inline void
-PeEnvironment::Event_Store_EnumValue( ary::cpp::EnumValue & io_rEnumValue )
- { do_Event_Store_EnumValue(io_rEnumValue); }
-inline void
-PeEnvironment::Event_Store_CppDefinition( ary::cpp::DefineEntity & io_rDefinition )
- { do_Event_Store_CppDefinition(io_rDefinition); }
-inline void
-PeEnvironment::Event_EnterFunction_ParameterList()
- { do_Event_EnterFunction_ParameterList(); }
-inline void
-PeEnvironment::Event_Function_FinishedParameter( const String & i_sParameterName )
- { do_Event_Function_FinishedParameter(i_sParameterName); }
-inline void
-PeEnvironment::Event_LeaveFunction_ParameterList()
- { do_Event_LeaveFunction_ParameterList(); }
-inline void
-PeEnvironment::Event_EnterFunction_Implementation()
- { do_Event_EnterFunction_Implementation(); }
-inline void
-PeEnvironment::Event_LeaveFunction_Implementation()
- { do_Event_LeaveFunction_Implementation(); }
-inline void
-PeEnvironment::Event_Store_Function( ary::cpp::Function & io_rFunction )
- { do_Event_Store_Function(io_rFunction); }
-inline void
-PeEnvironment::Event_Store_Variable( ary::cpp::Variable & io_rVariable )
- { do_Event_Store_Variable(io_rVariable); }
-inline void
-PeEnvironment::StartWaitingFor_Recovery()
- { do_StartWaitingFor_Recovery(); }
-inline ary::cpp::Gate &
-PeEnvironment::AryGate() const
- { return inq_AryGate(); }
-inline const ary::cpp::InputContext &
-PeEnvironment::Context() const
- { return inq_Context(); }
-inline String
-PeEnvironment::CurFileName() const
- { return inq_CurFileName(); }
-inline uintt
-PeEnvironment::LineCount() const
- { return inq_LineCount(); }
-inline bool
-PeEnvironment::IsWaitingFor_Recovery() const
- { return inq_IsWaitingFor_Recovery(); }
-inline bool
-PeEnvironment::IsExternC() const
- { return inq_IsExternC(); }
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/preproc.cxx b/autodoc/source/parser/cpp/preproc.cxx
deleted file mode 100644
index 5955f037..00000000
--- a/autodoc/source/parser/cpp/preproc.cxx
+++ /dev/null
@@ -1,233 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "preproc.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include "all_toks.hxx"
-#include "defdescr.hxx"
-#include <tools/tkpchars.hxx>
-#include "c_rcode.hxx"
-
-
-namespace cpp
-{
-
-
-PreProcessor::F_TOKENPROC PreProcessor::aTokProcs[PreProcessor::state_MAX] =
- {
- &PreProcessor::On_plain,
- &PreProcessor::On_expect_macro_bracket_left,
- &PreProcessor::On_expect_macro_param
- };
-
-
-PreProcessor::PreProcessor()
- : pCppExplorer(0),
- pSourceText(0),
- pCurValidDefines(0),
- // aTokens,
- eState(plain),
- pCurMacro(0),
- dpCurMacroName(0),
- // aCurMacroParams,
- aCurParamText(60000),
- nBracketInParameterCounter(0)
- // aBlockedMacroNames
-{
-}
-
-PreProcessor::~PreProcessor()
-{
-}
-
-void
-PreProcessor::AssignPartners( CodeExplorer & o_rCodeExplorer,
- CharacterSource & o_rCharSource,
- const MacroMap & i_rCurValidDefines )
-{
- pCppExplorer = &o_rCodeExplorer;
- pSourceText = &o_rCharSource;
- pCurValidDefines = &i_rCurValidDefines;
-}
-
-void
-PreProcessor::Process_Token( cpp::Token & let_drToken )
-{
- csv_assert(pCppExplorer != 0); // Implies pSourceText and pCurValidDefines.
-
- (this->*aTokProcs[eState])(let_drToken);
-}
-
-void
-PreProcessor::On_plain( cpp::Token & let_drToken )
-{
- if ( let_drToken.TypeId() == Tid_Identifier )
- {
- if (CheckForDefine(let_drToken))
- return;
- }
-
- pCppExplorer->Process_Token(let_drToken);
-}
-
-void
-PreProcessor::On_expect_macro_bracket_left( cpp::Token & let_drToken )
-{
- if ( let_drToken.TypeId() == Tid_Bracket_Left )
- {
- aCurParamText.seekp(0);
- eState = expect_macro_param;
- }
- else
- {
- pCppExplorer->Process_Token(*dpCurMacroName);
- dpCurMacroName = 0;
- pCppExplorer->Process_Token(let_drToken);
- eState = plain;
- }
-}
-
-void
-PreProcessor::On_expect_macro_param( cpp::Token & let_drToken )
-{
- if ( let_drToken.TypeId() == Tid_Bracket_Left )
- nBracketInParameterCounter++;
- else if ( let_drToken.TypeId() == Tid_Bracket_Right )
- {
- if ( nBracketInParameterCounter > 0 )
- nBracketInParameterCounter--;
- else
- {
- if ( NOT csv::no_str(aCurParamText.c_str()) )
- {
- aCurMacroParams.push_back( String(aCurParamText.c_str()) );
- }
- csv_assert( aCurMacroParams.size() == pCurMacro->ParamCount() );
-
- InterpretMacro();
- eState = plain;
- return;
- }
- }
- else if ( let_drToken.TypeId() == Tid_Comma AND nBracketInParameterCounter == 0 )
- {
- aCurMacroParams.push_back( String (aCurParamText.c_str()) );
- aCurParamText.seekp(0);
- return;
- }
-
- // KORR_FUTURE:
- // If in future whitespace is parsed also, that should match exactly and the
- // safety spaces, " ", here should be removed.
- aCurParamText << let_drToken.Text() << " ";
-}
-
-bool
-PreProcessor::CheckForDefine( cpp::Token & let_drToken )
-{
- String sTokenText(let_drToken.Text());
- pCurMacro = csv::value_from_map( *pCurValidDefines, sTokenText );
- if (pCurMacro == 0 )
- return false;
- for ( StringVector::const_iterator it = aBlockedMacroNames.begin();
- it != aBlockedMacroNames.end();
- ++it )
- {
- if ( strcmp( (*it).c_str(), let_drToken.Text() ) == 0 )
- return false;
- }
-
- if ( pCurMacro->DefineType() == DefineDescription::type_define )
- {
- delete &let_drToken;
-
- aCurParamText.seekp(0);
- pCurMacro->GetDefineText(aCurParamText);
-
- if ( aCurParamText.tellp() > 1 )
- pSourceText->InsertTextAtCurPos(aCurParamText.c_str());
- }
- else // ( pCurMacro->DefineType() == DefineDescription::type_macro )
- {
- dpCurMacroName = &let_drToken;
- eState = expect_macro_bracket_left;
- csv::erase_container( aCurMacroParams );
- aCurParamText.seekp(0);
- nBracketInParameterCounter = 0;
- } // endif
-
- return true;
-}
-
-void
-PreProcessor::UnblockMacro( const char * i_sMacroName )
-{
- for ( StringVector::iterator it = aBlockedMacroNames.begin();
- it != aBlockedMacroNames.end();
- ++it )
- {
- if ( strcmp( (*it), i_sMacroName ) == 0 )
- {
- aBlockedMacroNames.erase(it);
- break;
- }
- } /// end for
-}
-
-void
-PreProcessor::InterpretMacro()
-{
- aCurParamText.seekp(0);
- pCurMacro->GetMacroText(aCurParamText, aCurMacroParams);
-
- if ( NOT csv::no_str(aCurParamText.c_str()) )
- {
- aCurParamText.seekp(-1, csv::cur);
- aCurParamText << " #unblock-" << dpCurMacroName->Text() << " ";
-
- pSourceText->InsertTextAtCurPos(aCurParamText.c_str());
- String sCurMacroName(dpCurMacroName->Text());
- aBlockedMacroNames.insert( aBlockedMacroNames.begin(), sCurMacroName );
- }
-
- delete dpCurMacroName;
- dpCurMacroName = 0;
- pCurMacro = 0;
- csv::erase_container(aCurMacroParams);
- aCurParamText.seekp(0);
-}
-
-
-} // end namespace cpp
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/preproc.hxx b/autodoc/source/parser/cpp/preproc.hxx
deleted file mode 100644
index dc4e9934..00000000
--- a/autodoc/source/parser/cpp/preproc.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PREPROC_HXX
-#define ADC_CPP_PREPROC_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <deque>
- // PARAMETERS
-
-class CharacterSource;
-
-
-namespace cpp
-{
-
-class Token;
-class CodeExplorer;
-class DefineDescription;
-
-
-class PreProcessor
-{
- public:
- typedef std::map< String, DefineDescription* > MacroMap;
-
- // LIFECYCLE
- PreProcessor();
- ~PreProcessor();
- // OPERATONS
- void AssignPartners(
- CodeExplorer & o_rCodeExplorer,
- CharacterSource & o_rCharSource,
- const MacroMap & i_rCurValidDefines );
- void Process_Token(
- cpp::Token & let_drToken );
- void UnblockMacro(
- const char * i_sMacroName );
- private:
- public: // Necessary for instantiation of static variable:
- enum E_State
- {
- plain = 0,
- expect_macro_bracket_left,
- expect_macro_param,
- state_MAX
- };
- typedef void (PreProcessor::* F_TOKENPROC )(cpp::Token &);
- void On_plain( cpp::Token & );
- void On_expect_macro_bracket_left( cpp::Token & );
- void On_expect_macro_param( cpp::Token & );
-
- private: // Reprivate again:
- typedef std::deque< DYN cpp::Token * > TokenQueue;
- typedef StringVector List_MacroParams;
-
-
- bool CheckForDefine(
- cpp::Token & let_drToken );
- void InterpretMacro();
-
- // DATA
- static F_TOKENPROC aTokProcs[state_MAX];
- // Referenced extern objects
- CodeExplorer * pCppExplorer;
- CharacterSource * pSourceText;
- const MacroMap * pCurValidDefines;
-
- // internal data
- TokenQueue aTokens;
-
- E_State eState;
-
- DefineDescription * pCurMacro;
- DYN Token * dpCurMacroName;
- List_MacroParams aCurMacroParams;
- csv::StreamStr aCurParamText;
-
- intt nBracketInParameterCounter;
- StringVector aBlockedMacroNames;
-};
-
-
-
-} // end namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/prs_cpp.cxx b/autodoc/source/parser/cpp/prs_cpp.cxx
deleted file mode 100644
index f4781e67..00000000
--- a/autodoc/source/parser/cpp/prs_cpp.cxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cpp/prs_cpp.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/file.hxx>
-#include <ary/ary.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <autodoc/prs_docu.hxx>
-#include <autodoc/filecoli.hxx>
-#include <autodoc/x_parsing.hxx>
-#include <tools/tkpchars.hxx>
-#include <adc_cl.hxx>
-#include "c_dealer.hxx"
-#include "defdescr.hxx"
-#include "tkp_cpp.hxx"
-
-
-// Helper function
-static bool Local_LoadFile(
- CharacterSource & o_rTextBuffer,
- const String & i_rFullFilePath );
-
-
-
-
-namespace cpp
-{
-
-// This class is used for the UDK as workaround for the missing
-// feature of parsing #define s.
-
-class Udk_MacroMap
-{
- public:
- typedef std::map< String , DefineDescription* > Data;
-
- Udk_MacroMap();
- ~Udk_MacroMap();
-
- const Data & GetData() const { return aData; }
-
- private:
- Data aData;
-};
-
-struct S_RunningData
-{
- CharacterSource aFileContent;
- ary::cpp::Gate & rCppGate;
- Udk_MacroMap aMacros;
- Distributor aDealer;
- TokenParser_Cpp aTkp;
-
- S_RunningData(
- ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc &
- i_rDocumentationInterpreter );
-};
-
-
-
-
-Cpluplus_Parser::Cpluplus_Parser()
-// : pRunningData
-{
-}
-
-Cpluplus_Parser::~Cpluplus_Parser()
-{
-}
-
-void
-Cpluplus_Parser::Setup( ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc & i_rDocumentationInterpreter )
-{
- pRunningData = new S_RunningData(o_rRepository, i_rDocumentationInterpreter);
-}
-
-void
-Cpluplus_Parser::Run( const autodoc::FileCollector_Ifc & i_rFiles )
-{
- for ( autodoc::FileCollector_Ifc::const_iterator iter = i_rFiles.Begin();
- iter != i_rFiles.End();
- ++iter )
- {
- csv::ploc::Path
- aFilePath(*iter);
-
- try
- {
- if ( NOT Local_LoadFile(pRunningData->aFileContent, *iter) )
- continue;
- for ( pRunningData->aTkp.StartNewFile(aFilePath);
- pRunningData->aTkp.HasMore();
- pRunningData->aTkp.GetNextToken() )
- ;
- }
- catch (autodoc::X_Parser_Ifc & rX_Parse)
- {
- if ( DEBUG_ShowStoring() OR DEBUG_ShowText() )
- Cerr() << rX_Parse << Endl();
- }
- catch (...)
- {
- if ( DEBUG_ShowStoring() OR DEBUG_ShowText() )
- Cerr() << "Error: Unknown exception." << Endl();
- }
- } // end for (iter)
-}
-
-S_RunningData::S_RunningData( ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc & i_rDocumentationInterpreter )
- : aFileContent(),
- rCppGate( o_rRepository.Gate_Cpp() ),
- aMacros(),
- aDealer(o_rRepository.Gate_Cpp()),
- aTkp( * i_rDocumentationInterpreter.Create_DocuContext() )
-{
- aDealer.AssignPartners( aFileContent,
- aMacros.GetData() );
- aTkp.AssignPartners( aFileContent, aDealer );
-}
-
-
-Udk_MacroMap::Udk_MacroMap()
-{
- String sSAL_CALL("SAL_CALL");
- String sSAL_CALL_ELLIPSE("SAL_CALL_ELLIPSE");
- String sSAL_NO_VTABLE("SAL_NO_VTABLE");
- String sREGISTRY_CALLTYPE("REGISTRY_CALLTYPE");
- String sSAL_THROW("SAL_THROW");
- String sSAL_THROW_EXTERN_C("SAL_THROW_EXTERN_C");
-
- String s__DEF_COMPIMPLHELPER_A("__DEF_COMPIMPLHELPER_A");
- String s__DEF_COMPIMPLHELPER_B("__DEF_COMPIMPLHELPER_B");
- String s__DEF_COMPIMPLHELPER("__DEF_COMPIMPLHELPER");
-
- String s__DEF_IMPLHELPER_PRE("__DEF_IMPLHELPER_PRE");
- String s__IFC_WRITEOFFSET("__IFC_WRITEOFFSET");
- String s__DEF_IMPLHELPER_POST("__DEF_IMPLHELPER_POST");
-
- String sSAL_EXCEPTION_DLLPUBLIC_EXPORT("SAL_EXCEPTION_DLLPUBLIC_EXPORT");
- String sSAL_EXCEPTION_DLLPRIVATE("SAL_EXCEPTION_DLLPRIVATE");
-
-
- StringVector aEmpty;
-
- StringVector aParamsSAL_THROW;
- aParamsSAL_THROW.push_back( String ("exc") );
- StringVector aDefSAL_THROW;
- aDefSAL_THROW.push_back( String ("throw") );
- aDefSAL_THROW.push_back( String ("exc") );
-
- StringVector aCompImplHelperParams;
- aCompImplHelperParams.push_back(String ("N"));
-
-
- // filling up the list
-
-
- aData[sSAL_CALL] = new DefineDescription(sSAL_CALL, aEmpty);
- aData[sSAL_CALL_ELLIPSE] = new DefineDescription(sSAL_CALL_ELLIPSE, aEmpty);
- aData[sSAL_NO_VTABLE] = new DefineDescription(sSAL_NO_VTABLE, aEmpty);
- aData[sREGISTRY_CALLTYPE] = new DefineDescription(sREGISTRY_CALLTYPE, aEmpty);
-
- aData[sSAL_THROW] = new DefineDescription(sSAL_THROW, aParamsSAL_THROW, aDefSAL_THROW);
- aData[sSAL_THROW_EXTERN_C] = new DefineDescription(sSAL_THROW_EXTERN_C, aEmpty, aEmpty);
-
- aData[s__DEF_COMPIMPLHELPER_A]
- = new DefineDescription( s__DEF_COMPIMPLHELPER_A, aCompImplHelperParams, aEmpty);
- aData[s__DEF_COMPIMPLHELPER_B]
- = new DefineDescription(s__DEF_COMPIMPLHELPER_B, aCompImplHelperParams, aEmpty);
- aData[s__DEF_COMPIMPLHELPER]
- = new DefineDescription(s__DEF_COMPIMPLHELPER, aCompImplHelperParams, aEmpty);
-
- aData[s__DEF_IMPLHELPER_PRE]
- = new DefineDescription(s__DEF_IMPLHELPER_PRE, aCompImplHelperParams, aEmpty);
- aData[s__IFC_WRITEOFFSET]
- = new DefineDescription(s__IFC_WRITEOFFSET, aCompImplHelperParams, aEmpty);
- aData[s__DEF_IMPLHELPER_POST]
- = new DefineDescription(s__DEF_IMPLHELPER_POST, aCompImplHelperParams, aEmpty);
-
- aData[sSAL_EXCEPTION_DLLPUBLIC_EXPORT]
- = new DefineDescription(sSAL_EXCEPTION_DLLPUBLIC_EXPORT, aEmpty);
- aData[sSAL_EXCEPTION_DLLPRIVATE]
- = new DefineDescription(sSAL_EXCEPTION_DLLPRIVATE, aEmpty);
-}
-
-Udk_MacroMap::~Udk_MacroMap()
-{
- for ( Data::iterator it = aData.begin(); it != aData.end(); ++it )
- {
- delete (*it).second;
- }
-}
-
-
-
-} // namespace cpp
-
-
-bool
-Local_LoadFile( CharacterSource & o_rTextBuffer,
- const String & i_rFullFilePath )
-{
- Cout() << "Parse " << i_rFullFilePath << " ..." << Endl();
-
- csv::File aFile( i_rFullFilePath, csv::CFM_READ );
- if (NOT aFile.open())
- {
- Cerr() << " could not be opened.\n" << Endl();
- return false;
- }
- o_rTextBuffer.LoadText(aFile);
- aFile.close();
- return true;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/sdocdist.hxx b/autodoc/source/parser/cpp/sdocdist.hxx
deleted file mode 100644
index e7fe9198..00000000
--- a/autodoc/source/parser/cpp/sdocdist.hxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_SDOCDIST_HXX
-#define ADC_CPP_SDOCDIST_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cxt2ary.hxx"
-#include <ary/info/docstore.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-using ary::Documentation;
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-
-struct ContextForAry::S_DocuDistributor : public ary::info::DocuStore
-{
- public:
- S_DocuDistributor() : pCurRe(0) {}
- ~S_DocuDistributor() {}
-
- void Reset() { pCurRe = 0; pLastStoredDocu = 0; }
-
- void SetCurrentlyStoredRe(
- ary::cpp::CppEntity &
- io_rRe );
- void Event_LineBreak();
-
- private:
- // Interface ary::info::DocuStore
- virtual void do_Store2CurFile(
- DYN ary::doc::Node& let_drDocu );
- virtual void do_Store2CurNamespace(
- DYN ary::doc::Node& let_drDocu );
-
- virtual void do_Store2ConnectedDeclaration(
- DYN ary::doc::Node& let_drDocu );
-
- virtual void do_Store2Glossary(
- DYN ary::doc::Node& let_drDocu,
- const String & i_sExplainedTerm );
- virtual void do_Store2GlobalTexts(
- DYN ary::doc::Node& let_drDocu,
- ary::info::GlobalTextId
- i_nId );
- // DATA
- ary::cpp::CppEntity *
- pCurRe;
- Dyn<ary::doc::Node> pLastStoredDocu;
-};
-
-
-// IMPLEMENTATION
-
-/* The implementation is in header, though not all inline, because this file
- is included in cxt2ary.cxx only!
-*/
-
-
-void
-ContextForAry::
-S_DocuDistributor::SetCurrentlyStoredRe( ary::cpp::CppEntity & io_rRe )
-{
- pCurRe = &io_rRe;
- if ( pLastStoredDocu )
- pCurRe->Set_Docu( *pLastStoredDocu.Release() );
-}
-
-inline void
-ContextForAry::
-S_DocuDistributor::Event_LineBreak()
-{
- pCurRe = 0;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2CurFile( DYN ary::doc::Node & let_drDocu )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2CurNamespace( DYN ary::doc::Node & let_drDocu )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2ConnectedDeclaration( DYN ary::doc::Node & let_drDocu )
-{
- if ( pCurRe != 0 )
- pCurRe->Set_Docu(let_drDocu);
- else
- pLastStoredDocu = &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2Glossary( DYN ary::doc::Node & let_drDocu,
- const String & // i_sExplainedTerm
- )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2GlobalTexts( DYN ary::doc::Node & let_drDocu,
- ary::info::GlobalTextId // i_nId
- )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/sfscope.hxx b/autodoc/source/parser/cpp/sfscope.hxx
deleted file mode 100644
index ec27790a..00000000
--- a/autodoc/source/parser/cpp/sfscope.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_SFSCOPE_HXX
-#define ADC_CPP_SFSCOPE_HXX
-
-// USED SERVICES
-#include "cxt2ary.hxx"
-
-
-
-
-namespace cpp
-{
-
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-struct ContextForAry::S_FileScopeInfo
-{
- ary::loc::File * pCurFile;
- uintt nLineCount;
- Dyn<StringVector> pCurTemplateParameters;
-
- S_FileScopeInfo();
-};
-
-
-
-
-// IMPLEMENTATION
-inline
-ContextForAry::
-S_FileScopeInfo::S_FileScopeInfo()
- : pCurFile(0),
- nLineCount(0),
- pCurTemplateParameters(0)
-{
-}
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/sownstck.hxx b/autodoc/source/parser/cpp/sownstck.hxx
deleted file mode 100644
index 8f4a2d7b..00000000
--- a/autodoc/source/parser/cpp/sownstck.hxx
+++ /dev/null
@@ -1,327 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_SOWNSTCK_HXX
-#define ADC_CPP_SOWNSTCK_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cxt2ary.hxx"
- // COMPONENTS
-#include <ary/cpp/c_types4cpp.hxx>
-#include <estack.hxx>
- // PARAMETERS
-#include <ary/cpp/c_namesp.hxx>
-#include <x_parse.hxx>
-
-
-namespace cpp
-{
-
-using ary::cpp::E_Protection;
-
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-struct ContextForAry::S_OwnerStack
-{
- public:
- S_OwnerStack();
- void SetGlobalNamespace(
- ary::cpp::Namespace &
- io_rGlobalNamespace );
- ~S_OwnerStack();
-
- void Reset();
-
- void OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace );
- void OpenExternC();
- void OpenClass(
- ary::cpp::Class & io_rOpenedClass );
- void OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum );
- void CloseBlock();
- void CloseClass();
- void CloseEnum();
- void SetCurProtection(
- ary::cpp::E_Protection
- i_eProtection );
- ary::cpp::Namespace &
- CurNamespace() const;
- ary::cpp::Class * CurClass() const;
- ary::cpp::Enum * CurEnum() const;
-
- Owner & CurOwner() const;
- ary::cpp::E_Protection
- CurProtection() const;
- bool IsExternC() const { return nExternC > 0; }
-
- private:
- typedef std::pair< ary::cpp::Class*, E_Protection > ClassEnv;
- typedef EStack< ary::cpp::Namespace* > Stack_Namespaces;
- typedef EStack< ClassEnv > Stack_Classes;
- typedef ary::cpp::InputContext::Owner Ifc_Owner;
-
- void SetOwner_2CurNamespace();
- void SetOwner_2CurClass();
- void SetOwner_2None();
-
- // DATA
- Stack_Namespaces aStack_Namespaces;
- Stack_Classes aStack_Classes;
- ary::cpp::Enum * pCurEnum;
- uintt nExternC; /// This is a number, for the case that extern "C" blocks are nested.
-
- Dyn<Owner_Namespace>
- pOwner_Namespace;
- Dyn<Owner_Class> pOwner_Class;
- Ifc_Owner * pOwner_Cur;
-};
-
-
-// IMPLEMENTATION
-
-/* The implementation is in header, though not inline, because this file is included
- in cxt2ary.cxx only!
-*/
-
-inline ary::cpp::Namespace &
-ContextForAry::
-S_OwnerStack::CurNamespace() const
-{
- csv_assert( aStack_Namespaces.size() > 0 );
- return *aStack_Namespaces.top();
-}
-
-inline ary::cpp::Class *
-ContextForAry::
-S_OwnerStack::CurClass() const
-{
- return aStack_Classes.size() > 0
- ? aStack_Classes.top().first
- : (ary::cpp::Class *) 0;
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetOwner_2CurNamespace()
-{
- csv_assert( aStack_Namespaces.size() > 0 );
- pOwner_Cur = pOwner_Namespace.MutablePtr();
- pOwner_Namespace->SetAnotherNamespace( CurNamespace() );
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetOwner_2CurClass()
-{
- csv_assert( aStack_Classes.size() > 0 );
- pOwner_Cur = pOwner_Class.MutablePtr();
- pOwner_Class->SetAnotherClass( *CurClass() );
-}
-
-ContextForAry::
-S_OwnerStack::S_OwnerStack()
- : // aStack_Namespaces,
- // aStack_Classes,
- pCurEnum(0),
- nExternC(0),
- pOwner_Namespace(new Owner_Namespace),
- pOwner_Class(new Owner_Class),
- pOwner_Cur(0)
-{
-}
-
-void
-ContextForAry::
-S_OwnerStack::Reset()
-{
- while ( aStack_Namespaces.top()->Owner().IsValid() )
- aStack_Namespaces.pop();
- while ( NOT aStack_Classes.empty() )
- aStack_Classes.pop();
- pCurEnum = 0;
- nExternC = 0;
- SetOwner_2CurNamespace();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetGlobalNamespace( ary::cpp::Namespace & io_rGlobalNamespace )
-{
- csv_assert( aStack_Namespaces.size() == 0 );
- aStack_Namespaces.push(&io_rGlobalNamespace);
- SetOwner_2CurNamespace();
-}
-
-ContextForAry::
-S_OwnerStack::~S_OwnerStack()
-{
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
-{
- csv_assert( aStack_Namespaces.size() > 0 OR io_rOpenedNamespace.Parent() == 0 );
- aStack_Namespaces.push(&io_rOpenedNamespace);
- SetOwner_2CurNamespace();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::OpenExternC()
-{
- ++nExternC;
-// SetOwner_2None();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetCurProtection( ary::cpp::E_Protection i_eProtection )
-{
- csv_assert( aStack_Classes.size() > 0 );
- aStack_Classes.top().second = i_eProtection;
-}
-
-inline ary::cpp::Enum *
-ContextForAry::
-S_OwnerStack::CurEnum() const
-{
- return pCurEnum;
-}
-
-
-inline ary::cpp::InputContext::Owner &
-ContextForAry::
-S_OwnerStack::CurOwner() const
-{
- csv_assert( pOwner_Cur != 0 );
- return *pOwner_Cur;
-}
-
-inline E_Protection
-ContextForAry::
-S_OwnerStack::CurProtection() const
-{
- return aStack_Classes.size() > 0
- ? aStack_Classes.top().second
- : ary::cpp::PROTECT_global;
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetOwner_2None()
-{
- pOwner_Cur = 0;
-}
-
-void
-ContextForAry::
-S_OwnerStack::OpenClass( ary::cpp::Class & io_rOpenedClass )
-{
- E_Protection eDefaultProtection
- = io_rOpenedClass.ClassKey() == ary::cpp::CK_class
- ? ary::cpp::PROTECT_private
- : ary::cpp::PROTECT_public;
- aStack_Classes.push( ClassEnv(&io_rOpenedClass, eDefaultProtection) );
- SetOwner_2CurClass();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::OpenEnum( ary::cpp::Enum & io_rOpenedEnum )
-{
- csv_assert( pCurEnum == 0 );
- pCurEnum = &io_rOpenedEnum;
- SetOwner_2None();
-}
-
-void
-ContextForAry::
-S_OwnerStack::CloseBlock()
-{
- if (nExternC > 0)
- {
- --nExternC;
- }
- else
- {
- // csv_assert( aStack_Classes.size() == 0 );
- if ( aStack_Classes.size() > 0 )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- csv_assert( pCurEnum == 0 );
- aStack_Namespaces.pop();
-
- // csv_assert( aStack_Namespaces.size() > 0 );
- if( aStack_Namespaces.size() == 0 )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- }
- SetOwner_2CurNamespace();
-}
-
-void
-ContextForAry::
-S_OwnerStack::CloseClass()
-{
- // csv_assert( aStack_Classes.size() > 0 );
- if ( aStack_Classes.size() == 0 )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- aStack_Classes.pop();
- if ( aStack_Classes.size() > 0 )
- SetOwner_2CurClass();
- else
- SetOwner_2CurNamespace();
-}
-
-void
-ContextForAry::
-S_OwnerStack::CloseEnum()
-{
- csv_assert( pCurEnum != 0 );
- pCurEnum = 0;
- if ( aStack_Classes.size() > 0 )
- SetOwner_2CurClass();
- else
- SetOwner_2CurNamespace();
-}
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/srecover.hxx b/autodoc/source/parser/cpp/srecover.hxx
deleted file mode 100644
index 35bc3d7e..00000000
--- a/autodoc/source/parser/cpp/srecover.hxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_SRECOVER_HXX
-#define ADC_CPP_SRECOVER_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cxt2ary.hxx"
-#include <ary/info/docstore.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-struct ContextForAry::S_RecoveryGuard
-{
- public:
- S_RecoveryGuard();
- ~S_RecoveryGuard();
-
- void Reset() { bIsWithinRecovery = false; nBlockBracketsCounter = 0; }
-
- void StartWaitingFor_Recovery();
-
- void Hdl_SwBracketOpen();
- void Hdl_SwBracketClose();
- void Hdl_Semicolon();
-
- bool IsWithinRecovery() const;
-
- private:
- // DATA
- bool bIsWithinRecovery;
- intt nBlockBracketsCounter;
-};
-
-
-
-// IMPLEMENTATION
-
-/* The implementation is in header, though not all inline, because this file
- is included in cxt2ary.cxx only!
-*/
-
-ContextForAry::
-S_RecoveryGuard::S_RecoveryGuard()
- : bIsWithinRecovery(false),
- nBlockBracketsCounter(0)
-{
-}
-
-ContextForAry::
-S_RecoveryGuard::~S_RecoveryGuard()
-{
-}
-
-inline void
-ContextForAry::
-S_RecoveryGuard::StartWaitingFor_Recovery()
-{
- bIsWithinRecovery = true;
- nBlockBracketsCounter = 0;
-}
-
-void
-ContextForAry::
-S_RecoveryGuard::Hdl_SwBracketOpen()
-{
- if ( bIsWithinRecovery )
- ++nBlockBracketsCounter;
-}
-
-void
-ContextForAry::
-S_RecoveryGuard::Hdl_SwBracketClose()
-{
- if ( bIsWithinRecovery )
- --nBlockBracketsCounter;
-}
-
-inline void
-ContextForAry::
-S_RecoveryGuard::Hdl_Semicolon()
-{
- if (bIsWithinRecovery AND nBlockBracketsCounter == 0)
- bIsWithinRecovery = false;
-}
-
-inline bool
-ContextForAry::
-S_RecoveryGuard::IsWithinRecovery() const
-{
- return bIsWithinRecovery;
-}
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/tkp_cpp.cxx b/autodoc/source/parser/cpp/tkp_cpp.cxx
deleted file mode 100644
index 609bdb58..00000000
--- a/autodoc/source/parser/cpp/tkp_cpp.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "tkp_cpp.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include "cx_c_std.hxx"
-#include "c_dealer.hxx"
-
-
-namespace cpp {
-
-
-
-
-TokenParser_Cpp::TokenParser_Cpp( DYN autodoc::TkpDocuContext & let_drDocuContext )
- : pBaseContext( new Context_CppStd( let_drDocuContext ) ),
- pCurContext(0),
- pDealer(0),
- pCharacterSource(0)
-{
- SetStartContext();
-}
-
-TokenParser_Cpp::~TokenParser_Cpp()
-{
-}
-
-void
-TokenParser_Cpp::AssignPartners( CharacterSource & io_rCharacterSource,
- cpp::Distributor & o_rDealer )
-{
- pDealer = &o_rDealer;
- pBaseContext->AssignDealer(o_rDealer);
- pCharacterSource = &io_rCharacterSource;
-}
-
-void
-TokenParser_Cpp::StartNewFile( const csv::ploc::Path & i_file )
-{
- csv_assert(pDealer != 0);
- pDealer->StartNewFile(i_file);
-
- csv_assert(pCharacterSource != 0);
- Start(*pCharacterSource);
-}
-
-void
-TokenParser_Cpp::SetStartContext()
-{
- pCurContext = pBaseContext.Ptr();
-}
-
-void
-TokenParser_Cpp::SetCurrentContext( TkpContext & io_rContext )
-{
- pCurContext = &io_rContext;
-}
-
-TkpContext &
-TokenParser_Cpp::CurrentContext()
-{
- return *pCurContext;
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/tkp_cpp.hxx b/autodoc/source/parser/cpp/tkp_cpp.hxx
deleted file mode 100644
index ac84a76b..00000000
--- a/autodoc/source/parser/cpp/tkp_cpp.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKP_CPP_HXX
-#define ADC_TKP_CPP_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkp.hxx>
- // COMPONENTS
- // PARAMETRS
-
-namespace autodoc
-{
- class TkpDocuContext;
-}
-
-namespace csv
-{
- namespace ploc
- {
- class Path;
- class DirectoryChain;
- }
-}
-
-
-namespace cpp {
-
-class Context_CppStd;
-class DefineDescription;
-class Distributor;
-
-
-/** This is a TokenParser which is able to parse tokens from
- C++ source code.
-*/
-class TokenParser_Cpp : public TokenParser
-{
- public:
- typedef std::map< String, DefineDescription* > MacroMap;
-
- // LIFECYCLE
- TokenParser_Cpp(
- DYN autodoc::TkpDocuContext &
- let_drDocuContext );
- virtual ~TokenParser_Cpp();
-
- // OPERATIONS
- void AssignPartners(
- CharacterSource & io_rCharacterSource,
- cpp::Distributor & o_rDealer );
- void StartNewFile(
- const csv::ploc::Path &
- i_file );
- private:
- virtual void SetStartContext();
- virtual void SetCurrentContext(
- TkpContext & io_rContext );
- virtual TkpContext &
- CurrentContext();
- // DATA
- Dyn<Context_CppStd> pBaseContext;
- TkpContext * pCurContext;
- Distributor * pDealer;
- CharacterSource * pCharacterSource;
-};
-
-
-} // namespace cpp
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/tokintpr.hxx b/autodoc/source/parser/cpp/tokintpr.hxx
deleted file mode 100644
index 2420555d..00000000
--- a/autodoc/source/parser/cpp/tokintpr.hxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_TOKINTPR_HXX
-#define ADC_CPP_TOKINTPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <all_toks.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp {
-
-
-
-#define DECL_TOK_HANDLER(token) \
- void Hdl_##token( \
- const Tok_##token & i_rTok ) { Call_Handler(i_rTok); }
-
-class TokenInterpreter
-{
- public:
- virtual ~TokenInterpreter() {}
-
- DECL_TOK_HANDLER(Identifier)
- DECL_TOK_HANDLER(Operator)
- DECL_TOK_HANDLER(operator)
- DECL_TOK_HANDLER(class)
- DECL_TOK_HANDLER(struct)
- DECL_TOK_HANDLER(union)
- DECL_TOK_HANDLER(enum)
- DECL_TOK_HANDLER(typedef)
- DECL_TOK_HANDLER(public)
- DECL_TOK_HANDLER(protected)
- DECL_TOK_HANDLER(private)
- DECL_TOK_HANDLER(template)
- DECL_TOK_HANDLER(virtual)
- DECL_TOK_HANDLER(friend)
- DECL_TOK_HANDLER(Tilde)
- DECL_TOK_HANDLER(const)
- DECL_TOK_HANDLER(volatile)
- DECL_TOK_HANDLER(extern)
- DECL_TOK_HANDLER(static)
- DECL_TOK_HANDLER(mutable)
- DECL_TOK_HANDLER(register)
- DECL_TOK_HANDLER(inline)
- DECL_TOK_HANDLER(explicit)
- DECL_TOK_HANDLER(namespace)
- DECL_TOK_HANDLER(using)
- DECL_TOK_HANDLER(throw)
- DECL_TOK_HANDLER(SwBracket_Left)
- DECL_TOK_HANDLER(SwBracket_Right)
- DECL_TOK_HANDLER(ArrayBracket_Left)
- DECL_TOK_HANDLER(ArrayBracket_Right)
- DECL_TOK_HANDLER(Bracket_Left)
- DECL_TOK_HANDLER(Bracket_Right)
- DECL_TOK_HANDLER(DoubleColon)
- DECL_TOK_HANDLER(Semicolon)
- DECL_TOK_HANDLER(Comma)
- DECL_TOK_HANDLER(Colon)
- DECL_TOK_HANDLER(Assign)
- DECL_TOK_HANDLER(Less)
- DECL_TOK_HANDLER(Greater)
- DECL_TOK_HANDLER(Asterix)
- DECL_TOK_HANDLER(AmpersAnd)
- DECL_TOK_HANDLER(Ellipse)
- DECL_TOK_HANDLER(typename)
- DECL_TOK_HANDLER(DefineName)
- DECL_TOK_HANDLER(MacroName)
- DECL_TOK_HANDLER(MacroParameter)
- DECL_TOK_HANDLER(PreProDefinition)
- DECL_TOK_HANDLER(BuiltInType)
- DECL_TOK_HANDLER(TypeSpecializer)
- DECL_TOK_HANDLER(Constant)
-
- protected:
- virtual void Call_Handler(
- const cpp::Token & i_rTok ) = 0;
-};
-
-#undef DECL_TOK_HANDLER
-
-
-// IMPLEMENTATION
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/a_rdocu.hxx b/autodoc/source/parser/inc/adoc/a_rdocu.hxx
deleted file mode 100644
index 8a5c56fc..00000000
--- a/autodoc/source/parser/inc/adoc/a_rdocu.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_A_RDOCU_HXX
-#define ADC_ADOC_A_RDOCU_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-class DocuDealer;
-
-
-
-namespace adoc
-{
-
-class Token;
-class Adoc_PE;
-
-class DocuExplorer
-
-{
- public:
- DocuExplorer();
- ~DocuExplorer();
- void StartNewFile(
- DocuDealer & o_rDocuDistributor );
-
- void Process_Token(
- DYN adoc::Token & let_drToken );
- private:
- DocuDealer * pDocuDistributor;
- Dyn<Adoc_PE> pPE;
- bool bIsPassedFirstDocu;
-};
-
-
-} // namespace adoc
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/adoc_tok.hxx b/autodoc/source/parser/inc/adoc/adoc_tok.hxx
deleted file mode 100644
index c7022039..00000000
--- a/autodoc/source/parser/inc/adoc/adoc_tok.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_ADOC_TOK_HXX
-#define ADC_ADOC_ADOC_TOK_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/token.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace adoc {
-
-
-class TokenInterpreter;
-
-
-class Token : public TextToken
-{
- public:
- // LIFECYCLE
- virtual ~Token() {}
-
- // OPERATIONS
- virtual void DealOut(
- ::TokenDealer & o_rDealer );
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const = 0;
-};
-
-
-} // namespace adoc
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/atokdeal.hxx b/autodoc/source/parser/inc/adoc/atokdeal.hxx
deleted file mode 100644
index 7e514698..00000000
--- a/autodoc/source/parser/inc/adoc/atokdeal.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_ATOKDEAL_HXX
-#define ADC_ADOC_ATOKDEAL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tokdeal.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-
-namespace adoc
-{
-
-class Token;
-
-class TokenDealer : virtual public ::TokenDealer
-{
- public:
-
- virtual void Deal_AdcDocu(
- adoc::Token & let_drToken ) = 0;
-};
-
-
-} // namespace adoc
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/cx_a_std.hxx b/autodoc/source/parser/inc/adoc/cx_a_std.hxx
deleted file mode 100644
index b7479f5b..00000000
--- a/autodoc/source/parser/inc/adoc/cx_a_std.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_CX_A_STD_HXX
-#define ADC_ADOC_CX_A_STD_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
- // COMPONENTS
-#include <tokens/tkpstama.hxx>
- // PARAMETERS
-
-class TextToken;
-
-
-namespace adoc {
-
-class Cx_LineStart;
-class Cx_CheckStar;
-class Cx_AtTagCompletion;
-
-
-/**
-@descr
-*/
-class Context_AdocStd : public autodoc::TkpDocuContext,
- private StateMachineContext
-{
- public:
- // LIFECYCLE
- Context_AdocStd();
- virtual void SetParentContext(
- TkpContext & io_rParentContext,
- const char * i_sMultiLineEndToken );
- ~Context_AdocStd();
-
- // OPERATIONS
- virtual void AssignDealer(
- TokenDealer & o_rDealer );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
- virtual void SetMode_IsMultiLine(
- bool i_bTrue );
- // INQUIRY
- virtual TkpContext &
- FollowUpContext();
- private:
- // SERVICE FUNCTIONS
- virtual void PerformStatusFunction(
- uintt i_nStatusSignal,
- F_CRTOK i_fTokenCreateFunction,
- CharacterSource & io_rText );
-
- void SetupStateMachine();
-
- // DATA
- StateMachine aStateMachine;
- TokenDealer * pDealer;
-
- // Contexts
- TkpContext * pParentContext;
- TkpContext * pFollowUpContext;
- Dyn<Cx_LineStart> pCx_LineStart;
- Dyn<Cx_CheckStar> pCx_CheckStar;
- Dyn<Cx_AtTagCompletion>
- pCx_AtTagCompletion;
-
- // Temporary data, used during ReadCharChain()
- Dyn<TextToken> pNewToken;
- bool bIsMultiline;
-};
-
-
-} // namespace adoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/cx_a_sub.hxx b/autodoc/source/parser/inc/adoc/cx_a_sub.hxx
deleted file mode 100644
index 5e649c42..00000000
--- a/autodoc/source/parser/inc/adoc/cx_a_sub.hxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_CX_A_SUB_HXX
-#define ADC_ADOC_CX_A_SUB_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
- // COMPONENTS
-#include <tokens/tkpstama.hxx>
- // PARAMETERS
-#include <tokens/token.hxx>
-
-
-namespace adoc {
-
-
-
-
-class Cx_LineStart : public TkpContext
-{
- public:
- Cx_LineStart(
- TkpContext & i_rFollowUpContext );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
-
- void SetCurToken(
- TextToken::F_CRTOK i_fTokenCreateFunction )
- { fCur_TokenCreateFunction = i_fTokenCreateFunction; }
- void AssignDealer(
- TokenDealer & o_rDealer )
- { pDealer = &o_rDealer; }
- private:
- // DATA
- TokenDealer * pDealer;
- TkpContext * pFollowUpContext;
-
- Dyn<TextToken> pNewToken;
-
- TextToken::F_CRTOK fCur_TokenCreateFunction;
-};
-
-
-/**
-@descr
-*/
-
-class Cx_CheckStar : public TkpContext
-{
- public:
- // LIFECYCLE
- Cx_CheckStar(
- TkpContext & i_rFollowUpContext );
- void Set_End_FollowUpContext(
- TkpContext & i_rEnd_FollowUpContext )
- { pEnd_FollowUpContext = &i_rEnd_FollowUpContext; }
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
-
- void SetCanBeEnd(
- bool i_bCanBeEnd )
- { bCanBeEnd = i_bCanBeEnd; }
- virtual TkpContext &
- FollowUpContext();
- void AssignDealer(
- TokenDealer & o_rDealer )
- { pDealer = &o_rDealer; }
- private:
- // DATA
- TokenDealer * pDealer;
- TkpContext * pFollowUpContext;
- TkpContext * pEnd_FollowUpContext;
-
- Dyn<TextToken> pNewToken;
-
- bool bCanBeEnd;
- bool bEndTokenFound;
-};
-
-
-class Cx_AtTagCompletion : public TkpContext
-{
- public:
- Cx_AtTagCompletion(
- TkpContext & i_rFollowUpContext );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
-
- void SetCurToken(
- TextToken::F_CRTOK i_fTokenCreateFunction )
- { fCur_TokenCreateFunction = i_fTokenCreateFunction; }
- void AssignDealer(
- TokenDealer & o_rDealer )
- { pDealer = &o_rDealer; }
- private:
- // DATA
- TokenDealer * pDealer;
- TkpContext * pFollowUpContext;
-
- Dyn<TextToken> pNewToken;
-
- TextToken::F_CRTOK fCur_TokenCreateFunction;
-};
-
-
-} // namespace adoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/docu_pe.hxx b/autodoc/source/parser/inc/adoc/docu_pe.hxx
deleted file mode 100644
index c4487e69..00000000
--- a/autodoc/source/parser/inc/adoc/docu_pe.hxx
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DOCU_PE_HXX
-#define ADC_DOCU_PE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <adoc/tokintpr.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-namespace doc
-{
- class OldCppDocu;
-}
-namespace info
-{
- class AtTag;
-}
-}
-
-
-
-namespace adoc
-{
-
-
-class Adoc_PE : public TokenInterpreter
-{
- public:
- Adoc_PE();
- ~Adoc_PE();
-
- virtual void Hdl_at_std(
- const Tok_at_std & i_rTok );
- virtual void Hdl_at_base(
- const Tok_at_base & i_rTok );
- virtual void Hdl_at_exception(
- const Tok_at_exception &
- i_rTok );
- virtual void Hdl_at_impl(
- const Tok_at_impl & i_rTok );
- virtual void Hdl_at_key(
- const Tok_at_key & i_rTok );
- virtual void Hdl_at_param(
- const Tok_at_param &
- i_rTok );
- virtual void Hdl_at_see(
- const Tok_at_see & i_rTok );
- virtual void Hdl_at_template(
- const Tok_at_template &
- i_rTok );
- virtual void Hdl_at_interface(
- const Tok_at_interface &
- i_rTok );
- virtual void Hdl_at_internal(
- const Tok_at_internal &
- i_rTok );
- virtual void Hdl_at_obsolete(
- const Tok_at_obsolete &
- i_rTok );
- virtual void Hdl_at_module(
- const Tok_at_module &
- i_rTok );
- virtual void Hdl_at_file(
- const Tok_at_file & i_rTok );
- virtual void Hdl_at_gloss(
- const Tok_at_gloss &
- i_rTok );
- virtual void Hdl_at_global(
- const Tok_at_global &
- i_rTok );
- virtual void Hdl_at_include(
- const Tok_at_include &
- i_rTok );
- virtual void Hdl_at_label(
- const Tok_at_label &
- i_rTok );
- virtual void Hdl_at_since(
- const Tok_at_since &
- i_rTok );
- virtual void Hdl_at_HTML(
- const Tok_at_HTML &
- i_rTok );
- virtual void Hdl_at_NOHTML(
- const Tok_at_NOHTML &
- i_rTok );
-
- virtual void Hdl_DocWord(
- const Tok_DocWord & i_rTok );
-
- virtual void Hdl_Whitespace(
- const Tok_Whitespace &
- i_rTok );
- virtual void Hdl_LineStart(
- const Tok_LineStart &
- i_rTok );
- virtual void Hdl_Eol(
- const Tok_Eol & i_rTok );
-
- virtual void Hdl_EoDocu(
- const Tok_EoDocu & i_rTok );
-
-
- DYN ary::doc::OldCppDocu *
- ReleaseJustParsedDocu();
-
- bool IsComplete() const;
-
- private:
- void InstallAtTag(
- DYN ary::info::AtTag *
- let_dpTag,
- bool i_bImplicit = false ); /// True for implicit @short and @descr.
- ary::doc::OldCppDocu &
- CurDocu();
- ary::info::AtTag & CurAtTag();
- bool UsesHtmlInDocuText();
-
- void RenameCurShortTag();
- void FinishCurShortTag();
-
-
- // DATA
- enum E_TagState
- {
- ts_new,
- ts_std
- };
- enum E_DocuState
- {
- ds_wait_for_short = 0,
- ds_in_short,
- ds_1newline_after_short,
- ds_in_descr,
- ds_std
- };
-
- Dyn<ary::doc::OldCppDocu>
- pCurDocu;
- ary::info::AtTag * pCurAtTag;
- uintt nLineCountInDocu;
- UINT8 nCurSpecialMeaningTokens;
- UINT8 nCurSubtractFromLineStart;
- E_TagState eCurTagState;
- E_DocuState eDocuState;
- bool bIsComplete;
- bool bUsesHtmlInDocuText;
-};
-
-
-// IMPLEMENTATION
-inline bool
-Adoc_PE::IsComplete() const
-{
- return bIsComplete;
-}
-
-
-
-
-} // namespace adoc
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/prs_adoc.hxx b/autodoc/source/parser/inc/adoc/prs_adoc.hxx
deleted file mode 100644
index 35d601b2..00000000
--- a/autodoc/source/parser/inc/adoc/prs_adoc.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_PRS_ADOC_HXX
-#define ADC_ADOC_PRS_ADOC_HXX
-
-
-
-#include <autodoc/prs_docu.hxx>
-
-namespace adoc
-{
-
-
-class DocuParser_AutodocStyle : public autodoc::DocumentationParser_Ifc
-{
- public:
- DocuParser_AutodocStyle();
- virtual ~DocuParser_AutodocStyle();
-
- virtual DYN autodoc::TkpDocuContext *
- Create_DocuContext() const;
-};
-
-
-
-} // namespace adoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/tk_attag.hxx b/autodoc/source/parser/inc/adoc/tk_attag.hxx
deleted file mode 100644
index 923c4018..00000000
--- a/autodoc/source/parser/inc/adoc/tk_attag.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_TK_ATTAG_HXX
-#define ADC_ADOC_TK_ATTAG_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <adoc/adoc_tok.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/info/inftypes.hxx>
-
-namespace adoc {
-
-typedef ary::info::E_AtTagId E_AtTagId;
-
-
-class Tok_at_std : public Token
-{
- public:
- Tok_at_std(
- E_AtTagId i_nId )
- : eId(i_nId) {}
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
- E_AtTagId Id() const { return eId; }
-
- private:
- E_AtTagId eId;
-};
-
-
-#define DECL_TOKEN_CLASS(name) \
-class Tok_##name : public Token \
-{ public: \
- virtual void Trigger( \
- TokenInterpreter & io_rInterpreter ) const; \
- virtual const char * \
- Text() const; \
-}
-
-
-DECL_TOKEN_CLASS(at_base);
-DECL_TOKEN_CLASS(at_exception);
-DECL_TOKEN_CLASS(at_impl);
-DECL_TOKEN_CLASS(at_key);
-DECL_TOKEN_CLASS(at_param);
-DECL_TOKEN_CLASS(at_see);
-DECL_TOKEN_CLASS(at_template);
-DECL_TOKEN_CLASS(at_interface);
-DECL_TOKEN_CLASS(at_internal);
-DECL_TOKEN_CLASS(at_obsolete);
-DECL_TOKEN_CLASS(at_module);
-DECL_TOKEN_CLASS(at_file);
-DECL_TOKEN_CLASS(at_gloss);
-DECL_TOKEN_CLASS(at_global);
-DECL_TOKEN_CLASS(at_include);
-DECL_TOKEN_CLASS(at_label);
-DECL_TOKEN_CLASS(at_HTML);
-DECL_TOKEN_CLASS(at_NOHTML);
-DECL_TOKEN_CLASS(at_since);
-
-
-#undef DECL_TOKEN_CLASS
-
-
-
-} // namespace adoc
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/tk_docw.hxx b/autodoc/source/parser/inc/adoc/tk_docw.hxx
deleted file mode 100644
index f8c8f2bc..00000000
--- a/autodoc/source/parser/inc/adoc/tk_docw.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_TK_DOCW_HXX
-#define ADC_ADOC_TK_DOCW_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <adoc/adoc_tok.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace adoc {
-
-
-class Tok_DocWord : public Token
-{
- public:
- // Spring and Fall
- Tok_DocWord(
- const char * i_sText )
- : sText(i_sText) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- uintt Length() const { return sText.length(); }
-
- private:
- // DATA
- String sText;
-};
-
-class Tok_Whitespace : public Token
-{
- public:
- // Spring and Fall
- Tok_Whitespace(
- UINT8 i_nSize )
- : nSize(i_nSize) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- UINT8 Size() const { return nSize; }
-
- private:
- // DATA
- UINT8 nSize;
-};
-
-class Tok_LineStart : public Token
-{
- public:
- // Spring and Fall
- Tok_LineStart(
- UINT8 i_nSize )
- : nSize(i_nSize) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- UINT8 Size() const { return nSize; }
-
- private:
- // DATA
- UINT8 nSize;
-};
-
-class Tok_Eol : public Token
-{ public:
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
-};
-
-class Tok_EoDocu : public Token
-{ public:
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
-};
-
-
-} // namespace adoc
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/adoc/tokintpr.hxx b/autodoc/source/parser/inc/adoc/tokintpr.hxx
deleted file mode 100644
index 5fc0ca8a..00000000
--- a/autodoc/source/parser/inc/adoc/tokintpr.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_ADOC_TOKINTPR_HXX
-#define ADC_ADOC_TOKINTPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace adoc {
-
-
-class Tok_at_std;
-class Tok_at_base;
-class Tok_at_exception;
-class Tok_at_impl;
-class Tok_at_key;
-class Tok_at_param;
-class Tok_at_see;
-class Tok_at_template;
-class Tok_at_interface;
-class Tok_at_internal;
-class Tok_at_obsolete;
-class Tok_at_module;
-class Tok_at_file;
-class Tok_at_gloss;
-class Tok_at_global;
-class Tok_at_include;
-class Tok_at_label;
-class Tok_at_since;
-class Tok_at_HTML; // Sets default to: Use HTML in DocuText
-class Tok_at_NOHTML; // Sets default to: Don't use HTML in DocuText
-
-class Tok_DocWord;
-class Tok_LineStart;
-class Tok_Whitespace;
-class Tok_Eol;
-class Tok_EoDocu;
-
-
-#define DECL_TOK_HANDLER(token) \
- virtual void Hdl_##token( \
- const Tok_##token & i_rTok ) = 0
-
-
-
-class TokenInterpreter
-{
- public:
- virtual ~TokenInterpreter() {}
-
- DECL_TOK_HANDLER(at_std);
- DECL_TOK_HANDLER(at_base);
- DECL_TOK_HANDLER(at_exception);
- DECL_TOK_HANDLER(at_impl);
- DECL_TOK_HANDLER(at_key);
- DECL_TOK_HANDLER(at_param);
- DECL_TOK_HANDLER(at_see);
- DECL_TOK_HANDLER(at_template);
- DECL_TOK_HANDLER(at_interface);
- DECL_TOK_HANDLER(at_internal);
- DECL_TOK_HANDLER(at_obsolete);
- DECL_TOK_HANDLER(at_module);
- DECL_TOK_HANDLER(at_file);
- DECL_TOK_HANDLER(at_gloss);
- DECL_TOK_HANDLER(at_global);
- DECL_TOK_HANDLER(at_include);
- DECL_TOK_HANDLER(at_label);
- DECL_TOK_HANDLER(at_since);
- DECL_TOK_HANDLER(at_HTML);
- DECL_TOK_HANDLER(at_NOHTML);
- DECL_TOK_HANDLER(DocWord);
- DECL_TOK_HANDLER(Whitespace);
- DECL_TOK_HANDLER(LineStart);
- DECL_TOK_HANDLER(Eol);
- DECL_TOK_HANDLER(EoDocu);
-};
-
-#undef DECL_TOK_HANDLER
-
-
-// IMPLEMENTATION
-
-
-} // namespace adoc
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/cpp/ctokdeal.hxx b/autodoc/source/parser/inc/cpp/ctokdeal.hxx
deleted file mode 100644
index 9b1e8940..00000000
--- a/autodoc/source/parser/inc/cpp/ctokdeal.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CTOKDEAL_HXX
-#define ADC_CPP_CTOKDEAL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tokdeal.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp
-{
-
-class Token;
-class Tok_UnblockMacro;
-
-
-class TokenDealer : virtual public ::TokenDealer
-{
- public:
-
- virtual void Deal_CppCode(
- cpp::Token & let_drToken ) = 0;
-
- /** This is to be used only by the internal macro expander
- ( ::cpp::PreProcessor ).
- These tokens are inserted into the source text temporary to make clear,
- where a specific macro replacement ends and therefore the macro's name
- becomes valid again.
-
- @see ::cpp::Tok_UnblockMacro
- @see ::cpp::PreProcessor
- */
- virtual void Deal_Cpp_UnblockMacro(
- Tok_UnblockMacro & let_drToken ) = 0;
-};
-
-
-
-} // namespace cpp
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/cpp/prs_cpp.hxx b/autodoc/source/parser/inc/cpp/prs_cpp.hxx
deleted file mode 100644
index fe2525cf..00000000
--- a/autodoc/source/parser/inc/cpp/prs_cpp.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_PRS_CPP_HXX
-#define ADC_CPP_PRS_CPP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <autodoc/prs_code.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-struct S_RunningData;
-
-class Cpluplus_Parser : public autodoc::CodeParser_Ifc
-{
- public:
- Cpluplus_Parser();
- virtual ~Cpluplus_Parser();
-
-
- virtual void Setup(
- ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc &
- i_rDocumentationInterpreter );
-
- virtual void Run(
- const autodoc::FileCollector_Ifc &
- i_rFiles );
- private:
- Dyn<S_RunningData> pRunningData;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/doc_deal.hxx b/autodoc/source/parser/inc/doc_deal.hxx
deleted file mode 100644
index 4f94016f..00000000
--- a/autodoc/source/parser/inc/doc_deal.hxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DOC_DEAL_HXX
-#define ADC_DOC_DEAL_HXX
-
-// BASE CLASSES
-#include <tokens/tokproct.hxx>
-// USED SERVICES
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
-namespace doc
-{
- class OldCppDocu;
-}
-}
-
-
-
-
-class DocuDealer
-{
- public:
- // INQUIRY
- virtual ~DocuDealer() {}
-
- // OPERATIONS
- /** @descr
- This distributes the let_drDocu to the matching ary::RepositoryEntity .
-
- If the docu is not inline, it will be saved and later given to the next
- ary::CodeEntity. Or it will be discarded, if there does not come a matching
- ary::CodeEntity .
-
- If the docu is inline after a function header or after an enum value
- or after a function parameter or after a base class, it will be stored
- together with the matching function, enum value, parameter or base class.
-
- If the documentation is @file or @project or @glos(sary) it will be
- stored at the matching ary::cpp::FileGroup, ary::cpp::ProjectGroup
- or ary::Glossary.
- */
- void TakeDocu(
- DYN ary::doc::OldCppDocu &
- let_drInfo );
- private:
- virtual void do_TakeDocu(
- DYN ary::doc::OldCppDocu &
- let_drInfo ) = 0;
-};
-
-
-
-
-// IMPLEMENTATION
-inline void
-DocuDealer::TakeDocu( DYN ary::doc::OldCppDocu & let_drInfo )
- { do_TakeDocu(let_drInfo); }
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/semantic/callf.hxx b/autodoc/source/parser/inc/semantic/callf.hxx
deleted file mode 100644
index 6f06d36a..00000000
--- a/autodoc/source/parser/inc/semantic/callf.hxx
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_CALLF_HXX
-#define ADC_CPP_CALLF_HXX
-
-// USED SERVICES
-
-
-
-
-/** This represents a function to be called, if a specific kind of token
- arrives in the semantic parser.
-
- @descr This class is only to be used as member of PeStatus<PE>.
- @template PE
- The owning ParseEnvironment.
- @see PeStatus, ParseEnvironment
-*/
-template <class PE>
-class CallFunction
-{
- public:
- typedef void (PE::*F_Tok)(const char *);
-
- CallFunction(
- F_Tok i_f2Call,
- INT16 i_nTokType );
-
- F_Tok GetF() const;
- INT16 TokType() const;
-
- private:
- // DATA
- F_Tok f2Call;
- INT16 nTokType;
-};
-
-
-/** One state within a ParseEnvironment.
-
- @template PE
- The owning ParseEnvironment.
-*/
-template <class PE>
-class PeStatus
-{
- public:
- typedef typename CallFunction<PE>::F_Tok F_Tok;
-
- PeStatus(
- PE & i_rMyPE,
- uintt i_nSize,
- F_Tok * i_pFuncArray,
- INT16 * i_pTokTypeArray,
- F_Tok i_pDefault );
- virtual ~PeStatus();
-
- virtual void Call_Handler(
- INT16 i_nTokTypeId,
- const char * i_sTokenText ) const;
-
- private:
- bool CheckForCall(
- uintt i_nPos,
- INT16 i_nTokTypeId,
- const char * i_sTokenText ) const;
-
- PE * pMyPE;
- std::vector< CallFunction<PE> >
- aBranches;
- F_Tok fDefault;
-};
-
-
-template <class PE>
-class PeStatusArray
-{
- public:
- typedef typename PE::E_State State;
-
- PeStatusArray();
- void InsertState(
- State i_ePosition,
- DYN PeStatus<PE> & let_drState );
- ~PeStatusArray();
-
- const PeStatus<PE> &
- operator[](
- State i_ePosition ) const;
-
- void SetCur(
- State i_eCurState );
- const PeStatus<PE> &
- Cur() const;
-
- private:
- DYN PeStatus<PE> * aStati[PE::size_of_states];
- State eState;
-};
-
-
-
-// IMPLEMENTATION
-
-
-// CallFunction
-
-template <class PE>
-CallFunction<PE>::CallFunction( F_Tok i_f2Call,
- INT16 i_nTokType )
- : f2Call(i_f2Call),
- nTokType(i_nTokType)
-{
-}
-
-template <class PE>
-inline typename CallFunction<PE>::F_Tok
-CallFunction<PE>::GetF() const
-{
- return f2Call;
-}
-
-template <class PE>
-inline INT16
-CallFunction<PE>::TokType() const
-{
- return nTokType;
-}
-
-
-
-// PeStatus
-
-template <class PE>
-PeStatus<PE>::PeStatus( PE & i_rMyPE,
- uintt i_nSize,
- F_Tok * i_pFuncArray,
- INT16 * i_pTokTypeArray,
- F_Tok i_fDefault )
- : pMyPE(&i_rMyPE),
- fDefault(i_fDefault)
-{
- aBranches.reserve(i_nSize);
- for ( uintt i = 0; i < i_nSize; ++i )
- {
-// csv_assert(i > 0 ? i_pTokTypeArray[i] > i_pTokTypeArray[i-1] : true);
- aBranches.push_back( CallFunction<PE>( i_pFuncArray[i], i_pTokTypeArray[i]) );
- } // end for
-}
-
-template <class PE>
-PeStatus<PE>::~PeStatus()
-{
-
-}
-
-template <class PE>
-void
-PeStatus<PE>::Call_Handler( INT16 i_nTokTypeId,
- const char * i_sTokenText ) const
-{
- uintt nSize = aBranches.size();
- uintt nPos = nSize / 2;
-
- if ( i_nTokTypeId < aBranches[nPos].TokType() )
- {
- for ( --nPos; intt(nPos) >= 0; --nPos )
- {
- if (CheckForCall(nPos, i_nTokTypeId, i_sTokenText))
- return;
- }
- }
- else
- {
- for ( ; nPos < nSize; ++nPos )
- {
- if (CheckForCall(nPos, i_nTokTypeId, i_sTokenText))
- return;
- }
- }
-
- (pMyPE->*fDefault)(i_sTokenText);
-}
-
-template <class PE>
-bool
-PeStatus<PE>::CheckForCall( uintt i_nPos,
- INT16 i_nTokTypeId,
- const char * i_sTokenText ) const
-{
- if ( aBranches[i_nPos].TokType() == i_nTokTypeId )
- {
- (pMyPE->*aBranches[i_nPos].GetF())(i_sTokenText);
- return true;
- }
- return false;
-}
-
-// PeStatusArray
-
-template <class PE>
-PeStatusArray<PE>::PeStatusArray()
- : eState(PE::size_of_states)
-{
- memset(aStati, 0, sizeof aStati);
-}
-
-template <class PE>
-void
-PeStatusArray<PE>::InsertState( State i_ePosition,
- DYN PeStatus<PE> & let_drState )
-{
- csv_assert(aStati[i_ePosition] == 0);
- aStati[i_ePosition] = &let_drState;
-}
-
-template <class PE>
-PeStatusArray<PE>::~PeStatusArray()
-{
- int i_max = PE::size_of_states;
- for (int i = 0; i < i_max; i++)
- {
- delete aStati[i];
- } // end for
-}
-
-template <class PE>
-inline const PeStatus<PE> &
-PeStatusArray<PE>::operator[]( State i_ePosition ) const
-{
- csv_assert( uintt(i_ePosition) < PE::size_of_states );
- csv_assert( aStati[i_ePosition] != 0 );
- return *aStati[i_ePosition];
-}
-
-template <class PE>
-inline void
-PeStatusArray<PE>::SetCur( State i_eCurState )
-{
- eState = i_eCurState;
-}
-
-
-template <class PE>
-const PeStatus<PE> &
-PeStatusArray<PE>::Cur() const
-{
- return (*this)[eState];
-}
-
-#define SEMPARSE_CREATE_STATUS(penv, state, default_function) \
- pStati->InsertState( state, \
- *new PeStatus<penv>( \
- *this, \
- sizeof( stateT_##state ) / sizeof (INT16), \
- stateF_##state, \
- stateT_##state, \
- &penv::default_function ) )
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/semantic/parseenv.hxx b/autodoc/source/parser/inc/semantic/parseenv.hxx
deleted file mode 100644
index 7f03e1d5..00000000
--- a/autodoc/source/parser/inc/semantic/parseenv.hxx
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSEENV_HXX
-#define ADC_PARSEENV_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace info
-{
-class CodeInfo;
-} // namespace info
-} // namespace ary)
-
-
-
-class SubPeUseIfc;
-
-
-class ParseEnvironment : protected TokenProcessing_Types
-{
- public:
- virtual ~ParseEnvironment() {}
-
- // Parsing
- void Enter(
- E_EnvStackAction i_eWayOfEntering );
- void Leave(
- E_EnvStackAction i_eWayOfLeaving );
- void SetCurSPU(
- const SubPeUseIfc * i_pCurSPU );
-
- ParseEnvironment * Parent() const;
-
-
- // ACCESS
- protected:
- ParseEnvironment(
- ParseEnvironment * i_pParent );
- const SubPeUseIfc * CurSubPeUse() const;
- private:
- virtual void InitData() = 0;
- virtual void TransferData() = 0;
-
- ParseEnvironment * pParent;
- const SubPeUseIfc * pCurSubPe;
-};
-
-class SubPeUseIfc
-{
- public:
- virtual ~SubPeUseIfc() {}
-
- virtual void InitParse() const = 0;
- virtual void GetResults() const = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-inline void
-ParseEnvironment::SetCurSPU( const SubPeUseIfc * i_pCurSPU )
- { pCurSubPe = i_pCurSPU; }
-
-inline ParseEnvironment *
-ParseEnvironment::Parent() const
- { return pParent; }
-
-inline const SubPeUseIfc *
-ParseEnvironment::CurSubPeUse() const
- { return pCurSubPe; }
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/semantic/sub_pe.hxx b/autodoc/source/parser/inc/semantic/sub_pe.hxx
deleted file mode 100644
index 4885a5fa..00000000
--- a/autodoc/source/parser/inc/semantic/sub_pe.hxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_SUB_PE_HXX
-#define ADC_CPP_SUB_PE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-class ParseEnvironment;
-
-template <class PE, class SUB>
-class SubPe
-{
- public:
- typedef SubPe< PE, SUB > self;
-
- SubPe(
- PE & i_rParent );
- PE & Parent() const;
- SUB & Child() const;
-
- ParseEnvironment & Get() const;
-
- private:
- SUB & CreateChild() const;
-
- PE & rParent;
- Dyn<SUB> pChild;
-};
-
-
-
-// IMPLEMENTATION
-
-
-// SubPe
-
-template <class PE, class SUB>
-SubPe<PE,SUB>::SubPe( PE & i_rParent )
- : rParent(i_rParent)
-{
-}
-
-template <class PE, class SUB>
-PE &
-SubPe<PE,SUB>::Parent() const
-{
- return rParent;
-}
-
-template <class PE, class SUB>
-inline SUB &
-SubPe<PE,SUB>::Child() const
-{
- return pChild ? *pChild.MutablePtr() : CreateChild();
-}
-
-template <class PE, class SUB>
-ParseEnvironment &
-SubPe<PE,SUB>::Get() const
-{
- return Child();
-}
-
-template <class PE, class SUB>
-SUB &
-SubPe<PE,SUB>::CreateChild() const
-{
- self * pThis = const_cast< self* >(this);
-
- SUB * pNewChild = new SUB( &rParent);
-
- pThis->pChild = pNewChild;
-
- return *pChild.MutablePtr();
-}
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/semantic/sub_peu.hxx b/autodoc/source/parser/inc/semantic/sub_peu.hxx
deleted file mode 100644
index ac641ac6..00000000
--- a/autodoc/source/parser/inc/semantic/sub_peu.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_SUB_PEU_HXX
-#define ADC_CPP_SUB_PEU_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <semantic/parseenv.hxx>
-#include <tokens/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <semantic/sub_pe.hxx>
-
-
-
-template <class PE, class SUB>
-class SubPeUse : public SubPeUseIfc,
- private TokenProcessing_Types
-{
- public:
- typedef void (PE::*F_INIT)();
- typedef void (PE::*F_RETURN)();
-
- SubPeUse(
- SubPe<PE,SUB> & i_rSubPeCreator,
- F_INIT i_fInit,
- F_RETURN i_fReturn );
- ~SubPeUse();
-
- void Push(
- E_TokenDone i_eDone );
- virtual void InitParse() const;
- virtual void GetResults() const;
-
- PE & Parent() const;
- SUB & Child() const;
-
- private:
- // DATA
- SubPe<PE,SUB> & rSubPeCreator;
- F_INIT fInit;
- F_RETURN fReturn;
-};
-
-
-// IMPLEMENTATION
-
-
-template <class PE, class SUB>
-SubPeUse<PE,SUB>::SubPeUse( SubPe<PE,SUB> & i_rSubPeCreator,
- F_INIT i_fInit,
- F_RETURN i_fReturn )
- : rSubPeCreator(i_rSubPeCreator),
- fInit(i_fInit),
- fReturn(i_fReturn)
-{
-}
-
-template <class PE, class SUB>
-SubPeUse<PE,SUB>::~SubPeUse()
-{
-}
-
-template <class PE, class SUB>
-void
-SubPeUse<PE,SUB>::Push( E_TokenDone i_eDone )
-{
- Parent().SetTokenResult( i_eDone, push, &rSubPeCreator.Get() );
- Parent().SetCurSPU(this);
-}
-
-template <class PE, class SUB>
-void
-SubPeUse<PE,SUB>::InitParse() const
-{
- if (fInit != 0)
- (Parent().*fInit)();
-}
-
-template <class PE, class SUB>
-void
-SubPeUse<PE,SUB>::GetResults() const
-{
- if (fReturn != 0)
- (Parent().*fReturn)();
-}
-
-template <class PE, class SUB>
-inline PE &
-SubPeUse<PE,SUB>::Parent() const
-{
- return rSubPeCreator.Parent();
-}
-
-template <class PE, class SUB>
-inline SUB &
-SubPeUse<PE,SUB>::Child() const
-{
- return rSubPeCreator.Child();
-}
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/parseinc.hxx b/autodoc/source/parser/inc/tokens/parseinc.hxx
deleted file mode 100644
index 73c6c056..00000000
--- a/autodoc/source/parser/inc/tokens/parseinc.hxx
+++ /dev/null
@@ -1,205 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSEINC_HXX
-#define ADC_PARSEINC_HXX
-
-
-#include <tools/tkpchars.hxx>
-
-inline char
-jumpOver( CharacterSource & io_rText,
- char in_c )
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext == in_c;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpTo( CharacterSource & io_rText,
- char in_c )
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext != in_c AND cNext != 0;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpTo( CharacterSource & io_rText,
- char in_c1,
- char in_c2 )
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext != in_c1 AND cNext != in_c2 AND cNext != 0;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpTo( CharacterSource & io_rText,
- char in_c1,
- char in_c2,
- char in_c3 )
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext != in_c1 AND cNext != in_c2 AND cNext != in_c3 AND cNext != 0;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpTo( CharacterSource & io_rText,
- char in_c1,
- char in_c2,
- char in_c3,
- char in_c4 )
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext != in_c1 AND cNext != in_c2 AND cNext != in_c3
- AND cNext != in_c4 AND cNext != 0;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpOverWhite(CharacterSource & io_rText)
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- static_cast<UINT8>(cNext) < 33
- AND cNext != 0 AND cNext != 13 AND cNext != 10;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpToWhite(CharacterSource & io_rText)
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- static_cast<UINT8>(cNext) > 32;
- cNext = io_rText.MoveOn() )
- { }
-
- return cNext;
-}
-
-inline char
-jumpToEol(CharacterSource & io_rText, int & o_rCount_BackslashedLineBreaks )
-{
- o_rCount_BackslashedLineBreaks = 0;
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext != 13 AND cNext != 10 AND cNext != NULCH;
- cNext = io_rText.MoveOn() )
- {
- if ( cNext == '\\')
- {
- cNext = io_rText.MoveOn();
- if ( cNext == 13 )
- io_rText.MoveOn();
- if ( cNext == 10 )
- ++o_rCount_BackslashedLineBreaks;
- }
- }
- return cNext;
-}
-
-inline char
-jumpToEol(CharacterSource & io_rText)
-{
- char cNext;
- for ( cNext = io_rText.CurChar();
- cNext != 13 AND cNext != 10 AND cNext != NULCH;
- cNext = io_rText.MoveOn() )
- {
- if ( cNext == '\\')
- io_rText.MoveOn();
- }
- return cNext;
-}
-
-inline char
-jumpOverEol(CharacterSource & io_rText)
-{
- char cNext = io_rText.CurChar();
-
- if (cNext == 13)
- io_rText.MoveOn();
- if (cNext == 10)
- io_rText.MoveOn();
- return cNext;
-}
-
-
-inline char // Finds a matching closing bracket after the opening one is passed
-jumpToMatchingBracket( CharacterSource & io_rText,
- char in_cBegin,
- char in_cEnd )
-{
- intt nCounter = 1;
- char cNext;
- for ( cNext = io_rText.CurChar();
- nCounter - (cNext == in_cEnd ? 1 : 0) > 0 AND cNext != NULCH;
- cNext = io_rText.MoveOn() )
- {
- if (cNext == in_cEnd)
- nCounter++;
- else if (cNext == in_cBegin)
- nCounter--;
- }
-
- return cNext;
-}
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/stmstarr.hxx b/autodoc/source/parser/inc/tokens/stmstarr.hxx
deleted file mode 100644
index e4433661..00000000
--- a/autodoc/source/parser/inc/tokens/stmstarr.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_STMSTARR_HXX
-#define ADC_STMSTARR_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/stmstate.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <tokens/token.hxx>
-
-
-class StmArrayStatus : public StmStatus
-{
- public:
- typedef TextToken::F_CRTOK F_CRTOK;
-
- // LIFECYCLE
- StmArrayStatus(
- intt i_nStatusSize,
- const INT16 * in_aArrayModel,
- F_CRTOK i_fTokenCreateFunction,
- bool in_bIsDefault );
- ~StmArrayStatus();
-
- // INQUIRY
- StmStatus::Branch NextBy(
- intt in_nFollowersIndex) const;
- F_CRTOK TokenCreateFunction() const
- { return fTokenCreateFunction; }
- virtual bool IsADefault() const;
-
- // ACCESS
- virtual StmArrayStatus *
- AsArray();
- bool SetBranch(
- intt in_nBranchIx,
- StmStatus::Branch in_nBranch );
- void SetTokenCreateFunction(
- F_CRTOK i_fTokenCreateFunction );
- private:
- StmStatus::Branch * dpBranches;
- intt nNrOfBranches;
- F_CRTOK fTokenCreateFunction;
- bool bIsADefault;
-};
-
-
-// IMPLEMENTATION
-
-inline void
-StmArrayStatus::SetTokenCreateFunction( F_CRTOK i_fTokenCreateFunction )
- { fTokenCreateFunction = i_fTokenCreateFunction; }
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/stmstate.hxx b/autodoc/source/parser/inc/tokens/stmstate.hxx
deleted file mode 100644
index f9ce54a5..00000000
--- a/autodoc/source/parser/inc/tokens/stmstate.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_STMSTATE_HXX
-#define ADC_STMSTATE_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-class StmArrayStatus;
-class StmBoundsStatus;
-
-/** A StmStatus is a state within a StateMachine.
- There are two kinds of it. Either its an array of pointers to
- other states within the state machine - an ArrayStatus.
-
- Or it is a BoundsStatus, which shows, the token cannot be
- followed further within the StateMachine.
-**/
-class StmStatus // := "State machine status"
-{
- public:
- typedef intt Branch; /// Values >= 0 give a next #Status' ID.
- /// Values <= 0 tell, that a token is finished.
- /// a value < 0 returns the status back to an upper level state machine.
- // LIFECYCLE
- virtual ~StmStatus() {}
-
- // OPERATIONS
- virtual StmArrayStatus *
- AsArray();
- virtual StmBoundsStatus *
- AsBounds();
-
- // INQUIRY
- virtual bool IsADefault() const = 0;
-};
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/stmstfin.hxx b/autodoc/source/parser/inc/tokens/stmstfin.hxx
deleted file mode 100644
index 846fdf2e..00000000
--- a/autodoc/source/parser/inc/tokens/stmstfin.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_STMSTFIN_HXX
-#define ADC_STMSTFIN_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/stmstate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class TkpContext;
-class StateMachineContext;
-
-/**
-**/
-class StmBoundsStatus : public StmStatus
-{
- public:
- // LIFECYCLE
- StmBoundsStatus(
- StateMachineContext &
- o_rOwner,
- TkpContext & i_rFollowUpContext,
- uintt i_nStatusFunctionNr,
- bool i_bIsDefault );
- // INQUIRY
- TkpContext * FollowUpContext();
- uintt StatusFunctionNr() const;
- virtual bool IsADefault() const;
-
- // ACCESS
- virtual StmBoundsStatus *
- AsBounds();
-
- private:
- StateMachineContext *
- pOwner;
- TkpContext * pFollowUpContext;
- uintt nStatusFunctionNr;
- bool bIsDefault;
-};
-
-inline TkpContext *
-StmBoundsStatus::FollowUpContext()
- { return pFollowUpContext; }
-inline uintt
-StmBoundsStatus::StatusFunctionNr() const
- { return nStatusFunctionNr; }
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/tkp.hxx b/autodoc/source/parser/inc/tokens/tkp.hxx
deleted file mode 100644
index eb361e04..00000000
--- a/autodoc/source/parser/inc/tokens/tkp.hxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKP_HXX
-#define ADC_TKP_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-class CharacterSource;
-class TkpContext;
- // PARAMETRS
-
-
-
-/** This is the interface for parser classes, which get a sequence of tokens from
- a text.
-
- Start() starts to parse the text from the given i_rSource.
- GetNextToken() returns a Token on the heap as long as there are
- still characters in the text left. This can be checked by
- HasMore().
-
- The algorithms for parsing tokens from the text are an issue of
- the derived classes.
-*/
-
-class TokenParser
-{
- public:
- // LIFECYCLE
- TokenParser();
- virtual ~TokenParser() {}
-
- // OPERATIONS
- /** Start parsing a character source. Any previously parsed sources
- are discarded.
- */
- virtual void Start(
- CharacterSource &
- i_rSource );
-
- /** @short Gets the next identifiable token out of the
- source code.
- */
- void GetNextToken();
-
- /// @return true, if there are more tokens to parse.
- bool HasMore() const { return bHasMore; }
-
- private:
- void InitSource(
- CharacterSource &
- i_rSource );
-
- virtual void SetStartContext() = 0;
- virtual void SetCurrentContext(
- TkpContext & io_rContext ) = 0;
- virtual TkpContext &
- CurrentContext() = 0;
- // DATA
- CharacterSource * pChars;
- bool bHasMore;
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/tkpcontx.hxx b/autodoc/source/parser/inc/tokens/tkpcontx.hxx
deleted file mode 100644
index d838cbe2..00000000
--- a/autodoc/source/parser/inc/tokens/tkpcontx.hxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKPCONTX_HXX
-#define ADC_TKPCONTX_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <tokens/token.hxx>
-class CharacterSource;
-class TkpNullContext;
-
-/** @task
- Specifies a context within which tokens are interpreted in a special
- way. For example in parsing C++ there could be a context for code,
- one for comments and a third one for preprocessor statements, because
- each of these would give the same token different meanings.
-
- The three functions
- ReadCharChain()
- PassNewToken()
- FollowUpContext()
- have to be called in this sequence.
-
-**/
-class TkpContext
-{
- public:
- // LIFECYCLE
- virtual ~TkpContext() {}
-
- // OPERATIONS
- /** @descr
- The functions starts to parse with the CurChar() of io_rText.
- It leaves io_rText.CurChar() at the first char of the following Token or
- the following Context.
-
- This function returns, when a context has parsed some characterss
- and completed a token OR left the context.
- If the token is to be ignored, it is cut from io_rText.
-
- If the token is to be parsed further in a different context,
- it is NOT cut from io_rText.
-
- After this function PassNewToken() has to be called.
-
- If the function has found a valid and complete token, PassNewToken()
- passes the parsed token to the internally known receiver and
- returns true. The token is cut from io_rText.
- **/
- virtual void ReadCharChain(
- CharacterSource & io_rText ) = 0;
- /** Has to pass the parsed token to a known receiver.
- If the token is to be parsed further in a different context,
- PassNewToken() returns false, but the token is NOT cut from io_rText.
-
- @return true, if a token was passed.
- false, if the token was not parsed completely by this context
- or if the token is to be ignored.
- */
- virtual bool PassNewToken() = 0;
- virtual TkpContext &
- FollowUpContext() = 0;
-
- static TkpNullContext &
- Null_();
-};
-
-class StateMachineContext
-{
- public:
- typedef TextToken::F_CRTOK F_CRTOK;
-
- virtual ~StateMachineContext() {}
-
- /// Is used by StmBoundsStatus only.
- virtual void PerformStatusFunction(
- uintt i_nStatusSignal,
- F_CRTOK i_fTokenCreateFunction,
- CharacterSource & io_rText ) = 0;
-};
-
-class TkpNullContext : public TkpContext
-{
- public:
- ~TkpNullContext();
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
-};
-
-namespace autodoc
-{
-
-class TkpDocuContext : public TkpContext
-{
- public:
- virtual void SetParentContext(
- TkpContext & io_rParentContext,
- const char * i_sMultiLineEndToken ) = 0;
- virtual void AssignDealer(
- TokenDealer & o_rDealer ) = 0;
- virtual void SetMode_IsMultiLine(
- bool i_bTrue ) = 0;
-};
-
-} // namespace autodoc
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/tkpstama.hxx b/autodoc/source/parser/inc/tokens/tkpstama.hxx
deleted file mode 100644
index 10d36f38..00000000
--- a/autodoc/source/parser/inc/tokens/tkpstama.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKPSTAMA_HXX
-#define ADC_TKPSTAMA_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
- // COMPONENTS
-#include <tokens/stmstarr.hxx>
-#include <tokens/stmstfin.hxx>
-
-/** @descr
- This state-machine models state transitions from one state to another
- per indices of branches. If the indices represent ascii-char-values,
- the state-machine can be used for recognising tokens of text.
-
- The state-machine can be a status itself.
-
- StateMachine needs the array-size of all stati as a guess, how many stati
- the state machine will contain, when at work.
-
-
-**/
-class StateMachine
-{
- public:
- // Types
- typedef StmStatus::Branch Branch;
- typedef StmStatus * * StatusList;
-
- //# Interface self
- // LIFECYCLE
- StateMachine(
- intt in_nStatusSize,
- intt in_nInitial_StatusListSize ); /// The user of the constructor should guess
- /// the approximate number of stati here to
- /// avoid multiple reallocations.
- /// @#AddStatus
- intt AddStatus( /// @return the new #Status' ID
- DYN StmStatus * let_dpStatus);
- /// @#AddToken
- void AddToken(
- const char * in_sToken,
- TextToken::F_CRTOK in_fTokenCreateFunction,
- const INT16 * in_aBranches,
- INT16 in_nBoundsStatus );
- ~StateMachine();
-
-
- // OPERATIONS
- StmBoundsStatus &
- GetCharChain(
- TextToken::F_CRTOK &
- o_nTokenCreateFunction,
- CharacterSource & io_rText );
- private:
- // SERVICE FUNCTIONS
- StmStatus & Status(
- intt in_nStatusNr) const;
- StmArrayStatus &
- CurrentStatus() const;
- StmBoundsStatus *
- BoundsStatus() const;
-
- /// Sets the PeekedStatus.
- void Peek(
- intt in_nBranch);
-
- void ResizeStati(); // Adds space for 32 stati.
-
- // DATA
- StatusList pStati; /// List of Status, implemented as simple C-array of length #nStatiSpace
- /// with nStatiLength valid members (beginning from zero).
- intt nCurrentStatus;
- intt nPeekedStatus;
-
- intt nStatusSize; /// Size of the branch array of a single status.
-
- intt nNrofStati; /// Nr of Stati so far.
- intt nStatiSpace; /// Size of allocated array for #pStati (size in items).
-};
-
-
-
-/** @#AddToken
- @descr
- Adds a token, which will be recogniszeds by the
- statemachine.
-
-
-**/
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/tokdeal.hxx b/autodoc/source/parser/inc/tokens/tokdeal.hxx
deleted file mode 100644
index 7b6a27e5..00000000
--- a/autodoc/source/parser/inc/tokens/tokdeal.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TOKDEAL_HXX
-#define ADC_TOKDEAL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
- class Distributor;
-}
-
-
-class TokenDealer
-
-{
- public:
- virtual ~TokenDealer() {}
-
- virtual void Deal_Eol() = 0;
- virtual void Deal_Eof() = 0;
- virtual cpp::Distributor *
- AsDistributor() = 0;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/token.hxx b/autodoc/source/parser/inc/tokens/token.hxx
deleted file mode 100644
index 26d4976a..00000000
--- a/autodoc/source/parser/inc/tokens/token.hxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TOKEN_HXX
-#define ADC_TOKEN_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETRS
-
-
-class TokenDealer;
-
-/**
-*/
-class TextToken
-{
- public:
- typedef TextToken * (*F_CRTOK)(const char*);
-
- // LIFECYCLE
- virtual ~TextToken() {}
-
-
- // INQUIRY
- virtual const char* Text() const = 0;
-
- virtual void DealOut(
- ::TokenDealer & o_rDealer ) = 0;
-};
-
-class Tok_Eof : public TextToken
-{
- virtual void DealOut( // Implemented in tokdeal.cxx
- TokenDealer & o_rDealer );
- virtual const char* Text() const;
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/tokens/tokproct.hxx b/autodoc/source/parser/inc/tokens/tokproct.hxx
deleted file mode 100644
index 19d8c770..00000000
--- a/autodoc/source/parser/inc/tokens/tokproct.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CPP_TOKPROCT_HXX
-#define ADC_CPP_TOKPROCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-class ParseEnvironment;
-
-/** is a parent class for classes, which take part in parsing tokens semantically.
- It provides some types for them.
-*/
-class TokenProcessing_Types
-{
- public:
- enum E_TokenDone
- {
- not_done = 0,
- done = 1
- };
-
- enum E_EnvStackAction
- {
- stay, // same parse environment
- push, // push sub environment
- pop_success, // return to parent environment, parsing was successful
- pop_failure // return to parent environment, but an error occurred.
- };
-
- struct TokenProcessing_Result
- {
- E_TokenDone eDone;
- E_EnvStackAction eStackAction;
- ParseEnvironment * pEnv2Push;
-
- TokenProcessing_Result()
- : eDone(not_done), eStackAction(stay), pEnv2Push(0) {}
- void Reset() { eDone = not_done; eStackAction = stay; pEnv2Push = 0; }
- };
-
- enum E_ParseResult
- {
- res_error,
- res_complete,
- res_predeclaration
- };
-};
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/x_docu.hxx b/autodoc/source/parser/inc/x_docu.hxx
deleted file mode 100644
index 5967c766..00000000
--- a/autodoc/source/parser/inc/x_docu.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_X_DOCU_HXX
-#define ADC_X_DOCU_HXX
-
-// BASE CLASSES
-#include <autodoc/x_parsing.hxx>
-
-
-
-
-class X_Docu : public autodoc::X_Parser_Ifc
-{
- public:
- // LIFECYCLE
- X_Docu(
- const char * i_tag,
- const char * i_explanation );
- ~X_Docu();
- // INQUIRY
- virtual E_Event GetEvent() const;
- virtual void GetInfo(
- std::ostream & o_rOutputMedium ) const;
-
- private:
- String sTagName;
- String sExplanation;
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/inc/x_parse.hxx b/autodoc/source/parser/inc/x_parse.hxx
deleted file mode 100644
index 57be17cf..00000000
--- a/autodoc/source/parser/inc/x_parse.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_X_PARSE_HXX
-#define ADC_X_PARSE_HXX
-
-// BASE CLASSES
-#include <autodoc/x_parsing.hxx>
-
-
-
-
-class X_Parser : public autodoc::X_Parser_Ifc
-{
- public:
- // LIFECYCLE
- X_Parser(
- E_Event i_eEvent,
- const char * i_sObject,
- const String & i_sCausingFile_FullPath,
- uintt i_nCausingLineNr );
- ~X_Parser();
- // INQUIRY
- virtual E_Event GetEvent() const;
- virtual void GetInfo(
- std::ostream & o_rOutputMedium ) const;
-
- private:
- E_Event eEvent;
- String sObject;
- String sCausingFile_FullPath;
- uintt nCausingLineNr;
-
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/kernel/makefile.mk b/autodoc/source/parser/kernel/makefile.mk
deleted file mode 100644
index 9baf8ab1..00000000
--- a/autodoc/source/parser/kernel/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=parser_kernel
-TARGETTYPE=CUI
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/parsefct.obj \
- $(OBJ)$/x_docu.obj \
- $(OBJ)$/x_parse.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser/kernel/parsefct.cxx b/autodoc/source/parser/kernel/parsefct.cxx
deleted file mode 100644
index da6d9e57..00000000
--- a/autodoc/source/parser/kernel/parsefct.cxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include "parsefct.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cpp/prs_cpp.hxx>
-#include <adoc/prs_adoc.hxx>
-#include <tools/filecoll.hxx>
-
-
-DYN ParseToolsFactory * ParseToolsFactory::dpTheInstance_ = 0;
-
-
-namespace autodoc
-{
-
-ParseToolsFactory_Ifc &
-ParseToolsFactory_Ifc::GetIt_()
-{
- if ( ParseToolsFactory::dpTheInstance_ == 0 )
- ParseToolsFactory::dpTheInstance_ = new ParseToolsFactory;
- return *ParseToolsFactory::dpTheInstance_;
-}
-
-} // namespace autodoc
-
-
-ParseToolsFactory::ParseToolsFactory()
-{
-}
-
-ParseToolsFactory::~ParseToolsFactory()
-{
-}
-
-DYN autodoc::CodeParser_Ifc *
-ParseToolsFactory::Create_Parser_Cplusplus() const
-{
- return new cpp::Cpluplus_Parser;
-}
-
-DYN autodoc::DocumentationParser_Ifc *
-ParseToolsFactory::Create_DocuParser_AutodocStyle() const
-{
- return new adoc::DocuParser_AutodocStyle;
-}
-
-DYN autodoc::FileCollector_Ifc *
-ParseToolsFactory::Create_FileCollector( uintt i_nEstimatedNrOfFiles ) const
-{
- return new FileCollector(i_nEstimatedNrOfFiles);
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/kernel/parsefct.hxx b/autodoc/source/parser/kernel/parsefct.hxx
deleted file mode 100644
index 0978d562..00000000
--- a/autodoc/source/parser/kernel/parsefct.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSER_PARSEFCT_HXX
-#define ADC_PARSER_PARSEFCT_HXX
-
-
-#include <autodoc/parsing.hxx>
-
-
-/** Interface for parsing code of a programming language and
- delivering the information into an Autodoc Repository.
-**/
-class ParseToolsFactory : public autodoc::ParseToolsFactory_Ifc
-{
- public:
- ParseToolsFactory();
- virtual ~ParseToolsFactory();
-
- virtual DYN autodoc::CodeParser_Ifc *
- Create_Parser_Cplusplus() const;
- virtual DYN autodoc::DocumentationParser_Ifc *
- Create_DocuParser_AutodocStyle() const;
- virtual DYN autodoc::FileCollector_Ifc *
- Create_FileCollector(
- uintt i_nEstimatedNrOfFiles ) const;
- private:
- static DYN ParseToolsFactory *
- dpTheInstance_;
-
- friend class autodoc::ParseToolsFactory_Ifc;
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/kernel/x_docu.cxx b/autodoc/source/parser/kernel/x_docu.cxx
deleted file mode 100644
index 4484eb8e..00000000
--- a/autodoc/source/parser/kernel/x_docu.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <x_docu.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-
-X_Docu::X_Docu( const char * i_tag,
- const char * i_explanation )
- : sTagName(i_tag),
- sExplanation(i_explanation)
-{
-}
-
-X_Docu::~X_Docu()
-{
-}
-
-X_Docu::E_Event
-X_Docu::GetEvent() const
-{
- return x_Any;
-}
-
-void
-X_Docu::GetInfo( std::ostream & o_rOutputMedium ) const
-{
- o_rOutputMedium
- << "Error in tag '"
- << sTagName
- << "': "
- << sExplanation
- << Endl();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/kernel/x_parse.cxx b/autodoc/source/parser/kernel/x_parse.cxx
deleted file mode 100644
index 26ee3e5d..00000000
--- a/autodoc/source/parser/kernel/x_parse.cxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <x_parse.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-
-X_Parser::X_Parser( E_Event i_eEvent,
- const char * i_sObject,
- const String & i_sCausingFile_FullPath,
- uintt i_nCausingLineNr )
- : eEvent(i_eEvent),
- sObject(i_sObject),
- sCausingFile_FullPath(i_sCausingFile_FullPath),
- nCausingLineNr(i_nCausingLineNr)
-{
-}
-
-X_Parser::~X_Parser()
-{
-}
-
-X_Parser::E_Event
-X_Parser::GetEvent() const
-{
- return eEvent;
-}
-
-void
-X_Parser::GetInfo( std::ostream & o_rOutputMedium ) const
-{
- o_rOutputMedium << "Error in file "
- << sCausingFile_FullPath
- << " in line "
- << nCausingLineNr
- << ": ";
-
-
- switch (eEvent)
- {
- case x_InvalidChar:
- o_rOutputMedium << "Unknown character '"
- << sObject
- << "'";
- break;
- case x_UnexpectedToken:
- o_rOutputMedium << "Unexpected token \""
- << sObject
- << "\"";
- break;
- case x_UnexpectedEOF:
- o_rOutputMedium << "Unexpected end of file.";
- break;
- case x_UnspecifiedSyntaxError:
- o_rOutputMedium << "Unspecified syntax problem in file.";
- break;
- case x_Any:
- default:
- o_rOutputMedium << "Unspecified parsing exception.";
- } // end switch
- o_rOutputMedium << Endl();
-}
-
-
-std::ostream &
-operator<<( std::ostream & o_rOut,
- const autodoc::X_Parser_Ifc & i_rException )
-{
- i_rException.GetInfo(o_rOut);
- return o_rOut;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/semantic/makefile.mk b/autodoc/source/parser/semantic/makefile.mk
deleted file mode 100644
index da7e8f15..00000000
--- a/autodoc/source/parser/semantic/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=parser_semantic
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/parseenv.obj
-
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser/semantic/parseenv.cxx b/autodoc/source/parser/semantic/parseenv.cxx
deleted file mode 100644
index d73f8cc5..00000000
--- a/autodoc/source/parser/semantic/parseenv.cxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <semantic/parseenv.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <x_parse.hxx>
-
-
-void
-ParseEnvironment::Enter( E_EnvStackAction i_eWayOfEntering )
-{
- switch (i_eWayOfEntering)
- {
- case push:
- InitData();
- if ( Parent() != 0 )
- {
- csv_assert( Parent()->CurSubPeUse() != 0 );
- Parent()->CurSubPeUse()->InitParse();
- }
- break;
- case pop_success:
- break;
- case pop_failure:
- break;
- default:
- csv_assert(false);
- } // end switch
-}
-
-void
-ParseEnvironment::Leave( E_EnvStackAction i_eWayOfLeaving )
-{
- switch (i_eWayOfLeaving)
- {
- case push:
- break;
- case pop_success:
- TransferData();
- if ( Parent() != 0 )
- {
- csv_assert( Parent()->CurSubPeUse() != 0 );
- Parent()->CurSubPeUse()->GetResults();
- }
- break;
- case pop_failure:
- break;
- default:
- csv_assert(false);
- } // end switch
-}
-
-ParseEnvironment::ParseEnvironment( ParseEnvironment * i_pParent )
- : pParent(i_pParent),
- // pDocu,
- pCurSubPe(0)
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/makefile.mk b/autodoc/source/parser/tokens/makefile.mk
deleted file mode 100644
index beb32071..00000000
--- a/autodoc/source/parser/tokens/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=garden
-TARGET=parser_tokens
-TARGETTYPE=CUI
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/stmstarr.obj \
- $(OBJ)$/stmstate.obj \
- $(OBJ)$/stmstfin.obj \
- $(OBJ)$/tkpstama.obj \
- $(OBJ)$/tkp.obj \
- $(OBJ)$/tkpcontx.obj \
- $(OBJ)$/tokdeal.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser/tokens/stmstarr.cxx b/autodoc/source/parser/tokens/stmstarr.cxx
deleted file mode 100644
index 1d86c0ef..00000000
--- a/autodoc/source/parser/tokens/stmstarr.cxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/stmstarr.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <x_parse.hxx>
-
-
-
-StmArrayStatus::StmArrayStatus( intt i_nStatusSize,
- const INT16 * in_aArrayModel,
- F_CRTOK i_fTokenCreateFunction,
- bool in_bIsDefault )
- : dpBranches(new StmStatus::Branch[i_nStatusSize]),
- nNrOfBranches(i_nStatusSize),
- fTokenCreateFunction(i_fTokenCreateFunction),
- bIsADefault(in_bIsDefault)
-{
- if (in_aArrayModel != 0)
- {
- intt count = 0;
- for (const INT16 * get = in_aArrayModel; count < nNrOfBranches; count++, get++)
- dpBranches[count] = *get;
- }
- else //
- {
- memset(dpBranches, 0, nNrOfBranches);
- } // endif
-}
-
-StmArrayStatus::~StmArrayStatus()
-{
- delete [] dpBranches;
-}
-
-bool
-StmArrayStatus::SetBranch( intt in_nBranchIx,
- StmStatus::Branch in_nBranch )
-{
- if ( csv::in_range(intt(0), in_nBranchIx, intt(nNrOfBranches) ) )
- {
- dpBranches[in_nBranchIx] = in_nBranch;
- return true;
- }
- return false;
-}
-
-
-StmStatus::Branch
-StmArrayStatus::NextBy(intt in_nIndex) const
-{
- if (in_nIndex < 0)
- throw X_Parser(X_Parser::x_InvalidChar, "", String::Null_(), 0);
-
- return in_nIndex < nNrOfBranches
- ? dpBranches[in_nIndex]
- : dpBranches[nNrOfBranches - 1];
-}
-
-
-bool
-StmArrayStatus::IsADefault() const
-{
- return bIsADefault;
-}
-
-StmArrayStatus *
-StmArrayStatus::AsArray()
-{
- return this;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/stmstate.cxx b/autodoc/source/parser/tokens/stmstate.cxx
deleted file mode 100644
index 2752a79a..00000000
--- a/autodoc/source/parser/tokens/stmstate.cxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/stmstate.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-
-StmArrayStatus *
-StmStatus::AsArray()
-{
- return 0;
-}
-
-StmBoundsStatus *
-StmStatus::AsBounds()
-{
- return 0;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/stmstfin.cxx b/autodoc/source/parser/tokens/stmstfin.cxx
deleted file mode 100644
index f84d7849..00000000
--- a/autodoc/source/parser/tokens/stmstfin.cxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/stmstfin.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <tokens/tkpcontx.hxx>
-
-
-StmBoundsStatus::StmBoundsStatus( StateMachineContext &
- o_rOwner,
- TkpContext & i_rFollowUpContext,
- uintt i_nStatusFunctionNr,
- bool i_bIsDefault )
- : pOwner(&o_rOwner),
- pFollowUpContext(&i_rFollowUpContext),
- nStatusFunctionNr(i_nStatusFunctionNr),
- bIsDefault(i_bIsDefault)
-{
-}
-
-bool
-StmBoundsStatus::IsADefault() const
-{
- return bIsDefault;
-}
-
-StmBoundsStatus *
-StmBoundsStatus::AsBounds()
-{
- return this;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/tkp.cxx b/autodoc/source/parser/tokens/tkp.cxx
deleted file mode 100644
index 64922f0c..00000000
--- a/autodoc/source/parser/tokens/tkp.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tkp.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <tools/tkpchars.hxx>
-#include <tokens/tkpcontx.hxx>
-
-
-
-TokenParser::TokenParser()
- : pChars(0),
- bHasMore(false)
-{
-}
-
-void
-TokenParser::Start( CharacterSource & i_rSource )
-{
- InitSource(i_rSource);
-}
-
-void
-TokenParser::GetNextToken()
-{
- csv_assert(pChars != 0);
-
- bHasMore = NOT pChars->IsFinished();
-
- for ( bool bDone = NOT bHasMore; NOT bDone; )
- {
- CurrentContext().ReadCharChain(*pChars);
- bDone = CurrentContext().PassNewToken();
- SetCurrentContext(CurrentContext().FollowUpContext());
- }
-}
-
-void
-TokenParser::InitSource( CharacterSource & i_rSource )
-{
- pChars = &i_rSource;
- bHasMore = true;
- SetStartContext();
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/tkpcontx.cxx b/autodoc/source/parser/tokens/tkpcontx.cxx
deleted file mode 100644
index 8c129ea4..00000000
--- a/autodoc/source/parser/tokens/tkpcontx.cxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tkpcontx.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-
-TkpNullContext G_aNullContext;
-
-TkpNullContext &
-TkpContext::Null_()
-{
- return G_aNullContext;
-}
-
-TkpNullContext::~TkpNullContext()
-{
-}
-
-void
-TkpNullContext::ReadCharChain( CharacterSource & )
-{
-}
-
-bool
-TkpNullContext::PassNewToken()
-{
- return false;
-}
-
-TkpContext &
-TkpNullContext::FollowUpContext()
-{
- return *this;
-}
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/tkpstama.cxx b/autodoc/source/parser/tokens/tkpstama.cxx
deleted file mode 100644
index e647a828..00000000
--- a/autodoc/source/parser/tokens/tkpstama.cxx
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tkpstama.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <tokens/stmstarr.hxx>
-#include <tools/tkpchars.hxx>
-
-const intt C_nStatuslistResizeValue = 32;
-const intt C_nTopStatus = 0;
-
-StateMachine::StateMachine( intt in_nStatusSize,
- intt in_nInitial_StatusListSize )
- : pStati(new StmStatus*[in_nInitial_StatusListSize]),
- nCurrentStatus(C_nTopStatus),
- nPeekedStatus(C_nTopStatus),
- nStatusSize(in_nStatusSize),
- nNrofStati(0),
- nStatiSpace(in_nInitial_StatusListSize)
-{
- csv_assert(in_nStatusSize > 0);
- csv_assert(in_nInitial_StatusListSize > 0);
-
- memset(pStati, 0, sizeof(StmStatus*) * nStatiSpace);
-}
-
-intt
-StateMachine::AddStatus(StmStatus * let_dpStatus)
-{
- if (nNrofStati == nStatiSpace)
- {
- ResizeStati();
- }
- pStati[nNrofStati] = let_dpStatus;
- return nNrofStati++;
-}
-
-void
-StateMachine::AddToken( const char * in_sToken,
- TextToken::F_CRTOK in_fTokenCreateFunction,
- const INT16 * in_aBranches,
- INT16 in_nBoundsStatus )
-{
- if (csv::no_str(in_sToken))
- return;
-
- // Durch existierende Stati durchhangeln:
- nCurrentStatus = 0;
- nPeekedStatus = 0;
-
- for ( const char * pChar = in_sToken;
- *pChar != NULCH;
- ++pChar )
- {
- Peek(*pChar);
- StmStatus & rPst = Status(nPeekedStatus);
- if ( rPst.IsADefault() OR rPst.AsBounds() != 0 )
- {
- nPeekedStatus = AddStatus( new StmArrayStatus(nStatusSize, in_aBranches, 0, false ) );
- CurrentStatus().SetBranch( *pChar, nPeekedStatus );
- }
- nCurrentStatus = nPeekedStatus;
- } // end for
- StmArrayStatus & rLastStatus = CurrentStatus();
- rLastStatus.SetTokenCreateFunction(in_fTokenCreateFunction);
- for (intt i = 0; i < nStatusSize; i++)
- {
- if (Status(rLastStatus.NextBy(i)).AsBounds() != 0)
- rLastStatus.SetBranch(i,in_nBoundsStatus);
- } // end for
-}
-
-StateMachine::~StateMachine()
-{
- for (intt i = 0; i < nNrofStati; i++)
- {
- delete pStati[i];
- }
- delete [] pStati;
-}
-
-StmBoundsStatus &
-StateMachine::GetCharChain( TextToken::F_CRTOK & o_nTokenCreateFunction,
- CharacterSource & io_rText )
-{
- nCurrentStatus = C_nTopStatus;
-
- Peek(io_rText.CurChar());
- while (BoundsStatus() == 0)
- {
- nCurrentStatus = nPeekedStatus;
- Peek(io_rText.MoveOn());
- }
- o_nTokenCreateFunction = CurrentStatus().TokenCreateFunction();
-
- return *BoundsStatus();
-}
-
-void
-StateMachine::ResizeStati()
-{
- intt nNewSize = nStatiSpace + C_nStatuslistResizeValue;
- intt i = 0;
- StatusList pNewStati = new StmStatus*[nNewSize];
-
- for ( ; i < nNrofStati; i++)
- {
- pNewStati[i] = pStati[i];
- }
- memset( pNewStati+i,
- 0,
- (nNewSize-i) * sizeof(StmStatus*) );
-
- delete [] pStati;
- pStati = pNewStati;
- nStatiSpace = nNewSize;
-}
-
-StmStatus &
-StateMachine::Status(intt in_nStatusNr) const
-{
- csv_assert( csv::in_range(intt(0), in_nStatusNr, intt(nNrofStati)) );
- return *pStati[in_nStatusNr];
-}
-
-StmArrayStatus &
-StateMachine::CurrentStatus() const
-{
- StmArrayStatus * pCurSt = Status(nCurrentStatus).AsArray();
-
- csv_assert(pCurSt != 0);
- return *pCurSt;
-}
-
-StmBoundsStatus *
-StateMachine::BoundsStatus() const
-{
- return Status(nPeekedStatus).AsBounds();
-}
-
-void
-StateMachine::Peek(intt in_nBranch)
-{
- StmArrayStatus & rSt = CurrentStatus();
- nPeekedStatus = rSt.NextBy(in_nBranch);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/tokens/tokdeal.cxx b/autodoc/source/parser/tokens/tokdeal.cxx
deleted file mode 100644
index 6486b46b..00000000
--- a/autodoc/source/parser/tokens/tokdeal.cxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tokdeal.hxx>
-#include <tokens/token.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-
-
-
-void
-Tok_Eof::DealOut( TokenDealer & o_rDealer )
-{
- o_rDealer.Deal_Eof();
-};
-
-const char *
-Tok_Eof::Text() const
-{
- return "";
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/cx_idlco.cxx b/autodoc/source/parser_i/idl/cx_idlco.cxx
deleted file mode 100644
index 877b7fe4..00000000
--- a/autodoc/source/parser_i/idl/cx_idlco.cxx
+++ /dev/null
@@ -1,547 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/cx_idlco.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <s2_luidl/cx_sub.hxx>
-#include <s2_dsapi/cx_dsapi.hxx>
-#include <tools/tkpchars.hxx>
-#include <tokens/tkpstam2.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tokrecv.hxx>
-#include <x_parse2.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-const intt C_nCppInitialNrOfStati = 400;
-const intt C_nStatusSize = 128;
-
-
-
-const uintt nF_fin_Error = 1;
-const uintt nF_fin_Ignore = 2;
-const uintt nF_fin_Identifier = 3;
-const uintt nF_fin_Keyword = 4;
-const uintt nF_fin_Punctuation = 5;
-const uintt nF_fin_EOL = 6;
-const uintt nF_fin_EOF = 7;
-
-const uintt nF_goto_MLDocu = 10;
-const uintt nF_goto_SLDocu = 11;
-const uintt nF_goto_MLComment = 12;
-const uintt nF_goto_SLComment = 13;
-const uintt nF_goto_Praeprocessor = 14;
-const uintt nF_goto_Assignment = 15;
-
-
-
-const UINT16 nTok_bty_any = 100 + TokBuiltInType::bty_any;
-const UINT16 nTok_bty_boolean = 100 + TokBuiltInType::bty_boolean;
-const UINT16 nTok_bty_byte = 100 + TokBuiltInType::bty_byte;
-const UINT16 nTok_bty_char = 100 + TokBuiltInType::bty_char;
-const UINT16 nTok_bty_double = 100 + TokBuiltInType::bty_double;
-const UINT16 nTok_bty_hyper = 100 + TokBuiltInType::bty_hyper;
-const UINT16 nTok_bty_long = 100 + TokBuiltInType::bty_long;
-const UINT16 nTok_bty_short = 100 + TokBuiltInType::bty_short;
-const UINT16 nTok_bty_string = 100 + TokBuiltInType::bty_string;
-const UINT16 nTok_bty_void = 100 + TokBuiltInType::bty_void;
-const UINT16 nTok_bty_ellipse = 100 + TokBuiltInType::bty_ellipse;
-
-const UINT16 nTok_tmod_unsigned = 200 + TokTypeModifier::tmod_unsigned;
-const UINT16 nTok_tmod_sequence = 200 + TokTypeModifier::tmod_sequence;
-
-const UINT16 nTok_ph_in = 250 + TokParameterHandling::ph_in;
-const UINT16 nTok_ph_out = 250 + TokParameterHandling::ph_out;
-const UINT16 nTok_ph_inout = 250 + TokParameterHandling::ph_inout;
-
-const UINT16 nTok_mt_attribute = 300 + TokMetaType::mt_attribute;
-const UINT16 nTok_mt_constants = 300 + TokMetaType::mt_constants;
-const UINT16 nTok_mt_enum = 300 + TokMetaType::mt_enum;
-const UINT16 nTok_mt_exception = 300 + TokMetaType::mt_exception;
-const UINT16 nTok_mt_ident = 300 + TokMetaType::mt_ident;
-const UINT16 nTok_mt_interface = 300 + TokMetaType::mt_interface;
-const UINT16 nTok_mt_module = 300 + TokMetaType::mt_module;
-const UINT16 nTok_mt_property = 300 + TokMetaType::mt_property;
-const UINT16 nTok_mt_service = 300 + TokMetaType::mt_service;
-const UINT16 nTok_mt_singleton = 300 + TokMetaType::mt_singleton;
-const UINT16 nTok_mt_struct = 300 + TokMetaType::mt_struct;
-const UINT16 nTok_mt_typedef = 300 + TokMetaType::mt_typedef;
-const UINT16 nTok_mt_uik = 300 + TokMetaType::mt_uik;
-
-const UINT16 nTok_ste_bound = 400 + TokStereotype::ste_bound;
-const UINT16 nTok_ste_constrained = 400 + TokStereotype::ste_constrained;
-const UINT16 nTok_ste_const = 400 + TokStereotype::ste_const;
-const UINT16 nTok_ste_maybeambiguous = 400 + TokStereotype::ste_maybeambiguous;
-const UINT16 nTok_ste_maybedefault = 400 + TokStereotype::ste_maybedefault;
-const UINT16 nTok_ste_maybevoid = 400 + TokStereotype::ste_maybevoid;
-const UINT16 nTok_ste_oneway = 400 + TokStereotype::ste_oneway;
-const UINT16 nTok_ste_optional = 400 + TokStereotype::ste_optional;
-const UINT16 nTok_ste_readonly = 400 + TokStereotype::ste_readonly;
-const UINT16 nTok_ste_removable = 400 + TokStereotype::ste_removable;
-const UINT16 nTok_ste_virtual = 400 + TokStereotype::ste_virtual;
-const UINT16 nTok_ste_transient = 400 + TokStereotype::ste_transient;
-const UINT16 nTok_ste_published = 400 + TokStereotype::ste_published;
-
-const UINT16 nTok_raises = 501;
-const UINT16 nTok_needs = 502;
-const UINT16 nTok_observes = 503;
-
-const UINT16 nTok_assignment = 550;
-
-const UINT16 nTok_ignore = 600;
-const UINT16 nTok_none_MLCommentBegin = 601;
-const UINT16 nTok_none_SLCommentBegin = 602;
-const UINT16 nTok_none_MLDocuBegin = 603;
-const UINT16 nTok_none_SLDocuBegin = 604;
-const UINT16 nTok_none_PraeprocessorBegin = 605;
-
-
-const UINT16 nTok_punct_BracketOpen = 700 + TokPunctuation::BracketOpen;
-const UINT16 nTok_punct_BracketClose = 700 + TokPunctuation::BracketClose;
-const UINT16 nTok_punct_ArrayBracketOpen = 700 + TokPunctuation::ArrayBracketOpen;
-const UINT16 nTok_punct_ArrayBracketClose = 700 + TokPunctuation::ArrayBracketClose;
-const UINT16 nTok_punct_CurledBracketOpen = 700 + TokPunctuation::CurledBracketOpen;
-const UINT16 nTok_punct_CurledBracketClose = 700 + TokPunctuation::CurledBracketClose;
-const UINT16 nTok_punct_Semicolon = 700 + TokPunctuation::Semicolon;
-const UINT16 nTok_punct_Colon = 700 + TokPunctuation::Colon;
-const UINT16 nTok_punct_DoubleColon = 700 + TokPunctuation::DoubleColon;
-const UINT16 nTok_punct_Comma = 700 + TokPunctuation::Comma;
-const UINT16 nTok_punct_Minus = 700 + TokPunctuation::Minus;
-const UINT16 nTok_punct_Fullstop = 700 + TokPunctuation::Fullstop;
-const UINT16 nTok_punct_Lesser = 700 + TokPunctuation::Lesser;
-const UINT16 nTok_punct_Greater = 700 + TokPunctuation::Greater;
-
-const UINT16 nTok_EOL = 801;
-const UINT16 nTok_EOF = 802;
-
-
-
-Context_UidlCode::Context_UidlCode( Token_Receiver & o_rReceiver,
- DYN TkpDocuContext & let_drContext_Docu )
- : aStateMachine(C_nStatusSize,C_nCppInitialNrOfStati),
- pReceiver(&o_rReceiver),
- pDocuContext(&let_drContext_Docu),
- dpContext_MLComment(0),
- dpContext_SLComment(0),
- dpContext_Preprocessor(0),
- dpContext_Assignment(0),
- pNewToken(0),
- pFollowUpContext(0)
-{
- dpContext_MLComment = new Context_MLComment(o_rReceiver,*this),
- dpContext_SLComment = new Context_SLComment(o_rReceiver,*this),
- dpContext_Preprocessor = new Context_Praeprocessor(o_rReceiver,*this),
- dpContext_Assignment = new Context_Assignment(o_rReceiver,*this),
-
- pDocuContext->SetParentContext(*this,"*/");
- SetupStateMachine();
-}
-
-Context_UidlCode::~Context_UidlCode()
-{
-}
-
-void
-Context_UidlCode::ReadCharChain( CharacterSource & io_rText )
-{
- pNewToken = 0;
-
- UINT16 nTokenId = 0;
- StmBoundsStatu2 & rBound = aStateMachine.GetCharChain(nTokenId, io_rText);
-
- // !!!
- // The order of the next two lines is essential, because
- // pFollowUpContext may be changed by PerformStatusFunction() also,
- // which then MUST override the previous assignment.
- pFollowUpContext = rBound.FollowUpContext();
- PerformStatusFunction(rBound.StatusFunctionNr(), nTokenId, io_rText);
-}
-
-bool
-Context_UidlCode::PassNewToken()
-{
- if (pNewToken)
- {
- pReceiver->Receive(*pNewToken.Release());
- return true;
- }
- return false;
-}
-
-TkpContext &
-Context_UidlCode::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Context_UidlCode::PerformStatusFunction( uintt i_nStatusSignal,
- UINT16 i_nTokenId,
- CharacterSource & io_rText )
-{
- switch (i_nStatusSignal)
- {
- case nF_fin_Error:
- // KORR_FUTURE
- throw X_AutodocParser(X_AutodocParser::x_InvalidChar);
- // no break, because of throw
- case nF_fin_Ignore:
- pNewToken = 0;
- io_rText.CutToken();
- break;
- case nF_fin_Identifier:
- pNewToken = new TokIdentifier(io_rText.CutToken());
- break;
- case nF_fin_Keyword:
- io_rText.CutToken();
- switch ( i_nTokenId / 50 )
- {
- case 2:
- pNewToken = new TokBuiltInType(i_nTokenId - 100);
- break;
- case 4:
- pNewToken = new TokTypeModifier(i_nTokenId - 200);
- break;
- case 5:
- pNewToken = new TokParameterHandling(i_nTokenId - 250);
- break;
- case 6:
- pNewToken = new TokMetaType(i_nTokenId - 300);
- break;
- case 8:
- pNewToken = new TokStereotype(i_nTokenId - 400);
- break;
- case 10:
- switch (i_nTokenId-500)
- {
- case 1:
- pNewToken = new TokRaises;
- break;
- case 2:
- pNewToken = new TokNeeds;
- break;
- case 3:
- pNewToken = new TokObserves;
- break;
- default:
- csv_assert(false);
- }
- break;
- default:
- csv_assert(false);
- } // end switch ( i_nTokenId / 50 )
- break;
- case nF_fin_Punctuation:
- io_rText.CutToken();
- if (i_nTokenId == nTok_punct_DoubleColon)
- pNewToken = new TokNameSeparator;
- else
- pNewToken = new TokPunctuation(i_nTokenId - 700);
- break;
- case nF_fin_EOL:
- io_rText.CutToken();
- pNewToken = new Tok_EOL;
- pReceiver->Increment_CurLine();
- break;
- case nF_fin_EOF:
- pNewToken = new Tok_EOF;
- break;
- case nF_goto_MLDocu:
- while ( io_rText.CurChar() == '*')
- io_rText.MoveOn();
- io_rText.CutToken();
- pDocuContext->SetMode_IsMultiLine(true);
- break;
- case nF_goto_SLDocu:
- io_rText.CutToken();
- pDocuContext->SetMode_IsMultiLine(false);
- break;
- case nF_goto_MLComment:
- break;
- case nF_goto_SLComment:
- break;
- case nF_goto_Praeprocessor:
- break;
- case nF_goto_Assignment:
- break;
- default:
- csv_assert(false);
- } // end switch (i_nStatusSignal)
-}
-
-void
-Context_UidlCode::SetupStateMachine()
-{
- // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
-// const INT16 top = 0; // Top-Status
- const INT16 wht = 1; // Whitespace-überlese-Status
- const INT16 bez = 2; // Bezeichner-lese-Status
-
- // Tokenfinish-Stati:
- const INT16 finErr = 3;
- const INT16 finIgn = 4;
- const INT16 finBez = 5;
- const INT16 finKeyw = 6;
- const INT16 finPunct = 7;
- const INT16 finEOL = 8;
- const INT16 finEOF = 9;
-
- // Kontextwechsel-Stati:
- const INT16 gotoMld = 10;
- const INT16 gotoSld = 11;
- const INT16 gotoMlc = 12;
- const INT16 gotoSlc = 13;
- const INT16 gotoPrp = 14;
- const INT16 gotoAsg = 15;
-
- // Konstanten zur Benutzung in der Tabelle:
- const INT16 err = finErr;
- const INT16 fbz = finBez;
- const INT16 fig = finIgn;
- const INT16 fof = finEOF;
-// const INT16 fkw = finKeyw;
-// const INT16 fpc = finPunct;
-
- /// Die '0'en werden spaeter durch AddToken() ersetzt.
-
- const INT16 A_nTopStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // 16 ...
- wht,err,wht, 0,err,err,err,err, 0, 0,err,err, 0, 0, 0,err,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,err,err,err,err,err,err, // 48 ...
- err,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez, 0,err, 0,err,bez, // 80 ...
- err,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez, 0,err, 0,err,err, // 112 ...
- };
-
- const INT16 A_nWhitespaceStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht,fig,wht,wht,fig,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // 16 ...
- wht,fig,wht,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig, // 48 ...
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig, // 80 ...
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,err // 112 ...
- };
-
- const INT16 A_nBezeichnerStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fbz,err,err,err,err,err,err,err,err,fbz,fbz,fbz,fbz,fbz,err,err,
- err,err,err,err,err,err,err,err,err,err,fbz,err,err,err,err,err, // 16 ...
- fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,fbz,fbz, // 48 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,bez, // 80 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,err // 112 ...
- };
-
- const INT16 A_nPunctDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err // 112 ...
- };
-
- const INT16 A_nKeywordDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fbz,err,err,err,err,err,err,err,err,fbz,fbz,fbz,fbz,fbz,err,err,
- err,err,err,err,err,err,err,err,err,err,fbz,err,err,err,err,err, // 16 ...
- fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,fbz,fbz, // 48 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,bez, // 80 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,err // 112 ...
- };
-
- DYN StmArrayStatu2 * dpStatusTop
- = new StmArrayStatu2( C_nStatusSize, A_nTopStatus, 0, true);
- DYN StmArrayStatu2 * dpStatusWhite
- = new StmArrayStatu2( C_nStatusSize, A_nWhitespaceStatus, 0, true);
- DYN StmArrayStatu2 * dpStatusBez
- = new StmArrayStatu2( C_nStatusSize, A_nBezeichnerStatus, 0, true);
-
- DYN StmBoundsStatu2 * dpBst_finErr
- = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_Error, true );
- DYN StmBoundsStatu2 * dpBst_finIgn
- = new StmBoundsStatu2( *this, *this, nF_fin_Ignore, true );
- DYN StmBoundsStatu2 * dpBst_finBez
- = new StmBoundsStatu2( *this, *this, nF_fin_Identifier, true );
- DYN StmBoundsStatu2 * dpBst_finKeyw
- = new StmBoundsStatu2( *this, *this, nF_fin_Keyword, false );
- DYN StmBoundsStatu2 * dpBst_finPunct
- = new StmBoundsStatu2( *this, *this, nF_fin_Punctuation, false );
- DYN StmBoundsStatu2 * dpBst_finEOL
- = new StmBoundsStatu2( *this, *this, nF_fin_EOL, false );
- DYN StmBoundsStatu2 * dpBst_finEOF
- = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_EOF, false );
-
- DYN StmBoundsStatu2 * dpBst_gotoMld
- = new StmBoundsStatu2( *this, *pDocuContext, nF_goto_MLDocu, false );
- DYN StmBoundsStatu2 * dpBst_gotoSld
- = new StmBoundsStatu2( *this, *pDocuContext, nF_goto_SLDocu, false );
- DYN StmBoundsStatu2 * dpBst_gotoMlc
- = new StmBoundsStatu2( *this, *dpContext_MLComment, nF_goto_MLComment, false );
- DYN StmBoundsStatu2 * dpBst_gotoSlc
- = new StmBoundsStatu2( *this, *dpContext_SLComment, nF_goto_SLComment, false );
- DYN StmBoundsStatu2 * dpBst_gotoPrp
- = new StmBoundsStatu2( *this, *dpContext_Preprocessor, nF_goto_Praeprocessor, false );
- DYN StmBoundsStatu2 * dpBst_gotoAsg
- = new StmBoundsStatu2( *this, *dpContext_Assignment, nF_goto_Assignment, false );
-
- // dpMain aufbauen:
- aStateMachine.AddStatus(dpStatusTop);
-
- aStateMachine.AddStatus(dpStatusWhite);
- aStateMachine.AddStatus(dpStatusBez);
-
- aStateMachine.AddStatus(dpBst_finErr);
- aStateMachine.AddStatus(dpBst_finIgn);
- aStateMachine.AddStatus(dpBst_finBez);
- aStateMachine.AddStatus(dpBst_finKeyw);
- aStateMachine.AddStatus(dpBst_finPunct);
- aStateMachine.AddStatus(dpBst_finEOL);
- aStateMachine.AddStatus(dpBst_finEOF);
-
- aStateMachine.AddStatus(dpBst_gotoMld);
- aStateMachine.AddStatus(dpBst_gotoSld);
- aStateMachine.AddStatus(dpBst_gotoMlc);
- aStateMachine.AddStatus(dpBst_gotoSlc);
- aStateMachine.AddStatus(dpBst_gotoPrp);
- aStateMachine.AddStatus(dpBst_gotoAsg);
-
- aStateMachine.AddToken("any", nTok_bty_any, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("attribute", nTok_mt_attribute, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("boolean", nTok_bty_boolean, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("bound", nTok_ste_bound, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("byte", nTok_bty_byte, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("char", nTok_bty_char, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("const", nTok_ste_const, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("constants", nTok_mt_constants, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("constrained",
- nTok_ste_constrained, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("double", nTok_bty_double, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("enum", nTok_mt_enum, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("exception", nTok_mt_exception, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("hyper", nTok_bty_hyper, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("ident", nTok_mt_ident, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("in", nTok_ph_in, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("inout", nTok_ph_inout, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("interface", nTok_mt_interface, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("long", nTok_bty_long, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("maybeambiguous",
- nTok_ste_maybeambiguous,A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("maybedefault",
- nTok_ste_maybedefault, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("maybevoid", nTok_ste_maybevoid, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("module", nTok_mt_module, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("needs", nTok_needs, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("observes", nTok_observes, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("oneway", nTok_ste_oneway, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("optional", nTok_ste_optional, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("out", nTok_ph_out, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("property", nTok_mt_property, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("published", nTok_ste_published, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("raises", nTok_raises, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("readonly", nTok_ste_readonly, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("removable", nTok_ste_removable, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("sequence", nTok_tmod_sequence, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("service", nTok_mt_service, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("short", nTok_bty_short, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("singleton", nTok_mt_singleton, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("string", nTok_bty_string, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("struct", nTok_mt_struct, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("transient", nTok_ste_transient, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("typedef", nTok_mt_typedef, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("uik", nTok_mt_uik, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("unsigned", nTok_tmod_unsigned, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("virtual", nTok_ste_virtual, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("void", nTok_bty_void, A_nKeywordDefStatus, finKeyw);
- aStateMachine.AddToken("...", nTok_bty_ellipse, A_nPunctDefStatus, finKeyw);
-
- aStateMachine.AddToken("=", nTok_assignment, A_nPunctDefStatus, gotoAsg);
-
- aStateMachine.AddToken("(", nTok_punct_BracketOpen, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken(")", nTok_punct_BracketClose,A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken("[", nTok_punct_ArrayBracketOpen,
- A_nPunctDefStatus, finIgn);
- aStateMachine.AddToken("]", nTok_punct_ArrayBracketClose,
- A_nPunctDefStatus, finIgn);
- aStateMachine.AddToken("{", nTok_punct_CurledBracketOpen,
- A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken("}", nTok_punct_CurledBracketClose,
- A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken("<", nTok_punct_Lesser, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken(">", nTok_punct_Greater, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken(";", nTok_punct_Semicolon, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken(":", nTok_punct_Colon, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken("::", nTok_punct_DoubleColon, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken(",", nTok_punct_Comma, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken("-", nTok_punct_Minus, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken(".", nTok_punct_Fullstop, A_nPunctDefStatus, finPunct);
- aStateMachine.AddToken("/**", nTok_none_MLDocuBegin, A_nPunctDefStatus, gotoMld);
- aStateMachine.AddToken("///", nTok_none_SLDocuBegin, A_nPunctDefStatus, gotoSld);
- aStateMachine.AddToken("/*", nTok_none_MLCommentBegin,
- A_nPunctDefStatus, gotoMlc);
- aStateMachine.AddToken("//", nTok_none_SLCommentBegin,
- A_nPunctDefStatus, gotoSlc);
- aStateMachine.AddToken("/**/", nTok_ignore, A_nPunctDefStatus, finIgn);
- aStateMachine.AddToken("#", nTok_none_PraeprocessorBegin,
- A_nPunctDefStatus, gotoPrp);
- aStateMachine.AddToken("\r\n", nTok_EOL, A_nPunctDefStatus, finEOL);
- aStateMachine.AddToken("\r", nTok_EOL, A_nPunctDefStatus, finEOL);
- aStateMachine.AddToken("\n", nTok_EOL, A_nPunctDefStatus, finEOL);
- aStateMachine.AddToken("\n\r", nTok_EOL, A_nPunctDefStatus, finEOL);
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/cx_sub.cxx b/autodoc/source/parser_i/idl/cx_sub.cxx
deleted file mode 100644
index facf23f6..00000000
--- a/autodoc/source/parser_i/idl/cx_sub.cxx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/cx_sub.hxx>
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include <s2_luidl/tokrecv.hxx>
-#include <../../parser/inc/tokens/parseinc.hxx>
-#include <x_parse2.hxx>
-#include <s2_luidl/tk_const.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-bool
-Cx_Base::PassNewToken()
-{
- if (pNewToken)
- {
- rReceiver.Receive(*pNewToken.Release());
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_Base::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Context_MLComment::ReadCharChain( CharacterSource & io_rText )
-{
- char cNext = NULCH;
-
- do {
- do {
- cNext = jumpTo(io_rText,'*','\n');
- if (cNext == '\n')
- {
- Receiver().Increment_CurLine();
- cNext = io_rText.MoveOn();
- }
- else if (cNext == NULCH)
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- } while (cNext != '*');
-
- cNext = jumpOver(io_rText,'*');
- if (cNext == NULCH)
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- } while (cNext != '/');
- io_rText.MoveOn();
- io_rText.CutToken();
- SetToken(0);
-}
-
-void
-Context_SLComment::ReadCharChain( CharacterSource & io_rText )
-{
- jumpToEol(io_rText);
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- io_rText.CutToken();
- SetToken(0);
-
- Receiver().Increment_CurLine();
-}
-
-void
-Context_Praeprocessor::ReadCharChain( CharacterSource & io_rText )
-{
- jumpToEol(io_rText);
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- io_rText.CutToken();
- SetToken(0);
-
- Receiver().Increment_CurLine();
-}
-
-void
-Context_Assignment::ReadCharChain( CharacterSource & io_rText )
-{
- // KORR_FUTURE
- // How to handle new lines within this, so he y get realised by
- // ParserInfo?
-
- char cNext = NULCH;
- do {
- if ( (cNext = jumpTo(io_rText,';',',','"','}')) == NULCH )
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- if (cNext == '"')
- {
- cNext = io_rText.MoveOn();
- while (cNext != '"')
- {
- if ( (cNext = jumpTo(io_rText,'"','\\')) == NULCH )
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- if (cNext == '\\')
- io_rText.MoveOn();
- }
- cNext = io_rText.MoveOn();
- } // endif (cNext == '"')
- } while (cNext != ';' AND cNext != ',' AND cNext != '}');
-
- if (cNext == ',' OR cNext == ';')
- io_rText.MoveOn();
- SetToken(new TokAssignment(io_rText.CutToken()));
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/distrib.cxx b/autodoc/source/parser_i/idl/distrib.cxx
deleted file mode 100644
index 3c8cb6a2..00000000
--- a/autodoc/source/parser_i/idl/distrib.cxx
+++ /dev/null
@@ -1,266 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/distrib.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/doc/d_oldidldocu.hxx>
-#include <parser/parserinfo.hxx>
-#include <s2_luidl/tkp_uidl.hxx>
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_dsapi/docu_pe2.hxx>
-#include <adc_cl.hxx>
-#include <x_parse2.hxx>
-
-
-
-const uintt C_nNO_TRY = uintt(-1);
-
-
-namespace csi
-{
-namespace uidl
-{
-
-TokenDistributor::TokenDistributor( ary::Repository & io_rRepository,
- ParserInfo & io_rParserInfo )
- : pTokenSource(0),
- aDocumentation(io_rParserInfo),
- aProcessingData( io_rRepository, aDocumentation, io_rParserInfo )
-{
-}
-
-TokenDistributor::~TokenDistributor()
-{
-}
-
-void
-TokenDistributor::TradeToken()
-{
- bool bGoon = true;
- while (bGoon AND NOT aProcessingData.NextTokenExists())
- {
- bGoon = pTokenSource->GetNextToken();
- }
- if (bGoon)
- aProcessingData.ProcessCurToken();
-}
-
-TokenDistributor::ProcessingData::ProcessingData(
- ary::Repository & io_rRepository,
- Documentation & i_rDocuProcessor,
- ParserInfo & io_rParserInfo )
- : // aEnvironments
- // aTokenQueue
- // itCurToken
- // aCurResult
- nTryCount(0),
- bFinished(false),
- rRepository(io_rRepository),
- rParserInfo(io_rParserInfo),
- pDocuProcessor(&i_rDocuProcessor),
- bPublishedRecentlyOn(false)
-{
- itCurToken = aTokenQueue.end();
-}
-
-TokenDistributor::ProcessingData::~ProcessingData()
-{
-}
-
-void
-TokenDistributor::ProcessingData::SetTopParseEnvironment( UnoIDL_PE & io_pTopParseEnvironment )
-{
- csv::erase_container(aEnvironments);
- aEnvironments.push_back( EnvironmentInfo( &io_pTopParseEnvironment, 0 ) );
- io_pTopParseEnvironment.EstablishContacts(0,rRepository,aCurResult);
-}
-
-void
-TokenDistributor::ProcessingData::Receive( DYN csi::uidl::Token & let_drToken )
-{
- aTokenQueue.push_back( &let_drToken );
- itCurToken = aTokenQueue.end()-1;
-}
-
-void
-TokenDistributor::ProcessingData::Increment_CurLine()
-{
- rParserInfo.Increment_CurLine();
-}
-
-void
-TokenDistributor::ProcessingData::ProcessCurToken()
-{
-
-if (DEBUG_ShowTokens())
-{
- Cout() << (*itCurToken)->Text() << Endl();
-}
-
- aCurResult.reset();
-
- CurEnvironment().ProcessToken( CurToken() );
- AcknowledgeResult();
-}
-
-
-UnoIDL_PE &
-TokenDistributor::ProcessingData::CurEnvironment() const
-{
- csv_assert(aEnvironments.size() > 0);
- csv_assert(aEnvironments.back().first != 0);
-
- return *aEnvironments.back().first;
-}
-
-bool
-TokenDistributor::ProcessingData::NextTokenExists() const
-{
- return itCurToken != aTokenQueue.end();
-}
-
-void
-TokenDistributor::ProcessingData::AcknowledgeResult()
-{
- if (aCurResult.eDone == done)
- ++itCurToken;
-
- switch ( aCurResult.eStackAction )
- {
- case stay:
- if (aCurResult.eDone != done)
- {
- csv_assert(false);
- }
- break;
- case push_sure:
- CurEnv().Leave(push_sure);
- aEnvironments.push_back( EnvironmentInfo(&PushEnv(), C_nNO_TRY) );
- PushEnv().Enter(push_sure);
- PushEnv().SetDocu(pDocuProcessor->ReleaseLastParsedDocu());
- if (bPublishedRecentlyOn)
- {
- PushEnv().SetPublished();
- bPublishedRecentlyOn = false;
- }
-
- break;
- case push_try:
- Cout() << "TestInfo: Environment tried." << Endl();
- CurEnv().Leave(push_try);
- aEnvironments.push_back( EnvironmentInfo(&PushEnv(), CurTokenPosition()) );
- nTryCount++;
- PushEnv().Enter(push_try);
- break;
- case pop_success:
- CurEnv().Leave(pop_success);
- if ( CurEnv_TriedTokenPosition() > 0 )
- DecrementTryCount();
- aEnvironments.pop_back();
- CurEnv().Enter(pop_success);
- break;
- case pop_failure:
- {
- CurEnv().Leave(pop_failure);
- if (aCurResult.eDone == done)
- {
- csv_assert(false);
- }
-
- if ( CurEnv_TriedTokenPosition() == C_nNO_TRY )
- throw X_AutodocParser( X_AutodocParser::x_UnexpectedToken, (*itCurToken)->Text() );
-
- itCurToken = aTokenQueue.begin() + CurEnv_TriedTokenPosition();
- DecrementTryCount();
- aEnvironments.pop_back();
- CurEnv().Enter(pop_failure);
- } break;
- default:
- csv_assert(false);
- } // end switch(aCurResult.eStackAction)
-}
-
-void
-TokenDistributor::ProcessingData::DecrementTryCount()
-{
- nTryCount--;
- if (nTryCount == 0)
- {
- aTokenQueue.erase(aTokenQueue.begin(), itCurToken);
- itCurToken = aTokenQueue.begin();
- }
-}
-
-TokenDistributor::
-Documentation::Documentation(ParserInfo & io_rParserInfo)
- : pDocuParseEnv(new csi::dsapi::SapiDocu_PE(io_rParserInfo)),
- rParserInfo(io_rParserInfo),
- pMostRecentDocu(0),
- bIsPassedFirstDocu(false)
-{
-}
-
-TokenDistributor::
-Documentation::~Documentation()
-{
-}
-
-void
-TokenDistributor::
-Documentation::Receive( DYN csi::dsapi::Token & let_drToken )
-{
- csv_assert(pDocuParseEnv);
-
- pDocuParseEnv->ProcessToken(let_drToken);
- if ( pDocuParseEnv->IsComplete() )
- {
- pMostRecentDocu = pDocuParseEnv->ReleaseJustParsedDocu();
- if (NOT bIsPassedFirstDocu)
- {
- pMostRecentDocu = 0; // Deletes the most recent docu.
- bIsPassedFirstDocu = true;
- }
- }
-}
-
-void
-TokenDistributor::
-Documentation::Increment_CurLine()
-{
- rParserInfo.Increment_CurLine();
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/makefile.mk b/autodoc/source/parser_i/idl/makefile.mk
deleted file mode 100644
index 74495487..00000000
--- a/autodoc/source/parser_i/idl/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=parser2_s2_luidl
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/cx_idlco.obj \
- $(OBJ)$/cx_sub.obj \
- $(OBJ)$/distrib.obj \
- $(OBJ)$/parsenv2.obj \
- $(OBJ)$/pe_attri.obj \
- $(OBJ)$/pe_const.obj \
- $(OBJ)$/pe_enum2.obj \
- $(OBJ)$/pe_evalu.obj \
- $(OBJ)$/pe_excp.obj \
- $(OBJ)$/pe_file2.obj \
- $(OBJ)$/pe_func2.obj \
- $(OBJ)$/pe_iface.obj \
- $(OBJ)$/pe_property.obj \
- $(OBJ)$/pe_selem.obj \
- $(OBJ)$/pe_servi.obj \
- $(OBJ)$/pe_singl.obj \
- $(OBJ)$/pe_struc.obj \
- $(OBJ)$/pe_tydf2.obj \
- $(OBJ)$/pe_type2.obj \
- $(OBJ)$/pe_vari2.obj \
- $(OBJ)$/pestate.obj \
- $(OBJ)$/semnode.obj \
- $(OBJ)$/tk_const.obj \
- $(OBJ)$/tk_ident.obj \
- $(OBJ)$/tk_keyw.obj \
- $(OBJ)$/tk_punct.obj \
- $(OBJ)$/tkp_uidl.obj \
- $(OBJ)$/unoidl.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser_i/idl/parsenv2.cxx b/autodoc/source/parser_i/idl/parsenv2.cxx
deleted file mode 100644
index cd8d6d7f..00000000
--- a/autodoc/source/parser_i/idl/parsenv2.cxx
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/parsenv2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary.hxx>
-#include <ary/getncast.hxx>
-#include <ary/qualiname.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_ce.hxx>
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/i_enumvalue.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <parser/parserinfo.hxx>
-#include <adc_msg.hxx>
-#include <s2_luidl/uidl_tok.hxx>
-#include <x_parse2.hxx>
-
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-UnoIDL_PE::~UnoIDL_PE()
-{
-}
-
-void
-UnoIDL_PE::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- pRepository = &io_rRepository;
- aMyNode.EstablishContacts(io_pParentPE, io_rRepository.Gate_Idl(), o_rResult);
-}
-
-//void
-//UnoIDL_PE::EstablishContacts( UnoIDL_PE * io_pParentPE,
-// ary::idl::Gate & io_rGate,
-// TokenProcessing_Result & o_rResult )
-//{
-// aMyNode.EstablishContacts(io_pParentPE, io_rGate, o_rResult);
-//}
-
-void
-UnoIDL_PE::Enter( E_EnvStackAction i_eWayOfEntering )
-{
- switch (i_eWayOfEntering)
- {
- case push_sure:
- InitData();
- break;
- case push_try:
- csv_assert(false);
- break;
- case pop_success:
- ReceiveData();
- break;
- case pop_failure:
- throw X_AutodocParser(X_AutodocParser::x_Any);
- // no break because of throw
- default:
- csv_assert(false);
- } // end switch
-}
-
-void
-UnoIDL_PE::Leave( E_EnvStackAction i_eWayOfLeaving )
-{
- switch (i_eWayOfLeaving)
- {
- case push_sure:
- break;
- case push_try:
- csv_assert(false);
- break;
- case pop_success:
- TransferData();
- break;
- case pop_failure:
- throw X_AutodocParser(X_AutodocParser::x_Any);
- // no break because of throw
- default:
- csv_assert(false);
- } // end switch
-}
-
-void
-UnoIDL_PE::SetDocu( DYN ary::doc::OldIdlDocu * let_dpDocu )
-{
- pDocu = let_dpDocu;
-}
-
-void
-UnoIDL_PE::SetPublished()
-{
- if (NOT pDocu)
- {
- pDocu = new ary::doc::OldIdlDocu;
- }
- pDocu->SetPublished();
-}
-
-void
-UnoIDL_PE::SetOptional()
-{
- if (NOT pDocu)
- {
- pDocu = new ary::doc::OldIdlDocu;
- }
- pDocu->SetOptional();
-}
-
-void
-UnoIDL_PE::PassDocuAt( ary::idl::CodeEntity & io_rCe )
-{
- if (pDocu)
- {
- io_rCe.Set_Docu(*pDocu.Release());
- }
- else if // KORR_FUTURE
- // Re-enable doc-warning for Enum Values, as soon as there is a
- // @option -no-doc-for-enumvalues.
- ( NOT ary::is_type<ary::idl::Module>(io_rCe)
- AND NOT ary::is_type<ary::idl::Enum>(io_rCe) )
- {
- TheMessages().Out_MissingDoc(
- io_rCe.LocalName(),
- ParseInfo().CurFile(),
- ParseInfo().CurLine() );
- }
-}
-
-void
-UnoIDL_PE::InitData()
-{
- // Needs not anything to do.
-}
-
-void
-UnoIDL_PE::ReceiveData()
-{
- // Needs not anything to do.
-}
-
-const ary::idl::Module &
-UnoIDL_PE::CurNamespace() const
-{
- if ( Parent() != 0 )
- return Parent()->CurNamespace();
- else
- {
- csv_assert(false);
- return *(const ary::idl::Module*)0;
- }
-}
-
-const ParserInfo &
-UnoIDL_PE::ParseInfo() const
-{
- if ( Parent() != 0 )
- return Parent()->ParseInfo();
- else
- {
- csv_assert(false);
- return *(const ParserInfo*)0;
- }
-}
-
-UnoIDL_PE::UnoIDL_PE()
- : aMyNode(),
- pDocu(),
- pRepository(0)
-{
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_attri.cxx b/autodoc/source/parser_i/idl/pe_attri.cxx
deleted file mode 100644
index fe362c42..00000000
--- a/autodoc/source/parser_i/idl/pe_attri.cxx
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_attri.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_attribute.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/pe_vari2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-PE_Attribute::PE_Attribute( const Ce_id & i_rCurOwner )
- : eState(e_none),
- pCurOwner(&i_rCurOwner),
- pPE_Variable(0),
- pPE_Exception(0),
- pCurAttribute(0),
- nCurParsedType(0),
- sCurParsedName(),
- bReadOnly(false),
- bBound(false)
-{
- pPE_Variable = new PE_Variable(nCurParsedType, sCurParsedName);
- pPE_Exception = new PE_Type(nCurParsedType);
-}
-
-void
-PE_Attribute::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Variable->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Exception->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Attribute::~PE_Attribute()
-{
-}
-
-void
-PE_Attribute::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Attribute::Process_Identifier( const TokIdentifier & i_rToken )
-{
- switch (eState)
- {
- case e_start:
- SetResult(not_done, push_sure, pPE_Variable.Ptr());
- eState = in_variable;
- break;
- case in_raise_std:
- if (strcmp(i_rToken.Text(),"get") == 0)
- {
- SetResult(done, stay);
- eState = in_get;
- }
- else if (strcmp(i_rToken.Text(),"set") == 0)
- {
- SetResult(done, stay);
- eState = in_set;
- }
- else
- {
- SetResult(not_done, pop_failure);
- eState = e_none;
- }
- break;
- case in_get:
- case in_set:
- SetResult(not_done, push_sure, pPE_Exception.Ptr());
- break;
- default:
- SetResult(not_done, pop_failure);
- } // end switch
-}
-
-void
-PE_Attribute::Process_Stereotype( const TokStereotype & i_rToken )
-{
- if (eState != e_start)
- {
- SetResult(not_done, pop_failure);
- eState = e_none;
- return;
- }
-
- switch (i_rToken.Id())
- {
- case TokStereotype::ste_readonly:
- bReadOnly = true;
- break;
- case TokStereotype::ste_bound:
- bBound = true;
- break;
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- return;
- } // end switch
-
- SetResult(done, stay);
-}
-
-void
-PE_Attribute::Process_MetaType( const TokMetaType & i_rToken )
-{
- if (eState != e_start OR i_rToken.Id() != TokMetaType::mt_attribute)
- {
- SetResult(not_done, pop_failure);
- eState = e_none;
- return;
- }
-
- SetResult(done, stay);
-}
-
-void
-PE_Attribute::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- switch (eState)
- {
- case e_start:
- SetResult(done, stay);
- break;
- case expect_end:
- switch(i_rToken.Id())
- {
- case TokPunctuation::Semicolon:
- SetResult(done, pop_success);
- eState = e_none;
- break;
- case TokPunctuation::Comma:
- SetResult(not_done, pop_failure);
- Cerr() << "Autodoc does not support comma separated attributes, because those are discouraged by IDL policies." << Endl();
- break;
- case TokPunctuation::CurledBracketOpen:
- SetResult(done, stay);
- eState = in_raise_std;
- break;
- default:
- SetResult(not_done, pop_failure);
- } // end switch
- break;
- case in_raise_std:
- SetResult(done, stay);
- if (i_rToken.Id() == TokPunctuation::CurledBracketClose)
- {
- eState = expect_end;
- }
- break;
- case in_get:
- case in_set:
- SetResult(done, stay);
- if (i_rToken.Id() == TokPunctuation::Semicolon)
- {
- eState = in_raise_std;
- }
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_Attribute::Process_Raises()
-{
- if (eState == in_get OR eState == in_set)
- {
- SetResult(done, stay);
- }
- else
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Attribute::Process_Default()
-{
- if (eState == e_start)
- {
- SetResult(not_done, push_sure, pPE_Variable.Ptr());
- eState = in_variable;
- }
- else if (eState == in_get OR eState == in_set)
- SetResult(not_done, push_sure, pPE_Exception.Ptr());
- else
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Attribute::InitData()
-{
- eState = e_start;
-
- pCurAttribute = 0;
- nCurParsedType = 0;
- sCurParsedName = "";
- bReadOnly = false;
- bBound = false;
-}
-
-void
-PE_Attribute::TransferData()
-{
- eState = e_none;
-}
-
-void
-PE_Attribute::ReceiveData()
-{
- switch (eState)
- {
- case in_variable:
- csv_assert(pCurOwner->IsValid());
- pCurAttribute = &Gate().Ces().Store_Attribute(
- *pCurOwner,
- sCurParsedName,
- nCurParsedType,
- bReadOnly,
- bBound );
- PassDocuAt(*pCurAttribute);
- nCurParsedType = 0;
- eState = expect_end;
- break;
- case in_get:
- csv_assert(pCurAttribute != 0);
- pCurAttribute->Add_GetException(nCurParsedType);
- nCurParsedType = 0;
- break;
- case in_set:
- csv_assert(pCurAttribute != 0);
- pCurAttribute->Add_SetException(nCurParsedType);
- nCurParsedType = 0;
- break;
- default:
- csv_assert(false);
- } // end switch
-}
-
-
-UnoIDL_PE &
-PE_Attribute::MyPE()
-{
- return *this;
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_const.cxx b/autodoc/source/parser_i/idl/pe_const.cxx
deleted file mode 100644
index 7b07b8d8..00000000
--- a/autodoc/source/parser_i/idl/pe_const.cxx
+++ /dev/null
@@ -1,282 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_const.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_constant.hxx>
-#include <ary/idl/i_constgroup.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/pe_evalu.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-#ifdef DF
-#undef DF
-#endif
-#define DF &PE_Constant::On_Default
-
-PE_Constant::F_TOK
-PE_Constant::aDispatcher[PE_Constant::e_STATES_MAX][PE_Constant::tt_MAX] =
- { { DF, DF, DF }, // e_none
- { DF, &PE_Constant::On_expect_name_Identifier,
- DF }, // expect_name
- { DF, DF, &PE_Constant::On_expect_curl_bracket_open_Punctuation }, // expect_curl_bracket_open
- { &PE_Constant::On_expect_const_Stereotype,
- DF, &PE_Constant::On_expect_const_Punctuation }, // expect_const
- { DF, &PE_Constant::On_expect_value_Identifier,
- DF }, // expect_value
- { DF, DF, &PE_Constant::On_expect_finish_Punctuation } // expect_finish
- };
-
-
-
-inline void
-PE_Constant::CallHandler( const char * i_sTokenText,
- E_TokenType i_eTokenType )
- { (this->*aDispatcher[eState][i_eTokenType])(i_sTokenText); }
-
-
-
-
-PE_Constant::PE_Constant()
- : eState(e_none),
- sData_Name(),
- nDataId(0),
- pPE_Type(0),
- nType(0),
- pPE_Value(0),
- sName(),
- sAssignment()
-{
- pPE_Type = new PE_Type(nType);
- pPE_Value = new PE_Value(sName, sAssignment, true);
-}
-
-void
-PE_Constant::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Value->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Constant::~PE_Constant()
-{
-}
-
-void
-PE_Constant::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Constant::Process_Identifier( const TokIdentifier & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_identifier);
-}
-
-void
-PE_Constant::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_punctuation);
-}
-
-void
-PE_Constant::Process_Stereotype( const TokStereotype & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_stereotype);
-}
-
-void
-PE_Constant::On_expect_name_Identifier(const char * i_sText)
-{
- sName = i_sText;
-
- SetResult(done,stay);
- eState = expect_curl_bracket_open;
-}
-
-void
-PE_Constant::On_expect_curl_bracket_open_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == '{')
- {
- sData_Name = sName;
-
- ary::idl::ConstantsGroup &
- rCe = Gate().Ces().
- Store_ConstantsGroup(CurNamespace().CeId(),sData_Name);
- PassDocuAt(rCe);
- nDataId = rCe.CeId();
-
- SetResult(done,stay);
- eState = expect_const;
- }
- else
- {
- On_Default(i_sText);
- }
-}
-
-void
-PE_Constant::On_expect_const_Stereotype(const char *)
-{
- SetResult( done, push_sure, pPE_Type.Ptr() );
-}
-
-void
-PE_Constant::On_expect_const_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == '}')
- {
- SetResult(done,stay);
- eState = expect_finish;
- }
- else
- {
- On_Default(i_sText);
- }
-}
-
-void
-PE_Constant::On_expect_value_Identifier(const char *)
-{
- SetResult( not_done, push_sure, pPE_Value.Ptr() );
-}
-
-void
-PE_Constant::On_expect_finish_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == ';')
- {
- SetResult(done,pop_success);
- eState = e_none;
- }
- else
- {
- On_Default(i_sText);
- }
-}
-
-void
-PE_Constant::On_Default(const char * )
-{
- SetResult(not_done,pop_failure);
- eState = e_none;
-}
-
-void
-PE_Constant::EmptySingleConstData()
-{
- nType = 0;
- sName = "";
- sAssignment = "";
-}
-
-void
-PE_Constant::CreateSingleConstant()
-{
- ary::idl::Constant &
- rCe = Gate().Ces().Store_Constant( nDataId,
- sName,
- nType,
- sAssignment );
- pPE_Type->PassDocuAt(rCe);
-}
-
-void
-PE_Constant::InitData()
-{
- eState = expect_name;
-
- sData_Name.clear();
- nDataId = 0;
-
- EmptySingleConstData();
-}
-
-void
-PE_Constant::ReceiveData()
-{
- switch (eState)
- {
- case expect_const:
- eState = expect_value;
- break;
- case expect_value:
- {
- if (sName.length() == 0 OR sAssignment.length() == 0 OR NOT nType.IsValid())
- {
- Cerr() << "Constant without value found." << Endl();
- eState = expect_const;
- break;
- }
-
- CreateSingleConstant();
- EmptySingleConstData();
- eState = expect_const;
- } break;
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- } // end switch
-}
-
-void
-PE_Constant::TransferData()
-{
- csv_assert(nDataId.IsValid());
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Constant::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_enum2.cxx b/autodoc/source/parser_i/idl/pe_enum2.cxx
deleted file mode 100644
index e6e96cfd..00000000
--- a/autodoc/source/parser_i/idl/pe_enum2.cxx
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_enum2.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_enum.hxx>
-#include <ary/idl/i_enumvalue.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_evalu.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-#ifdef DF
-#undef DF
-#endif
-#define DF &PE_Enum::On_Default
-
-PE_Enum::F_TOK
-PE_Enum::aDispatcher[PE_Enum::e_STATES_MAX][PE_Enum::tt_MAX] =
- { { DF, DF }, // e_none
- { &PE_Enum::On_expect_name_Identifier,
- DF }, // expect_name
- { DF, &PE_Enum::On_expect_curl_bracket_open_Punctuation }, // expect_curl_bracket_open
- { &PE_Enum::On_expect_value_Identifier,
- &PE_Enum::On_expect_value_Punctuation }, // expect_value
- { DF, &PE_Enum::On_expect_finish_Punctuation } // expect_finish
- };
-
-
-
-inline void
-PE_Enum::CallHandler( const char * i_sTokenText,
- E_TokenType i_eTokenType )
- { (this->*aDispatcher[eState][i_eTokenType])(i_sTokenText); }
-
-
-
-
-PE_Enum::PE_Enum()
- : eState(e_none),
- sData_Name(),
- nDataId(0),
- pPE_Value(0),
- sName(),
- sAssignment()
-{
- pPE_Value = new PE_Value(sName, sAssignment, false);
-}
-
-void
-PE_Enum::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Value->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Enum::~PE_Enum()
-{
-}
-
-void
-PE_Enum::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Enum::Process_Identifier( const TokIdentifier & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_identifier);
-}
-
-void
-PE_Enum::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_punctuation);
-}
-
-void
-PE_Enum::On_expect_name_Identifier(const char * i_sText)
-{
- sName = i_sText;
-
- SetResult(done,stay);
- eState = expect_curl_bracket_open;
-}
-
-void
-PE_Enum::On_expect_curl_bracket_open_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == '{')
- {
- sData_Name = sName;
- ary::idl::Enum &
- rCe = Gate().Ces().Store_Enum(CurNamespace().CeId(), sData_Name);
- PassDocuAt(rCe);
- nDataId = rCe.CeId();
-
- SetResult(done,stay);
- eState = expect_value;
- }
- else
- {
- On_Default(i_sText);
- }
-}
-
-void
-PE_Enum::On_expect_value_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == '}' )
- {
- SetResult(done,stay);
- eState = expect_finish;
- }
- else
- {
- On_Default(i_sText);
- }
-}
-
-void
-PE_Enum::On_expect_value_Identifier(const char *)
-{
- SetResult( not_done, push_sure, pPE_Value.Ptr() );
-}
-
-void
-PE_Enum::On_expect_finish_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == ';')
- {
- SetResult(done,pop_success);
- eState = e_none;
- }
- else
- {
- On_Default(i_sText);
- }
-}
-
-void
-PE_Enum::On_Default(const char * )
-{
- SetResult(not_done,pop_failure);
- eState = e_none;
-}
-
-void
-PE_Enum::EmptySingleValueData()
-{
- sName = "";
- sAssignment = "";
-}
-
-void
-PE_Enum::CreateSingleValue()
-{
- ary::idl::EnumValue &
- rCe = Gate().Ces().Store_EnumValue( nDataId, sName, sAssignment );
- pPE_Value->PassDocuAt(rCe);
-}
-
-void
-PE_Enum::InitData()
-{
- eState = expect_name;
-
- sData_Name.clear();
- nDataId = 0;
-
- EmptySingleValueData();
-}
-
-void
-PE_Enum::ReceiveData()
-{
- switch (eState)
- {
- case expect_value:
- {
- if (sName.length() == 0)
- {
- On_Default("");
- break;
- }
-
- CreateSingleValue();
- EmptySingleValueData();
- } break;
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- } // end switch
-}
-
-void
-PE_Enum::TransferData()
-{
- csv_assert(sData_Name.length() > 0);
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Enum::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_evalu.cxx b/autodoc/source/parser_i/idl/pe_evalu.cxx
deleted file mode 100644
index 2d754e8d..00000000
--- a/autodoc/source/parser_i/idl/pe_evalu.cxx
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_evalu.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_enumvalue.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tk_const.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-#ifdef DF
-#undef DF
-#endif
-#define DF &PE_Value::On_Default
-
-PE_Value::F_TOK
-PE_Value::aDispatcher[PE_Value::e_STATES_MAX][PE_Value::tt_MAX] =
- { { DF, DF, DF }, // e_none
- { &PE_Value::On_expect_name_Identifier,
- DF, DF }, // expect_name
- { DF, &PE_Value::On_got_name_Punctuation,
- &PE_Value::On_got_name_Assignment } // got_name
- };
-
-
-
-inline void
-PE_Value::CallHandler( const char * i_sTokenText,
- E_TokenType i_eTokenType )
- { (this->*aDispatcher[eState][i_eTokenType])(i_sTokenText); }
-
-
-
-
-
-PE_Value::PE_Value( String & o_rName,
- String & o_rAssignment,
- bool i_bIsConst )
- : eState(e_none),
- pName(&o_rName),
- pAssignment(&o_rAssignment),
- bIsConst(i_bIsConst)
-{
-}
-
-void
-PE_Value::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
-}
-
-PE_Value::~PE_Value()
-{
-}
-
-void
-PE_Value::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Value::Process_Identifier( const TokIdentifier & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_identifier);
-}
-
-void
-PE_Value::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_punctuation);
-}
-
-void
-PE_Value::Process_Assignment( const TokAssignment & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_assignment);
-}
-
-void
-PE_Value::On_expect_name_Identifier(const char * i_sText)
-{
- *pName = i_sText;
- SetResult(done,stay);
- eState = got_name;
-}
-
-void
-PE_Value::On_got_name_Punctuation(const char * i_sText)
-{
- if ( (i_sText[0] == ',' AND NOT IsConst())
- OR (i_sText[0] == ';' AND IsConst()) )
- {
- SetResult(done,pop_success);
- eState = e_none;
- }
- else if (i_sText[0] == '}' AND NOT IsConst())
- {
- SetResult(not_done,pop_success);
- eState = e_none;
- }
- else
- On_Default(i_sText);
-}
-
-void
-PE_Value::On_got_name_Assignment(const char * i_sText)
-{
- *pAssignment = i_sText;
- SetResult(done,pop_success);
- eState = e_none;
-}
-
-void
-PE_Value::On_Default(const char * )
-{
- SetResult(not_done,pop_failure);
-}
-
-void
-PE_Value::InitData()
-{
- eState = expect_name;
-
- *pName = "";
- *pAssignment = "";
-}
-
-void
-PE_Value::TransferData()
-{
- csv_assert(pName->length() > 0);
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Value::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_excp.cxx b/autodoc/source/parser_i/idl/pe_excp.cxx
deleted file mode 100644
index 76ee2d4f..00000000
--- a/autodoc/source/parser_i/idl/pe_excp.cxx
+++ /dev/null
@@ -1,301 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_excp.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_exception.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_structelem.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/pe_selem.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_Exception::PE_Exception()
- // : aWork,
- // pStati
-{
- pStati = new S_Stati(*this);
-}
-
-void
-PE_Exception::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- Work().pPE_Element->EstablishContacts(this,io_rRepository,o_rResult);
- Work().pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Exception::~PE_Exception()
-{
-}
-
-void
-PE_Exception::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*Stati().pCurStatus);
-}
-
-
-void
-PE_Exception::InitData()
-{
- Work().InitData();
- Stati().pCurStatus = &Stati().aWaitForName;
-}
-
-void
-PE_Exception::TransferData()
-{
- if (NOT Work().bIsPreDeclaration)
- {
- csv_assert(Work().sData_Name.size() > 0);
- csv_assert(Work().nCurStruct.IsValid());
- }
- Stati().pCurStatus = &Stati().aNone;
-}
-
-void
-PE_Exception::ReceiveData()
-{
- Stati().pCurStatus->On_SubPE_Left();
-}
-
-PE_Exception::S_Work::S_Work()
- : sData_Name(),
- bIsPreDeclaration(false),
- nCurStruct(0),
- pPE_Element(0),
- nCurParsed_ElementRef(0),
- pPE_Type(0),
- nCurParsed_Base(0)
-
-{
- pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct);
- pPE_Type = new PE_Type(nCurParsed_Base);
-}
-
-void
-PE_Exception::S_Work::InitData()
-{
- sData_Name.clear();
- bIsPreDeclaration = false;
- nCurStruct = 0;
-
- nCurParsed_ElementRef = 0;
- nCurParsed_Base = 0;
-}
-
-void
-PE_Exception::S_Work::Prepare_PE_QualifiedName()
-{
- nCurParsed_ElementRef = 0;
-}
-
-void
-PE_Exception::S_Work::Prepare_PE_Element()
-{
- nCurParsed_Base = 0;
-}
-
-void
-PE_Exception::S_Work::Data_Set_Name( const char * i_sName )
-{
- sData_Name = i_sName;
-}
-
-PE_Exception::S_Stati::S_Stati(PE_Exception & io_rStruct)
- : aNone(io_rStruct),
- aWaitForName(io_rStruct),
- aGotName(io_rStruct),
- aWaitForBase(io_rStruct),
- aGotBase(io_rStruct),
- aWaitForElement(io_rStruct),
- aWaitForFinish(io_rStruct),
- pCurStatus(0)
-{
- pCurStatus = &aNone;
-}
-
-
-//*********************** Stati ***************************//
-
-
-UnoIDL_PE &
-PE_Exception::PE_StructState::MyPE()
-{
- return rStruct;
-}
-
-
-void
-PE_Exception::State_WaitForName::Process_Identifier( const TokIdentifier & i_rToken )
-{
- Work().Data_Set_Name(i_rToken.Text());
- MoveState( Stati().aGotName );
- SetResult(done,stay);
-}
-
-void
-PE_Exception::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if ( i_rToken.Id() != TokPunctuation::Semicolon )
- {
- switch (i_rToken.Id())
- {
- case TokPunctuation::Colon:
- MoveState( Stati().aWaitForBase );
- SetResult(done,push_sure,Work().pPE_Type.Ptr());
- Work().Prepare_PE_QualifiedName();
- break;
- case TokPunctuation::CurledBracketOpen:
- PE().store_Exception();
- MoveState( Stati().aWaitForElement );
- SetResult(done,stay);
- break;
- default:
- SetResult(not_done,pop_failure);
- } // end switch
- }
- else
- {
- Work().sData_Name.clear();
- SetResult(done,pop_success);
- }
-}
-
-void
-PE_Exception::State_WaitForBase::On_SubPE_Left()
-{
- MoveState(Stati().aGotBase);
-}
-
-void
-PE_Exception::State_GotBase::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if ( i_rToken.Id() == TokPunctuation::CurledBracketOpen )
- {
- PE().store_Exception();
- MoveState( Stati().aWaitForElement );
- SetResult(done,stay);
- }
- else
- {
- SetResult(not_done,pop_failure);
- }
-}
-
-void
-PE_Exception::State_WaitForElement::Process_Identifier( const TokIdentifier & )
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr() );
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Exception::State_WaitForElement::Process_NameSeparator()
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr());
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Exception::State_WaitForElement::Process_BuiltInType( const TokBuiltInType & )
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr());
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Exception::State_WaitForElement::Process_TypeModifier(const TokTypeModifier & )
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr());
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Exception::State_WaitForElement::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if ( i_rToken.Id() == TokPunctuation::CurledBracketClose )
- {
- MoveState( Stati().aWaitForFinish );
- SetResult( done, stay );
- }
- else
- {
- SetResult( not_done, pop_failure );
- }
-}
-
-void
-PE_Exception::State_WaitForFinish::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if (i_rToken.Id() == TokPunctuation::Semicolon)
- {
- MoveState( Stati().aNone );
- SetResult( done, pop_success );
- }
- else
- {
- SetResult( not_done, pop_failure );
- }
-}
-
-void
-PE_Exception::store_Exception()
-{
- ary::idl::Exception &
- rCe = Gate().Ces().Store_Exception(
- CurNamespace().CeId(),
- Work().sData_Name,
- Work().nCurParsed_Base );
- PassDocuAt(rCe);
- Work().nCurStruct = rCe.Id();
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_file2.cxx b/autodoc/source/parser_i/idl/pe_file2.cxx
deleted file mode 100644
index f6caa5e8..00000000
--- a/autodoc/source/parser_i/idl/pe_file2.cxx
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_file2.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/distrib.hxx>
-#include <s2_luidl/pe_servi.hxx>
-#include <s2_luidl/pe_iface.hxx>
-#include <s2_luidl/pe_singl.hxx>
-#include <s2_luidl/pe_struc.hxx>
-#include <s2_luidl/pe_excp.hxx>
-#include <s2_luidl/pe_const.hxx>
-#include <s2_luidl/pe_enum2.hxx>
-#include <s2_luidl/pe_tydf2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_File::PE_File( TokenDistributor & i_rTokenAdmin,
- const ParserInfo & i_parseInfo )
- : pTokenAdmin(&i_rTokenAdmin),
- pPE_Service(new PE_Service),
- pPE_Singleton(new PE_Singleton),
- pPE_Interface(new PE_Interface),
- pPE_Struct(new PE_Struct),
- pPE_Exception(new PE_Exception),
- pPE_Constant(new PE_Constant),
- pPE_Enum(new PE_Enum),
- pPE_Typedef(new PE_Typedef),
- pCurNamespace(0),
- pParseInfo(&i_parseInfo),
- eState(e_none),
- nBracketCount_inDefMode(0)
-{
-}
-
-void
-PE_File::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Service->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Singleton->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Interface->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Struct->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Exception->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Constant->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Enum->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Typedef->EstablishContacts(this,io_rRepository,o_rResult);
-
- pCurNamespace = &Gate().Ces().GlobalNamespace();
-}
-
-PE_File::~PE_File()
-{
-}
-
-void
-PE_File::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_File::Process_Identifier( const TokIdentifier & i_rToken )
-{
- switch (eState)
- {
- case wait_for_module:
- {
- csv_assert(pCurNamespace != 0);
-
- ary::idl::Module & rCe = Gate().Ces().CheckIn_Module(pCurNamespace->CeId(), i_rToken.Text());
- pCurNamespace = &rCe;
-
- // Get docu out of normal:
- SetDocu(pTokenAdmin->ReleaseLastParsedDocu());
- PassDocuAt(rCe);
-
- csv_assert(pCurNamespace != 0);
-
- SetResult(done, stay);
- eState = wait_for_module_bracket;
- } break;
- case on_default:
- SetResult(done, stay);
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_File::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- switch (eState)
- {
- case e_std:
- if (i_rToken.Id() == TokPunctuation::CurledBracketClose)
- {
- csv_assert(pCurNamespace != 0);
-
- pCurNamespace = &Gate().Ces().Find_Module(pCurNamespace->Owner());
-
- SetResult(done, stay);
- eState = wait_for_module_semicolon;
- }
- else
- {
- csv_assert(false);
- }
- break;
- case wait_for_module_bracket:
- if (i_rToken.Id() == TokPunctuation::CurledBracketOpen)
- {
- SetResult(done, stay);
- eState = e_std;
- }
- else
- {
- csv_assert(false);
- }
- break;
- case wait_for_module_semicolon:
- if (i_rToken.Id() == TokPunctuation::Semicolon)
- {
- SetResult(done, stay);
- eState = e_std;
- }
- else
- {
- csv_assert(false);
- }
- break;
- case on_default:
- if (i_rToken.Id() == TokPunctuation::CurledBracketClose)
- {
- nBracketCount_inDefMode--;
- }
- else if (i_rToken.Id() == TokPunctuation::CurledBracketOpen)
- {
- nBracketCount_inDefMode++;
- }
- else if (i_rToken.Id() == TokPunctuation::Semicolon)
- {
- if (nBracketCount_inDefMode <= 0)
- {
- eState = e_std;
- }
- }
- SetResult(done, stay);
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_File::Process_MetaType( const TokMetaType & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case TokMetaType::mt_service:
- eState = in_sub_pe;
- SetResult( not_done, push_sure, pPE_Service.Ptr());
- break;
- case TokMetaType::mt_singleton:
- eState = in_sub_pe;
- SetResult( not_done, push_sure, pPE_Singleton.Ptr());
- break;
- case TokMetaType::mt_uik:
- Cerr() << "Syntax error: [uik ....] is obsolete now." << Endl();
- SetResult( not_done, pop_failure);
- break;
- case TokMetaType::mt_interface:
- eState = in_sub_pe;
- SetResult( not_done, push_sure, pPE_Interface.Ptr());
- break;
- case TokMetaType::mt_module:
- eState = wait_for_module;
- SetResult( done, stay );
- break;
- case TokMetaType::mt_struct:
- eState = in_sub_pe;
- SetResult( done, push_sure, pPE_Struct.Ptr());
- break;
- case TokMetaType::mt_exception:
- eState = in_sub_pe;
- SetResult( done, push_sure, pPE_Exception.Ptr());
- break;
- case TokMetaType::mt_constants:
- eState = in_sub_pe;
- SetResult( done, push_sure, pPE_Constant.Ptr());
- break;
- case TokMetaType::mt_enum:
- eState = in_sub_pe;
- SetResult( done, push_sure, pPE_Enum.Ptr());
- break;
- case TokMetaType::mt_typedef:
- eState = in_sub_pe;
- SetResult( done, push_sure, pPE_Typedef.Ptr());
- break;
-
- default:
- Process_Default();
- } // end switch
-}
-
-void
-PE_File::Process_Stereotype( const TokStereotype & i_rToken )
-{
- if (i_rToken.Id() == TokStereotype::ste_published)
- {
- pTokenAdmin->Set_PublishedOn();
-
- SetResult(done, stay);
- }
- else
- {
- Process_Default();
- }
-}
-
-void
-PE_File::Process_Default()
-{
- if (eState != on_default)
- {
- eState = on_default;
- nBracketCount_inDefMode = 0;
- }
- SetResult(done, stay);
-}
-
-const ary::idl::Module &
-PE_File::CurNamespace() const
-{
- csv_assert(pCurNamespace);
- return *pCurNamespace;
-}
-
-const ParserInfo &
-PE_File::ParseInfo() const
-{
- csv_assert(pParseInfo);
- return *pParseInfo;
-}
-
-void
-PE_File::InitData()
-{
- eState = e_std;
-}
-
-void
-PE_File::TransferData()
-{
- eState = e_none;
-}
-
-void
-PE_File::ReceiveData()
-{
- eState = e_std;
-}
-
-
-UnoIDL_PE &
-PE_File::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_func2.cxx b/autodoc/source/parser_i/idl/pe_func2.cxx
deleted file mode 100644
index 1e8a487c..00000000
--- a/autodoc/source/parser_i/idl/pe_func2.cxx
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_func2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_function.hxx>
-#include <ary/idl/i_type.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/idl/ip_type.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/pe_vari2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <x_parse2.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_Function::PE_Function( const RParent & i_rCurInterface )
- : eState(e_none),
- sData_Name(),
- nData_ReturnType(0),
- bData_Oneway(false),
- pCurFunction(0),
- pCurParent(&i_rCurInterface),
- pPE_Type(0),
- nCurParsedType(0),
- sName(),
- pPE_Variable(0),
- eCurParsedParam_Direction(ary::idl::param_in),
- nCurParsedParam_Type(0),
- sCurParsedParam_Name(),
- bIsForConstructors(false)
-{
- pPE_Type = new PE_Type(nCurParsedType);
- pPE_Variable = new PE_Variable(nCurParsedParam_Type, sCurParsedParam_Name);
-}
-
-PE_Function::PE_Function( const RParent & i_rCurService,
- E_Constructor )
- : eState(expect_name),
- sData_Name(),
- nData_ReturnType(0),
- bData_Oneway(false),
- pCurFunction(0),
- pCurParent(&i_rCurService),
- pPE_Type(0),
- nCurParsedType(0),
- sName(),
- pPE_Variable(0),
- eCurParsedParam_Direction(ary::idl::param_in),
- nCurParsedParam_Type(0),
- sCurParsedParam_Name(),
- bIsForConstructors(true)
-{
- pPE_Type = new PE_Type(nCurParsedType);
- pPE_Variable = new PE_Variable(nCurParsedParam_Type, sCurParsedParam_Name);
-}
-
-void
-PE_Function::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Variable->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Function::~PE_Function()
-{
-}
-
-void
-PE_Function::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Function::Process_Stereotype( const TokStereotype & i_rToken )
-{
- if (eState == e_start)
- {
- switch (i_rToken.Id())
- {
- case TokStereotype::ste_oneway:
- bData_Oneway = true;
- SetResult(done, stay);
- break;
- default:
- OnDefault();
- } // end switch
- }
- else
- OnDefault();
-}
-
-void
-PE_Function::Process_Identifier( const TokIdentifier & i_rToken )
-{
- switch (eState)
- {
- case e_start:
- GoIntoReturnType();
- break;
- case expect_name:
- sData_Name = i_rToken.Text();
- SetResult(done,stay);
- eState = expect_params_list;
-
- if (NOT bIsForConstructors)
- {
- pCurFunction = &Gate().Ces().Store_Function(
- *pCurParent,
- sData_Name,
- nData_ReturnType,
- bData_Oneway );
- }
- else
- {
- pCurFunction = &Gate().Ces().Store_ServiceConstructor(
- *pCurParent,
- sData_Name );
- }
- PassDocuAt(*pCurFunction);
- break;
- case expect_parameter_variable:
- GoIntoParameterVariable();
- break;
- case expect_exception:
- GoIntoException();
- break;
- default:
- OnDefault();
- }
-}
-
-void
-PE_Function::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- switch (eState)
- {
- case e_start:
- SetResult(done,stay);
- break;
- case expect_params_list:
- if (i_rToken.Id() != TokPunctuation::BracketOpen)
- {
- OnDefault();
- return;
- }
- SetResult(done,stay);
- eState = expect_parameter;
- break;
- case expect_parameter:
- if (i_rToken.Id() == TokPunctuation::BracketClose)
- {
- SetResult(done,stay);
- eState = params_finished;
- }
- else
- {
- OnDefault();
- return;
- }
- break;
- case expect_parameter_separator:
- if (i_rToken.Id() == TokPunctuation::Comma)
- {
- SetResult(done,stay);
- eState = expect_parameter;
- }
- else if (i_rToken.Id() == TokPunctuation::BracketClose)
- {
- SetResult(done,stay);
- eState = params_finished;
- }
- else
- {
- OnDefault();
- return;
- }
- break;
- case params_finished:
- case exceptions_finished:
- if (i_rToken.Id() != TokPunctuation::Semicolon)
- {
- OnDefault();
- return;
- }
- SetResult(done,pop_success);
- eState = e_none;
- break;
- case expect_exceptions_list:
- if (i_rToken.Id() != TokPunctuation::BracketOpen)
- {
- OnDefault();
- return;
- }
- SetResult(done,stay);
- eState = expect_exception;
- break;
- case expect_exception_separator:
- if (i_rToken.Id() == TokPunctuation::Comma)
- {
- SetResult(done,stay);
- eState = expect_exception;
- }
- else if (i_rToken.Id() == TokPunctuation::BracketClose)
- {
- SetResult(done,stay);
- eState = exceptions_finished;
- }
- else
- {
- OnDefault();
- return;
- }
- break;
- default:
- OnDefault();
- }
-}
-
-void
-PE_Function::Process_BuiltInType( const TokBuiltInType & i_rToken )
-{
- switch (eState)
- {
- case e_start:
- GoIntoReturnType();
- break;
- case expect_parameter_variable:
- GoIntoParameterVariable();
- break;
- case expect_parameter_separator:
- if (i_rToken.Id() != TokBuiltInType::bty_ellipse)
- {
- OnDefault();
- }
- else
- {
- pCurFunction->Set_Ellipse();
- SetResult(done,stay);
- // eState stays the same, because we wait for the closing ")" now.
- }
- break;
- case expect_exception:
- GoIntoException();
- break;
- default:
- OnDefault();
- } // end switch
-}
-
-void
-PE_Function::Process_ParameterHandling( const TokParameterHandling & i_rToken )
-{
- if (eState != expect_parameter)
- {
- OnDefault();
- return;
- }
-
- switch (i_rToken.Id())
- {
- case TokParameterHandling::ph_in:
- eCurParsedParam_Direction = ary::idl::param_in;
- break;
- case TokParameterHandling::ph_out:
- eCurParsedParam_Direction = ary::idl::param_out;
- break;
- case TokParameterHandling::ph_inout:
- eCurParsedParam_Direction = ary::idl::param_inout;
- break;
- default:
- csv_assert(false);
- }
- SetResult(done,stay);
- eState = expect_parameter_variable;
-}
-
-void
-PE_Function::Process_Raises()
-{
- if (eState != params_finished)
- {
- OnDefault();
- return;
- }
- SetResult(done,stay);
- eState = expect_exceptions_list;
-}
-
-void
-PE_Function::Process_Default()
-{
- switch (eState)
- {
- case e_start:
- GoIntoReturnType();
- break;
- case expect_parameter_variable:
- GoIntoParameterVariable();
- break;
- case expect_exception:
- GoIntoException();
- break;
- default:
- OnDefault();
- } // end switch
-}
-
-void
-PE_Function::GoIntoReturnType()
-{
- SetResult(not_done, push_sure, pPE_Type.Ptr());
- eState = in_return_type;
-}
-
-void
-PE_Function::GoIntoParameterVariable()
-{
- SetResult(not_done, push_sure, pPE_Variable.Ptr());
- eState = in_parameter_variable;
-}
-
-void
-PE_Function::GoIntoException()
-{
- SetResult(not_done, push_sure, pPE_Type.Ptr());
- eState = in_exception;
-}
-
-void
-PE_Function::OnDefault()
-{
- throw X_AutodocParser(X_AutodocParser::x_Any);
-}
-
-void
-PE_Function::InitData()
-{
- eState = e_start;
-
- sData_Name.clear();
- nData_ReturnType = 0;
- bData_Oneway = false;
- pCurFunction = 0;
-
- nCurParsedType = 0;
- eCurParsedParam_Direction = ary::idl::param_in;
- nCurParsedParam_Type = 0;
- sCurParsedParam_Name.clear();
-
- if (bIsForConstructors)
- {
- eState = expect_name;
- }
-}
-
-void
-PE_Function::ReceiveData()
-{
- switch (eState)
- {
- case in_return_type:
- nData_ReturnType = nCurParsedType;
- nCurParsedType = 0;
- eState = expect_name;
- break;
- case in_parameter_variable:
- csv_assert(pCurFunction != 0);
- pCurFunction->Add_Parameter(
- sCurParsedParam_Name,
- nCurParsedParam_Type,
- eCurParsedParam_Direction );
- sCurParsedParam_Name = "";
- nCurParsedParam_Type = 0;
- eCurParsedParam_Direction = ary::idl::param_in;
- eState = expect_parameter_separator;
- break;
- case in_exception:
- csv_assert(pCurFunction != 0);
- pCurFunction->Add_Exception(nCurParsedType);
- eState = expect_exception_separator;
- break;
- default:
- csv_assert(false);
- } // end switch
-}
-
-void
-PE_Function::TransferData()
-{
- pCurFunction = 0;
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Function::MyPE()
-{
- return *this;
-}
-
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_iface.cxx b/autodoc/source/parser_i/idl/pe_iface.cxx
deleted file mode 100644
index 0853dc95..00000000
--- a/autodoc/source/parser_i/idl/pe_iface.cxx
+++ /dev/null
@@ -1,470 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_iface.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_interface.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_func2.hxx>
-#include <s2_luidl/pe_attri.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <adc_cl.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-#ifdef DF
-#undef DF
-#endif
-#define DF &PE_Interface::On_Default
-
-PE_Interface::F_TOK
-PE_Interface::aDispatcher[PE_Interface::e_STATES_MAX][PE_Interface::tt_MAX] =
- { { DF, DF, DF, DF, DF }, // e_none
- { &PE_Interface::On_need_uik_MetaType,
- DF, DF, DF, DF }, // need_uik
- { DF, &PE_Interface::On_uik_Identifier,
- &PE_Interface::On_uik_Punctuation,
- DF, DF }, // uik
- { &PE_Interface::On_need_ident_MetaType,
- DF, DF, DF, DF }, // need_ident
- { DF, &PE_Interface::On_ident_Identifier,
- &PE_Interface::On_ident_Punctuation,
- DF, DF }, // ident
- { &PE_Interface::On_need_interface_MetaType,
- DF, DF, DF, DF }, // need_interface
- { DF, &PE_Interface::On_need_name_Identifer,
- DF, DF, DF }, // need_name
- { DF, DF, &PE_Interface::On_wait_for_base_Punctuation,
- DF, DF }, // wait_for_base
- { DF, DF, DF, DF, DF }, // in_base
- { DF, DF, &PE_Interface::On_need_curlbr_open_Punctuation,
- DF, DF }, // need_curlbr_open
- { &PE_Interface::On_std_Metatype,
- &PE_Interface::On_std_GotoFunction,
- &PE_Interface::On_std_Punctuation,
- &PE_Interface::On_std_GotoFunction,
- &PE_Interface::On_std_Stereotype }, // e_std
- { DF, DF, DF, DF, DF }, // in_function
- { DF, DF, DF, DF, DF }, // in_attribute
- { DF, DF, &PE_Interface::On_need_finish_Punctuation,
- DF, DF }, // need_finish
- { DF, DF, DF, DF, DF } // in_base_interface
- };
-
-
-
-inline void
-PE_Interface::CallHandler( const char * i_sTokenText,
- E_TokenType i_eTokenType )
- { (this->*aDispatcher[eState][i_eTokenType])(i_sTokenText); }
-
-
-
-PE_Interface::PE_Interface()
- : eState(e_none),
- sData_Name(),
- bIsPreDeclaration(false),
- pCurInterface(0),
- nCurInterface(0),
- pPE_Function(0),
- pPE_Attribute(0),
- pPE_Type(0),
- nCurParsed_Base(0),
- bOptionalMember(false)
-{
- pPE_Function = new PE_Function(nCurInterface);
- pPE_Type = new PE_Type(nCurParsed_Base);
- pPE_Attribute = new PE_Attribute(nCurInterface);
-}
-
-void
-PE_Interface::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Function->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Attribute->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Interface::~PE_Interface()
-{
-}
-
-void
-PE_Interface::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-
-void
-PE_Interface::Process_MetaType( const TokMetaType & i_rToken )
-{
- CallHandler( i_rToken.Text(), tt_metatype );
-}
-
-void
-PE_Interface::Process_Identifier( const TokIdentifier & i_rToken )
-{
- CallHandler( i_rToken.Text(), tt_identifier );
-}
-
-void
-PE_Interface::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- CallHandler( i_rToken.Text(), tt_punctuation );
-}
-
-void
-PE_Interface::Process_NameSeparator()
-{
- CallHandler( "", tt_startoftype );
-}
-
-void
-PE_Interface::Process_BuiltInType( const TokBuiltInType & i_rToken )
-{
- CallHandler( i_rToken.Text(), tt_startoftype );
-}
-
-void
-PE_Interface::Process_TypeModifier( const TokTypeModifier & i_rToken )
-{
- CallHandler( i_rToken.Text(), tt_startoftype );
-}
-
-void
-PE_Interface::Process_Stereotype( const TokStereotype & i_rToken )
-{
- CallHandler( i_rToken.Text(), tt_stereotype );
-}
-
-void
-PE_Interface::Process_Default()
-{
- SetResult(done, stay);
-}
-
-
-void
-PE_Interface::On_need_uik_MetaType(const char *)
-{
- // Deprecated, data will be ignored
- SetResult(done, stay);
- eState = uik;
-}
-
-void
-PE_Interface::On_uik_Identifier(const char *)
-{
- // Deprecated, data will be ignored
- SetResult(done, stay);
-}
-
-void
-PE_Interface::On_uik_Punctuation(const char * i_sText)
-{
- // Deprecated, data will be ignored
- SetResult(done, stay);
- if (strcmp(",",i_sText) == 0)
- {
- eState = need_ident;
- }
-}
-
-void
-PE_Interface::On_need_ident_MetaType(const char *)
-{
- SetResult(done, stay);
- eState = ident;
-}
-
-void
-PE_Interface::On_ident_Identifier(const char *)
-{
- SetResult(done, stay);
-}
-
-void
-PE_Interface::On_ident_Punctuation(const char * i_sText)
-{
- SetResult(done, stay);
- if (strcmp(")",i_sText) == 0)
- {
- eState = need_interface;
- }
-}
-
-void
-PE_Interface::On_need_interface_MetaType(const char *)
-{
- SetResult(done, stay);
- eState = need_name;
-}
-
-void
-PE_Interface::On_need_name_Identifer(const char * i_sText)
-{
- SetResult(done, stay);
- sData_Name = i_sText;
- eState = wait_for_base;
-}
-
-void
-PE_Interface::On_wait_for_base_Punctuation(const char * i_sText)
-{
- if (i_sText[0] != ';')
- {
- switch (i_sText[0])
- {
- case ':':
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_base;
- break;
- case '{':
- store_Interface();
-
- SetResult(done,stay);
- eState = e_std;
- break;
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- } // end switch
- }
- else
- {
- bIsPreDeclaration = true;
- SetResult(done, pop_success);
- eState = e_none;
- }
-}
-
-void
-PE_Interface::On_need_curlbr_open_Punctuation(const char * i_sText)
-{
- if (i_sText[0] == '{')
- {
- store_Interface();
-
- SetResult(done, stay);
- eState = e_std;
- }
- else {
- csv_assert(false);
- }
-}
-
-
-void
-PE_Interface::On_std_Metatype(const char * i_sText)
-{
- if (strcmp(i_sText,"attribute") == 0)
- On_std_GotoAttribute(i_sText);
- else if (strcmp(i_sText,"interface") == 0)
- On_std_GotoBaseInterface(i_sText);
- else
- On_std_GotoFunction(i_sText);
-}
-
-void
-PE_Interface::On_std_Punctuation(const char * i_sText)
-{
- switch (i_sText[0])
- {
- case '}':
- SetResult(done, stay);
- eState = need_finish;
- break;
- case ';': // Appears after base interface declarations.
- SetResult(done, stay);
- break;
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- } // end switch
-}
-
-void
-PE_Interface::On_std_Stereotype(const char * i_sText)
-{
- if (strcmp(i_sText,"oneway") == 0)
- On_std_GotoFunction(i_sText);
- else if ( strcmp(i_sText,"readonly") == 0
- OR strcmp(i_sText,"bound") == 0 )
- On_std_GotoAttribute(i_sText);
- else if (strcmp(i_sText,"optional") == 0)
- {
- bOptionalMember = true;
- SetResult(done, stay);
- }
- else
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Interface::On_std_GotoFunction(const char * )
-{
- SetResult(not_done, push_sure, pPE_Function.Ptr());
- eState = in_function;
-}
-
-void
-PE_Interface::On_std_GotoAttribute(const char * )
-{
- SetResult(not_done, push_sure, pPE_Attribute.Ptr());
- eState = in_attribute;
-}
-
-void
-PE_Interface::On_std_GotoBaseInterface(const char * )
-{
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_base_interface;
-}
-
-void
-PE_Interface::On_need_finish_Punctuation(const char * i_sText)
-{
- switch (i_sText[0])
- {
- case ';':
- SetResult(done, pop_success);
- eState = e_none;
- break;
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- } // end switch
-}
-
-void
-PE_Interface::On_Default(const char *)
-{
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Interface::InitData()
-{
- eState = need_interface;
-
- sData_Name.clear();
- bIsPreDeclaration = false;
- pCurInterface = 0;
- nCurInterface = 0;
- nCurParsed_Base = 0;
- bOptionalMember = false;
-}
-
-void
-PE_Interface::TransferData()
-{
- if (NOT bIsPreDeclaration)
- {
- csv_assert(sData_Name.size() > 0);
- csv_assert(nCurInterface.IsValid());
- }
- else
- {
- sData_Name.clear();
- pCurInterface = 0;
- nCurInterface = 0;
- }
-
- eState = e_none;
-}
-
-void
-PE_Interface::ReceiveData()
-{
- switch (eState)
- {
- case in_base:
- eState = need_curlbr_open;
- break;
- case in_function:
- eState = e_std;
- break;
- case in_attribute:
- eState = e_std;
- break;
- case in_base_interface:
- if (bOptionalMember)
- {
- pPE_Type->SetOptional();
- bOptionalMember = false;
- }
- pCurInterface->Add_Base(
- nCurParsed_Base,
- pPE_Type->ReleaseDocu());
- nCurParsed_Base = 0;
- eState = e_std;
- break;
- default:
- csv_assert(false);
- }
-}
-
-UnoIDL_PE &
-PE_Interface::MyPE()
-{
- return *this;
-}
-
-void
-PE_Interface::store_Interface()
-{
- pCurInterface = & Gate().Ces().Store_Interface(
- CurNamespace().CeId(),
- sData_Name,
- nCurParsed_Base );
- nCurInterface = pCurInterface->CeId();
- PassDocuAt(*pCurInterface);
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_property.cxx b/autodoc/source/parser_i/idl/pe_property.cxx
deleted file mode 100644
index e3176c23..00000000
--- a/autodoc/source/parser_i/idl/pe_property.cxx
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_property.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_property.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_vari2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-PE_Property::PE_Property( const Ce_id & i_rCurOwner )
- : eState(e_none),
- pCurOwner(&i_rCurOwner),
- pPE_Variable(0),
- nCurParsedType(0),
- sCurParsedName(),
- bIsOptional(false),
- aStereotypes()
-{
- pPE_Variable = new PE_Variable(nCurParsedType, sCurParsedName);
-}
-
-void
-PE_Property::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Variable->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Property::~PE_Property()
-{
-}
-
-void
-PE_Property::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Property::Process_Stereotype( const TokStereotype & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case TokStereotype::ste_optional:
- bIsOptional = true;
- break;
- case TokStereotype::ste_readonly:
- aStereotypes.Set_Flag(Stereotypes::readonly);
- break;
- case TokStereotype::ste_bound:
- aStereotypes.Set_Flag(Stereotypes::bound);
- break;
- case TokStereotype::ste_constrained:
- aStereotypes.Set_Flag(Stereotypes::constrained);
- break;
- case TokStereotype::ste_maybeambiguous:
- aStereotypes.Set_Flag(Stereotypes::maybeambiguous);
- break;
- case TokStereotype::ste_maybedefault:
- aStereotypes.Set_Flag(Stereotypes::maybedefault);
- break;
- case TokStereotype::ste_maybevoid:
- aStereotypes.Set_Flag(Stereotypes::maybevoid);
- break;
- case TokStereotype::ste_removable:
- aStereotypes.Set_Flag(Stereotypes::removable);
- break;
- case TokStereotype::ste_transient:
- aStereotypes.Set_Flag(Stereotypes::transient);
- break;
-
- default:
- SetResult(not_done, pop_failure);
- eState = e_none;
- return;
- }
-
- SetResult(done, stay);
-}
-
-void
-PE_Property::Process_MetaType( const TokMetaType & i_rToken )
-{
- if (eState == e_start)
- {
- if ( i_rToken.Id() == TokMetaType::mt_property )
- {
- SetResult(done, stay);
- eState = expect_variable;
- return;
- }
- } // endif (eState == e_start)
-
- SetResult(not_done, pop_failure);
- eState = e_none;
-}
-
-void
-PE_Property::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- switch (eState)
- {
- case e_start:
- SetResult(done, stay);
- break;
- case expect_variable:
- if (i_rToken.Id() == TokPunctuation::Semicolon)
- {
- SetResult(done, pop_success);
- eState = e_none;
- }
- else if (i_rToken.Id() == TokPunctuation::Comma)
- SetResult(done, stay);
- else
- SetResult(not_done, pop_failure);
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_Property::Process_Default()
-{
- if (eState == expect_variable)
- {
- SetResult(not_done, push_sure, pPE_Variable.Ptr());
- eState = in_variable;
- }
- else
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Property::InitData()
-{
- eState = e_start;
-
- nCurParsedType = 0;
- sCurParsedName = "";
-
- // bIsOptional and
- // aStereotypes
- // may be preset by the PE_Service-(or PE_Interface-)parent
- // with PresetOptional() or
- // PresetStereotype()
- // - therefore it must not be set here!
-}
-
-void
-PE_Property::TransferData()
-{
- if (bIsOptional)
- {
- SetOptional();
- bIsOptional = false;
- }
-
- ary::idl::CodeEntity *
- pCe = 0;
- csv_assert(pCurOwner->IsValid());
-
- pCe = &Gate().Ces().Store_Property( *pCurOwner,
- sCurParsedName,
- nCurParsedType,
- aStereotypes );
-
- csv_assert(pCe != 0);
- PassDocuAt(*pCe);
-
- nCurParsedType = 0;
- sCurParsedName.clear();
- aStereotypes = Stereotypes();
-
- eState = e_none;
-}
-
-void
-PE_Property::ReceiveData()
-{
- eState = expect_variable;
-}
-
-
-UnoIDL_PE &
-PE_Property::MyPE()
-{
- return *this;
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_selem.cxx b/autodoc/source/parser_i/idl/pe_selem.cxx
deleted file mode 100644
index 94f4e97b..00000000
--- a/autodoc/source/parser_i/idl/pe_selem.cxx
+++ /dev/null
@@ -1,208 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_selem.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/i_structelem.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-namespace
-{
- const String C_sNone;
-}
-
-PE_StructElement::PE_StructElement( RStructElement & o_rResult,
- const RStruct & i_rCurStruct,
- const String & i_rCurStructTemplateParam )
- : eState(e_none),
- pResult(&o_rResult),
- pCurStruct(&i_rCurStruct),
- bIsExceptionElement(false),
- pPE_Type(0),
- nType(0),
- sName(),
- pCurStructTemplateParam(&i_rCurStructTemplateParam)
-{
- pPE_Type = new PE_Type(nType);
-}
-
-PE_StructElement::PE_StructElement( RStructElement & o_rResult,
- const RStruct & i_rCurExc )
- : eState(e_none),
- pResult(&o_rResult),
- pCurStruct(&i_rCurExc),
- bIsExceptionElement(true),
- pPE_Type(0),
- nType(0),
- sName(),
- pCurStructTemplateParam(&C_sNone)
-{
- pPE_Type = new PE_Type(nType);
-}
-
-void
-PE_StructElement::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_StructElement::~PE_StructElement()
-{
-}
-
-void
-PE_StructElement::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_StructElement::Process_Default()
-{
- if (eState == expect_type)
- {
- SetResult( not_done, push_sure, pPE_Type.Ptr() );
- eState = expect_name;
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_StructElement::Process_Identifier( const TokIdentifier & i_rToken )
-{
- csv_assert(*i_rToken.Text() != 0);
-
- if (eState == expect_type)
- {
- if ( *pCurStructTemplateParam == i_rToken.Text() )
- {
- nType = lhf_FindTemplateParamType();
- SetResult( done, stay );
- eState = expect_name;
- }
- else // No template parameter type existing, or not matching:
- {
- SetResult( not_done, push_sure, pPE_Type.Ptr() );
- eState = expect_name;
- }
- }
- else if (eState == expect_name)
- {
- sName = i_rToken.Text();
- SetResult( done, stay );
- eState = expect_finish;
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_StructElement::Process_Punctuation( const TokPunctuation &)
-{
- csv_assert(eState == expect_finish);
-
- SetResult( done, pop_success );
-}
-
-void
-PE_StructElement::InitData()
-{
- eState = expect_type;
-
- nType = 0;
- sName = "";
-}
-
-void
-PE_StructElement::TransferData()
-{
- csv_assert(pResult != 0 AND pCurStruct != 0);
-
- ary::idl::StructElement *
- pCe = 0;
- if (bIsExceptionElement)
- {
- pCe = & Gate().Ces().Store_ExceptionMember(
- *pCurStruct,
- sName,
- nType );
- }
- else
- {
- pCe = & Gate().Ces().Store_StructMember(
- *pCurStruct,
- sName,
- nType );
- }
- *pResult = pCe->CeId();
- PassDocuAt(*pCe);
-
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_StructElement::MyPE()
-{
- return *this;
-}
-
-ary::idl::Type_id
-PE_StructElement::lhf_FindTemplateParamType() const
-{
- const ary::idl::CodeEntity &
- rCe = Gate().Ces().Find_Ce(*pCurStruct);
- const ary::idl::Struct &
- rStruct = static_cast< const ary::idl::Struct& >(rCe);
- return rStruct.TemplateParameterType();
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_servi.cxx b/autodoc/source/parser_i/idl/pe_servi.cxx
deleted file mode 100644
index 083fdd18..00000000
--- a/autodoc/source/parser_i/idl/pe_servi.cxx
+++ /dev/null
@@ -1,395 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_servi.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_service.hxx>
-#include <ary/idl/i_siservice.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_func2.hxx>
-#include <s2_luidl/pe_property.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-PE_Service::PE_Service()
- : eState(e_none),
- sData_Name(),
- bIsPreDeclaration(false),
- pCurService(0),
- pCurSiService(0),
- nCurService(0),
- pPE_Property(0),
- nCurParsed_Property(0),
- pPE_Type(0),
- nCurParsed_Type(0),
- pPE_Constructor(0),
- bOptionalMember(false)
-{
- pPE_Property = new PE_Property(nCurService);
- pPE_Type = new PE_Type(nCurParsed_Type);
- pPE_Constructor = new PE_Function(nCurService, PE_Function::constructor);
-}
-
-void
-PE_Service::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Property->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
- pPE_Constructor->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Service::~PE_Service()
-{
-}
-
-void
-PE_Service::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-
-void
-PE_Service::Process_MetaType( const TokMetaType & i_rToken )
-{
- switch ( i_rToken.Id() )
- {
- case TokMetaType::mt_service:
- if (eState == need_name)
- SetResult(done, stay );
- else if (eState == e_std)
- {
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_service_type;
- }
- else
- On_Default();
- break;
- case TokMetaType::mt_interface:
- if (eState == e_std)
- {
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_ifc_type;
- }
- else
- On_Default();
- break;
- case TokMetaType::mt_property:
- if (eState == e_std)
- {
- StartProperty();
- }
- else
- On_Default();
- break;
- default:
- // KORR_FUTURE:
- // Should throw syntax error warning.
- ;
- } // end switch
-}
-
-void
-PE_Service::Process_Identifier( const TokIdentifier & i_rToken )
-{
- if (eState == need_name)
- {
- sData_Name = i_rToken.Text();
- SetResult(done, stay);
- eState = need_curlbr_open;
- }
- else if (eState == e_std_sib)
- {
- SetResult(not_done, push_sure, pPE_Constructor.Ptr());
- }
- else
- On_Default();
-}
-
-void
-PE_Service::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case TokPunctuation::Colon:
- if (eState == need_curlbr_open)
- {
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = need_base_interface;
- }
- else
- On_Default();
- break;
-
- case TokPunctuation::CurledBracketOpen:
- if (eState == need_curlbr_open)
- {
- pCurService = &Gate().Ces().Store_Service(
- CurNamespace().CeId(),
- sData_Name );
- nCurService = pCurService->CeId();
- PassDocuAt(*pCurService);
- SetResult(done, stay);
- eState = e_std;
- }
- else if (eState == need_curlbr_open_sib)
- {
- SetResult(done, stay);
- eState = e_std_sib;
- }
- else
- On_Default();
- break;
- case TokPunctuation::CurledBracketClose:
- if (eState == e_std OR eState == e_std_sib)
- {
- SetResult(done, stay);
- eState = need_finish;
- }
- else
- On_Default();
- break;
- case TokPunctuation::Comma:
- if (eState == expect_ifc_separator)
- {
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_ifc_type;
- }
- else if (eState == expect_service_separator)
- {
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_service_type;
- }
- else if (eState == e_std)
- {
- SetResult(done, stay);
- }
- else
- On_Default();
- break;
- case TokPunctuation::Semicolon:
- switch (eState)
- {
- case need_curlbr_open:
- sData_Name.clear();
- bIsPreDeclaration = true;
- SetResult(done, pop_success);
- eState = e_none;
- break;
- case need_curlbr_open_sib:
- SetResult(done, pop_success);
- eState = e_none;
- break;
- case expect_ifc_separator:
- case expect_service_separator:
- SetResult(done, stay);
- eState = e_std;
- break;
- case need_finish:
- SetResult(done, pop_success);
- eState = e_none;
- break;
- case at_ignore:
- SetResult(done, stay);
- eState = e_std;
- break;
- default:
- On_Default();
- } // end switch
- break;
- default:
- On_Default();
- } // end switch
-}
-
-void
-PE_Service::Process_Stereotype( const TokStereotype & i_rToken )
-{
- if (i_rToken.Id() == TokStereotype::ste_optional)
- {
- bOptionalMember = true;
- SetResult(done, stay);
- }
- else if ( eState == e_std )
- {
- StartProperty();
- }
- else
- On_Default();
-}
-
-void
-PE_Service::Process_Needs()
-{
- SetResult(done,stay);
- eState = at_ignore;
-}
-
-void
-PE_Service::Process_Observes()
-{
- SetResult(done,stay);
- eState = at_ignore;
-}
-
-void
-PE_Service::Process_Default()
-{
- On_Default();
-}
-
-
-void
-PE_Service::On_Default()
-{
- if (eState == at_ignore)
- SetResult(done, stay);
- else
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Service::InitData()
-{
- eState = need_name;
- sData_Name.clear();
- bIsPreDeclaration = false;
- pCurService = 0;
- pCurSiService = 0;
- nCurService = 0;
- nCurParsed_Property = 0;
- nCurParsed_Type = 0;
- bOptionalMember = false;
-}
-
-void
-PE_Service::TransferData()
-{
- if (NOT bIsPreDeclaration)
- {
- csv_assert(sData_Name.size() > 0);
- csv_assert( (pCurService != 0) != (pCurSiService != 0) );
- }
-
- eState = e_none;
-}
-
-void
-PE_Service::ReceiveData()
-{
- switch (eState)
- {
- case in_property:
- eState = e_std;
- break;
- case in_ifc_type:
- if (bOptionalMember)
- {
- pPE_Type->SetOptional();
- }
- pCurService->AddRef_SupportedInterface(
- nCurParsed_Type,
- pPE_Type->ReleaseDocu());
- nCurParsed_Type = 0;
- eState = expect_ifc_separator;
- break;
- case in_service_type:
- if (bOptionalMember)
- {
- pPE_Type->SetOptional();
- }
- pCurService->AddRef_IncludedService(
- nCurParsed_Type,
- pPE_Type->ReleaseDocu());
- nCurParsed_Type = 0;
- eState = expect_service_separator;
- break;
- case need_base_interface:
- pCurSiService = &Gate().Ces().Store_SglIfcService(
- CurNamespace().CeId(),
- sData_Name,
- nCurParsed_Type );
- nCurService = pCurSiService->CeId();
- PassDocuAt(*pCurSiService);
-
- nCurParsed_Type = 0;
- eState = need_curlbr_open_sib;
- break;
- case e_std_sib:
- break;
- default:
- csv_assert(false);
- }
-
- bOptionalMember = false;
-}
-
-
-UnoIDL_PE &
-PE_Service::MyPE()
-{
- return *this;
-}
-
-void
-PE_Service::StartProperty()
-{
- SetResult(not_done, push_sure, pPE_Property.Ptr());
- eState = in_property;
-
- if (bOptionalMember)
- {
- pPE_Property->PresetOptional();
- bOptionalMember = false;
- }
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_singl.cxx b/autodoc/source/parser_i/idl/pe_singl.cxx
deleted file mode 100644
index 323ce23b..00000000
--- a/autodoc/source/parser_i/idl/pe_singl.cxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_singl.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_singleton.hxx>
-#include <ary/idl/i_sisingleton.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_Singleton::PE_Singleton()
- : eState(e_none),
- sData_Name(),
- bIsPreDeclaration(false),
- pCurSingleton(0),
- pCurSiSingleton(0),
- pPE_Type(0),
- nCurParsed_Type(0)
-{
- pPE_Type = new PE_Type(nCurParsed_Type);
-}
-
-void
-PE_Singleton::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Singleton::~PE_Singleton()
-{
-}
-
-void
-PE_Singleton::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-
-void
-PE_Singleton::Process_MetaType( const TokMetaType & i_rToken )
-{
- switch ( i_rToken.Id() )
- {
- case TokMetaType::mt_service:
- if (eState == e_std)
- {
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_service;
- }
- else
- On_Default();
- break;
- case TokMetaType::mt_singleton:
- if (eState == need_name)
- SetResult(done, stay);
- else
- On_Default();
- break;
- default:
- // KORR_FUTURE
- // Should throw syntax error warning
- ;
-
- } // end switch
-}
-
-void
-PE_Singleton::Process_Identifier( const TokIdentifier & i_rToken )
-{
- if (eState == need_name)
- {
- sData_Name = i_rToken.Text();
- SetResult(done, stay);
- eState = need_curlbr_open;
- }
- else
- On_Default();
-}
-
-void
-PE_Singleton::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case TokPunctuation::CurledBracketOpen:
- if (eState == need_curlbr_open)
- {
- pCurSingleton = &Gate().Ces().Store_Singleton(
- CurNamespace().CeId(),
- sData_Name );
- PassDocuAt(*pCurSingleton);
- SetResult(done, stay);
- eState = e_std;
- }
- else
- On_Default();
- break;
- case TokPunctuation::CurledBracketClose:
- if (eState == e_std)
- {
- SetResult(done, stay);
- eState = need_finish;
- }
- else
- On_Default();
- break;
- case TokPunctuation::Semicolon:
- switch (eState)
- {
- case e_std: SetResult(done, stay);
- break;
- case need_finish:
- SetResult(done, pop_success);
- eState = e_none;
- break;
- default:
- On_Default();
- } // end switch
- break;
- case TokPunctuation::Colon:
- switch (eState)
- {
- case need_curlbr_open:
- SetResult(done, push_sure, pPE_Type.Ptr());
- eState = in_base_interface;
- break;
- default:
- On_Default();
- } // end switch
- break;
- default:
- On_Default();
- } // end switch
-}
-
-void
-PE_Singleton::Process_Default()
-{
- On_Default();
-}
-
-
-void
-PE_Singleton::On_Default()
-{
- SetResult(not_done, pop_failure);
-}
-
-void
-PE_Singleton::InitData()
-{
- eState = need_name;
- sData_Name.clear();
- bIsPreDeclaration = false;
- pCurSingleton = 0;
- pCurSiSingleton = 0;
- nCurParsed_Type = 0;
-}
-
-void
-PE_Singleton::TransferData()
-{
- if (NOT bIsPreDeclaration)
- {
- csv_assert(sData_Name.size() > 0);
- csv_assert( (pCurSingleton != 0) != (pCurSiSingleton != 0) );
- }
-
- eState = e_none;
-}
-
-void
-PE_Singleton::ReceiveData()
-{
- switch (eState)
- {
- case in_service:
- pCurSingleton->Set_Service(nCurParsed_Type);
- nCurParsed_Type = 0;
- eState = e_std;
- break;
- case in_base_interface:
- pCurSiSingleton = &Gate().Ces().Store_SglIfcSingleton(
- CurNamespace().CeId(),
- sData_Name,
- nCurParsed_Type );
- PassDocuAt(*pCurSiSingleton);
- nCurParsed_Type = 0;
- eState = need_finish;
- break;
- default:
- csv_assert(false);
- } // end switch
-}
-
-UnoIDL_PE &
-PE_Singleton::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_struc.cxx b/autodoc/source/parser_i/idl/pe_struc.cxx
deleted file mode 100644
index 766597f0..00000000
--- a/autodoc/source/parser_i/idl/pe_struc.cxx
+++ /dev/null
@@ -1,330 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_struc.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_struct.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/pe_selem.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_Struct::PE_Struct()
- // : aWork,
- // pStati
-{
- pStati = new S_Stati(*this);
-}
-
-void
-PE_Struct::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- Work().pPE_Element->EstablishContacts(this,io_rRepository,o_rResult);
- Work().pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Struct::~PE_Struct()
-{
-}
-
-void
-PE_Struct::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*Stati().pCurStatus);
-}
-
-
-void
-PE_Struct::InitData()
-{
- Work().InitData();
- Stati().pCurStatus = &Stati().aWaitForName;
-}
-
-void
-PE_Struct::TransferData()
-{
- if (NOT Work().bIsPreDeclaration)
- {
- csv_assert(Work().sData_Name.size() > 0);
- csv_assert(Work().nCurStruct.IsValid());
- }
- Stati().pCurStatus = &Stati().aNone;
-}
-
-void
-PE_Struct::ReceiveData()
-{
- Stati().pCurStatus->On_SubPE_Left();
-}
-
-PE_Struct::S_Work::S_Work()
- : sData_Name(),
- sData_TemplateParam(),
- bIsPreDeclaration(false),
- nCurStruct(0),
- pPE_Element(0),
- nCurParsed_ElementRef(0),
- pPE_Type(0),
- nCurParsed_Base(0)
-
-{
- pPE_Element = new PE_StructElement(nCurParsed_ElementRef,nCurStruct,sData_TemplateParam);
- pPE_Type = new PE_Type(nCurParsed_Base);
-}
-
-void
-PE_Struct::S_Work::InitData()
-{
- sData_Name.clear();
- sData_TemplateParam.clear();
- bIsPreDeclaration = false;
- nCurStruct = 0;
- nCurParsed_ElementRef = 0;
- nCurParsed_Base = 0;
-}
-
-void
-PE_Struct::S_Work::Prepare_PE_QualifiedName()
-{
- nCurParsed_ElementRef = 0;
-}
-
-void
-PE_Struct::S_Work::Prepare_PE_Element()
-{
- nCurParsed_Base = 0;
-}
-
-void
-PE_Struct::S_Work::Data_Set_Name( const char * i_sName )
-{
- sData_Name = i_sName;
-}
-
-void
-PE_Struct::S_Work::Data_Set_TemplateParam( const char * i_sTemplateParam )
-{
- sData_TemplateParam = i_sTemplateParam;
-}
-
-PE_Struct::S_Stati::S_Stati(PE_Struct & io_rStruct)
- : aNone(io_rStruct),
- aWaitForName(io_rStruct),
- aGotName(io_rStruct),
- aWaitForTemplateParam(io_rStruct),
- aWaitForTemplateEnd(io_rStruct),
- aWaitForBase(io_rStruct),
- aGotBase(io_rStruct),
- aWaitForElement(io_rStruct),
- aWaitForFinish(io_rStruct),
- pCurStatus(0)
-{
- pCurStatus = &aNone;
-}
-
-
-//*********************** Stati ***************************//
-
-
-UnoIDL_PE &
-PE_Struct::PE_StructState::MyPE()
-{
- return rStruct;
-}
-
-
-void
-PE_Struct::State_WaitForName::Process_Identifier( const TokIdentifier & i_rToken )
-{
- Work().Data_Set_Name(i_rToken.Text());
- MoveState( Stati().aGotName );
- SetResult(done,stay);
-}
-
-void
-PE_Struct::State_GotName::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if ( i_rToken.Id() != TokPunctuation::Semicolon )
- {
- switch (i_rToken.Id())
- {
- case TokPunctuation::Colon:
- MoveState( Stati().aWaitForBase );
- SetResult(done,push_sure,Work().pPE_Type.Ptr());
- Work().Prepare_PE_QualifiedName();
- break;
- case TokPunctuation::CurledBracketOpen:
- PE().store_Struct();
- MoveState( Stati().aWaitForElement );
- SetResult(done,stay);
- break;
- case TokPunctuation::Lesser:
- MoveState( Stati().aWaitForTemplateParam );
- SetResult(done,stay);
- break;
- default:
- SetResult(not_done,pop_failure);
- } // end switch
- }
- else
- {
- Work().sData_Name.clear();
- SetResult(done,pop_success);
- }
-}
-
-void
-PE_Struct::State_WaitForTemplateParam::Process_Identifier( const TokIdentifier & i_rToken )
-{
- Work().Data_Set_TemplateParam(i_rToken.Text());
- MoveState( Stati().aWaitForTemplateEnd );
- SetResult(done,stay);
-}
-
-void
-PE_Struct::State_WaitForTemplateEnd::Process_Punctuation( const TokPunctuation & )
-{
- // Assume: TokPunctuation::Greater
- MoveState( Stati().aGotName );
- SetResult(done,stay);
-}
-
-void
-PE_Struct::State_WaitForBase::On_SubPE_Left()
-{
- MoveState(Stati().aGotBase);
-}
-
-void
-PE_Struct::State_GotBase::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if ( i_rToken.Id() == TokPunctuation::CurledBracketOpen )
- {
- PE().store_Struct();
- MoveState( Stati().aWaitForElement );
- SetResult(done,stay);
- }
- else
- {
- SetResult(not_done,pop_failure);
- }
-}
-
-void
-PE_Struct::State_WaitForElement::Process_Identifier( const TokIdentifier & )
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr() );
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Struct::State_WaitForElement::Process_NameSeparator()
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr());
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Struct::State_WaitForElement::Process_BuiltInType( const TokBuiltInType & )
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr());
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Struct::State_WaitForElement::Process_TypeModifier(const TokTypeModifier & )
-{
- SetResult( not_done, push_sure, Work().pPE_Element.Ptr());
- Work().Prepare_PE_Element();
-}
-
-void
-PE_Struct::State_WaitForElement::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if ( i_rToken.Id() == TokPunctuation::CurledBracketClose )
- {
- MoveState( Stati().aWaitForFinish );
- SetResult( done, stay );
- }
- else
- {
- SetResult( not_done, pop_failure );
- }
-}
-
-void
-PE_Struct::State_WaitForFinish::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if (i_rToken.Id() == TokPunctuation::Semicolon)
- {
- MoveState( Stati().aNone );
- SetResult( done, pop_success );
- }
- else
- {
- SetResult( not_done, pop_failure );
- }
-}
-
-void
-PE_Struct::store_Struct()
-{
- ary::idl::Struct &
- rCe = Gate().Ces().Store_Struct(
- CurNamespace().CeId(),
- Work().sData_Name,
- Work().nCurParsed_Base,
- Work().sData_TemplateParam );
- PassDocuAt(rCe);
- Work().nCurStruct = rCe.CeId();
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_tydf2.cxx b/autodoc/source/parser_i/idl/pe_tydf2.cxx
deleted file mode 100644
index c7051f30..00000000
--- a/autodoc/source/parser_i/idl/pe_tydf2.cxx
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_tydf2.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_typedef.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-#include <s2_luidl/tk_const.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-#ifdef DF
-#undef DF
-#endif
-#define DF &PE_Typedef::On_Default
-
-PE_Typedef::F_TOK
-PE_Typedef::aDispatcher[PE_Typedef::e_STATES_MAX][PE_Typedef::tt_MAX] =
- { { DF, DF, DF }, // e_none
- { &PE_Typedef::On_expect_description_Any,
- &PE_Typedef::On_expect_description_Any,
- DF }, // expect_description
- { DF, &PE_Typedef::On_expect_name_Identifier,
- DF }, // expect_name
- { DF, DF, &PE_Typedef::On_got_name_Punctuation } // got_name
- };
-
-
-
-inline void
-PE_Typedef::CallHandler( const char * i_sTokenText,
- E_TokenType i_eTokenType )
- { (this->*aDispatcher[eState][i_eTokenType])(i_sTokenText); }
-
-
-
-
-
-PE_Typedef::PE_Typedef()
- : eState(e_none),
- pPE_Type(0),
- nType(0),
- sName()
-{
- pPE_Type = new PE_Type(nType);
-}
-
-void
-PE_Typedef::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Typedef::~PE_Typedef()
-{
-}
-
-void
-PE_Typedef::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Typedef::Process_Identifier( const TokIdentifier & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_identifier);
-}
-
-void
-PE_Typedef::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- CallHandler(i_rToken.Text(), tt_punctuation);
-}
-
-void
-PE_Typedef::Process_Default()
-{
- CallHandler("", tt_any);
-}
-
-void
-PE_Typedef::On_expect_description_Any(const char *)
-{
- SetResult(not_done,push_sure, pPE_Type.Ptr());
-}
-
-void
-PE_Typedef::On_expect_name_Identifier(const char * i_sText)
-{
- sName = i_sText;
- SetResult(done,stay);
- eState = got_name;
-}
-
-void
-PE_Typedef::On_got_name_Punctuation(const char * i_sText)
-{
- if ( i_sText[0] == ';' )
- {
- SetResult(done,pop_success);
- eState = e_none;
- }
- else
- On_Default(i_sText);
-}
-
-void
-PE_Typedef::On_Default(const char * )
-{
- SetResult(not_done,pop_failure);
-}
-
-void
-PE_Typedef::InitData()
-{
- eState = expect_description;
- nType = 0;
- sName = "";
-}
-
-void
-PE_Typedef::ReceiveData()
-{
- eState = expect_name;
-}
-
-void
-PE_Typedef::TransferData()
-{
- ary::idl::Typedef &
- rCe = Gate().Ces().Store_Typedef(CurNamespace().CeId(), sName, nType);
- PassDocuAt(rCe);
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Typedef::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_type2.cxx b/autodoc/source/parser_i/idl/pe_type2.cxx
deleted file mode 100644
index d21d0179..00000000
--- a/autodoc/source/parser_i/idl/pe_type2.cxx
+++ /dev/null
@@ -1,317 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_type2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_type.hxx>
-#include <ary/idl/ip_type.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/uidl_tok.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-
-/** Implementation Concept for Parsing a Type
-
-Example Type:
- sequence < ::abc::TName< TplType > > AnyName;
-
-Status Changes:
-
-expect_type:
- sequence -> expect_type
- < -> expect_type
- :: -> expect_quname_part
- abc -> expect_quname_separator
- :: -> expect_quname_part
- TName -> expect_quname_separator
- < -> in_template_type (process in nested PE_Type instance)
-
- expect_type:
- TplType ->expect_quname_separator
- > -> e_none (finish, '>' not handled)
-
- > -> expect_quname_separator
- > -> expect_quname_separator (not finish, because sequencecounter > 0)
- AnyName -> e_none (finish)
-*/
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_Type::PE_Type( ary::idl::Type_id & o_rResult )
- : pResult(&o_rResult),
- nIsSequenceCounter(0),
- nSequenceDownCounter(0),
- bIsUnsigned(false),
- sFullType(),
- eState(e_none),
- sLastPart(),
- pPE_TemplateType(0), // @attention Recursion, only initiate, if needed!
- nTemplateType(0),
- aTemplateParameters()
-{
-}
-
-PE_Type::~PE_Type()
-{
-}
-
-void
-PE_Type::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-void
-PE_Type::Process_Identifier( const TokIdentifier & i_rToken )
-{
- if (eState == expect_type)
- {
- sLastPart = i_rToken.Text();
- eState = expect_quname_separator;
- SetResult(done, stay);
- }
- else if (eState == expect_quname_part)
- {
- sLastPart = i_rToken.Text();
- eState = expect_quname_separator;
- SetResult(done, stay);
- }
- else if (eState == expect_quname_separator)
- {
- Finish();
- }
-}
-
-void
-PE_Type::Process_NameSeparator()
-{
- if (eState == expect_type)
- {
- sFullType.Init(true);
- eState = expect_quname_part;
- SetResult(done, stay);
- }
- else if (eState == expect_quname_separator)
- {
- sFullType += sLastPart;
- eState = expect_quname_part;
- SetResult(done, stay);
- }
-}
-
-void
-PE_Type::Process_Punctuation( const TokPunctuation & i_rToken )
-{
- if (eState == expect_type)
- {
- csv_assert(i_rToken.Id() == TokPunctuation::Lesser);
- SetResult(done, stay);
- }
- else if (eState == expect_quname_separator)
- {
- switch (i_rToken.Id())
- {
- case TokPunctuation::Lesser:
- eState = in_template_type;
- SetResult( done, push_sure, &MyTemplateType() );
- break;
-
- case TokPunctuation::Greater:
- if (nSequenceDownCounter > 0)
- {
- nSequenceDownCounter--;
- SetResult(done, stay);
- }
- else
- {
- Finish();
- }
- break;
-
- default:
- Finish();
- } // end switch
- }
- else if (eState == in_template_type)
- {
- aTemplateParameters.push_back(nTemplateType);
- nTemplateType = 0;
-
- if (i_rToken.Id() == TokPunctuation::Greater)
- {
- eState = expect_quname_separator;
- SetResult(done, stay);
- }
- else if (i_rToken.Id() == TokPunctuation::Comma)
- {
- SetResult(done, push_sure, &MyTemplateType());
- }
- else
- {
- csv_assert(false);
- Finish();
- }
- }
-}
-
-void
-PE_Type::Process_BuiltInType( const TokBuiltInType & i_rToken )
-{
- if (eState == expect_type)
- {
- sLastPart = i_rToken.Text();
- eState = expect_quname_separator;
- SetResult(done, stay);
- }
- else if (eState == expect_quname_part)
- {
- // Can this happen?
-
- sLastPart = i_rToken.Text();
- eState = expect_quname_separator;
- SetResult(done, stay);
- }
- else if (eState == expect_quname_separator)
- {
- // Can this happen?
-
- Finish();
- }
-}
-
-void
-PE_Type::Process_TypeModifier( const TokTypeModifier & i_rToken )
-{
- if (eState == expect_type)
- {
- switch ( i_rToken.Id() )
- {
- case TokTypeModifier::tmod_unsigned:
- bIsUnsigned = true;
- break;
- case TokTypeModifier::tmod_sequence:
- nIsSequenceCounter++;
- nSequenceDownCounter++;
- break;
- default:
- csv_assert(false);
- }
- SetResult(done, stay);
- }
- else if (eState == expect_quname_separator)
- {
- // Can this happen?
-
- Finish();
- }
-}
-
-void
-PE_Type::Process_Default()
-{
- Finish();
-}
-
-void
-PE_Type::Finish()
-{
- csv_assert(nSequenceDownCounter == 0);
-
- sFullType.SetLocalName(sLastPart);
- SetResult(not_done, pop_success);
-}
-
-PE_Type &
-PE_Type::MyTemplateType()
-{
- if (NOT pPE_TemplateType)
- {
- pPE_TemplateType = new PE_Type(nTemplateType);
- pPE_TemplateType->EstablishContacts( this,
- MyRepository(),
- TokenResult() );
- }
- return *pPE_TemplateType;
-}
-
-void
-PE_Type::InitData()
-{
- eState = expect_type;
-
- nIsSequenceCounter = 0;
- nSequenceDownCounter = 0;
- bIsUnsigned = false;
- sFullType.Empty();
- sLastPart.clear();
- nTemplateType = 0;
- csv::erase_container(aTemplateParameters);
-}
-
-void
-PE_Type::TransferData()
-{
- if (bIsUnsigned)
- {
- StreamLock sl(40);
- String sName( sl() << "unsigned " << sFullType.LocalName() << c_str );
- sFullType.SetLocalName(sName);
- }
-
- const ary::idl::Type &
- result = Gate().Types().CheckIn_Type( sFullType,
- nIsSequenceCounter,
- CurNamespace().CeId(),
- &aTemplateParameters );
- *pResult = result.TypeId();
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Type::MyPE()
-{
- return *this;
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pe_vari2.cxx b/autodoc/source/parser_i/idl/pe_vari2.cxx
deleted file mode 100644
index c3714a21..00000000
--- a/autodoc/source/parser_i/idl/pe_vari2.cxx
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pe_vari2.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_property.hxx>
-#include <ary/idl/ip_ce.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/pe_type2.hxx>
-#include <s2_luidl/tk_keyw.hxx>
-#include <s2_luidl/tk_ident.hxx>
-#include <s2_luidl/tk_punct.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-PE_Variable::PE_Variable( ary::idl::Type_id & i_rResult_Type,
- String & i_rResult_Name )
- : eState(e_none),
- pResult_Type(&i_rResult_Type),
- pResult_Name(&i_rResult_Name),
- pPE_Type(0)
-{
- pPE_Type = new PE_Type(i_rResult_Type);
-}
-
-void
-PE_Variable::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result & o_rResult )
-{
- UnoIDL_PE::EstablishContacts(io_pParentPE,io_rRepository,o_rResult);
- pPE_Type->EstablishContacts(this,io_rRepository,o_rResult);
-}
-
-PE_Variable::~PE_Variable()
-{
-}
-
-void
-PE_Variable::ProcessToken( const Token & i_rToken )
-{
- i_rToken.Trigger(*this);
-}
-
-
-void
-PE_Variable::Process_Default()
-{
- if (eState == expect_type)
- {
- SetResult( not_done, push_sure, pPE_Type.Ptr() );
- }
- else{
- csv_assert(false);
- }
-}
-
-void
-PE_Variable::Process_Identifier( const TokIdentifier & i_rToken )
-{
- if (eState == expect_type)
- {
- SetResult( not_done, push_sure, pPE_Type.Ptr() );
- }
- else if (eState == expect_name)
- {
- *pResult_Name = i_rToken.Text();
- SetResult( done, stay );
- eState = expect_finish;
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_Variable::Process_Punctuation( const TokPunctuation & )
-{
- if (eState == expect_finish)
- {
- SetResult( not_done, pop_success );
- eState = e_none;
- }
- else if (eState == expect_name)
- {
- SetResult( not_done, pop_success );
- eState = e_none;
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_Variable::Process_BuiltInType( const TokBuiltInType & i_rToken )
-{
- if (eState == expect_type)
- {
- SetResult( not_done, push_sure, pPE_Type.Ptr() );
- }
- else if (eState == expect_name AND i_rToken.Id() == TokBuiltInType::bty_ellipse)
- {
- SetResult( not_done, pop_success );
- eState = e_none;
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_Variable::InitData()
-{
- eState = expect_type;
-
- *pResult_Type = 0;
- *pResult_Name = "";
-}
-
-void
-PE_Variable::ReceiveData()
-{
- eState = expect_name;
-}
-
-void
-PE_Variable::TransferData()
-{
- eState = e_none;
-}
-
-UnoIDL_PE &
-PE_Variable::MyPE()
-{
- return *this;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/pestate.cxx b/autodoc/source/parser_i/idl/pestate.cxx
deleted file mode 100644
index 214be8e9..00000000
--- a/autodoc/source/parser_i/idl/pestate.cxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/pestate.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/parsenv2.hxx>
-
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-void
-ParseEnvState::Process_Identifier( const TokIdentifier & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_NameSeparator()
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_Punctuation( const TokPunctuation & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_BuiltInType( const TokBuiltInType & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_TypeModifier( const TokTypeModifier & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_MetaType( const TokMetaType & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_Stereotype( const TokStereotype & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_ParameterHandling( const TokParameterHandling & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_Raises()
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_Needs()
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_Observes()
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_Assignment( const TokAssignment & )
-{
- Process_Default();
-}
-
-void
-ParseEnvState::Process_EOL()
-{
- MyPE().SetResult(done,stay);
-}
-
-
-void
-ParseEnvState::On_SubPE_Left()
-{
-}
-
-void
-ParseEnvState::Process_Default()
-{
- if (bDefaultIsError)
- MyPE().SetResult(not_done, pop_failure);
- else // ignore:
- MyPE().SetResult(done, stay);
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/semnode.cxx b/autodoc/source/parser_i/idl/semnode.cxx
deleted file mode 100644
index 4ff1e3f1..00000000
--- a/autodoc/source/parser_i/idl/semnode.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/semnode.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/ary.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/idl/i_module.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <s2_luidl/parsenv2.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-SemanticNode::SemanticNode()
- : pParentPE(0),
- pAryGate(0),
- pTokenResult(0)
-{
-}
-
-void
-SemanticNode::EstablishContacts( UnoIDL_PE * io_pParentPE,
- ary::idl::Gate & io_rGate,
- TokenProcessing_Result & o_rResult )
-{
- pParentPE = io_pParentPE;
- pAryGate = &io_rGate;
- pTokenResult = &o_rResult;
-}
-
-SemanticNode::~SemanticNode()
-{
-}
-
-void
-SemanticNode::SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- UnoIDL_PE * i_pParseEnv2Push )
-{
- csv_assert(pTokenResult != 0);
-
- pTokenResult->eDone = i_eDone;
- pTokenResult->eStackAction = i_eWhat2DoWithEnvStack;
- pTokenResult->pEnv2Push = i_pParseEnv2Push;
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/tk_const.cxx b/autodoc/source/parser_i/idl/tk_const.cxx
deleted file mode 100644
index 69027f73..00000000
--- a/autodoc/source/parser_i/idl/tk_const.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/tk_const.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <s2_luidl/tokintpr.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-void
-TokAssignment::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Assignment(*this);
-}
-
-const char *
-TokAssignment::Text() const
-{
- return sText;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/tk_ident.cxx b/autodoc/source/parser_i/idl/tk_ident.cxx
deleted file mode 100644
index bda977da..00000000
--- a/autodoc/source/parser_i/idl/tk_ident.cxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/tk_ident.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <s2_luidl/tokintpr.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-void
-TokIdentifier::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Identifier(*this);
-}
-
-const char *
-TokIdentifier::Text() const
-{
- return sText;
-}
-
-void
-TokNameSeparator::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_NameSeparator();
-}
-
-const char *
-TokNameSeparator::Text() const
-{
- return "::";
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/tk_keyw.cxx b/autodoc/source/parser_i/idl/tk_keyw.cxx
deleted file mode 100644
index 7b333270..00000000
--- a/autodoc/source/parser_i/idl/tk_keyw.cxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/tk_keyw.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <s2_luidl/tokintpr.hxx>
-
-
-using csi::uidl::TokBuiltInType;
-using csi::uidl::TokTypeModifier;
-using csi::uidl::TokMetaType;
-using csi::uidl::TokStereotype;
-using csi::uidl::TokParameterHandling;
-
-
-lux::EnumValueMap G_aTokBuiltInType_EV_TokenId_Values;
-TokBuiltInType::EV_TokenId ev_bty_none(TokBuiltInType::e_none,"");
-TokBuiltInType::EV_TokenId ev_bty_any(TokBuiltInType::bty_any,"any");
-TokBuiltInType::EV_TokenId ev_bty_boolean(TokBuiltInType::bty_boolean,"boolean");
-TokBuiltInType::EV_TokenId ev_bty_byte(TokBuiltInType::bty_byte,"byte");
-TokBuiltInType::EV_TokenId ev_bty_char(TokBuiltInType::bty_char,"char");
-TokBuiltInType::EV_TokenId ev_bty_double(TokBuiltInType::bty_double,"double");
-TokBuiltInType::EV_TokenId ev_bty_hyper(TokBuiltInType::bty_hyper,"hyper");
-TokBuiltInType::EV_TokenId ev_bty_long(TokBuiltInType::bty_long,"long");
-TokBuiltInType::EV_TokenId ev_bty_short(TokBuiltInType::bty_short,"short");
-TokBuiltInType::EV_TokenId ev_bty_string(TokBuiltInType::bty_string,"string");
-TokBuiltInType::EV_TokenId ev_bty_void(TokBuiltInType::bty_void,"void");
-TokBuiltInType::EV_TokenId ev_bty_ellipse(TokBuiltInType::bty_ellipse,"...");
-
-
-lux::EnumValueMap G_aTokTypeModifier_EV_TokenId_Values;
-TokTypeModifier::EV_TokenId ev_tmod_none(TokTypeModifier::e_none,"");
-TokTypeModifier::EV_TokenId ev_tmod_unsigned(TokTypeModifier::tmod_unsigned,"unsigned");
-TokTypeModifier::EV_TokenId ev_tmod_sequence(TokTypeModifier::tmod_sequence,"sequence");
-
-
-lux::EnumValueMap G_aTokMetaType_EV_TokenId_Values;
-TokMetaType::EV_TokenId ev_mt_none(TokMetaType::e_none,"");
-TokMetaType::EV_TokenId ev_mt_attribute(TokMetaType::mt_attribute,"attribute");
-TokMetaType::EV_TokenId ev_mt_constants(TokMetaType::mt_constants,"constants");
-TokMetaType::EV_TokenId ev_mt_enum(TokMetaType::mt_enum,"enum");
-TokMetaType::EV_TokenId ev_mt_exception(TokMetaType::mt_exception,"exception");
-TokMetaType::EV_TokenId ev_mt_ident(TokMetaType::mt_ident,"ident");
-TokMetaType::EV_TokenId ev_mt_interface(TokMetaType::mt_interface,"interface");
-TokMetaType::EV_TokenId ev_mt_module(TokMetaType::mt_module,"module");
-TokMetaType::EV_TokenId ev_mt_property(TokMetaType::mt_property,"property");
-TokMetaType::EV_TokenId ev_mt_service(TokMetaType::mt_service,"service");
-TokMetaType::EV_TokenId ev_mt_singleton(TokMetaType::mt_singleton,"singleton");
-TokMetaType::EV_TokenId ev_mt_struct(TokMetaType::mt_struct,"struct");
-TokMetaType::EV_TokenId ev_mt_typedef(TokMetaType::mt_typedef,"typedef");
-TokMetaType::EV_TokenId ev_mt_uik(TokMetaType::mt_uik,"uik");
-
-
-lux::EnumValueMap G_aTokStereotype_EV_TokenId_Values;
-TokStereotype::EV_TokenId ev_ste_none(TokStereotype::e_none,"");
-TokStereotype::EV_TokenId ev_ste_bound(TokStereotype::ste_bound,"bound");
-TokStereotype::EV_TokenId ev_ste_const(TokStereotype::ste_const,"const");
-TokStereotype::EV_TokenId ev_ste_constrained(TokStereotype::ste_constrained,"constrained");
-TokStereotype::EV_TokenId ev_ste_maybeambiguous(TokStereotype::ste_maybeambiguous,"maybeambiguous");
-TokStereotype::EV_TokenId ev_ste_maybedefault(TokStereotype::ste_maybedefault,"maybedefault");
-TokStereotype::EV_TokenId ev_ste_maybevoid(TokStereotype::ste_maybevoid,"maybevoid");
-TokStereotype::EV_TokenId ev_ste_oneway(TokStereotype::ste_oneway,"oneway");
-TokStereotype::EV_TokenId ev_ste_optional(TokStereotype::ste_optional,"optional");
-TokStereotype::EV_TokenId ev_ste_readonly(TokStereotype::ste_readonly,"readonly");
-TokStereotype::EV_TokenId ev_ste_removable(TokStereotype::ste_removable,"removable");
-TokStereotype::EV_TokenId ev_ste_virtual(TokStereotype::ste_virtual,"virtual");
-TokStereotype::EV_TokenId ev_ste_transient(TokStereotype::ste_transient,"transient");
-TokStereotype::EV_TokenId ev_ste_published(TokStereotype::ste_published,"published");
-
-
-lux::EnumValueMap G_aTokParameterHandling_EV_TokenId_Values;
-TokParameterHandling::EV_TokenId ev_ph_none(TokParameterHandling::e_none,"");
-TokParameterHandling::EV_TokenId ev_ph_in(TokParameterHandling::ph_in,"in");
-TokParameterHandling::EV_TokenId ev_ph_out(TokParameterHandling::ph_out,"out");
-TokParameterHandling::EV_TokenId ev_ph_inout(TokParameterHandling::ph_inout,"inout");
-
-
-namespace lux
-{
-
-template<> EnumValueMap &
-TokBuiltInType::EV_TokenId::Values_() { return G_aTokBuiltInType_EV_TokenId_Values; }
-template<> EnumValueMap &
-TokTypeModifier::EV_TokenId::Values_() { return G_aTokTypeModifier_EV_TokenId_Values; }
-template<> EnumValueMap &
-TokMetaType::EV_TokenId::Values_() { return G_aTokMetaType_EV_TokenId_Values; }
-template<> EnumValueMap &
-TokStereotype::EV_TokenId::Values_() { return G_aTokStereotype_EV_TokenId_Values; }
-template<> EnumValueMap &
-TokParameterHandling::EV_TokenId::Values_() { return G_aTokParameterHandling_EV_TokenId_Values; }
-
-} // namespace lux
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-void
-TokBuiltInType::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_BuiltInType(*this);
-}
-
-const char *
-TokBuiltInType::Text() const
-{
- return eTag.Text();
-}
-
-void
-TokTypeModifier::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_TypeModifier(*this);
-}
-
-const char *
-TokTypeModifier::Text() const
-{
- return eTag.Text();
-}
-
-void
-TokMetaType::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_MetaType(*this);
-}
-
-const char *
-TokMetaType::Text() const
-{
- return eTag.Text();
-}
-
-void
-TokStereotype::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Stereotype(*this);
-}
-
-const char *
-TokStereotype::Text() const
-{
- return eTag.Text();
-}
-
-void
-TokParameterHandling::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_ParameterHandling(*this);
-}
-
-const char *
-TokParameterHandling::Text() const
-{
- return eTag.Text();
-}
-
-void
-TokRaises::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Raises();
-}
-
-const char *
-TokRaises::Text() const
-{
- return "raises";
-}
-
-void
-TokNeeds::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Needs();
-}
-
-const char *
-TokNeeds::Text() const
-{
- return "needs";
-}
-void
-TokObserves::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Observes();
-}
-
-const char *
-TokObserves::Text() const
-{
- return "observes";
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/tk_punct.cxx b/autodoc/source/parser_i/idl/tk_punct.cxx
deleted file mode 100644
index 970fc2eb..00000000
--- a/autodoc/source/parser_i/idl/tk_punct.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/tk_punct.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <parser/parserinfo.hxx>
-#include <s2_luidl/tokintpr.hxx>
-
-
-using csi::uidl::TokPunctuation;
-
-
-lux::EnumValueMap G_aTokPunctuation_EV_TokenId_Values;
-TokPunctuation::EV_TokenId ev_none(TokPunctuation::e_none,"");
-TokPunctuation::EV_TokenId BracketOpen(TokPunctuation::BracketOpen,"(");
-TokPunctuation::EV_TokenId BracketClose(TokPunctuation::BracketClose,")");
-TokPunctuation::EV_TokenId ArrayBracketOpen(TokPunctuation::ArrayBracketOpen,"[");
-TokPunctuation::EV_TokenId ArrayBracketClose(TokPunctuation::ArrayBracketClose,"]");
-TokPunctuation::EV_TokenId CurledBracketOpen(TokPunctuation::CurledBracketOpen,"{");
-TokPunctuation::EV_TokenId CurledBracketClose(TokPunctuation::CurledBracketClose,"}");
-TokPunctuation::EV_TokenId Semicolon(TokPunctuation::Semicolon,";");
-TokPunctuation::EV_TokenId Colon(TokPunctuation::Colon,":");
-TokPunctuation::EV_TokenId DoubleColon(TokPunctuation::DoubleColon,"::");
-TokPunctuation::EV_TokenId Comma(TokPunctuation::Comma,",");
-TokPunctuation::EV_TokenId Minus(TokPunctuation::Minus,"-");
-TokPunctuation::EV_TokenId Fullstop(TokPunctuation::Fullstop,".");
-TokPunctuation::EV_TokenId Lesser(TokPunctuation::Lesser,"<");
-TokPunctuation::EV_TokenId Greater(TokPunctuation::Greater,">");
-
-
-
-
-namespace lux
-{
-template<> EnumValueMap &
-TokPunctuation::EV_TokenId::Values_() { return G_aTokPunctuation_EV_TokenId_Values; }
-}
-
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-void
-TokPunctuation::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Punctuation(*this);
-}
-
-const char *
-TokPunctuation::Text() const
-{
- return eTag.Text();
-}
-
-void
-Tok_EOL::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_EOL();
-}
-
-const char *
-Tok_EOL::Text() const
-{
- return "\r\n";
-}
-
-void
-Tok_EOF::Trigger( TokenInterpreter & ) const
-{
- csv_assert(false);
-// io_rInterpreter.Process_EOF();
-}
-
-const char *
-Tok_EOF::Text() const
-{
- return "";
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/tkp_uidl.cxx b/autodoc/source/parser_i/idl/tkp_uidl.cxx
deleted file mode 100644
index 2f6d944e..00000000
--- a/autodoc/source/parser_i/idl/tkp_uidl.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_luidl/tkp_uidl.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <s2_luidl/cx_idlco.hxx>
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-TokenParser_Uidl::TokenParser_Uidl( Token_Receiver & o_rUidlReceiver,
- DYN ::TkpDocuContext & let_drDocuContext )
- : pBaseContext(new Context_UidlCode(o_rUidlReceiver, let_drDocuContext)),
- pCurContext(0)
-{
- SetStartContext();
-}
-
-TokenParser_Uidl::~TokenParser_Uidl()
-{
-}
-
-void
-TokenParser_Uidl::SetStartContext()
-{
- pCurContext = pBaseContext.Ptr();
-}
-
-void
-TokenParser_Uidl::SetCurrentContext( TkpContext & io_rContext )
-{
- pCurContext = &io_rContext;
-}
-
-TkpContext &
-TokenParser_Uidl::CurrentContext()
-{
- return *pCurContext;
-}
-
-} // namespace uidl
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idl/unoidl.cxx b/autodoc/source/parser_i/idl/unoidl.cxx
deleted file mode 100644
index 047716a6..00000000
--- a/autodoc/source/parser_i/idl/unoidl.cxx
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <parser/unoidl.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <stdlib.h>
-#include <cosv/file.hxx>
-#include <ary/ary.hxx>
-#include <ary/idl/i_gate.hxx>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <../parser/inc/x_docu.hxx>
-#include <parser/parserinfo.hxx>
-#include <tools/filecoll.hxx>
-#include <tools/tkpchars.hxx>
-#include <s2_luidl/tkp_uidl.hxx>
-#include <s2_luidl/distrib.hxx>
-#include <s2_luidl/pe_file2.hxx>
-#include <s2_dsapi/cx_dsapi.hxx>
-#include <adc_msg.hxx>
-#include <x_parse2.hxx>
-
-
-
-namespace autodoc
-{
-
-
-class FileParsePerformers
-{
- public:
- FileParsePerformers(
- ary::Repository &
- io_rRepository,
- ParserInfo & io_rParserInfo );
-
- void ParseFile(
- const char * i_sFullPath );
-
- private:
- CharacterSource aFileLoader;
- Dyn<csi::uidl::TokenParser_Uidl>
- pTokens;
- csi::uidl::TokenDistributor
- aDistributor;
- Dyn<csi::uidl::PE_File>
- pFileParseEnvironment;
- ary::Repository &
- rRepository;
- ParserInfo & rParserInfo;
-};
-
-
-IdlParser::IdlParser( ary::Repository & io_rRepository )
- : pRepository(&io_rRepository)
-{
-}
-
-void
-IdlParser::Run( const autodoc::FileCollector_Ifc & i_rFiles )
-{
- Dyn<FileParsePerformers>
- pFileParsePerformers(
- new FileParsePerformers(*pRepository,
- static_cast< ParserInfo& >(*this)) );
-
- FileCollector::const_iterator iEnd = i_rFiles.End();
- for ( FileCollector::const_iterator iter = i_rFiles.Begin();
- iter != iEnd;
- ++iter )
- {
- Cout() << (*iter) << " ..."<< Endl();
-
- try
- {
- pFileParsePerformers->ParseFile(*iter);
- }
- catch (X_AutodocParser &)
- {
- /// Ignore and goon
- TheMessages().Out_ParseError(CurFile(), CurLine());
- pFileParsePerformers
- = new FileParsePerformers(*pRepository,
- static_cast< ParserInfo& >(*this));
- }
- catch (X_Docu & xd)
- {
- // Currently thic catches only wrong since tags, while since tags are
- // transformed. In this case the program shall be terminated.
- Cerr() << xd << Endl();
- exit(1);
- }
- catch (...)
- {
- Cout() << "Unknown error." << Endl();
- exit(0);
-// pFileParsePerformers = new FileParsePerformers( *pRepository );
- }
- }
-}
-
-FileParsePerformers::FileParsePerformers( ary::Repository & io_rRepository,
- ParserInfo & io_rParserInfo )
- : pTokens(0),
- aDistributor(io_rRepository, io_rParserInfo),
- rRepository( io_rRepository ),
- rParserInfo(io_rParserInfo)
-{
- DYN csi::dsapi::Context_Docu *
- dpDocuContext
- = new csi::dsapi::Context_Docu( aDistributor.DocuTokens_Receiver() );
- pTokens = new csi::uidl::TokenParser_Uidl( aDistributor.CodeTokens_Receiver(), *dpDocuContext );
- pFileParseEnvironment
- = new csi::uidl::PE_File(aDistributor,rParserInfo);
-
- aDistributor.SetTokenProvider(*pTokens);
- aDistributor.SetTopParseEnvironment(*pFileParseEnvironment);
-}
-
-void
-FileParsePerformers::ParseFile( const char * i_sFullPath )
-{
- csv::File aFile(i_sFullPath);
-
- aFile.open( csv::CFM_READ );
- csv_assert( aFile.is_open() );
- aFileLoader.LoadText(aFile);
- aFile.close();
-
- rParserInfo.Set_CurFile(i_sFullPath, true); // true = count lines
- pTokens->Start(aFileLoader);
- aDistributor.Reset();
-
- do {
- aDistributor.TradeToken();
- } while ( NOT aFileLoader.IsFinished() );
-}
-
-} // namespace autodoc
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/cx_docu2.cxx b/autodoc/source/parser_i/idoc/cx_docu2.cxx
deleted file mode 100644
index a0418cba..00000000
--- a/autodoc/source/parser_i/idoc/cx_docu2.cxx
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/cx_docu2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <../../parser/inc/tokens/parseinc.hxx>
-#include <s2_dsapi/tokrecv.hxx>
-#include <s2_dsapi/tk_html.hxx>
-#include <s2_dsapi/tk_xml.hxx>
-#include <s2_dsapi/tk_docw2.hxx>
-#include <x_parse2.hxx>
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-
-bool
-Cx_Base::PassNewToken()
-{
- if (pNewToken)
- {
- rReceiver.Receive(*pNewToken.Release());
-
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_Base::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Cx_Base::Handle_DocuSyntaxError( CharacterSource & io_rText )
-{
- // KORR_FUTURE
- // Put this into Error Log File
-
- Cerr() << "Error: Syntax error in documentation within "
- << "this text:\n\""
- << io_rText.CutToken()
- << "\"."
- << Endl();
- SetToken( new Tok_Word(io_rText.CurToken()) );
-}
-
-void
-Cx_EoHtml::ReadCharChain( CharacterSource & io_rText )
-{
- if ( NULCH == jumpTo(io_rText,'>') )
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- io_rText.MoveOn();
- SetToken(new Tok_HtmlTag(io_rText.CutToken(),bToken_IsStartOfParagraph));
-}
-
-void
-Cx_EoXmlConst::ReadCharChain( CharacterSource & io_rText )
-{
- char c = jumpTo(io_rText,'>','*');
- if ( NULCH == c OR '*' == c )
- {
- Handle_DocuSyntaxError(io_rText);
- return;
- }
-
- io_rText.MoveOn();
- io_rText.CutToken();
- SetToken(new Tok_XmlConst(eTokenId));
-}
-
-void
-Cx_EoXmlLink_BeginTag::ReadCharChain( CharacterSource & io_rText )
-{
- String sScope;
- String sDim;
-
- do {
- char cReached = jumpTo(io_rText,'"','>','*');
- switch (cReached)
- {
- case '"':
- {
- io_rText.MoveOn();
- io_rText.CutToken();
- char c = jumpTo(io_rText,'"','*', '>');
- if ( NULCH == c OR '*' == c OR '>' == c)
- {
- if ( '>' == c )
- io_rText.MoveOn();
- Handle_DocuSyntaxError(io_rText);
- return;
- }
-
- const char * pAttribute = io_rText.CutToken();
- if ( *pAttribute != '[' )
- sScope = pAttribute;
- else
- sDim = pAttribute;
-
- io_rText.MoveOn();
- break;
- }
- case '>':
- break;
- case '*':
- Handle_DocuSyntaxError(io_rText);
- return;
- default:
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- } // end switch
- } while ( io_rText.CurChar() != '>' );
-
- io_rText.MoveOn();
- io_rText.CutToken();
- SetToken( new Tok_XmlLink_BeginTag(eTokenId, sScope.c_str(), sDim.c_str()) );
-}
-
-void
-Cx_EoXmlLink_EndTag::ReadCharChain( CharacterSource & io_rText )
-{
- char c = jumpTo(io_rText,'>','*');
- if ( NULCH == c OR '*' == c )
- {
- Handle_DocuSyntaxError(io_rText);
- return;
- }
-
- io_rText.MoveOn();
- io_rText.CutToken();
- SetToken(new Tok_XmlLink_EndTag(eTokenId));
-}
-
-void
-Cx_EoXmlFormat_BeginTag::ReadCharChain( CharacterSource & io_rText )
-{
- String sDim;
-
- char cReached = jumpTo(io_rText,'"','>','*');
- switch (cReached)
- {
- case '"':
- {
- io_rText.MoveOn();
- io_rText.CutToken();
-
- char c = jumpTo(io_rText,'"','*','>');
- if ( NULCH == c OR '*' == c OR '>' == c )
- {
- if ('>' == c )
- io_rText.MoveOn();
- Handle_DocuSyntaxError(io_rText);
- return;
- }
-
- sDim = io_rText.CutToken();
-
- c = jumpTo(io_rText,'>','*');
- if ( NULCH == c OR '*' == c )
- {
- Handle_DocuSyntaxError(io_rText);
- return;
- }
- break;
- }
- case '>':
- break;
- case '*':
- Handle_DocuSyntaxError(io_rText);
- return;
- default:
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- } // end switch
-
- io_rText.MoveOn();
- io_rText.CutToken();
- SetToken(new Tok_XmlFormat_BeginTag(eTokenId, sDim));
-}
-
-void
-Cx_EoXmlFormat_EndTag::ReadCharChain( CharacterSource & io_rText )
-{
- char c = jumpTo(io_rText,'>','*');
- if ( NULCH == c OR '*' == c )
- {
- Handle_DocuSyntaxError(io_rText);
- return;
- }
-
- io_rText.MoveOn();
- io_rText.CutToken();
- SetToken(new Tok_XmlFormat_EndTag(eTokenId));
-}
-
-void
-Cx_CheckStar::ReadCharChain( CharacterSource & io_rText )
-{
- bEndTokenFound = false;
- if (bIsEnd)
- {
- char cNext = jumpOver(io_rText,'*');
- if ( NULCH == cNext )
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- if (cNext == '/')
- {
- io_rText.MoveOn();
- SetToken(new Tok_DocuEnd);
- bEndTokenFound = true;
- }
- else
- {
- SetToken( new Tok_Word(io_rText.CutToken()) );
- }
- }
- else
- {
- jumpToWhite(io_rText);
- SetToken( new Tok_Word(io_rText.CutToken()) );
- }
-}
-
-TkpContext &
-Cx_CheckStar::FollowUpContext()
-{
- if (bEndTokenFound)
- return *pEnd_FollowUpContext;
- else
- return Cx_Base::FollowUpContext();
-}
-
-} // namespace dsapi
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/cx_dsapi.cxx b/autodoc/source/parser_i/idoc/cx_dsapi.cxx
deleted file mode 100644
index ade06fd4..00000000
--- a/autodoc/source/parser_i/idoc/cx_dsapi.cxx
+++ /dev/null
@@ -1,535 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/cx_dsapi.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <x_parse2.hxx>
-#include <tools/tkpchars.hxx>
-#include <s2_dsapi/tk_atag2.hxx>
-#include <s2_dsapi/tk_docw2.hxx>
-#include <s2_dsapi/tk_xml.hxx>
-#include <s2_dsapi/cx_docu2.hxx>
-#include <s2_dsapi/tokrecv.hxx>
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-const intt C_nStatusSize = 128;
-const intt C_nCppInitialNrOfStati = 400;
-
-
-const uintt nF_fin_Error = 1;
-const uintt nF_fin_Ignore = 2;
-const uintt nF_fin_Eof = 3;
-const uintt nF_fin_AnyWord = 4;
-const uintt nF_fin_AtTag = 5;
-const uintt nF_fin_EndSign = 6;
-const uintt nF_goto_EoHtml = 7;
-const uintt nF_goto_EoXmlConst = 8;
-const uintt nF_goto_EoXmlLink_BeginTag = 9;
-const uintt nF_goto_EoXmlLink_EndTag = 10;
-const uintt nF_goto_EoXmlFormat_BeginTag = 11;
-const uintt nF_goto_EoXmlFormat_EndTag = 12;
-const uintt nF_goto_CheckStar = 13;
-const uintt nF_fin_Comma = 14;
-const uintt nF_fin_White = 15;
-
-const UINT16 nTok_at_author = 100 + Tok_AtTag::author;
-const UINT16 nTok_at_see = 100 + Tok_AtTag::see;
-const UINT16 nTok_at_param = 100 + Tok_AtTag::param;
-const UINT16 nTok_at_return = 100 + Tok_AtTag::e_return;
-const UINT16 nTok_at_throws = 100 + Tok_AtTag::e_throw;
-const UINT16 nTok_at_example = 100 + Tok_AtTag::example;
-const UINT16 nTok_at_deprecated = 100 + Tok_AtTag::deprecated;
-const UINT16 nTok_at_suspicious = 100 + Tok_AtTag::suspicious;
-const UINT16 nTok_at_missing = 100 + Tok_AtTag::missing;
-const UINT16 nTok_at_incomplete = 100 + Tok_AtTag::incomplete;
-const UINT16 nTok_at_version = 100 + Tok_AtTag::version;
-const UINT16 nTok_at_guarantees = 100 + Tok_AtTag::guarantees;
-const UINT16 nTok_at_exception = 100 + Tok_AtTag::exception;
-const UINT16 nTok_at_since = 100 + Tok_AtTag::since;
-
-const UINT16 nTok_const_TRUE = 200 + Tok_XmlConst::e_true;
-const UINT16 nTok_const_FALSE = 200 + Tok_XmlConst::e_false;
-const UINT16 nTok_const_NULL = 200 + Tok_XmlConst::e_null;
-const UINT16 nTok_const_void = 200 + Tok_XmlConst::e_void;
-
-const UINT16 nTok_link_typeB = 300 + Tok_XmlLink_BeginTag::type;
-const UINT16 nTok_link_typeE = 325 + Tok_XmlLink_EndTag::type;
-const UINT16 nTok_link_memberB = 300 + Tok_XmlLink_BeginTag::member;
-const UINT16 nTok_link_membeE = 325 + Tok_XmlLink_EndTag::member;
-const UINT16 nTok_link_constB = 300 + Tok_XmlLink_BeginTag::e_const;
-const UINT16 nTok_link_constE = 325 + Tok_XmlLink_EndTag::e_const;
-
-const UINT16 nTok_format_listingB = 350 + Tok_XmlFormat_BeginTag::listing;
-const UINT16 nTok_format_listingE = 375 + Tok_XmlFormat_EndTag::listing;
-const UINT16 nTok_format_codeB = 350 + Tok_XmlFormat_BeginTag::code;
-const UINT16 nTok_format_codeE = 375 + Tok_XmlFormat_EndTag::code;
-const UINT16 nTok_format_atomB = 350 + Tok_XmlFormat_BeginTag::atom;
-const UINT16 nTok_format_atomE = 375 + Tok_XmlFormat_EndTag::atom;
-
-
-const UINT16 nTok_html_parastart = 400;
-
-const UINT16 nTok_MLDocuEnd = 501;
-const UINT16 nTok_EOL = 502;
-
-
-Context_Docu::Context_Docu( Token_Receiver & o_rReceiver )
- : aStateMachine(C_nStatusSize, C_nCppInitialNrOfStati),
- pReceiver(&o_rReceiver),
- pParentContext(0),
- pCx_EoHtml(0),
- pCx_EoXmlConst(0),
- pCx_EoXmlLink_BeginTag(0),
- pCx_EoXmlLink_EndTag(0),
- pCx_EoXmlFormat_BeginTag(0),
- pCx_EoXmlFormat_EndTag(0),
- pCx_CheckStar(0),
- pNewToken(0),
- pFollowUpContext(0),
- bIsMultiline(false)
-{
- pCx_EoHtml = new Cx_EoHtml(o_rReceiver, *this);
- pCx_EoXmlConst = new Cx_EoXmlConst(o_rReceiver, *this);
- pCx_EoXmlLink_BeginTag = new Cx_EoXmlLink_BeginTag(o_rReceiver, *this);
- pCx_EoXmlLink_EndTag = new Cx_EoXmlLink_EndTag(o_rReceiver, *this);
- pCx_EoXmlFormat_BeginTag = new Cx_EoXmlFormat_BeginTag(o_rReceiver, *this);
- pCx_EoXmlFormat_EndTag = new Cx_EoXmlFormat_EndTag(o_rReceiver, *this);
- pCx_CheckStar = new Cx_CheckStar(*pReceiver,*this);
-
- SetupStateMachine();
-}
-
-void
-Context_Docu::SetParentContext( TkpContext & io_rParentContext,
- const char * )
-{
- pFollowUpContext = pParentContext = &io_rParentContext;
- pCx_CheckStar->Set_End_FolloUpContext(io_rParentContext);
-}
-
-Context_Docu::~Context_Docu()
-{
-}
-
-void
-Context_Docu::ReadCharChain( CharacterSource & io_rText )
-{
- csv_assert(pParentContext != 0);
-
- pNewToken = 0;
-
- UINT16 nTokenId = 0;
- StmBoundsStatu2 & rBound = aStateMachine.GetCharChain(nTokenId, io_rText);
-
- // !!!
- // The order of the next two lines is essential, because
- // pFollowUpContext may be changed by PerformStatusFunction() also,
- // which then MUST override the previous assignment.
- pFollowUpContext = rBound.FollowUpContext();
- PerformStatusFunction(rBound.StatusFunctionNr(), nTokenId, io_rText);
-}
-
-bool
-Context_Docu::PassNewToken()
-{
- if (pNewToken)
- {
- pReceiver->Receive(*pNewToken.Release());
- return true;
- }
- return false;
-}
-
-TkpContext &
-Context_Docu::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Context_Docu::PerformStatusFunction( uintt i_nStatusSignal,
- UINT16 i_nTokenId,
- CharacterSource & io_rText )
-{
- switch (i_nStatusSignal)
- {
- case nF_fin_White:
- io_rText.CutToken();
- pNewToken = new Tok_White;
- break;
- case nF_fin_Error:
- throw X_AutodocParser(X_AutodocParser::x_InvalidChar);
- // no break because of throw
- case nF_fin_Ignore:
- pNewToken = 0;
- io_rText.CutToken();
- break;
- case nF_fin_Eof:
- if (bIsMultiline)
- throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
- else
- io_rText.CutToken();
- pNewToken = new Tok_EOF;
- break;
- case nF_fin_AnyWord:
- pNewToken = new Tok_Word(io_rText.CutToken());
- break;
- case nF_fin_AtTag:
- io_rText.CutToken();
- pNewToken = new Tok_AtTag( i_nTokenId - 100 );
- break;
- case nF_fin_Comma:
- io_rText.CutToken();
- pNewToken = new Tok_Comma;
- break;
- case nF_fin_EndSign:
- io_rText.CutToken();
- switch (i_nTokenId)
- {
- case nTok_MLDocuEnd:
- if (bIsMultiline)
- {
- pNewToken = new Tok_DocuEnd;
- pFollowUpContext = pParentContext;
- }
- else
- {
- pNewToken = new Tok_Word(io_rText.CutToken());
- pFollowUpContext = this;
- }
- break;
- case nTok_EOL:
- if (bIsMultiline)
- {
- pNewToken = new Tok_EOL;
- pFollowUpContext = this;
- }
- else
- {
- pNewToken = new Tok_DocuEnd;
- pFollowUpContext = pParentContext;
- }
- pReceiver->Increment_CurLine();
- break;
- default:
- csv_assert(false);
- }
- break;
- case nF_goto_EoHtml:
- pCx_EoHtml->SetIfIsStartOfParagraph(i_nTokenId == nTok_html_parastart);
- break;
- case nF_goto_EoXmlConst:
- pCx_EoXmlConst->SetTokenId(i_nTokenId - 200);
- break;
- case nF_goto_EoXmlLink_BeginTag:
- pCx_EoXmlLink_BeginTag->SetTokenId(i_nTokenId - 300);
- break;
- case nF_goto_EoXmlLink_EndTag:
- pCx_EoXmlLink_EndTag->SetTokenId(i_nTokenId - 325);
- break;
- case nF_goto_EoXmlFormat_BeginTag:
- pCx_EoXmlFormat_BeginTag->SetTokenId(i_nTokenId - 350);
- break;
- case nF_goto_EoXmlFormat_EndTag:
- pCx_EoXmlFormat_EndTag->SetTokenId(i_nTokenId - 375);
- break;
- case nF_goto_CheckStar:
- pCx_CheckStar->SetIsEnd( bIsMultiline );
- break;
- default:
- csv_assert(false);
- } // end switch (i_nStatusSignal)
-}
-
-void
-Context_Docu::SetupStateMachine()
-{
- // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
-// const INT16 bas = 0; // Base-Status
- const INT16 wht = 1; // Whitespace-overlook-Status
- const INT16 awd = 2; // Any-Word-Read-Status
-
- // Kontextwechsel-Stati:
- const INT16 goto_EoHtml = 3;
- const INT16 goto_EoXmlConst = 4;
- const INT16 goto_EoXmlLink_BeginTag = 5;
- const INT16 goto_EoXmlLink_EndTag = 6;
- const INT16 goto_EoXmlFormat_BeginTag = 7;
- const INT16 goto_EoXmlFormat_EndTag = 8;
- const INT16 goto_CheckStar = 9;
-
- // Tokenfinish-Stati:
- const INT16 finError = 10;
-// const INT16 finIgnore = 11;
- const INT16 finEof = 12;
- const INT16 finAnyWord = 13;
- const INT16 finAtTag = 14;
- const INT16 finEndSign = 15;
-// const INT16 finComma = 16;
- const INT16 finWhite = 17;
-
- // Konstanten zur Benutzung in der Tabelle:
- const INT16 ght = goto_EoHtml;
-/*
- const INT16 gxc = goto_EoXmlConst;
- const INT16 glb = goto_EoXmlLink_TagBegin;
- const INT16 gle = goto_EoXmlLink_TagEnd;
- const INT16 gfb = goto_EoXmlFormat_TagBegin;
- const INT16 gfe = goto_EoXmlFormat_TagEnd;
-*/
- const INT16 err = finError;
- const INT16 faw = finAnyWord;
-// const INT16 fig = finIgnore;
-// const INT16 fes = finEndSign;
- const INT16 fof = finEof;
-// const INT16 fat = finAtTag;
- const INT16 fwh = finWhite;
-
- /// The '0's will be replaced by calls of AddToken().
-
- const INT16 A_nTopStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
- wht,awd,awd,awd,awd,awd,awd,awd,awd,awd, 0,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, 0,awd,awd,awd, // ... 63
- 0,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
- };
-
- const INT16 A_nWhitespaceStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht,fwh,wht,wht,fwh,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
- wht,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 63
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 95
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
- fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh // ... 127
- };
-
- const INT16 A_nWordStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
- err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
- faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd, // ... 63
- faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
- };
-
- const INT16 A_nAtTagDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
- err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
- faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,faw,awd,awd,awd, // ... 63
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
- awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
- };
-
- const INT16 A_nHtmlDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {ght,err,err,err,err,err,err,err,err,ght,ght,ght,ght,ght,err,err,
- err,err,err,err,err,err,err,err,err,err,ght,err,err,err,err,err, // ... 31
- ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
- ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght, // ... 63
- ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
- ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght, // ... 95
- ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
- ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght // ... 127
- };
-
- const INT16 A_nPunctDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err // 112 ...
- };
-
- DYN StmArrayStatu2 * dpStatusTop
- = new StmArrayStatu2( C_nStatusSize, A_nTopStatus, 0, true);
- DYN StmArrayStatu2 * dpStatusWhite
- = new StmArrayStatu2( C_nStatusSize, A_nWhitespaceStatus, 0, true);
- DYN StmArrayStatu2 * dpStatusWord
- = new StmArrayStatu2( C_nStatusSize, A_nWordStatus, 0, true);
-
- DYN StmBoundsStatu2 * dpBst_goto_EoHtml
- = new StmBoundsStatu2( *this, *pCx_EoHtml, nF_goto_EoHtml, true );
- DYN StmBoundsStatu2 * dpBst_goto_EoXmlConst
- = new StmBoundsStatu2( *this, *pCx_EoXmlConst, nF_goto_EoXmlConst, true );
- DYN StmBoundsStatu2 * dpBst_goto_EoXmlLink_BeginTag
- = new StmBoundsStatu2( *this, *pCx_EoXmlLink_BeginTag, nF_goto_EoXmlLink_BeginTag, true );
- DYN StmBoundsStatu2 * dpBst_goto_EoXmlLink_EndTag
- = new StmBoundsStatu2( *this, *pCx_EoXmlLink_EndTag, nF_goto_EoXmlLink_EndTag, true );
- DYN StmBoundsStatu2 * dpBst_goto_EoXmlFormat_BeginTag
- = new StmBoundsStatu2( *this, *pCx_EoXmlFormat_BeginTag, nF_goto_EoXmlFormat_BeginTag, true );
- DYN StmBoundsStatu2 * dpBst_goto_EoXmlFormat_EndTag
- = new StmBoundsStatu2( *this, *pCx_EoXmlFormat_EndTag, nF_goto_EoXmlFormat_EndTag, true );
- DYN StmBoundsStatu2 * dpBst_goto_CheckStar
- = new StmBoundsStatu2( *this, *pCx_CheckStar, nF_goto_CheckStar, true );
-
-
- DYN StmBoundsStatu2 * dpBst_finError
- = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_Error, true );
- DYN StmBoundsStatu2 * dpBst_finIgnore
- = new StmBoundsStatu2( *this, *this, nF_fin_Ignore, true);
- DYN StmBoundsStatu2 * dpBst_finEof
- = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_Eof, false);
- DYN StmBoundsStatu2 * dpBst_finAnyWord
- = new StmBoundsStatu2( *this, *this, nF_fin_AnyWord, true);
- DYN StmBoundsStatu2 * dpBst_finAtTag
- = new StmBoundsStatu2( *this, *this, nF_fin_AtTag, false);
- DYN StmBoundsStatu2 * dpBst_finEndSign
- = new StmBoundsStatu2( *this, *pParentContext, nF_fin_EndSign, false);
- DYN StmBoundsStatu2 * dpBst_fin_Comma
- = new StmBoundsStatu2( *this, *this, nF_fin_Comma, false );
- DYN StmBoundsStatu2 * dpBst_finWhite
- = new StmBoundsStatu2( *this, *this, nF_fin_White, false);
-
-
- // dpMain aufbauen:
- aStateMachine.AddStatus(dpStatusTop);
- aStateMachine.AddStatus(dpStatusWhite);
- aStateMachine.AddStatus(dpStatusWord);
-
- aStateMachine.AddStatus(dpBst_goto_EoHtml);
- aStateMachine.AddStatus(dpBst_goto_EoXmlConst);
- aStateMachine.AddStatus(dpBst_goto_EoXmlLink_BeginTag);
- aStateMachine.AddStatus(dpBst_goto_EoXmlLink_EndTag);
- aStateMachine.AddStatus(dpBst_goto_EoXmlFormat_BeginTag);
- aStateMachine.AddStatus(dpBst_goto_EoXmlFormat_EndTag);
- aStateMachine.AddStatus(dpBst_goto_CheckStar);
-
- aStateMachine.AddStatus(dpBst_finError);
- aStateMachine.AddStatus(dpBst_finIgnore);
- aStateMachine.AddStatus(dpBst_finEof);
- aStateMachine.AddStatus(dpBst_finAnyWord);
- aStateMachine.AddStatus(dpBst_finAtTag);
- aStateMachine.AddStatus(dpBst_finEndSign);
- aStateMachine.AddStatus(dpBst_fin_Comma);
- aStateMachine.AddStatus(dpBst_finWhite);
-
-
- aStateMachine.AddToken( "@author", nTok_at_author, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@param", nTok_at_param, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@throws", nTok_at_throws, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@see", nTok_at_see, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@since", nTok_at_since, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@example", nTok_at_example, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@return", nTok_at_return, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@returns", nTok_at_return, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@deprecated",
- nTok_at_deprecated, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@suspicious",
- nTok_at_suspicious, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@missing", nTok_at_missing, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@incomplete",
- nTok_at_incomplete, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@version", nTok_at_version, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@guarantees",
- nTok_at_guarantees, A_nAtTagDefStatus, finAtTag );
- aStateMachine.AddToken( "@exception",
- nTok_at_exception, A_nAtTagDefStatus, finAtTag );
-
- aStateMachine.AddToken( "<", 0, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "*", 0, A_nPunctDefStatus, goto_CheckStar );
-// aStateMachine.AddToken( ",", 0, A_nPunctDefStatus, finComma );
-
- aStateMachine.AddToken( "<type", nTok_link_typeB, A_nHtmlDefStatus, goto_EoXmlLink_BeginTag );
- aStateMachine.AddToken( "</type", nTok_link_typeE, A_nHtmlDefStatus, goto_EoXmlLink_EndTag );
- aStateMachine.AddToken( "<member", nTok_link_memberB, A_nHtmlDefStatus, goto_EoXmlLink_BeginTag );
- aStateMachine.AddToken( "</member", nTok_link_membeE, A_nHtmlDefStatus, goto_EoXmlLink_EndTag );
- aStateMachine.AddToken( "<const", nTok_link_constB, A_nHtmlDefStatus, goto_EoXmlLink_BeginTag );
- aStateMachine.AddToken( "</const", nTok_link_constE, A_nHtmlDefStatus, goto_EoXmlLink_EndTag );
-
- aStateMachine.AddToken( "<listing", nTok_format_listingB,A_nHtmlDefStatus, goto_EoXmlFormat_BeginTag );
- aStateMachine.AddToken( "</listing",nTok_format_listingE,A_nHtmlDefStatus, goto_EoXmlFormat_EndTag );
- aStateMachine.AddToken( "<code", nTok_format_codeB, A_nHtmlDefStatus, goto_EoXmlFormat_BeginTag );
- aStateMachine.AddToken( "</code", nTok_format_codeE, A_nHtmlDefStatus, goto_EoXmlFormat_EndTag );
- aStateMachine.AddToken( "<atom", nTok_format_atomB, A_nHtmlDefStatus, goto_EoXmlFormat_BeginTag );
- aStateMachine.AddToken( "</atom", nTok_format_atomE, A_nHtmlDefStatus, goto_EoXmlFormat_EndTag );
-
- aStateMachine.AddToken( "<TRUE/", nTok_const_TRUE, A_nHtmlDefStatus, goto_EoXmlConst );
- aStateMachine.AddToken( "<true/", nTok_const_TRUE, A_nHtmlDefStatus, goto_EoXmlConst );
- aStateMachine.AddToken( "<FALSE/", nTok_const_FALSE, A_nHtmlDefStatus, goto_EoXmlConst );
- aStateMachine.AddToken( "<false/", nTok_const_FALSE, A_nHtmlDefStatus, goto_EoXmlConst );
- aStateMachine.AddToken( "<NULL/", nTok_const_NULL, A_nHtmlDefStatus, goto_EoXmlConst );
- aStateMachine.AddToken( "<void/", nTok_const_void, A_nHtmlDefStatus, goto_EoXmlConst );
-
- aStateMachine.AddToken( "<p", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<pre", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<dl", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<ul", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<ol", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<table", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<P", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<PRE", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<DL", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<UL", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<OL", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
- aStateMachine.AddToken( "<TABLE", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
-
- aStateMachine.AddToken( "\r\n", nTok_EOL, A_nPunctDefStatus, finEndSign );
- aStateMachine.AddToken( "\n", nTok_EOL, A_nPunctDefStatus, finEndSign );
- aStateMachine.AddToken( "\r", nTok_EOL, A_nPunctDefStatus, finEndSign );
-};
-
-void
-Context_Docu::SetMode_IsMultiLine( bool i_bTrue )
-{
- bIsMultiline = i_bTrue;
-}
-
-
-} // namespace dsapi
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/docu_pe2.cxx b/autodoc/source/parser_i/idoc/docu_pe2.cxx
deleted file mode 100644
index 45adb295..00000000
--- a/autodoc/source/parser_i/idoc/docu_pe2.cxx
+++ /dev/null
@@ -1,694 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/docu_pe2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cctype>
-#include <ary/doc/d_oldidldocu.hxx>
-#include <ary_i/d_token.hxx>
-#include <parser/parserinfo.hxx>
-#include <adc_cl.hxx>
-#include <adc_msg.hxx>
-#include <../parser/inc/x_docu.hxx>
-#include <s2_dsapi/dsapitok.hxx>
-#include <s2_dsapi/tk_atag2.hxx>
-#include <s2_dsapi/tk_html.hxx>
-#include <s2_dsapi/tk_docw2.hxx>
-#include <s2_dsapi/tk_xml.hxx>
-
-
-#ifdef UNX
-#define strnicmp strncasecmp
-#endif
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-const char * AtTagTitle(
- const Tok_AtTag & i_rToken );
-
-
-SapiDocu_PE::SapiDocu_PE(ParserInfo & io_rPositionInfo)
- : pDocu(0),
- eState(e_none),
- pPositionInfo(&io_rPositionInfo),
- fCurTokenAddFunction(&SapiDocu_PE::AddDocuToken2Void),
- pCurAtTag(0),
- sCurDimAttribute(),
- sCurAtSeeType_byXML(200)
-{
-}
-
-SapiDocu_PE::~SapiDocu_PE()
-{
-}
-
-void
-SapiDocu_PE::ProcessToken( DYN csi::dsapi::Token & let_drToken )
-{
- if (IsComplete())
- {
- pDocu = 0;
- eState = e_none;
- }
-
- if ( eState == e_none )
- {
- pDocu = new ary::doc::OldIdlDocu;
- eState = st_short;
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2Short;
- }
-
- csv_assert(pDocu);
-
- let_drToken.Trigger(*this);
- delete &let_drToken;
-}
-
-void
-SapiDocu_PE::Process_AtTag( const Tok_AtTag & i_rToken )
-{
- if (NOT pCurAtTag)
- {
- eState = st_attags;
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
- }
- else
- {
- csv_assert(eState == st_attags);
- pDocu->AddAtTag(*pCurAtTag.Release());
- }
-
- if (i_rToken.Id() == Tok_AtTag::param)
- {
- pCurAtTag = new DT_ParameterAtTag;
- fCurTokenAddFunction = &SapiDocu_PE::SetCurParameterAtTagName;
- }
- else if (i_rToken.Id() == Tok_AtTag::see)
- {
- pCurAtTag = new DT_SeeAlsoAtTag;
- fCurTokenAddFunction = &SapiDocu_PE::SetCurSeeAlsoAtTagLinkText;
- }
- else if (i_rToken.Id() == Tok_AtTag::deprecated)
- {
- pDocu->SetDeprecated();
- pCurAtTag = new DT_StdAtTag(""); // Dummy that will not be used.
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2Deprecated;
- }
- else if (i_rToken.Id() == Tok_AtTag::since)
- {
- pCurAtTag = new DT_SinceAtTag;
- fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_OOo;
- }
- else
- {
- pCurAtTag = new DT_StdAtTag( AtTagTitle(i_rToken) );
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
- }
-}
-
-void
-SapiDocu_PE::Process_HtmlTag( const Tok_HtmlTag & i_rToken )
-{
- if (eState == st_short AND i_rToken.IsParagraphStarter())
- {
- eState = st_description;
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2Description;
- }
-
- // Workaround special for some errors in API docu:
- if ( strnicmp("<true",i_rToken.Text(),5 ) == 0 )
- {
- if ( strcmp("<TRUE/>",i_rToken.Text()) != 0 )
- TheMessages().Out_InvalidConstSymbol( i_rToken.Text(),
- pPositionInfo->CurFile(),
- pPositionInfo->CurLine() );
- (this->*fCurTokenAddFunction)( *new DT_TextToken("<b>true</b>") );
- return;
- }
- else if ( strnicmp("<false",i_rToken.Text(),6 ) == 0 )
- {
- if ( strcmp("<FALSE/>",i_rToken.Text()) != 0 )
- TheMessages().Out_InvalidConstSymbol( i_rToken.Text(),
- pPositionInfo->CurFile(),
- pPositionInfo->CurLine() );
- (this->*fCurTokenAddFunction)( *new DT_TextToken("<b>false</b>") );
- return;
- }
- else if ( strnicmp("<NULL",i_rToken.Text(),5 ) == 0 )
- {
- if ( strcmp("<NULL/>",i_rToken.Text()) != 0 )
- TheMessages().Out_InvalidConstSymbol( i_rToken.Text(),
- pPositionInfo->CurFile(),
- pPositionInfo->CurLine() );
- (this->*fCurTokenAddFunction)( *new DT_TextToken("<b>null</b>") );
- return;
- }
- else if ( strnicmp("<void",i_rToken.Text(),5 ) == 0 )
- {
- if ( strcmp("<void/>",i_rToken.Text()) != 0 )
- TheMessages().Out_InvalidConstSymbol( i_rToken.Text(),
- pPositionInfo->CurFile(),
- pPositionInfo->CurLine() );
- (this->*fCurTokenAddFunction)( *new DT_TextToken("<b>void</b>") );
- return;
- }
-
- (this->*fCurTokenAddFunction)( *new DT_Style(i_rToken.Text(),false) );
-}
-
-void
-SapiDocu_PE::Process_XmlConst( const Tok_XmlConst & i_rToken )
-{
- (this->*fCurTokenAddFunction)(*new DT_MupConst(i_rToken.Text()));
-}
-
-void
-SapiDocu_PE::Process_XmlLink_BeginTag( const Tok_XmlLink_BeginTag & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case Tok_XmlLink_Tag::e_const:
- (this->*fCurTokenAddFunction)(*new DT_Style("<b>",false));
- break;
- case Tok_XmlLink_Tag::member:
- (this->*fCurTokenAddFunction)(*new DT_MupMember(i_rToken.Scope()));
- break;
- case Tok_XmlLink_Tag::type:
- (this->*fCurTokenAddFunction)(*new DT_MupType(i_rToken.Scope()));
- break;
- default:
- // Do nothing.
- ;
- }
-
- if ( i_rToken.Dim().length() > 0 )
- sCurDimAttribute = i_rToken.Dim();
- else
- sCurDimAttribute.clear();
-}
-
-void
-SapiDocu_PE::Process_XmlLink_EndTag( const Tok_XmlLink_EndTag & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case Tok_XmlLink_Tag::e_const:
- (this->*fCurTokenAddFunction)(*new DT_Style("</b>",false));
- break;
- case Tok_XmlLink_Tag::member:
- (this->*fCurTokenAddFunction)(*new DT_MupMember(true));
- break;
- case Tok_XmlLink_Tag::type:
- (this->*fCurTokenAddFunction)(*new DT_MupType(true));
- break;
- default:
- // Do nothing.
- ;
- }
- if ( sCurDimAttribute.length() > 0 )
- {
- (this->*fCurTokenAddFunction)( *new DT_TextToken(sCurDimAttribute.c_str()) );
- sCurDimAttribute.clear();
- }
-}
-
-void
-SapiDocu_PE::Process_XmlFormat_BeginTag( const Tok_XmlFormat_BeginTag & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case Tok_XmlFormat_Tag::code:
- (this->*fCurTokenAddFunction)(*new DT_Style("<code>",false));
- break;
- case Tok_XmlFormat_Tag::listing:
- (this->*fCurTokenAddFunction)(*new DT_Style("<pre>",true));
- break;
- case Tok_XmlFormat_Tag::atom:
- (this->*fCurTokenAddFunction)(*new DT_Style("<code>",true));
- break;
- default:
- // Do nothing.
- ;
- }
- if ( i_rToken.Dim().length() > 0 )
- sCurDimAttribute = i_rToken.Dim();
- else
- sCurDimAttribute.clear();
-}
-
-void
-SapiDocu_PE::Process_XmlFormat_EndTag( const Tok_XmlFormat_EndTag & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case Tok_XmlFormat_Tag::code:
- (this->*fCurTokenAddFunction)(*new DT_Style("</code>",false));
- break;
- case Tok_XmlFormat_Tag::listing:
- (this->*fCurTokenAddFunction)(*new DT_Style("</pre>",true));
- break;
- case Tok_XmlFormat_Tag::atom:
- (this->*fCurTokenAddFunction)(*new DT_Style("</code>",true));
- break;
- default:
- // Do nothing.
- ;
- }
- if ( sCurDimAttribute.length() > 0 )
- {
- (this->*fCurTokenAddFunction)( *new DT_TextToken(sCurDimAttribute.c_str()) );
- sCurDimAttribute.clear();
- }
-}
-
-void
-SapiDocu_PE::Process_Word( const Tok_Word & i_rToken )
-{
- (this->*fCurTokenAddFunction)(*new DT_TextToken(i_rToken.Text()));
-}
-
-void
-SapiDocu_PE::Process_Comma()
-{
- csv_assert(1==7);
-// (this->*fCurTokenAddFunction)(*new DT_Comma(i_rToken.Text()));
-}
-
-void
-SapiDocu_PE::Process_DocuEnd()
-{
- eState = st_complete;
- if (pCurAtTag)
- pDocu->AddAtTag(*pCurAtTag.Release());
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2Void;
-}
-
-void
-SapiDocu_PE::Process_EOL()
-{
- (this->*fCurTokenAddFunction)(*new DT_EOL);
-}
-
-void
-SapiDocu_PE::Process_White()
-{
- (this->*fCurTokenAddFunction)(*new DT_White);
-}
-
-DYN ary::doc::OldIdlDocu *
-SapiDocu_PE::ReleaseJustParsedDocu()
-{
- if (IsComplete())
- {
- eState = e_none;
- return pDocu.Release();
- }
- return 0;
-}
-
-
-bool
-SapiDocu_PE::IsComplete() const
-{
- return eState == st_complete;
-}
-
-void
-SapiDocu_PE::AddDocuToken2Void( DYN ary::inf::DocuToken & let_drNewToken )
-{
- delete &let_drNewToken;
-}
-
-void
-SapiDocu_PE::AddDocuToken2Short( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pDocu);
- pDocu->AddToken2Short(let_drNewToken);
-}
-
-void
-SapiDocu_PE::AddDocuToken2Description( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pDocu);
- pDocu->AddToken2Description(let_drNewToken);
-}
-
-void
-SapiDocu_PE::AddDocuToken2Deprecated( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pDocu);
- pDocu->AddToken2DeprecatedText(let_drNewToken);
-}
-
-void
-SapiDocu_PE::AddDocuToken2CurAtTag( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
- pCurAtTag->AddToken(let_drNewToken);
-}
-
-void
-SapiDocu_PE::SetCurParameterAtTagName( DYN ary::inf::DocuToken & let_drNewToken )
-{
- if (let_drNewToken.IsWhiteOnly())
- {
- delete &let_drNewToken;
- return;
- }
-
- csv_assert(pCurAtTag);
- DT_TextToken * dpText = dynamic_cast< DT_TextToken* >(&let_drNewToken);
- if (dpText != 0)
- pCurAtTag->SetName(dpText->GetText());
- else
- pCurAtTag->SetName("parameter ?");
- delete &let_drNewToken;
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
-}
-
-void
-SapiDocu_PE::SetCurSeeAlsoAtTagLinkText( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
-
- if (let_drNewToken.IsWhiteOnly())
- {
- delete &let_drNewToken;
- return;
- }
-
- DT_TextToken * pText = dynamic_cast< DT_TextToken* >(&let_drNewToken);
- if (pText != 0)
- pCurAtTag->SetName(pText->GetText());
- else
- {
- DT_MupType *
- pTypeBegin = dynamic_cast< DT_MupType* >(&let_drNewToken);
- DT_MupMember *
- pMemberBegin = dynamic_cast< DT_MupMember* >(&let_drNewToken);
- if (pTypeBegin != 0 OR pMemberBegin != 0)
- {
- sCurAtSeeType_byXML.reset();
-
- sCurAtSeeType_byXML
- << ( pTypeBegin != 0
- ? pTypeBegin->Scope()
- : pMemberBegin->Scope() );
-
- if (sCurAtSeeType_byXML.tellp() > 0)
- {
- sCurAtSeeType_byXML
- << "::";
- }
- delete &let_drNewToken;
- fCurTokenAddFunction = &SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_2;
- return;
- }
- else
- {
- pCurAtTag->SetName("? (no identifier found)");
- }
- }
- delete &let_drNewToken;
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
-}
-
-void
-SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_2( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
-
- if (let_drNewToken.IsWhiteOnly())
- {
- delete &let_drNewToken;
- return;
- }
-
- DT_TextToken *
- pText = dynamic_cast< DT_TextToken* >(&let_drNewToken);
- if (pText != 0)
- {
- sCurAtSeeType_byXML
- << pText->GetText();
- pCurAtTag->SetName(sCurAtSeeType_byXML.c_str());
- }
- else
- {
- pCurAtTag->SetName("? (no identifier found)");
- }
- sCurAtSeeType_byXML.reset();
- delete &let_drNewToken;
- fCurTokenAddFunction = &SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_3;
-}
-
-void
-SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_3( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
-
- if (let_drNewToken.IsWhiteOnly())
- {
- delete &let_drNewToken;
- return;
- }
-
- /// Could emit warning, but don't because this parser is obsolete.
-// Tok_XmlLink_BeginTag *
-// pLinkEnd = dynamic_cast< Tok_XmlLink_EndTag* >(&let_drNewToken);
-// if (pLinkEnd == 0)
-// {
-// warn_aboutMissingClosingTag();
-// }
-
- delete &let_drNewToken;
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
-}
-
-const String
- C_sSinceFormat("Correct version format: \"OOo <major>.<minor>[.<micro> if micro is not 0]\".");
-
-void
-SapiDocu_PE::SetCurSinceAtTagVersion_OOo( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
-
- DT_TextToken * pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
- if (pToken == 0)
- {
- delete &let_drNewToken;
- return;
- }
-
- const String
- sVersion(pToken->GetText());
- if (NOT CheckVersionSyntax_OOo(sVersion))
- {
- Cerr() << "Version information in @since tag has incorrect format.\n"
- << "Found: \"" << sVersion << "\"\n"
- << C_sSinceFormat
- << Endl();
- exit(1);
- }
-
- const autodoc::CommandLine &
- rCommandLine = autodoc::CommandLine::Get_();
- if (NOT rCommandLine.DoesTransform_SinceTag())
- pCurAtTag->AddToken(let_drNewToken);
-
- fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
-}
-
-void
-SapiDocu_PE::SetCurSinceAtTagVersion_Number( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
-
- DT_TextToken * pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
- if (pToken == 0)
- {
- if (dynamic_cast< DT_White* >(&let_drNewToken) != 0)
- {
- String &
- sValue = pCurAtTag->Access_Text().Access_TextOfFirstToken();
- StreamLock
- sHelp(1000);
- sValue = sHelp() << sValue << " " << c_str;
- }
-
- delete &let_drNewToken;
- return;
- }
-
- const String
- sVersion(pToken->GetText());
- if (NOT CheckVersionSyntax_Number(sVersion))
- {
- Cerr() << "Version information in @since tag has incorrect format.\n"
- << "Found: \"" << sVersion << "\"\n"
- << C_sSinceFormat
- << Endl();
- exit(1);
- }
-
- const autodoc::CommandLine &
- rCommandLine = autodoc::CommandLine::Get_();
- if ( rCommandLine.DoesTransform_SinceTag())
- {
- pCurAtTag->AddToken(let_drNewToken);
-
- if (rCommandLine.DisplayOf_SinceTagValue(sVersion).empty())
- {
- // This is the numbered part, but we don't know it.
- delete &let_drNewToken;
-
- StreamLock
- sl(200);
- sl()
- << "Since-value '"
- << sVersion
- << "' not found in translation table.";
- throw X_Docu("since", sl().c_str());
- }
- }
- else
- {
- AddDocuToken2SinceAtTag(let_drNewToken);
- }
- fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2SinceAtTag;
-}
-
-void
-SapiDocu_PE::AddDocuToken2SinceAtTag( DYN ary::inf::DocuToken & let_drNewToken )
-{
- csv_assert(pCurAtTag);
- String &
- sValue = pCurAtTag->Access_Text().Access_TextOfFirstToken();
- StreamLock
- sHelp(1000);
-
- DT_TextToken *
- pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
- if (pToken != 0)
- {
- sValue = sHelp() << sValue << pToken->GetText() << c_str;
- }
- else if (dynamic_cast< DT_White* >(&let_drNewToken) != 0)
- {
- sValue = sHelp() << sValue << " " << c_str;
- }
- delete &let_drNewToken;
-}
-
-bool
-SapiDocu_PE::CheckVersionSyntax_OOo(const String & i_versionPart1)
-{
- return i_versionPart1 == "OOo"
- OR i_versionPart1 == "OpenOffice.org";
-}
-
-bool
-SapiDocu_PE::CheckVersionSyntax_Number(const String & i_versionPart2)
-{
- if (i_versionPart2.length () == 0)
- return false;
-
- const char
- pt = '.';
- unsigned int countDigit = 0;
- unsigned int countPoint = 0;
- const char *
- pFirstPoint = 0;
- const char *
- pLastPoint = 0;
-
- for ( const char * p = i_versionPart2.begin();
- *p != 0;
- ++p )
- {
- if ( std::isdigit(*p) )
- ++countDigit;
- else if (*p == pt)
- {
- if (countPoint == 0)
- pFirstPoint = p;
- pLastPoint = p;
- ++countPoint;
- }
- }
-
- if ( countDigit + countPoint == i_versionPart2.length() // only digits and points
- AND pFirstPoint != 0 AND countPoint < 3 // 1 or 2 points
- AND pFirstPoint + 1 != pLastPoint // there are digits between two points
- AND *i_versionPart2.begin() != pt AND *(pLastPoint + 1) != 0 // points are surrounded by digits
- AND (*(pLastPoint + 1) != '0' OR pLastPoint == pFirstPoint) ) // the first micro-digit is not 0
- {
- return true;
- }
- return false;
-}
-
-const char *
-AtTagTitle( const Tok_AtTag & i_rToken )
-{
- switch (i_rToken.Id())
- {
- case Tok_AtTag::author: return "";
- case Tok_AtTag::see: return "See also";
- case Tok_AtTag::param: return "Parameters";
- case Tok_AtTag::e_return: return "Returns";
- case Tok_AtTag::e_throw: return "Throws";
- case Tok_AtTag::example: return "Example";
- case Tok_AtTag::deprecated: return "Deprecated";
- case Tok_AtTag::suspicious: return "";
- case Tok_AtTag::missing: return "";
- case Tok_AtTag::incomplete: return "";
- case Tok_AtTag::version: return "";
- case Tok_AtTag::guarantees: return "Guarantees";
- case Tok_AtTag::exception: return "Exception";
- case Tok_AtTag::since: return "Since version";
- default:
- // See below.
- ;
- }
- return i_rToken.Text();
-}
-
-
-
-} // namespace dsapi
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/makefile.mk b/autodoc/source/parser_i/idoc/makefile.mk
deleted file mode 100644
index c4e760bd..00000000
--- a/autodoc/source/parser_i/idoc/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=parser2_s2_dsapi
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/cx_docu2.obj \
- $(OBJ)$/cx_dsapi.obj \
- $(OBJ)$/docu_pe2.obj \
- $(OBJ)$/tk_atag2.obj \
- $(OBJ)$/tk_docw2.obj \
- $(OBJ)$/tk_html.obj \
- $(OBJ)$/tk_xml.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser_i/idoc/tk_atag2.cxx b/autodoc/source/parser_i/idoc/tk_atag2.cxx
deleted file mode 100644
index 1b4badda..00000000
--- a/autodoc/source/parser_i/idoc/tk_atag2.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/tk_atag2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <s2_dsapi/tokintpr.hxx>
-
-
-
-using csi::dsapi::Tok_AtTag;
-
-lux::EnumValueMap G_aTokAtTag_EV_TokenId_Values;
-Tok_AtTag::EV_TokenId ev_none2(Tok_AtTag::e_none,"");
-Tok_AtTag::EV_TokenId ev_author(Tok_AtTag::author,"@author");
-Tok_AtTag::EV_TokenId ev_see(Tok_AtTag::see,"@see");
-Tok_AtTag::EV_TokenId ev_param(Tok_AtTag::param,"@param");
-Tok_AtTag::EV_TokenId ev_e_return(Tok_AtTag::e_return,"@return");
-Tok_AtTag::EV_TokenId ev_e_throw(Tok_AtTag::e_throw,"@throws");
-Tok_AtTag::EV_TokenId ev_example(Tok_AtTag::example,"@example");
-Tok_AtTag::EV_TokenId ev_deprecated(Tok_AtTag::deprecated,"@deprecated");
-Tok_AtTag::EV_TokenId ev_suspicious(Tok_AtTag::suspicious,"@suspicious");
-Tok_AtTag::EV_TokenId ev_missing(Tok_AtTag::missing,"@missing");
-Tok_AtTag::EV_TokenId ev_incomplete(Tok_AtTag::incomplete,"@incomplete");
-Tok_AtTag::EV_TokenId ev_version(Tok_AtTag::version,"@version");
-Tok_AtTag::EV_TokenId ev_guarantees(Tok_AtTag::guarantees,"@guarantees");
-Tok_AtTag::EV_TokenId ev_exception(Tok_AtTag::exception,"@exception");
-Tok_AtTag::EV_TokenId ev_since(Tok_AtTag::since,"@since");
-
-
-namespace lux
-{
-template<> EnumValueMap &
-Tok_AtTag::EV_TokenId::Values_() { return G_aTokAtTag_EV_TokenId_Values; }
-}
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-void
-Tok_AtTag::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_AtTag(*this);
-}
-
-const char *
-Tok_AtTag::Text() const
-{
- return eTag.Text();
-}
-
-} // namespace dsapi
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/tk_docw2.cxx b/autodoc/source/parser_i/idoc/tk_docw2.cxx
deleted file mode 100644
index 1243ae8c..00000000
--- a/autodoc/source/parser_i/idoc/tk_docw2.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/tk_docw2.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <s2_dsapi/tokintpr.hxx>
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-void
-Tok_Word::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Word(*this);
-}
-
-const char *
-Tok_Word::Text() const
-{
- return sText;
-}
-
-void
-Tok_Comma::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_Comma();
-}
-
-const char *
-Tok_Comma::Text() const
-{
- return ",";
-}
-
-void
-Tok_DocuEnd::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_DocuEnd();
-}
-
-const char *
-Tok_DocuEnd::Text() const
-{
- return "*/";
-}
-
-void
-Tok_EOL::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_EOL();
-}
-
-const char *
-Tok_EOL::Text() const
-{
- return "\r\n";
-}
-
-void
-Tok_EOF::Trigger( TokenInterpreter & ) const
-{
- csv_assert(false);
-}
-
-const char *
-Tok_EOF::Text() const
-{
- return "";
-}
-
-void
-Tok_White::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_White();
-}
-
-const char *
-Tok_White::Text() const
-{
- return " ";
-}
-
-
-
-
-} // namespace dsapi
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/tk_html.cxx b/autodoc/source/parser_i/idoc/tk_html.cxx
deleted file mode 100644
index a1b719a4..00000000
--- a/autodoc/source/parser_i/idoc/tk_html.cxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/tk_html.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <s2_dsapi/tokintpr.hxx>
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-void
-Tok_HtmlTag::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_HtmlTag(*this);
-}
-
-const char *
-Tok_HtmlTag::Text() const
-{
- return sTag;
-}
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/idoc/tk_xml.cxx b/autodoc/source/parser_i/idoc/tk_xml.cxx
deleted file mode 100644
index 6d4e51aa..00000000
--- a/autodoc/source/parser_i/idoc/tk_xml.cxx
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <s2_dsapi/tk_xml.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <s2_dsapi/tokintpr.hxx>
-
-using csi::dsapi::Tok_XmlConst;
-using csi::dsapi::Tok_XmlLink_Tag;
-using csi::dsapi::Tok_XmlFormat_Tag;
-
-
-lux::EnumValueMap G_aTok_XmlConst_EV_TokenId_Values;
-Tok_XmlConst::EV_TokenId ev_consts_none(Tok_XmlConst::e_none,"");
-Tok_XmlConst::EV_TokenId ev_e_true(Tok_XmlConst::e_true,"true");
-Tok_XmlConst::EV_TokenId ev_e_false(Tok_XmlConst::e_false,"false");
-Tok_XmlConst::EV_TokenId ev_e_null(Tok_XmlConst::e_null,"NULL");
-Tok_XmlConst::EV_TokenId ev_e_void(Tok_XmlConst::e_void,"void");
-
-lux::EnumValueMap G_aTok_XmlLink_Tag_EV_TokenId_Values;
-Tok_XmlLink_Tag::EV_TokenId ev_linktags_none(Tok_XmlLink_Tag::e_none,"");
-Tok_XmlLink_Tag::EV_TokenId ev_e_const(Tok_XmlLink_Tag::e_const,"const");
-Tok_XmlLink_Tag::EV_TokenId ev_member(Tok_XmlLink_Tag::member,"member");
-Tok_XmlLink_Tag::EV_TokenId ev_type(Tok_XmlLink_Tag::type,"type");
-
-lux::EnumValueMap G_aTok_XmlFormat_Tag_EV_TokenId_Values;
-Tok_XmlFormat_Tag::EV_TokenId ev_formattags_none(Tok_XmlFormat_Tag::e_none,"");
-Tok_XmlFormat_Tag::EV_TokenId ev_code(Tok_XmlFormat_Tag::code,"code");
-Tok_XmlFormat_Tag::EV_TokenId ev_listing(Tok_XmlFormat_Tag::listing,"listing");
-Tok_XmlFormat_Tag::EV_TokenId ev_atom(Tok_XmlFormat_Tag::atom,"code");
-
-
-namespace lux
-{
-
-template<> EnumValueMap &
-Tok_XmlConst::EV_TokenId::Values_() { return G_aTok_XmlConst_EV_TokenId_Values; }
-template<> EnumValueMap &
-Tok_XmlLink_Tag::EV_TokenId::Values_() { return G_aTok_XmlLink_Tag_EV_TokenId_Values; }
-template<> EnumValueMap &
-Tok_XmlFormat_Tag::EV_TokenId::Values_() { return G_aTok_XmlFormat_Tag_EV_TokenId_Values; }
-
-} // namespace lux
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-void
-Tok_XmlConst::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_XmlConst(*this);
-}
-
-const char *
-Tok_XmlConst::Text() const
-{
- return eTag.Text();
-}
-
-void
-Tok_XmlLink_BeginTag::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_XmlLink_BeginTag(*this);
-}
-
-const char *
-Tok_XmlLink_BeginTag::Text() const
-{
- static StreamStr ret(120);
- ret.seekp(0);
- if (sScope.length() > 0)
- {
- ret << "<"
- << eTag.Text()
- << " scope=\""
- << sScope
- << "\">";
- }
- else
- {
- ret << "<"
- << eTag.Text()
- << ">";
- }
- return ret.c_str();
-}
-
-void
-Tok_XmlLink_EndTag::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_XmlLink_EndTag(*this);
-}
-
-const char *
-Tok_XmlLink_EndTag::Text() const
-{
- static StreamStr ret(120);
- ret.seekp(0);
- ret << "</"
- << eTag.Text()
- << ">";
- return ret.c_str();
-}
-
-void
-Tok_XmlFormat_BeginTag::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_XmlFormat_BeginTag(*this);
-}
-
-const char *
-Tok_XmlFormat_BeginTag::Text() const
-{
- static StreamStr ret(120);
- ret.seekp(0);
- ret << "<"
- << eTag.Text()
- << ">";
- return ret.c_str();
-}
-
-void
-Tok_XmlFormat_EndTag::Trigger( TokenInterpreter & io_rInterpreter ) const
-{
- io_rInterpreter.Process_XmlFormat_EndTag(*this);
-}
-
-const char *
-Tok_XmlFormat_EndTag::Text() const
-{
- static StreamStr ret(120);
- ret.seekp(0);
- ret << "</"
- << eTag.Text()
- << ">";
- return ret.c_str();
-}
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/cx_docu2.hxx b/autodoc/source/parser_i/inc/s2_dsapi/cx_docu2.hxx
deleted file mode 100644
index 44269613..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/cx_docu2.hxx
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_CX_DOCU2_HXX
-#define DSAPI_CX_DOCU2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcont2.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <s2_dsapi/tk_xml.hxx>
-
-namespace csi
-{
-namespace dsapi
-{
-
-class Token_Receiver;
-
-
-/**
-@descr
-*/
-
-class Cx_Base : public ::TkpContext
-{
- public:
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
- protected:
- // LIFECYCLE
- Cx_Base(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : rReceiver(o_rReceiver),
- pFollowUpContext(&i_rFollowUpContext)
- // pNewToken
- { }
- protected:
- void SetToken(
- DYN Token * let_dpToken )
- { pNewToken = let_dpToken; }
- void Handle_DocuSyntaxError(
- CharacterSource & io_rText );
-
- private:
- // DATA
- Token_Receiver & rReceiver;
- TkpContext * pFollowUpContext;
- Dyn<Token> pNewToken;
-};
-
-
-class Cx_EoHtml : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_EoHtml(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetIfIsStartOfParagraph(
- bool i_bNextTokenProperty )
- { bToken_IsStartOfParagraph = i_bNextTokenProperty; }
-
- private:
- bool bToken_IsStartOfParagraph;
-};
-
-class Cx_EoXmlConst : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_EoXmlConst(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetTokenId(
- lux::Enum< Tok_XmlConst::E_TokenId >
- i_eTokenId )
- { eTokenId = i_eTokenId; }
- private:
- Tok_XmlConst::EV_TokenId
- eTokenId;
-};
-
-class Cx_EoXmlLink_BeginTag : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_EoXmlLink_BeginTag(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetTokenId(
- Tok_XmlLink_BeginTag::EV_TokenId
- i_eTokenId )
- { eTokenId = i_eTokenId; }
- private:
- Tok_XmlLink_BeginTag::EV_TokenId
- eTokenId;
-};
-
-class Cx_EoXmlLink_EndTag : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_EoXmlLink_EndTag(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetTokenId(
- Tok_XmlLink_EndTag::EV_TokenId
- i_eTokenId )
- { eTokenId = i_eTokenId; }
- private:
- Tok_XmlLink_EndTag::E_TokenId
- eTokenId;
-};
-
-class Cx_EoXmlFormat_BeginTag : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_EoXmlFormat_BeginTag(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetTokenId(
- lux::Enum< Tok_XmlFormat_BeginTag::E_TokenId >
- i_eTokenId )
- { eTokenId = i_eTokenId; }
- private:
- lux::Enum< Tok_XmlFormat_BeginTag::E_TokenId >
- eTokenId;
-};
-
-class Cx_EoXmlFormat_EndTag : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_EoXmlFormat_EndTag(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetTokenId(
- lux::Enum< Tok_XmlFormat_EndTag::E_TokenId >
- i_eTokenId )
- { eTokenId = i_eTokenId; }
- private:
- lux::Enum< Tok_XmlFormat_EndTag::E_TokenId >
- eTokenId;
-};
-
-class Cx_CheckStar : public Cx_Base
-{
- public:
- // LIFECYCLE
- Cx_CheckStar(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext),
- bIsEnd(false), bEndTokenFound(false)
- { }
- void Set_End_FolloUpContext(
- TkpContext & i_rEnd_FollowUpContext )
- { pEnd_FollowUpContext = &i_rEnd_FollowUpContext; }
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetIsEnd(
- bool i_bIsEnd )
- { bIsEnd = i_bIsEnd; }
- virtual TkpContext &
- FollowUpContext();
- private:
- TkpContext * pEnd_FollowUpContext;
- bool bIsEnd;
- bool bEndTokenFound;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/cx_dsapi.hxx b/autodoc/source/parser_i/inc/s2_dsapi/cx_dsapi.hxx
deleted file mode 100644
index 7cf99190..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/cx_dsapi.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_CX_DSAPI_HXX
-#define ADC_CX_DSAPI_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcont2.hxx>
- // COMPONENTS
-#include <cosv/tpl/dyn.hxx>
-#include <tokens/tkpstam2.hxx>
- // PARAMETERS
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-class Token_Receiver;
-class Token;
-
-class Cx_EoHtml;
-class Cx_EoXmlConst;
-class Cx_EoXmlLink_BeginTag;
-class Cx_EoXmlLink_EndTag;
-class Cx_EoXmlFormat_BeginTag;
-class Cx_EoXmlFormat_EndTag;
-class Cx_CheckStar;
-
-/**
-@descr
-*/
-class Context_Docu : public TkpDocuContext,
- private StateMachineContext
-{
- public:
- // LIFECYCLE
- Context_Docu(
- Token_Receiver & o_rReceiver );
- virtual void SetParentContext(
- TkpContext & io_rParentContext,
- const char * i_sMultiLineEndToken );
-
- ~Context_Docu();
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-
- virtual bool PassNewToken();
- virtual void SetMode_IsMultiLine(
- bool i_bTrue );
-
- // INQUIRY
- virtual TkpContext &
- FollowUpContext();
- private:
- // SERVICE FUNCTIONS
- virtual void PerformStatusFunction(
- uintt i_nStatusSignal,
- UINT16 i_nTokenId,
- CharacterSource & io_rText );
-
- void SetupStateMachine();
-
- // DATA
- StateMachin2 aStateMachine;
- Token_Receiver * pReceiver;
-
- // Contexts
- TkpContext * pParentContext;
- String sMultiLineEndToken;
-
- Dyn<Cx_EoHtml> pCx_EoHtml;
- Dyn<Cx_EoXmlConst> pCx_EoXmlConst;
- Dyn<Cx_EoXmlLink_BeginTag>
- pCx_EoXmlLink_BeginTag;
- Dyn<Cx_EoXmlLink_EndTag>
- pCx_EoXmlLink_EndTag;
- Dyn<Cx_EoXmlFormat_BeginTag>
- pCx_EoXmlFormat_BeginTag;
- Dyn<Cx_EoXmlFormat_EndTag>
- pCx_EoXmlFormat_EndTag;
- Dyn<Cx_CheckStar> pCx_CheckStar;
-
- // Temporary data, used during ReadCharChain()
- Dyn<Token> pNewToken;
- ::TkpContext * pFollowUpContext;
- bool bIsMultiline;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx b/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
deleted file mode 100644
index 9eace236..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DSAPI_DOCU_PE2_HXX
-#define ADC_DSAPI_DOCU_PE2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_dsapi/tokintpr.hxx>
- // COMPONENTS
- // PARAMETERS
-
-class ParserInfo;
-
-namespace ary
-{
-namespace doc
-{
- class OldIdlDocu;
-}
-
-namespace inf
-{
- class DocuToken;
-} // namespace info
-} // namespace ary
-
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Token;
-class DT_AtTag;
-
-class SapiDocu_PE : public TokenInterpreter
-{
- public:
- SapiDocu_PE(
- ParserInfo & io_rPositionInfo );
- ~SapiDocu_PE();
-
- void ProcessToken(
- DYN csi::dsapi::Token &
- let_drToken );
-
- virtual void Process_AtTag(
- const Tok_AtTag & i_rToken );
- virtual void Process_HtmlTag(
- const Tok_HtmlTag & i_rToken );
- virtual void Process_XmlConst(
- const Tok_XmlConst &
- i_rToken );
- virtual void Process_XmlLink_BeginTag(
- const Tok_XmlLink_BeginTag &
- i_rToken );
- virtual void Process_XmlLink_EndTag(
- const Tok_XmlLink_EndTag &
- i_rToken );
- virtual void Process_XmlFormat_BeginTag(
- const Tok_XmlFormat_BeginTag &
- i_rToken );
- virtual void Process_XmlFormat_EndTag(
- const Tok_XmlFormat_EndTag &
- i_rToken );
- virtual void Process_Word(
- const Tok_Word & i_rToken );
- virtual void Process_Comma();
- virtual void Process_DocuEnd();
- virtual void Process_EOL();
- virtual void Process_White();
-
-
- DYN ary::doc::OldIdlDocu *
- ReleaseJustParsedDocu();
-
- bool IsComplete() const;
-
- private:
- enum E_State
- {
- e_none = 0,
- st_short,
- st_description,
- st_attags,
- st_complete
- };
-
- typedef void ( SapiDocu_PE::*F_TokenAdder )( DYN ary::inf::DocuToken & let_drNewToken );
-
- void AddDocuToken2Void(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void AddDocuToken2Short(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void AddDocuToken2Description(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void AddDocuToken2Deprecated(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void AddDocuToken2CurAtTag(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void SetCurParameterAtTagName(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void SetCurSeeAlsoAtTagLinkText(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void SetCurSeeAlsoAtTagLinkText_2(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void SetCurSeeAlsoAtTagLinkText_3(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void SetCurSinceAtTagVersion_OOo(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void SetCurSinceAtTagVersion_Number(
- DYN ary::inf::DocuToken &
- let_drNewToken );
- void AddDocuToken2SinceAtTag(
- DYN ary::inf::DocuToken &
- let_drNewToken );
-
- bool CheckVersionSyntax_OOo(
- const String & i_versionPart1 );
- bool CheckVersionSyntax_Number(
- const String & i_versionPart2 );
- // DATA
- Dyn<ary::doc::OldIdlDocu>
- pDocu;
- E_State eState;
- ParserInfo * pPositionInfo;
- F_TokenAdder fCurTokenAddFunction;
-
- Dyn<DT_AtTag> pCurAtTag;
- String sCurDimAttribute;
- StreamStr sCurAtSeeType_byXML;
-};
-
-} // namespace dsapi
-} // namespace csi
-
-
-// IMPLEMENTATION
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/dsapitok.hxx b/autodoc/source/parser_i/inc/s2_dsapi/dsapitok.hxx
deleted file mode 100644
index 8d8d418b..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/dsapitok.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_DSAPITOK_HXX
-#define DSAPI_DSAPITOK_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/token2.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class TokenInterpreter;
-
-
-class Token : public TextToken
-{
- public:
- // LIFECYCLE
- virtual ~Token() {}
-
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const = 0;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/tk_atag2.hxx b/autodoc/source/parser_i/inc/s2_dsapi/tk_atag2.hxx
deleted file mode 100644
index dd2e0976..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/tk_atag2.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_TK_ATAG2_HXX
-#define DSAPI_TK_ATAG2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_dsapi/dsapitok.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <luxenum.hxx>
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Tok_AtTag : public Token
-{
- public:
- // TYPE
- enum E_TokenId
- {
- e_none = 0,
- author = 1,
- see = 2,
- param = 3,
- e_return = 4,
- e_throw = 5,
- example = 6,
- deprecated = 7,
- suspicious = 8,
- missing = 9,
- incomplete = 10,
- version = 11,
- guarantees = 12,
- exception = 13,
- since = 14
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- // Spring and Fall
- Tok_AtTag(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- EV_TokenId eTag;
-};
-
-} // namespace dsapi
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/tk_docw2.hxx b/autodoc/source/parser_i/inc/s2_dsapi/tk_docw2.hxx
deleted file mode 100644
index 25ebd547..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/tk_docw2.hxx
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_TK_DOCW2_HXX
-#define DSAPI_TK_DOCW2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_dsapi/dsapitok.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Tok_Word : public Token
-{
- public:
- // Spring and Fall
- Tok_Word(
- const char * i_sText )
- : sText(i_sText) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
-
- private:
- // DATA
- String sText;
-};
-
-class Tok_Comma : public Token
-{
- public:
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
-};
-
-class Tok_DocuEnd : public Token
-{
- public:
- // Spring and Fall
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
-};
-
-class Tok_EOL : public Token
-{
- public:
- // Spring and Fall
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
-};
-
-class Tok_EOF : public Token
-{
- public:
- // Spring and Fall
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
-};
-
-class Tok_White : public Token
-{
- public:
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
-};
-
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/tk_html.hxx b/autodoc/source/parser_i/inc/s2_dsapi/tk_html.hxx
deleted file mode 100644
index 7bb8a26a..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/tk_html.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_TK_HTML_HXX
-#define DSAPI_TK_HTML_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_dsapi/dsapitok.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Tok_HtmlTag : public Token
-{
- public:
- // Spring and Fall
- Tok_HtmlTag(
- const char * i_sTag,
- bool i_bIsParagraphStarter )
- : sTag(i_sTag),
- bIsParagraphStarter(i_bIsParagraphStarter)
- {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- bool IsParagraphStarter() const
- { return bIsParagraphStarter; }
-
- private:
- String sTag;
- bool bIsParagraphStarter;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/tk_xml.hxx b/autodoc/source/parser_i/inc/s2_dsapi/tk_xml.hxx
deleted file mode 100644
index 50d85212..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/tk_xml.hxx
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_TK_XML_HXX
-#define DSAPI_TK_XML_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_dsapi/dsapitok.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <luxenum.hxx>
-
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Tok_XmlTag : public Token
-{
- public:
-};
-
-class Tok_XmlConst : public Tok_XmlTag
-{
- public:
- // TYPE
- enum E_TokenId
- {
- e_none = 0,
- e_true = 1,
- e_false = 2,
- e_null = 3,
- e_void = 4
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- // Spring and Fall
- Tok_XmlConst(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class Tok_XmlLink_Tag : public Tok_XmlTag
-{
- public:
- // TYPE
- enum E_TokenId
- {
- e_none = 0,
- e_const = 1,
- member = 2,
- type = 3
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-};
-
-class Tok_XmlLink_BeginTag : public Tok_XmlLink_Tag
-{
- public:
- // Spring and Fall
- Tok_XmlLink_BeginTag(
- EV_TokenId i_eTag,
- const String & i_sScope,
- const String & i_sDim )
- : eTag(i_eTag),
- sScope(i_sScope),
- sDim(i_sDim) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- E_TokenId Id() const { return eTag; }
- const String & Scope() const { return sScope; }
- const String & Dim() const { return sDim; }
-
- private:
- // DATA
- EV_TokenId eTag;
- String sScope;
- String sDim;
-};
-
-class Tok_XmlLink_EndTag : public Tok_XmlLink_Tag
-{
- public:
- // Spring and Fall
- Tok_XmlLink_EndTag(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class Tok_XmlFormat_Tag : public Tok_XmlTag
-{
- public:
- // TYPE
- enum E_TokenId
- {
- e_none = 0,
- code = 1,
- listing = 2,
- atom = 3
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-};
-
-class Tok_XmlFormat_BeginTag : public Tok_XmlFormat_Tag
-{
- public:
- // Spring and Fall
- Tok_XmlFormat_BeginTag(
- EV_TokenId i_eTag,
- const String & i_sDim )
- : eTag(i_eTag),
- sDim(i_sDim) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- E_TokenId Id() const { return eTag; }
- const String & Dim() const { return sDim; }
-
- private:
- // DATA
- EV_TokenId eTag;
- String sDim;
-};
-
-class Tok_XmlFormat_EndTag : public Tok_XmlFormat_Tag
-{
- public:
- // Spring and Fall
- Tok_XmlFormat_EndTag(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char* Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/tokintpr.hxx b/autodoc/source/parser_i/inc/s2_dsapi/tokintpr.hxx
deleted file mode 100644
index 8437f4f2..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/tokintpr.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_DSAPI_TOKINTPR_HXX
-#define ADC_DSAPI_TOKINTPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Tok_AtTag;
-class Tok_XmlConst;
-class Tok_XmlLink_BeginTag;
-class Tok_XmlLink_EndTag;
-class Tok_XmlFormat_BeginTag;
-class Tok_XmlFormat_EndTag;
-class Tok_Word;
-class Tok_HtmlTag;
-
-class TokenInterpreter
-{
- public:
- virtual ~TokenInterpreter() {}
-
- virtual void Process_AtTag(
- const Tok_AtTag & i_rToken ) = 0;
- virtual void Process_HtmlTag(
- const Tok_HtmlTag & i_rToken ) = 0;
- virtual void Process_XmlConst(
- const Tok_XmlConst &
- i_rToken ) = 0;
- virtual void Process_XmlLink_BeginTag(
- const Tok_XmlLink_BeginTag &
- i_rToken ) = 0;
- virtual void Process_XmlLink_EndTag(
- const Tok_XmlLink_EndTag &
- i_rToken ) = 0;
- virtual void Process_XmlFormat_BeginTag(
- const Tok_XmlFormat_BeginTag &
- i_rToken ) = 0;
- virtual void Process_XmlFormat_EndTag(
- const Tok_XmlFormat_EndTag &
- i_rToken ) = 0;
- virtual void Process_Word(
- const Tok_Word & i_rToken ) = 0;
- virtual void Process_Comma() = 0;
- virtual void Process_DocuEnd() = 0;
- virtual void Process_EOL() = 0;
- virtual void Process_White() = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace dsapi
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_dsapi/tokrecv.hxx b/autodoc/source/parser_i/inc/s2_dsapi/tokrecv.hxx
deleted file mode 100644
index be7d7726..00000000
--- a/autodoc/source/parser_i/inc/s2_dsapi/tokrecv.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 DSAPI_TOKRECV_HXX
-#define DSAPI_TOKRECV_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace dsapi
-{
-
-
-class Token;
-/**
-@descr
-*/
-class Token_Receiver
-{
- public:
- virtual ~Token_Receiver() {}
- virtual void Receive(
- DYN Token & let_drToken ) = 0;
- virtual void Increment_CurLine() = 0;
-};
-
-
-} // namespace dsapi
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/cx_idlco.hxx b/autodoc/source/parser_i/inc/s2_luidl/cx_idlco.hxx
deleted file mode 100644
index db10741e..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/cx_idlco.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_CX_IDLCO_HXX
-#define LUIDL_CX_IDLCO_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcont2.hxx>
- // COMPONENTS
-#include <tokens/tkpstam2.hxx>
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class Token_Receiver;
-class Token;
-
-/**
-*/
-class Context_UidlCode : public TkpContext,
- private StateMachineContext
-{
- public:
- // LIFECYCLE
- Context_UidlCode(
- Token_Receiver & o_rReceiver,
- DYN TkpDocuContext &
- let_drContext_Docu );
- ~Context_UidlCode();
- // OPERATORS
-
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
-
- // INQUIRY
- virtual TkpContext &
- FollowUpContext();
- private:
- // SERVICE FUNCTIONS
- void PerformStatusFunction(
- uintt i_nStatusSignal,
- UINT16 i_nTokenId,
- CharacterSource & io_rText );
- void SetupStateMachine();
-
- // DATA
- StateMachin2 aStateMachine;
- Token_Receiver * pReceiver;
-
- // Contexts
- Dyn<TkpDocuContext> pDocuContext;
-
- Dyn<TkpContext> dpContext_MLComment;
- Dyn<TkpContext> dpContext_SLComment;
- Dyn<TkpContext> dpContext_Preprocessor;
- Dyn<TkpContext> dpContext_Assignment;
-
- // Temporary data, used during ReadCharChain()
- Dyn<Token> pNewToken;
- ::TkpContext * pFollowUpContext;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/cx_sub.hxx b/autodoc/source/parser_i/inc/s2_luidl/cx_sub.hxx
deleted file mode 100644
index b1e96671..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/cx_sub.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_LUIDL_CX_SUB_HXX
-#define ADC_LUIDL_CX_SUB_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcont2.hxx>
- // COMPONENTS
- // PARAMETERS
-
-#include "uidl_tok.hxx"
-
-namespace csi
-{
-namespace uidl
-{
-
-class Token_Receiver;
-class Token;
-
-
-class Cx_Base : public ::TkpContext
-{
- public:
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
- protected:
- // LIFECYCLE
- Cx_Base(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : rReceiver(o_rReceiver),
- pFollowUpContext(&i_rFollowUpContext),
- pNewToken()
- {}
- protected:
- void SetToken(
- DYN Token * let_dpToken )
- { pNewToken = let_dpToken; }
- Token_Receiver & Receiver() { return rReceiver; }
-
- private:
- // DATA
- Token_Receiver & rReceiver;
- TkpContext * pFollowUpContext;
- Dyn<Token> pNewToken;
-};
-
-
-
-/**
-@descr
-*/
-
-class Context_MLComment : public Cx_Base
-{
- public:
- Context_MLComment(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_SLComment : public Cx_Base
-{
- public:
- Context_SLComment(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_Praeprocessor : public Cx_Base
-{
- public:
- Context_Praeprocessor(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_Assignment : public Cx_Base
-{
- public:
- Context_Assignment(
- Token_Receiver & o_rReceiver,
- TkpContext & i_rFollowUpContext )
- : Cx_Base(o_rReceiver, i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/distrib.hxx b/autodoc/source/parser_i/inc/s2_luidl/distrib.hxx
deleted file mode 100644
index eec22017..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/distrib.hxx
+++ /dev/null
@@ -1,274 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_DISTRIB_HXX
-#define LUIDL_DISTRIB_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/tokrecv.hxx>
-#include <s2_dsapi/tokrecv.hxx>
-#include <s2_luidl/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class ParserInfo;
-
-namespace ary
-{
- class Repository;
-
-namespace doc
-{
- class OldIdlDocu;
-} // namespace inf
-} // namespace ary)
-
-
-
-namespace csi
-{
-namespace dsapi
-{
- class Token_Receiver;
- class SapiDocu_PE;
-}
-
-
-
-namespace uidl
-{
-
-
-typedef std::vector< DYN Token * > TokenQueue;
-typedef TokenQueue::iterator TokenIterator;
-
-class TokenParser_Uidl;
-class UnoIDL_PE;
-class Token;
-
-
-class TokenDistributor : private TokenProcessing_Types
-
-{
- public:
- TokenDistributor(
- ary::Repository & io_rRepository,
- ParserInfo & io_rParserInfo );
- void SetTokenProvider(
- TokenParser_Uidl & io_rTokenSource );
- void SetTopParseEnvironment(
- UnoIDL_PE & io_pTopParseEnvironment );
- ~TokenDistributor();
-
-
- void Reset() { aDocumentation.Reset(); }
- /** calls pTokenSource->GetNextToken() and checks the incoming tokens, until a
- usable token is found. This token will be forwarded to
- pTopParseEnv;
- */
- void TradeToken();
-
- csi::uidl::Token_Receiver &
- CodeTokens_Receiver();
- csi::dsapi::Token_Receiver &
- DocuTokens_Receiver();
-
- /** Used from PE_File, if there is a docu to get without
- an environment to push (this is the case for modules).
- */
- DYN ary::doc::OldIdlDocu *
- ReleaseLastParsedDocu()
- { return aDocumentation.ReleaseLastParsedDocu(); }
-
- /** Used from PE_File, if the term "published" was parsed.
- The next opened parse environment will be set to be published
- (call ->UnoIDL_PE::SetPublished()).
- */
- void Set_PublishedOn()
- { aProcessingData.Set_PublishedOn(); }
-
-
- private:
- class Documentation;
- class ProcessingData;
- friend class ProcessingData;
-
- class ProcessingData : public csi::uidl::Token_Receiver,
- private TokenProcessing_Types
- {
- public:
- ProcessingData(
- ary::Repository & io_rRepository,
- Documentation & i_rDocuProcessor,
- ParserInfo & io_rParserInfo );
- ~ProcessingData();
- void SetTopParseEnvironment(
- UnoIDL_PE & io_pTopParseEnvironment );
-
-
- /** is called from pTokenSource before finishing a ::TokenParse2::GetNextToken()
- call and passes the just parsed token to this class.
- */
- virtual void Receive(
- DYN csi::uidl::Token &
- let_drToken );
- virtual void Increment_CurLine();
-
- void ProcessCurToken();
-
- UnoIDL_PE & CurEnvironment() const;
- bool NextTokenExists() const;
- void Set_PublishedOn()
- { bPublishedRecentlyOn = true; }
-
- private:
- typedef uintt TokenQ_Position;
- typedef std::pair< UnoIDL_PE *, TokenQ_Position > EnvironmentInfo;
- typedef std::vector< EnvironmentInfo > EnvironmentStack;
-
- void AcknowledgeResult();
- const csi::uidl::Token &
- CurToken() const;
- UnoIDL_PE & CurEnv() const;
- UnoIDL_PE & PushEnv() const;
- uintt CurTokenPosition() const;
- uintt CurEnv_TriedTokenPosition() const;
- void DecrementTryCount();
-
- EnvironmentStack aEnvironments;
- TokenQueue aTokenQueue;
- TokenIterator itCurToken;
- TokenProcessing_Result
- aCurResult;
- uintt nTryCount;
- bool bFinished;
- ary::Repository &
- rRepository;
- ParserInfo & rParserInfo;
- Documentation * pDocuProcessor;
- bool bPublishedRecentlyOn;
- };
-
- class Documentation : public csi::dsapi::Token_Receiver
- {
- public:
- Documentation(
- ParserInfo & io_rParserInfo);
- ~Documentation();
-
- void Reset() { bIsPassedFirstDocu = false; }
-
- virtual void Receive(
- DYN csi::dsapi::Token &
- let_drToken );
- virtual void Increment_CurLine();
- DYN ary::doc::OldIdlDocu *
- ReleaseLastParsedDocu()
- { return pMostRecentDocu.Release(); }
- private:
- Dyn<csi::dsapi::SapiDocu_PE>
- pDocuParseEnv;
- ParserInfo & rParserInfo;
- Dyn<ary::doc::OldIdlDocu>
- pMostRecentDocu;
- bool bIsPassedFirstDocu;
- };
-
- // DATA
- TokenParser_Uidl * pTokenSource;
- Documentation aDocumentation;
- ProcessingData aProcessingData;
-};
-
-
-
-// IMPLEMENTATION
-
-inline void
-TokenDistributor::SetTokenProvider( TokenParser_Uidl & io_rTokenSource )
- { pTokenSource = &io_rTokenSource; }
-
-inline void
-TokenDistributor::SetTopParseEnvironment( UnoIDL_PE & io_pTopParseEnvironment )
- { aProcessingData.SetTopParseEnvironment(io_pTopParseEnvironment); }
-
-inline csi::uidl::Token_Receiver &
-TokenDistributor::CodeTokens_Receiver()
- { return aProcessingData; }
-
-inline csi::dsapi::Token_Receiver &
-TokenDistributor::DocuTokens_Receiver()
- { return aDocumentation; }
-
-inline const csi::uidl::Token &
-TokenDistributor::ProcessingData::CurToken() const
-{
- csv_assert( itCurToken != aTokenQueue.end() );
- csv_assert( *itCurToken != 0 );
- return *(*itCurToken);
-}
-
-inline UnoIDL_PE &
-TokenDistributor::ProcessingData::CurEnv() const
-{
- csv_assert( aEnvironments.size() > 0 );
- csv_assert( aEnvironments.back().first != 0 );
- return *aEnvironments.back().first;
-}
-
-inline UnoIDL_PE &
-TokenDistributor::ProcessingData::PushEnv() const
-{
- csv_assert( aCurResult.pEnv2Push != 0 );
- return *aCurResult.pEnv2Push;
-}
-
-inline uintt
-TokenDistributor::ProcessingData::CurTokenPosition() const
-{
- return itCurToken - aTokenQueue.begin();
-}
-
-inline uintt
-TokenDistributor::ProcessingData::CurEnv_TriedTokenPosition() const
-{
- csv_assert( aEnvironments.size() > 0 );
- return aEnvironments.back().second;
-}
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/parsenv2.hxx b/autodoc/source/parser_i/inc/s2_luidl/parsenv2.hxx
deleted file mode 100644
index a6278f0d..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/parsenv2.hxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PARSENV2_HXX
-#define LUIDL_PARSENV2_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/tokproct.hxx>
- // COMPONENTS
-#include <s2_luidl/semnode.hxx>
- // PARAMETERS
-#include <ary/idl/i_types4idl.hxx>
-#include <ary/idl/i_module.hxx>
-
-
-
-class ParserInfo;
-
-namespace ary
-{
- class QualifiedName;
- class Repository;
-
-namespace doc
-{
- class OldIdlDocu;
-}
-
-namespace idl
-{
- class CodeEntity;
-}
-}
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class Token;
-class SemanticNode;
-
-
-class UnoIDL_PE : virtual protected TokenProcessing_Types
-{
- public:
- virtual ~UnoIDL_PE();
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository &
- io_rRepository,
- TokenProcessing_Result &
- o_rResult );
-// virtual void EstablishContacts(
-// UnoIDL_PE * io_pParentPE,
-// ary::idl::Gate &
-// io_rGate,
-// TokenProcessing_Result &
-// o_rResult );
- virtual void Enter(
- E_EnvStackAction i_eWayOfEntering );
- virtual void Leave(
- E_EnvStackAction i_eWayOfLeaving );
- virtual void ProcessToken(
- const Token & i_rToken ) = 0;
-
- void SetDocu(
- DYN ary::doc::OldIdlDocu *
- let_dpDocu );
- void SetPublished();
- void SetOptional();
- void PassDocuAt(
- ary::idl::CodeEntity &
- io_rCe );
-
- UnoIDL_PE * Parent() const { return aMyNode.Parent(); }
-
- void SetResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- UnoIDL_PE * i_pParseEnv2Push = 0 )
- { aMyNode.SetTokenResult( i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push ); }
- virtual const ary::idl::Module &
- CurNamespace() const;
- virtual const ParserInfo &
- ParseInfo() const;
- ary::idl::Gate & Gate() const { return aMyNode.AryGate(); }
- TokenProcessing_Result &
- TokenResult() const { return aMyNode.TokenResult(); }
- DYN ary::doc::OldIdlDocu *
- ReleaseDocu() { return pDocu.Release(); }
- protected:
- UnoIDL_PE();
- ary::Repository & MyRepository() { csv_assert(pRepository != 0);
- return *pRepository; }
- private:
- virtual void InitData();
- virtual void TransferData() = 0;
- virtual void ReceiveData();
-
- SemanticNode aMyNode;
- Dyn<ary::doc::OldIdlDocu>
- pDocu;
- ary::Repository * pRepository;
-};
-
-
-
-
-} // namespace uidl
-} // namespace csi
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_attri.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_attri.hxx
deleted file mode 100644
index 5a6dffc7..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_attri.hxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_ATTRI_HXX
-#define ADC_UIDL_PE_ATTRI_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
-#include <ary/idl/i_property.hxx>
- // PARAMETERS
-#include <ary/idl/i_gate.hxx>
-
-
-namespace ary
-{
- namespace idl
- {
- class Attribute;
- }
-}
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class PE_Variable;
-class PE_Type;
-
-class PE_Attribute : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- typedef ary::idl::Ce_id Ce_id;
- typedef ary::idl::Type_id Type_id;
-
- PE_Attribute(
- const Ce_id & i_rCurOwner );
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository &
- io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual ~PE_Attribute();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Raises();
- virtual void Process_Default();
-
- private:
- enum E_State
- {
- e_none,
- e_start,
- in_variable,
- expect_end,
- in_raise_std, /// before 'get', 'set', ';' or '}'
- in_get,
- in_set
- };
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- E_State eState;
- const Ce_id * pCurOwner;
-
- Dyn<PE_Variable> pPE_Variable;
- Dyn<PE_Type> pPE_Exception;
-
- // object-data
- ary::idl::Attribute *
- pCurAttribute;
- Type_id nCurParsedType;
- String sCurParsedName;
- bool bReadOnly;
- bool bBound;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_const.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_const.hxx
deleted file mode 100644
index 74d93021..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_const.hxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_CONST_HXX
-#define LUIDL_PE_CONST_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace udm {
-class Agent_Struct;
-} // namespace udm
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class ConstantsGroup;
-
-class PE_Type;
-class PE_Value;
-
-class PE_Constant : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Constant();
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository &
- io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_Constant();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
-
- private:
- enum E_State
- {
- e_none,
- expect_name,
- expect_curl_bracket_open,
- expect_const,
- expect_value,
- expect_finish,
- e_STATES_MAX
- };
- enum E_TokenType
- {
- tt_stereotype,
- tt_identifier,
- tt_punctuation,
- tt_MAX
- };
- typedef void (PE_Constant::*F_TOK)(const char *);
-
-
- void CallHandler(
- const char * i_sTokenText,
- E_TokenType i_eTokenType );
-
- void On_expect_name_Identifier(const char * i_sText);
- void On_expect_curl_bracket_open_Punctuation(const char * i_sText);
- void On_expect_const_Stereotype(const char * i_sText);
- void On_expect_const_Punctuation(const char * i_sText);
- void On_expect_value_Identifier(const char * i_sText);
- void On_expect_finish_Punctuation(const char * i_sText);
- void On_Default(const char * );
-
- void EmptySingleConstData();
- void CreateSingleConstant();
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
-
- E_State eState;
-
- String sData_Name;
- ary::idl::Ce_id nDataId;
-
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nType;
-
- Dyn<PE_Value> pPE_Value;
- String sName;
- String sAssignment;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_enum2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_enum2.hxx
deleted file mode 100644
index 4d97c58a..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_enum2.hxx
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_ENUM2_HXX
-#define ADC_UIDL_PE_ENUM2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-// class Enum;
-
-class PE_Value;
-
-class PE_Enum : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Enum();
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_Enum();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
-
- private:
- enum E_State
- {
- e_none,
- expect_name,
- expect_curl_bracket_open,
- expect_value,
- expect_finish,
- e_STATES_MAX
- };
- enum E_TokenType
- {
- tt_identifier,
- tt_punctuation,
- tt_MAX
- };
- typedef void (PE_Enum::*F_TOK)(const char *);
-
-
- void CallHandler(
- const char * i_sTokenText,
- E_TokenType i_eTokenType );
-
- void On_expect_name_Identifier(const char * i_sText);
- void On_expect_curl_bracket_open_Punctuation(const char * i_sText);
- void On_expect_value_Punctuation(const char * i_sText);
- void On_expect_value_Identifier(const char * i_sText);
- void On_expect_finish_Punctuation(const char * i_sText);
- void On_Default(const char * );
-
- void EmptySingleValueData();
- void CreateSingleValue();
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
-
- E_State eState;
-
- String sData_Name;
- ary::idl::Ce_id nDataId;
-
- Dyn<PE_Value> pPE_Value;
- String sName;
- String sAssignment;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_evalu.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_evalu.hxx
deleted file mode 100644
index dbd27957..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_evalu.hxx
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_EVALU_HXX
-#define LUIDL_PE_EVALU_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace udm {
-class Agent_Struct;
-} // namespace udm
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class PE_Value : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Value(
- String & o_rName,
- String & o_rAssignment,
- bool i_bIsConst );
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository &
- io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_Value();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Assignment(
- const TokAssignment &
- i_rToken );
- private:
- enum E_State
- {
- e_none = 0,
- expect_name,
- got_name,
- e_STATES_MAX
- };
- enum E_TokenType /// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
- {
- tt_identifier = 0,
- tt_punctuation = 1,
- tt_assignment = 2,
- tt_MAX
- };
- typedef void (PE_Value::*F_TOK)(const char *);
-
-
- void CallHandler(
- const char * i_sTokenText,
- E_TokenType i_eTokenType );
-
- void On_expect_name_Identifier(const char * i_sText);
- void On_got_name_Punctuation(const char * i_sText);
- void On_got_name_Assignment(const char * i_sText);
- void On_Default(const char * );
-
- virtual void InitData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- bool IsConst() const { return bIsConst; }
-
- static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
-
- E_State eState;
- String * pName;
- String * pAssignment;
- bool bIsConst;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_excp.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_excp.hxx
deleted file mode 100644
index 6fe3b211..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_excp.hxx
+++ /dev/null
@@ -1,261 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_EXCP_HXX
-#define LUIDL_PE_EXCP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
-#include <s2_luidl/semnode.hxx>
-#include <ary/qualiname.hxx>
- // PARAMETERS
-
-
-
-namespace csi
-{
-namespace prl
-{
- class TNamespace;
-}
-}
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class Exception;
-class StructElement;
-class PE_StructElement;
-class PE_Type;
-
-
-class PE_Exception : public UnoIDL_PE
-{
- public:
- PE_Exception();
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_Exception();
- virtual void ProcessToken(
- const Token & i_rToken );
-
- private:
- struct S_Work
- {
- S_Work();
-
- void InitData();
- void Prepare_PE_QualifiedName();
- void Prepare_PE_Element();
- void Data_Set_Name(
- const char * i_sName );
- // DATA
- String sData_Name;
- bool bIsPreDeclaration;
- ary::idl::Ce_id nCurStruct;
-
- Dyn<PE_StructElement>
- pPE_Element;
- ary::idl::Ce_id nCurParsed_ElementRef;
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nCurParsed_Base;
- };
-
- struct S_Stati;
- class PE_StructState;
- friend struct S_Stati;
- friend class PE_StructState;
-
-
- class PE_StructState : public ParseEnvState
- {
- public:
-
- protected:
- PE_StructState(
- PE_Exception & i_rStruct )
- : rStruct(i_rStruct) {}
- void MoveState(
- ParseEnvState & i_rState ) const;
- void SetResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- UnoIDL_PE * i_pParseEnv2Push = 0 ) const
- { rStruct.SetResult(i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push); }
-
- S_Stati & Stati() const { return *rStruct.pStati; }
- S_Work & Work() const { return rStruct.aWork; }
- PE_Exception & PE() const { return rStruct; }
-
- private:
- virtual UnoIDL_PE & MyPE();
- // DATA
- PE_Exception & rStruct;
- };
-
- class State_None : public PE_StructState
- {
- public:
- State_None(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- };
- class State_WaitForName : public PE_StructState
- { // -> Name
- public:
- State_WaitForName(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- };
- class State_GotName : public PE_StructState
- { // -> : { ;
- public:
- State_GotName(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
- class State_WaitForBase : public PE_StructState
- { // -> Base
- public:
- State_WaitForBase(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void On_SubPE_Left();
- };
- class State_GotBase : public PE_StructState
- { // -> {
- public:
- State_GotBase(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
- class State_WaitForElement : public PE_StructState
- { // -> Typ }
- public:
- State_WaitForElement(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_NameSeparator();
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- virtual void Process_TypeModifier(
- const TokTypeModifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
-// virtual void On_SubPE_Left();
- };
- class State_WaitForFinish : public PE_StructState
- { // -> ;
- public:
- State_WaitForFinish(
- PE_Exception & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
-
- struct S_Stati
- {
- S_Stati(
- PE_Exception & io_rStruct );
- void SetState(
- ParseEnvState & i_rNextState )
- { pCurStatus = &i_rNextState; }
-
- State_None aNone;
- State_WaitForName aWaitForName;
- State_GotName aGotName;
- State_WaitForBase aWaitForBase;
- State_GotBase aGotBase;
- State_WaitForElement
- aWaitForElement;
- State_WaitForFinish aWaitForFinish;
-
- ParseEnvState * pCurStatus;
- };
-
- virtual void InitData();
- virtual void TransferData();
- virtual void ReceiveData();
-
- public:
-
- void store_Exception();
-
- private:
-
- S_Stati & Stati() { return *pStati; }
- S_Work & Work() { return aWork; }
-
- // DATA
- S_Work aWork;
- Dyn<S_Stati> pStati;
-};
-
-
-inline void
-PE_Exception::PE_StructState::MoveState(
- ParseEnvState & i_rState ) const
- { rStruct.Stati().SetState(i_rState); }
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_file2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_file2.hxx
deleted file mode 100644
index 80baf27b..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_file2.hxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_FILE2_HXX
-#define LUIDL_PE_FILE2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace idl
-{
-class Module;
-} // namespace idl
-} // namespace ary
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class TokenDistributor;
-class PE_Service;
-class PE_Singleton;
-class PE_Interface;
-class PE_Struct;
-class PE_Exception;
-class PE_Constant;
-class PE_Enum;
-class PE_Typedef;
-
-
-class PE_File : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_File(
- TokenDistributor & i_rTokenAdmin,
- const ParserInfo & i_parseInfo );
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_File();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_Default();
-
- private:
- enum E_State
- {
- e_none,
- e_std,
- wait_for_module,
- wait_for_module_bracket,
- wait_for_module_semicolon,
- in_sub_pe,
- on_default
- };
-
- virtual void InitData();
- virtual void TransferData();
- virtual void ReceiveData();
- virtual UnoIDL_PE & MyPE();
- virtual const ary::idl::Module &
- CurNamespace() const;
- virtual const ParserInfo &
- ParseInfo() const;
- // DATA
- TokenDistributor * pTokenAdmin;
- Dyn<PE_Service> pPE_Service;
- Dyn<PE_Singleton> pPE_Singleton;
- Dyn<PE_Interface> pPE_Interface;
- Dyn<PE_Struct> pPE_Struct;
- Dyn<PE_Exception> pPE_Exception;
- Dyn<PE_Constant> pPE_Constant;
- Dyn<PE_Enum> pPE_Enum;
- Dyn<PE_Typedef> pPE_Typedef;
-
- const ary::idl::Module *
- pCurNamespace;
- const ParserInfo * pParseInfo;
-
- E_State eState;
- uintt nBracketCount_inDefMode;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx
deleted file mode 100644
index 030a9494..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_FUNC2_HXX
-#define ADC_UIDL_PE_FUNC2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
-#include <ary/idl/i_param.hxx>
- // PARAMETERS
-
-namespace ary
-{
- namespace idl
- {
- class Function;
- }
-}
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class PE_Type;
-class PE_Variable;
-
-class PE_Function : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- typedef ary::idl::Ce_id RParent;
- typedef ary::idl::Ce_id RFunction;
-
- enum E_Constructor { constructor };
-
- /// Constructor for interfaces.
- PE_Function(
- const RParent & i_rCurInterface );
-
- /// Constructor for single interface based services.
- PE_Function(
- const RParent & i_rCurService,
- E_Constructor i_eCtorMarker );
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual ~PE_Function();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- virtual void Process_ParameterHandling(
- const TokParameterHandling &
- i_rToken );
- virtual void Process_Raises();
- virtual void Process_Default();
-
- private:
- enum E_State
- {
- e_none,
- e_start,
- in_return_type,
- expect_name,
- expect_params_list,
- expect_parameter,
- expect_parameter_variable,
- in_parameter_variable,
- expect_parameter_separator,
- params_finished,
- expect_exceptions_list,
- expect_exception,
- in_exception,
- expect_exception_separator,
- exceptions_finished
- };
-
- void GoIntoReturnType();
- void GoIntoParameterVariable();
- void GoIntoException();
- void OnDefault();
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- E_State eState;
-
- String sData_Name;
- ary::idl::Type_id nData_ReturnType;
- bool bData_Oneway;
- ary::idl::Function *
- pCurFunction;
-
- const RParent * pCurParent;
-
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nCurParsedType; // ReturnType or Exception
-
- String sName;
-
- Dyn<PE_Variable> pPE_Variable;
- ary::idl::E_ParameterDirection
- eCurParsedParam_Direction;
- ary::idl::Type_id nCurParsedParam_Type;
- String sCurParsedParam_Name;
- bool bIsForConstructors;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_iface.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_iface.hxx
deleted file mode 100644
index cf0b40a2..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_iface.hxx
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_IFACE_HXX
-#define ADC_UIDL_PE_IFACE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-namespace idl
-{
- class Interface;
-}
-}
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-class PE_Function;
-class PE_Attribute;
-class PE_Type;
-
-class PE_Interface : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Interface();
- virtual ~PE_Interface();
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_NameSeparator();
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- virtual void Process_TypeModifier(
- const TokTypeModifier &
- i_rToken );
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_Default();
-
- private:
- enum E_State /// @ATTENTION Do not change existing values (except of e_STATES_MAX) !!! Else array-indices will break.
- {
- e_none = 0,
- need_uik,
- uik,
- need_ident,
- ident,
- need_interface,
- need_name,
- wait_for_base,
- in_base, // in header, after ":"
- need_curlbr_open,
- e_std,
- in_function,
- in_attribute,
- need_finish,
- in_base_interface, // in body, after "interface"
- e_STATES_MAX
- };
- enum E_TokenType /// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
- {
- tt_metatype = 0,
- tt_identifier = 1,
- tt_punctuation = 2,
- tt_startoftype = 3,
- tt_stereotype = 4,
- tt_MAX
- };
- typedef void (PE_Interface::*F_TOK)(const char *);
-
-
- void On_need_uik_MetaType(const char * i_sText);
- void On_uik_Identifier(const char * i_sText);
- void On_uik_Punctuation(const char * i_sText);
- void On_need_ident_MetaType(const char * i_sText);
- void On_ident_Identifier(const char * i_sText);
- void On_ident_Punctuation(const char * i_sText);
- void On_need_interface_MetaType(const char * i_sText);
- void On_need_name_Identifer(const char * i_sText);
- void On_wait_for_base_Punctuation(const char * i_sText);
- void On_need_curlbr_open_Punctuation(const char * i_sText);
- void On_std_Metatype(const char * i_sText);
- void On_std_Punctuation(const char * i_sText);
- void On_std_Stereotype(const char * i_sText);
- void On_std_GotoFunction(const char * i_sText);
- void On_std_GotoAttribute(const char * i_sText);
- void On_std_GotoBaseInterface(const char * i_sText);
- void On_need_finish_Punctuation(const char * i_sText);
- void On_Default(const char * i_sText);
-
- void CallHandler(
- const char * i_sTokenText,
- E_TokenType i_eTokenType );
-
- virtual void InitData();
- virtual void TransferData();
- virtual void ReceiveData();
- virtual UnoIDL_PE & MyPE();
-
- void store_Interface();
-
- // DATA
- static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
-
- E_State eState;
- String sData_Name;
- bool bIsPreDeclaration;
- ary::idl::Interface *
- pCurInterface;
- ary::idl::Ce_id nCurInterface;
-
- Dyn<PE_Function> pPE_Function;
- Dyn<PE_Attribute> pPE_Attribute;
-
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nCurParsed_Base;
- bool bOptionalMember;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_modul.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_modul.hxx
deleted file mode 100644
index 88e10156..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_modul.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_MODUL_HXX
-#define LUIDL_PE_MODUL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <semantic/semnode.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-class PE_Module : public ::ParseEnvironment
-{
- public:
-
- virtual void Enter(
- E_EnvStackAction i_eWayOfEntering );
- virtual void Leave(
- E_EnvStackAction i_eWayOfLeaving );
-
- private:
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_property.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_property.hxx
deleted file mode 100644
index 7c301630..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_property.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_PROPERTY_HXX
-#define ADC_UIDL_PE_PROPERTY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
-#include <ary/idl/i_property.hxx>
- // PARAMETERS
-#include <ary/idl/i_gate.hxx>
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class PE_Variable;
-
-class PE_Property : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- typedef ary::idl::Ce_id Ce_id;
- typedef ary::idl::Type_id Type_id;
- typedef ary::idl::Property::Stereotypes Stereotypes;
-
-
- PE_Property(
- const Ce_id & i_rCurOwner );
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository &
- io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual ~PE_Property();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Default();
-
- void PresetOptional() { bIsOptional = true; }
- void PresetStereotypes(
- Stereotypes::E_Flags
- i_eFlag )
- { aStereotypes.Set_Flag(i_eFlag); }
- private:
- enum E_State
- {
- e_none,
- e_start,
- expect_variable,
- in_variable
- };
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- E_State eState;
- const Ce_id * pCurOwner;
-
- Dyn<PE_Variable> pPE_Variable;
-
- // object-data
- Type_id nCurParsedType;
- String sCurParsedName;
- bool bIsOptional;
- Stereotypes aStereotypes;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_selem.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_selem.hxx
deleted file mode 100644
index ddb060c2..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_selem.hxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_SELEM_HXX
-#define LUIDL_PE_SELEM_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/idl/i_gate.hxx>
-
-
-namespace udm {
-class Agent_Struct;
-} // namespace udm
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class PE_Type;
-class StructElement;
-class Struct;
-
-class PE_StructElement : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- typedef ary::idl::Ce_id RStructElement;
- typedef ary::idl::Ce_id RStruct;
-
- PE_StructElement( /// Use for Struct-elements
- RStructElement & o_rResult,
- const RStruct & i_rCurStruct,
- const String & i_rCurStructTemplateParam );
- PE_StructElement( /// Use for Exception-elements
- RStructElement & o_rResult,
- const RStruct & i_rCurExc );
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_StructElement();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Default();
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
-
- private:
- enum E_State
- {
- e_none,
- expect_type,
- expect_name,
- expect_finish
- };
-
- virtual void InitData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- ary::idl::Type_id lhf_FindTemplateParamType() const;
-
- // DATA
- E_State eState;
- RStructElement * pResult;
- const RStruct * pCurStruct;
- bool bIsExceptionElement;
-
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nType;
- String sName;
- const String * pCurStructTemplateParam;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_servi.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_servi.hxx
deleted file mode 100644
index c889e882..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_servi.hxx
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_SERVI_HXX
-#define ADC_UIDL_PE_SERVI_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
- namespace idl
- {
- class Service;
- class SglIfcService;
- }
-}
-
-namespace csi
-{
-namespace uidl
-{
-
-class PE_Property;
-class PE_Type;
-class PE_Function;
-
-
-class PE_Service : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Service();
- virtual ~PE_Service();
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_Needs();
- virtual void Process_Observes();
- virtual void Process_Default();
-
- private:
- void On_Default();
-
- enum E_State
- {
- e_none = 0,
- need_name,
- need_curlbr_open,
- e_std,
- in_property,
- in_ifc_type,
- in_service_type,
- expect_ifc_separator,
- expect_service_separator,
- at_ignore,
- need_finish,
- need_base_interface, /// After ":".
- need_curlbr_open_sib, /// After base interface in single interface based service.
- e_std_sib, /// Standard in single interface based service.
- e_STATES_MAX
- };
-
- virtual void InitData();
- virtual void TransferData();
- virtual void ReceiveData();
- virtual UnoIDL_PE & MyPE();
-
- void StartProperty();
-
-
- // DATA
- E_State eState;
- String sData_Name;
- bool bIsPreDeclaration;
- ary::idl::Service * pCurService;
- ary::idl::SglIfcService *
- pCurSiService;
- ary::idl::Ce_id nCurService; // Needed for PE_Attribute.
-
- Dyn<PE_Property> pPE_Property;
- ary::idl::Ce_id nCurParsed_Property;
-
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nCurParsed_Type;
-
- Dyn<PE_Function> pPE_Constructor;
-
- bool bOptionalMember;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_singl.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_singl.hxx
deleted file mode 100644
index 9c38a8ed..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_singl.hxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_SINGL_HXX
-#define LUIDL_PE_SINGL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
- namespace idl
- {
- class Singleton;
- class SglIfcSingleton;
- }
-}
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class PE_Type;
-
-
-class PE_Singleton : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Singleton();
- virtual ~PE_Singleton();
-
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Default();
-
- private:
- enum E_State
- {
- e_none = 0,
- need_name,
- need_curlbr_open,
- e_std,
- in_service,
- need_finish,
- in_base_interface,
- e_STATES_MAX
- };
-
- void On_Default();
-
- virtual void InitData();
- virtual void TransferData();
- virtual void ReceiveData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
-// static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
-
- E_State eState;
- String sData_Name;
- bool bIsPreDeclaration;
- ary::idl::Singleton *
- pCurSingleton;
- ary::idl::SglIfcSingleton *
- pCurSiSingleton;
-
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nCurParsed_Type;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_struc.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_struc.hxx
deleted file mode 100644
index 6b7a5e16..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_struc.hxx
+++ /dev/null
@@ -1,287 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_STRUC_HXX
-#define LUIDL_PE_STRUC_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
-#include <s2_luidl/semnode.hxx>
-#include <ary/qualiname.hxx>
- // PARAMETERS
-
-
-
-namespace csi
-{
-namespace prl
-{
- class TNamespace;
-}
-}
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class Struct;
-class StructElement;
-class PE_StructElement;
-class PE_Type;
-
-
-class PE_Struct : public UnoIDL_PE
-{
- public:
- PE_Struct();
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_Struct();
- virtual void ProcessToken(
- const Token & i_rToken );
-
- private:
- struct S_Work
- {
- S_Work();
-
- void InitData();
- void Prepare_PE_QualifiedName();
- void Prepare_PE_Element();
- void Data_Set_Name(
- const char * i_sName );
- void Data_Set_TemplateParam(
- const char * i_sTemplateParam );
-
- String sData_Name;
- String sData_TemplateParam;
- bool bIsPreDeclaration;
- ary::idl::Ce_id nCurStruct;
-
- Dyn<PE_StructElement>
- pPE_Element;
- ary::idl::Ce_id nCurParsed_ElementRef;
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nCurParsed_Base;
- };
-
- struct S_Stati;
- class PE_StructState;
- friend struct S_Stati;
- friend class PE_StructState;
-
-
- class PE_StructState : public ParseEnvState
- {
- public:
-
- protected:
- PE_StructState(
- PE_Struct & i_rStruct )
- : rStruct(i_rStruct) {}
- void MoveState(
- ParseEnvState & i_rState ) const;
- void SetResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- UnoIDL_PE * i_pParseEnv2Push = 0 ) const
- { rStruct.SetResult(i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push); }
-
- S_Stati & Stati() const { return *rStruct.pStati; }
- S_Work & Work() const { return rStruct.aWork; }
- PE_Struct & PE() const { return rStruct; }
-
- private:
- virtual UnoIDL_PE & MyPE();
- // DATA
- PE_Struct & rStruct;
- };
-
- class State_None : public PE_StructState
- {
- public:
- State_None(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- };
- class State_WaitForName : public PE_StructState
- { // -> Name
- public:
- State_WaitForName(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- };
- class State_GotName : public PE_StructState
- { // -> : { ; <
- public:
- State_GotName(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
- class State_WaitForTemplateParam : public PE_StructState
- { // -> Template parameter identifier
- public:
- State_WaitForTemplateParam(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- };
- class State_WaitForTemplateEnd : public PE_StructState
- { // -> >
- public:
- State_WaitForTemplateEnd(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
- class State_WaitForBase : public PE_StructState
- { // -> Base
- public:
- State_WaitForBase(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void On_SubPE_Left();
- };
- class State_GotBase : public PE_StructState
- { // -> {
- public:
- State_GotBase(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
- class State_WaitForElement : public PE_StructState
- { // -> Typ }
- public:
- State_WaitForElement(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_NameSeparator();
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- virtual void Process_TypeModifier(
- const TokTypeModifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
- class State_WaitForFinish : public PE_StructState
- { // -> ;
- public:
- State_WaitForFinish(
- PE_Struct & i_rStruct )
- : PE_StructState(i_rStruct) {}
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- };
-
- struct S_Stati
- {
- S_Stati(
- PE_Struct & io_rStruct );
- void SetState(
- ParseEnvState & i_rNextState )
- { pCurStatus = &i_rNextState; }
-
- State_None aNone;
- State_WaitForName aWaitForName;
- State_GotName aGotName;
- State_WaitForTemplateParam
- aWaitForTemplateParam;
- State_WaitForTemplateEnd
- aWaitForTemplateEnd;
- State_WaitForBase aWaitForBase;
- State_GotBase aGotBase;
- State_WaitForElement
- aWaitForElement;
- State_WaitForFinish aWaitForFinish;
-
- ParseEnvState * pCurStatus;
- };
-
- virtual void InitData();
- virtual void TransferData();
- virtual void ReceiveData();
-
- public:
-
- void store_Struct();
-
- private:
-
- S_Stati & Stati() { return *pStati; }
- S_Work & Work() { return aWork; }
-
- // DATA
- S_Work aWork;
- Dyn<S_Stati> pStati;
-};
-
-
-inline void
-PE_Struct::PE_StructState::MoveState(
- ParseEnvState & i_rState ) const
- { rStruct.Stati().SetState(i_rState); }
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_tydf2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_tydf2.hxx
deleted file mode 100644
index 26171523..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_tydf2.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_PE_TYDF2_HXX
-#define LUIDL_PE_TYDF2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-
-
-namespace csi
-{
-namespace uidl
-{
-
-class PE_Type;
-
-
-class PE_Typedef : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Typedef();
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~PE_Typedef();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_Default();
-
- private:
- enum E_State
- {
- e_none = 0,
- expect_description,
- expect_name,
- got_name,
- e_STATES_MAX
- };
- enum E_TokenType /// @ATTENTION Do not change existing values (except of tt_MAX) !!! Else array-indices will break.
- {
- tt_any = 0,
- tt_identifier,
- tt_punctuation,
- tt_MAX
- };
- typedef void (PE_Typedef::*F_TOK)(const char *);
-
-
- void CallHandler(
- const char * i_sTokenText,
- E_TokenType i_eTokenType );
-
- void On_expect_description_Any(const char * i_sText);
- void On_expect_name_Identifier(const char * i_sText);
- void On_got_name_Punctuation(const char * i_sText);
- void On_Default(const char * );
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- static F_TOK aDispatcher[e_STATES_MAX][tt_MAX];
-
- E_State eState;
- Dyn<PE_Type> pPE_Type;
- ary::idl::Type_id nType;
- String sName;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_type2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_type2.hxx
deleted file mode 100644
index 020c846f..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_type2.hxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PE_TYPE2_HXX
-#define ADC_PE_TYPE2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include<s2_luidl/parsenv2.hxx>
-#include<s2_luidl/pestate.hxx>
- // COMPONENTS
-#include<ary/qualiname.hxx>
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class PE_Type : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Type(
- ary::idl::Type_id & o_rResult );
- virtual ~PE_Type();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_NameSeparator();
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- virtual void Process_TypeModifier(
- const TokTypeModifier &
- i_rToken );
- virtual void Process_Default();
-
- private:
- enum E_State
- {
- e_none = 0,
- expect_type,
- expect_quname_part,
- expect_quname_separator,
- in_template_type
- };
-
- void Finish();
- PE_Type & MyTemplateType();
-
- virtual void InitData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- ary::idl::Type_id * pResult;
-
- uintt nIsSequenceCounter;
- uintt nSequenceDownCounter;
- bool bIsUnsigned;
- ary::QualifiedName sFullType;
-
- E_State eState;
- String sLastPart;
-
- Dyn<PE_Type> pPE_TemplateType; /// @attention Recursion, only initiate, if needed!
- ary::idl::Type_id nTemplateType;
- std::vector<ary::idl::Type_id>
- aTemplateParameters;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_vari2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_vari2.hxx
deleted file mode 100644
index 58a7bc22..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_vari2.hxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_PE_VARI2_HXX
-#define ADC_UIDL_PE_VARI2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/parsenv2.hxx>
-#include <s2_luidl/pestate.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class PE_Type;
-
-
-class PE_Variable : public UnoIDL_PE,
- public ParseEnvState
-{
- public:
- PE_Variable(
- ary::idl::Type_id & i_rResult_Type,
- String & i_rResult_Name );
- virtual void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::Repository &
- io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- virtual ~PE_Variable();
-
- virtual void ProcessToken(
- const Token & i_rToken );
-
- virtual void Process_Default();
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- private:
- enum E_State
- {
- e_none,
- expect_type,
- expect_name,
- expect_finish
- };
-
- virtual void InitData();
- virtual void ReceiveData();
- virtual void TransferData();
- virtual UnoIDL_PE & MyPE();
-
- // DATA
- E_State eState;
- ary::idl::Type_id * pResult_Type;
- String * pResult_Name;
-
- Dyn<PE_Type> pPE_Type;
-};
-
-
-
-} // namespace uidl
-} // namespace csi
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pestate.hxx b/autodoc/source/parser_i/inc/s2_luidl/pestate.hxx
deleted file mode 100644
index 26d03df6..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/pestate.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PESTATE_HXX
-#define ADC_PESTATE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include<s2_luidl/tokintpr.hxx>
-#include<s2_luidl/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokIdentifier;
-class TokBuiltInType;
-class TokPunctuation;
-class Tok_Documentation;
-
-class ParseEnvState : public TokenInterpreter,
- virtual protected TokenProcessing_Types
-{
- public:
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken );
- virtual void Process_NameSeparator();
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken );
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken );
- virtual void Process_TypeModifier(
- const TokTypeModifier &
- i_rToken );
- virtual void Process_MetaType(
- const TokMetaType & i_rToken );
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken );
- virtual void Process_ParameterHandling(
- const TokParameterHandling &
- i_rToken );
- virtual void Process_Raises();
- virtual void Process_Needs();
- virtual void Process_Observes();
- virtual void Process_Assignment(
- const TokAssignment &
- i_rToken );
- virtual void Process_EOL();
-
- virtual void On_SubPE_Left();
-
- virtual void Process_Default();
-
- protected:
- ParseEnvState() : bDefaultIsError(true) {}
- void SetDefault2Ignore() { bDefaultIsError = false; }
-
- private:
- virtual UnoIDL_PE & MyPE() = 0;
- bool bDefaultIsError;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/semnode.hxx b/autodoc/source/parser_i/inc/s2_luidl/semnode.hxx
deleted file mode 100644
index 4d386770..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/semnode.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_SEMNODE_HXX
-#define ADC_SEMNODE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/qualiname.hxx>
-
-
-namespace ary
-{
- class QualifiedName;
- class Repository;
-
-namespace idl
-{
- class Gate;
- class Module;
-} // namespace idl
-} // namespace ary
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class Struct;
-class Token;
-
-
-/** is an implementation class for UnoIDL_PE s
-*/
-class SemanticNode : private TokenProcessing_Types
-{
- public:
- SemanticNode();
- void EstablishContacts(
- UnoIDL_PE * io_pParentPE,
- ary::idl::Gate & io_rRepository,
- TokenProcessing_Result &
- o_rResult );
- ~SemanticNode();
-
- void SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- UnoIDL_PE * i_pParseEnv2Push = 0 );
- UnoIDL_PE * Parent() const { return pParentPE; }
- ary::idl::Gate & AryGate() const { return *pAryGate; }
- TokenProcessing_Result &
- TokenResult() const { return *pTokenResult; }
-
- private:
- // DATA
- UnoIDL_PE * pParentPE;
- ary::idl::Gate * pAryGate;
- TokenProcessing_Result *
- pTokenResult;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/smp_uidl.hxx b/autodoc/source/parser_i/inc/s2_luidl/smp_uidl.hxx
deleted file mode 100644
index ebdd7326..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/smp_uidl.hxx
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_SMP_HXX
-#define ADC_SMP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/tok_recv.hxx>
-#include <s2_dsapi/tok_recv.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-/** is an implementation class for ParseEnvironment
-*/
-class SemanticParser : public csi::uidl::Token_Receiver,
- public csi::dsapi::Token_Receiver
-{
- public:
- typedef std::deque< DYN TextToken * > TokenQueue;
-
- ~SemanticParser();
-
-
- void Receive(
- DYN csi::uidl::Token &
- let_drToken );
- void Receive(
- DYN csi::dsapi::Token &
- let_drToken );
-
- private:
- // DATA
- TokenQueue aTokenQueue;
-
-
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tk_const.hxx b/autodoc/source/parser_i/inc/s2_luidl/tk_const.hxx
deleted file mode 100644
index 36e03a1e..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tk_const.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_TK_CONST_HXX
-#define ADC_UIDL_TK_CONST_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/uidl_tok.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokAssignment : public Token
-{
- public:
- TokAssignment(
- const char * i_sText )
- : sText(i_sText) {}
-
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
- private:
- // DATA
- String sText;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tk_ident.hxx b/autodoc/source/parser_i/inc/s2_luidl/tk_ident.hxx
deleted file mode 100644
index c7345c24..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tk_ident.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_TK_IDENT_HXX
-#define ADC_UIDL_TK_IDENT_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/uidl_tok.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokIdentifier : public Token
-{
- public:
- TokIdentifier(
- const char * i_sText )
- : sText(i_sText) {}
-
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
- private:
- // DATA
- String sText;
-};
-
-class TokNameSeparator : public Token
-{
- public:
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tk_keyw.hxx b/autodoc/source/parser_i/inc/s2_luidl/tk_keyw.hxx
deleted file mode 100644
index a250a5dd..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tk_keyw.hxx
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_TK_KEYW_HXX
-#define ADC_UIDL_TK_KEYW_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/uidl_tok.hxx>
- // COMPONENTS
-#include <luxenum.hxx>
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokKeyword : public Token
-{
-};
-
-
-class TokBuiltInType : public TokKeyword
-{
- public:
- enum E_TokenId
- {
- e_none = 0,
- bty_any = 1,
- bty_boolean = 2,
- bty_byte = 3,
- bty_char = 4,
- bty_double = 5,
- bty_hyper = 6,
- bty_long = 7,
- bty_short = 8,
- bty_string = 9,
- bty_void = 10,
- bty_ellipse = 11
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- TokBuiltInType(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
-
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-
-class TokTypeModifier : public TokKeyword
-{
- public:
- enum E_TokenId
- {
- e_none = 0,
- tmod_unsigned = 1,
- tmod_sequence
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- TokTypeModifier(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class TokMetaType : public TokKeyword
-{
- public:
- enum E_TokenId
- {
- e_none = 0,
- mt_attribute = 1,
- mt_constants,
- mt_enum,
- mt_exception,
- mt_ident,
- mt_interface,
- mt_module,
- mt_property,
- mt_service,
- mt_singleton,
- mt_struct,
- mt_typedef,
- mt_uik
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- TokMetaType(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
-
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
- E_TokenId Id() const { return eTag; }
-
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class TokStereotype : public TokKeyword
-{
- public:
- // TYPES
- enum E_TokenId
- {
- e_none = 0,
- ste_bound = 1,
- ste_const,
- ste_constrained,
- ste_maybeambiguous,
- ste_maybedefault,
- ste_maybevoid,
- ste_oneway,
- ste_optional,
- ste_readonly,
- ste_removable,
- ste_virtual,
- ste_transient,
- ste_published
- };
-
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- TokStereotype(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char *
- Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class TokParameterHandling : public TokKeyword
-{
- public:
- // TYPES
- enum E_TokenId
- {
- e_none = 0,
- ph_in,
- ph_out,
- ph_inout
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
- TokParameterHandling(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char *
- Text() const;
- E_TokenId Id() const { return eTag; }
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class TokRaises : public TokKeyword
-{
- public:
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
-};
-
-class TokNeeds : public TokKeyword
-{
- public:
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
-};
-
-class TokObserves : public TokKeyword
-{
- public:
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual const char *
- Text() const;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tk_punct.hxx b/autodoc/source/parser_i/inc/s2_luidl/tk_punct.hxx
deleted file mode 100644
index 9bb2d48b..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tk_punct.hxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_TK_PUNCT_HXX
-#define ADC_UIDL_TK_PUNCT_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <s2_luidl/uidl_tok.hxx>
- // COMPONENTS
-#include <luxenum.hxx>
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokPunctuation : public Token
-{
- public:
- // TYPES
- enum E_TokenId
- {
- e_none = 0,
- BracketOpen = 1, // (
- BracketClose = 2, // )
- ArrayBracketOpen = 3, // [
- ArrayBracketClose = 4, // ]
- CurledBracketOpen = 5, // {
- CurledBracketClose = 6, // }
- Semicolon = 7, // ;
- Colon = 8, // :
- DoubleColon = 9, // ::
- Comma = 10, // ,
- Minus = 11, // -
- Fullstop = 12, // .
- Lesser = 13, // <
- Greater = 14 // >
- };
- typedef lux::Enum<E_TokenId> EV_TokenId;
-
-
- TokPunctuation(
- EV_TokenId i_eTag )
- : eTag(i_eTag) {}
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char *
- Text() const;
- EV_TokenId Id() const { return eTag; }
-
-
- private:
- // DATA
- EV_TokenId eTag;
-};
-
-class Tok_EOL : public Token
-{
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char *
- Text() const;
-};
-
-class Tok_EOF : public Token
-{
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- // INQUIRY
- virtual const char *
- Text() const;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tkp_uidl.hxx b/autodoc/source/parser_i/inc/s2_luidl/tkp_uidl.hxx
deleted file mode 100644
index 50d2b4f5..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tkp_uidl.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKP_UIDL_HXX
-#define ADC_TKP_UIDL_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkp2.hxx>
- // COMPONENTS
- // PARAMETRS
-
-class TkpDocuContext;
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-
-class Token_Receiver;
-class Context_UidlCode;
-
-
-/** This is a TokenParser which is able to parse tokens from
- C++ source code.
-*/
-class TokenParser_Uidl : public TokenParse2
-{
- public:
- // LIFECYCLE
- TokenParser_Uidl(
- Token_Receiver & o_rUidlReceiver,
- DYN TkpDocuContext &
- let_drDocuContext );
- virtual ~TokenParser_Uidl();
-
- // OPERATIONS
- private:
- virtual ::TkpContext &
- CurrentContext();
-
- virtual void SetStartContext();
- virtual void SetCurrentContext(
- TkpContext & io_rContext );
- // DATA
- Dyn<Context_UidlCode>
- pBaseContext;
- ::TkpContext * pCurContext;
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tokintpr.hxx b/autodoc/source/parser_i/inc/s2_luidl/tokintpr.hxx
deleted file mode 100644
index 340ee0b7..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tokintpr.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_LUIDL_TOKINTPR_HXX
-#define ADC_LUIDL_TOKINTPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokIdentifier;
-class TokPunctuation;
-class TokBuiltInType;
-class TokTypeModifier;
-class TokMetaType;
-class TokStereotype;
-class TokParameterHandling;
-class TokAssignment;
-class Tok_Documentation;
-
-
-class TokenInterpreter
-{
- public:
- virtual ~TokenInterpreter() {}
-
- virtual void Process_Identifier(
- const TokIdentifier &
- i_rToken ) = 0;
- virtual void Process_NameSeparator() = 0; // ::
- virtual void Process_Punctuation(
- const TokPunctuation &
- i_rToken ) = 0;
- virtual void Process_BuiltInType(
- const TokBuiltInType &
- i_rToken ) = 0;
- virtual void Process_TypeModifier(
- const TokTypeModifier &
- i_rToken ) = 0;
- virtual void Process_MetaType(
- const TokMetaType & i_rToken ) = 0;
- virtual void Process_Stereotype(
- const TokStereotype &
- i_rToken ) = 0;
- virtual void Process_ParameterHandling(
- const TokParameterHandling &
- i_rToken ) = 0;
- virtual void Process_Raises() = 0;
- virtual void Process_Needs() = 0;
- virtual void Process_Observes() = 0;
- virtual void Process_Assignment(
- const TokAssignment &
- i_rToken ) = 0;
- virtual void Process_EOL() = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx b/autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx
deleted file mode 100644
index f4567c7e..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TOKPROCT_HXX
-#define ADC_TOKPROCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class UnoIDL_PE;
-
-
-/** is a parent class for classes, which take part in parsing tokens semantically.
- It provides some types for them.
-*/
-class TokenProcessing_Types
-{
- public:
- enum E_TokenDone
- {
- not_done = 0,
- done = 1
- };
-
- enum E_EnvStackAction
- {
- stay, // same parse environment
- push_sure, // push sub environment, which must be the correct one
- push_try, // push sub environment, which is tried, if it may be the right one
- pop_success, // return to parent environment, parsing was successful
- pop_failure // return to parent environment, but an error occurred.
- };
-
- struct TokenProcessing_Result
- {
- E_TokenDone eDone;
- E_EnvStackAction eStackAction;
- UnoIDL_PE * pEnv2Push;
-
- TokenProcessing_Result()
- : eDone(not_done), eStackAction(stay), pEnv2Push(0) {}
- void reset() { eDone = not_done; eStackAction = stay; pEnv2Push = 0; }
- };
-
- enum E_ParseResult
- {
- res_error,
- res_complete,
- res_predeclaration
- };
-};
-
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/tokrecv.hxx b/autodoc/source/parser_i/inc/s2_luidl/tokrecv.hxx
deleted file mode 100644
index 033ff8da..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/tokrecv.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 LUIDL_TOKRECV_HXX
-#define LUIDL_TOKRECV_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class Token;
-
-/**
-@descr
-*/
-class Token_Receiver
-{
- public:
- virtual ~Token_Receiver() {}
- virtual void Receive(
- DYN Token & let_drToken ) = 0;
- virtual void Increment_CurLine() = 0;
-};
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/s2_luidl/uidl_tok.hxx b/autodoc/source/parser_i/inc/s2_luidl/uidl_tok.hxx
deleted file mode 100644
index 82f2b4b9..00000000
--- a/autodoc/source/parser_i/inc/s2_luidl/uidl_tok.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_UIDL_TOK_HXX
-#define ADC_UIDL_TOK_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/token2.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class ParserInfo;
-
-namespace csi
-{
-namespace uidl
-{
-
-
-class TokenInterpreter;
-
-class Token : public TextToken
-{
- public:
- // LIFECYCLE
- virtual ~Token() {}
-
- // OPERATIONS
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const = 0;
-};
-
-} // namespace uidl
-} // namespace csi
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/semantic/parsenv2.hxx b/autodoc/source/parser_i/inc/semantic/parsenv2.hxx
deleted file mode 100644
index 16b4af22..00000000
--- a/autodoc/source/parser_i/inc/semantic/parsenv2.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_PARSEENV2_HXX
-#define ADC_PARSEENV2_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <queue>
-
-
-
-class ParseEnvironment
-{
- public:
- virtual ~ParseEnvironment();
-
- virtual void Enter() = 0;
-};
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/stmstar2.hxx b/autodoc/source/parser_i/inc/tokens/stmstar2.hxx
deleted file mode 100644
index e16e4fbd..00000000
--- a/autodoc/source/parser_i/inc/tokens/stmstar2.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_STMSTAR2_HXX
-#define ADC_STMSTAR2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/stmstat2.hxx>
- // COMPONENTS
- // PARAMETERS
- // SERVICES
-
-
-class StmArrayStatu2 : public StmStatu2
-{
- public:
- // LIFECYCLE
- StmArrayStatu2(
- intt i_nStatusSize,
- const INT16 * in_aArrayModel,
- uintt i_nTokenId,
- bool in_bIsDefault );
- ~StmArrayStatu2();
-
- // INQUIRY
- StmStatu2::Branch NextBy(
- intt in_nFollowersIndex) const;
- UINT16 TokenId() const { return nTokenId; }
- virtual bool IsADefault() const;
-
- // ACCESS
- virtual StmArrayStatu2 *
- AsArray();
- bool SetBranch(
- intt in_nBranchIx,
- StmStatu2::Branch
- in_nBranch );
- void SetTokenId(
- UINT16 in_nTokenId );
- private:
- StmStatu2::Branch * dpBranches;
- intt nNrOfBranches;
- UINT16 nTokenId;
- bool bIsADefault;
-};
-
-
-// IMPLEMENTATION
-
-inline void
-StmArrayStatu2::SetTokenId( UINT16 in_nTokenId )
- { nTokenId = in_nTokenId; }
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/stmstat2.hxx b/autodoc/source/parser_i/inc/tokens/stmstat2.hxx
deleted file mode 100644
index 4602da49..00000000
--- a/autodoc/source/parser_i/inc/tokens/stmstat2.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_STMSTAT2_HXX
-#define ADC_STMSTAT2_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-class StmArrayStatu2;
-class StmBoundsStatu2;
-
-/** A StmStatu2 is a state within a StateMachin2.
- There are two kinds of it. Either its an array of pointers to
- other states within the state machine - an ArrayStatus.
-
- Or it is a BoundsStatus, which shows, the token cannot be
- followed further within the StateMachin2.
-**/
-class StmStatu2 // := "State machine status"
-{
- public:
- typedef intt Branch; /// Values >= 0 give a next #Status' ID.
- /// Values <= 0 tell, that a token is finished.
- /// a value < 0 returns the status back to an upper level state machine.
- // LIFECYCLE
- virtual ~StmStatu2() {}
-
- // OPERATIONS
- virtual StmArrayStatu2 *
- AsArray();
- virtual StmBoundsStatu2 *
- AsBounds();
-
- // INQUIRY
- virtual bool IsADefault() const = 0;
-};
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/stmstfi2.hxx b/autodoc/source/parser_i/inc/tokens/stmstfi2.hxx
deleted file mode 100644
index b7b38d60..00000000
--- a/autodoc/source/parser_i/inc/tokens/stmstfi2.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_STMSTFI2_HXX
-#define ADC_STMSTFI2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/stmstat2.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class TkpContext;
-class StateMachineContext;
-
-/**
-**/
-class StmBoundsStatu2 : public StmStatu2
-{
- public:
- // LIFECYCLE
- StmBoundsStatu2(
- StateMachineContext &
- o_rOwner,
- TkpContext & i_rFollowUpContext,
- uintt i_nStatusFunctionNr,
- bool i_bIsDefault );
- // INQUIRY
- TkpContext * FollowUpContext();
- uintt StatusFunctionNr() const;
- virtual bool IsADefault() const;
-
- // ACCESS
- virtual StmBoundsStatu2 *
- AsBounds();
-
- private:
- StateMachineContext *
- pOwner;
- TkpContext * pFollowUpContext;
- uintt nStatusFunctionNr;
- bool bIsDefault;
-};
-
-inline TkpContext *
-StmBoundsStatu2::FollowUpContext()
- { return pFollowUpContext; }
-inline uintt
-StmBoundsStatu2::StatusFunctionNr() const
- { return nStatusFunctionNr; }
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/tkp2.hxx b/autodoc/source/parser_i/inc/tokens/tkp2.hxx
deleted file mode 100644
index ae65eef7..00000000
--- a/autodoc/source/parser_i/inc/tokens/tkp2.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKP2_HXX
-#define ADC_TKP2_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-class CharacterSource;
-class TkpContext;
- // PARAMETRS
-
-
-
-/** This is the interface for parser classes, which get a sequence of Token s from
- a text.
-
- Start() starts to parse the text from the given i_rSource.
- GetNextToken() returns a Token on the heap as long as there are
- still characters in the text left. The last time GetNextToken()
- returns NULL.
-
- The algorithms for parsing tokens from the text are an issue of
- the derived classes.
-*/
-class TokenParse2
-{
- public:
- // LIFECYCLE
- TokenParse2();
- virtual ~TokenParse2() {}
-
- // OPERATIONS
- virtual void Start(
- CharacterSource &
- i_rSource );
-
- /** @short Gets the next identifiable token out of the
- source code.
- @return true, if there was passed a valid token.
- false, if the parsed stream is finished or
- an error occurred.
- */
- bool GetNextToken();
-
- private:
- virtual void SetStartContext() = 0;
- virtual void SetCurrentContext(
- TkpContext & io_rContext ) = 0;
- virtual TkpContext &
- CurrentContext() = 0;
- // DATA
- CharacterSource * pChars;
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/tkpcont2.hxx b/autodoc/source/parser_i/inc/tokens/tkpcont2.hxx
deleted file mode 100644
index 2246385b..00000000
--- a/autodoc/source/parser_i/inc/tokens/tkpcont2.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKPCONT2_HXX
-#define ADC_TKPCONT2_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-class CharacterSource;
-class TkpNullContext;
-class TkpNullContex2;
-
-/** @task
- Specifies a context within which tokens are interpreted in a special
- way. For example in parsing C++ there could be a context for code,
- one for comments and a third one for preprocessor statements, because
- each of these would give the same token different meanings.
-**/
-class TkpContext
-{
- public:
- // LIFECYCLE
- virtual ~TkpContext() {}
-
- // OPERATIONS
- /** @descr
- The functions starts to parse with the CurToken() of io_rText.
- It leaves io_rText at the first char of the following Token or
- the following Context.
-
- This function returns, when a context has parsed some characterss
- and completed a token OR left the context.
- If the token is to be ignored, PassNewToken() returns false
- and cuts the token from io_rText.
- If the token is to be parsed further in a different context,
- PassNewToken() returns false, but the token is
- NOT cut from io_rText.
-
- If the function has found a valid and complete token, PassNewToken()
- passes the parsed token to the internally known receiver and
- returns true. The token is cut from io_rText.
- **/
- virtual void ReadCharChain(
- CharacterSource & io_rText ) = 0;
- /** Has to pass the parsed token to a known receiver.
- @return true, if a token was passed.
- false, if no token was parsed complete by this context.
- */
- virtual bool PassNewToken() = 0;
- virtual TkpContext &
- FollowUpContext() = 0;
-
- static TkpNullContext &
- Null_();
-};
-
-TkpNullContex2 & TkpContext_Null2_();
-
-class StateMachineContext
-{
- public:
- virtual ~StateMachineContext() {}
-
- /// Is used by StmBoundsStatu2 only.
- virtual void PerformStatusFunction(
- uintt i_nStatusSignal,
- UINT16 i_nTokenId,
- CharacterSource & io_rText ) = 0;
-};
-
-class TkpNullContex2 : public TkpContext
-{
- public:
- ~TkpNullContex2();
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
-};
-
-class TkpDocuContext : public TkpContext
-{
- public:
- virtual void SetParentContext(
- TkpContext & io_rParentContext,
- const char * i_sMultiLineEndToken ) = 0;
- virtual void SetMode_IsMultiLine(
- bool i_bTrue ) = 0;
-};
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/tkpstam2.hxx b/autodoc/source/parser_i/inc/tokens/tkpstam2.hxx
deleted file mode 100644
index 635f696b..00000000
--- a/autodoc/source/parser_i/inc/tokens/tkpstam2.hxx
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TKPSTAM2_HXX
-#define ADC_TKPSTAM2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcont2.hxx>
- // COMPONENTS
-#include <tokens/stmstar2.hxx>
-#include <tokens/stmstfi2.hxx>
-
-/** @descr
- This state-machine models state transitions from one state to another
- per indices of branches. If the indices represent ascii-char-values,
- the state-machine can be used for recognising tokens of text.
-
- The state-machine can be a status itself.
-
- StateMachin2 needs the array-size of all stati as a guess, how many stati
- the state machine will contain, when at work.
-
-
-**/
-class StateMachin2
-{
- public:
- // Types
- typedef StmStatu2::Branch Branch;
- typedef StmStatu2 * * StatusList;
-
- //# Interface self
- // LIFECYCLE
- StateMachin2(
- intt in_nStatusSize,
- intt in_nInitial_StatusListSize ); /// The user of the constructor should guess
- /// the approximate number of stati here to
- /// avoid multiple reallocations.
- /// @#AddStatus
- intt AddStatus( /// @return the new #Status' ID
- DYN StmStatu2 * let_dpStatus);
- /// @#AddToken
- void AddToken(
- const char * in_sToken,
- UINT16 in_nTokenId,
- const INT16 * in_aBranches,
- INT16 in_nBoundsStatus );
- ~StateMachin2();
-
- // OPERATIONS
- StmBoundsStatu2 &
- GetCharChain(
- UINT16 & o_nTokenId,
- CharacterSource & io_rText );
- private:
- // SERVICE FUNCTIONS
- StmStatu2 & Status(
- intt in_nStatusNr) const;
- StmArrayStatu2 &
- CurrentStatus() const;
- StmBoundsStatu2 *
- BoundsStatus() const;
-
- /// Sets the PeekedStatus.
- void Peek(
- intt in_nBranch);
-
- void ResizeStati(); // Adds space for 32 stati.
-
- // DATA
- StatusList pStati; /// List of Status, implemented as simple C-array of length #nStatiSpace
- /// with nStatiLength valid members (beginning from zero).
- intt nCurrentStatus;
- intt nPeekedStatus;
-
- intt nStatusSize; /// Size of the branch array of a single status.
-
- intt nNrofStati; /// Nr of Stati so far.
- intt nStatiSpace; /// Size of allocated array for #pStati (size in items).
-};
-
-
-
-/** @#AddToken
- @descr
- Adds a token, which will be recogniszeds by the
- statemachine.
-
-
-**/
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/tokens/token2.hxx b/autodoc/source/parser_i/inc/tokens/token2.hxx
deleted file mode 100644
index 1e6750c4..00000000
--- a/autodoc/source/parser_i/inc/tokens/token2.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_TOKEN2_HXX
-#define ADC_TOKEN2_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETRS
-
-
-
-/** This is the interface for parser classes, which get a sequence of Token s from
- a text.
-
- Start() starts to parse the text from the given i_rSource.
- GetNextToken() returns a Token on the heap as long as there are
- still characters in the text left. The last time GetNextToken()
- returns NULL.
-
- The algorithms for parsing tokens from the text are an issue of
- the derived classes.
-*/
-class TextToken
-{
- public:
- // LIFECYCLE
- virtual ~TextToken() {}
-
-
- // INQUIRY
- virtual const char* Text() const = 0;
-};
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/inc/x_parse2.hxx b/autodoc/source/parser_i/inc/x_parse2.hxx
deleted file mode 100644
index bbc69bb9..00000000
--- a/autodoc/source/parser_i/inc/x_parse2.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 ADC_X_PARSE2_HXX
-#define ADC_X_PARSE2_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/x.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class X_AutodocParser : public csv::Exception
-{
- public:
- // TYPES
- enum E_Type
- {
- x_Any = 0,
- x_InvalidChar,
- x_UnexpectedToken,
- x_UnexpectedEOF
- };
- // LIFECYCLE
- X_AutodocParser(
- E_Type i_eType,
- const char * i_sName = "" )
- : eType(i_eType), sName(i_sName) {}
- // INQUIRY
- virtual void GetInfo(
- std::ostream & o_rOutputMedium ) const;
-
- private:
- E_Type eType;
- String sName;
-
-};
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/makefile.mk b/autodoc/source/parser_i/tokens/makefile.mk
deleted file mode 100644
index 9674e668..00000000
--- a/autodoc/source/parser_i/tokens/makefile.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=garden
-TARGET=parser2_tokens
-TARGETTYPE=CUI
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/stmstar2.obj \
- $(OBJ)$/stmstat2.obj \
- $(OBJ)$/stmstfi2.obj \
- $(OBJ)$/tkpstam2.obj \
- $(OBJ)$/tkp2.obj \
- $(OBJ)$/tkpcont2.obj \
- $(OBJ)$/x_parse2.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser_i/tokens/stmstar2.cxx b/autodoc/source/parser_i/tokens/stmstar2.cxx
deleted file mode 100644
index f8894451..00000000
--- a/autodoc/source/parser_i/tokens/stmstar2.cxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/stmstar2.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <x_parse2.hxx>
-
-
-
-StmArrayStatu2::StmArrayStatu2( intt i_nStatusSize,
- const INT16 * in_aArrayModel,
- uintt i_nTokenId,
- bool in_bIsDefault )
- : dpBranches(new StmStatu2::Branch[i_nStatusSize]),
- nNrOfBranches(i_nStatusSize),
- nTokenId(UINT16(i_nTokenId)),
- bIsADefault(in_bIsDefault)
-{
- // KORR_FUTURE: Interface of StmArrayStatu2() has to be changed.
- csv_assert(i_nTokenId < 64536);
-
- if (in_aArrayModel != 0)
- {
- intt count = 0;
- for (const INT16 * get = in_aArrayModel; count < nNrOfBranches; count++, get++)
- dpBranches[count] = *get;
- }
- else //
- {
- memset(dpBranches, 0, nNrOfBranches);
- } // endif
-}
-
-StmArrayStatu2::~StmArrayStatu2()
-{
- delete [] dpBranches;
-}
-
-bool
-StmArrayStatu2::SetBranch( intt in_nBranchIx,
- StmStatu2::Branch in_nBranch )
-{
- if ( csv::in_range(intt(0), in_nBranchIx, intt(nNrOfBranches) ) )
- {
- dpBranches[in_nBranchIx] = in_nBranch;
- return true;
- }
- return false;
-}
-
-
-StmStatu2::Branch
-StmArrayStatu2::NextBy(intt in_nIndex) const
-{
- if (in_nIndex < 0)
- throw X_AutodocParser(X_AutodocParser::x_InvalidChar);
-
- return in_nIndex < nNrOfBranches
- ? dpBranches[in_nIndex]
- : dpBranches[nNrOfBranches - 1];
-}
-
-
-bool
-StmArrayStatu2::IsADefault() const
-{
- return bIsADefault;
-}
-
-StmArrayStatu2 *
-StmArrayStatu2::AsArray()
-{
- return this;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/stmstat2.cxx b/autodoc/source/parser_i/tokens/stmstat2.cxx
deleted file mode 100644
index 701bfa33..00000000
--- a/autodoc/source/parser_i/tokens/stmstat2.cxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/stmstat2.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-
-StmArrayStatu2 *
-StmStatu2::AsArray()
-{
- return 0;
-}
-
-StmBoundsStatu2 *
-StmStatu2::AsBounds()
-{
- return 0;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/stmstfi2.cxx b/autodoc/source/parser_i/tokens/stmstfi2.cxx
deleted file mode 100644
index 52801190..00000000
--- a/autodoc/source/parser_i/tokens/stmstfi2.cxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/stmstfi2.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <tokens/tkpcont2.hxx>
-
-
-StmBoundsStatu2::StmBoundsStatu2( StateMachineContext &
- o_rOwner,
- TkpContext & i_rFollowUpContext,
- uintt i_nStatusFunctionNr,
- bool i_bIsDefault )
- : pOwner(&o_rOwner),
- pFollowUpContext(&i_rFollowUpContext),
- nStatusFunctionNr(i_nStatusFunctionNr),
- bIsDefault(i_bIsDefault)
-{
-}
-
-bool
-StmBoundsStatu2::IsADefault() const
-{
- return bIsDefault;
-}
-
-StmBoundsStatu2 *
-StmBoundsStatu2::AsBounds()
-{
- return this;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/tkp2.cxx b/autodoc/source/parser_i/tokens/tkp2.cxx
deleted file mode 100644
index 95021501..00000000
--- a/autodoc/source/parser_i/tokens/tkp2.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tkp2.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <tools/tkpchars.hxx>
-#include <tokens/tkpcont2.hxx>
-
-TokenParse2::TokenParse2()
- : pChars(0)
-{
-}
-
-void
-TokenParse2::Start( CharacterSource & i_rSource )
-{
- pChars = &i_rSource;
- SetStartContext();
-}
-
-bool
-TokenParse2::GetNextToken()
-{
- csv_assert(pChars != 0);
-
- bool bDone = false;
- while ( NOT bDone AND NOT pChars->IsFinished() )
- {
- CurrentContext().ReadCharChain(*pChars);
- bDone = CurrentContext().PassNewToken();
- SetCurrentContext(CurrentContext().FollowUpContext());
- }
- return bDone;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/tkpcont2.cxx b/autodoc/source/parser_i/tokens/tkpcont2.cxx
deleted file mode 100644
index 73c93c5e..00000000
--- a/autodoc/source/parser_i/tokens/tkpcont2.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tkpcont2.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-
-TkpNullContex2 G_aNullContex2;
-
-TkpNullContex2 &
-TkpContext_Null2_()
-{
- return G_aNullContex2;
-}
-
-TkpNullContex2::~TkpNullContex2()
-{
-}
-
-void
-TkpNullContex2::ReadCharChain( CharacterSource & )
-{
-}
-
-bool
-TkpNullContex2::PassNewToken()
-{
- return false;
-}
-
-TkpContext &
-TkpNullContex2::FollowUpContext()
-{
- return *this;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/tkpstam2.cxx b/autodoc/source/parser_i/tokens/tkpstam2.cxx
deleted file mode 100644
index 39cf31e1..00000000
--- a/autodoc/source/parser_i/tokens/tkpstam2.cxx
+++ /dev/null
@@ -1,177 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tokens/tkpstam2.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <tokens/stmstar2.hxx>
-#include <tools/tkpchars.hxx>
-
-
-const intt C_nStatuslistResizeValue = 32;
-const intt C_nTopStatus = 0;
-
-StateMachin2::StateMachin2( intt in_nStatusSize,
- intt in_nInitial_StatusListSize )
- : pStati(new StmStatu2*[in_nInitial_StatusListSize]),
- nCurrentStatus(C_nTopStatus),
- nPeekedStatus(C_nTopStatus),
- nStatusSize(in_nStatusSize),
- nNrofStati(0),
- nStatiSpace(in_nInitial_StatusListSize)
-{
- csv_assert(in_nStatusSize > 0);
- csv_assert(in_nInitial_StatusListSize > 0);
-
- memset(pStati, 0, sizeof(StmStatu2*) * nStatiSpace);
-}
-
-intt
-StateMachin2::AddStatus(StmStatu2 * let_dpStatus)
-{
- if (nNrofStati == nStatiSpace)
- {
- ResizeStati();
- }
- pStati[nNrofStati] = let_dpStatus;
- return nNrofStati++;
-}
-
-void
-StateMachin2::AddToken( const char * in_sToken,
- UINT16 in_nTokenId,
- const INT16 * in_aBranches,
- INT16 in_nBoundsStatus )
-{
- if (csv::no_str(in_sToken))
- return;
-
- // Durch existierende Stati durchhangeln:
- nCurrentStatus = 0;
- nPeekedStatus = 0;
-
- for ( const char * pChar = in_sToken;
- *pChar != NULCH;
- ++pChar )
- {
- Peek(*pChar);
- StmStatu2 & rPst = Status(nPeekedStatus);
- if ( rPst.IsADefault() OR rPst.AsBounds() != 0 )
- {
- nPeekedStatus = AddStatus( new StmArrayStatu2(nStatusSize, in_aBranches, 0, false ) );
- CurrentStatus().SetBranch( *pChar, nPeekedStatus );
- }
- nCurrentStatus = nPeekedStatus;
- } // end for
- StmArrayStatu2 & rLastStatus = CurrentStatus();
- rLastStatus.SetTokenId(in_nTokenId);
- for (intt i = 0; i < nStatusSize; i++)
- {
- if (Status(rLastStatus.NextBy(i)).AsBounds() != 0)
- rLastStatus.SetBranch(i,in_nBoundsStatus);
- } // end for
-}
-
-StateMachin2::~StateMachin2()
-{
- for (intt i = 0; i < nNrofStati; i++)
- {
- delete pStati[i];
- }
- delete [] pStati;
-}
-
-StmBoundsStatu2 &
-StateMachin2::GetCharChain( UINT16 & o_nTokenId,
- CharacterSource & io_rText )
-{
- nCurrentStatus = C_nTopStatus;
- Peek(io_rText.CurChar());
- while (BoundsStatus() == 0)
- {
- nCurrentStatus = nPeekedStatus;
- Peek(io_rText.MoveOn());
- }
- o_nTokenId = CurrentStatus().TokenId();
-
- return *BoundsStatus();
-}
-
-void
-StateMachin2::ResizeStati()
-{
- intt nNewSize = nStatiSpace + C_nStatuslistResizeValue;
- intt i = 0;
- StatusList pNewStati = new StmStatu2*[nNewSize];
-
- for ( ; i < nNrofStati; i++)
- {
- pNewStati[i] = pStati[i];
- }
- memset( pNewStati+i,
- 0,
- (nNewSize-i) * sizeof(StmStatu2*) );
-
- delete [] pStati;
- pStati = pNewStati;
- nStatiSpace = nNewSize;
-}
-
-StmStatu2 &
-StateMachin2::Status(intt in_nStatusNr) const
-{
- csv_assert( csv::in_range(intt(0), in_nStatusNr, intt(nNrofStati)) );
- return *pStati[in_nStatusNr];
-}
-
-StmArrayStatu2 &
-StateMachin2::CurrentStatus() const
-{
- StmArrayStatu2 * pCurSt = Status(nCurrentStatus).AsArray();
- if (pCurSt == 0)
- {
- csv_assert(false);
- }
- return *pCurSt;
-}
-
-StmBoundsStatu2 *
-StateMachin2::BoundsStatus() const
-{
- return Status(nPeekedStatus).AsBounds();
-}
-
-void
-StateMachin2::Peek(intt in_nBranch)
-{
- StmArrayStatu2 & rSt = CurrentStatus();
- nPeekedStatus = rSt.NextBy(in_nBranch);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser_i/tokens/x_parse2.cxx b/autodoc/source/parser_i/tokens/x_parse2.cxx
deleted file mode 100644
index 8824d2cc..00000000
--- a/autodoc/source/parser_i/tokens/x_parse2.cxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <x_parse2.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
- enum E_Type
- {
- x_Any = 0,
- x_InvalidChar,
- x_UnexpectedEOF
- };
-void
-X_AutodocParser::GetInfo( std::ostream & o_rOutputMedium ) const
-{
- switch (eType)
- {
- case x_Any:
- o_rOutputMedium << "Unspecified parsing exception ." << Endl();
- break;
- case x_InvalidChar:
- o_rOutputMedium << "Unknown character during parsing." << Endl();
- break;
- case x_UnexpectedToken:
- o_rOutputMedium << "Unexpected token " << sName << " found." << Endl();
- break;
- case x_UnexpectedEOF:
- o_rOutputMedium << "Unexpected end of file found." << Endl();
- break;
- default:
- o_rOutputMedium << "Unknown exception during parsing." << Endl();
- }
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/tools/filecoll.cxx b/autodoc/source/tools/filecoll.cxx
deleted file mode 100644
index 30dccae0..00000000
--- a/autodoc/source/tools/filecoll.cxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tools/filecoll.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/ploc_dir.hxx>
-
-#include <stdio.h>
-
-
-FileCollector::FileCollector( uintt i_nRoughNrOfFiles )
- // : aFoundFiles
-{
- if (i_nRoughNrOfFiles > 0)
- aFoundFiles.reserve(i_nRoughNrOfFiles);
-}
-
-uintt
-FileCollector::AddFilesFrom( const char * i_sRootDir,
- const char * i_sFilter,
- E_SearchMode i_eSearchMode )
-{
- uintt nSizeAtStart = aFoundFiles.size();
-
- if (csv::no_str(i_sFilter) OR csv::no_str(i_sRootDir))
- {
- Cout() << "Warning: The filter contains no files." << Endl();
- return 0;
- }
-
- csv::ploc::Directory aDir(i_sRootDir);
- if (NOT aDir.Exists())
- {
- Cerr() << "Warning: The path for the files to be parsed could not be found:\n"
- << i_sRootDir
- << Endl();
- return 0;
- }
-
- Cout() << "." << Flush();
- aDir.GetContainedFiles(aFoundFiles, i_sFilter);
-
- if (i_eSearchMode == recursive)
- {
- StreamStr aPath(1020);
- aPath << i_sRootDir << csv::ploc::Delimiter();
- uintt nSubDirStart = aPath.tellp();
-
- StringVector aSubDirs;
- aDir.GetContainedDirectories(aSubDirs);
-
- for ( const_iterator iter = aSubDirs.begin();
- iter != aSubDirs.end();
- ++iter )
- {
- aPath.seekp(nSubDirStart);
- aPath << (*iter);
- AddFilesFrom( aPath.c_str(), i_sFilter, i_eSearchMode );
- }
- }
-
- return aFoundFiles.size() - nSizeAtStart;
-}
-
-uintt
-FileCollector::AddFile( const char * i_sFilePath )
-{
- FILE * pFile = fopen( i_sFilePath, "r" );
- if ( pFile == 0 )
- {
- Cerr() << "Warning: The path for the file to be parsed could not be found:\n"
- << i_sFilePath
- << Endl();
- return 0;
- }
-
- fclose(pFile);
- aFoundFiles.push_back(i_sFilePath);
- return 1;
-}
-
-void
-FileCollector::EraseAll()
-{
- csv::erase_container(aFoundFiles);
-}
-
-FileCollector::const_iterator
-FileCollector::Begin() const
-{
- return aFoundFiles.begin();
-}
-
-FileCollector::const_iterator
-FileCollector::End() const
-{
- return aFoundFiles.end();
-}
-
-uintt
-FileCollector::Size() const
-{
- return aFoundFiles.size();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/tools/makefile.mk b/autodoc/source/tools/makefile.mk
deleted file mode 100644
index 31d48edc..00000000
--- a/autodoc/source/tools/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=autodoc
-TARGET=autodoc_tools
-TARGETTYPE=CUI
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/filecoll.obj \
- $(OBJ)$/tkpchars.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/tools/tkpchars.cxx b/autodoc/source/tools/tkpchars.cxx
deleted file mode 100644
index 78b88eb8..00000000
--- a/autodoc/source/tools/tkpchars.cxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <tools/tkpchars.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/bstream.hxx>
-#include <cosv/x.hxx>
-
-
-
-CharacterSource::CharacterSource()
- : dpSource(new char[2]),
- nSourceSize(0),
- nCurPos(0),
- nLastCut(0),
- nLastTokenStart(0),
- cCharAtLastCut(0)
-{
- dpSource[nSourceSize] = NULCH;
- dpSource[nSourceSize+1] = NULCH;
-}
-
-CharacterSource::~CharacterSource()
-{
- delete [] dpSource;
-}
-
-void
-CharacterSource::LoadText(csv::bstream & io_rSource)
-{
- if (dpSource != 0)
- delete [] dpSource;
-
- io_rSource.seek(0, csv::end);
- nSourceSize = intt(io_rSource.position());
- io_rSource.seek(0);
-
- dpSource = new char[nSourceSize+1];
-
- intt nCount = (intt) io_rSource.read(dpSource,nSourceSize);
- if (nCount != nSourceSize)
- throw csv::X_Default("IO-Error: Could not load file completely.");
-
- dpSource[nSourceSize] = NULCH;
-
- BeginSource();
-}
-
-/// KORR_FUTURE: So far, this works only when tokens do not cross inserted text boundaries.
-void
-CharacterSource::InsertTextAtCurPos( const char * i_sText2Insert )
-{
- if ( !i_sText2Insert || !i_sText2Insert[0] )
- return;
-
- aSourcesStack.push( S_SourceState(
- dpSource,
- nSourceSize,
- nCurPos,
- nLastCut,
- nLastTokenStart,
- cCharAtLastCut ) );
-
- nSourceSize = strlen(i_sText2Insert);
- dpSource = new char[nSourceSize+1];
- strcpy( dpSource, i_sText2Insert); // SAFE STRCPY (#100211# - checked)
-
- BeginSource();
-}
-
-const char *
-CharacterSource::CutToken()
-{
- dpSource[nLastCut] = cCharAtLastCut;
- nLastTokenStart = nLastCut;
- nLastCut = CurPos();
- cCharAtLastCut = dpSource[nLastCut];
- dpSource[nLastCut] = NULCH;
-
- return &dpSource[nLastTokenStart];
-}
-
-void
-CharacterSource::BeginSource()
-{
- nCurPos = 0;
- nLastCut = 0;
- nLastTokenStart = 0;
- cCharAtLastCut = dpSource[nLastCut];
- dpSource[nLastCut] = NULCH;
-}
-
-// KORR_FUTURE: So far, this works only when tokens do not cross inserted text boundaries.
-char
-CharacterSource::MoveOn_OverStack()
-{
- while ( aSourcesStack.size() > 0 AND nCurPos >= nSourceSize-1 )
- {
- S_SourceState & aState = aSourcesStack.top();
- delete [] dpSource;
-
- dpSource = aState.dpSource;
- nSourceSize = aState.nSourceSize;
- nCurPos = aState.nCurPos;
- nLastCut = aState.nLastCut;
- nLastTokenStart = aState.nLastTokenStart;
- cCharAtLastCut = aState.cCharAtLastCut;
-
- aSourcesStack.pop();
- }
-
- if ( nLastCut < nCurPos )
- CutToken();
-
- return CurChar();
-}
-
-CharacterSource::
-S_SourceState::S_SourceState( DYN char * dpSource_,
- intt nSourceSize_,
- intt nCurPos_,
- intt nLastCut_,
- intt nLastTokenStart_,
- char cCharAtLastCut_ )
- : dpSource(dpSource_),
- nSourceSize(nSourceSize_),
- nCurPos(nCurPos_),
- nLastCut(nLastCut_),
- nLastTokenStart(nLastTokenStart_),
- cCharAtLastCut(cCharAtLastCut_)
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/bstream.hxx b/cosv/inc/cosv/bstream.hxx
deleted file mode 100644
index 6aa08eb7..00000000
--- a/cosv/inc/cosv/bstream.hxx
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_BSTREAM_HXX
-#define CSV_BSTREAM_HXX
-
-#include <string.h>
-#include <cosv/string.hxx>
-
-
-namespace csv
-{
-
-
-enum seek_dir
-{
- beg = 0,
- cur = 1,
- end = 2
-};
-
-
-class bistream
-{
- public:
- // LIFECYCLE
- virtual ~bistream() {}
-
- // OPERATIONS
- /// @return Number of actually read bytes.
- uintt read(
- void * out_pDest,
- uintt i_nNrofBytes);
- // INQUIRY
- /** @return True, if already one try to read had failed.
- There is no guarantee, that it returns true, if end of data
- is just reached.
- Though it will return false, if there is still somemething
- to read.
- */
- bool eod() const;
-
- private:
- virtual uintt do_read(
- void * out_pDest,
- uintt i_nNrofBytes) = 0;
- virtual bool inq_eod() const = 0;
-};
-
-
-class bostream
-{
- public:
- // LIFECYCLE
- virtual ~bostream() {}
-
- // OPERATIONS
- /// @return Number of actually written bytes.
- uintt write(
- const void * i_pSrc,
- uintt i_nNrofBytes);
- /// @return Number of actually written bytes.
- uintt write(
- const char * i_pSrc );
- /// @return Number of actually written bytes.
- uintt write(
- const String & i_pSrc );
- private:
- virtual uintt do_write(
- const void * i_pSrc,
- uintt i_nNrofBytes) = 0;
-};
-
-
-class bstream : public bistream,
- public bostream
-{
- public:
- uintt seek(
- intt i_nDistanceFromBegin,
- seek_dir i_eStartPoint = ::csv::beg );
- uintt position() const;
-
- private:
- virtual uintt do_seek(
- intt i_nDistance,
- seek_dir i_eStartPoint = ::csv::beg ) = 0;
- virtual uintt inq_position() const = 0;
-};
-
-
-// IMPLEMENTATION
-inline uintt
-bistream::read( void * o_pDest,
- uintt i_nNrofBytes)
- { return do_read(o_pDest, i_nNrofBytes); }
-inline bool
-bistream::eod() const
- { return inq_eod(); }
-
-inline uintt
-bostream::write( const void * i_pSrc,
- uintt i_nNrofBytes)
- { return do_write( i_pSrc, i_nNrofBytes ); }
-inline uintt
-bostream::write( const char * i_sSrc )
- { return write( i_sSrc, strlen(i_sSrc) ); }
-inline uintt
-bostream::write( const String & i_sSrc )
- { return write( i_sSrc.c_str(), i_sSrc.length() ); }
-
-inline uintt
-bstream::seek( intt i_nDistance,
- seek_dir i_eStartPoint )
- { return do_seek( i_nDistance, i_eStartPoint ); }
-inline uintt
-bstream::position() const
- { return inq_position(); }
-
-
-
-} // namespace csv
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/comdline.hxx b/cosv/inc/cosv/comdline.hxx
deleted file mode 100644
index 8aa190e2..00000000
--- a/cosv/inc/cosv/comdline.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_COMDLINE_HXX
-#define CSV_COMDLINE_HXX
-// KORR_DEPRECATED_3.0
-// Replace by cosv/commandline.hxx.
-
-
-namespace csv
-{
-
-class CommandLine_Ifc
-{
- public:
- virtual ~CommandLine_Ifc() {}
-
- void Init(
- int argc,
- char * argv[] );
- void PrintUse() const;
- bool CheckParameters() const;
-
- private:
- virtual void do_Init(
- int argc,
- char * argv[] ) = 0;
-
- virtual void do_PrintUse() const = 0;
- virtual bool inq_CheckParameters() const = 0;
-};
-
-inline void
-CommandLine_Ifc::Init( int argc,
- char * argv[] )
- { do_Init( argc, argv ); }
-inline void
-CommandLine_Ifc::PrintUse() const
- { do_PrintUse(); }
-
-} // namespace csv
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/comfunc.hxx b/cosv/inc/cosv/comfunc.hxx
deleted file mode 100644
index 003f92e8..00000000
--- a/cosv/inc/cosv/comfunc.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_COMFUNC_HXX
-#define CSV_COMFUNC_HXX
-
-#include <stdlib.h>
-
-
-
-
-namespace csv
-{
- class String;
-
-
-// min, max and range functions
-template <class E>
-inline E max(E in1, E in2);
-template <class E>
-inline E min(E in1, E in2);
-template <class E>
-inline bool in_range(E low, E val, E high); // return low <= val < high;
-
-
-// string functions
-inline const char * valid_str(const char * str);
-inline bool no_str(const char * str); // return !str || !strlen(str)
-
-
-// IMPLEMENTATION
-template <class E>
-inline E
-max(E in1, E in2) { return in1 < in2 ? in2 : in1; }
-template <class E>
-inline E
-min(E in1, E in2) { return in1 < in2 ? in1 : in2; }
-template <class E>
-inline bool
-in_range(E low, E val, E high) { return low <= val AND val < high; }
-
-inline const char *
-valid_str(const char * str) { return str != 0 ? str : ""; }
-inline bool
-no_str(const char * str) { return str != 0 ? *str == '\0' : true; }
-
-} // namespace csv
-
-#define NON_COPYABLE(xy) \
- private: xy(const xy &); xy & operator=(const xy &)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/commandline.hxx b/cosv/inc/cosv/commandline.hxx
deleted file mode 100644
index e0585acb..00000000
--- a/cosv/inc/cosv/commandline.hxx
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_COMMANDLINE_HXX
-#define CSV_COMMANDLINE_HXX
-
-#include <cosv/string.hxx>
-
-
-
-
-namespace csv
-{
-
-/** Does the standards in handling command line parameters.
-
- This class provides a default behaviour this way:
-
- * Each option can have several forms
-
- like: "-f" and "--file"
-
- which are identified by having the same id.
- The option id is used when calling ->do_HandleOption().
-
- * For each recognized option together with its parameters
- ->do_HandleOption() is called.
-
- * For the first unrecognized argument ->do_HandleFreeArgument() is
- called.
- After the first unrecognized argument, ->do_HandleFreeArgument()
- is called for all remaining arguments.
-
- @howtoderive
- - Overwrite ->do_HandleOption() to act on all known options.
- Overwrite ->do_HandleFreeArgument() to act on additional
- arguments not connected to an option.
-*/
-class CommandLine
-{
- public:
- // LIFECYCLE
- virtual ~CommandLine() {}
-
- // OPERATIONS
- bool Interpret(
- int argc,
- char * argv[] );
- // INQUIRY
- const StringVector &
- Arguments() const;
- bool IsOk() const;
-
- protected:
- CommandLine();
- void Add_Option(
- intt i_id,
- String i_text );
- void Set_Error();
-
- private:
- // public for use by struct commandline.cxx-anonymous::FindOptionByText;
- struct OptionDescription
- {
- intt nId;
- String sText;
-
- OptionDescription(
- intt i_id,
- String i_text );
- }; private:
-
- struct FindOptionByText;
-
- typedef std::vector<OptionDescription> OptionList;
- typedef std::vector<StringVector::const_iterator> StringCIteratorList;
- typedef std::vector<intt> OptionIdList;
-
- // Locals
- void Get_Arguments(
- int argc,
- char * argv[] );
- intt Find_Option(
- const String & i_text ) const;
- bool Store_Argument(
- const String & i_arg );
- void Find_OptionPoints();
- void Handle_FreeArguments(
- StringVector::const_iterator
- i_begin,
- StringVector::const_iterator
- i_end );
-
- // Helpers for options included via file
- bool Try2Include_Options(
- const String & i_optionsFile );
- bool Include_Options(
- const String & i_optionsFile );
- bool Load_Options(
- StreamStr & o_text,
- const String & i_optionsFile );
-
- /** Handles an option found in the command line.
- Needs to be overwritten.
-
- @return
- The first argument within the range
- i_next_argument .. i_comandLine_end that does not belong as a
- parameter to the handled option.
- */
- virtual StringVector::const_iterator
- do_HandleOption(
- intt i_id,
- StringVector::const_iterator
- i_paramsBegin,
- StringVector::const_iterator
- i_paramsEnd ) = 0;
- /** Handles arguments on the command line that do not belong to
- an option.
- */
- virtual void do_HandleFreeArgument(
- const String & i_argument ) = 0;
- // DATA
- OptionList aOptions;
-
- /// Used during and after ->GetArguments()
- StringVector aCommandLine;
- StringCIteratorList aOptionPoints;
- OptionIdList aOptionIds;
- bool bIsOk;
-};
-
-
-inline const StringVector &
-CommandLine::Arguments() const
-{
- return aCommandLine;
-}
-
-inline bool
-CommandLine::IsOk() const
-{
- return bIsOk;
-}
-
-inline void
-CommandLine::Set_Error()
-{
- bIsOk = false;
-}
-
-
-
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/csv_env.hxx b/cosv/inc/cosv/csv_env.hxx
deleted file mode 100644
index 28b21263..00000000
--- a/cosv/inc/cosv/csv_env.hxx
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_CSV_ENV_HXX
-#define CSV_CSV_ENV_HXX
-
-
-
-//******* Include c-language-types ************//
-// size_t, wchar_t
-#include <stdlib.h>
-
-
-
-//******* Builtin types of exact length ************//
-
-// Exact length builtin types
-typedef signed char INT8;
-typedef unsigned char UINT8;
-typedef short INT16;
-typedef unsigned short UINT16;
-typedef long INT32;
-typedef unsigned long UINT32;
-typedef float REAL32;
-typedef double REAL64;
-
-
-// Additional builtin types
-typedef INT32 intt; // standard sized integer.
-typedef UINT32 uintt; // standard sized unsigned integer.
-typedef REAL64 real; // standard sized real.
-
-// Constants
-// ---------
-// Zero-pointer for use in ellipsed (...) parameter lists which expect a
-// pointer which may have another size than an int.
-// Must be a define to be used in precompiled headers:
-#define NIL ((void*)0)
-// char '\0'
-#define NULCH '\0'
-
-
-
-// Boolesche Operatoren
-#define AND &&
-#define OR ||
-#define NOT !
-
-// Macro for distinguishing dynamic allocated pointers from
-// referencing pointers
-#define DYN // Exact specification: DYN has to be used if and only if:
- // 1. DYN specifies a class member pointer or reference variable and
- // the class must free the referenced memory.
- // 2. DYN specifies a pointer or reference (return-) parameter of a function
- // and for in-parameters the function or its class
- // must free the referenced memory, the parameter is then called
- // a let-parameter.
- // For out- and inout-parameters
- // or return values the caller of the function hast to
- // free the referenced memory.
- //
- // It is irrelevant who allocated the memory!
- //
- // DYN - variables use the prefixes "dp" or "dr" instead of "p" or "r".
-
-
-//****** Assertions ******//
-
-namespace csv
-{
-void PerformAssertion(
- const char * condition,
- const char * file,
- unsigned line );
-}
-
-// Programming by contract
-#ifndef CSV_NO_ASSERTIONS
-
-#ifdef CSV_USE_CSV_ASSERTIONS
-#define csv_assert(x) ( (x) ? (void)(0) : ::csv::PerformAssertion( #x, __FILE__, __LINE__) )
-#else
-
-// Save NDEBUG state
-#ifdef NDEBUG
-#define CSV_CSV_ENV_HXX_HAD_NDEBUG
-#undef NDEBUG
-#endif
-
-#if OSL_DEBUG_LEVEL == 0
-#define NDEBUG
-#endif
-#include <assert.h>
-
-#define csv_assert(x) assert(x);
-
-// Restore NDEBUG state
-#ifdef CSV_CSV_ENV_HXX_HAD_NDEBUG
-#define NDEBUG
-#else
-#undef NDEBUG
-#endif
-
-#endif
-
-#else // #ifndef CSV_NO_ASSERTIONS else
-
-#define csv_assert(x)
-
-#endif // end ifndef CSV_NO_ASSERTIONS else
-
-
-
-/* Additional Programming Conventions
-
-1. see above at "#define DYN"
-2. function parameters get one of these prefixes:
- - i_ := Function uses only the value, but must not change a referenced variable.
- - o_ := Parameter is undefined until function has set it.
- Parametere must be set by the function.
- - io_ := Function may use and change the referenced variable.
- - pass_ := Funktion may use and change the referenced variable and HAS TO free the
- associated memory.
-3. Global constants get the prefix 'C_', global variables the prefix 'G_'.
-4. Static members end with an underscore '_'.
-
-*/
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/csv_ostream.hxx b/cosv/inc/cosv/csv_ostream.hxx
deleted file mode 100644
index 7cf8561d..00000000
--- a/cosv/inc/cosv/csv_ostream.hxx
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_CSV_OSTREAM_HXX
-#define CSV_CSV_OSTREAM_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-
-#ifndef CSV_NO_IOSTREAMS
-
-#include <iostream>
-
-
-namespace csv
-{
-
-typedef std::ios ios;
-typedef std::ostream ostream;
-
-} // namespace csv
-
-
-#else
-
-#include <cosv/tpl/dyn.hxx>
-
-namespace csv
-{
-
-class StreamStr;
-
-class ios
-{
- public:
- enum seek_dir
- {
- beg=0,
- cur=1,
- end=2
- };
-};
-
-class ostream : public ios
-{
- public:
- typedef ostream self;
-
- virtual ~ostream();
-
- self & operator<<(
- const char * i_s );
- self & operator<<(
- char i_c );
- self & operator<<(
- unsigned char i_c );
- self & operator<<(
- signed char i_c );
-
- self & operator<<(
- short i_n );
- self & operator<<(
- unsigned short i_n );
- self & operator<<(
- int i_n );
- self & operator<<(
- unsigned int i_n );
- self & operator<<(
- long i_n );
- self & operator<<(
- unsigned long i_n );
-
- self & operator<<(
- float i_n );
- self & operator<<(
- double i_n );
-
- self & seekp(
- intt i_nOffset,
- seek_dir i_eStart = ios::beg );
- protected:
- ostream(
- uintt i_nStartSize );
- const StreamStr & Data() const;
-
- private:
- Dyn<StreamStr> pData;
-};
-
-
-
-inline const StreamStr &
-ostream::Data() const
- { return *pData; }
-
-
-} // namespace csv
-
-
-#endif
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/csv_precomp.h b/cosv/inc/cosv/csv_precomp.h
deleted file mode 100644
index 48323a67..00000000
--- a/cosv/inc/cosv/csv_precomp.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 __CSV_PRECOMP_H_06071998__
-#define __CSV_PRECOMP_H_06071998__
-
-
-
-
-#define CSV_USE_CSV_ASSERTIONS
-#include <cosv/csv_env.hxx>
-
-#include <cosv/comfunc.hxx>
-#include <cosv/string.hxx>
-#include <cosv/streamstr.hxx>
-#include <cosv/std_outp.hxx>
-#include <cosv/tpl/dyn.hxx>
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/dirchain.hxx b/cosv/inc/cosv/dirchain.hxx
deleted file mode 100644
index b40a7089..00000000
--- a/cosv/inc/cosv/dirchain.hxx
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_DIRCHAIN_HXX
-#define CSV_DIRCHAIN_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/string.hxx>
- // PARAMETERS
-#include <cosv/csv_ostream.hxx>
-
-#include <cosv/persist.hxx>
-#include <cosv/tpl/tpltools.hxx>
-
-
-
-namespace csv
-{
- class bostream;
-
-namespace ploc
-{
-
-
-class DirectoryChain
-{
- public:
- DirectoryChain();
- DirectoryChain(
- const DirectoryChain &
- i_rDC );
- ~DirectoryChain();
-
- // OPERATORS
- DirectoryChain & operator=(
- const DirectoryChain &
- i_rDC );
- DirectoryChain & operator+=(
- const String & i_sName );
- DirectoryChain & operator+=(
- const DirectoryChain &
- i_rDC );
- DirectoryChain & operator-=(
- uintt i_nLevelsUp );
-
- // OPERATIONS
- void Set(
- const char * i_sPath,
- bool i_bPathIsAlwaysDir = false,
- const char * i_sDelimiter = Delimiter() );
- void PushBack(
- const String & i_sName );
- void PushBack(
- const DirectoryChain &
- i_sPath );
- void PopBack(
- uintt i_nCount = 1 );
-
- // INQUIRY
- uintt Size() const;
-
- StringVector::const_iterator
- Begin() const;
- StringVector::const_iterator
- End() const;
-
- const String & Front() const;
- const String & Back() const;
-
- void Get(
- bostream & o_rPath,
- const char * i_sDelimiter ) const;
- private:
- StringVector aPath;
-};
-
-
-// IMPLEMENTATION
-inline
-DirectoryChain::DirectoryChain( const DirectoryChain & i_rDC )
- { PushBack(i_rDC); }
-
- // OPERATORS
-inline DirectoryChain &
-DirectoryChain::operator=( const DirectoryChain & i_rDC )
- { csv::erase_container(aPath); PushBack(i_rDC); return *this; }
-inline DirectoryChain &
-DirectoryChain::operator+=( const String & i_sName )
- { PushBack(i_sName); return *this; }
-inline DirectoryChain &
-DirectoryChain::operator+=( const DirectoryChain & i_rDC )
- { PushBack(i_rDC); return *this; }
-inline DirectoryChain &
-DirectoryChain::operator-=( uintt i_nLevelsUp )
- { PopBack(i_nLevelsUp); return *this; }
-inline uintt
-DirectoryChain::Size() const
- { return aPath.size(); }
-
-inline StringVector::const_iterator
-DirectoryChain::Begin() const
- { return aPath.begin(); }
-inline StringVector::const_iterator
-DirectoryChain::End() const
- { return aPath.end(); }
-inline const String &
-DirectoryChain::Front() const
- { return aPath.empty() ? String::Null_() : aPath.front(); }
-inline const String &
-DirectoryChain::Back() const
- { return aPath.empty() ? String::Null_() : aPath.back(); }
-
-
-} // namespace ploc
-} // namespace csv
-
-inline csv::bostream &
-operator<<( csv::bostream & o_rOut,
- const csv::ploc::DirectoryChain & i_rSubPath )
-{
- i_rSubPath.Get(o_rOut, csv::ploc::Delimiter());
- return o_rOut;
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/file.hxx b/cosv/inc/cosv/file.hxx
deleted file mode 100644
index 8729f9ce..00000000
--- a/cosv/inc/cosv/file.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_FILE_HXX
-#define CSV_FILE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/bstream.hxx>
-#include <cosv/openclose.hxx>
- // COMPONENTS
-#include <stdio.h>
-#include <cosv/string.hxx>
- // PARAMETERS
-#include <cosv/persist.hxx>
-#include <cosv/ploc.hxx>
-
-
-class FileStrategy;
-
-
-namespace csv
-{
-
-
-/** @task
- File is a class representing a file.
-*/
-class File : public bstream,
- public OpenClose,
- public ploc::Persistent
-{
- public:
- // LIFECYCLE
- File(
- const ::csv::ploc::Path &
- i_rLocation,
- uintt i_nMode = CFM_RW );
- File(
- const char * i_sLocation,
- uintt in_nMode = CFM_RW );
- File(
- const String & i_sLocation,
- uintt in_nMode = CFM_RW );
- virtual ~File();
-
- // INQUIRY
- uintt Mode() const;
-
- private:
- enum E_LastIO
- {
- io_none = 0,
- io_read,
- io_write
- };
-
- // Interface bistream:
- virtual uintt do_read(
- void * out_pDest,
- uintt i_nNrofBytes);
- virtual bool inq_eod() const;
- // Interface bostream:
- virtual uintt do_write(
- const void * i_pSrc,
- uintt i_nNrofBytes);
- // Interface bstream:
- virtual uintt do_seek(
- intt i_nDistance,
- seek_dir i_eStartPoint = ::csv::beg );
- virtual uintt inq_position() const;
- // Interface OpenClose:
- virtual bool do_open(
- uintt in_nOpenModeInfo );
- virtual void do_close();
- virtual bool inq_is_open() const;
- // Interface Persistent:
- virtual const ploc::Path &
- inq_MyPath() const;
- // DATA
- ploc::Path aPath;
- FILE * pStream;
-
- uintt nMode; /// RWMode, OpenMode and ShareMode.
- E_LastIO eLastIO;
-};
-
-
-
-// IMPLEMENTATION
-
-inline uintt
-File::Mode() const
- { return nMode; }
-
-
-} // namespace csv
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/openclose.hxx b/cosv/inc/cosv/openclose.hxx
deleted file mode 100644
index ad1e9063..00000000
--- a/cosv/inc/cosv/openclose.hxx
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_OPENCLOSE_HXX
-#define CSV_OPENCLOSE_HXX
-
-
-namespace csv
-{
-
-// Open modes for storages:
-enum E_RWMode
-{
- rwDefault = 0x0000, // Keep old settings. If there are none, set default.
- rwRead = 0x0001, // Reads only
- rwWrite = 0x0002, // Writes only
- rwReadWrite = 0x0003 // Reads and writes.
-};
-
-enum E_OpenMode
-{
- omCreateIfNecessary = 0x0000, // Creates a new file only, if file does not exist.
- omCreateNot = 0x0010, // Open fails, if file does not exist.
- omCreate = 0x0020 // Existing file will be deleted.
-};
-enum E_ShareMode
-{
- shmShareNot = 0x0000, // Allow others nothing
- shmShareRead = 0x0004, // Allow others to read
- shmShareAll = 0x000C // Allow others to read and write
-};
-
-/** Constants for filemode combinations
- These combinations are the only ones, guaranteed to be supported.
-*/
-const UINT32 CFM_RW = rwReadWrite;
-const UINT32 CFM_CREATE =
- static_cast< UINT32 >(rwReadWrite) | static_cast< UINT32 >(omCreate);
-const UINT32 CFM_READ =
- static_cast< UINT32 >(rwRead) | static_cast< UINT32 >(omCreateNot) |
- static_cast< UINT32 >(shmShareRead);
-
-
-
-class OpenClose
-{
- public:
- virtual ~OpenClose() {}
-
- bool open(
- UINT32 in_nOpenModeInfo = 0 ); /// Combination of values of E_RWMode and E_ShareMode und E_OpenMode. 0 := Keep existing mode.
- void close();
-
- bool is_open() const;
-
- private:
- virtual bool do_open(
- UINT32 in_nOpenModeInfo ) = 0;
- virtual void do_close() = 0;
- virtual bool inq_is_open() const = 0;
-};
-
-
-
-class OpenCloseGuard
-{
- public:
- OpenCloseGuard(
- OpenClose & i_rOpenClose,
- UINT32 i_nOpenModeInfo = 0 );
- ~OpenCloseGuard();
- operator bool() const;
-
- private:
- // Forbidden:
- OpenCloseGuard(OpenCloseGuard&);
- OpenCloseGuard & operator=(OpenCloseGuard&);
-
- // DATA
- OpenClose & rOpenClose;
-};
-
-
-// IMPLEMENTATION
-
-inline bool
-OpenClose::open( UINT32 i_nOpenModeInfo )
- { return do_open(i_nOpenModeInfo); }
-inline void
-OpenClose::close()
- { do_close(); }
-inline bool
-OpenClose::is_open() const
- { return inq_is_open(); }
-
-inline
-OpenCloseGuard::OpenCloseGuard( OpenClose & i_rOpenClose,
- UINT32 i_nOpenModeInfo )
- : rOpenClose(i_rOpenClose)
- { rOpenClose.open(i_nOpenModeInfo); }
-inline
-OpenCloseGuard::~OpenCloseGuard()
- { if (rOpenClose.is_open()) rOpenClose.close(); }
-inline
-OpenCloseGuard::operator bool() const
- { return rOpenClose.is_open(); }
-
-
-
-
-} // namespace csv
-
-
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/persist.hxx b/cosv/inc/cosv/persist.hxx
deleted file mode 100644
index 6e7b2b22..00000000
--- a/cosv/inc/cosv/persist.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_PERSIST_HXX
-#define CSV_PERSIST_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/string.hxx>
- // PARAMETERS
-
-
-namespace csv
-{
-namespace ploc
-{
-
-class Path;
-
-
-inline const char *
-Delimiter()
-{
-#ifdef WNT
- return "\\";
-#elif defined(UNX)
- return "/";
-#else
-#error For using csv::ploc there has to be defined: WNT or UNX.
-#endif
-}
-
-
-
-class Persistent
-{
- public:
- virtual ~Persistent() {}
-
- const Path & MyPath() const;
- /// @return all pathes without completing delimiter, even directories.
- const char * StrPath() const;
- bool Exists() const;
-
- protected:
- Persistent();
- void InvalidatePath();
-
- private:
- virtual const Path &
- inq_MyPath() const = 0;
- // DATA
- mutable StreamStr sPath;
-};
-
-
-
-// IMPLEMENTATION
-
-inline
-Persistent::Persistent()
- : sPath(30) { }
-inline const Path &
-Persistent::MyPath() const
- { return inq_MyPath(); }
-inline void
-Persistent::InvalidatePath()
- { sPath.clear(); }
-
-
-
-} // namespace csv
-} // namespace ploc
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/ploc.hxx b/cosv/inc/cosv/ploc.hxx
deleted file mode 100644
index 3f16c8b0..00000000
--- a/cosv/inc/cosv/ploc.hxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_PLOC_HXX
-#define CSV_PLOC_HXX
-
-// USED SERVICES
-#include <cosv/string.hxx>
-#include <cosv/plocroot.hxx>
-#include <cosv/dirchain.hxx>
-#include <cosv/tpl/dyn.hxx>
-#include <cosv/csv_ostream.hxx>
-
-
-
-
-namespace csv
-{
- class bostream;
-
-namespace ploc
-{
- class Root;
-
-
-/** Represents a path in the file system.
-
- The path can be relative or absolute and in Unix- or Windows-syntax.
-*/
-class Path
-{
- public:
-
- // LIFECYCLE
- explicit Path(
- const char * i_sPath = ".", /// Dirs have to be ended with a '\\ or '/'.
- bool i_bPathIsAlwaysDir = false, /// This overrides a missing Delimiter at the end of the i_sPath, if true.
- const char * i_sDelimiter = Delimiter() );
- Path(
- const Path & i_rPath );
- ~Path();
- // OPERATORS
- Path & operator=(
- const Path & i_rPath );
- // OPERATIONS
- void Set(
- const char * i_sPath,
- bool i_bPathIsAlwaysDir = false,
- const char * i_sDelimiter = Delimiter() );
- void SetFile( // If there is already a file, that is exchanged.
- const String & i_sName );
- // INQUIRY
- const Root & RootDir() const { return *pRoot; }
- const DirectoryChain &
- DirChain() const { return aPath; }
- const String & File() const { return sFile; }
- bool IsValid() const;
- bool IsDirectory() const { return sFile.length() == 0; }
- bool IsFile() const { return sFile.length() > 0; }
-
- /// Directories have a delimiter at the end, files not.
- void Get(
- bostream & o_rPath ) const;
- // ACCESS
- DirectoryChain & DirChain() { return aPath; }
-
- private:
- Dyn<Root> pRoot;
- DirectoryChain aPath;
- String sFile;
-};
-
-
-
-
-} // namespace ploc
-} // namespace csv
-
-/// Directories produce a delimiter at the end, files not.
-inline csv::bostream &
-operator<<( csv::bostream & o_rOut,
- const csv::ploc::Path & i_rPath )
-{
- i_rPath.Get(o_rOut);
- return o_rOut;
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/ploc_dir.hxx b/cosv/inc/cosv/ploc_dir.hxx
deleted file mode 100644
index a4d5eb5d..00000000
--- a/cosv/inc/cosv/ploc_dir.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_PLOCDIR_HXX
-#define CSV_PLOCDIR_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cosv/persist.hxx>
- // COMPONENTS
-#include <cosv/ploc.hxx>
- // PARAMETERS
-
-namespace csv
-{
-namespace ploc
-{
-
-class DirectoryChain;
-
-enum E_Recursivity
-{
- flat,
- recursive
-};
-
-class Directory : public Persistent
-{
- public:
- // LIFECYCLE
- Directory();
- Directory(
- const Path & i_rLocation );
- Directory(
- const char * i_rLocation );
- Directory(
- const Directory & i_rDir );
- virtual ~Directory();
-
- // OPERATORS
- Directory & operator+=(
- const String & i_sName );
- Directory & operator+=(
- const DirectoryChain &
- i_sDirChain );
- Directory & operator-=(
- uintt i_nLevels );
-
- // OPERATIONS
- bool PhysicalCreate(
- bool i_bCreateParentsIfNecessary = true ) const;
-
- // INQUIRY
- void GetContainedDirectories(
- StringVector & o_rResult ) const;
- /** @param i_sFilter
- Currently only filters of the form "*.ending" or "*.*"
- (the default) are processed correctly under UNIX. Under WNT this
- restriction does not apply.
- */
- void GetContainedFiles(
- StringVector & o_rResult,
- const char * i_sFilter = "*.*",
- E_Recursivity i_eRecursivity = flat ) const;
- private:
- // Interface Peristent:
- virtual const Path &
- inq_MyPath() const;
-
- // Locals:
- /** @return
- true, if parent(!) directory exists or could be created.
- false, if this is a root directory.
- */
- bool Check_Parent() const;
- bool PhysicalCreate_Dir(
- const char * i_sStr ) const;
- // DATA
- Path aPath;
-};
-
-
-
-} // namespace ploc
-} // namespace csv
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/plocroot.hxx b/cosv/inc/cosv/plocroot.hxx
deleted file mode 100644
index 02899160..00000000
--- a/cosv/inc/cosv/plocroot.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_PLOCROOT_HXX
-#define CSV_PLOCROOT_HXX
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/string.hxx>
- // PARAMETERS
-#include <cosv/csv_ostream.hxx>
-#include <cosv/persist.hxx>
-
-
-namespace csv
-{
-
-class bostream;
-
-
-namespace ploc
-{
-
-
-class Root
-{
- public:
- virtual ~Root();
-
- static DYN Root * Create_(
- const char * & o_sPathAfterRoot,
- const char * i_sPath,
- const char * i_sDelimiter = Delimiter() );
-
- virtual void Get( /// Does not add a '\0' at the end,
- ostream & o_rPath ) const = 0;
- virtual void Get( /// Does not add a '\0' at the end.
- bostream & so_rPath ) const = 0;
- virtual DYN Root * CreateCopy() const = 0;
- virtual const char *
- OwnDelimiter() const = 0;
-};
-
-
-
-} // namespace ploc
-} // namespace csv
-
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/std_outp.hxx b/cosv/inc/cosv/std_outp.hxx
deleted file mode 100644
index 9decc3f4..00000000
--- a/cosv/inc/cosv/std_outp.hxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_STD_OUTP_HXX
-#define CSV_STD_OUTP_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/csv_ostream.hxx>
- // PARAMETERS
-
-
-
-
-namespace csv
-{
-
-#ifdef CSV_NO_IOSTREAMS
-class redirect_out : public ostream
-{
- public:
- virtual ~redirect_out() {}
-
- void re_endl() { do_re_endl(); }
- void re_flush() { do_re_flush(); }
-
- static void set_(
- redirect_out & o_rStdOut,
- redirect_out & o_rStdErr )
- { pStdOut_ = &o_rStdOut;
- pStdErr_ = &o_rStdErr; }
-
- static redirect_out &
- std_() { return *pStdOut_; }
- static redirect_out &
- err_() { return *pStdErr_; }
- static bool useme_() { return pStdOut_ != 0; }
-
- private:
- virtual void do_re_endl() = 0;
- virtual void do_re_flush() = 0;
-
- // DATA
- static redirect_out *
- pStdOut_;
- static redirect_out *
- pStdErr_;
-};
-#endif // defined(CSV_NO_IOSTREAMS)
-
-
-inline ostream &
-Cout()
-{
-
-#ifndef CSV_NO_IOSTREAMS
-// return redirect_out::useme_()
-// ? (ostream&)( redirect_out::std_() )
-// : (ostream&)( std::cout );
- return (ostream&)( std::cout );
-#else
- csv_assert( redirect_out::useme_() );
- return redirect_out::std_();
-#endif
-}
-
-inline ostream &
-Cerr()
-{
-#ifndef CSV_NO_IOSTREAMS
-// return redirect_out::useme_()
-// ? (ostream&)( redirect_out::err_() )
-// : (ostream&)( std::cerr );
- return (ostream&)( std::cerr );
-#else
- csv_assert( redirect_out::useme_() );
- return redirect_out::err_();
-#endif
-}
-
-
-
-typedef void (*F_FLUSHING_FUNC)(ostream&, bool, int*);
-
-void Endl( ostream&, bool, int* );
-
-void Flush( ostream&, bool, int* );
-
-
-} // namespace csv
-
-
-
-inline csv::ostream &
-operator<<( csv::ostream & io_rStream,
- csv::F_FLUSHING_FUNC i_fFlushingFunc )
-{
-#ifndef CSV_NO_IOSTREAMS
-// (*i_fFlushingFunc)( io_rStream, csv::redirect_out::useme_(), 0 );
- (*i_fFlushingFunc)( io_rStream, false, 0 );
-#else
- csv_assert( csv::redirect_out::useme_() );
- (*i_fFlushingFunc)( io_rStream, true, 0 );
-#endif
- return io_rStream;
-}
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/str_types.hxx b/cosv/inc/cosv/str_types.hxx
deleted file mode 100644
index dd875383..00000000
--- a/cosv/inc/cosv/str_types.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 COSV_STR_TYPES_HXX
-#define COSV_STR_TYPES_HXX
-
-
-namespace csv
-{
-
-/** Provides some generally used constants.
-*/
-struct str
-{
- public:
- typedef ::size_t position;
- typedef ::size_t size;
-
- enum constants
- {
- npos = position(-1),
- maxsize = size(-1)
- };
-
- enum insert_mode
- {
- overwrite = 0,
- insert = 1
- };
-};
-
-
-/** Is used for string comparisons.
-
- @collab String
- @collab various csv::compare(...) functions
-*/
-class CharOrder_Table
-{
- public:
- /** @precond
- Parameter i_pCharWeightsArray
- must have size of 256.
- */
- CharOrder_Table(
- const int * i_pCharWeightsArray );
-
- /** @return the weight of the char i_c.
- @precond
- Even with unusual implementations, where char has more than 8 bit,
- there must be true: 0 <= i_c < 256.
- */
- int operator()(
- char i_c ) const;
- private:
- int cWeights[256];
-};
-
-
-// IMPLEMENTATION
-
-inline int
-CharOrder_Table::operator()( char i_c ) const
- { return cWeights[ UINT8(i_c) ]; }
-
-
-
-} // namespace csv
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx
deleted file mode 100644
index 8890cd28..00000000
--- a/cosv/inc/cosv/streamstr.hxx
+++ /dev/null
@@ -1,322 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_STREAMSTR_HXX
-#define CSV_STREAMSTR_HXX
-
-// BASE CLASSES
-#include <cosv/bstream.hxx>
-// USED SERVICES
-#include <cosv/str_types.hxx>
-#include <string.h>
-
-
-
-
-namespace csv
-{
- class String;
-
-
-void c_str(); // Dummy needed for StreamStr::operator<<(StreamStr::F_CSTR);
-
-
-/** A string buffer class for all kinds of string manipulation.
-*/
-class StreamStr : public bostream
-{
- public:
- typedef StreamStr self;
-
- typedef str::size size_type;
- typedef str::position position_type;
- typedef intt seek_type;
- typedef str::insert_mode insert_mode;
-
- typedef const char * const_iterator;
- typedef char * iterator;
-
- typedef void (*F_CSTR)();
-
-
- /** Represents an area within a string.
- */
- struct Area
- {
- typedef str::size size_type;
-
- Area(
- const char * i_str = "",
- size_type i_nLength = str::maxsize )
- : sStr(i_str),
- nLength( i_nLength == str::maxsize
- ? strlen(i_str)
- : i_nLength ) {}
- const char * sStr;
- size_type nLength;
- };
-
- // LIFECYCLE
- StreamStr(
- size_type i_nCapacity );
- StreamStr(
- const char * i_sInitStr,
- size_type i_nCapacity ); /// Only used if > strlen(i_sInitStr).
- /// Copies also insert_mode and current position.
- StreamStr(
- const self & i_rOther );
- ~StreamStr();
-
- // OPERATORS
- /// Copies also insert_mode and current position.
- self & operator=(
- const self & i_rOther );
-
- self & operator<<(
- const char * i_s );
- self & operator<<(
- const String & i_s );
- self & operator<<(
- char i_c );
- self & operator<<(
- unsigned char i_c );
- self & operator<<(
- signed char i_c );
-
- self & operator<<(
- short i_n );
- self & operator<<(
- unsigned short i_n );
- self & operator<<(
- int i_n );
- self & operator<<(
- unsigned int i_n );
- self & operator<<(
- long i_n );
- self & operator<<(
- unsigned long i_n );
-
- self & operator<<(
- float i_n );
- self & operator<<(
- double i_n );
-
- /** This operator is used to finish a sequence of streaming
- oeprators by returning the c-string of the complete string.
-
- @return The same as ->c_str().
-
- @example
- csv::StreamStr s(100);
- const char *
- fullname = s << qualifier() << "::" << name() << csv::c_str;
- */
- const char * operator<<(
- F_CSTR i_f );
-
- const char & operator[](
- position_type i_nPosition ) const;
- char & operator[](
- position_type i_nPosition );
-
- // OPERATIONS
- void resize(
- size_type i_nMinimumCapacity );
-
- void clear();
-
- /** Sets start point for the next operator<<() call.
- if the intended position is not reachable, nothing happens.
- */
- self & seekp(
- seek_type i_nCount,
- seek_dir i_eDirection = ::csv::beg );
- self & reset() { return seekp(0); }
- /** Sets the insertion mode of all and only the operator<<() calls.
-
- Default is str::overwrite:
- str::overwrite: seekp() always sets the cur end of the string.
- operator<<() calls push the end of the string forward.
- str::insert: seekp() only sets the insertion point.
- operator<<() calls insert their text at the tellp()
- position and keep the rest of the string. tellp() is
- then after the inserted text, on the beginning of the
- rest of the string.
- */
- self & set_insert_mode(
- insert_mode i_eMode );
-
- void pop_front(
- size_type i_nCount );
- void pop_back(
- size_type i_nCount );
-
- /// Works like operator<<(). Does the same as Perl's join().
- self & operator_join(
- std::vector<String>::const_iterator
- i_rBegin,
- std::vector<String>::const_iterator
- i_rEnd,
- const char * i_sLink );
- /// Works like operator<<()
- self & operator_add_substr(
- const char * i_sText,
- size_type i_nLength );
- /// Works like operator<<()
- self & operator_add_token(
- const char * i_sText,
- char i_cDelimiter );
- /// Works like operator<<()
- self & operator_read_line(
- bstream & i_src );
-
- void strip_front_whitespace(); /// removes space, tab and crlf.
- void strip_back_whitespace();
- void strip_frontback_whitespace();
-
- void replace_all(
- char i_cCarToSearch,
- char i_cReplacement );
-
- StreamStr & to_upper(
- position_type i_nStart = 0,
- size_type i_nLength = str::maxsize );
-
- // INQUIRY
- const char * c_str() const;
- const char * data() const;
-
- bool empty() const;
- size_type size() const;
- size_type length() const;
-
- size_type capacity() const;
-
- position_type tellp() const;
-
- const_iterator begin() const;
- const_iterator cur() const;
- const_iterator end() const;
-
- // ACCESS
- iterator begin();
- iterator cur();
- iterator end();
-
- private:
- // Interface bostream
- virtual UINT32 do_write(
- const void * i_pSrc,
- UINT32 i_nNrofBytes);
- // Locals
- void ProvideAddingSize(
- size_type i_nSize2Add );
- /// Resizes with the factor 2.0 (under 128), 1.5 or until i_nMinimumCapacity, whatever is bigger.
- void Resize(
- size_type i_nMinimumCapacity = 0 );
- void Advance(
- size_type i_nAddedSize );
- void MoveData(
- char * i_pStart,
- char * i_pEnd,
- seek_type i_nDiff );
- // DATA
- size_type nCapacity1; /// Capacity of characters to contain + 1 for terminating 0.
- DYN char * dpData;
- char * pEnd;
- char * pCur;
- insert_mode eMode;
-};
-
-
-
-class StreamStrLock
-{
- public:
- StreamStrLock(
- uintt i_nMinimalSize );
- ~StreamStrLock();
-
- StreamStr & operator()() { return *pStr; }
-
- private:
- StreamStr * pStr;
-};
-
-// IMPLEMENTATION
-
-inline const char *
-StreamStr::operator<<( F_CSTR )
- { return dpData; }
-inline void
-StreamStr::clear()
- { pEnd = pCur = dpData; *pEnd = '\0'; }
-inline const char *
-StreamStr::c_str() const
- { return dpData; }
-inline const char *
-StreamStr::data() const
- { return dpData; }
-inline bool
-StreamStr::empty() const
- { return dpData == pEnd; }
-inline StreamStr::size_type
-StreamStr::size() const
- { return pEnd - dpData; }
-inline StreamStr::size_type
-StreamStr::length() const
- { return size(); }
-inline StreamStr::size_type
-StreamStr::capacity() const
- { return nCapacity1-1; }
-inline StreamStr::position_type
-StreamStr::tellp() const
- { return size_type(pCur-dpData); }
-inline StreamStr::const_iterator
-StreamStr::begin() const
- { return dpData; }
-inline StreamStr::const_iterator
-StreamStr::cur() const
- { return pCur; }
-inline StreamStr::const_iterator
-StreamStr::end() const
- { return pEnd; }
-inline StreamStr::iterator
-StreamStr::begin()
- { return dpData; }
-inline StreamStr::iterator
-StreamStr::cur()
- { return pCur; }
-inline StreamStr::iterator
-StreamStr::end()
- { return pEnd; }
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/string.hxx b/cosv/inc/cosv/string.hxx
deleted file mode 100644
index 08b1220d..00000000
--- a/cosv/inc/cosv/string.hxx
+++ /dev/null
@@ -1,510 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 COSV_STRING_HXX
-#define COSV_STRING_HXX
-
-// USED SERVICES
-#include <cosv/stringdata.hxx>
-#include <cosv/str_types.hxx>
-#include <string.h>
-#include <cosv/csv_ostream.hxx>
-#include <vector>
-
-
-
-
-namespace csv
-{
-
-
-/** The Simple String:
- It is used to just hold short to middle long texts as
- data, which are constant at most times. They are reference
- counted, so they are space efficient and have constant time
- copy semantics.
-
- For all compare() functions the return value is like in strcmp().
-
- @attention
- The present version of this class is NOT thread safe.
-*/
-
-
-class String
-{
- public:
- typedef String self;
-
- typedef str::size size_type;
- typedef str::position position_type;
-
- typedef const char * const_iterator;
-
- // LIFECYCLE
- String();
-
- /// Intentionally not explicit, smooth casting is intended.
- String(
- const char * i_str );
- /// @precond i_nLength <= strlen(i_str) or i_nLength == str::maxsize.
- String(
- const char * i_str,
- size_type i_nLength );
-
- /** @precond i_itBegin and i_itEnd are in the same valid
- memory-area, such that zero to finite times repetition of
- ++i_itBegin leads to i_itBegin == i_itEnd.
- */
- String(
- const_iterator i_itBegin,
- const_iterator i_itEnd );
-
- String(
- const self & i_rStr );
-
- ~String();
- // OPERATORS
- self & operator=(
- const self & i_rStr );
- self & operator=(
- const char * i_str );
-
- operator const char * () const;
-
- bool operator==(
- const self & i_rStr ) const;
- bool operator!=(
- const self & i_rStr ) const;
- bool operator<(
- const self & i_rStr ) const;
- bool operator>(
- const self & i_rStr ) const;
- bool operator<=(
- const self & i_rStr ) const;
- bool operator>=(
- const self & i_rStr ) const;
-
- // OPERATIONS
- void clear();
-
- /// @precond i_nLength == str::maxsize OR i_nLength < strlen(i_str) .
- void assign(
- const char * i_str,
- size_type i_nLength );
- /// Create a string consisting of a sequence of i_nCount times the same char.
- void assign(
- size_type i_nCount,
- char i_c );
-
- // INQUIRY
- const char * c_str() const;
- const char * data() const;
-
- bool empty() const;
- size_type size() const;
- size_type length() const;
-
- const char & char_at(
- position_type i_nPosition ) const;
-
- const_iterator begin() const;
-
- /// This is inefficient, so shouldn't be used within loops.
- const_iterator end() const;
-
- int compare(
- const self & i_rStr ) const;
- int compare(
- const CharOrder_Table &
- i_rOrder,
- const self & i_rStr ) const;
-
-//*********** Not yet implemented *********************//
- position_type rfind(
- const char * i_strToSearch,
- position_type i_nSearchStartPosition = str::npos ) const;
- position_type rfind(
- char i_charToSearch,
- position_type i_nSearchStartPosition = str::npos ) const;
-
- position_type find_first_not_of(
- const char * i_strToSearch,
- position_type i_nSearchStartPosition = 0 ) const;
- position_type find_first_not_of(
- char i_charToSearch,
- position_type i_nSearchStartPosition = 0 ) const;
-
- position_type find_last_not_of(
- const char * i_strToSearch,
- position_type i_nSearchStartPosition = str::npos ) const;
- position_type find_last_not_of(
- char i_charToSearch,
- position_type i_nSearchStartPosition = str::npos ) const;
-//*********** end - not yet implemented *****************//
-
- static const self & Null_();
- static const char & Nulch_();
-
- private:
- struct S_Data
- {
- S_Data();
- /// @precond i_nValidLength <= strlen(i_sData) or i_nValidLength == str::maxsize.
- explicit S_Data(
- const char * i_sData,
- size_type i_nValidLength = str::maxsize );
- ~S_Data();
-
- const S_Data * Acquire() const;
-
- /// Deletes this, if nCount becomes 0.
- void Release() const;
-
- StringData<char> aStr;
- mutable UINT32 nCount;
-
- private:
- // Forbidden functions, because this is a refcounted structure.
- S_Data(const S_Data&);
- S_Data & operator=(const S_Data&);
- };
-
- // Locals
- const StringData<char> &
- Str() const;
-
- // DATA
- const S_Data * pd;
-};
-
-
-//********** Global compare functions ***************//
-
- //*** Natural order, no substrings
-
-inline int compare(
- const String & i_s1,
- const String & i_s2 );
-inline int compare(
- const String & i_s1,
- const char * i_s2 );
-inline int compare(
- const char * i_s1,
- const String & i_s2 );
-inline int compare(
- const char * i_s1,
- const char * i_s2 );
-
- //*** Natural order, substrings
-
-int compare(
- const String & i_s1,
- csv::str::position i_nStartPosition1,
- const char * i_s2,
- csv::str::size i_nLength );
-inline int compare(
- const char * i_s1,
- const char * i_s2,
- csv::str::size i_nLength );
-
- //*** Defined order, no substrings
-
-inline int compare(
- const CharOrder_Table & i_rOrder,
- const String & i_s1,
- const char * i_s2 );
-inline int compare(
- const CharOrder_Table & i_rOrder,
- const char * i_s1,
- const String & i_s2 );
-int compare(
- const CharOrder_Table & i_rOrder,
- const char * i_s1,
- const char * i_s2 );
-} // namespace csv
-
-
-
-
-//****************** global comparation operators *********************//
-
-inline bool operator==(
- const csv::String & i_s1,
- const char * i_s2 );
-inline bool operator!=(
- const csv::String & i_s1,
- const char * i_s2 );
-inline bool operator<(
- const csv::String & i_s1,
- const char * i_s2 );
-inline bool operator>(
- const csv::String & i_s1,
- const char * i_s2 );
-inline bool operator<=(
- const csv::String & i_s1,
- const char * i_s2 );
-inline bool operator>=(
- const csv::String & i_s1,
- const char * i_s2 );
-
-inline bool operator==(
- const char * i_s1,
- const csv::String & i_s2 );
-inline bool operator!=(
- const char * i_s1,
- const csv::String & i_s2 );
-inline bool operator<(
- const char * i_s1,
- const csv::String & i_s2 );
-inline bool operator>(
- const char * i_s1,
- const csv::String & i_s2 );
-inline bool operator<=(
- const char * i_s1,
- const csv::String & i_s2 );
-inline bool operator>=(
- const char * i_s1,
- const csv::String & i_s2 );
-
-
-//****************** global stream operators *********************//
-
-
-inline csv::ostream &
-operator<<( csv::ostream & o_rOut,
- const csv::String & i_rSrc );
-
-
-
-
-// IMPLEMENTATION
-namespace csv
-{
-
-
-inline const StringData<char> &
-String::Str() const
-{ return pd->aStr; }
-
-
-inline const char &
-String::char_at( position_type i_nPosition ) const
-{ if ( i_nPosition < Str().Size() )
- return Str().Data()[i_nPosition];
- return Nulch_();
-}
-
-inline bool
-String::operator==( const self & i_rStr ) const
-{ return compare(i_rStr) == 0; }
-
-inline bool
-String::operator!=( const self & i_rStr ) const
-{ return compare(i_rStr) != 0; }
-
-inline bool
-String::operator<( const self & i_rStr ) const
-{ return compare(i_rStr) < 0; }
-
-inline bool
-String::operator>( const self & i_rStr ) const
-{ return compare(i_rStr) > 0; }
-
-inline bool
-String::operator<=( const self & i_rStr ) const
-{ return compare(i_rStr) <= 0; }
-
-inline bool
-String::operator>=( const self & i_rStr ) const
-{ return compare(i_rStr) >= 0; }
-
-inline void
-String::clear()
-{ operator=( String::Null_() ); }
-
-inline const char *
-String::c_str() const
-{ return Str().Data(); }
-
-inline
-String::operator const char * () const
-{ return c_str(); }
-
-inline const char *
-String::data() const
-{ return c_str(); }
-
-inline String::size_type
-String::size() const
-{ return Str().Size(); }
-
-inline bool
-String::empty() const
-{ return size() == 0; }
-
-inline String::size_type
-String::length() const
-{ return size(); }
-
-inline String::const_iterator
-String::begin() const
-{ return data(); }
-
-inline String::const_iterator
-String::end() const
-{ return data() + size(); }
-
-
-
-//****************** global compare-functions ********************//
-inline int
-compare( const String & i_s1,
- const String & i_s2 )
-{ return i_s1.compare(i_s2); }
-
-inline int
-compare( const String & i_s1,
- const char * i_s2 )
-{ return strcmp(i_s1.c_str(), i_s2); }
-
-inline int
-compare( const char * i_s1,
- const String & i_s2 )
-{ return strcmp(i_s1, i_s2.c_str()); }
-
-inline int
-compare( const char * i_s1,
- const char * i_s2 )
-{ return strcmp(i_s1, i_s2); }
-
-inline int
-compare( const char * i_s1,
- const char * i_s2,
- str::size i_nLength )
-{ return strncmp( i_s1, i_s2, i_nLength ); }
-
-inline int
-compare( const CharOrder_Table & i_rOrder,
- const String & i_s1,
- const char * i_s2 )
-{ return compare( i_rOrder, i_s1.c_str(), i_s2 ); }
-
-inline int
-compare( const CharOrder_Table & i_rOrder,
- const char * i_s1,
- const String & i_s2 )
-{ return compare( i_rOrder, i_s1, i_s2.c_str() ); }
-
-
-} // namespace csv
-
-
-inline bool
-operator==( const csv::String & i_s1,
- const char * i_s2 )
-{ return csv::compare( i_s1, i_s2 ) == 0; }
-
-inline bool
-operator!=( const csv::String & i_s1,
- const char * i_s2 )
-{ return csv::compare( i_s1, i_s2 ) != 0; }
-
-inline bool
-operator<( const csv::String & i_s1,
- const char * i_s2 )
-{ return csv::compare( i_s1, i_s2 ) < 0; }
-
-inline bool
-operator>( const csv::String & i_s1,
- const char * i_s2 )
-{ return csv::compare( i_s1, i_s2 ) > 0; }
-
-inline bool
-operator<=( const csv::String & i_s1,
- const char * i_s2 )
-{ return csv::compare( i_s1, i_s2 ) <= 0; }
-
-inline bool
-operator>=( const csv::String & i_s1,
- const char * i_s2 )
-{ return csv::compare( i_s1, i_s2 ) >= 0; }
-
-
-inline bool
-operator==( const char * i_s1,
- const csv::String & i_s2 )
-{ return csv::compare( i_s1, i_s2 ) == 0; }
-
-inline bool
-operator!=( const char * i_s1,
- const csv::String & i_s2 )
-{ return csv::compare( i_s1, i_s2 ) != 0; }
-
-inline bool
-operator<( const char * i_s1,
- const csv::String & i_s2 )
-{ return csv::compare( i_s1, i_s2 ) < 0; }
-
-inline bool
-operator>( const char * i_s1,
- const csv::String & i_s2 )
-{ return csv::compare( i_s1, i_s2 ) > 0; }
-
-inline bool
-operator<=( const char * i_s1,
- const csv::String & i_s2 )
-{ return csv::compare( i_s1, i_s2 ) <= 0; }
-
-inline bool
-operator>=( const char * i_s1,
- const csv::String & i_s2 )
-{ return csv::compare( i_s1, i_s2 ) >= 0; }
-
-
- //************ global stream operators **************//
-
-
-inline csv::ostream &
-operator<<( csv::ostream & o_rOut,
- const csv::String & i_rSrc )
- { o_rOut << i_rSrc.c_str(); return o_rOut; }
-
-
-//****************** typedefs *********************//
-
-namespace csv
-{
-
-typedef std::vector<String> StringVector;
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/stringdata.hxx b/cosv/inc/cosv/stringdata.hxx
deleted file mode 100644
index 0471d82e..00000000
--- a/cosv/inc/cosv/stringdata.hxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 COSV_STRINGDATA_HXX
-#define COSV_STRINGDATA_HXX
-
-
-#include <cosv/str_types.hxx>
-
-
-
-namespace csv
-{
-
-/** @tpl CHAR
- The expression CHAR(0) has to be valid.
-*/
-template <class CHAR>
-class StringData
-{
- public:
- typedef StringData self;
-
- typedef str::size size_type;
- typedef str::position position_type;
-
- // LIFECYCLE
- StringData();
- /** @precond i_pData != 0
- @precond i_nValidLength <= strlen(i_pData)
- */
- StringData(
- const CHAR * i_pData,
- size_type i_nValidLength );
- ~StringData();
- // OPERATORS
-
- // OPERATIONS
-
- // INQUIRY
- const CHAR * Data() const;
-
- /** @returns the allocated number of CHAR.
- This may be different from the number of bytes.
- There is actually allocated one more CHAR,
- which is guaranteed to be CHAR(0) in all circumstances.
- */
- size_type Size() const;
-
- private:
- /* Because this is used only within a refcounted structure,
- these functions are forbidden - at least yet.
- */
- StringData(const self&);
- self & operator=(const self&);
-
- // DATA
- DYN CHAR * dpData;
- size_type nSize; /// The allocated size - 1 (for the finishing 0).
-};
-
-
-
-// IMPLEMENTATION
-
-template <class CHAR>
-StringData<CHAR>::StringData()
- : dpData( new CHAR[1] ),
- nSize(0)
-{
- *dpData = CHAR(0);
-}
-
-template <class CHAR>
-StringData<CHAR>::StringData( const CHAR * i_pData,
- size_type i_nValidLength )
- : dpData( new CHAR[i_nValidLength + 1] ),
- nSize(i_nValidLength)
-{
- memcpy( dpData, i_pData, i_nValidLength * sizeof(CHAR) );
- dpData[nSize] = CHAR(0);
-}
-
-template <class CHAR>
-StringData<CHAR>::~StringData()
-{
- delete [] dpData;
-}
-
-template <class CHAR>
-const CHAR *
-StringData<CHAR>::Data() const
-{
- return dpData;
-}
-
-template <class CHAR>
-typename StringData<CHAR>::size_type
-StringData<CHAR>::Size() const
-{
- return nSize;
-}
-
-
-
-} // namespace csv
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/dyn.hxx b/cosv/inc/cosv/tpl/dyn.hxx
deleted file mode 100644
index f59495a2..00000000
--- a/cosv/inc/cosv/tpl/dyn.hxx
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_DYN_HXX
-#define CSV_DYN_HXX
-
-
-
-
-namespace csv
-{
-
-
-/** Dyn owns an object on the heap, which will be automatically
- deleted in its D'tor.
-
- Dyn's main purpose is for class members on the heap:
- You can't forget to delete them in the D'tor. Constness will be transfered
- to the hold object.
-
- Dyn forbids the CopyC'tor and operator=(). So you can't incidentally
- run into problems with compiler defined CopyC'tor or operator=() of the
- owning class. If you need those, you have to define them explicitely - as
- you should do anyway with all classes, that own members on the heap.
-
- Dyn also works with incomplete types.
- You only need to write
- class DX;
- but needn't include #include <DX>.hxx.
- This is a difference to std::auto_ptr, where it is not absolutely clear
- if it is allowed to use it with incomplete types.
-
- You can also use Dyn within function bodies, to make them exception safe.
-
- @attention
- If you use Dyn with an incomplete type, the owning class needs to
- define a non-inline D'tor. Else the compiler will complain.
-*/
-template <class DX>
-class Dyn
-{
- public:
- // LIFECYCLE
- /// From now on, let_dpObject is owned by this Dyn-object.
- explicit Dyn(
- DX * let_dpObject = 0);
- ~Dyn();
- // OPERATORS
- /** This deletes a prevoiusly existing dpObject!
- From now on, let_dpObject is owned by this Dyn-object.
- */
- Dyn<DX> & operator=(
- DX * let_dpObject);
- /// @return true, if any valid object is hold, false else.
- operator bool() const;
-
- const DX * operator->() const;
- DX * operator->();
-
- const DX & operator*() const;
- DX & operator*();
-
- // OPERATIONS
- /** @return The hold object on the heap.
-
- @ATTENTION
- The caller of the function is responsible to delete
- the returned object
-
- @postcond
- this->dpObject == 0.
- */
- DX * Release();
-
- // INQUIRY
- /// Shorthand for operator->(), if implicit overloading of -> can not be used.
- const DX * Ptr() const;
-
- // ACCESS
- /// Shorthand for operator->(), if implicit overloading of -> can not be used.
- DX * Ptr();
- /// So const objects can return mutable pointers to the owned object.
- DX * MutablePtr() const;
-
- private:
- /* Does NOT set dpObject to zero! Because it is only used
- internally in situations where dpObject is set immediately
- after.
- */
- void Delete();
-
- /** Forbidden function!
- -------------------
- Help ensure, that classes with
- dynamic pointers use a selfdefined copy constructor
- and operator=(). If the default versions of these
- functions are used, the compiler will throw an error.
- **/
- Dyn( const Dyn<DX> & );
- /** Forbidden function!
- -------------------
- Help ensure, that classes with
- dynamic pointers use a selfdefined copy constructor
- and operator=(). If the default versions of these
- functions are used, the compiler will throw an error.
- **/
- Dyn<DX> & operator=( const Dyn<DX> & );
-
- // DATA
- /// An owned heap object. Needs to be deleted by this class.
- DX * dpObject;
-};
-
-
-
-
-// IMPLEMENTATION
-template <class DX>
-void
-Dyn<DX>::Delete()
-{
- if (dpObject != 0)
- delete dpObject;
-}
-
-template <class DX>
-inline
-Dyn<DX>::Dyn( DX * let_dpObject )
- : dpObject(let_dpObject) {}
-
-template <class DX>
-inline
-Dyn<DX>::~Dyn()
-{ Delete(); }
-
-
-template <class DX>
-inline Dyn<DX> &
-Dyn<DX>::operator=( DX * let_dpObject )
-{
- if ( dpObject == let_dpObject )
- return *this;
-
- Delete();
- dpObject = let_dpObject;
- return *this;
-}
-
-template <class DX>
-inline
-Dyn<DX>::operator bool() const
-{ return dpObject != 0; }
-
-template <class DX>
-inline
-const DX *
-Dyn<DX>::operator->() const
-{ return dpObject; }
-
-template <class DX>
-inline DX *
-Dyn<DX>::operator->()
-{ return dpObject; }
-
-template <class DX>
-inline const DX &
-Dyn<DX>::operator*() const
-{ csv_assert(dpObject != 0);
- return *dpObject;
-}
-
-template <class DX>
-inline DX &
-Dyn<DX>::operator*()
-{ csv_assert(dpObject != 0);
- return *dpObject;
-}
-
-template <class DX>
-inline DX *
-Dyn<DX>::Release()
-{ DX * ret = dpObject;
- dpObject = 0;
- return ret;
-}
-
-template <class DX>
-inline const DX *
-Dyn<DX>::Ptr() const
-{ return dpObject; }
-
-template <class DX>
-inline DX *
-Dyn<DX>::Ptr()
-{ return dpObject; }
-
-template <class DX>
-inline DX *
-Dyn<DX>::MutablePtr() const
-{ return dpObject; }
-
-} // namespace csv
-
-
-
-
-#ifndef CSV_HIDE_DYN
-#define Dyn ::csv::Dyn
-#endif
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/funcall.hxx b/cosv/inc/cosv/tpl/funcall.hxx
deleted file mode 100644
index f76e014c..00000000
--- a/cosv/inc/cosv/tpl/funcall.hxx
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_TPL_FUNCALL_HXX
-#define CSV_TPL_FUNCALL_HXX
-
-// BASE CLASSES
-#include <algorithm>
-
-
-
-
-namespace csv
-{
-namespace func
-{
-
-
-/** @concept "csv:: Function Objects"
-
- A set of function objects that can be generated from any kind of
- function or member function with none or one parameter by the
- helper function ->make_func().
-
- Naming Scheme
- =============
-
- The naming scheme consists of three variables
- f - the kind of function
- p - the parameter of the function
- c - call operator() of the function object with these arguments
-
- Each of those may have the following values:
- f:
- f - free, no owning class
- c - const member function of a class
- m - modifying member function of a class
- p:
- n - no parameter
- c - const parameter by reference
- m - modifyable parameter by reference,
- v - parameter by value
- c:
- n - none
- o - the owning object on which the function shall be called
- a - the argument of the function
- b - both, the object on which the function shall be called
- and the argument of the function
-
- Which gives the following 35 possible combinations:
- ff_pn_cn
- ff_pc_cn
- ff_pc_ca
- ff_pm_cn
- ff_pm_ca
- ff_pv_cn
- ff_pv_ca
-
- fc_pn_cn
- fc_pn_co
- fc_pc_cn
- fc_pc_co
- fc_pc_ca
- fc_pc_cb
- fc_pm_cn
- fc_pm_co
- fc_pm_ca
- fc_pm_cb
- fc_pv_cn
- fc_pv_co
- fc_pv_ca
- fc_pv_cb
-
- fm_pn_cn
- fm_pn_co
- fm_pc_cn
- fm_pc_co
- fm_pc_ca
- fm_pc_cb
- fm_pm_cn
- fm_pm_co
- fm_pm_ca
- fm_pm_cb
- fm_pv_cn
- fm_pv_co
- fm_pv_ca
- fm_pv_cb
-
- These function objects are complicate to handle, so they can be created
- with the overloaded function
- <function_object> csv::make_func(<function_type>, <argument_types>);
-
- For the rare, but possible case that the owning class and the function
- argument have the same type, these clarifying variations to make_func()
- can be used:
- make_func_callwith_obj(), make_func_callwith_arg().
-*/
-
-
-/** Function object.
-
- @concept ->"csv::func Function Objects"
- @see csv::make_func()
-*/
-template <class R>
-struct ff_pn_cn
-{
- typedef R result_type;
- typedef R (* function_type )();
-
- R operator()() const
- { return (*f)(); }
-
- ff_pn_cn(
- function_type i_f)
- : f(i_f) {}
- private:
- function_type f;
-};
-
-
-/** Function object.
-
- @concept ->"csv::func Function Objects"
- @see csv::make_func()
-*/
-template <class R, class C>
-struct fc_pn_co
-{
- typedef R result_type;
- typedef R (C::* function_type )() const;
-
- R operator()(
- const C & i_c ) const
- { return (i_c.*f)(); }
-
- fc_pn_co(
- function_type i_f)
- : f(i_f) {}
- private:
- function_type f;
-};
-
-
-
-/** Function object.
-
- @concept ->"csv::func Function Objects"
- @see csv::make_func()
-*/
-template <class R, class C, class P>
-struct fc_pm_co
-{
- typedef R result_type;
- typedef R (C::* function_type )(P&) const;
-
- R operator()(
- const C & i_c ) const
- { return (i_c.*f)(p); }
-
- fc_pm_co(
- function_type i_f,
- P & i_p)
- : f(i_f), p(i_p) {}
- private:
- function_type f;
- P & p;
-};
-
-
-
-
-
-
-
-} // namespace func
-
-
-/** Creates a function object of type ff_pn_cn.
- @concept ->"csv::func Function Objects"
-*/
-template <class R>
-inline func::ff_pn_cn<R>
-make_func( R(*i_f)() )
-{
- return func::ff_pn_cn<R>(i_f);
-}
-
-///** Creates a function object of type ff_py_cn.
-// @concept ->"csv::func Function Objects"
-//*/
-//template <class R, class P>
-//inline func::ff_py_cn<R,P>
-//make_func( R(*i_f)(P), P i_p )
-//{
-// return func::ff_py_cn<R,A>(i_f, i_p);
-//}
-//
-///** Creates a function object of type ff_py_ca.
-// @concept ->"csv::func Function Objects"
-//*/
-//template <class R, class P>
-//inline func::ff_py_ca<R,P>
-//make_func( R(*i_f)(P) )
-//{
-// return func::ff_py_ca<R,P>(i_f);
-//}
-
-
-/** Creates a function object of type fc_pn_co.
- @concept ->"csv::func Function Objects"
-*/
-template <class R, class C>
-inline func::fc_pn_co<R,C>
-make_func( R(C::*i_f)() const )
-{
- return func::fc_pn_co<R,C>(i_f);
-}
-
-
-
-/** Creates a function object of type fc_pm_co.
- @concept ->"csv::func Function Objects"
-*/
-template <class R, class C, class P>
-inline func::fc_pm_co<R,C,P>
-make_func( R(C::*i_f)(P &) const, P & i_p)
-{
- return func::fc_pm_co<R,C,P>(i_f, i_p);
-}
-
-
-
-/* Because std::for_each is defined as a non-modifying algorithm
- it is redefined here. It is also provided for containers.
-*/
-
-template <class I, class F>
-F
-for_each(I i_itBegin, I i_itEnd, F io_functionToBeCalled)
-{
- for (I it = i_itBegin; it != i_itEnd; ++it)
- {
- io_functionToBeCalled(*it);
- }
- return io_functionToBeCalled;
-}
-
-template <class C, class F>
-F
-for_each_in(const C & i_container, F io_functionToBeCalled)
-{
- typename C::const_iterator const
- itEnd = i_container.end();
- for ( typename C::const_iterator it = i_container.begin();
- it != itEnd;
- ++it )
- {
- io_functionToBeCalled(*it);
- }
- return io_functionToBeCalled;
-}
-
-template <class C, class F>
-F
-for_each_in(C & i_container, F io_functionToBeCalled)
-{
- typename C::iterator const
- itEnd = i_container.end();
- for ( typename C::iterator it = i_container.begin();
- it != itEnd;
- ++it )
- {
- io_functionToBeCalled(*it);
- }
- return io_functionToBeCalled;
-}
-
-
-
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/processor.hxx b/cosv/inc/cosv/tpl/processor.hxx
deleted file mode 100644
index a6dba37b..00000000
--- a/cosv/inc/cosv/tpl/processor.hxx
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_TPL_PROCESSOR_HXX
-#define CSV_TPL_PROCESSOR_HXX
-
-// USED SERVICES
-
-
-
-
-namespace csv
-{
-
-
-/** Implements an acyclic visitor pattern. This is the abstract
- base for the classes doing the work (the "visitors").
-*/
-class ProcessorIfc
-{
- public:
- virtual ~ProcessorIfc() {}
-};
-
-
-
-/** Implements an acyclic visitor pattern. This is the abstract
- base for the classes to be processed (the "visitables").
-*/
-class ConstProcessorClient
-{
- public:
- virtual ~ConstProcessorClient() {}
-
- void Accept(
- ProcessorIfc & io_processor ) const
- { do_Accept(io_processor); }
- private:
- virtual void do_Accept(
- ProcessorIfc & io_processor ) const = 0;
-};
-
-/** Implements an acyclic visitor pattern. This is the abstract
- base for the classes to be processed (the "visitables").
-*/
-class ProcessorClient
-{
- public:
- virtual ~ProcessorClient() {}
-
- void Accept(
- ProcessorIfc & io_processor )
- { do_Accept(io_processor); }
- private:
- virtual void do_Accept(
- ProcessorIfc & io_processor ) = 0;
-};
-
-
-
-
-
-/** Typed base for "visitor" classes, leaving the visited
- object const.
-
- @see ProcessorIfc
- @see Processor<>
-*/
-template <typename X, typename R = void>
-class ConstProcessor
-{
- public:
- virtual ~ConstProcessor() {}
-
- R Process(
- const X & i_object )
- { return do_Process(i_object ); }
- private:
- virtual R do_Process(
- const X & i_object ) = 0;
-};
-
-
-/** Typed base for "visitor" classes which may change the visited
- object.
-
- @see ProcessorIfc
- @see ConstProcessor<>
-*/
-template <typename X, typename R = void>
-class Processor
-{
- public:
- virtual ~Processor() {}
-
- R Process(
- X & i_object )
- { return do_Process(i_object ); }
- private:
- virtual R do_Process(
- X & i_object ) = 0;
-};
-
-
-template <class C>
-inline void
-CheckedCall( ProcessorIfc & io_processor,
- const C & i_client )
-{
- ConstProcessor<C> *
- pProcessor = dynamic_cast< csv::ConstProcessor<C> * >
- (&io_processor);
- if (pProcessor != 0)
- pProcessor->Process(i_client);
-}
-
-template <class C>
-inline void
-CheckedCall( ProcessorIfc & io_processor,
- C & io_client )
-{
- Processor<C> *
- pProcessor = dynamic_cast< csv::Processor<C> * >
- (&io_processor);
- if (pProcessor != 0)
- pProcessor->Process(io_client);
-}
-
-template <class C>
-inline void
-AssertedCall( ProcessorIfc & io_processor,
- const C & i_client )
-{
- ConstProcessor<C> *
- pProcessor = dynamic_cast< csv::ConstProcessor<C> * >
- (&io_processor);
- csv_assert( pProcessor != 0
- && "csv::AssertedCall() failed. Processed object did not match processor." );
- pProcessor->Process(i_client);
-}
-
-template <class C>
-inline void
-AssertedCall( ProcessorIfc & io_processor,
- C & io_client )
-{
- Processor<C> *
- pProcessor = dynamic_cast< csv::Processor<C> * >
- (&io_processor);
- csv_assert( pProcessor != 0
- && "csv::AssertedCall() failed. Processed object did not match processor." );
- pProcessor->Process(io_client);
-}
-
-
-
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/range.hxx b/cosv/inc/cosv/tpl/range.hxx
deleted file mode 100644
index 295d7cf6..00000000
--- a/cosv/inc/cosv/tpl/range.hxx
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_RANGE_HXX
-#define CSV_RANGE_HXX
-
-#include <cstring> // for std::size_t
-
-
-
-
-namespace csv
-{
-
-
-/** Represents a range of integer or iterator values.
-
- @tpl T
- Has to be assignable, add- and subtractable. That is:
- either it is
- - an integral type
- - or a random access iterator.
-*/
-template <class T>
-class range
-{
- public:
- typedef T element_type; /// Provided for generic programming.
- typedef range<T> self;
-
- // LIFECYCLE
- range(
- T i_inclusiveLowerBorder,
- T i_exclusiveUpperBorder );
- ~range();
- // INQUIRY
- T begin() const;
- T end() const;
- std::size_t size() const;
-
- bool contains(
- T i_value ) const;
- bool contains(
- const self & i_other ) const;
- bool overlaps(
- const self & i_other ) const;
- /// @return i_other.begin() - this->end()
- long distance_to(
- const self & i_other ) const;
- private:
- // DATA
- T nBegin;
- T nEnd;
-};
-
-
-template <class T>
-inline range<T>
-make_range(T i1, T i2)
-{
- return range<T>(i1, i2);
-}
-
-template <class T>
-inline range<typename T::const_iterator>
-range_of(const T & i_container)
-{
- return make_range( i_container.begin(),
- i_container.end()
- );
-}
-
-template <class T>
-inline range<typename T::iterator>
-range_of(T & io_container)
-{
- return make_range( io_container.begin(),
- io_container.end()
- );
-}
-
-
-
-
-
-// IMPLEMENTATION
-
-template <class T>
-range<T>::range( T i_inclusiveLowerBorder,
- T i_exclusiveUpperBorder )
- : nBegin(i_inclusiveLowerBorder),
- nEnd(i_exclusiveUpperBorder)
-{
- csv_assert( nBegin <= nEnd
- && "Invalid parameters for range<> constructor.");
-}
-
-template <class T>
-range<T>::~range()
-{
-}
-
-template <class T>
-inline T
-range<T>::begin() const
-{
- return nBegin;
-}
-
-template <class T>
-inline T
-range<T>::end() const
-{
- return nEnd;
-}
-
-template <class T>
-inline std::size_t
-range<T>::size() const
-{
- csv_assert( nBegin <= nEnd
- && "Invalid range limits in range<>::size().");
- return static_cast<std::size_t>( end() - begin() );
-}
-
-template <class T>
-bool
-range<T>::contains(T i_value ) const
-{
- return begin() <= i_value
- && i_value < end();
-}
-
-template <class T>
-bool
-range<T>::contains(const self & i_other) const
-{
- // This is subtle, because this would be wrong:
- // begin() <= i_other.begin()
- // && i_other.end() <= end();
- // An empty range that begins and starts at my end()
- // must not be contained.
-
- return contains(i_other.begin())
- && i_other.end() <= end();
-}
-
-template <class T>
-bool
-range<T>::overlaps(const self & i_other) const
-{
- return contains(i_other.begin())
- || i_other.contains(begin());
-}
-
-template <class T>
-long
-range<T>::distance_to(const self & i_other) const
-{
- return i_other.begin() - end();
-}
-
-
-
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/swelist.hxx b/cosv/inc/cosv/tpl/swelist.hxx
deleted file mode 100644
index c0f06f3a..00000000
--- a/cosv/inc/cosv/tpl/swelist.hxx
+++ /dev/null
@@ -1,371 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_SWELIST_HXX
-#define CSV_SWELIST_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-#include <cosv/tpl/dyn.hxx>
-
-
-namespace csv
-{
-
-
-template <class XX>
-class SweListElement
-{
- public:
- typedef SweListElement<XX> self;
-
- SweListElement(
- const XX & in_aObj )
- : aObj(in_aObj), pNext(0) {}
-
- const XX & Obj() const { return aObj; }
- XX & Obj() { return aObj; }
- self * Next() const { return pNext; }
-
- void SetNext(
- self * i_pNext )
- { pNext = i_pNext; }
- private:
- XX aObj;
- self * pNext;
-};
-
-
-
-template <class XX> class SweListIterator;
-template <class XX> class SweListCIterator;
-
-
-template <class XX>
-class SweList
-{
- public:
- // TYPES
- typedef SweList<XX> self;
- typedef XX value_type;
- typedef SweListIterator<XX> iterator;
- typedef SweListCIterator<XX> const_iterator;
- private:
- typedef SweListElement<XX> elem;
-
- public:
- // LIFECYCLE
- SweList() : pTop(0), pTail(0) {}
- ~SweList() { erase_all(); }
- // OPERATIONS
- void push_front(
- const XX & i_aObj );
- void pop_front();
- void push_back(
- const XX & i_aObj );
- void erase_all();
-
- // INQUIRY
- const_iterator begin() const { return pTop; }
- iterator begin() { return pTop; }
- const_iterator end() const { return (elem*)0; }
- iterator end() { return (elem*)0; }
- const XX & front() const { return pTop->Obj(); }
- XX & front() { return pTop->Obj(); }
- const XX & back() const { return pTail->Obj(); }
- XX & back() { return pTail->Obj(); }
-
- bool empty() const { return pTop == 0; }
- uintt size() const;
-
-
- private:
- // Forbiddden methods.
- SweList(
- const self & i_rList );
- self & operator=(
- const self & i_rList );
-
- // DATA
- DYN elem * pTop;
- elem * pTail;
-};
-
-template <class XX>
-class SweList_dyn
-{
- public:
- // TYPES
- typedef SweList_dyn<XX> self;
- typedef SweListElement< XX* > elem;
- typedef SweListIterator< XX* > iterator;
-
- // LIFECYCLE
- SweList_dyn() : pTop(0), pTail(0) {}
- ~SweList_dyn() { erase_all(); }
- // OPERATIONS
- void push_front(
- XX * i_pObj );
- void push_back(
- XX * i_pObj );
- void pop_front();
- void erase_all();
-
- // INQUIRY
- iterator begin() const { return pTop; }
- iterator end() const { return (elem*)0; }
- XX * front() const { return pTop->Obj(); }
- XX * back() const { return pTail->Obj(); }
-
- bool empty() const { return pTop == 0; }
- uintt size() const;
-
- private:
- // Forbiddden methods.
- SweList_dyn(
- const self & i_rList );
- self & operator=(
- const self & i_rList );
-
- DYN elem * pTop;
- elem * pTail;
-};
-
-
-
-
-template<class XX>
-class SweListIterator
-{
- public:
- typedef SweListIterator<XX> self;
- typedef SweListElement<XX> elem;
-
- SweListIterator(
- elem * i_pElem = 0)
- : pElem(i_pElem) { }
-
- // OPERATORS
- XX & operator*() const { return pElem->Obj(); }
- self & operator++() { if (pElem != 0) pElem = pElem->Next();
- return *this; }
- bool operator==(
- const self & i_rIter ) const
- { return pElem == i_rIter.pElem; }
- bool operator!=(
- const self & i_rIter ) const
- { return pElem != i_rIter.pElem; }
- private:
- friend class SweListCIterator<XX>;
-
- elem * pElem;
-};
-
-template<class XX>
-class SweListCIterator
-{
- public:
- typedef SweListCIterator<XX> self;
- typedef SweListElement<XX> elem;
-
- SweListCIterator(
- const elem * i_pElem = 0)
- : pElem(i_pElem) { }
-
- // OPERATORS
- self & operator=(
- const SweListIterator<XX> &
- i_rIter )
- { pElem = i_rIter.pElem; return *this; }
-
- const XX & operator*() const { return pElem->Obj(); }
- self & operator++() { if (pElem != 0) pElem = pElem->Next();
- return *this; }
- bool operator==(
- const self & i_rIter ) const
- { return pElem == i_rIter.pElem; }
- bool operator!=(
- const self & i_rIter ) const
- { return pElem != i_rIter.pElem; }
- private:
- const elem * pElem;
-};
-
-// Implementierung
-
-template <class XX>
-void
-SweList<XX>::push_front( const XX & i_aObj )
-{
- DYN elem * dpNew = new elem(i_aObj);
- dpNew->SetNext(pTop);
- pTop = dpNew;
- if (pTail == 0)
- pTail = pTop;
-}
-
-template <class XX>
-void
-SweList<XX>::push_back( const XX & i_aObj)
-{
- if (pTail != 0)
- {
- pTail->SetNext(new elem(i_aObj));
- pTail = pTail->Next();
- }
- else
- {
- pTop = pTail = new elem(i_aObj);
- }
-}
-
-template <class XX>
-void
-SweList<XX>::pop_front()
-{
- if (pTop != 0)
- {
- elem * pDel = pTop;
- pTop = pTop->Next();
- delete pDel;
- if (pTop == 0)
- pTail = 0;
- }
-}
-
-template <class XX>
-uintt
-SweList<XX>::size() const
-{
- uintt ret = 0;
- for ( const_iterator iter = begin();
- iter != end();
- ++iter )
- {
- ++ret;
- }
- return ret;
-}
-
-
-template <class XX>
-void
-SweList<XX>::erase_all()
-{
- for (pTail = pTop ; pTop != 0; pTail = pTop)
- {
- pTop = pTop->Next();
- delete pTail;
- }
- pTop = pTail = 0;
-}
-
-
-template <class XX>
-void
-SweList_dyn<XX>::push_front( XX * i_pObj )
-{
- DYN elem * dpNew = new elem(i_pObj);
- dpNew->SetNext(pTop);
- pTop = dpNew;
- if (pTail == 0)
- pTail = pTop;
-}
-
-template <class XX>
-void
-SweList_dyn<XX>::push_back( XX * i_pObj )
-{
- if (pTail != 0)
- {
- pTail->SetNext(new elem(i_pObj));
- pTail = pTail->Next();
- }
- else
- {
- pTop = pTail = new elem(i_pObj);
- }
-}
-
-template <class XX>
-void
-SweList_dyn<XX>::pop_front()
-{
- if (pTop != 0)
- {
- elem * pDel = pTop;
- pTop = pTop->Next();
- if (pDel->Obj() != 0)
- Delete_dyn(pDel->Obj());
- delete pDel;
- if (pTop == 0)
- pTail = 0;
- }
-}
-
-
-template <class XX>
-void
-SweList_dyn<XX>::erase_all()
-{
- for (pTail = pTop ; pTop != 0; pTail = pTop)
- {
- pTop = pTop->Next();
- if (pTail->Obj() != 0)
- {
- delete pTail->Obj();
- }
- delete pTail;
- }
- pTop = pTail = 0;
-}
-
-template <class XX>
-uintt
-SweList_dyn<XX>::size() const
-{
- uintt ret = 0;
- for ( iterator iter = begin();
- iter != end();
- ++iter )
- {
- ++ret;
- }
- return ret;
-}
-
-
-} // namespace csv
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/tpltools.hxx b/cosv/inc/cosv/tpl/tpltools.hxx
deleted file mode 100644
index 5f69a95b..00000000
--- a/cosv/inc/cosv/tpl/tpltools.hxx
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_TPLTOOLS_HXX
-#define CSV_TPLTOOLS_HXX
-
-#include <vector>
-#include <map>
-
-
-
-
-namespace csv
-{
-
-
-template <class COLLECTION>
-inline void erase_container(
- COLLECTION & o_rCollection );
-
-/// Version for std::map
-template <class COLLECTION>
-void erase_map_of_heap_ptrs(
- COLLECTION & o_rCollection );
-
-/// Version for other containers than std::map, with non-pair value_type.
-template <class COLLECTION>
-void erase_container_of_heap_ptrs(
- COLLECTION & o_rCollection );
-
-template <class VECTOR_ELEM>
-void adjust_vector_size(
- std::vector<VECTOR_ELEM> &
- io_rVector,
- uintt i_nSize,
- const VECTOR_ELEM & i_nFill );
-
-
-template <class KEY, class VAL>
-const VAL * find_in_map( /// Usable for all kinds of values
- const std::map< KEY, VAL > &
- i_rMap,
- const KEY & i_rKey );
-
-
-/** @return the value in the map, if it is in there, else 0.
- @precond VAL has to be convertable to "0".
-*/
-template <class KEY, class VAL>
-VAL value_from_map(
- const std::map< KEY, VAL > &
- i_rMap,
- const KEY & i_rKey );
-
-/** @return the value in the map, if it is in there, else i_notFound.
-*/
-template <class KEY, class VAL>
-VAL value_from_map(
- const std::map< KEY, VAL > &
- i_rMap,
- const KEY & i_rKey,
- VAL i_notFound );
-
-template <class COLLECTION, class VALUE>
-bool contains(
- const COLLECTION & i_collection,
- const VALUE & i_value );
-
-// Object oriented for_each:
-template <class COLLECTION, class CLASS, class MEMFUNC>
-void call_for_each(
- const COLLECTION & i_rList,
- CLASS * io_pThis,
- MEMFUNC i_fMethod );
-
-
-
-
-// IMPLEMENTATION
-template <class COLLECTION>
-inline void
-erase_container( COLLECTION & o_rCollection )
-{
- o_rCollection.erase( o_rCollection.begin(),
- o_rCollection.end() );
-}
-
-template <class COLLECTION>
-void
-erase_map_of_heap_ptrs( COLLECTION & o_rCollection )
-{
- typename COLLECTION::iterator itEnd = o_rCollection.end();
- for ( typename COLLECTION::iterator it = o_rCollection.begin();
- it != itEnd;
- ++it )
- {
- delete (*it).second;
- }
-
- o_rCollection.erase( o_rCollection.begin(),
- o_rCollection.end() );
-}
-
-template <class COLLECTION>
-void
-erase_container_of_heap_ptrs( COLLECTION & o_rCollection )
-{
- typename COLLECTION::iterator itEnd = o_rCollection.end();
- for ( typename COLLECTION::iterator it = o_rCollection.begin();
- it != itEnd;
- ++it )
- {
- delete *it;
- }
-
- o_rCollection.erase( o_rCollection.begin(),
- o_rCollection.end() );
-}
-
-template <class VECTOR_ELEM>
-void
-adjust_vector_size( std::vector<VECTOR_ELEM> & io_rVector,
- uintt i_nSize,
- const VECTOR_ELEM & i_nFill )
-{
- if ( io_rVector.size() > i_nSize )
- {
- io_rVector.erase( io_rVector.begin() + i_nSize, io_rVector.end() );
- }
- else
- {
- io_rVector.reserve(i_nSize);
- while ( io_rVector.size() < i_nSize )
- io_rVector.push_back(i_nFill);
- }
-}
-
-
-template <class KEY, class VAL>
-const VAL *
-find_in_map( const std::map< KEY, VAL > & i_rMap,
- const KEY & i_rKey )
-{
- typename std::map< KEY, VAL >::const_iterator
- ret = i_rMap.find(i_rKey);
- return ret != i_rMap.end()
- ? & (*ret).second
- : (const VAL*)0;
-}
-
-template <class KEY, class VAL>
-VAL
-value_from_map( const std::map< KEY, VAL > & i_rMap,
- const KEY & i_rKey )
-{
- typename std::map< KEY, VAL >::const_iterator
- ret = i_rMap.find(i_rKey);
- return ret != i_rMap.end()
- ? (*ret).second
- : VAL(0);
-}
-
-template <class KEY, class VAL>
-VAL
-value_from_map( const std::map< KEY, VAL > & i_rMap,
- const KEY & i_rKey,
- VAL i_notFound )
-{
- typename std::map< KEY, VAL >::const_iterator
- ret = i_rMap.find(i_rKey);
- return ret != i_rMap.end()
- ? (*ret).second
- : i_notFound;
-}
-
-template <class COLLECTION, class VALUE>
-bool
-contains( const COLLECTION & i_collection,
- const VALUE & i_value )
-{
- return std::find(i_collection.begin(), i_collection.end(), i_value)
- !=
- i_collection.end();
-}
-
-template <class COLLECTION, class CLASS, class MEMFUNC>
-void
-call_for_each( const COLLECTION & i_rList,
- CLASS * io_pThis,
- MEMFUNC i_fMethod )
-{
- typename COLLECTION::const_iterator it = i_rList.begin();
- typename COLLECTION::const_iterator itEnd = i_rList.end();
- for ( ; it != itEnd; ++it )
- {
- (io_pThis->*i_fMethod)(*it);
- }
-}
-
-
-
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/tpl/vvector.hxx b/cosv/inc/cosv/tpl/vvector.hxx
deleted file mode 100644
index 1903dce7..00000000
--- a/cosv/inc/cosv/tpl/vvector.hxx
+++ /dev/null
@@ -1,542 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_VVECTOR_HXX
-#define CSV_VVECTOR_HXX
-
-// USED SERVICES
-#include <vector>
-#include <cosv/tpl/tpltools.hxx>
-
-
-
-
-namespace csv
-{
-namespace vvector
-{
-
-
-template <class TYPE>
-struct delete_ptrs
-{
- static void Destruct(
- std::vector< TYPE* > &
- v)
- { csv::erase_container_of_heap_ptrs(v); }
-
- /// @precond ->it is a valid iterator within v
- static void Erase(
- std::vector< TYPE* > &
- v,
- typename std::vector< TYPE* >::iterator
- it2erase )
- { delete *it2erase; v.erase(it2erase); }
-
- /// @precond ->v.size() > 0
- static void PopBack(
- std::vector< TYPE* > &
- v )
- { delete v.back(); v.pop_back(); }
-
- /// @precond ->it is a valid iterator
- static void ReplacePtr(
- typename std::vector< TYPE* >::iterator
- it,
- DYN TYPE * pass_new )
- { delete *it; *it = pass_new; }
-};
-
-
-/** One helper class for the ->csv::VirtualVector.
- Implements a
-*/
-template <class TYPE>
-struct keep_ptrs
-{
- static void Destruct(std::vector< TYPE* > & v)
- {}
-
- static void Erase(
- std::vector< TYPE* > &
- v,
- typename std::vector< TYPE* >::iterator
- it2erase )
- { v.erase(it2erase); }
-
- static void PopBack(
- std::vector< TYPE* > &
- v )
- { v.pop_back(); }
-
- /// @precond ->it is a valid iterator
- static void ReplacePtr(
- typename std::vector< TYPE* >::iterator
- it,
- TYPE * io_new )
- { *it = io_new; }
-};
-
-
-} // namespace vvector
-
-
-
-
-/** Implements a vector of different implementations of a base
- class.
-
- Implementation has to be by pointers to get the polymorphic
- behaviour, however access is by references to the base class.
-
- @tpl XX
- The common base class of vector elements.
-
- @tpl PTRDEL
- Has two possible values:
- vvector::delete_ptrs<XX> Elements have to be on the heap and
- are deleted when removed (default).
- vvector::keep_ptrs<XX> Elements are only referenced and not
- deleted when removed.
-
-*/
-template <class XX, class PTRDEL = vvector::delete_ptrs<XX> >
-class VirtualVector
-{
- public:
- typedef VirtualVector<XX,PTRDEL> self;
- typedef std::vector< DYN XX* > impl_type;
- typedef typename impl_type::size_type size_type;
- typedef std::ptrdiff_t difference_type;
-
- class const_iterator;
- class iterator;
-
- // LIFECYCLE
- VirtualVector();
- explicit VirtualVector(
- int i_size );
- ~VirtualVector();
-
- // OPERATORS
- const XX & operator[](
- size_type i_pos ) const;
- XX & operator[](
- size_type i_pos );
-
- // OPERATIONS
- void push_back(
- DYN XX & i_drElement );
- void pop_back();
-
- iterator insert(
- iterator i_pos,
- DYN XX & i_drElement );
- void erase(
- iterator i_pos );
- void replace(
- iterator i_pos,
- DYN XX & i_drElement );
- void reserve(
- size_type i_size );
-
- // INQUIRY
- bool empty() const;
- size_t size() const;
- const_iterator begin() const;
- const_iterator end() const;
- const XX & front() const;
- const XX & back() const;
-
- // ACCESS
- iterator begin();
- iterator end();
- XX & front();
- XX & back();
-
- private:
- // Forbidden:
- VirtualVector(const VirtualVector&);
- VirtualVector & operator=(const VirtualVector&);
-
- // DATA
- std::vector< DYN XX* >
- aData;
-};
-
-
-
-
-/** Should be usable for all STL algorithms.
- Implements the Random Access Iterator concept.
-*/
-template <class XX, class PTRDEL>
-class VirtualVector<XX,PTRDEL>::
- const_iterator
-
- // This derivation provides type information for the STL
- // It introduces the types "value_type" and "difference_type".
- : public std::iterator<std::random_access_iterator_tag,
- const XX>
-{
- public:
- typedef VirtualVector<XX,PTRDEL> my_container;
- typedef typename my_container::impl_type::const_iterator impl_iterator;
-
- // LIFECYCLE
- const_iterator(
- impl_iterator i_implIter )
- : itImpl(i_implIter) {}
-
-
- /////////// STL ITERATOR CONCEPT IMPLEMENTATION //////////////
-
- // Default Constructible functions:
- const_iterator()
- : itImpl() {}
-
- // Assignable functions:
- // Assignment and copy constructor use the compiler generated versions.
-
- // Equality Comparable functions:
- bool operator==(
- const_iterator i_other ) const
- { return itImpl == i_other.itImpl; }
- bool operator!=(
- const_iterator i_other ) const
- { return itImpl != i_other.itImpl; }
-
- // Trivial Iterator functions:
- const XX & operator*() const
- { return *(*itImpl); }
-
- // Input Iterator functions:
- const_iterator & operator++()
- { ++itImpl; return *this; }
- const_iterator operator++(int)
- { return const_iterator(itImpl++); }
-
- // Bidirectional Iterator functions:
- const_iterator & operator--()
- { --itImpl; return *this; }
- const_iterator operator--(int)
- { return const_iterator(itImpl--); }
-
- // Less Than Comparable functions:
- bool operator<(
- const_iterator i_other ) const
- { return itImpl < i_other.itImpl; }
-
- // Random Access Iterator functions:
- const_iterator & operator+=(
- difference_type i_diff )
- { itImpl += i_diff; return *this; }
- const_iterator operator+(
- difference_type i_diff ) const
- { const_iterator ret(itImpl);
- return ret += i_diff; }
- const_iterator & operator-=(
- difference_type i_diff )
- { itImpl -= i_diff; return *this; }
- const_iterator operator-(
- difference_type i_diff ) const
- { const_iterator ret(itImpl);
- return ret -= i_diff; }
- difference_type operator-(
- const_iterator i_it ) const
- { return itImpl - i_it.itImpl; }
- const XX & operator[](
- difference_type i_index )
- { return *(*itImpl[i_index]); }
-
- //////////////////////////////////////////////////////////////////////////
-
- private:
- friend class VirtualVector<XX,PTRDEL>;
- impl_iterator ImplValue() const { return itImpl; }
-
- // DATA
- impl_iterator itImpl;
-};
-
-
-
-
-/** Should be usable for all STL algorithms.
- Implements the Random Access Iterator concept.
-*/
-template <class XX, class PTRDEL>
-class VirtualVector<XX,PTRDEL>::
- iterator
-
- // This derivation provides type information for the STL
- // It introduces the types "value_type" and "difference_type".
- : public std::iterator<std::random_access_iterator_tag,
- XX>
-{
- public:
- typedef VirtualVector<XX,PTRDEL> my_container;
- typedef typename my_container::impl_type::iterator impl_iterator;
-
- // LIFECYCLE
- iterator(
- impl_iterator i_implIter )
- : itImpl(i_implIter) {}
-
-
- /////////// STL ITERATOR CONCEPT IMPLEMENTATION //////////////
-
- // Default Constructible functions:
- iterator()
- : itImpl() {}
-
- // Assignable functions:
- // Assignment and copy constructor use the compiler generated versions.
-
- // Equality Comparable functions:
- bool operator==(
- iterator i_other ) const
- { return itImpl == i_other.itImpl; }
- bool operator!=(
- iterator i_other ) const
- { return itImpl != i_other.itImpl; }
-
- // Trivial Iterator functions:
- XX & operator*() const
- { return *(*itImpl); }
-
- // Input Iterator functions:
- iterator & operator++()
- { ++itImpl; return *this; }
- iterator operator++(int)
- { return iterator(itImpl++); }
-
- // Bidirectional Iterator functions:
- iterator & operator--()
- { --itImpl; return *this; }
- iterator operator--(int)
- { return iterator(itImpl--); }
-
- // Less Than Comparable functions:
- bool operator<(
- iterator i_other ) const
- { return itImpl < i_other.itImpl; }
-
- // Random Access Iterator functions:
- iterator & operator+=(
- difference_type i_diff )
- { itImpl += i_diff; return *this; }
- iterator operator+(
- difference_type i_diff ) const
- { iterator ret(itImpl);
- return ret += i_diff; }
- iterator & operator-=(
- difference_type i_diff )
- { itImpl -= i_diff; return *this; }
- iterator operator-(
- difference_type i_diff ) const
- { iterator ret(itImpl);
- return ret -= i_diff; }
- difference_type operator-(
- iterator i_it ) const
- { return itImpl - i_it.itImpl; }
- XX & operator[](
- difference_type i_index )
- { return *(*itImpl[i_index]); }
-
- //////////////////////////////////////////////////////////////////////////
-
- private:
- friend class VirtualVector<XX,PTRDEL>;
- impl_iterator ImplValue() const { return itImpl; }
-
- // DATA
- impl_iterator itImpl;
-};
-
-
-
-
-// IMPLEMENTATION
-template <class XX, class PTRDEL>
-inline
-VirtualVector<XX,PTRDEL>::VirtualVector()
- : aData()
-{
-}
-
-template <class XX, class PTRDEL>
-inline
-VirtualVector<XX,PTRDEL>::VirtualVector(int i_size)
- : aData(i_size, 0)
-{
-}
-
-template <class XX, class PTRDEL>
-inline
-VirtualVector<XX,PTRDEL>::~VirtualVector()
-{
- PTRDEL::Destruct(aData);
-}
-
-template <class XX, class PTRDEL>
-inline const XX &
-VirtualVector<XX,PTRDEL>::operator[]( size_type i_pos ) const
-{
- return *aData[i_pos];
-}
-
-template <class XX, class PTRDEL>
-inline XX &
-VirtualVector<XX,PTRDEL>::operator[]( size_type i_pos )
-{
- return *aData[i_pos];
-}
-
-template <class XX, class PTRDEL>
-inline void
-VirtualVector<XX,PTRDEL>::push_back( DYN XX & i_drElement )
-{
- aData.push_back(&i_drElement);
-}
-
-template <class XX, class PTRDEL>
-inline void
-VirtualVector<XX,PTRDEL>::pop_back()
-{
- if (NOT aData.empty())
- PTRDEL::PopBack(aData);
-}
-
-template <class XX, class PTRDEL>
-inline typename VirtualVector<XX,PTRDEL>::iterator
-VirtualVector<XX,PTRDEL>::insert( iterator i_pos,
- DYN XX & i_drElement )
-{
- return iterator(aData.insert(i_pos.ImplValue(), &i_drElement));
-}
-
-template <class XX, class PTRDEL>
-inline void
-VirtualVector<XX,PTRDEL>::erase( iterator i_pos )
-{
- PTRDEL::Erase(aData, i_pos.ImplValue());
-}
-
-template <class XX, class PTRDEL>
-inline void
-VirtualVector<XX,PTRDEL>::replace( iterator i_pos,
- DYN XX & i_drElement )
-{
- PTRDEL::ReplacePtr(*i_pos, &i_drElement);
-}
-
-template <class XX, class PTRDEL>
-inline void
-VirtualVector<XX,PTRDEL>::reserve( size_type i_size )
-{
- aData.reserve(i_size);
-}
-
-template <class XX, class PTRDEL>
-inline bool
-VirtualVector<XX,PTRDEL>::empty() const
-{
- return aData.empty();
-}
-
-template <class XX, class PTRDEL>
-inline size_t
-VirtualVector<XX,PTRDEL>::size() const
-{
- return aData.size();
-}
-
-template <class XX, class PTRDEL>
-inline typename VirtualVector<XX,PTRDEL>::const_iterator
-VirtualVector<XX,PTRDEL>::begin() const
-{
- return const_iterator(aData.begin());
-}
-
-template <class XX, class PTRDEL>
-inline typename VirtualVector<XX,PTRDEL>::const_iterator
-VirtualVector<XX,PTRDEL>::end() const
-{
- return const_iterator(aData.end());
-}
-
-template <class XX, class PTRDEL>
-inline const XX &
-VirtualVector<XX,PTRDEL>::front() const
-{
- return *aData.front();
-}
-
-template <class XX, class PTRDEL>
-inline const XX &
-VirtualVector<XX,PTRDEL>::back() const
-{
- return *aData.back();
-}
-
-template <class XX, class PTRDEL>
-inline typename VirtualVector<XX,PTRDEL>::iterator
-VirtualVector<XX,PTRDEL>::begin()
-{
- return iterator(aData.begin());
-}
-
-template <class XX, class PTRDEL>
-inline typename VirtualVector<XX,PTRDEL>::iterator
-VirtualVector<XX,PTRDEL>::end()
-{
- return iterator(aData.end());
-}
-
-template <class XX, class PTRDEL>
-inline XX &
-VirtualVector<XX,PTRDEL>::front()
-{
- return *aData.front();
-}
-
-template <class XX, class PTRDEL>
-inline XX &
-VirtualVector<XX,PTRDEL>::back()
-{
- return *aData.back();
-}
-
-
-
-
-} // namespace csv
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/inc/cosv/x.hxx b/cosv/inc/cosv/x.hxx
deleted file mode 100644
index e5002d36..00000000
--- a/cosv/inc/cosv/x.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_X_HXX
-#define CSV_X_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/string.hxx>
- // PARAMETERS
-#include <cosv/csv_ostream.hxx>
-
-
-namespace csv
-{
-
-class Exception
-{
- public:
- virtual ~Exception() {}
- virtual void GetInfo(
- ostream & o_rOutputMedium ) const = 0;
-};
-
-
-class X_Default : public Exception
-{
- public:
- X_Default(
- const char * i_sMessage )
- : sMessage(i_sMessage) {}
- virtual void GetInfo( // Implemented in comfunc.cxx
- ostream & o_rOutputMedium ) const;
- private:
- String sMessage;
-};
-
-
-} // namespace csv
-
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/prj/build.lst b/cosv/prj/build.lst
deleted file mode 100644
index 2ffd4588..00000000
--- a/cosv/prj/build.lst
+++ /dev/null
@@ -1,16 +0,0 @@
-#====================================================================================
-cs cosv : soltools NULL
-cs cosv usr1 - all cs_mkout NULL
-cs cosv\prj get - all cs_prj NULL
-cs cosv\inc get - all cs_inc NULL
-cs cosv\inc\cosv get - all cs_inc_cosv NULL
-cs cosv\inc\cosv\template get - all cs_inc_templ NULL
-cs cosv\source get - all cs_src NULL
-cs cosv\source\inc get - all cs_src_inc NULL
-cs cosv\source\service nmake - all cs_serv NULL
-cs cosv\source\storage nmake - all cs_store NULL
-cs cosv\source\strings nmake - all cs_string NULL
-cs cosv\source\comphelp nmake - all cs_badcast NULL
-cs cosv\util nmake - all cs_util cs_serv cs_store cs_string cs_badcast NULL
-#==============================================================================================
-
diff --git a/cosv/prj/d.lst b/cosv/prj/d.lst
deleted file mode 100644
index 496506b8..00000000
--- a/cosv/prj/d.lst
+++ /dev/null
@@ -1,8 +0,0 @@
-mkdir: %_DEST%\inc\cosv
-mkdir: %_DEST%\inc\cosv\tpl
-
-..\%__SRC%\lib\cosv.lib %_DEST%\lib\cosv.lib
-..\%__SRC%\lib\libcosv.a %_DEST%\lib\libcosv.a
-..\inc\cosv\*.hxx %_DEST%\inc\cosv\*.hxx
-..\inc\cosv\*.h %_DEST%\inc\cosv\*.h
-..\inc\cosv\tpl\*.hxx %_DEST%\inc\cosv\tpl\*.hxx
diff --git a/cosv/source/comphelp/badcast.cxx b/cosv/source/comphelp/badcast.cxx
deleted file mode 100644
index 429671e3..00000000
--- a/cosv/source/comphelp/badcast.cxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 this for instantiating bad-cast,
- due to problems with WNT-STL-headers.
-*/
-
-#if defined(WNT) && !defined(__MINGW32__)
-
-#define _NTSDK
-#include<typeinfo>
-
-_STD_BEGIN
-bad_cast G_Dummy_Inst_bad_cast;
-_STD_END
-#endif // WNT
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/comphelp/makefile.mk b/cosv/source/comphelp/makefile.mk
deleted file mode 100644
index 7c8fac8f..00000000
--- a/cosv/source/comphelp/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=cosv
-TARGET=cosv_badcast_wnt
-TARGETTYPE=CUI
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-
-.INCLUDE : settings.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/badcast.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-
-
diff --git a/cosv/source/fullcpp.mk b/cosv/source/fullcpp.mk
deleted file mode 100644
index 3103f635..00000000
--- a/cosv/source/fullcpp.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-
-
-# --- Settings -----------------------------------------------------
-# Has to be inlcuded AFTER settings.mk !
-
-
-.IF "$(COM)"=="MSC"
-
-# RTTI
-CFLAGS+= -GR
-
-.IF "$(NP_LOCALBUILD)"!=""
-
-# Precompiled Headers
-PCH_NAME= cosv
-.IF "$(DBG_LEVEL)"<"2"
-CFLAGS+= -YX"precomp.h" /Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pch
-.ELSE
-CFLAGS+= -YX"precomp.h" /Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pcd -DNP_LOCALBUILD
-.ENDIF
-
-.ENDIF
-
-.ENDIF
-
-.IF "$(COM)"=="GCC"
-# RTTI
-CFLAGSCXX+= -frtti
-.ENDIF
diff --git a/cosv/source/inc/precomp.h b/cosv/source/inc/precomp.h
deleted file mode 100644
index e1c5e0d4..00000000
--- a/cosv/source/inc/precomp.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSV_PRECOMP_H
-#define CSV_PRECOMP_H
-
-
-#include <cosv/csv_precomp.h>
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/service/comdline.cxx b/cosv/source/service/comdline.cxx
deleted file mode 100644
index 00393c46..00000000
--- a/cosv/source/service/comdline.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/comdline.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace csv
-{
-
-
-bool
-CommandLine_Ifc::CheckParameters() const
-{
- if ( NOT inq_CheckParameters() )
- {
- PrintUse();
- return false;
- }
-
- return true;
-}
-
-
-
-
-} // namespace csv
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/service/comfunc.cxx b/cosv/source/service/comfunc.cxx
deleted file mode 100644
index a7b09be6..00000000
--- a/cosv/source/service/comfunc.cxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-
-#include <ctype.h>
-#include <cosv/comfunc.hxx>
-#include <cosv/string.hxx>
-#include <cosv/x.hxx>
-#include <cosv/std_outp.hxx>
-
-
-
-namespace csv
-{
-
-
-void
-X_Default::GetInfo( ostream & o_rOutputMedium ) const
-{
- o_rOutputMedium << "Error (general exception): ";
- o_rOutputMedium << sMessage
- << Endl;
-}
-
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/service/csv_ostream.cxx b/cosv/source/service/csv_ostream.cxx
deleted file mode 100644
index 27fd4904..00000000
--- a/cosv/source/service/csv_ostream.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/csv_ostream.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-#ifndef CSV_NO_IOSTREAMS
-#else
-
-#include <cosv/streamstr.hxx>
-
-namespace csv
-{
-
-ostream::~ostream() { }
-
-ostream & ostream::operator<<(
- const char * i_s ) { *pData << i_s; return *this; }
-ostream & ostream::operator<<(
- char i_c ) { *pData << i_c; return *this; }
-ostream & ostream::operator<<(
- unsigned char i_c ) { *pData << i_c; return *this; }
-ostream & ostream::operator<<(
- signed char i_c ) { *pData << i_c; return *this; }
-
-ostream & ostream::operator<<(
- short i_n ) { *pData << i_n; return *this; }
-ostream & ostream::operator<<(
- unsigned short i_n ) { *pData << i_n; return *this; }
-ostream & ostream::operator<<(
- int i_n ) { *pData << i_n; return *this; }
-ostream & ostream::operator<<(
- unsigned int i_n ) { *pData << i_n; return *this; }
-ostream & ostream::operator<<(
- long i_n ) { *pData << i_n; return *this; }
-ostream & ostream::operator<<(
- unsigned long i_n ) { *pData << i_n; return *this; }
-
-ostream & ostream::operator<<(
- float i_n ) { *pData << i_n; return *this; }
-ostream & ostream::operator<<(
- double i_n ) { *pData << i_n; return *this; }
-
-ostream &
-ostream::seekp( intt i_nOffset,
- seek_dir i_eStart )
-{
- pData->seekp(i_nOffset, csv::seek_dir(int(i_eStart)) );
- return *this;
-}
-
-ostream::ostream( uintt i_nStartSize )
- : pData( new StreamStr(i_nStartSize) )
-{
-}
-
-
-
-} // namespace csv
-
-#endif
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/service/makefile.mk b/cosv/source/service/makefile.mk
deleted file mode 100644
index fecfb635..00000000
--- a/cosv/source/service/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=cosv
-TARGET=cosv_service
-
-ENABLE_EXCEPTIONS=true
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.INCLUDE : $(PRJ)$/source$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/comdline.obj \
- $(OBJ)$/comfunc.obj \
- $(OBJ)$/csv_ostream.obj \
- $(OBJ)$/std_outp.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/cosv/source/service/std_outp.cxx b/cosv/source/service/std_outp.cxx
deleted file mode 100644
index 18bc34bc..00000000
--- a/cosv/source/service/std_outp.cxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/std_outp.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <stdlib.h>
-
-
-namespace csv
-{
-
-#ifdef CSV_NO_IOSTREAMS
-redirect_out * redirect_out::pStdOut_ = 0;
-redirect_out * redirect_out::pStdErr_ = 0;
-#endif // defined(CSV_NO_IOSTREAMS)
-
-
-void
-Endl( ostream & io_rStream, bool /*bUseRedirect*/, int* )
-{
-#ifndef CSV_NO_IOSTREAMS
-// if (NOT bUseRedirect)
- io_rStream << std::endl;
-// else
-#endif
-// static_cast< redirect_out& >(io_rStream).re_endl();
-}
-
-void
-Flush( ostream & io_rStream, bool /*bUseRedirect*/, int* )
-{
-#ifndef CSV_NO_IOSTREAMS
-// if (NOT bUseRedirect)
- io_rStream << std::flush;
-// else
-#endif
-// static_cast< redirect_out& >(io_rStream).re_flush();
-}
-
-void
-PerformAssertion(const char * condition, const char * file, unsigned line)
-{
- Cout() << "assertion failed: "
- << condition
- << " in file: "
- << file
- << " at line: "
- << line
- << Endl;
-
- exit(3);
-}
-
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/dirchain.cxx b/cosv/source/storage/dirchain.cxx
deleted file mode 100644
index fadc1bfc..00000000
--- a/cosv/source/storage/dirchain.cxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/dirchain.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/bstream.hxx>
-
-
-
-
-namespace csv
-{
-namespace ploc
-{
-
-
-DirectoryChain::DirectoryChain()
-{
-}
-
-DirectoryChain::~DirectoryChain()
-{
-}
-
-void
-DirectoryChain::Set( const char * i_sSubPath,
- bool i_bPathIsAlwaysDir,
- const char * i_sDelimiter )
-{
- csv_assert(i_sDelimiter != 0);
- if (i_sSubPath == 0)
- return;
-
- const char * pRestPath = i_sSubPath;
- if (*pRestPath == *i_sDelimiter)
- ++pRestPath;
-
- for ( const char * pDirEnd = strchr(pRestPath,*i_sDelimiter);
- pDirEnd != 0;
- pDirEnd = strchr(pRestPath,*i_sDelimiter) )
- {
- aPath.push_back( String(pRestPath, pDirEnd) );
- pRestPath = pDirEnd + 1;
- }
- if (*pRestPath != 0 AND i_bPathIsAlwaysDir)
- aPath.push_back( String(pRestPath) );
-}
-
-void
-DirectoryChain::PushBack( const String & i_sName )
-{
- aPath.push_back(i_sName);
-}
-
-void
-DirectoryChain::PushBack( const DirectoryChain & i_sPath )
-{
- aPath.insert( aPath.end(), i_sPath.Begin(), i_sPath.End() );
-}
-
-void
-DirectoryChain::PopBack( uintt i_nCount )
-{
- if (i_nCount <= aPath.size())
- aPath.erase( aPath.end() - i_nCount, aPath.end() );
- else
- aPath.erase( aPath.begin(), aPath.end() );
-}
-
-void
-DirectoryChain::Get( bostream & o_rPath,
- const char * i_sDelimiter ) const
-{
- uintt deliLen = strlen(i_sDelimiter);
-
- for ( std::vector<String>::const_iterator it = aPath.begin();
- it != aPath.end();
- ++it )
- {
- o_rPath.write( (*it).c_str() );
- o_rPath.write( i_sDelimiter, deliLen);
- }
-}
-
-
-
-
-} // namespace ploc
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/file.cxx b/cosv/source/storage/file.cxx
deleted file mode 100644
index c871fd74..00000000
--- a/cosv/source/storage/file.cxx
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/file.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace csv
-{
-
-
-File::File( const ploc::Path & i_rLocation,
- uintt i_nMode )
- : aPath(i_rLocation),
- pStream(0),
- nMode(i_nMode),
- eLastIO(io_none)
-{
-}
-
-File::File( const char * i_sLocation,
- uintt i_nMode )
- : aPath(i_sLocation),
- pStream(0),
- nMode(i_nMode),
- eLastIO(io_none)
-{
-}
-
-File::File( const String & i_sLocation,
- uintt i_nMode )
- : aPath(i_sLocation),
- pStream(0),
- nMode(i_nMode),
- eLastIO(io_none)
-{
-}
-
-File::~File()
-{
- if ( inq_is_open() )
- close();
-}
-
-uintt
-File::do_read( void * out_pDest,
- uintt i_nNrofBytes )
-{
- if ( NOT inq_is_open() )
- return 0;
-
- if ( eLastIO == io_write )
- ::fseek( pStream, 0, SEEK_CUR );
- uintt ret = position();
- int iRet= ::fread( out_pDest, 1, i_nNrofBytes, pStream );
- if ( iRet < 0 ) {
- fprintf(stderr, "warning: read failed in %s line %d \n", __FILE__, __LINE__);
- }
- ret = position() - ret;
-
- eLastIO = io_read;
- return ret;
-}
-
-bool
-File::inq_eod() const
-{
- if ( NOT inq_is_open() )
- return true;
- return feof(pStream) != 0;
-}
-
-uintt
-File::do_write( const void * i_pSrc,
- uintt i_nNrofBytes )
-{
- if ( NOT inq_is_open() )
- return 0;
-
- if ( eLastIO == io_write )
- ::fseek( pStream, 0, SEEK_CUR );
- uintt ret = position();
- ::fwrite( i_pSrc, 1, i_nNrofBytes, pStream );
- ret = position() - ret;
-
- eLastIO = io_write;
- return ret;
-}
-
-uintt
-File::do_seek( intt i_nDistance,
- seek_dir i_eStartPoint )
-{
- if ( NOT inq_is_open() )
- return uintt(-1);
-
- static int eSearchDir[3] = { SEEK_SET, SEEK_CUR, SEEK_END };
-
- ::fseek( pStream,
- intt(i_nDistance),
- eSearchDir[i_eStartPoint] );
- return position();
-}
-
-uintt
-File::inq_position() const
-{
- if ( inq_is_open() )
- return uintt( ::ftell(pStream) );
- else
- return uintt(-1);
-}
-
-bool
-File::do_open( uintt i_nOpenMode )
-{
- if ( inq_is_open() )
- {
- if ( i_nOpenMode == 0 OR i_nOpenMode == nMode )
- return true;
- close();
- }
-
- if ( i_nOpenMode != 0 )
- nMode = i_nOpenMode;
-
- const char * sFacadeMode = "";
- switch ( nMode )
- {
- case CFM_RW: sFacadeMode = "r+b";
- break;
- case CFM_CREATE: sFacadeMode = "w+b";
- break;
- case CFM_READ: sFacadeMode = "rb";
- break;
- default:
- sFacadeMode = "rb";
- }
-
- pStream = ::fopen( StrPath(), sFacadeMode );
- if ( pStream == 0 AND nMode == CFM_RW )
- {
- sFacadeMode = "w+b";
- pStream = ::fopen( StrPath(), sFacadeMode );
- }
-
- return pStream != 0;
-}
-
-void
-File::do_close()
-{
- if ( inq_is_open() )
- {
- ::fclose(pStream);
- pStream = 0;
- }
- eLastIO = io_none;
-}
-
-bool
-File::inq_is_open() const
-{
- return pStream != 0;
-}
-
-const ploc::Path &
-File::inq_MyPath() const
-{
- return aPath;
-}
-
-
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/makefile.mk b/cosv/source/storage/makefile.mk
deleted file mode 100644
index 4d285867..00000000
--- a/cosv/source/storage/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=cosv
-TARGET=cosv_storage
-
-ENABLE_EXCEPTIONS=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/fullcpp.mk
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/dirchain.obj \
- $(OBJ)$/file.obj \
- $(OBJ)$/persist.obj \
- $(OBJ)$/ploc.obj \
- $(OBJ)$/ploc_dir.obj \
- $(OBJ)$/plocroot.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/cosv/source/storage/persist.cxx b/cosv/source/storage/persist.cxx
deleted file mode 100644
index 9fcbfa8c..00000000
--- a/cosv/source/storage/persist.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/persist.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/streamstr.hxx>
-#include <cosv/ploc.hxx>
-
-
-#ifdef WNT
-#include <io.h>
-
-namespace csv
-{
-namespace ploc
-{
-
-bool
-Persistent::Exists() const
-{
- return access( StrPath(), 00) == 0;
-}
-
-} // namespace ploc
-} // namespace csv
-
-
-#elif defined(UNX)
-#include <unistd.h>
-
-/*
-#ifndef __SUNPRO_CC
-#include <unistd.h>
-#else
-#define F_OK 0 // Test for existence of File
-extern int access(const char *, int);
-#endif
-*/
-
-namespace csv
-{
-namespace ploc
-{
-
-bool
-Persistent::Exists() const
-{
- return access( StrPath(), F_OK ) == 0;
-}
-
-
-} // namespace ploc
-} // namespace csv
-
-#else
-#error For using csv::ploc there has to be defined: WNT or UNX.
-#endif
-
-namespace csv
-{
-namespace ploc
-{
-
-const char *
-Persistent::StrPath() const
-{
- if (sPath.empty() )
- {
-#ifndef CSV_NO_MUTABLE
- StreamStr & rsPath = sPath;
-#else
- StreamStr & rsPath = const_cast< StreamStr& >(sPath);
-#endif
- rsPath.seekp(0);
- rsPath << MyPath();
- if (MyPath().IsDirectory())
- rsPath.pop_back(1); // Remove closing delimiter.
- }
- return sPath.c_str();
-}
-
-} // namespace ploc
-} // namespace csv
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/ploc.cxx b/cosv/source/storage/ploc.cxx
deleted file mode 100644
index d97d6714..00000000
--- a/cosv/source/storage/ploc.cxx
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/ploc.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/bstream.hxx>
-
-
-
-
-namespace csv
-{
-namespace ploc
-{
-
-
-Path::Path( const char * i_sPath,
- bool i_bPathIsAlwaysDir,
- const char * i_sDelimiter )
- : pRoot(0)
- // aPath,
- // sFile
-{
- Set(i_sPath, i_bPathIsAlwaysDir, i_sDelimiter );
-}
-
-Path::Path( const Path & i_rPath )
- : pRoot(i_rPath.pRoot->CreateCopy()),
- aPath(i_rPath.aPath),
- sFile(i_rPath.sFile)
-{
-}
-
-Path::~Path()
-{
-}
-
-Path &
-Path::operator=( const Path & i_rPath )
-{
- pRoot = i_rPath.pRoot->CreateCopy();
- aPath = i_rPath.aPath;
- sFile = i_rPath.sFile;
- return *this;
-}
-
-
-void
-Path::Set( const char * i_sPath,
- bool i_bPathIsAlwaysDir,
- const char * i_sDelimiter )
-{
- if ( *i_sDelimiter != '\\' AND *i_sDelimiter != '/' )
- return;
-
- const char *
- restPath = 0;
- pRoot = Root::Create_( restPath, i_sPath, i_sDelimiter );
- if (restPath == 0)
- return;
-
- aPath.Set(restPath, i_bPathIsAlwaysDir, i_sDelimiter);
-
- if (NOT i_bPathIsAlwaysDir)
- {
- const char *
- file = strrchr( restPath, *i_sDelimiter );
- if (file == 0)
- file = restPath;
- else
- file++;
- sFile = file;
- }
-}
-
-void
-Path::SetFile( const String & i_sName )
-{
- sFile = i_sName;
-}
-
-bool
-Path::IsValid() const
-{
- return RootDir().OwnDelimiter() != 0;
-}
-
-void
-Path::Get( bostream & o_rPath ) const
-{
- if (NOT IsValid())
- return;
-
- pRoot->Get( o_rPath );
- aPath.Get( o_rPath, pRoot->OwnDelimiter() );
-
- if ( sFile.length() > 0 )
- o_rPath.write( sFile );
-}
-
-} // namespace ploc
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/ploc_dir.cxx b/cosv/source/storage/ploc_dir.cxx
deleted file mode 100644
index e2d76081..00000000
--- a/cosv/source/storage/ploc_dir.cxx
+++ /dev/null
@@ -1,361 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/ploc_dir.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/ploc.hxx>
-
-
-namespace csv
-{
-namespace ploc
-{
-
-Directory::Directory()
-{
-}
-
-Directory::Directory( const Path & i_rPath )
- : aPath(i_rPath)
- // sPath
-{
-}
-
-Directory::Directory( const Directory & i_rDir )
- : Persistent(), aPath(i_rDir.aPath)
- // sPath
-{
-}
-
-Directory::Directory( const char * i_rLocation )
- : aPath(i_rLocation, true)
-{
-}
-
-Directory::~Directory()
-{
-}
-
-Directory &
-Directory::operator+=( const String & i_sName )
-{
- InvalidatePath();
- aPath.DirChain() += i_sName;
- return *this;
-}
-
-Directory &
-Directory::operator+=( const DirectoryChain & i_sDirChain )
-{
- InvalidatePath();
- aPath.DirChain() += i_sDirChain;
- return *this;
-}
-
-Directory &
-Directory::operator-=( uintt i_nLevels )
-{
- InvalidatePath();
- aPath.DirChain().PopBack(i_nLevels);
- return *this;
-}
-
-bool
-Directory::PhysicalCreate( bool i_bCreateParentsIfNecessary ) const
-{
- bool ret = PhysicalCreate_Dir( StrPath() );
- if ( ret OR NOT i_bCreateParentsIfNecessary )
- return ret;
-
- ret = Check_Parent();
- if (ret)
- ret = PhysicalCreate_Dir( StrPath() );
- return ret;
-}
-
-bool
-Directory::Check_Parent() const
-{
- // There is no parent of root directories:
- if ( aPath.DirChain().Size() == 0 )
- return false;
-
- // Become my own parent:
- String sLastToken = aPath.DirChain().Back();
- const_cast< Directory* >(this)->operator-=(1);
-
- // Begin behaving as parent:
- bool ret = Exists();
- if (NOT ret)
- {
- ret = Check_Parent();
- if (ret)
- ret = PhysicalCreate_Dir( StrPath() );
- }
- // End behaving as parent.
-
- // Become myself again:
- const_cast< Directory* >(this)->operator+=(sLastToken);
- return ret;
-}
-
-} // namespace ploc
-} // namespace csv
-
-
-#ifdef WNT
-#include <direct.h>
-#include <io.h>
-
-namespace csv
-{
-namespace ploc
-{
-
-bool
-Directory::PhysicalCreate_Dir( const char * i_sStr ) const
-{
- return mkdir( i_sStr ) == 0;
-}
-
-void
-Directory::GetContainedDirectories( StringVector & o_rResult ) const
-{
- const char * c_sANYDIR = "\\*.*";
- String sNew;
-
- StreamStr sFilter(200);
- sFilter << StrPath()
- << c_sANYDIR;
-
- struct _finddata_t
- aEntry;
- long hFile = _findfirst( sFilter.c_str(), &aEntry );
-
- for ( int bFindMore = (hFile == -1 ? 1 : 0);
- bFindMore == 0;
- bFindMore = _findnext( hFile, &aEntry ) )
- {
- if ( (aEntry.attrib & _A_SUBDIR) AND *aEntry.name != '.' )
- {
- sNew = aEntry.name;
- o_rResult.push_back( sNew );
- }
- } // end for
- _findclose(hFile);
-}
-
-void
-Directory::GetContainedFiles( StringVector & o_rResult,
- const char * i_sFilter,
- E_Recursivity i_eRecursivity ) const
-{
- StreamStr sNew(240);
- sNew << aPath;
- StreamStr::size_type
- nStartFilename = sNew.tellp();
-
- StreamStr sFilter(200);
- sFilter << StrPath()
- << "\\"
- << i_sFilter;
-
- struct _finddata_t
- aEntry;
- long hFile = _findfirst( sFilter.c_str(), &aEntry );
- for ( int bFindMore = (hFile == -1 ? 1 : 0);
- bFindMore == 0;
- bFindMore = _findnext( hFile, &aEntry ) )
- {
- sNew.seekp(nStartFilename);
- sNew << aEntry.name;
- String sNewAsString( sNew.c_str() );
- o_rResult.push_back(sNewAsString);
- } // end for
-
- _findclose(hFile);
- if ( i_eRecursivity == flat )
- return;
-
- // gathering from subdirectories:
- StringVector aSubDirectories;
- GetContainedDirectories( aSubDirectories );
-
- StringVector::const_iterator dEnd = aSubDirectories.end();
- for ( StringVector::const_iterator d = aSubDirectories.begin();
- d != dEnd;
- ++d )
- {
- Directory aSub(*this);
- aSub += *d;
- aSub.GetContainedFiles( o_rResult,
- i_sFilter,
- i_eRecursivity );
- }
-}
-
-} // namespace ploc
-} // namespace csv
-
-
-#elif defined(UNX)
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
-namespace csv
-{
-namespace ploc
-{
-
-bool
-Directory::PhysicalCreate_Dir( const char * i_sStr ) const
-{
- return mkdir( i_sStr, 00777 ) == 0;
-}
-
-void
-Directory::GetContainedDirectories( StringVector & o_rResult ) const
-{
- StreamStr sNew(240);
- sNew << aPath;
- StreamStr::size_type
- nStartFilename = sNew.tellp();
-
- DIR * pDir = opendir( StrPath() );
- dirent * pEntry = 0;
- struct stat aEntryStatus;
-
- while ( (pEntry = readdir(pDir)) != 0 )
- {
- sNew.seekp(nStartFilename);
- sNew << pEntry->d_name;
-
- stat(sNew.c_str(), &aEntryStatus);
- if ( (aEntryStatus.st_mode & S_IFDIR) == S_IFDIR
- AND *pEntry->d_name != '.' )
- {
- String sNew2(pEntry->d_name);
- o_rResult.push_back(sNew2);
- } // endif (aEntry.attrib == _A_SUBDIR)
- } // end while
- closedir( pDir );
-}
-
-void
-Directory::GetContainedFiles( StringVector & o_rResult,
- const char * i_sFilter,
- E_Recursivity i_eRecursivity ) const
-{
- StreamStr sNew(240);
- sNew << aPath;
- StreamStr::size_type
- nStartFilename = sNew.tellp();
-
- bool bUseFilter = strcmp( i_sFilter, "*.*" ) != 0
- AND strncmp( i_sFilter, "*.", 2) == 0;
-
- DIR * pDir = opendir( StrPath() );
- dirent * pEntry = 0;
- struct stat aEntryStatus;
-
- while ( (pEntry = readdir(pDir)) != 0 )
- {
- sNew.seekp(nStartFilename);
- sNew << pEntry->d_name;
-
- stat(sNew.c_str(), &aEntryStatus);
- if ( (aEntryStatus.st_mode & S_IFDIR) == S_IFDIR )
- continue; // Don't gather directories.
-
- if ( bUseFilter )
- {
- const char * pEnding = strrchr(pEntry->d_name,'.');
- if (pEnding == 0)
- continue;
- if ( strcasecmp( pEnding + 1, i_sFilter + 2 ) != 0 )
- continue;
- }
-
- sNew.seekp(nStartFilename);
- sNew << pEntry->d_name;
- String sNewAsString( sNew.c_str() );
- o_rResult.push_back(sNewAsString);
- } // end while
-
- closedir( pDir );
- if ( i_eRecursivity == flat )
- return;
-
- // gathering from subdirectories:
- StringVector aSubDirectories;
- GetContainedDirectories( aSubDirectories );
-
- StringVector::const_iterator dEnd = aSubDirectories.end();
- for ( StringVector::const_iterator d = aSubDirectories.begin();
- d != dEnd;
- ++d )
- {
- Directory aSub(*this);
- aSub += *d;
- aSub.GetContainedFiles( o_rResult,
- i_sFilter,
- i_eRecursivity );
- }
-}
-
-} // namespace ploc
-} // namespace csv
-
-
-#else
-#error For using csv::ploc there has to be defined: WNT or UNX.
-#endif
-
-
-namespace csv
-{
-namespace ploc
-{
-
-const Path &
-Directory::inq_MyPath() const
-{
- return aPath;
-}
-
-
-
-} // namespace ploc
-} // namespace csv
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/storage/plocroot.cxx b/cosv/source/storage/plocroot.cxx
deleted file mode 100644
index c2ae0a6f..00000000
--- a/cosv/source/storage/plocroot.cxx
+++ /dev/null
@@ -1,527 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/ploc.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ctype.h>
-#include <cosv/bstream.hxx>
-#include <cosv/csv_ostream.hxx>
-
-
-namespace csv
-{
-namespace ploc
-{
-
-
-class UnixRootDir : public Root
-{
- public:
- UnixRootDir();
-
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
-};
-
-class WorkingDir : public Root
-{
- public:
- WorkingDir(
- const char * i_sDelimiter = Delimiter() );
-
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
- private:
- String sOwnDelimiter;
-};
-
-class WinRootDir : public Root
-{
- public:
- WinRootDir();
-
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
-};
-
-class WinDrive : public Root
-{
- public:
- WinDrive(
- char i_cDrive );
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
- private:
- char cDrive;
-};
-
-class WinDriveRootDir : public Root
-{
- public:
- WinDriveRootDir(
- const char * i_sPath );
- WinDriveRootDir(
- char i_cDrive );
-
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
- private:
- char cDrive;
-};
-
-class UNCRoot : public Root
-{
- public:
- UNCRoot(
- const char * i_sPath );
- UNCRoot(
- const String & i_sComputer,
- const String & i_sEntryPt );
-
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
- private:
- String sComputer;
- String sEntryPt;
-};
-
-class InvalidRoot : public Root
-{
- public:
- virtual void Get(
- ostream & o_rPath ) const;
- virtual void Get(
- bostream & o_rPath ) const;
- virtual DYN Root * CreateCopy() const;
- virtual const char *
- OwnDelimiter() const;
-};
-
-
-DYN Root *
-Create_WindowsRoot( const char * & o_sPathAfterRoot,
- const char * i_sPath )
-{
- if (i_sPath[0] == '\\')
- {
- if (i_sPath[1] == '\\')
- { // UNC path name
- o_sPathAfterRoot = strchr(i_sPath+2,'\\');
- if (o_sPathAfterRoot != 0)
- {
- o_sPathAfterRoot = strchr(o_sPathAfterRoot+1,'\\');
- if (o_sPathAfterRoot != 0)
- ++o_sPathAfterRoot;
- return new UNCRoot(i_sPath);
- }
- return new InvalidRoot; // Incomplete UNC root.
- }
- else
- {
- o_sPathAfterRoot = i_sPath+1;
- return new WinRootDir;
- }
- }
- else if (i_sPath[1] == ':')
- {
- if ( i_sPath[2] == '\\')
- {
- o_sPathAfterRoot = i_sPath + 3;
- return new WinDriveRootDir(i_sPath);
- }
- else
- {
- o_sPathAfterRoot = i_sPath + 2;
- return new WinDrive(*i_sPath);
- }
- }
- else
- {
- o_sPathAfterRoot = i_sPath;
- return new WorkingDir("\\");
- }
-}
-
-DYN Root *
-Create_UnixRoot( const char * & o_sPathAfterRoot,
- const char * i_sPath )
-{
- if (*i_sPath == '/')
- {
- o_sPathAfterRoot = i_sPath + 1;
- return new UnixRootDir;
- }
- else //
- {
- o_sPathAfterRoot = i_sPath;
- return new WorkingDir("/");
- } // endif
-}
-
-
-//********************** Root ****************************//
-
-Root::~Root()
-{
-
-}
-
-DYN Root *
-Root::Create_( const char * & o_sPathAfterRoot,
- const char * i_sPath,
- const char * i_sDelimiter )
-{
- if (i_sPath[0] == '.')
- {
- switch ( i_sPath[1] )
- {
- case '\0': o_sPathAfterRoot = i_sPath + 1;
- break;
- case '\\': o_sPathAfterRoot = i_sPath + 2;
- break;
- case '/': o_sPathAfterRoot = i_sPath + 2;
- break;
- case '.': o_sPathAfterRoot = i_sPath;
- break;
- default:
- o_sPathAfterRoot = 0;
- return new InvalidRoot;
- } // end switch (i_sPath[1])
-
- return new WorkingDir;
- } // end if (i_sPath[0] == '.')
-
- switch (*i_sDelimiter)
- {
- case '\\': return Create_WindowsRoot(o_sPathAfterRoot, i_sPath);
- case '/': return Create_UnixRoot(o_sPathAfterRoot, i_sPath);
- }
-
- o_sPathAfterRoot = 0;
- return new InvalidRoot;
-}
-
-
-
-//********************** UnixRootDir ****************************//
-
-
-UnixRootDir::UnixRootDir()
-{
-}
-
-void
-UnixRootDir::Get( ostream & o_rPath ) const
-{
- o_rPath << '/';
-}
-
-void
-UnixRootDir::Get( bostream & o_rPath ) const
-{
- o_rPath.write( "/", 1 );
-}
-
-DYN Root *
-UnixRootDir::CreateCopy() const
-{
- return new UnixRootDir;
-}
-
-const char *
-UnixRootDir::OwnDelimiter() const
-{
- return "/";
-}
-
-
-//********************** WorkingDir ****************************//
-
-WorkingDir::WorkingDir( const char * i_sDelimiter )
- : sOwnDelimiter(i_sDelimiter)
-{
-}
-
-void
-WorkingDir::Get( ostream & o_rPath ) const
-{
- o_rPath << '.' << sOwnDelimiter;
-}
-
-void
-WorkingDir::Get( bostream & o_rPath ) const
-{
- o_rPath.write( ".", 1 );
- o_rPath.write( sOwnDelimiter );
-}
-
-DYN Root *
-WorkingDir::CreateCopy() const
-{
- return new WorkingDir(sOwnDelimiter);
-}
-
-const char *
-WorkingDir::OwnDelimiter() const
-{
- return sOwnDelimiter;
-}
-
-
-//********************** WinRootDir ****************************//
-
-WinRootDir::WinRootDir()
-{
-}
-
-void
-WinRootDir::Get( ostream & o_rPath ) const
-{
- o_rPath << '\\';
-}
-
-void
-WinRootDir::Get( bostream & o_rPath ) const
-{
- o_rPath.write( "\\", 1 );
-}
-
-DYN Root *
-WinRootDir::CreateCopy() const
-{
- return new WinRootDir;
-}
-
-const char *
-WinRootDir::OwnDelimiter() const
-{
- return "\\";
-}
-
-
-//********************** WinDrive ****************************//
-
-WinDrive::WinDrive( char i_cDrive )
- : cDrive(static_cast< char >(toupper(i_cDrive)))
-{
-}
-
-void
-WinDrive::Get( ostream & o_rPath ) const
-{
- o_rPath << cDrive << ':';
-}
-
-void
-WinDrive::Get( bostream & o_rPath ) const
-{
- static char buf_[3] = " :";
- buf_[0] = cDrive;
- o_rPath.write( &buf_[0], 2 );
-}
-
-DYN Root *
-WinDrive::CreateCopy() const
-{
- return new WinDrive(cDrive);
-}
-
-const char *
-WinDrive::OwnDelimiter() const
-{
- return "\\";
-}
-
-
-//********************** WinDriveRootDir ****************************//
-
-WinDriveRootDir::WinDriveRootDir( const char * i_sPath )
- : cDrive(static_cast< char >(toupper(*i_sPath)))
-{
- if ( 'A' > cDrive OR 'Z' < cDrive )
- cDrive = 0;
-}
-
-WinDriveRootDir::WinDriveRootDir( char i_cDrive )
- : cDrive(i_cDrive)
-{
-}
-
-void
-WinDriveRootDir::Get( ostream & o_rPath ) const
-{
- o_rPath << cDrive << ":\\";
-}
-
-void
-WinDriveRootDir::Get( bostream & o_rPath ) const
-{
- static char buf_[4] = " :\\";
- buf_[0] = cDrive;
- o_rPath.write( &buf_[0], 3 );
-}
-
-DYN Root *
-WinDriveRootDir::CreateCopy() const
-{
- return new WinDriveRootDir(cDrive);
-}
-
-const char *
-WinDriveRootDir::OwnDelimiter() const
-{
- return "\\";
-}
-
-
-//********************** UNCRoot ****************************//
-
-UNCRoot::UNCRoot( const char * i_sPath )
-// : // sComputer,
- // sEntryPt
-{
- const char * pRestPath = i_sPath + 2;
- const char * pDirEnd = strchr(pRestPath, '\\');
- csv_assert(pDirEnd != 0);
-
- sComputer = String(pRestPath, pDirEnd - pRestPath);
- pRestPath = pDirEnd+1;
- pDirEnd = strchr(pRestPath, '\\');
-
- if ( pDirEnd != 0 )
- {
- sEntryPt = String(pRestPath, pDirEnd - pRestPath);
- }
- else
- {
- sEntryPt = pRestPath;
- }
-}
-
-UNCRoot::UNCRoot( const String & i_sComputer,
- const String & i_sEntryPt )
- : sComputer(i_sComputer),
- sEntryPt(i_sEntryPt)
-{
-}
-
-void
-UNCRoot::Get( ostream & o_rPath ) const
-{
- o_rPath << "\\\\" << sComputer << '\\' << sEntryPt << "\\";
-}
-
-void
-UNCRoot::Get( bostream & o_rPath ) const
-{
- o_rPath.write( "\\\\", 2 );
- o_rPath.write( sComputer );
- o_rPath.write( "\\", 1 );
- o_rPath.write( sEntryPt );
- o_rPath.write( "\\", 1 );
-}
-
-DYN Root *
-UNCRoot::CreateCopy() const
-{
- return new UNCRoot(sComputer,sEntryPt);
-}
-
-const char *
-UNCRoot::OwnDelimiter() const
-{
- return "\\";
-}
-
-
-
-//********************** InvalidRoot ****************************//
-
-void
-InvalidRoot::Get( ostream & ) const
-{
-}
-
-void
-InvalidRoot::Get( bostream & ) const
-{
-}
-
-DYN Root *
-InvalidRoot::CreateCopy() const
-{
- return new InvalidRoot;
-}
-
-const char *
-InvalidRoot::OwnDelimiter() const
-{
- return 0;
-}
-
-
-
-
-} // namespace ploc
-} // namespace csv
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/strings/makefile.mk b/cosv/source/strings/makefile.mk
deleted file mode 100644
index 2bd9bab1..00000000
--- a/cosv/source/strings/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=cosv
-TARGET=cosv_strings
-
-ENABLE_EXCEPTIONS=true
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.INCLUDE : $(PRJ)$/source$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/str_types.obj \
- $(OBJ)$/streamstr.obj \
- $(OBJ)$/string.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/cosv/source/strings/str_types.cxx b/cosv/source/strings/str_types.cxx
deleted file mode 100644
index 386dac63..00000000
--- a/cosv/source/strings/str_types.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/str_types.hxx>
-
-
-
-namespace csv
-{
-
-CharOrder_Table::CharOrder_Table( const int * i_pCharWeightsArray )
-{
- memcpy( cWeights, i_pCharWeightsArray, 256 * sizeof(int) );
-}
-
-
-} // namespace csv
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
deleted file mode 100644
index d3ad03da..00000000
--- a/cosv/source/strings/streamstr.cxx
+++ /dev/null
@@ -1,659 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/streamstr.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <string.h>
-#include <stdio.h>
-#include <stdarg.h> // both are needed to satisfy all compilers
-#include <cstdarg> // std::va_list and friends
-
-#include <cosv/comfunc.hxx>
-#include <cosv/tpl/swelist.hxx>
-
-
-
-namespace csv
-{
-
-
-// Maximal sizes of resulting integers in text form:
-const uintt C_short_max_size = sizeof(short) * 3;
-const uintt C_int_max_size = sizeof(int) * 3;
-const uintt C_long_max_size = sizeof(long) * 3;
-
-
-inline void
-StreamStr::Advance(size_type i_nAddedSize)
-{ pCur += i_nAddedSize; }
-
-
-
-StreamStr::StreamStr( size_type i_nCapacity )
- : bostream(),
- nCapacity1( i_nCapacity + 1 ),
- dpData( new char [i_nCapacity + 1] ),
- pEnd(dpData),
- pCur(dpData),
- eMode(str::overwrite)
-{
- *pEnd = '\0';
-}
-
-StreamStr::StreamStr( const char * i_sInitStr,
- size_type i_nCapacity )
- : bostream(),
- nCapacity1(0),
- dpData(0),
- pEnd(0),
- pCur(0),
- eMode(str::overwrite)
-{
- size_type nLength = strlen(i_sInitStr);
- nCapacity1 = csv::max(nLength, i_nCapacity) + 1;
- dpData = new char [nCapacity1];
- strcpy(dpData, i_sInitStr); // SAFE STRCPY (#100211# - checked)
- pCur = dpData + nLength;
- pEnd = pCur;
-}
-
-StreamStr::StreamStr( const self & i_rOther )
- : bostream(),
- nCapacity1( i_rOther.nCapacity1 ),
- dpData( new char [i_rOther.nCapacity1] ),
- pEnd( dpData + strlen(i_rOther.dpData) ),
- pCur( dpData + i_rOther.tellp() ),
- eMode(i_rOther.eMode)
-{
- strcpy( dpData, i_rOther.dpData ); // SAFE STRCPY (#100211# - checked)
-}
-
-StreamStr::~StreamStr()
-{
- delete [] dpData;
-}
-
-
-StreamStr &
-StreamStr::operator=( const self & i_rOther )
-{
- delete [] dpData;
-
- nCapacity1 = i_rOther.nCapacity1;
- dpData = new char [i_rOther.nCapacity1];
- pEnd = dpData + strlen(i_rOther.dpData);
- strcpy( dpData, i_rOther.dpData ); // SAFE STRCPY (#100211# - checked)
- pCur = dpData + i_rOther.tellp();
- eMode = i_rOther.eMode;
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( const char * i_s )
-{
- size_type nLength = strlen(i_s);
-
- ProvideAddingSize( nLength );
- memcpy( pCur, i_s, nLength );
- Advance(nLength);
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( const String & i_s )
-{
- size_type nLength = i_s.length();
-
- ProvideAddingSize( nLength );
- memcpy( pCur, i_s.c_str(), nLength );
- Advance(nLength);
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( char i_c )
-{
- ProvideAddingSize( 1 );
- *pCur = i_c;
- Advance(1);
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( unsigned char i_c )
-{
- return operator<<( char(i_c) );
-}
-
-StreamStr &
-StreamStr::operator<<( signed char i_c )
-{
- return operator<<( char(i_c) );
-}
-
-StreamStr &
-StreamStr::operator<<( short i_n )
-{
- char buf[C_short_max_size] = "";
- sprintf( buf, "%hi", i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( unsigned short i_n )
-{
- char buf[C_short_max_size] = "";
- sprintf( buf, "%hu", i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( int i_n )
-{
- char buf[C_int_max_size] = "";
- sprintf( buf, "%i", i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( unsigned int i_n )
-{
- char buf[C_int_max_size] = "";
- sprintf( buf, "%u", i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( long i_n )
-{
- char buf[C_long_max_size] = "";
- sprintf( buf, "%li", i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( unsigned long i_n )
-{
- char buf[C_long_max_size] = "";
- sprintf( buf, "%lu", i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( float i_n )
-{
- const int C_float_max_size = 20;
- char buf[C_float_max_size] = "";
- sprintf( buf, "%.*g", C_float_max_size-8, i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator<<( double i_n )
-{
- const int C_double_max_size = 30;
- char buf[C_double_max_size] = "";
- sprintf( buf, "%.*lg", C_double_max_size-8, i_n ); // SAFE SPRINTF (#100211# - checked)
-
- size_type nLength = strlen(buf);
- ProvideAddingSize( nLength );
- memcpy( pCur, buf, nLength );
- Advance( nLength );
-
- return *this;
-}
-
-const char &
-StreamStr::operator[]( position_type i_nPosition ) const
-{
- static const char aNull_ = '\0';
-
- if ( position_type(pEnd - dpData) > i_nPosition )
- return dpData[i_nPosition];
- return aNull_;
-}
-
-char &
-StreamStr::operator[]( position_type i_nPosition )
-{
- static char aDummy_ = '\0';
-
- if ( position_type(pEnd - dpData) > i_nPosition )
- return dpData[i_nPosition];
- return aDummy_;
-}
-
-void
-StreamStr::resize( size_type i_nMinimumCapacity )
-{
- if ( i_nMinimumCapacity <= capacity() )
- return;
-
- Resize(i_nMinimumCapacity);
-}
-
-StreamStr &
-StreamStr::seekp( seek_type i_nCount,
- seek_dir i_eDirection )
-{
- seek_type nLength = seek_type( length() );
- seek_type nNewPos = tellp();
-
- switch ( i_eDirection )
- {
- case ::csv::beg: nNewPos = i_nCount;
- break;
- case ::csv::cur: nNewPos += i_nCount;
- break;
- case ::csv::end: nNewPos = nLength + i_nCount;
- break;
- }
-
- if ( in_range<seek_type>(0, nNewPos, nLength + 1) )
- {
- pCur = dpData + nNewPos;
- if (eMode == str::overwrite)
- {
- pEnd = pCur;
- *pEnd = '\0';
- }
- }
-
- return *this;
-}
-
-StreamStr &
-StreamStr::set_insert_mode( insert_mode i_eMode )
-{
- eMode = i_eMode;
- return *this;
-}
-
-void
-StreamStr::pop_front( size_type i_nCount )
-{
- size_type nCount = min(i_nCount, length());
-
- MoveData( dpData + nCount, pEnd, -(seek_type(nCount)) );
-
- pCur -= nCount;
- pEnd -= nCount;
- *pEnd = '\0';
-}
-
-void
-StreamStr::pop_back( size_type i_nCount )
-{
- size_type nCount = min(i_nCount, length());
- pEnd -= nCount;
- if (pCur > pEnd)
- pCur = pEnd;
- *pEnd = '\0';
-}
-
-StreamStr &
-StreamStr::operator_join( std::vector<String>::const_iterator i_rBegin,
- std::vector<String>::const_iterator i_rEnd,
- const char * i_sLink )
-{
- std::vector<String>::const_iterator it = i_rBegin;
- if ( it != i_rEnd )
- {
- operator<<(*it);
- for ( ++it; it != i_rEnd; ++it )
- {
- operator<<(i_sLink);
- operator<<(*it);
- }
- }
- return *this;
-}
-
-StreamStr &
-StreamStr::operator_add_substr( const char * i_sText,
- size_type i_nLength )
-{
- size_type nLength = csv::min<size_type>(i_nLength, strlen(i_sText));
-
- ProvideAddingSize( nLength );
- memcpy( pCur, i_sText, nLength );
- Advance(nLength);
-
- return *this;
-}
-
-StreamStr &
-StreamStr::operator_add_token( const char * i_sText,
- char i_cDelimiter )
-{
- const char * pTokenEnd = strchr(i_sText, i_cDelimiter);
- if (pTokenEnd == 0)
- operator<<(i_sText);
- else
- operator_add_substr(i_sText, pTokenEnd-i_sText);
- return *this;
-}
-
-StreamStr &
-StreamStr::operator_read_line( bstream & i_src )
-{
- char c = 0;
- intt nCount = 0;
- for ( nCount = i_src.read(&c, 1);
- nCount == 1 AND c != 13 AND c != 10;
- nCount = i_src.read(&c, 1) )
- {
- operator<<(c);
- }
-
- bool bEndOfStream = nCount == 0;
- // Check for line-end:
- if ( NOT bEndOfStream AND c != 0 )
- {
- char oldc = c;
- if (i_src.read(&c, 1) == 1)
- {
- if ( (c != 13 AND c != 10) OR c == oldc)
- i_src.seek(-1,::csv::cur);
- }
- }
- return *this;
-}
-
-void
-StreamStr::strip_front_whitespace()
-{
- const_iterator it = begin();
- for ( ;
- it != end() ? *it < 33 : false;
- ++it ) ;
- pop_front(it - begin());
-}
-
-void
-StreamStr::strip_back_whitespace()
-{
- const_iterator it = end();
- for ( ;
- it != begin() ? *(it-1) < 33 : false;
- --it ) ;
- pop_back(end() - it);
-}
-
-void
-StreamStr::strip_frontback_whitespace()
-{
- strip_front_whitespace();
- strip_back_whitespace();
-}
-
-void
-StreamStr::replace_all( char i_cCarToSearch,
- char i_cReplacement )
-{
- for ( char * p = dpData; p != pEnd; ++p )
- {
- if (*p == i_cCarToSearch)
- *p = i_cReplacement;
- }
-}
-
-StreamStr &
-StreamStr::to_upper( position_type i_nStart,
- size_type i_nLength )
-{
- static char cUpper[128] =
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123,124,125,126,127 };
-
- if ( i_nStart < length() )
- {
- char * pStop = i_nStart + i_nLength < length()
- ? dpData + i_nStart + i_nLength
- : pEnd;
- for ( char * pChange = dpData + i_nStart;
- pChange != pStop;
- ++pChange )
- {
- *pChange = (static_cast< unsigned char >(*pChange) & 0x80) == 0
- ? cUpper[ UINT8(*pChange) ]
- : *pChange;
- }
- }
- return *this;
-}
-
-class StreamStrPool
-{
- public:
- StreamStrPool();
- ~StreamStrPool();
- private:
- // Non-copyable
- StreamStrPool(StreamStrPool &); // not defined
- void operator =(StreamStrPool &); // not defined
-
- // Interface to:
- friend class StreamStrLock;
- static StreamStr & AcquireFromPool_(
- uintt i_nMinimalSize );
- static void ReleaseToPool_(
- DYN StreamStr * let_dpUsedStr );
-
- // DATA
- SweList< DYN StreamStr* >
- aPool;
-};
-
-StreamStrPool::StreamStrPool()
-{
-}
-
-StreamStrPool::~StreamStrPool()
-{
- for ( SweList< DYN StreamStr* >::iterator it = aPool.begin();
- it != aPool.end();
- ++it )
- {
- delete (*it);
- }
-}
-
-namespace
-{
- static StreamStrPool aPool_;
-}
-
-
-StreamStr &
-StreamStrPool::AcquireFromPool_( uintt i_nMinimalSize )
-{
- if ( aPool_.aPool.empty() )
- {
- return *new StreamStr(i_nMinimalSize);
- }
-
- StreamStr & ret = *aPool_.aPool.front();
- aPool_.aPool.pop_front();
- ret.resize(i_nMinimalSize);
- ret.seekp(0);
- ret.set_insert_mode(str::overwrite);
- return ret;
-}
-
-void
-StreamStrPool::ReleaseToPool_( DYN StreamStr * let_dpUsedStr )
-{
- aPool_.aPool.push_back( let_dpUsedStr );
-}
-
-StreamStrLock::StreamStrLock( uintt i_nMinimalSize )
- : pStr( &StreamStrPool::AcquireFromPool_(i_nMinimalSize) )
-{
-}
-
-StreamStrLock::~StreamStrLock()
-{
- StreamStrPool::ReleaseToPool_(pStr);
-}
-
-
-UINT32
-StreamStr::do_write( const void * i_pSrc,
- UINT32 i_nNrofBytes )
-{
- ProvideAddingSize( i_nNrofBytes );
- memcpy( pCur, i_pSrc, i_nNrofBytes );
- Advance(i_nNrofBytes);
-
- return i_nNrofBytes;
-}
-
-void
-StreamStr::ProvideAddingSize( size_type i_nSize2Add )
-{
- size_type nLength = length();
- if ( capacity() - nLength < i_nSize2Add )
- Resize( nLength + i_nSize2Add );
-
- pEnd += i_nSize2Add;
- *pEnd = '\0';
-
- if (eMode == str::insert AND pCur != pEnd)
- {
- MoveData( pCur, pCur + i_nSize2Add, seek_type(i_nSize2Add) );
- }
-}
-
-void
-StreamStr::Resize( size_type i_nMinimumCapacity )
-{
- size_type nNewSize = nCapacity1 < 128
- ? nCapacity1 << 1
- : (nCapacity1 << 1) - (nCapacity1 >> 1);
- nCapacity1 = csv::max( nNewSize, size_type(i_nMinimumCapacity + 1) );
-
- char * pNew = new char[nCapacity1];
- strcpy ( pNew, dpData ); // SAFE STRCPY (#100211# - checked)
- pEnd = pNew + (pEnd - dpData);
- pCur = pNew + (pCur - dpData);
-
- delete [] dpData;
- dpData = pNew;
-}
-
-void
-StreamStr::MoveData( char * i_pStart,
- char * i_pEnd,
- seek_type i_nDiff )
-{
- if (i_nDiff > 0)
- {
- register const char * pSrc = i_pEnd;
- register char * pDest = i_pEnd + i_nDiff;
- for ( ; pSrc != i_pStart; --pSrc, --pDest )
- {
- *pDest = *pSrc;
- }
- *pDest = *pSrc;
- }
- else if (i_nDiff < 0)
- {
- const char * pSrc = i_pStart;
- char * pDest = i_pStart + i_nDiff;
- for ( ; pSrc != i_pEnd; ++pSrc, ++pDest )
- {
- *pDest = *pSrc;
- }
- }
-}
-
-// Does nothing, only the name of this function is needed.
-void
-c_str()
-{
- // Does nothing.
-}
-
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/strings/string.cxx b/cosv/source/strings/string.cxx
deleted file mode 100644
index a7e11271..00000000
--- a/cosv/source/strings/string.cxx
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/string.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <string.h>
-#include <cosv/comfunc.hxx>
-
-
-
-
-namespace csv
-{
-
-
-inline const char *
-str_from_StringOffset( const String & i_rStr,
- str::size i_nOffset )
-{
- return i_nOffset < i_rStr.size()
- ? i_rStr.c_str() + i_nOffset
- : "";
-}
-
-inline const char *
-str_from_ptr( const char * i_str )
-{
-
- return valid_str(i_str);
-}
-
-
-//********************* String::S_Data **********************//
-
-inline String::
-S_Data::S_Data()
- : nCount(1)
-{
-}
-
-String::
-S_Data::S_Data( const char * i_sData,
- size_type i_nValidLength )
- : aStr( str_from_ptr(i_sData),
- (i_nValidLength != str::maxsize
- ? i_nValidLength
- : strlen(i_sData)) ),
- nCount(1)
-{
-}
-
-String::
-S_Data::~S_Data()
-{
- csv_assert( nCount == 0 );
-}
-
-const String::S_Data *
-String::
-S_Data::Acquire() const
-{
-#ifdef CSV_NO_MUTABLE
- ++ (const_cast< uintt& >(nCount));
-#else
- ++nCount;
-#endif
- return this;
-}
-
-void
-String::
-S_Data::Release() const
-{
-#ifdef CSV_NO_MUTABLE
- -- (const_cast< uintt& >(nCount));
-#else
- --nCount;
-#endif
- if (nCount == 0)
- delete (const_cast< S_Data* >(this));
-}
-
-
-//************************** String **************************//
-
-
-String::String()
- : pd( String::Null_().pd->Acquire() )
-{
-}
-
-String::String( const char * i_str )
- : pd( new S_Data(i_str) )
-{
-}
-
-String::String( const char * i_str,
- size_type i_nLength )
- : pd( new S_Data(i_str, i_nLength) )
-{
-}
-
-String::String( const_iterator i_itBegin,
- const_iterator i_itEnd )
- : pd( new S_Data(i_itBegin, size_type(i_itEnd - i_itBegin)) )
-{
-}
-
-String::String( const self & i_rStr )
- : pd( i_rStr.pd->Acquire() )
-{
-}
-
-String::~String()
-{
- pd->Release();
-}
-
-
-String &
-String::operator=( const self & i_rStr )
-{
- i_rStr.pd->Acquire();
- pd->Release();
- pd = i_rStr.pd;
-
- return *this;
-}
-
-String &
-String::operator=( const char * i_str )
-{
- const S_Data *
- pTemp = new S_Data(i_str);
- pd->Release();
- pd = pTemp;
-
- return *this;
-}
-
-void
-String::assign( const char * i_str,
- size_type i_nLength )
-{
- const S_Data *
- pTemp = new S_Data( i_str, i_nLength );
- pd->Release();
- pd = pTemp;
-}
-
-int
-String::compare( const self & i_rStr ) const
-{
- return strcmp( c_str(), i_rStr.c_str() );
-}
-
-int
-String::compare( const CharOrder_Table & i_rOrder,
- const self & i_rStr ) const
-{
- return csv::compare( i_rOrder, c_str(), i_rStr.c_str() );
-}
-
-const String &
-String::Null_()
-{
- // Must not use the default constructor! Because that one calls
- // this function, which would create a circular dependency.
- static const String aNull_("");
- return aNull_;
-}
-
-const char &
-String::Nulch_()
-{
- static const char cNull_ = '\0';
- return cNull_;
-}
-
-
-int
-compare( const String & i_s1,
- csv::str::position i_nStartPosition1,
- const char * i_s2,
- csv::str::size i_nLength )
-{
- const char * pS1 = str_from_StringOffset( i_s1, i_nStartPosition1 );
-
- if ( i_nLength != csv::str::maxsize )
- return strncmp( pS1,
- i_s2,
- i_nLength );
- else
- return strcmp( pS1,
- i_s2 );
-}
-
-int
-compare( const CharOrder_Table & i_rOrder,
- const char * i_s1,
- const char * i_s2 )
-{
- const char * it1 = i_s1;
- const char * it2 = i_s2;
- for ( ; i_rOrder(*it1) == i_rOrder(*it2) AND *it1 != '\0'; ++it1, ++it2 )
- {}
- return int( i_rOrder(*it1) - i_rOrder(*it2) );
-}
-
-} // namespace csv
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/unittest/file_ut.cxx b/cosv/source/unittest/file_ut.cxx
deleted file mode 100644
index 0a8c6e17..00000000
--- a/cosv/source/unittest/file_ut.cxx
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/file.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ut.hxx>
-
-using csv::File;
-
-
-/** @file
- UnitTests for class File.
-*/
-
-FUT_DECL( File, Read );
-FUT_DECL( File, Write );
-FUT_DECL( File, Seek );
-FUT_DECL( File, SeekBack );
-FUT_DECL( File, SeekRelative );
-
-
-bool
-classtest_File()
-{
- csv::File aFile( "bigfile.txt", csv::CFM_RW, 0 );
- csv::File & rFile = aFile;
-
- rFile.Open();
-
- bool ret = ftest_Read( rFile );
- ret = ftest_Write( rFile ) AND ret;
- ret = ftest_SeekBack( rFile ) AND ret;
- ret = ftest_SeekRelative( rFile ) AND ret;
-
- rFile.Close();
-
- return ret;
-}
-
-
-
-FUT_DECL( File, Read )
-{
- bool ret = true;
-
- rFile.SeekBack(0);
- uintt nSourceSize = rFile.Position();
- rFile.Seek(0);
-
- char * pBuf = new char[nSourceSize+1];
- uintt nCount = rFile.Read(pBuf,nSourceSize);
-
- UT_CHECK( Read, nCount == nSourceSize );
-
- return ret;
-}
-
-FUT_DECL( File, Write )
-{
- bool ret = true;
-
-
-
- return ret;
-}
-
-FUT_DECL( File, Seek )
-{
- bool ret = true;
-
-
-
- return ret;
-}
-
-FUT_DECL( File, SeekBack )
-{
- bool ret = true;
-
-
-
- return ret;
-}
-
-FUT_DECL( File, SeekRelative )
-{
- bool ret = true;
-
-
-
- return ret;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/unittest/makefile.mk b/cosv/source/unittest/makefile.mk
deleted file mode 100644
index c7367613..00000000
--- a/cosv/source/unittest/makefile.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=cosv
-TARGET=cosv_unittest
-TARGETTYPE=CUI
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-.INCLUDE : settings.mk
-.INCLUDE : static.mk
-
-.INCLUDE : $(PRJ)$/source$/fullcpp.mk
-
-
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/file_ut.obj \
- $(OBJ)$/simplestring_ut.obj
-
-
-
-
-APP1TARGET= $(TARGET)
-APP1STACK= 1000000
-APP1OBJS= $(OBJ)$/ut_main.obj
-
-
-APP1LIBS= $(LB)$/$(TARGET).lib $(LB)$/cosv.lib
-
-
-APP1DEPN= $(LB)$/$(TARGET).lib $(LB)$/cosv.lib
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/cosv/source/unittest/string_ut.cxx b/cosv/source/unittest/string_ut.cxx
deleted file mode 100644
index d00e6067..00000000
--- a/cosv/source/unittest/string_ut.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <cosv/string.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <ut.hxx>
-
-using csv::SimpleString;
-
-
-/** @file
- UnitTests for class String.
-*/
-
-inline bool
-check_value( const String & a, const char * b )
-{
- return strcmp( a.c_str(), b ) == 0;
-}
-
-
-bool
-classtest_String( csv::SimpleString & rSimpleString )
-{
- bool ret = true;
-
- String x1;
- UT_CHECK( String(), check_value(x1,"") )
-
- const char * s2a = "";
- String x2a(s2a);
- UT_CHECK( String(const char*), check_value(x2a,s2a) )
-
- const char * s2b = "_zluoadninger prrg chiäßi(/%$##@\\\"'''fh kl";
- String x2b(s2b);
- UT_CHECK( String(const char*), check_value(x2b,s2b) )
-
-
- bool ret = ftest_Read( rSimpleString );
- ret = ftest_Write( rSimpleString ) AND ret;
- ret = ftest_SeekBack( rSimpleString ) AND ret;
- ret = ftest_SeekRelative( rSimpleString ) AND ret;
-
- rSimpleString.Close();
-
- return ret;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/unittest/ut.hxx b/cosv/source/unittest/ut.hxx
deleted file mode 100644
index 45982af8..00000000
--- a/cosv/source/unittest/ut.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 COSV_UNITTEST_UT_HXX
-#define COSV_UNITTEST_UT_HXX
-
-
-#define UT_CHECK( fname, cond ) \
- if ( NOT (cond) ) { std::cerr << "ftest_" << #fname << " " << #cond << endl; \
- ret = false; }
-
-#define CUT_DECL( nsp, cname ) \
- bool classtest_##cname()
-#define FUT_DECL( cname, fname ) \
- bool ftest_##fname( cname & r##cname )
-
-#define UT_RESULT( result ) \
- if (result ) std::cout << "All unit tests passed successfully." << std::endl; \
- else std::cout << "Errors in unit tests.\n" << std::endl
-
-
-
-CUT_DECL( csv, File );
-CUT_DECL( csv, String );
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/source/unittest/ut_main.cxx b/cosv/source/unittest/ut_main.cxx
deleted file mode 100644
index a448708f..00000000
--- a/cosv/source/unittest/ut_main.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-
-#include <cosv/file.hxx>
-#include <cosv/simplestring.hxx>
-#include "ut.hxx"
-
-
-
-int _cdecl
-main(int argc, char * argv[])
-{
- bool ret = classtest_File();
- ret = classtest_SimpleString AND ret;
-
- UT_RESULT( ret );
-
- return 0;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cosv/util/makefile.mk b/cosv/util/makefile.mk
deleted file mode 100644
index 71788e66..00000000
--- a/cosv/util/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=cosv
-TARGET=cosv
-
-ENABLE_EXCEPTIONS=true
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-
-# --- Files --------------------------------------------------------
-
-LIB1FILES= \
- $(LB)$/cosv_service.lib \
- $(LB)$/cosv_storage.lib \
- $(LB)$/cosv_strings.lib \
- $(LB)$/cosv_badcast_wnt.lib
-
-
-# --- Targets ------------------------------------------------------
-
-LIB1TARGET= $(LB)$/$(TARGET).lib
-LIB1ARCHIV= $(LB)$/lib$(TARGET).a
-
-
-.INCLUDE : target.mk
-
-
diff --git a/odk/cfgWin.js b/odk/cfgWin.js
deleted file mode 100644
index 961f15ae..00000000
--- a/odk/cfgWin.js
+++ /dev/null
@@ -1,971 +0,0 @@
-// This script asks for variables, which are necessary for building the
-// examples of the Office Development Kit. The script duplicates the template
-// script and inserts the variables into the copied script.
-// The Script was developed for the operating systems Microsoft Windows.
-var regKeyOfficeCurrentUser = "HKEY_CURRENT_USER\\Software\\LibreOffice\\UNO\\InstallPath\\";
-var regKeyOfficeLocaleMachine = "HKEY_LOCAL_MACHINE\\Software\\LibreOffice\\UNO\\InstallPath\\";
-var regKeyDotNetInstallRoot = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\InstallRoot";
-var regKeyDotNet1_1 = "HKLM\\Software\\Microsoft\\.NETFramework\\policy\\v1.1\\4322";
-var sDirDotNet1_1 = "v1.1.4322";
-var regKeyDotNet2_0 = "HKLM\\Software\\Microsoft\\.NETFramework\\Policy\\v2.0\\50727";
-var sDirDotNet2_0 = "v2.0.50727";
-
-var regKeyJDK = "HKLM\\Software\\JavaSoft\\Java Development Kit\\";
-//var regKeyVC70 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir";
-//var regKeyVC71 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir";
-var regKeyVC90 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
-
-//var regKeyVCExpress80 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir";
-var regKeyVCExpress90 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
-
-var regKeyWindowsSDK = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\CurrentInstallFolder";
-
-var WshShell = WScript.CreateObject("WScript.Shell");
-var WshSysEnv = WshShell.Environment("process");
-var aFileSystemObject = new ActiveXObject("Scripting.FileSystemObject");
-var stdin = WScript.StdIn;
-var stdout = WScript.StdOut;
-
-stdout.WriteLine("\n" +
-" *** Configure your SDK environment ***\n\n" +
-" NOTE: This script is working only for Windows 2000, Windows XP or newer versions!\n");
-
-var oo_sdk_name=WshSysEnv("OO_SDK_NAME");
-var oo_sdk_home=getSdkHome();
-var oo_user_sdk_dir=WshSysEnv("APPDATA") + "\\" + oo_sdk_name;
-var oo_user_sdk_env_script=oo_user_sdk_dir + "\\setsdkenv_windows.bat";
-
-var office_home=getOfficeHome();
-var office_base_home=getOfficeBaseHome();
-var oo_sdk_ure_home=getUreHome();
-
-var oo_sdk_make_home=getMakeHome();
-var oo_sdk_zip_home=getZipHome();
-var oo_sdk_manifest_used="";
-var oo_sdk_windowssdk="";
-var oo_sdk_cpp_home=getCppHome();
-var oo_sdk_cli_home=getCliHome();
-var oo_sdk_java_home=getJavaHome();
-var oo_sdk_out=getOutputDir();
-var sdk_auto_deployment=getAutoDeployment();
-
-writeBatFile(oo_user_sdk_dir, oo_user_sdk_env_script);
-
-stdout.Write(
- "\n ******************************************************************\n" +
- " * ... \"" + oo_user_sdk_env_script + "\"\n" +
- " * batch file has been prepared.\n" +
- " * This batch file will be used in the future to prepare your\n" +
- " * personal configured SDK environment.\n" +
- " ******************************************************************\n\n");
-// " * For each time you want to use this configured SDK environment,\n" +
-// " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" +
-
-// done -------------------------------------------------------------------------
-
-
-function skipChoice(msg)
-{
- stdout.Write("\n Do you want to skip the choice of " + msg + " (YES/NO) [YES]:");
- var sChoice = stdin.ReadLine();
- if (sChoice == "" || sChoice.toLowerCase() == "yes")
- return true;
-
- return false;
-}
-
-function getSdkHome()
-{
- var sSuggestedHome = WshSysEnv("OO_SDK_HOME");
- if (sSuggestedHome.length == 0) {
- var scriptname = WScript.ScriptFullName;
- sSuggestedHome = scriptname.substr(0,scriptname.length-10);
- }
-
- while(true)
- {
- stdout.Write("\n Enter the Office Software Development Kit directory [" +
- sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, use default.
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\". An SDK is required, please" +
- " specify the path to a valid installation.");
- continue;
- }
- sHome = sSuggestedHome;
- }
- else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: The directory \"" + sHome +
- "\" does not exist. Please enter the path to a" +
- "valid SDK installation.");
- continue;
- }
- }
- //Check if this is an sdk folder by looking for the idl sub - dir
- var idlDir = sHome + "\\idl";
- if (! aFileSystemObject.FolderExists(idlDir))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- idlDir + "\". An SDK is required, please specify " +
- "the path to a valid SDK installation.");
- continue;
- }
-
- return sHome;
- }
-}
-
-function getOfficeOrUre()
-{
- var suggestion = "Office";
- var choice;
- while (choice != "office" && choice != "ure") {
- stdout.Write(
- "\n Use an installed Office or an installed UNO Runtime"
- + " Environment (Office/URE) [" + suggestion + "]:");
- choice = stdin.ReadLine();
- if (choice == "") {
- choice = suggestion;
- }
- choice = choice.toLowerCase();
- }
- return choice;
-}
-
-function getOfficeHome()
-{
- var sSuggestedHome = WshSysEnv("OFFICE_HOME");
- if (sSuggestedHome.length == 0)
- {
- try {
- sSuggestedHome = WshShell.RegRead(regKeyOfficeCurrentUser);
- //The registry entry points to the program folder but we need the
- //installation folder
- } catch(exc) {}
- if (sSuggestedHome.length == 0)
- {
- try {
- sSuggestedHome = WshShell.RegRead(regKeyOfficeLocaleMachine);
- //The registry entry points to the program folder but we need
- //the installation folder
- } catch (exc) {}
- }
-
- var index=0;
- if ((index = sSuggestedHome.lastIndexOf("\\")) != -1)
- sSuggestedHome = sSuggestedHome.substr(0, index);
-
- if (sSuggestedHome.length == 0)
- sSuggestedHome = searchOffice();
- }
-
- while(true)
- {
- stdout.Write("\n Enter the Office base installation directory [" +
- sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, use default.
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\" An office installation is " +
- "required, please specify the path to a valid " +
- "office installation.");
- sSuggestedHome = "";
- continue;
- }
- sHome = sSuggestedHome;
- } else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: The directory \"" + sHome +
- "\" does not exist. Please specify the path to " +
- "a valid office installation.");
- continue;
- }
- }
- //Check if this is a valid office installtion folder by looking for the
- //program sub-directory
- var progDir = sHome + "\\program";
- if (! aFileSystemObject.FolderExists(progDir))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- progDir + "\". An office installation is required, " +
- "please specify the path to a valid office " +
- "installation.");
- continue;
- }
- return sHome;
- }
-}
-
-function searchOffice()
-{
- var tmp = oo_sdk_home;
- var officepath ="";
- var index=-1;
-
- if ((index = tmp.lastIndexOf("\\Basis")) != -1) {
- tmp = tmp.substr(0, index);
- }
-
- if (aFileSystemObject.FileExists(tmp + "\\program\\soffice.exe")) {
- return tmp;
- }
-
- return "";
-}
-
-
-function getOfficeBaseHome()
-{
- var officebase = oo_sdk_home;
- var index=officebase.lastIndexOf("\\");
-
- officebase = officebase.substr(0, index);
-
- return officebase;
-}
-
-function getUreHome()
-{
- var tmpure = oo_sdk_home;
- var ure = "";
- var index=0;
- if ((index = tmpure.lastIndexOf("Basis")) != -1)
- tmpure = tmpure.substr(0, index);
-
- if (aFileSystemObject.FileExists(tmpure + "\\URE\\bin\\uno.exe")) {
- ure = tmpure + "\URE";
- }
-
- return ure;
-
-/*
- var suggestion = WshSysEnv("OO_SDK_URE_HOME");
- var choice;
- for (;;) {
- stdout.Write(
- "\n Enter the URE installation directory [" + suggestion + "]:");
- choice = stdin.ReadLine();
- if (choice == "") {
- choice = suggestion;
- }
- if (aFileSystemObject.FileExists(choice + "\\bin\\uno.exe")) {
- break;
- }
- stdout.WriteLine("\n Error: A valid URE installation is required.");
- }
- return choice;
-*/
-}
-
-function getMakeHome()
-{
- var sSuggestedHome = WshSysEnv("OO_SDK_MAKE_HOME");
-
- while(true)
- {
- stdout.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
- sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, use default.
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\". GNU make is required, " +
- "please specify a GNU make tools directory.");
- sSuggestedHome = "";
- continue;
- }
- sHome = sSuggestedHome;
- } else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: The directory \"" + sHome +
- "\" does not exist. GNU make is required, " +
- "please specify a GNU make tools directory.");
- continue;
- }
- }
- //Check for the make executable
- var sMakePath = sHome + "\\make.exe";
- if (! aFileSystemObject.FileExists(sMakePath))
- {
- sMakePath = sHome + "\\mingw32-make.exe";
- }
- if (! aFileSystemObject.FileExists(sMakePath))
- {
- stdout.WriteLine("\n Error: Could not find \"" + sMakePath +
- "\". GNU make is required, please specify a GNU " +
- "make tools directory.");
- continue;
- }
- return sHome;
- }
-}
-
-function getZipHome()
-{
- var sSuggestedHome = WshSysEnv("OO_SDK_ZIP_HOME");
-
- while(true)
- {
- stdout.Write("\n Enter a zip (2.3 or higher) tools directory [" +
- sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, use default.
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\". zip is required, please " +
- "specify a zip tools directory.");
- sSuggestedHome = "";
- continue;
- }
- sHome = sSuggestedHome;
- }
- else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: The directory \"" + sHome +
- "\" does not exist. zip is required, please " +
- "specify a zip tools directory.");
- continue;
- }
- }
- //Check for the make executable
- var sZipPath = sHome + "\\zip.exe";
- if (! aFileSystemObject.FileExists(sZipPath))
- {
- stdout.WriteLine("\n Error: Could not find \"" + sZipPath +
- "\". zip is required, please specify a zip tools " +
- "directory.");
- continue;
- }
- return sHome;
- }
-}
-
-function getCppHome()
-{
- var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME");
- if (sSuggestedHome.length == 0)
- {
- var sVC="";
- try {
- sVC = WshShell.RegRead(regKeyVCExpress90);
- }catch (exc) {}
- if (sVC.length == 0)
- {
- try {
- sVC = WshShell.RegRead(regKeyVC90);
- }catch (exc) {}
- }
- // check Windows SDK if VC 9
- if (sVC.length > 0)
- {
- oo_sdk_manifest_used="true";
- try {
- oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK);
- }catch (exc) {}
- }
- if (sVC.length == 0)
- {
- try {
- sVC = WshShell.RegRead(regKeyVCExpress80);
- }catch (exc) {}
- if (sVC.length > 0)
- oo_sdk_manifest_used="true";
- }
- if (sVC.length == 0)
- {
- try {
- sVC = WshShell.RegRead(regKeyVC80);
- }catch (exc) {}
- if (sVC.length > 0)
- oo_sdk_manifest_used="true";
- }
- if (sVC.length == 0)
- {
- try {
- sVC = WshShell.RegRead(regKeyVC71);
- }catch (exc) {}
- }
- if (sVC.length > 0)
- {
- sVC += "bin";
- if (aFileSystemObject.FileExists(sVC + "\\cl.exe"))
- sSuggestedHome = sVC;
- }
- }
-
- var bSkip = false;
- while(true)
- {
- stdout.Write("\n Enter the directory of the C++ compiler (optional) [" +
- sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, check OO_SDK_CPP_HOME or suggested value
- if ( sSuggestedHome.length == 0 ) {
- bSkip = true;
- } else {
- if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\".");
- sSuggestedHome = "";
- bSkip = true;
- }
- }
-
- sHome = sSuggestedHome;
- } else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sHome + "\".");
- bSkip = true;
- }
- }
-
- if ( !bSkip) {
- //Check if the C++ compiler exist
- var cl = sHome + "\\cl.exe";
- var mt = sHome + "\\mt.exe";
-
- if (! aFileSystemObject.FileExists(cl))
- {
- stdout.WriteLine("\n Error: Could not find the C++ compiler \""
- + cl + "\".");
- sHome = "";
- bSkip = true;
- } else {
- if (aFileSystemObject.FileExists(mt)) {
- oo_sdk_vc8_used="true";
- }
- }
- }
-
- if ( bSkip ) {
- if ( skipChoice("the C++ compiler") ) {
- return "";
- } else {
- bSkip = false;
- continue;
- }
- }
-
- return sHome;
- }
-}
-
-function getCliHome()
-{
- var sSuggestedHome = WshSysEnv("OO_SDK_CLI_HOME");
-
- if (sSuggestedHome.length == 0)
- {
- try {
- var _ver = WshShell.RegRead(regKeyDotNet2_0);
- if (_ver.length > 0)
- {
- sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
- sSuggestedHome += sDirDotNet2_0;
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
- sSuggestedHome = "";
- }
-
- if (sSuggestedHome.length == 0)
- {
- _ver = WshShell.RegRead(regKeyDotNet1_1);
- if (_ver.length > 0)
- {
- sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
- sSuggestedHome += sDirDotNet1_1;
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
- sSuggestedHome = "";
- }
- }
- } catch (exc) {}
- }
-
- var bSkip = false;
- while(true)
- {
- stdout.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, check OO_SDK_CLI_HOME or suggested value
- if ( sSuggestedHome.length == 0 ) {
- bSkip = true;
- } else {
- if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\".");
- sSuggestedHome = "";
- bSkip = true;
- }
- }
-
- sHome = sSuggestedHome;
- }
- else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: The directory \"" + sHome +
- "\" does not exist.");
- bSkip = true;
- }
- }
-
- if ( !bSkip ) {
- //Check if the C# and VB.NET compiler exist
- var csc = sHome + "\\csc.exe";
- var vbc = sHome + "\\vbc.exe";
-
- if (! aFileSystemObject.FileExists(csc))
- {
- stdout.WriteLine("\n Error: Could not find the C# compiler \"" +
- csc + "\".");
- bSkip = true;
- }
- if (! aFileSystemObject.FileExists(vbc))
- {
- stdout.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
- vbc + "\".");
- bSkip = true;
- }
- }
-
- if ( bSkip ) {
- if ( skipChoice("the C# and VB.NET compilers") ) {
- return "";
- } else {
- bSkip = false;
- continue;
- }
- }
-
- return sHome;
- }
-}
-
-function getJavaHome()
-{
- var sSuggestedHome = WshSysEnv("OO_SDK_JAVA_HOME");
- if (sSuggestedHome.length == 0)
- {
- try {
- var currentVersion = WshShell.RegRead(regKeyJDK + "CurrentVersion");
- if (currentVersion.length > 0)
- {
- sSuggestedHome = WshShell.RegRead(regKeyJDK + currentVersion +
- "\\JavaHome");
- if ( ! aFileSystemObject.FolderExists(sSuggestedHome) )
- sSuggestedHome = "";
- }
- } catch (exc) {}
- }
-
- var bSkip = false;
- while(true)
- {
- stdout.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome + "]:");
- var sHome = stdin.ReadLine();
- if (sHome.length == 0)
- {
- //No user input, check OO_SDK_JAVA_HOME or suggested value
- if ( sSuggestedHome.length == 0 ) {
- bSkip = true;
- } else {
- if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedHome + "\".");
- sSuggestedHome = "";
- bSkip=true;
- }
- }
-
- sHome = sSuggestedHome;
- } else
- {
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sHome))
- {
- stdout.WriteLine("\n Error: The directory \"" + sHome +
- "\" does not exist.");
- bSkip = true;
- }
- }
-
- if ( !bSkip) {
- //Check if this is an sdk folder by looking for the javac compiler
- var javacompiler = sHome + "\\bin\\javac.exe";
- if (! aFileSystemObject.FileExists(javacompiler))
- {
- stdout.WriteLine("\n Error: Could not find \"" +
- javacompiler + "\".");
- bSkip = true;
- }
- }
-
- if ( bSkip ) {
- if ( skipChoice("the Java SDK") ) {
- return "";
- } else {
- bSkip = false;
- continue;
- }
- }
-
- return sHome;
- }
-}
-
-function getOutputDir()
-{
- var defaultdir = "c:\\" + oo_sdk_name;
- var sSuggestedDir = WshSysEnv("OO_SDK_OUT");
- if (sSuggestedDir.length == 0)
- sSuggestedDir = defaultdir;
-
- var bSkip = false;
- while(true)
- {
- stdout.Write(
- "\n Default output directory is the \"c:\\" + oo_sdk_name + "\".\n" +
- " Enter an existent directory if you prefer a different one. But note" +
- " that only\n a path without spaces is allowed because of a" +
- " limitation of gnu make. (optional) [" + sSuggestedDir + "]:");
- var sDir = stdin.ReadLine();
- if (sDir.length == 0)
- {
- //No user input, check OO_SDK_OUT or suggested value
- if ( sSuggestedDir.length == 0 ) {
- bSkip = true;
- } else {
- if (sSuggestedDir == oo_user_sdk_dir || sSuggestedDir == defaultdir) {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- if ( !fso.FolderExists(sSuggestedDir) )
- fso.CreateFolder(sSuggestedDir);
- }
- if ( !aFileSystemObject.FolderExists(sSuggestedDir) )
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sSuggestedDir + "\".");
- sSuggestedDir = "";
- bSkip = true;
- }
- }
-
- sDir = sSuggestedDir;
- }
- else
- {
- if (sDir.indexOf(' ') != -1) {
- stdout.WriteLine("\n Error: your specified output directory " +
- "\"" + sDir + "\" " +
- "contains one or more spaces.\n That " +
- "causes problems with gnu make. Please specifiy" +
- " a directory without spaces.");
- bSkip = true;
- }
- //validate the user input
- if ( ! aFileSystemObject.FolderExists(sDir))
- {
- stdout.WriteLine("\n Error: Could not find directory \"" +
- sDir + "\".");
- bSkip = true;
- }
- }
-
- if ( bSkip ) {
- if ( skipChoice("a special output directory") ) {
- return "";
- } else {
- bSkip = false;
- continue;
- }
- }
-
- return sDir;
- }
-}
-
-function getAutoDeployment()
-{
- var sSuggestedAuto = WshSysEnv("SDK_AUTO_DEPLOYMENT");
- if (sSuggestedAuto.length == 0)
- sSuggestedAuto = "YES";
-
- while(true)
- {
- stdout.Write("\n Automatic deployment of UNO components (YES/NO) ["+
- sSuggestedAuto + "]:");
- var sAuto = stdin.ReadLine();
- if (sAuto.length == 0)
- sAuto = sSuggestedAuto;
- else
- {
- sAutoU = sAuto.toUpperCase();
- if (sAutoU != "YES" && sAutoU != "NO")
- {
- stdout.WriteLine("\n Error: The value \"" + sAuto + "\" is " +
- "invalid. Please answer YES or NO.")
- continue;
- }
- sAuto = sAutoU;
- }
- return sAuto;
- }
-}
-
-//The function uses sp2bv.exe to obtain a file URL from a
-//system path. The URL is already escaped for use as bootstrap variable.
-//($ -> \$). Then the resulting string is escaped for use in a bat file.
-//That is % signs are made to double % (% -> %%);
-function makeBootstrapFileUrl(systemPath)
-{
- var oExec = WshShell.Exec("sp2bv.exe \"" + systemPath + "\"");
- var output="";
- while (true)
- {
- if (!oExec.StdOut.AtEndOfStream)
- {
- var next = oExec.StdOut.Read(1);
- if (next == '%')
- output += "%%";
- else
- output += next;
- }
- else
- break;
- }
- return output;
-}
-
-function writeBatFile(fdir, file)
-{
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- if ( !fso.FolderExists(fdir) )
- fso.CreateFolder(fdir);
- var newFile = fso.CreateTextFile(file, true);
-
- newFile.Write(
- "@echo off\n" +
- "REM This script sets all enviroment variables, which\n" +
- "REM are necessary for building the examples of the Office Development Kit.\n" +
- "REM The Script was developed for the operating systems Windows.\n" +
- "REM The SDK name\n" +
- "REM Example: set OO_SDK_NAME=libreoffice3.4_sdk\n" +
- "set OO_SDK_NAME=" + oo_sdk_name +
- "\n\n" +
- "REM Installation directory of the Software Development Kit.\n" +
- "REM Example: set OO_SDK_HOME=C:\\Program Files\\LibreOffice 3\\Basis\\sdk\n" +
- "set OO_SDK_HOME=" + oo_sdk_home +
- "\n\n" +
- "REM Office installation directory.\n" +
- "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\n" +
- "set OFFICE_HOME=" + office_home +
- "\n\n" +
- "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\\Basis\n" +
- "set OFFICE_BASE_HOME=" + office_base_home +
- "\n\n" +
- "REM URE installation directory.\n" +
- "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\LibreOffice 3\\URE\n" +
- "set OO_SDK_URE_HOME=" + oo_sdk_ure_home +
- "\n\n" +
- "REM Directory of the make command.\n" +
- "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" +
- "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home +
- "\n\n" +
- "REM Directory of the zip tool.\n" +
- "REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
- "set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home +
- "\n\n" +
- "REM Directory of the C++ compiler.\n" +
- "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" +
- "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home +
- "\nset CPP_MANIFEST=" + oo_sdk_manifest_used +
- "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk +
- "\n\n" +
- "REM Directory of the C# and VB.NET compilers.\n" +
- "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
- "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home +
- "\n\n" +
- "REM Java SDK installation directory.\n" +
- "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" +
- "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home +
- "\n\n" +
- "REM Special output directory\n" +
- "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name + "\n" +
- "set OO_SDK_OUT=" + oo_sdk_out +
- "\n\n" +
- "REM Automatic deployment\n" +
- "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
- "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment +
- "\n\n" +
- "REM Check installation path for the Office Development Kit.\n" +
- "if not defined OO_SDK_HOME (\n" +
- " echo Error: the variable OO_SDK_HOME is missing!\n" +
- " goto :error\n" +
- " )\n" +
- "\n" +
- "REM Check installation path for the office.\n" +
- "REM if not defined OFFICE_HOME (\n" +
- "REM if not defined OO_SDK_URE_HOME (\n" +
- "REM echo Error: either of the variables OFFICE_HOME and\n" +
- "REM echo OO_SDK_URE_HOME is missing!\n" +
- "REM goto :error\n" +
- "REM )\n" +
- "REM )\n" +
- "\n" +
- "REM Check installation path for GNU make.\n" +
- "if not defined OO_SDK_MAKE_HOME (\n" +
- " echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
- " goto :error\n" +
- " )\n" +
- "\n" +
- "REM Check installation path for the zip tool.\n" +
- "if not defined OO_SDK_ZIP_HOME (\n" +
- " echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" +
- " goto :error\n" +
- " )\n" +
- "\n" +
- "REM Set library path. \n" +
- "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
- "if defined CPP_WINDOWS_SDK (\n" +
- " set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
- " )\n" +
- "\n" +
- "REM Set office program path.\n" +
- "if defined OFFICE_HOME (\n" +
- " set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
- " )\n" +
- "\n" +
- "REM Set office program path.\n" +
- "if defined OFFICE_BASE_HOME (\n" +
- " set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\\program\n" +
- " )\n" +
- "\n" +
- "REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
- "REM new UNO bootstrap mechanism use the configured office installation\n" +
- "REM (only set when using an Office).\n" +
- "if defined OFFICE_HOME (\n" +
- " set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
- " )\n" +
- "\n" +
- "REM if defined OO_SDK_URE_HOME (\n" +
- "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
- "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
- "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
- "REM ) else (\n" +
- "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
- "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%\n" +
- "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\\classes\n" +
- "REM )\n" +
- "\n" +
- "REM Set classpath\n" +
- "set CLASSPATH=%OO_SDK_URE_JAVA_DIR%\\juh.jar;%OO_SDK_URE_JAVA_DIR%\\jurt.jar;%OO_SDK_URE_JAVA_DIR%\\ridl.jar;%OO_SDK_URE_JAVA_DIR%\\unoloader.jar;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
- "REM if defined OFFICE_HOME (\n" +
- "REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
- "REM )\n" +
- "\n" +
- "REM Add directory of the SDK tools to the path.\n" +
- "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
- "\n" +
- "REM Set PATH appropriate to the output directory\n" +
- "if defined OO_SDK_OUT (\n" +
- " set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" +
- " ) else (\n" +
- " set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
- " )\n" +
- "\n" +
- "REM Add directory of the command make to the path, if necessary.\n" +
- "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" +
- "\n" +
- "REM Add directory of the zip tool to the path, if necessary.\n" +
- "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
- "\n" +
- "REM Add directory of the C++ compiler to the path, if necessary.\n" +
- "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" +
- "\n" +
- "REM Add directory of the Win SDK to the path, if necessary.\n" +
- "if defined CPP_WINDOWS_SDK (\n" +
- " set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" +
- " set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" +
- ")\n" +
- "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" +
- "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" +
- "\n" +
- "REM Add directory of the Java tools to the path, if necessary.\n" +
- "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
- "\n" +
- "REM Set environment for C++ compiler tools, if necessary.\n" +
- "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
- "\n" +
- "REM Set tilte to identify the prepared shell.\n" +
- "title Shell prepared for SDK\n" +
- "\nREM Prepare shell with all necessary environment variables.\n" +
- "echo.\n" +
- "echo ******************************************************************\n" +
- "echo *\n" +
- "echo * SDK environment is prepared for Windows\n" +
- "echo *\n" +
- "echo * SDK = %OO_SDK_HOME%\n" +
- "echo * Office = %OFFICE_HOME%\n" +
- "echo * Office Base = %OFFICE_BASE_HOME%\n" +
- "echo * URE = %OO_SDK_URE_HOME%\n" +
- "echo * Make = %OO_SDK_MAKE_HOME%\n" +
- "echo * Zip = %OO_SDK_ZIP_HOME%\n" +
- "echo * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
- "echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
- "echo * Java = %OO_SDK_JAVA_HOME%\n" +
- "echo * Special Output directory = %OO_SDK_OUT%\n" +
- "echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
- "echo *\n" +
- "echo ******************************************************************\n" +
- "echo.\n" +
- "goto end\n" +
- "\n" +
- " :error\n" +
- "Error: Please insert the necessary environment variables into the batch file.\n" +
- "\n" +
- " :end\n"
- );
- newFile.Close();
-}
-
-
-
diff --git a/odk/configure.pl b/odk/configure.pl
deleted file mode 100755
index d102e6f0..00000000
--- a/odk/configure.pl
+++ /dev/null
@@ -1,803 +0,0 @@
-#
-# configure.pl - a perl script to set a minimal environment for the SDK.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-
-use IO::File;
-use File::Basename;
-
-$main::hostname= $ARGV[0];
-$main::sdkpath= $ARGV[1];
-$main::OO_SDK_NAME= $ARGV[2];
-
-$main::OO_MAJORVERSION=$main::OO_SDK_NAME;
-$main::OO_MINORVERSION=$main::OO_SDK_NAME;
-$main::OO_MAJORVERSION =~ s#[^\d]+(\d).(\d).+#$1#go;
-$main::OO_MINORVERSION =~ s#[^\d]+(\d).(\d).+#$2#go;
-
-$main::OO_SDK_CONFIG_HOME= "$ENV{HOME}/$main::OO_SDK_NAME";
-
-$main::operatingSystem = `$main::sdkpath/config.guess | cut -d"-" -f3,4`;
-chomp ($main::operatingSystem);
-
-$main::OO_SDK_HOME = $main::sdkpath;
-#$main::OO_SDK_HOME = "";
-$main::OO_SDK_HOME_SUGGESTION = $main::sdkpath;
-
-$main::OFFICE_OR_URE = "Office";
-$main::OFFICE_OR_URE_SUGGESTION = "Office";
-
-$main::OFFICE_HOME = "";
-
-$main::OFFICE_BASE_HOME = substr($main::sdkpath, 0, rindex($main::sdkpath, "/sdk"));
-
-$main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`;
-chomp($main::OO_SDK_URE_HOME);
-
-$main::OO_SDK_MAKE_HOME = "";
-$main::makeName = "make";
-if ( $main::operatingSystem =~ m/solaris/ ||
- $main::operatingSystem =~ m/freebsd/ )
-{
- $main::makeName = "gmake";
-}
-$main::OO_SDK_MAKE_HOME_SUGGESTION = searchprog($main::makeName);
-$main::makeVersion = "3.79.1";
-$main::correctVersion = 0;
-
-$main::OO_SDK_ZIP_HOME = "";
-$main::OO_SDK_ZIP_HOME_SUGGESTION = searchprog("zip");
-$main::zipVersion = "2.3";
-
-$main::OO_SDK_CPP_HOME = "";
-$main::cppName = "gcc";
-$main::cppVersion = "4.0.1";
-if ( $main::operatingSystem =~ m/solaris/ )
-{
- $main::cppName = "CC";
- $main::cppVersion = "5.2";
-}
-$main::OO_SDK_CC_55_OR_HIGHER = "";
-$main::OO_SDK_CPP_HOME_SUGGESTION = searchprog($main::cppName);
-
-$main::OO_SDK_JAVA_HOME = "";
-$main::OO_SDK_JAVA_BIN_DIR = "bin";
-if ( $main::operatingSystem =~ m/darwin/ )
-{
- $main::OO_SDK_JAVA_BIN_DIR="Commands";
-}
-$main::OO_SDK_JAVA_HOME_SUGGESTION = searchprog("javac");
-$main::javaVersion = "1.5.0_01";
-
-$main::SDK_AUTO_DEPLOYMENT = "";
-$main::SDK_AUTO_DEPLOYMENT_SUGGESTION = "YES";
-
-$main::OO_SDK_OUTPUT_DIR_SUGGESTION = "$ENV{HOME}";
-$main::OO_SDK_OUTPUT_DIR = "";
-$main::skipOutputDir = 0;
-
-$main::return = 0;
-
-if ( $main::OFFICE_OR_URE eq "Office" )
-{
- if ( $main::operatingSystem =~ m/darwin/ )
- {
-# used for a SDK as part of the office installation
-# $main::OFFICE_HOME = `cd $main::sdkpath/../../.. && pwd`;
-# chomp($main::OFFICE_HOME);
-# print " Used Office = $main::OFFICE_HOME\n";
- print " Used SDK = $main::OO_SDK_HOME\n\n";
-
- $main::OFFICE_HOME_SUGGESTION = searchMacOffice();
- while ( (! -d "$main::OFFICE_HOME" ) ||
- ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/Contents/MacOS")) )
- {
- print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: ";
- $main::OFFICE_HOME = readStdIn();
- chop($main::OFFICE_HOME);
- if ( $main::OFFICE_HOME eq "" )
- {
- $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION;
- }
-
- if ( ! -d "$main::OFFICE_HOME" )
- {
- $main::OFFICE_HOME = "";
- print " Error: An office installation is required, please specify the path to a valid installation.\n";
- }
-
- # check more details
- if ( -d "$main::OFFICE_HOME/Contents/basis-link" ) {
- $main::OFFICE_BASE_HOME = "$main::OFFICE_HOME/Contents/basis-link";
- if ( -d "$main::OFFICE_BASE_HOME/ure-link" ) {
- $main::OO_SDK_URE_HOME = "$main::OFFICE_BASE_HOME/ure-link";
- } else {
- $main::OFFICE_HOME = "";
- $main::OFFICE_BASE_HOME = "";
- $main::OO_SDK_URE_HOME = "";
- print " Error: no URE found in office installation, please specify the path to a valid installation.\n";
- }
- } else {
- $main::OFFICE_HOME = "";
- $main::OFFICE_BASE_HOME = "";
- $main::OO_SDK_URE_HOME = "";
- print " Error: no base layer found in office installation, please specify the path to a valid installation.\n";
- }
- }
- } else
- {
- $main::OFFICE_HOME_SUGGESTION = searchoffice();
-
- if ( $main::OFFICE_HOME_SUGGESTION eq "" ) {
- # prepare Office path
- $main::OFFICE_HOME_SUGGESTION = searchprog("soffice");
- }
-
- if ( ! $main::OFFICE_HOME_SUGGESTION eq "" )
- {
- my $tmpOffice = readlink "$main::OFFICE_HOME_SUGGESTION/soffice";
-
- if ( $tmpOffice eq "" )
- {
- $tmpOffice = "$main::OFFICE_HOME_SUGGESTION/soffice";
- }
-
- my $offset = rindex($tmpOffice, "/program/soffice");
- if ( $offset != -1 )
- {
- $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset);
- } else
- {
- $offset = rindex($tmpOffice, "/soffice");
- if ( $offset != -1 )
- {
- $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset);
- } else
- {
- $main::OFFICE_HOME_SUGGESTION = "";
- }
- }
- }
-
- while ( (! -d "$main::OFFICE_HOME" ) ||
- ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/program")) )
- {
- print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: ";
- $main::OFFICE_HOME = readStdIn();
- chop($main::OFFICE_HOME);
- if ( $main::OFFICE_HOME eq "" )
- {
- $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION;
- }
-
- if ( ! -d "$main::OFFICE_HOME" )
- {
- $main::OFFICE_HOME = "";
- print " Error: An office installation is required, please specify the path to a valid installation.\n";
- } else
- {
- # special work for a network installation, no prgram directory but a link to the soffice binary
- if ( (! -d "$main::OFFICE_HOME/program") && (-e "$main::OFFICE_HOME/soffice") )
- {
- my $soserver = `ls -l $OFFICE_HOME_SUGGESTION/soffice | sed -n 's/.* -> //p'`;
- $soserver= substr($soserver, 0, rindex($soserver, "program") - 1);
-
- if ( ! -d $soserver )
- {
- $main::OFFICE_HOME = "";
- print " Error: An office installation is required, please specify the path to a valid installation.\n";
- } else
- {
- $main::OFFICE_HOME = $soserver;
- }
- }
- }
- }
- }
-}
-else
-{
- # prepare URE path
- $main::OO_SDK_URE_HOME_SUGGESTION = "/opt/openoffice.org/ure";
- $main::OO_SDK_URE_HOME_SUGGESTION = "" unless
- -e "$main::OO_SDK_URE_HOME_SUGGESTION/bin/uno";
- for (;;)
- {
- print " Enter the URE installation directory",
- " [$main::OO_SDK_URE_HOME_SUGGESTION]: ";
- $main::OO_SDK_URE_HOME = readStdIn();
- chop $main::OO_SDK_URE_HOME;
- $main::OO_SDK_URE_HOME = $main::OO_SDK_URE_HOME_SUGGESTION if
- $main::OO_SDK_URE_HOME eq "" &&
- $main::OO_SDK_URE_HOME_SUGGESTION ne "";
- last if -e "$main::OO_SDK_URE_HOME/bin/uno";
- print " Error: A valid URE installation is required.\n";
- }
-}
-
-# prepare GNU make path
-while ( (!$main::correctVersion) &&
- ((! -d "$main::OO_SDK_MAKE_HOME" ) ||
- ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName"))) )
-{
- print " Enter GNU make ($main::makeVersion or higher) tools directory [$main::OO_SDK_MAKE_HOME_SUGGESTION]: ";
- $main::OO_SDK_MAKE_HOME = readStdIn();
- chop($main::OO_SDK_MAKE_HOME);
- if ( $main::OO_SDK_MAKE_HOME eq "" )
- {
- $main::OO_SDK_MAKE_HOME = $main::OO_SDK_MAKE_HOME_SUGGESTION;
- }
- if ( (! -d "$main::OO_SDK_MAKE_HOME") ||
- ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName")) )
- {
- $main::OO_SDK_MAKE_HOME = "";
- print " Error: GNU make is required, please specify a GNU make tools directory.\n";
- } else
- {
- #check version
- my $testVersion = `$OO_SDK_MAKE_HOME/$main::makeName --version`;
- if ( $testVersion eq "")
- {
- print " Set the environment variable OO_SDK_MAKE_HOME to your GNU build tools directory.\n";
- print " GNU make version $main::makeVersion can be obtained at ftp://ftp.gnu.org/gnu/make/\n";
- } else
- {
- if ($testVersion =~ m#((\d+\.)+\d+)# )
- {
- $testVersion = $1;
- }
- $main::correctVersion = testVersion($main::makeVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/$main::makeName", 1);
- if ( !$main::correctVersion )
- {
- print " The '$main::makeName' command found at '$main::OO_SDK_MAKE_HOME' has a wrong version\n";
- $main::OO_SDK_MAKE_HOME = "";
- }
- }
- }
-}
-
-# prepare zip path
-$main::correctVersion = 0;
-while ( (!$main::correctVersion) &&
- ((! -d "$main::OO_SDK_ZIP_HOME" ) ||
- ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip"))) )
-{
- print " Enter zip ($main::zipVersion or higher) tool directory [$main::OO_SDK_ZIP_HOME_SUGGESTION]: ";
- $main::OO_SDK_ZIP_HOME = readStdIn();
- chop($main::OO_SDK_ZIP_HOME);
- if ( $main::OO_SDK_ZIP_HOME eq "" )
- {
- $main::OO_SDK_ZIP_HOME = $main::OO_SDK_ZIP_HOME_SUGGESTION;
- }
- if ( (! -d "$main::OO_SDK_ZIP_HOME") ||
- ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip")) )
- {
- $main::OO_SDK_ZIP_HOME = "";
- print " Error: zip tool is required, please specify a zip tool directory.\n";
- } else
- {
- #check version
- my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | egrep Zip | head -n 1`;
- $testVersion =~ s#Zip ([\d.]+) .*#$1#go;
- if ( $testVersion eq "")
- {
- print " Set the environment variable OO_SDK_ZIP_HOME to your zip tool directory.\n";
- print " zip version $main::zipVersion can be obtained at ftp://www.info-zip.org/\n";
- } else
- {
- if ($testVersion =~ m#((\d+\.)+\d+)# )
- {
- $testVersion = $1;
- }
- $main::correctVersion = testVersion($main::zipVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/zip", 1);
- if ( !$main::correctVersion )
- {
- print " The 'zip' command found at '$main::OO_SDK_ZIP_HOME' has a wrong version\n";
- $main::OO_SDK_ZIP_HOME = "";
- }
- }
- }
-}
-
-# prepare C++ compiler path
-$main::correctVersion = 0;
-while ( (!$main::correctVersion) &&
- ((! -d "$main::OO_SDK_CPP_HOME" ) ||
- ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cpp"))) )
-{
- print " C++ compilers where for example a language binding exist:\n";
- print " - Solaris, Sun WorkShop 6 update 1 C++ 5.2 2000/09/11 or higher\n";
- print " - Linux, GNU C++ compiler, gcc version 4.0.1 or higher\n";
- print " - MacOS, GNU C++ compiler, gcc version 4.0.1 or higher\n";
- print " Enter the directory of the C++ compiler, the directory\n";
- print " where the compiler is located (optional) [$main::OO_SDK_CPP_HOME_SUGGESTION]: ";
-
- $main::OO_SDK_CPP_HOME = readStdIn();
- chop($main::OO_SDK_CPP_HOME);
- if ( $main::OO_SDK_CPP_HOME eq "" )
- {
- $main::OO_SDK_CPP_HOME = $main::OO_SDK_CPP_HOME_SUGGESTION;
- }
-
- if ( ! $main::OO_SDK_CPP_HOME eq "" )
- {
- if ( (! -d "$main::OO_SDK_CPP_HOME") ||
- ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cppName")) )
- {
- print " Error: Could not find directory '$main::OO_SDK_CPP_HOME'.\n";
- if ( skipChoice("C++ compiler") == 1 )
- {
- $main::correctVersion = 1;
- }
- $main::OO_SDK_CPP_HOME = "";
- } else
- {
- #check version
- if ( $main::cppName eq "gcc" )
- {
- my $testVersion = `$OO_SDK_CPP_HOME/$main::cppName -dumpversion`;
- if ( $testVersion eq "")
- {
- print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a ";
- print " GNU compiler.\nSet the environment variable OO_SDK_CPP_HOME to your GNU build tools ";
- print " directory.\nA GNU compiler version $main::cppVersion can be obtained at ";
- print " ftp://ftp.gnu.org/gnu/gcc/\n";
- } else
- {
- $main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 1);
- if ( !$main::correctVersion )
- {
- print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n";
- if ( skipChoice("C++ compiler") == 1 )
- {
- $main::correctVersion = 1;
- }
-
- $main::OO_SDK_CPP_HOME = "";
- }
- }
- } else
- {
- # for Solaris we have to check the version too
- open(FILE, "$OO_SDK_CPP_HOME/$main::cppName -V 2>&1 |");
- my @lines = <FILE>;
- my $testVersion = $lines[0];
- if ( $testVersion eq "")
- {
- print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a ";
- print " Solaris C++ compiler.\nSet the environment variable OO_SDK_CPP_HOME to your Solaris C++ compiler directory.\n";
- } else
- {
- if ($testVersion =~ m#((\d+\.)+\d+)# )
- {
- $testVersion = $1;
- }
- $main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 1);
- if ( !$main::correctVersion )
- {
- print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n";
- if ( skipChoice("C++ compiler") == 1 )
- {
- $main::correctVersion = 1;
- }
-
- $main::OO_SDK_CPP_HOME = "";
- } else {
- $main::correctVersion = testVersion("5.5", $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", 2);
- if ( $main::correctVersion ) {
- $main::OO_SDK_CC_55_OR_HIGHER = $testVersion;
- }
- }
- }
- }
- }
- } else
- {
- # the C++ compiler is optional
- $main::correctVersion = 1;
- }
-}
-
-
-# prepare Java path
-$main::correctVersion = 0;
-
-# prepare Java suggestion (cut bin or Commands directory to be in the root of the Java SDK)
-$main::offset = rindex($main::OO_SDK_JAVA_HOME_SUGGESTION, "/$main::OO_SDK_JAVA_BIN_DIR");
-if ( $main::offset != -1 )
-{
- $main::OO_SDK_JAVA_HOME_SUGGESTION = substr($main::OO_SDK_JAVA_HOME_SUGGESTION, 0, $main::offset);
-}
-
-while ( (!$main::correctVersion) &&
- ((! -d "$main::OO_SDK_JAVA_HOME" ) ||
- ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac"))) )
-{
- print " Enter Java SDK (1.5, recommendation is 1.6 or higher) installation directory (optional) [$main::OO_SDK_JAVA_HOME_SUGGESTION]: ";
- $main::OO_SDK_JAVA_HOME = readStdIn();
- chop($main::OO_SDK_JAVA_HOME);
- if ( $main::OO_SDK_JAVA_HOME eq "" )
- {
- $main::OO_SDK_JAVA_HOME = $main::OO_SDK_JAVA_HOME_SUGGESTION;
- }
- if ( ! $main::OO_SDK_JAVA_HOME eq "" )
- {
- if ( (! -d "$main::OO_SDK_JAVA_HOME") ||
- ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac")) )
- {
- print " Error: Could not find directory '$main::OO_SDK_JAVA_HOME' or '$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac'.\n";
- if ( skipChoice("JAVA SDK") == 1 )
- {
- $main::correctVersion = 1;
- }
- $main::OO_SDK_JAVA_HOME = "";
- } else
- {
- #check version
- my $testVersion = `$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java -version 2>&1 | egrep "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`;
- $testVersion =~ s#([^\n]+)\n#$1#go;
-
- $main::correctVersion = testVersion($main::javaVersion, $testVersion, "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java", 1);
- if ( !$main::correctVersion )
- {
- if ( skipChoice("JAVA SDK") == 1 )
- {
- $main::correctVersion = 1;
- }
- $main::OO_SDK_JAVA_HOME = "";
- }
- }
- }else
- {
- # the Java SDK is optional
- $main::correctVersion = 1;
- }
-}
-
-
-# prepare output directory (optional)
-while ( (!$main::skipOutputDir) &&
- (! -d "$main::OO_SDK_OUTPUT_DIR") )
-{
- print " Default output directory is in your HOME directory.\n";
- print " Enter an existent directory if you prefer a different output directory (optional) [$main::OO_SDK_OUTPUT_DIR_SUGGESTION]: ";
-
- $main::OO_SDK_OUTPUT_DIR = readStdIn();
-
- chop($main::OO_SDK_OUTPUT_DIR);
- if ( $main::OO_SDK_OUTPUT_DIR eq "" )
- {
- $main::OO_SDK_OUTPUT_DIR = $main::OO_SDK_OUTPUT_DIR_SUGGESTION;
- }
- if ( ! $main::OO_SDK_OUTPUT_DIR eq "" )
- {
- if ( ! -d "$main::OO_SDK_OUTPUT_DIR" )
- {
- print " Error: Could not find directory '$main::OO_SDK_OUTPUT_DIR'.\n";
- if ( skipChoice("optional output directory") == 1 )
- {
- $main::skipOutputDir = 1;
- }
- $main::OO_SDK_OUTPUT_DIR = "";
- }
- } else
- {
- # the output directory is optional
- $main::skipOutputDir = 1;
- }
-}
-
-# prepare auto deployment
-if ( $main::OFFICE_OR_URE eq "Office" )
-{
- while ( $main::SDK_AUTO_DEPLOYMENT eq "" ||
- ((! $main::SDK_AUTO_DEPLOYMENT eq "YES") &&
- (! $main::SDK_AUTO_DEPLOYMENT eq "NO")) )
- {
- print " Automatic deployment of UNO components (YES/NO) [$main::SDK_AUTO_DEPLOYMENT_SUGGESTION]: ";
- $main::SDK_AUTO_DEPLOYMENT = uc <STDIN>;
- chop($main::SDK_AUTO_DEPLOYMENT);
- if ( $main::SDK_AUTO_DEPLOYMENT eq "" )
- {
- $main::SDK_AUTO_DEPLOYMENT = "YES";
- }
- }
-}
-else
-{
- $main::SDK_AUTO_DEPLOYMENT = "NO";
-}
-
-prepareScriptFile("setsdkenv_unix.sh.in", "setsdkenv_unix.sh", 1);
-chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh";
-
-prepareScriptFile("setsdkenv_unix.csh.in", "setsdkenv_unix.csh", 2);
-chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh";
-
-print "\n";
-print " ************************************************************************\n";
-print " * ... your SDK environment has been prepared.\n";
-print " * For each time you want to use this configured SDK environment, you\n";
-print " * have to run the \"setsdkenv_unix\" script file!\n";
-print " * Alternatively can you source one of the scripts\n";
-print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh\"\n";
-print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh\"\n";
-print " * to get an environment without starting a new shell.\n";
-print " ************************************************************************\n\n";
-
-exit $return;
-
-sub skipChoice
-{
- my $msg = shift;
- my $skip = "";
- while ( !( $skip eq "yes" || $skip eq "no") )
- {
- print " Do you want to skip the choice of the '$msg' (YES/NO): [YES] ";
- $skip = lc <STDIN>;
- chop($skip);
- if ( $skip eq "" ) { $skip = "yes"; } # default
- if ( $skip eq "yes" )
- {
- return 1;
- }
- }
- return 0;
-}
-
-sub resolveLink
-{
- my $base= shift;
- my $link= shift;
-
- my $resolvedpath = "$base/$link";
- my $linktarget = readlink "$resolvedpath";
- my $resolvedlink = "";
-
- while ( $linktarget ne "") {
-
- if ( $linktarget =~ m/^\/.*/ )
- {
- $resolvedpath = "$linktarget";
- } else {
- $resolvedpath = `cd $base/$linktarget; pwd`;
- chop $resolvedpath;
- }
- $base = dirname("$resolvedpath");
-
- $linktarget = readlink "$resolvedpath";
- }
-
- $resolvedlink = `cd $resolvedpath; pwd`;
- chop $resolvedlink;
- return $resolvedlink;
-}
-
-sub searchprog
-{
- my $_search= shift;
- my $tmpPath = `echo "\$PATH"`;
- my @pathList = split(":" , $tmpPath);
- my $progDir = "";
-
- if ( $_search eq "javac" )
- {
- if ( $main::operatingSystem =~ m/darwin/ ) {
- $progDir = resolveLink("/System/Library/Frameworks/JavaVM.Framework/Versions", "CurrentJDK");
-
- if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" )
- {
- return "$progDir/$main::OO_SDK_JAVA_BIN_DIR";
- }
- }
-
- if ( $main::operatingSystem =~ m/solaris/ ) {
- $progDir = resolveLink("/usr/jdk", "latest");
- if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" )
- {
- return "$progDir/$main::OO_SDK_JAVA_BIN_DIR";
- }
- }
- }
-
- if ( $_search eq "gmake" && $main::operatingSystem =~ m/solaris/ ) {
- if ( -e "/usr/sfw/bin/gmake" )
- {
- return "/usr/sfw/bin";
- }
- }
-
- foreach $i (@pathList)
- {
- chomp ($i);
-
- if ( -e "$i/$_search" )
- {
-
- if ( index($i, "/") == 0 )
- {
- # # absolute path; leave unchanged
- $progDir = $i;
- } else
- {
- $progDir = `cd "$i"; pwd`;
- }
- return $progDir
- }
- }
- return $progDir
-}
-
-sub searchMacOffice
-{
- if (-d "/Applications/OpenOffice.org.app" ) {
- return "/Applications/OpenOffice.org.app"
- }
- if (-d "/Applications/Oracle Open Office.app" ) {
- return "/Applications/Oracle Open Office.app";
- }
- if (-d "/Applications/StarOffice.app" ) {
- return "/Applications/StarOffice.app";
- }
- if (-d "/Applications/StarSuite.app" ) {
- return "/Applications/StarSuite.app";
- }
-
- return "";
-}
-
-sub searchoffice
-{
- my $offset = rindex($main::sdkpath, "/libreoffice");
- my $tmpOffice = substr($main::sdkpath, 0, $offset);
- my $officepath = "$tmpOffice/libreoffice";
-
-# if ( $main::OO_MINORVERSION > 0) {
-# $officepath = "$officepath$main::OO_MINORVERSION";
-# }
-
- # search corresponding office for this SDK
- if (-d $officepath && -e "$officepath/program/soffice") {
- return $officepath;
- }
- # fallback
- my $tmpversion = $main::OO_MAJORVERSION;
-# if ( $main::OO_MINORVERSION > 0) {
-# $tmpversion = "$tmpversion.$main::OO_MINORVERSION";
-# }
-
- $officepath = "$tmpOffice/oracle_open_office$tmpversion";
- if (-d $officepath && -e "$officepath/program/soffice") {
- return $officepath;
- }
-
- my $tmpversion = $main::OO_MAJORVERSION + 6;
- if ( $main::OO_MINORVERSION > 0) {
- $tmpversion = "$tmpversion.$main::OO_MINORVERSION";
- }
-
- $officepath = "$tmpOffice/staroffice$tmpversion";
- if (-d $officepath && -e "$officepath/program/soffice") {
- return $officepath;
- }
- $officepath = "$tmpOffice/StarOffice$tmpversion";
- if (-d $officepath && -e "$officepath/program/soffice") {
- return $officepath;
- }
- $officepath = "$tmpOffice/starsuite$tmpversion";
- if (-d $officepath && -e "$officepath/program/soffice") {
- return $officepath;
- }
- $officepath = "$tmpOffice/StarSuite$tmpversion";
- if (-d $officepath && -e "$officepath/program/soffice") {
- return $officepath;
- }
- $officepath = "";
-
- # search other potential matching office versions
- my $path = "/opt/";
- my $entry = "";
- my $version = "0";
- for $entry (glob($path.'*')) {
- ## if the file is a directory
- if( -d $entry) {
-
- if ($entry =~ m#(.+(o|O)ffice(\.org){0,1}(\d([\d\.]){0,2}))# ||
- $entry =~ m#(.+(s|S)uite(.*)(\d([\d\.]){0,2}))# )
- {
- if ($4 > $version) {
- $version = $4;
- $officepath = $entry;
- }
- }
- }
- }
- return $officepath;
-}
-
-
-
-sub testVersion
-{
- my $tmpMustBeVersion = shift;
- my $tmpTestVersion = shift;
- my $toolName = shift;
- # 1=check + message 2=check only
- my $checkOnly = shift;
- my @mustBeVersion = split(/\.|_|-/,$tmpMustBeVersion);
- my @testVersion = split(/\.|_|-/,$tmpTestVersion);
- my $length = $#mustBeVersion;
-
- if ($#testVersion < $#mustBeVersion) {
- $length = $#testVersion;
- }
-
- for ($i=0; $i <= $length; $i++ )
- {
- if ( @testVersion->[$i] > @mustBeVersion->[$i] )
- {
- return 1; # 1 indicates a correct version
- }
-
- if ( @testVersion->[$i] < @mustBeVersion->[$i] )
- {
- if ( $#checkOnly == 1 ) {
- print " The command '$toolName' has the version $tmpTestVersion.\n";
- print " The SDK requires at least the version $tmpMustBeVersion.\n";
- }
- return 0;
- }
- }
-
- return 1; # 1 indicates a correct version
-}
-
-sub readStdIn
-{
- my $tmpstdin = <STDIN>;
- if ( index($tmpstdin, "\$") != -1)
- {
- return `echo $tmpstdin`;
- }
-
- return $tmpstdin;
-}
-
-sub prepareScriptFile()
-{
- my $inputFile = shift;
- my $outputFile = shift;
- # shell mode 1 = sh
- # 2 = csh
- my $shellMode = shift;
-
- if ( ! -d "$main::OO_SDK_CONFIG_HOME/$main::hostname" )
- {
- system("mkdir -p $main::OO_SDK_CONFIG_HOME/$main::hostname");
- }
-
- open ( FILEIN, "$main::sdkpath/$inputFile" ) || die "\nERROR: could not open '$main::sdkpath/$inputFile' for reading";
- open ( FILEOUT, ">$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile" ) || die "\nERROR: could not open '$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile' for writing";
-
- while ( <FILEIN> )
- {
- $_ =~ s#\@OO_SDK_NAME\@#$main::OO_SDK_NAME#go;
- $_ =~ s#\@OO_SDK_HOME\@#$main::OO_SDK_HOME#go;
- $_ =~ s#\@OFFICE_HOME\@#$main::OFFICE_HOME#go;
- $_ =~ s#\@OFFICE_BASE_HOME\@#$main::OFFICE_BASE_HOME#go;
- $_ =~ s#\@OO_SDK_URE_HOME\@#$main::OO_SDK_URE_HOME#go;
- $_ =~ s#\@OO_SDK_MAKE_HOME\@#$main::OO_SDK_MAKE_HOME#go;
- $_ =~ s#\@OO_SDK_ZIP_HOME\@#$main::OO_SDK_ZIP_HOME#go;
- $_ =~ s#\@OO_SDK_CPP_HOME\@#$main::OO_SDK_CPP_HOME#go;
- $_ =~ s#\@OO_SDK_CC_55_OR_HIGHER\@#$main::OO_SDK_CC_55_OR_HIGHER#go;
- $_ =~ s#\@OO_SDK_JAVA_HOME\@#$main::OO_SDK_JAVA_HOME#go;
- $_ =~ s#\@SDK_AUTO_DEPLOYMENT\@#$main::SDK_AUTO_DEPLOYMENT#go;
- $_ =~ s#\@OO_SDK_OUTPUT_DIR\@#$main::OO_SDK_OUTPUT_DIR#go;
-
- print FILEOUT $_;
- }
-
- close FILEIN;
- close FILEOUT;
-}
diff --git a/odk/docs/common/ref/idl.css b/odk/docs/common/ref/idl.css
deleted file mode 100644
index 6327b924..00000000
--- a/odk/docs/common/ref/idl.css
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Autodoc css file for IDL documentation */
-
-
-/*See bottom of file for explanations.*/
-
-body { background-color:#ffffff; }
-
-#adc-idlref a { text-decoration: none; }
-#adc-idlref a:link { color: #0e85cd; }
-#adc-idlref a:visited { color: #638093; }
-#adc-idlref a:active { color: #4dadea; }
-
-#adc-idlref h3
- { font-size:13pt; font-weight:bold;
- margin-top:3pt; margin-bottom:1pt; }
-
-#adc-idlref p, #adc-idlref dt, #adc-idlref dd, #adc-idlref pre
- { font-size:11pt;
- margin-top:3pt; margin-bottom:1pt; }
-
-#adc-idlref pre { font-family:monospace; }
-
-#adc-idlref table.subtitle { margin-top:6pt; margin-bottom:6pt; }
-
-#adc-idlref td { font-size:11pt; }
-#adc-idlref td.title
- { font-family: Arial; font-size:19pt; font-weight:bold;
- line-height:30pt;
- background-image:url(../../images/bg_table.png);
- text-align:center; }
-
-#adc-idlref td.subtitle
- { font-family: Arial; font-size:13pt;
- line-height:20pt;
- background-image:url(../../images/bg_table.png); }
-
-#adc-idlref td.crosstitle
- { font-size:12pt; font-weight:bold;
- line-height:15pt; background-color:#eeeeff; }
-
-#adc-idlref td.imdetail
- { width:100%;
- background-image:url(../../images/bg_table3.png); }
-
-#adc-idlref td.imsum_left { width:30%; }
-#adc-idlref td.imsum_right { width:70%; }
-
-#adc-idlref table.navimain { background-image:url(../../images/bg_table2.png); }
-
-#adc-idlref td.navimain
- { background-image:url(../../images/bg_table2.png);
- text-align:center;
- font-family: Arial; font-size:12pt; font-weight:bold;
- padding-left:7pt; padding-right:7pt; }
-
-#adc-idlref td.navimainself
- { text-align:center;
- font-family: Arial; font-size:12pt; font-weight:bold;
- color:#ffffff; }
-
-#adc-idlref td.navimainnone
- { text-align:center;
- font-family: Arial; font-size:12pt; }
-
-#adc-idlref td.navisub
- { text-align:center;
- font-family: Arial; font-size:9pt; font-variant:small-caps;
- padding-left:7pt; padding-right:7pt; }
-
-#adc-idlref a.navimain
- { text-align:center;
- font-family: Arial; font-size:12pt; font-weight:bold;
- color:#C44B01; }
-
-#adc-idlref a.navisub
- { text-align:center;
- font-family: Arial; font-size:9pt; font-variant:small-caps;
- color:#C44B01; }
-
-#adc-idlref a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }
-
-#adc-idlref a:link.navimain, #adc-idlref a:link.navisub { color:#0e85cd; }
-#adc-idlref a:visited.navimain, #adc-idlref a:visited.navisub { color: #638093; }
-#adc-idlref a:active.navimain, #adc-idlref a:active.navisub { color: #4dadea; }
-
-#adc-idlref .dt { font-weight:bold; }
-#adc-idlref .namechain { font-size:13pt; font-weight:bold; margin-top:3pt; margin-bottom:6pt; }
-#adc-idlref .title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }
-
-#adc-idlref table { empty-cells:show; }
-
-#adc-idlref .childlist td,
-#adc-idlref .commentedlinks td,
-#adc-idlref .memberlist td,
-#adc-idlref .subtitle td,
-#adc-idlref .crosstitle td { border: .1pt solid grey; }
-
-#adc-idlref .flag-table td { border: .1pt solid #cccccc; }
-
-#adc-idlref .title-table td,
-#adc-idlref .table-in-method td,
-#adc-idlref .table-in-data td,
-#adc-idlref .navimain td,
-#adc-idlref .navisub td,
-#adc-idlref .expl-table td,
-#adc-idlref .param-table td { border: none; }
-
-
-/* Explanation of CSS classes:
-
-table.lightbg Background of navigation bar.
-.navimain Text in main navigation bar.
-.navisub Text in lower navigation bar.
-td.navimainself Cell in main navigation bar with "selected" shadow: You are here.
-td.navimainnone Cell in main navigation bar with no link.
-
-.namechain Line with current module path.
-
-td.crosstitle Comment box for bases (base interfaces etc.)
-td.imsum_left Left part of such boxes.
-td.imsum_right Right part of such boxes.
-
-td.title Main title of the page like "interface XYz"
-.subtitle Tables, and head cells of those, which list members
- like "method summary" and "method details".
-
-td.imdetail Background table of method's detail description.
-a.membertitle Method name (as jump label) in method's detail
- description.
-*/
diff --git a/odk/docs/cpp/ref/cpp.css b/odk/docs/cpp/ref/cpp.css
deleted file mode 100644
index b8286999..00000000
--- a/odk/docs/cpp/ref/cpp.css
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Autodoc css file for C++ documentation */
-
-
-body { background-color:#ffffff; }
-
-#adc-cppref a { text-decoration: none; }
-#adc-cppref a:link { color: #0e85cd; }
-#adc-cppref a:visited { color: #638093; }
-#adc-cppref a:active { color: #4dadea; }
-
-#adc-cppref h1 { font-size:20pt; margin-top:3pt; margin-bottom:7pt; }
-#adc-cppref h2 { font-family:Arial; font-size:16pt; margin-top:3pt; margin-bottom:5pt; }
-#adc-cppref h3 { font-size:13pt; margin-top:2pt; margin-bottom:3pt; }
-#adc-cppref h4 { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }
-#adc-cppref dl { margin-top:1pt; margin-bottom:1pt; }
-#adc-cppref dl.member { margin-top:1pt; margin-bottom:1pt;
- background-image:url(../../images/bg_table3.png); }
-#adc-cppref dt { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }
-#adc-cppref dt.member { font-size:13pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; }
-#adc-cppref dt.simple { font-size:10pt; font-weight:normal; margin-top:2pt; margin-bottom:1pt; }
-#adc-cppref dd { font-size:10pt; margin-top:1pt; margin-bottom:1pt; }
-#adc-cppref dd.member { font-size:10pt; margin-top:1pt; margin-bottom:1pt; background-color:#ffffff; }
-#adc-cppref p { font-size:10pt; margin-top:3pt; margin-bottom:1pt; }
-#adc-cppref pre { font-family:monospace; font-size:10pt; margin-top:1pt; margin-bottom:1pt; }
-#adc-cppref tr { font-size:10pt; }
-#adc-cppref td { font-size:10pt; }
-
-#adc-cppref dt.attention { color:#ff0000; }
-
-#adc-cppref div.title { text-align:center; line-height:26pt;
- background-image:url(../../images/bg_table.png); }
-#adc-cppref .subtitle { background-image:url(../../images/bg_table.png); }
-
-#adc-cppref td.flagname { background-image:url(../../images/bg_table2.png);
- font-family:Arial; font-size:8pt; font-weight:bold; }
-#adc-cppref td.flagyes { font-family:Arial; font-size:8pt; font-weight:bold; }
-#adc-cppref td.flagno { font-family:Arial; font-size:8pt; }
-#adc-cppref td.flagtext { font-family:Arial; font-size:8pt; font-weight:bold; }
-
-#adc-cppref td.navimain, td.navimain a
- { background-image:url(../../images/bg_table2.png);
- font-family:Arial; font-size:12pt; font-weight:bold; }
-
-/* background-color:#eeeeff; color:#000000; */
-
-#adc-cppref td.navimainself
- { background-color:#226bb0; color:#ffffff;
- font-family:Arial; font-size:12pt; font-weight:bold; }
-#adc-cppref td.navimainnone
- { background-image:url(../../images/bg_table2.png);
- font-family:Arial; font-size:12pt; }
-
-#adc-cppref div.define { font-family:Arial; background-color:#87c2e6; }
-
-#adc-cppref .nqclass { color:#008800; }
-
-#adc-cppref h3.help { background-color:#cfe7f5; margin-top:12pt; }
-
-#adc-cppref .btpubl { color:#87c2e6; }
-#adc-cppref .btprot { color:#226bb0; }
-#adc-cppref .btpriv { color:#06348c; }
-#adc-cppref .btvpubl { color:#87c2e6; font-style:italic; }
-#adc-cppref .btvprot { color:#226bb0; font-style:italic; }
-#adc-cppref .btvpriv { color:#06348c; font-style:italic; }
-#adc-cppref .btself { font-weight:bold; }
-
-#adc-cppref table { empty-cells:show; }
-
-#adc-cppref .childlist td,
-#adc-cppref .commentedlinks td,
-#adc-cppref .memberlist td,
-#adc-cppref .title-table td,
-#adc-cppref .subtitle td,
-#adc-cppref .crosstitle td { border: .1pt solid grey }
-
-#adc-cppref .flag-table td { border: .1pt solid #cccccc; }
-
-#adc-cppref .table-in-method td,
-#adc-cppref .table-in-data td,
-#adc-cppref .navimain td,
-#adc-cppref .navisub td,
-#adc-cppref .expl-table td,
-#adc-cppref .param-table td { border: none; }
-
-
-/* Explanation of CSS classes:
-
-dl.member provides coloured frame for function descriptions.
-dd.member makes the content of this frame white
-
-dt.attention special colour for @attention remarks
-
-div.title HTML page headline
-.subtitle headline of lists of members and similar
-
- These are for the flagtables in classes:
-td.flagname Flag name.
-td.flagyes flag value "yes"
-td.flagno flag value "no"
-td.flagtext other flag value
-
-
- These are for the main navigationbar:
-td.navimain, td.navimain a
- Links in navibar.
-td.navimainself Text in navibar which refers to current page.
-td.navimainnone Text which links to nothing.
-
-
-div.define Subtitles on the #define/macro descriptions page
-
-.nqclass special color for classes in the qualification
- on top of type pages like in:
- ::nsp1::nsp2::_ClassXY_::
-
-h3.help Subtitles on the help page
-
- These are for the base class tree on class pages:
-.btpubl public base class
-.btprot protected
-.btpriv private
-.btvpubl virtual public
-.btvprot virtual protected
-.btvpriv virtual private
-.btself placeholder for currently displayed class
-
-*/
diff --git a/odk/docs/images/arrow-1.gif b/odk/docs/images/arrow-1.gif
deleted file mode 100644
index 99da8a7d..00000000
--- a/odk/docs/images/arrow-1.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/arrow-2.gif b/odk/docs/images/arrow-2.gif
deleted file mode 100644
index 2e2b20d7..00000000
--- a/odk/docs/images/arrow-2.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/arrow-3.gif b/odk/docs/images/arrow-3.gif
deleted file mode 100644
index 99da8a7d..00000000
--- a/odk/docs/images/arrow-3.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bg_table.gif b/odk/docs/images/bg_table.gif
deleted file mode 100644
index 8c961993..00000000
--- a/odk/docs/images/bg_table.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bg_table.png b/odk/docs/images/bg_table.png
deleted file mode 100644
index eb5d4f2f..00000000
--- a/odk/docs/images/bg_table.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bg_table2.gif b/odk/docs/images/bg_table2.gif
deleted file mode 100755
index 8f8ad2f1..00000000
--- a/odk/docs/images/bg_table2.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bg_table2.png b/odk/docs/images/bg_table2.png
deleted file mode 100644
index d0cafddf..00000000
--- a/odk/docs/images/bg_table2.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bg_table3.gif b/odk/docs/images/bg_table3.gif
deleted file mode 100755
index d0c6469c..00000000
--- a/odk/docs/images/bg_table3.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bg_table3.png b/odk/docs/images/bg_table3.png
deleted file mode 100644
index 2759066d..00000000
--- a/odk/docs/images/bg_table3.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/bluball.gif b/odk/docs/images/bluball.gif
deleted file mode 100644
index dc7c0200..00000000
--- a/odk/docs/images/bluball.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/nada.gif b/odk/docs/images/nada.gif
deleted file mode 100644
index 75b945d2..00000000
--- a/odk/docs/images/nada.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/nav_down.png b/odk/docs/images/nav_down.png
deleted file mode 100644
index fee3fbf3..00000000
--- a/odk/docs/images/nav_down.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/nav_home.png b/odk/docs/images/nav_home.png
deleted file mode 100644
index 36c4cf76..00000000
--- a/odk/docs/images/nav_home.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/nav_left.png b/odk/docs/images/nav_left.png
deleted file mode 100644
index b2f5da72..00000000
--- a/odk/docs/images/nav_left.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/nav_right.png b/odk/docs/images/nav_right.png
deleted file mode 100644
index 87310372..00000000
--- a/odk/docs/images/nav_right.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/nav_up.png b/odk/docs/images/nav_up.png
deleted file mode 100644
index 8267ada1..00000000
--- a/odk/docs/images/nav_up.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/odk-footer-logo.gif b/odk/docs/images/odk-footer-logo.gif
deleted file mode 100644
index e79cd714..00000000
--- a/odk/docs/images/odk-footer-logo.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/ooo-main-app_32.png b/odk/docs/images/ooo-main-app_32.png
deleted file mode 100644
index 296c6f4c..00000000
--- a/odk/docs/images/ooo-main-app_32.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/orc-main-app_32.png b/odk/docs/images/orc-main-app_32.png
deleted file mode 100644
index b596295a..00000000
--- a/odk/docs/images/orc-main-app_32.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/sdk_head-1.png b/odk/docs/images/sdk_head-1.png
deleted file mode 100644
index 56094aab..00000000
--- a/odk/docs/images/sdk_head-1.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/sdk_head-2.png b/odk/docs/images/sdk_head-2.png
deleted file mode 100644
index 61adc6f7..00000000
--- a/odk/docs/images/sdk_head-2.png
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/sdk_line-1.gif b/odk/docs/images/sdk_line-1.gif
deleted file mode 100644
index 199d3a80..00000000
--- a/odk/docs/images/sdk_line-1.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/images/sdk_line-2.gif b/odk/docs/images/sdk_line-2.gif
deleted file mode 100644
index 44ef0146..00000000
--- a/odk/docs/images/sdk_line-2.gif
+++ /dev/null
Binary files differ
diff --git a/odk/docs/install.html b/odk/docs/install.html
deleted file mode 100644
index 87a07ca2..00000000
--- a/odk/docs/install.html
+++ /dev/null
@@ -1,420 +0,0 @@
-<html>
-<head>
- <title>LibreOffice %PRODUCT_RELEASE% SDK - Installation Guide</title>
- <link rel="stylesheet" type="text/css" href="sdk_styles.css">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="author" content="J&uuml;rgen Schmidt">
- <meta name="created" content="2004-12-14">
-</head>
-<body class="sdkbody"><a name="install"/>
-<table class="table1" cellpadding=0>
- <tr style="background-image:url(images/sdk_head-2.png)">
- <td colspan="3" align="left"><img src="images/sdk_head-1.png" width="800" height="120" usemap="#Map" border="0"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing10" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="3"><img class="nothing1" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1">Installation Guide</td>
- <td align="right"><a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2">
- <p>The LibreOffice %PRODUCT_RELEASE% SDK comes with a set of development tools, base
- libraries, header files and helper class files that can be used to
- develop Java/C++ components, to embed the LibreOffice %PRODUCT_RELEASE% application in
- your own programs, or to use the API (scripting or remote control the
- office). For a complete working environment, we have some additional
- requirements:</p>
- </td>
- </tr>
- <tr valign="top">
- <td><b>LibreOffice %PRODUCT_RELEASE% installation</td>
- <td class="content80">The SDK works on top of an existing office
- installation and uses the same libraries as the office installation.</td>
- </tr>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td><b>JDK (1.5 or higher)<b></td>
- <td class="content80">
- <p>A JDK is necessary for developing Java components or applications. An appropriate Java SDK can be found on <a target="_blank" href="http://java.sun.com/products" title="link to the Java SDK download page (online)">http://java.sun.com/products</a>.</p>
- <p>Recommendation is to use Java 6 excepting for Mac OS because initially Mac OS supported a 64bit version of Java 6 only.</p>
- <p><b>Note</b>: The Java compiler is <b><u>optional</u></b>!</p></td>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td><b>C++ compiler<b></td>
- <td class="content80">A C++ compiler is necessary for developing C++
- components or applications. UNO depends on a compiler dependent language
- binding, so that we use the appropriate compiler where a language binding
- exists:
- <table class="table4">
- <tr>
- <td class="cell15">Solaris</td>
- <td class="cell85">Sun Studion 8 (20070730)</td>
- </tr>
- <tr>
- <td class="cell15">Linux</td>
- <td class="cell80">GNU C++ compiler, gcc version 4.0.1</td>
- </tr>
- <tr>
- <td class="cell15">Windows</td>
- <td class="cell80">Microsoft C++ Compiler, Microsoft Visual Studio 2008 or the Express version (cl, version 15.00.21022)</td>
- </tr>
- </table>
- <p><b>Note</b>: The C++ compiler is <b><u>optional</u></b>! If you use the Express edition you have to ensure that the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en">Microsoft Visual Studio 2008 Redistributable Package</a> is also installed. You can download this package from Microsoft directly.</a></p></td>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td><b>Microsoft .NET Framework SDK version 1.0 or higher<b></td>
- <td class="content80">The SDK is required for building CLI applications.
- That is, programs written in languages, such as C# or VB.NET.<br>
- <p><b>Note</b>: The .NET Framework is <b><u>optional</u></b>!</p></td>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td><b>GNU make (3.79.1 or higher)<b></td>
- <td class="content80">
- <p>GNU make is used to build the examples of the SDK. GNU make is available from <a target="_blank" href="http://www.gnu.org" title="link to www.gnu.org (online)">http://www.gnu.org</a>. It can be ftped via <a target="_blank" href="ftp://ftp.gnu.org/gnu/make" title="link to gnumake on www.gnu.org (online)">ftp://ftp.gnu.org/gnu/make</a></p>
- <p><b>Note</b>: Windows user can find an executable of gnu make under <a target="_blank" href="http://www.mingw.org/wiki/Getting_Started" title="link to the MinGW Getting Started wiki (online)">http://www.mingw.org/wiki/Getting_Started</a> (see the mingw32-make link under &quot;Manual Installation&quot;). Do not use the Cygwin make, because it does not
- work well. On Solaris gnu make can be found often under <b><i>/usr/sfw/bin/gmake</i></b>, but keep in mind that you have to use <b>'gmake'</b> then. Or you can find gnu make also under <a target="_blank" href="http://www.sunfreeware.com/" title="link to www.sunfreeware.com (online)">http://www.sunfreeware.com/</a>.</td>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td><b>zip tool (2.3 or higher)<b></td>
- <td class="content80">The zip tool is used to create UNO packages. zip is
- a new requirement to make the SDK independent of a Java SDK.<br>
- If you do not have these already, you can download them from <a target="_blank" href="http://www.info-zip.org" title="link to www.ubfi-zip.org (online)">http://www.info-zip.org</a>. Note: The cygwin zip.exe does not work for the build under
- the 4NT shell. You have to use the native w32 version.</td>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td><img class="nothing10" src="images/nada.gif"></td>
- <td align="right">
- <a href="#install" title="link to the top of this page"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a></td>
- </tr>
- <tr valign="middle">
- <td colspan="2">
- <p>The SDK provides an implicit configuration mechanism, which
- configures the SDK build environment to your personal needs the first
- time you use the SDK environment. This configuration step creates one or
- two new setsdkenv_XXX scripts in the user's home directory:</P>
- <ul>
- <li><b>$HOME/$OO_SDK_NAME/setsdkenv_unix.sh</b> and <b>$HOME/$OO_SDK_NAME/setsdkenv_unix.csh</b>&nbsp;&nbsp;-> for Unix
- <li><b>C:\Documents and Settings\&lt;username&gt;\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat</b></a>&nbsp;&nbsp;-> for Windows2000/XP or later
- </ul>
- <p>The automatically started configure script (Unix and Windows2000/XP)
- requests relevant information and directories (SDK, LibreOffice, GNU make,
- Java, C++), in order to prepare a working SDK environment. After completing the
- configure script once, the newly created script is always used to set the
- necessary environment variables for using the SDK and the required
- tools.</P>
- <p>On UNIX operating systems, the configure script uses Perl. LINUX systems should have
- installed a working Perl version, and on Solaris you can find a working
- Perl version under <a target="_blank" href="http://www.sunfreeware.com/" title="link to www.sunfreeware.com (online)">http://www.sunfreeware.com/</a> if
- necessary. On Windows, the configure script uses Windows Script and
- a JScipt. If you have problems with Windows Script, you can download a
- newer version of <a href ="http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en" link"link to the download page for the Windows Script">Windows Script</a>.
- </p>
- <p>On other versions of Windows, use the batch
- file template <b>&lt;OO_SDK_HOME&gt;\setsdkenv_windows.template</b>,
- rename it to *.bat, and adapt it to your local environment.</p>
- <p>If you use the template batch file, edit and set
- the following variables:</p>
- <table class="table4">
- <tr valign="top">
- <td class="cell20"><b>OFFICE_HOME</b></td>
- <td class="cell80">Path to an existing LibreOffice
- base installation, e.g. &quot;/opt/libreoffice8&quot;. Be sure
- that it is not a user installation only. Exactly one of OFFICE_HOME
- and OO_SDK_URE_HOME must be set. The other should be either unset or
- set to an empty value.</td>
- </tr>
- <tr><a name="oosdkname"/>
- <td class="cell20"><b>OO_SDK_NAME</b></td>
- <td class="cell80">The configuration uses the
- directory name of the SDK, but you can use another name as well.
- It is important that the name does not contain spaces, because of a limitation
- of gnu make which cannot handle spaces correctly. This name is, for
- example, used to create an output directory in the users home directory
- for any generated output when you use the SDK build environment.</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_URE_HOME</b></td>
- <td class="cell80">Path to an existing UNO Runtime Environment
- installation, e.g. &quot;/opt/libreoffice/ure&quot;. Exactly one of
- OFFICE_HOME and OO_SDK_URE_HOME must be set. The other should be
- either unset or set to an empty value.</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_HOME</b></td>
- <td class="cell80">Path to the SDK root directory, e.g.
- &quot;/opt/libreoffice/sdk&quot;</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_JAVA_HOME</b></td>
- <td class="cell80">Path to a JDK root directory. The JDK is
- <b>optional</b> and only necessary if you like to run the Java examples
- or if you like to use the SDK environment to develop your own Java
- solution.</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_CPP_HOME</b></td>
- <td class="cell80">Path to the C++ compiler (on Windows, the directory
- where the &quot;<i>vcvar32.bat</i>&quot; file can be found). The C++
- compiler is <b>optional</b> and only necessary for building the C++
- examples.</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_CLI_HOME</b></td>
- <td class="cell80">Path to the C# compiler and VB.NET compiler (on
- Windows, this directory can be found under the system directory (e.g.
- c:\WINXP\Microsoft.NET\Framework\v1.0.3705). The compilers are
- <b>optional</b> and only necessary for building the CLI examples.<br>
- <b>Note: Windows only!</b></td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_MAKE_HOME</b></td>
- <td class="cell80">Path to GNU make.</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_ZIP_HOME</b></td>
- <td class="cell80">Path to the 'zip' tool.</td>
- </tr>
- <tr>
- <td class="cell20"><b>OO_SDK_OUTPUT_DIR</b></td>
- <td class="cell80">Path to an existing directory where the example output
- is generated. The output directory is <b>optional</b>, by default
- the output is generated in the SDK directory itself. If an output
- directory is specified, the output is generated in a SDK dependent
- subdirectory in this directory (e.g. &lt;OO_SDK_OUTPUT_DIR&gt;
- /LibreOffice %PRODUCT_RELEASE%/LINUXExample.out)</td>
- </tr>
- <tr>
- <td class="cell20"><b>SDK_AUTO_DEPLOYMENT</b></td>
- <td class="cell80">If this variable is set, the component examples are automatically deployed into the Office installation referenced by
- OFFICE_HOME. See also chapter <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/unopkg" title="link to the &quot;Extension Manager - unopkg&quot; chapter in the Developer's Guide">&quot;Extension Manager - unopkg&quot;</a> from the Developer's Guide.
- This variable is only relevant when OFFICE_HOME is set.</td>
- </tr>
- </table>
- <p>You must run the <b>setsdkenv_XXX</b> script every time you want to
- use the configured SDK environment. The settings are local for the current
- shell on Windows or the new started shell on UNIX. On UNIX you
- can now source one of the prepared environment
- script files (&quot;setsdkenv_unix.sh&quot; or
- &quot;setsdkenv_unix.csh&quot; dependending on the shell you use) to prepare
- your current shell instead of starting a new shell.</p>
- </td>
- </tr>
- <tr valign="middle">
- <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td><img class="nothing10" src="images/nada.gif"></td>
- <td align="right">
- <a href="#install" title="link to the top of this page"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a></td>
- </tr>
- <tr>
- <td colspan="2">
- <p class="head2">Manual Setting</p>
- <p>If you do not want to use the script to set your working
- environment, you must set the appropriate environment variables
- yourself. The script sets the following environment variables:</p>
- <p class="head3">Common Environment Variables</p>
- <table class="table4">
- <tr valign="top">
- <td class="cell20">OO_SDK_NAME</td>
- <td class="cell80">See description <a href="#oosdkname" title="link to the description of the environment variable OO_SDK_NAME">above</a>.</td>
- </tr>
- <tr valign="top">
- <td class="cell20">OO_SDK_URE_BIN_DIR</td>
- <td class="cell80">The path within the chosen office or URE
- installation where binary executables are located (e.g.,
- <i>$OFFICE_HOME/program</i> for an office installation, or
- <i>$OO_SDK_URE_HOME/bin</i> for a Unix URE installation).</td>
- </tr>
- <tr valign="top">
- <td class="cell20">OO_SDK_URE_LIB_DIR</td>
- <td class="cell80">The path within the chosen office or URE
- installation where dynamic libraries are located (e.g.,
- <i>$OFFICE_HOME/program</i> for an office installation, or
- <i>$OO_SDK_URE_HOME/lib</i> for a Unix URE installation).</td>
- </tr>
- <tr valign="top">
- <td class="cell20">OO_SDK_URE_JAVA_DIR</td>
- <td class="cell80">The path within the chosen office or URE
- installation where Java JARs are located (e.g.,
- <i>$OFFICE_HOME/program/classes</i> for an office installation, or
- <i>$OO_SDK_URE_HOME/share/java</i> for a Unix URE installation).</td>
- </tr>
- <tr valign="top">
- <td class="cell20">CLASSPATH</td>
- <td class="cell80">
- =<i>$OO_SDK_URE_JAVA_DIR/juh.jar;
- $OO_SDK_URE_JAVA_DIR/jurt.jar;
- $OO_SDK_URE_JAVA_DIR/ridl.jar;
- $OO_SDK_URE_JAVA_DIR/unoloader.jar;
- [$OO_SDK_URE_JAVA_DIR/unoil.jar;]
- $CLASSPATH</i><br>
- <p>The classpath will be set or extended to the necessary jar files of
- the specified office installation. (<i>unoil.jar</i> is only included
- when OFFICE_HOME is set.)</p>
- </td>
- </tr>
- <tr valign="top">
- <td class="cell20">OFFICE_PROGRAM_PATH</td>
- <td class="cell80">=<i>$OFFICE_HOME/program</i><br>
- <p>This variable is used to find, for example, the office type library and
- the UNO package deployment tool. This variable is only relevant when
- OFFICE_HOME is set.</p>
- </td>
- </tr>
- <tr valign="top">
- <td class="cell20">UNO_PATH</td>
- <td class="cell80">=<i>$OFFICE_PROGRAM_PATH</i><br>
- <p>This variable is used to ensure that the new C++ UNO bootstrap
- mechanism uses the configured office installation of the SDK. Normally
- the bootstrap mechanism finds the default office installation for the
- user on the system. This variable is optional but is set from the scripts
- to ensure a homogeneous environment. Especially useful during development
- where you might have more than one office installation installed. This
- variable is only relevant when OFFICE_HOME is set.</p>
- </td>
- </tr>
- </table>
- <p class="head3">Environment Variables for UNIX</p>
- <p class="head4">Solaris</p>
- <table class="table4">
- <tr valign="top">
- <td class="cell20">LD_LIBRARY_PATH</td>
- <td class="cell80">=<i>$OO_SDK_URE_LIB_DIR: $OO_SDK_HOME/(solsparc|solintel)/lib: $LD_LIBRARY_PATH</i><br>
- <p>The LD_LIBRARY_PATH will be set or will be extended by the office/URE
- library path, the platform dependent lib directory for several additional
- libraries.</p>
- </td>
- </tr>
- <tr valign="top">
- <td class="cell20">PATH</td>
- <td class="cell80">=<i>$OO_SDK_HOME/(solsparc|solintel)/bin:$OO_SDK_MAKE_HOME: $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:] [$OO_SDK_JAVA_HOME/bin:] $OO_SDK_URE_BIN_DIR: $PATH</i></b><br>
- <p>The PATH variable will be extended by the paths for the SDK development
- tools, the compiler, the JDK, GNU make, the zip tool and the
- OO_SDK_URE_BIN_DIR, where the compiler or the JDK are
- optional.</p>
- </td>
- </tr>
- <tr>
- <td colspan="2" class="cell80">When OO_SDK_URE_HOME is set, the script
- additionally creates symbolic links to the public dynamic libraries of
- the URE in <i>$OO_SDK_HOME/(solsparc|solintel)/lib</i>, which are
- needed for linking.</td>
- </tr>
- </table>
- <p class="head4">Linux</p>
- <table class="table4">
- <tr valign="top">
- <td class="cell20">LD_LIBRARY_PATH</td>
- <td class="cell80">=<i>$OO_SDK_URE_LIB_DIR: $SDK_HOME/linux/lib: $LD_LIBRARY_PATH</i><br>
- <p>The LD_LIBRARY_PATH will be set or will be extended by the office/URE
- library path, the platform dependent lib directory for some additional
- libraries.</p>
- </td>
- </tr>
- <tr valign="top">
- <td class="cell20">PATH</td>
- <td class="cell80">=<i>$OO_SDK_HOME/linux/bin:$OO_SDK_MAKE_HOME: $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:] [$OO_SDK_JAVA_HOME/bin:] $OO_SDK_URE_BIN_DIR: $PATH</i><br>
- <p>The PATH variable will be extended by the paths for the SDK development
- tools, the compiler, the JDK, GNU make, the zip tool and the
- OO_SDK_URE_BIN_DIR, where the compiler and the JDK are
- optional.</p>
- </td>
- </tr>
- <tr>
- <td colspan="2" class="cell80">When OO_SDK_URE_HOME is set, the script
- additionally creates symbolic links to the public dynamic libraries of
- the URE in <i>$OO_SDK_HOME/linux/lib</i>, which are needed for
- linking.</td>
- </tr>
- </table>
- <p class="head3">Environment Variables for Windows</p>
- <table class="table4">
- <tr valign="top">
- <td class="cell20">PATH</td>
- <td class="cell80">=<i>%OO_SDK_HOME%\windows\bin; %OO_SDK_MAKE_HOME%; %OO_SDK_ZIP_HOME%; [%OO_SDK_CLI_HOME%;] [%OO_SDK_CPP_HOME%;] [%OO_SDK_JAVA_HOME%\bin;] %OO_SDK_URE_BIN_DIR%; %PATH%</i><br>
- <p>The PATH variable will be extended by the paths for the SDK development
- tools, the compiler, the JDK, GNU make, the zip tool and the
- OO_SDK_URE_BIN_DIR.</p>
- </td>
- </tr>
- <tr valign="top">
- <td class="cell20">LIB</td>
- <td class="cell80">=<i>%OO_SDK_HOME%\windows\lib; %LIB%</i><br>
- <p>The LIB variable will be extended by the path to the import libraries
- that are necessary for Windows.</p>
- </td>
- </tr>
- <tr valign="top">
- <td colspan="2" class="cell80">In addition to setting these environment
- variables, the script calls the &quot;<i>vcvar32.bat</i>&quot; batch file
- which is provided by the Microsoft Developer Studio to set the necessary
- environment variables for the compiler.</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing30" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td colspan="3">
- <div class="centertext">
- <p><img class="oraclelogo" src="images/odk-footer-logo.gif" title="Sponsored by Oracle" alt="Oracle Logo" />
- Copyright &copy; 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.<p>
- </div>
- </td>
- </tr>
-</table>
-<map name="Map">
- <area shape="rect" coords="10,68,93,105" href="http://www.oracle.com">
-</map>
-</body>
-</html>
diff --git a/odk/docs/notsupported.html b/odk/docs/notsupported.html
deleted file mode 100644
index 02a497c5..00000000
--- a/odk/docs/notsupported.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<html><head> <title>OpenOffice.org %PRODUCT_RELEASE% SDK - Not supported page</title> <link rel="stylesheet" type="text/css" href="sdk_styles.css"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="author" content="J&uuml;rgen Schmidt"> <meta name="created" content="2004-12-14"></head><body class="sdkbody"><table class="table1" cellpadding=0> <tr style="background-image:url(images/sdk_head-2.gif); backgorund-position: bottom; "> <td colspan="2" align="left"><img src="images/sdk_head-1.gif" width="335" height="109" usemap="#Map" border="0"></td> <td align=right><img src="images/sdk_head-3.gif" width="32" height="109"></td> </tr> <tr> <td colspan="3"><img class="nothing10" src="images/nada.gif"></td> </tr> <tr> <td colspan="3"> <table class="table2"> <tr> <td> <p align="center"><a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a></p> </td> </tr> <tr> <td><img class="nothing8" src="images/nada.gif"></td> </tr> <tr> <td> <p class="note">This page is currently not supported!</p> </td> </tr> </table> </td> </tr> <tr> <td colspan="3"><img class="nothing30" src="images/nada.gif"></td> </tr> <tr> <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td> </tr> <tr> <td colspan="3"> <div class="centertext">
- <p><img class="oraclelogo" src="images/odk-footer-logo.gif" title="Sponsored by Oracle" alt="Oracle Logo" />
- Copyright &copy; 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.<p>
- </div> </td> </tr></table><map name="Map"> <area shape="rect" coords="10,68,93,105" href="http://www.sun.com"></map></body></html>
diff --git a/odk/docs/sdk_styles.css b/odk/docs/sdk_styles.css
deleted file mode 100644
index 9a02576b..00000000
--- a/odk/docs/sdk_styles.css
+++ /dev/null
@@ -1,130 +0,0 @@
-a { text-decoration: none; }
-a:link { color: #0e85cd; }
-a:visited { color: #638093; }
-a:active { color: #4dadea; }
-
-.sdkbody { background-color: #FFFFFF;
- color: #000000;
- margin-top: 0;
- margin-bottom: 0;
- margin-left: 0;
- margin-right: 0;
- font-family: Arial, Helvetica, sans-serif; }
-
-.note { font-size: 20;
- font-weight: bold;
- font-style: italic;
- text-align: center; }
-
-.table1 { width: 100%;
- border-style: none;
- border-spacing: 0;
- padding: 0; }
-
-.table2 { width: 100%;
- border-style: none;
- border-spacing: 8;
- padding: 5; }
-
-.table3 { width: 100%;
- border-style: none;
- border-spacing: 6;
- padding: 0; }
-
-.table4 { width: 100%;
- border-width: 2px;
- border-style: groove;
- border-color: #CCCCCC;
- border-spacing: 0;
- border-collapse: collapse; }
-
-.cell15 { width: 15%;
- border-width: 2px;
- border-style: groove;
- border-color: #CCCCCC;
- border-spacing: 0;
- border-collapse: collapse;
- padding: 4; }
-
-.cell20 { width: 20%;
- border-width: 2px;
- border-style: groove;
- border-color: #CCCCCC;
- border-spacing: 0;
- border-collapse: collapse;
- padding: 4; }
-
-.cell80 { width: 80%;
- border-width: 2px;
- border-style: groove;
- border-color: #CCCCCC;
- border-spacing: 0;
- border-collapse: collapse;
- padding: 4; }
-
-.cell85 { width: 85%;
- border-width: 2px;
- border-style: groove;
- border-color: #CCCCCC;
- border-spacing: 0;
- border-collapse: collapse;
- padding: 4; }
-
-.nothing1 { width: 20;
- height: 1; }
-
-.nothing8 { width: 20;
- height: 8; }
-
-.nothing10 { width: 20;
- height: 10; }
-
-.nothing30 { width: 20;
- height: 30; }
-
-
-.appicon { width: 32;
- height: 32;
- border: 0; }
-
-.line { width: 100%;
- height: 5;
- border: 0;
- vertical-align: middle; }
-
-
-.arrow { width: 16;
- height: 13; }
-
-.head1 { font-size: 20;
- font-weight: bold; }
-
-.head2 { font-size: 18;
- font-weight: bold; }
-
-.head3 { font-size: 17;
- font-weight: bold; }
-
-.head4 { font-size: 16;
- font-weight: bold; }
-
-.thead { font-weight: bold;
- background-image:url(../docs/images/bg_table.png);
- backgorund-position: middle; }
-
-.navigate { border: 0; }
-
-.content1 { width: 1%; }
-.content3 { width: 3%; }
-.content4 { width: 4%; }
-.content10 { width: 10%; }
-.content20 { width: 20%; }
-.content70 { width: 70%; }
-.content75 { width: 75%; }
-.content80 { width: 80%; }
-.content87 { width: 87%; }
-
-.centertext {align:center; text-align:center; font-size: 12;}
-.oraclelogo {vertical-align:middle;}
-
-
diff --git a/odk/docs/tools.html b/odk/docs/tools.html
deleted file mode 100644
index 6ff9060f..00000000
--- a/odk/docs/tools.html
+++ /dev/null
@@ -1,1094 +0,0 @@
-<html>
-<head>
- <title>OpenOffice.org %PRODUCT_RELEASE% SDK - Development Tools</title>
- <link rel="stylesheet" type="text/css" href="sdk_styles.css">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="author" content="J&uuml;rgen Schmidt">
-</head>
-
-<body class="sdkbody"><a name="tools"/>
-<table class="table1" cellpadding=0>
- <tr style="background-image:url(images/sdk_head-2.png)">
- <td colspan="3" align="left"><img src="images/sdk_head-1.png" width="800" height="120" usemap="#Map" border="0"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing10" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="3"><img class="nothing1" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1">Development Tools</td>
- <td align="right"><a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#unopkg" title="link to the unopkg tool description">unopkg</a></td>
- <td class="content87">The new UNO package deployment tool. It comes
- with the office installation and can be found in the program
- directory of the office installation.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#unoexe" title="link to the uno tool description">uno</a></td>
- <td class="content87">Tool to provide a UNO runtime environment and
- provide configured (deployed) or single components. This tool
- comes with the office installation and can be found in the program
- directory of the office installation.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#regmerge" title="link to the regmerge tool description">regmerge</a></td>
- <td class="content87">Tool to merge several registry (e.g. type
- libraries) files into one file. <b>Note:</b> Since OpenOffice.org 3 it is not longer part of the SDK but it comes directly with the office as part of the <b>ure</b>.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#regview" title="link to the regview tool description">regview</a></td>
- <td class="content87">Tool to view the content of a registry file
- in a human readable manner. Special support for type library
- nodes. <b>Note:</b> Since OpenOffice.org 3 it is not longer part of the SDK but it comes directly with the office as part of the <b>ure</b>.</td>
- </tr>
- <tr valign="middle">
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#idlc" title="link to the idlc tool description">idlc</a></td>
- <td class="content87">The UNOIDL compiler, generates a common
- binary type library format as base for all codemaker tools and
- the UNO runtime type library.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#cppumaker" title="link to the cppumaker tool description">cppumaker</a></td>
- <td class="content87">Tool for generating C++ code for the UNOIDL
- types stored in a type library.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#javamaker" title="link to the javamaker tool description">javamaker</a></td>
- <td class="content87">Tool for generating Java class files for the
- UNOIDL types stored in a type library.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#climaker" title="link to the climaker tool description">climaker</a></td>
- <td class="content87">Tool for generating CLI assemblies for the
- UNOIDL types stored in a type library (windows only).</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#uno-skeletonmaker" title="link to the uno-skeletonmaker tool description">uno-skeletonmaker</a></td>
- <td class="content87">Tool for dumping type definitions on stdout or generating complete code skeletons for Java/C++.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#regcomp" title="link to the regcomp tool description">regcomp</a></td>
- <td class="content87">A simple UNO component registration tool.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#regmerge" title="link to the regmerge tool description">regmerge</a></td>
- <td class="content87">Tool to merge several registry (e.g. type
- libraries) files into one file.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#regview" title="link to the regview tool description">regview</a></td>
- <td class="content87">Tool to view the content of a registry file
- in a human readable manner. Special support for type library
- nodes.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="images/arrow-1.gif"></td>
- <td><a href="#autodoc" title="link to the autodoc tool description">autodoc</a></td>
- <td class="content87">Tool to generate javadoc-like documentation
- for C/C++ and UNOIDL files.</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="unopkg"/>unopkg</td>
- <td align="right">
- <a style="a:link:visited #FFFFFF;" href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a></td>
- </tr>
- <tr>
- <td colspan="3">
- <p>'unopkg' is a tool for easy deployment of UNO packages in an existing
- office installation. UNO packages are UNO components (single libraries or
- Jar files or more complex zip files that contains one or more libraries|
- Jar files, type libraries and configuration items), scripts and
- OpenOffice.org %PRODUCT_RELEASE% Basic libraries as zip package. 'unopkg' is not part of the
- SDK but comes with the office directly and is a development tool as well
- as an end user tool to deploy extension into an office installation.</p>
- <p>More details concerning deployment and this tool can be find in the
- Developer's Guide: <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/unopkg" title="link to the &quot;Extension Manager - unopkg&quot; chapter in the Developer's Guide">Extension Manager - <i>unopkg</i></a>.</p>
- <p><b>Note:</b> This tool works only in the <i>&lt;office&gt;/program</i>
- directory!</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>
- unopkg add &lt;options&gt; package-path...<br>
- unopkg remove &lt;options&gt; package-name...<br>
- unopkg list &lt;options&gt; package-name...<br>
- unopkg reinstall &lt;options&gt;<br>
- unopkg gui<br>
- unopkg -V<br>
- unopkg -h<br>
- </code></b>
- </blockquote>
- <p class="head2">Sub-commands:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>add</code></td>
- <td class="cell85">add packages</td>
- </tr>
- <tr>
- <td class="cell15"><code>remove</code></td>
- <td class="cell85">remove packages by name</td>
- </tr>
- <tr>
- <td class="cell15"><code>reinstall</code></td>
- <td class="cell85">export feature: reinstall all deployed
- packages</td>
- </tr>
- <tr>
- <td class="cell15"><code>list</code></td>
- <td class="cell85">list information about deployed packages</td>
- </tr>
- <tr>
- <td class="cell15"><code>gui</code></td>
- <td class="cell15">raise Package Manager Graphical User Interface
- (GUI)</td>
- </tr>
- </table>
- </p>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-h, --help</code></td>
- <td class="cell85">show this help on the command line</td>
- </tr>
- <tr>
- <td class="cell15"><code>-V, --version</code></td>
- <td class="cell85">shows version information
- </td>
- </tr>
- <tr>
- <td class="cell15"><code>-v, --verbose</code></td>
- <td class="cell85">dump verbose output to stdout</td>
- </tr>
- <tr>
- <td class="cell15"><code>-f, --force</code></td>
- <td class="cell85">force overwriting existing packages</td>
- </tr>
- <tr>
- <td class="cell15"><code>--log-file &lt;file&gt;</code></td>
- <td class="cell85">custom log file; default:
- <i>&lt;cache-dir&gt/log.txt</i>.</td>
- </tr>
- <tr>
- <td class="cell15"><code>--shared</code></td>
- <td class="cell85">expert feature: operate on shared installation
- deployment context; run only when no concurrent Office process(es) are
- running!</td>
- </tr>
- <tr>
- <td class="cell15"><code>--deployment-context &lt;context&gt</code>
- </td>
- <td class="cell85">expert feature: explicit deployment context</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="unoexe"/>uno</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The UNO-starter is for running a component or service process, and
- providing a runtime environment. Raising a component might look like
- this </p>
- <p><code>[c:\] uno.exe -c MyComponent -l mycomp.dll -r myregistry.rdb
- -- foo bar</code></p>
- <p>or</p>
- <p><code>[c:\] uno.exe -s foo.bar.FooBarService -r myregistry.rdb
- -- foo bar</code></p>
- <p>The starter loads the component and instantiates it. The component
- must export the interface <a href="common/ref/com/sun/star/lang/XMain.html" title="link into the IDL reference to the interface com.sun.star.lang.XMain">com.sun.star.lang.XMain</a>:</p>
- <p>
- <code>interface XMain : com::sun::star::uno::XInterface <br>
- { <br>
- &nbsp;&nbsp;&nbsp; /** This method is called to run the component.<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @param aArguments command line arguments <br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @return process error code to be returned to system <br>
- &nbsp;&nbsp;&nbsp; */ <br>
- &nbsp;&nbsp;&nbsp; long run( [in] sequence&lt; string &gt; arguments ); <br>
- };
- </code>
- </p>
- <p>Method run() will be called and returns the error code given, back
- to the system. If the uno starter is executed with the -u (URL) option,
- then XInitialization is used instead of XMain. The -u option is described
- later.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>uno (-c&lt;ComponentImplementationName&gt; -l &lt;LocationUrl&gt;
- | -s &lt;ServiceName&gt;) <br>
- [-ro &lt;ReadOnlyRegistry1&gt;] [-ro &lt;ReadOnlyRegistry2&gt;] ... [-rw &lt;ReadWriteRegistry&gt;]<br>
- [-u uno:(socket[,host=&lt;HostName&gt;][,port=&lt;nnn&gt;]|pipe[,name=&lt;PipeName&gt;]);iiop|urp;&lt;Name&gt;<br>
- [--singleaccept] [--singleinstance]] <br>
- [-- &lt;Argument1 Argument2 ...&gt;]
- </code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>&lt;HostName&gt;</code></td>
- <td class="cell85">Specifying a host name might be necessary to
- distinguish the network interface to be used,if a machine is part of
- two networks.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;PipeName&gt;</code></td>
- <td class="cell85">Name of a named pipe.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;Name&gt;</code></td>
- <td class="cell85">Identifier for demanded called component
- instances.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;Registries&gt;</code></td>
- <td class="cell85">The optional <code>&lt;Registries&gt;</code>
- (e.g., c:\myreg.rdb) are used by the ServiceManager. The <i>ro</i>
- ones are opened for reading only; whereas, a single <i>rw</i> one
- will be opened for reading and writing. If the <i>rw</i> one does
- not exist, then it may be created. Components may read and write to
- store their persistent state.</td>
- </tr>
- <tr>
- <td class="cell15"><code>--singleaccept</code></td>
- <td class="cell85">The uno starter will accept one connection,
- provide the component instance and die.</td>
- </tr>
- <tr>
- <td class="cell15"><code>--singleinstance</code></td>
- <td class="cell85">The uno starter will accept any number of
- connections, but will provide the same single component instance any
- time instead of creating a new instance for each connection.</td>
- </tr>
- </table>
- <p><b>Service <a href="common/ref/com/sun/star/bridge/UnoUrlResolver.html" title="link into the IDL reference to the service com.sun.star.bridge.UnoUrlResolver">com.sun.star.bridge.UnoUrlResolver</a></b></p>
- <p>You can easily connect to a server started with the
- <code>-u (url)</code> option by using this service, giving the same url
- to resolve. The service provides you an instance from remote.</p>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="idlc"/>idlc</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>'idlc' is the UNOIDL compiler. It is a full featured compiler used
- to check UNODL type definitions and transform valid type definitions
- into a binary type library format, which is later used by all codemaker
- tools. It is also used as a dynamic type library for UNO at runtime.<br>
- You can find a syntax description for UNOIDL <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/AppendixD/UNOIDL_Syntax_Specification" title="link to the &quot;UNOIDL Syntax Specification&quot; chapter in the Developer's Guide">here</a>.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>idlc [-options] file_1 ... file_n | @&lt;filename&gt;</code></b>
- </blockquote>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>file_1 ... file_n</code></td>
- <td class="cell85">specifies one or more idl files. Only files with
- the extension '.idl' are valid.</td>
- </tr>
- <tr>
- <td class="cell15"><code>@&lt;filename&gt;</code></td>
- <td class="cell85">filename specifies the name of a command
- file.</td>
- </tr>
- </table>
- </p>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-O&lt;path&gt;</code></td>
- <td class="cell85">path describes the output directory. The
- generated output is a registry file with the same name as the idl
- input file.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-I&lt;path&gt;</code></td>
- <td class="cell85">path specifies a directory where included files
- that will be searched by the preprocessor are located. Multiple
- directories can be combined with ';'.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-D&lt;name&gt;</code></td>
- <td class="cell85">name defines a macro for the preprocessor.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-C</code></td>
- <td class="cell85">generates complete type information, including
- additional service information and documentation.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-h|?</code></td>
- <td class="cell85">print this help message and exit.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="cppumaker"/>cppumaker</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The 'cppumaker' generates a C++ representation for idl types. The
- cppumaker works on a typelibrary, which is generated by the UNOIDL
- compiler (<a href="#idlc" link="link to the idlc tool description">
- idlc</a>). It generates the output for all specified types and for all
- types the specified types depend on.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>cppumaker [-options] file_1 ... file_n</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-O&lt;path&gt;</code></td>
- <td class="cell85">path describes the root directory for the
- generated output. The output directory tree is generated under this
- directory.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-T&lt;name&gt;<br>
- |-T&lt;t1&gt;;&lt;t2&gt;...</code></td>
- <td class="cell85">name specifies a type or a list of types. The
- output for this type and all dependent types are generated. If no '-T'
- option is specified, then output for all types is generated. It is also
- possible to use a wildcard 'xy.*' to generate a complete module
- inclusive all subdirectories. The use of '-T*' is equivalent to no '-T'
- option. Example: 'com.sun.star.uno.XInterface' or
- 'com.sun.star.uno.*' are valid types.
- </td>
- </tr>
- <tr>
- <td class="cell15"><code>-B&lt;name&gt;</code></td>
- <td class="cell85">name specifies the base node. All types are
- searched under this node. Default is the root '/' of the registry
- files.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-L</code></td>
- <td class="cell85">UNO type functions are generated lightweight, that
- means only the name and typeclass are given and everything else is
- retrieved from the type library dynamically. The default is that UNO
- type functions provides enough type information for boostrapping C++.
- '-L' should be the default for external components.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-C</code></td>
- <td class="cell85">UNO type functions are generated comprehensive
- that means all necessary information is available for bridging the
- type in UNO.
- </td>
- </tr>
- <tr>
- <td class="cell15"><code>-G</code></td>
- <td class="cell85">generate only target files which do not
- exist.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-Gc</code></td>
- <td class="cell85">generate only target files whose content will
- be changed.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-X&lt;name&gt;</code></td>
- <td class="cell85">extra types, which are not be taken into account
- for generation.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="javamaker"/>javamaker</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The 'javamaker' generates the appropriate Java class file for each idl
- type. The javamaker works on a typelibrary which is generated by the
- UNOIDL compiler (<a href="#idlc" link="link to the idlc tool description">
- idlc</a>). It generates the output for all specified types and for all
-types the specified types depend on.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>javamaker [-options] file_1 ... file_n -Xfile_n+1 -Xfile_n+2</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-O&lt;path&gt;</code></td>
- <td class="cell85">path describes the root directory for the
- generated output. The output directory tree is generated under this
- directory.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-T&lt;name&gt;|-T&lt;t1&gt;;&lt;t2&gt;...</code></td>
- <td class="cell85">name specifies a type or a list of types. The
- output for this type and all dependent types are generated. If no '-T'
- option is specified, then output for all types is generated. It is also
- possible to use a wildcard 'xy.*' to generate a complete module
- inclusive all subdirectories. The use of '-T*' is equivalent to no '-T'
- option. Example: 'com.sun.star.uno.XInterface'
- or 'com.sun.star.uno.*' are valid types.
- </td>
- </tr>
- <tr>
- <td class="cell15"><code>-B&lt;name&gt;</code></td>
- <td class="cell85">name specifies the base node. All types are
- searched under this node. Default is the root '/' of the registry
- files.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-nD</code></td>
- <td class="cell85">no dependent types are generated.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-G</code></td>
- <td class="cell85">generate only target files which do not
- exist.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-Gc</code></td>
- <td class="cell85">generate only target files whose content will
- be changed.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-X&lt;name&gt;</code></td>
- <td class="cell85">extra types, which will not be taken into account
- for generation.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="climaker"/>climaker</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The 'climaker' (windows only) generates the appropriate CLI assemblies file for each idl
- type. The climaker works on a typelibrary which is generated by the
- UNOIDL compiler (<a href="#idlc" link="link to the idlc tool description">
- idlc</a>). It generates the output for all specified types and for all
- types the specified types depend on.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>climaker &lt;switches&gt; [registry-file-1 registry-file-2 ...]</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-O, --out &lt;output_file&gt;</code></td>
- <td class="cell85">output assembly file;<br>
- defaults to cli_unotypes.dll if more than one registry-file is given, else &lt;registry-file&gt;.dll</td>
- </tr>
- <tr>
- <td class="cell15"><code>-T, --types &lt;type1[;type2;...]&gt;</code></td>
- <td class="cell85">types to be generated (if none is given,
- then all types of given registries are emitted</td>
- </tr>
- <tr>
- <td class="cell15"><code>-X, --extra &lt;rdb-file&gt;></code></td>
- <td class="cell85">additional rdb to saturate referenced types in
- given registry file(s); these types will not be
- emitted into the output assembly file</td>
- </tr>
- <tr>
- <td class="cell15"><code>-r, --reference &lt;assembly-file&gt;</code></td>
- <td class="cell85">reference metadata from assembly file</td>
- </tr>
- <tr>
- <td class="cell15"><code>-k, --keyfile</code></td>
- <td class="cell85">keyfile needed for strong name</td>
- </tr>
- <tr>
- <td class="cell15"><code>--assembly-version &lt;version&gt;</code></td>
- <td class="cell85">sets assembly version</td>
- </tr>
- <tr>
- <td class="cell15"><code>--assembly-description &lt;text&gt;</code></td>
- <td class="cell85">sets assembly description text</td>
- </tr>
- <tr>
- <td class="cell15"><code>--assembly-product &lt;text&gt;</code></td>
- <td class="cell85">sets assembly product name</td>
- </tr>
- <tr>
- <td class="cell15"><code>--assembly-company &lt;text&gt;</code></td>
- <td class="cell85">sets assembly company</td>
- </tr>
- <tr>
- <td class="cell15"><code>--assembly-copyright &lt;text&gt;</code></td>
- <td class="cell85">sets assembly copyright</td>
- </tr>
- <tr>
- <td class="cell15"><code>--assembly-trademark &lt;text&gt;</code></td>
- <td class="cell85">sets assembly trademark</td>
- </tr>
- <tr>
- <td class="cell15"><code>-v, --verbose</code></td>
- <td class="cell85">verbose output to stdout</td>
- </tr>
- <tr>
- <td class="cell15"><code>-h, --help</code></td>
- <td class="cell85">this message</td>
- </tr>
-
- </table>
- </p>
- <p><b>Example:</b> <code>climaker --out cli_mytypes.dll --reference cli_uretypes.dll --extra types.rdb mytypes.rdb</code></p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="uno-skeletonmaker"/>uno-skeletonmaker</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The 'uno-skeletonmaker' is a tool to simplify the UNO component development. It has different modes, from simply dumping code definitions for different languages on stdout up to generating complete code skeletons. The generation of code skeletons support common component skeletons as well as specialized skeletons for special service provider interfaces.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>
- uno-skeletonmaker (-env:INIFILENAME=&lt;url&gt; | -env:UNO_TYPES=&lt;url>) dump [&lt;options>] -t &lt;type&gt; ...<br>
- uno-skeletonmaker (-env:INIFILENAME=&lt;url&gt; | -env:UNO_TYPES=&lt;url&gt;) component [&lt;options&gt;] -n &lt;name&gt; -t &lt;type&gt; ...<br>
- uno-skeletonmaker (-env:INIFILENAME=&lt;url&gt; | -env:UNO_TYPES=&lt;url&gt;) calc-add-in [&lt;options&gt;] -n &lt;name&gt; -t &lt;add-in_service&gt;<br>
- uno-skeletonmaker (-env:INIFILENAME=&lt;url&gt; | -env:UNO_TYPES=&lt;url&gt;) add-on [&lt;options&gt;] -n &lt;name&gt; -p &lt;protocol_name:command,...&gt;
- uno-skeletonmaker -V, --version<br>
- uno-skeletonmaker -h, --help<br>
- </code></b>
- </blockquote>
- <p class="head2">Sub-commands:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>dump</code></td>
- <td class="cell85">dump declarations on stdout (e.g. constructors, methods, type mapping for properties) or complete method bodies with method forwarding.</td>
- </tr>
- <tr>
- <td class="cell15"><code>component</code></td>
- <td class="cell85">generates language specific code skeleton files using the implementation name as the file and class name</td>
- </tr>
- <tr>
- <td class="cell15"><code>calc-add-in</code></td>
- <td class="cell85">generates a language specific code skeleton for a Calc Add-Ins using the implementation name as the file and class name. A service type is necessary, referencing an interface which defines the new add-in functions.</td>
- </tr>
- <tr>
- <td class="cell15"><code>add-on</code></td>
- <td class="cell85">generates a language specific code skeleton for an add-on compnent using the implementation name as the file and class name. The protocol name(s) and the corresponding command(s) have to be specified with the '-p' option.</td>
- </tr>
- </table>
- </p>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-env:INIFILENAME=&lt;url&gt;</code></td>
- <td class="cell85">url specifies a URL to an UNO ini|rc file of an existing UNO environment (URE, office installation).</td>
- </tr>
- <tr>
- <td class="cell15"><code>-env:UNO_TYPES=&lt;url&gt;</code></td>
- <td class="cell85">url specifies a binary type library file. It can be a space separated list of urls.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-a, --all</code></td>
- <td class="cell85">list all interface methods, not only the direct ones</td>
- </tr>
- <tr>
- <td class="cell15"><code>--(java4|java5|cpp)</code></td>
- <td class="cell85">select the target language<br>
- --java4 generate output for Java 1.4 or earlier<br>
- --java5 generate output for Java 1.5 or later (is currently the default)<br>
- --cpp generate output for C++</td>
- </tr>
- <tr>
- <td class="cell15"><code>-sn, --shortnames</code></td>
- <td class="cell85">using namespace abbreviation 'css:': for '::com::sun::star::', only valid for sub-command 'dump' and target language 'cpp'. It is default for the sub-command 'component'.</td>
- </tr>
- <tr>
- <td class="cell15"><code>--propertysetmixin</code></td>
- <td class="cell85">the generated skeleton implements the cppu::PropertySetMixin helper if a referenced new style service specifies an interface which provides attributes (directly or inherited).</td>
- </tr>
- <tr>
- <td class="cell15"><code>-lh --licenseheader</code></td>
- <td class="cell85">generates a default OpenOffice.org LGPL license header at the beginning of a component source file. This option is taken into account in 'component' mode only and if -o is unequal 'stdout'.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-bc<br>--backward-compatible</code></td>
- <td class="cell85">specifies that the generated calc add-in is backward compatible to older office versions and implement the former required add-in interfaces where the implementation is mapped on the new add-in configuration. In this case the config schema needs to be bundled with the extension add-in as well. Default is a minimal add-in component skeleton based on the add-in configuration coming with the office since OO.org 2.0.4.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-o &lt;path&gt;</code></td>
- <td class="cell85">path specifies an existing directory where the output files are generated to, only valid for sub-command 'component'. If path=stdout the generated code is generated on standard out instead of a file.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-l &lt;file&gt;</code></td>
- <td class="cell85">specifies a binary type library (can be used more than once). The type library is integrated as an additional type provider in the bootstrapped type system.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-n &lt;name&gt;</code></td>
- <td class="cell85">specifies an implementation name for the component (used as classname, filename and package|namespace name). In 'dump' mode it is used as classname (e.g. &quot;MyBase::&quot;, C++ only) to generate method bodies not inline.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-d &lt;name&gt;</code></td>
- <td class="cell85">specifies a base classname or a delegator. In 'dump' mode it is used as a delegator to forward methods. It can be used as '&lt;name&gt;::' for base forwarding, or '&lt;name&gt;-&gt;|.' for composition. Using &quot;_&quot; means that a default bodies with default return values are dumped.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-t &lt;name&gt;</code></td>
- <td class="cell85">specifies an UNOIDL type name, e.g. com.sun.star.text.XText (can be used more than once).</td>
- </tr>
- <tr>
- <td class="cell15"><code>-p &lt;protocol:cmd(s)&gt;</code></td>
- <td class="cell85">specifies an add-on protocol name and the corresponding command names, where the commands are a ',' separated list of unique commands. This option is only valid for add-ons.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-V, --version</code></td>
- <td class="cell85">print version number and exit.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-h, --help</code></td>
- <td class="cell85">print this help and exit.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="regcomp"/>regcomp</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>'regcomp' is a tool to register|revoke external UNO components
- into|from a registry which is used in a UNO environment.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>regcomp -revoke [-br&lt;registryfile&gt;] -r &lt;registryfile&gt; -c &lt;locationUrl&gt;[-l&lt;componentLoaderName&gt;]</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-register|revoke</code></td>
- <td class="cell85">register means that the components will be
- installed and revoke means that they will be removed.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-br&lt;registryfile&gt;</code></td>
- <td class="cell85">the name of the registry used for bootstrapping
- the program. If the bootstrap registry is specified and has the same
- name as the registration registry, '-r' is optional.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-r&lt;registryfile&gt;</code></td>
- <td class="cell85">the name of the registry (will be created if
- it does not exist) where the component should be registered.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-c&lt;locationUrls&gt;</code></td>
- <td class="cell85">the location of a component (DLL, Class name,
- or an url of a jar file) or a list of urls separated by ';'s. Note
- that, if a list of urls is specified, the components must all need
- the same loader.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-l&lt;componentLoaderName&gt;</code></td>
- <td class="cell85">the name of the needed loader, if no loader is
- specified the 'com.sun.star.loader.SharedLibrary' is used. Supported
- loaders: 'com.sun.star.loader.SharedLibrary' |
- 'com.sun.star.loader.Java'.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="regmerge"/>regmerge</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>'regmerge' is a small tool to merge different registry files under a
- specified key into another registry file. If a value already exists in
- the target file the value is overwritten by the value of the source
- file.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>regmerge [-v|--verbose] &lt;mergefile&gt; &lt;mergeKeyName&gt; &lt;regfile_1&gt; ... &lt;regfile_n&gt;</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15"><code>-v|--verbose</code></td>
- <td class="cell85">verbose output on stdout.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;mergefile&gt;</code></td>
- <td class="cell85">specifies the merged registry file. If this file
- doesn't exist, it is created.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;mergeKeyName&gt;</code></td>
- <td class="cell85">specifies the merge key, everything is merged
- under this key. If this key doesn't exist, it is created.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;regfile_1&gt; ... &lt;regfile_n&gt;</code></td>
- <td class="cell85">specifies one or more registry files that are
- merged.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="regview"/>regview</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>'regview' is a tool to show the contents of a registry file. The tool
- dumps the hierarchical structure and the values of the nodes in a human
- readable manner to stdout.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>regview &lt;registryfile&gt; [&lt;keyName&gt;]</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table class="table4">
- <tr>
- <td class="cell15">-br&lt;registryfile&gt;</code></td>
- <td class="cell85">the name of the registry whose contents should
- be viewed.</td>
- </tr>
- <tr>
- <td class="cell15"><code>&lt;keyName&gt;</code></td>
- <td class="cell85">the name of a registry key. The name must be
- fully qualified; for example, '/' means the root key and
- '/UCR/com/sun/star/uno/XInterface' shows the type specification of the
- XInterface type. If no key is specified, the tool dumps the whole
- content of the registry file.</td>
- </tr>
- </table>
- </p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="2" class="head1"><a name="autodoc"/>autodoc</td>
- <td align="right">
- <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The 'autodoc' tool is used for creating javadoc-like documentation
- from C++ and UNOIDL source code.</p>
- <p>There are some conventions to follow when documenting C++- or
- UNOIDL-sourcecode. See also the <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/AppendixB/IDL_Documentation_Guidelines" title="link to the UNOIDL Documentation Guidelines">UNOIDL Documentation Guidelines</a>.<br>
- If you are not familiar with these, but do know javadoc: For simple C++
- sourcecode documentation, using javadoc-style comments will work.</p>
- <p class="head2">Usage:</p>
- <blockquote>
- <b><code>autodoc [ -v &lt;VerboseNr&gt; ] [ -name "&lt;TitleForTheDocu&gt;" ] -html &lt;OutputDirectory&gt; -lg &lt;SourcecodeLanguage&gt;<br>
- { [ -p &lt;ProjectName&gt; &lt;ProjectRootDirectory&gt; ] &nbsp;-t &lt;SourceTree&gt;* | -d &lt;SourceDirectory&gt;* | -f &lt;SourceFile&gt;* }*</code></b>
- </blockquote>
- <p class="head2">Options:</p>
- <p>
- <table width="100%" border="1" cellpadding="4" cellspacing="0">
- <tr>
- <td class="cell15"><code>-v &lt;VerboseNr&gt;</code></td>
- <td class="cell85">&lt;VerboseNr&gt; == 5 displays the parsed source
- code tokens, so you can locate which piece caused an parsing error.<br>
- &lt;VerboseNr&gt; == 2 displays not only the parsed source code,
- but also the comments.<br><br>
- This option must be the first one, if it is used.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-name "&lt;Title&gt;"</code></td>
- <td class="cell85">&lt;Title&gt; occurs as the title of the start
- page of the HTML output. If this option is omitted, a default title is
- created.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-html &lt;OutputDirectory&gt;</code></td>
- <td class="cell85">specifies the root directory where the HTML output
- is created.<br>
- Autodoc does not remove old files there, though it overwrites them.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-lg &lt;SourcecodeLanguage&gt;</code></td>
- <td class="cell85">Possible values are: c++ | idl.<br><br>
- This also specifies which files will be parsed: &quot;c++&quot; parses
- all files with the endings .hxx and .h, &quot;idl&quot; parses all
- files with the ending '.idl' .<br>
- To change this behaviour, see at option <code>-f</code>.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-p &lt;ProjectName&gt; &lt;ProjectDirectory&gt;</code></td>
- <td class="cell85">this option can be used to divide large code
- bases into different projects.<br>
- &lt;ProjectName&gt; gives a user-defined name for the project.<br>
- &lt;ProjectDirectory&gt; is the root to which all paths, given with the
- following options <code>-t,-d</code> and <code>-f</code>, are
- relative.<br>
- This option can be omitted when there are no projects and all paths in
- the following options are relative to the working directory.<br><br>
- The &quot;{ ... }*&quot; around the options <code>-p,-t,-d,-f</code>
- indicates, that this whole block of options can be repeated, each block
- starting with a new <code>-p</code>.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-t &lt;SourceTree&gt;</code></td>
- <td class="cell85">specifies that all files in the directory
- &lt;SourceTree&gt; and it's subdirectories are parsed, where the file
- ending matches the option <code>-lg</code>.<br>
- There can be given multiple directories after one <code>-t</code>
- option.<br>
- All relative paths &nbsp;are relative to the project-rootdirectory,
- given with the <code>-p</code> option.<br>
- </td>
- </tr>
- <tr>
- <td class="cell15"><code>-d &lt;SourceDirectory&gt;</code></td>
- <td class="cell85">Specifies that all files in th directory
- &lt;SourceDirectory&gt;, but NOT it's subdirectories, are parsed, where
- the file ending matches the option <code>-lg</code>.<br>
- There can be multiple directories given after one <code>-d</code>
- option.<br>
- All relative paths &nbsp;are relative to the project-rootdirectory,
- given with the <code>-p</code> option.</td>
- </tr>
- <tr>
- <td class="cell15"><code>-f &lt;SourceFile&gt;</code></td>
- <td class="cell85">parses the given file. The ending does not have
- to match the <code>-lg</code> option.<br>
- There can be multiple files given after one <code>-f</code> option.<br>
- All relative paths &nbsp;are relative to the project-rootdirectory,
- given with the <code>-p</code> option.</td>
- </tr>
- </table>
- </p><b>Remark:</b> The sequence of options matters! Use them in the order given
- in the &quot;Usage&quot;-paragraph.</p>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td colspan="3">
- <div class="centertext">
- <p><img class="oraclelogo" src="images/odk-footer-logo.gif" title="Sponsored by Oracle" alt="Oracle Logo" />
- Copyright &copy; 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.<p>
- </div>
- </td>
- </tr>
-</table>
-<map name="Map">
- <area shape="rect" coords="10,68,93,105" href="http://www.oracle.com">
-</map>
-</body>
-</html>
diff --git a/odk/examples/CLI/CSharp/Spreadsheet/GeneralTableSample.cs b/odk/examples/CLI/CSharp/Spreadsheet/GeneralTableSample.cs
deleted file mode 100644
index ced0edf9..00000000
--- a/odk/examples/CLI/CSharp/Spreadsheet/GeneralTableSample.cs
+++ /dev/null
@@ -1,206 +0,0 @@
-
-using System;
-
-
-// __________ implementation ____________________________________
-
-/** Create a spreadsheet document and provide access to table contents.
- */
-public class GeneralTableSample : SpreadsheetDocHelper
-{
-
- public static void Main( String [] args )
- {
- try
- {
- using ( GeneralTableSample aSample =
- new GeneralTableSample( args ) )
- {
- aSample.doSampleFunction();
- }
- Console.WriteLine( "Sample done." );
- }
- catch (Exception ex)
- {
- Console.WriteLine( "Sample caught exception! " + ex );
- }
- }
-
-// ________________________________________________________________
-
- public GeneralTableSample( String[] args ) : base( args )
- {
- }
-
-// ________________________________________________________________
-
- /// This sample function modifies cells and cell ranges.
- public void doSampleFunction()
- {
- // for common usage
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
- unoidl.com.sun.star.beans.XPropertySet xPropSet = null;
- unoidl.com.sun.star.table.XCell xCell = null;
- unoidl.com.sun.star.table.XCellRange xCellRange = null;
-
- // *** Access and modify a VALUE CELL ***
- Console.WriteLine( "*** Sample for service table.Cell ***" );
-
- xCell = xSheet.getCellByPosition( 0, 0 );
- // Set cell value.
- xCell.setValue( 1234 );
-
- // Get cell value.
- double nDblValue = xCell.getValue() * 2;
- xSheet.getCellByPosition( 0, 1 ).setValue( nDblValue );
-
- // *** Create a FORMULA CELL and query error type ***
- xCell = xSheet.getCellByPosition( 0, 2 );
- // Set formula string.
- xCell.setFormula( "=1/0" );
-
- // Get error type.
- bool bValid = (xCell.getError() == 0);
- // Get formula string.
- String aText = "The formula " + xCell.getFormula() + " is ";
- aText += bValid ? "valid." : "erroneous.";
-
- // *** Insert a TEXT CELL using the XText interface ***
- xCell = xSheet.getCellByPosition( 0, 3 );
- unoidl.com.sun.star.text.XText xCellText =
- (unoidl.com.sun.star.text.XText) xCell;
- unoidl.com.sun.star.text.XTextCursor xTextCursor =
- xCellText.createTextCursor();
- xCellText.insertString( xTextCursor, aText, false );
-
- // *** Change cell properties ***
- int nValue = bValid ? 0x00FF00 : 0xFF4040;
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCell;
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) nValue ) );
-
-
- // *** Accessing a CELL RANGE ***
- Console.WriteLine( "*** Sample for service table.CellRange ***" );
-
- // Accessing a cell range over its position.
- xCellRange = xSheet.getCellRangeByPosition( 2, 0, 3, 1 );
-
- // Change properties of the range.
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0x8080FF ) );
-
- // Accessing a cell range over its name.
- xCellRange = xSheet.getCellRangeByName( "C4:D5" );
-
- // Change properties of the range.
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0xFFFF80 ) );
-
-
- // *** Using the CELL CURSOR to add some data below of
- // the filled area ***
- Console.WriteLine( "*** Sample for service table.CellCursor ***" );
-
- // Create a cursor using the XSpreadsheet method createCursorByRange()
- xCellRange = xSheet.getCellRangeByName( "A1" );
- unoidl.com.sun.star.sheet.XSheetCellRange xSheetCellRange =
- (unoidl.com.sun.star.sheet.XSheetCellRange) xCellRange;
-
- unoidl.com.sun.star.sheet.XSheetCellCursor xSheetCellCursor =
- xSheet.createCursorByRange( xSheetCellRange );
- unoidl.com.sun.star.table.XCellCursor xCursor =
- (unoidl.com.sun.star.table.XCellCursor) xSheetCellCursor;
-
- // Move to the last filled cell.
- xCursor.gotoEnd();
- // Move one row down.
- xCursor.gotoOffset( 0, 1 );
- xCursor.getCellByPosition( 0, 0 ).setFormula(
- "Beyond of the last filled cell." );
-
-
- // *** Modifying COLUMNS and ROWS ***
- Console.WriteLine( "*** Sample for services table.TableRows and " +
- "table.TableColumns ***" );
-
- unoidl.com.sun.star.table.XColumnRowRange xCRRange =
- (unoidl.com.sun.star.table.XColumnRowRange) xSheet;
- unoidl.com.sun.star.table.XTableColumns xColumns =
- xCRRange.getColumns();
- unoidl.com.sun.star.table.XTableRows xRows = xCRRange.getRows();
-
- // Get column C by index (interface XIndexAccess).
- uno.Any aColumnObj = xColumns.getByIndex( 2 );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) aColumnObj.Value;
- xPropSet.setPropertyValue( "Width", new uno.Any( (Int32) 5000 ) );
-
- // Get the name of the column.
- unoidl.com.sun.star.container.XNamed xNamed =
- (unoidl.com.sun.star.container.XNamed) aColumnObj.Value;
- aText = "The name of this column is " + xNamed.getName() + ".";
- xSheet.getCellByPosition( 2, 2 ).setFormula( aText );
-
- // Get column D by name (interface XNameAccess).
- unoidl.com.sun.star.container.XNameAccess xColumnsName =
- (unoidl.com.sun.star.container.XNameAccess) xColumns;
-
- aColumnObj = xColumnsName.getByName( "D" );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) aColumnObj.Value;
- xPropSet.setPropertyValue(
- "IsVisible", new uno.Any( (Boolean) false ) );
-
- // Get row 7 by index (interface XIndexAccess)
- uno.Any aRowObj = xRows.getByIndex( 6 );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) aRowObj.Value;
- xPropSet.setPropertyValue( "Height", new uno.Any( (Int32) 5000 ) );
-
- xSheet.getCellByPosition( 2, 6 ).setFormula( "What a big cell." );
-
- // Create a cell series with the values 1 ... 7.
- for (int nRow = 8; nRow < 15; ++nRow)
- xSheet.getCellByPosition( 0, nRow ).setValue( nRow - 7 );
- // Insert a row between 1 and 2
- xRows.insertByIndex( 9, 1 );
- // Delete the rows with the values 3 and 4.
- xRows.removeByIndex( 11, 2 );
-
- // *** Inserting CHARTS ***
- Console.WriteLine( "*** Sample for service table.TableCharts ***" );
-
- unoidl.com.sun.star.table.XTableChartsSupplier xChartsSupp =
- (unoidl.com.sun.star.table.XTableChartsSupplier) xSheet;
- unoidl.com.sun.star.table.XTableCharts xCharts =
- xChartsSupp.getCharts();
-
- // The chart will base on the last cell series, initializing all values.
- String aName = "newChart";
- unoidl.com.sun.star.awt.Rectangle aRect =
- new unoidl.com.sun.star.awt.Rectangle();
- aRect.X = 10000;
- aRect.Y = 3000;
- aRect.Width = aRect.Height = 5000;
- unoidl.com.sun.star.table.CellRangeAddress[] aRanges =
- new unoidl.com.sun.star.table.CellRangeAddress[1];
- aRanges[0] = createCellRangeAddress( xSheet, "A9:A14" );
-
- // Create the chart.
- xCharts.addNewByName( aName, aRect, aRanges, false, false );
-
- // Get the chart by name.
- uno.Any aChartObj = xCharts.getByName( aName );
- unoidl.com.sun.star.table.XTableChart xChart =
- (unoidl.com.sun.star.table.XTableChart) aChartObj.Value;
-
- // Query the state of row and column headers.
- aText = "Chart has column headers: ";
- aText += xChart.getHasColumnHeaders() ? "yes" : "no";
- xSheet.getCellByPosition( 2, 8 ).setFormula( aText );
- aText = "Chart has row headers: ";
- aText += xChart.getHasRowHeaders() ? "yes" : "no";
- xSheet.getCellByPosition( 2, 9 ).setFormula( aText );
- }
-
-}
diff --git a/odk/examples/CLI/CSharp/Spreadsheet/Makefile b/odk/examples/CLI/CSharp/Spreadsheet/Makefile
deleted file mode 100644
index a8dba1cf..00000000
--- a/odk/examples/CLI/CSharp/Spreadsheet/Makefile
+++ /dev/null
@@ -1,94 +0,0 @@
-# Builds the SpreadSheet examples of the Developers Guide.
-
-# This Makefile is supposed to be run by a GNU Make built for native
-# Windows Not the Cygwin GNU Make, not dmake, not Microsoft's NMAKE.
-# But yeah, that is what the setsdkenv_windows.bat file in
-# ../../../.. presumably tries to set up.
-
-PRJ = ../../../..
-SETTINGS = $(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-#include $(SETTINGS)/dk.mk
-
-CSC_FLAGS = -warnaserror+ -noconfig -platform:x86
-VBC_FLAGS = -warnaserror+
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS+=-Zi -MT
-CSC_FLAGS += -debug+ -checked+ -define:DEBUG -define:TRACE
-VBC_FLAGS += -debug+ -define:DEBUG=1 -define:TRACE=1
-else
-CSC_FLAGS += -o
-VBC_FLAGS += -o
-endif
-
-THIS_OUT_MISC = $(OUT_MISC)/csharp_SpreadsheetExamples
-
-SPREADSHEET_OUT:= $(OUT_BIN)/CSharp_SpreadsheetExamples
-
-ifneq "$(OUTDIR)" ""
-# We are running in a LO build environment, good
-CLI_LIB_LOCATION = $(OUTDIR)\bin
-else
-# Bad guess, but hey, this is how it was
-CLI_LIB_LOCATION = $(PRJ)\cli
-endif
-
-# Targets
-.PHONY : ALL
-ALL : Info
-
-include $(SETTINGS)/stdtarget.mk
-
-
-# build executables
-#csc -lib:"d:\StarOffice 8" does not work. csc does not understand the quotes.
-#but they are needed if the path contains a space. Therefore we use full path
-#with the -reference switch
-$(SPREADSHEET_OUT)/%.exe : %.cs SpreadsheetDocHelper.cs
- -$(MKDIR) $(subst /,$(PS),$(@D))
- csc $(CSC_FLAGS) \
- -target:exe \
- -out:$@ \
- -reference:"$(CLI_LIB_LOCATION)"\cli_basetypes.dll \
- -reference:"$(CLI_LIB_LOCATION)"\cli_uretypes.dll \
- -reference:"$(CLI_LIB_LOCATION)"\cli_oootypes.dll \
- -reference:"$(CLI_LIB_LOCATION)"\cli_ure.dll \
- -reference:"$(CLI_LIB_LOCATION)"\cli_cppuhelper.dll \
- $^
-
-SpreadsheetSample : $(SPREADSHEET_OUT)/SpreadsheetSample.exe
-
-GeneralTableSample : $(SPREADSHEET_OUT)/GeneralTableSample.exe
-
-ViewSample : $(SPREADSHEET_OUT)/ViewSample.exe
-
-.PHONY : Info
-ifeq "$(OS)" "WIN"
-Info : SpreadsheetSample GeneralTableSample ViewSample
- @echo -------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) GeneralTableSample.run
- @echo $(MAKE) SpreadsheetSample.run
- @echo $(MAKE) ViewSample.run
- @echo -------------------------------------------------------------------------------
-else
-Info :
- @echo --------------------------------------------------------------------------------
- @echo This example works only under Windows!
- @echo --------------------------------------------------------------------------------
-endif
-
-%.run : $(SPREADSHEET_OUT)/%.exe
- @echo -------------------------------------------------------------------------------
- @echo Executing sample $@ $(UNORC) $(CONNECT_STRING)...
- @echo -------------------------------------------------------------------------------
- cd $(subst /,\\,$(SPREADSHEET_OUT)) && $(basename $@).exe
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_BIN)/CSharp_SpreadsheetExamples)
-
-
diff --git a/odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetDocHelper.cs b/odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetDocHelper.cs
deleted file mode 100644
index e2f49d08..00000000
--- a/odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetDocHelper.cs
+++ /dev/null
@@ -1,344 +0,0 @@
-
-using System;
-using unoidl.com.sun.star.lang;
-using unoidl.com.sun.star.uno;
-using unoidl.com.sun.star.bridge;
-using unoidl.com.sun.star.frame;
-
-// __________ implementation ____________________________________
-
-/** This is a helper class for the spreadsheet and table samples.
- It connects to a running office and creates a spreadsheet document.
- Additionally it contains various helper functions.
- */
-public class SpreadsheetDocHelper : System.IDisposable
-{
-
-// __ private members ___________________________________________
-
- private const String msDataSheetName = "Data";
-
- private unoidl.com.sun.star.uno.XComponentContext m_xContext;
- private unoidl.com.sun.star.lang.XMultiServiceFactory mxMSFactory;
- private unoidl.com.sun.star.sheet.XSpreadsheetDocument mxDocument;
-
-// ________________________________________________________________
-
- public SpreadsheetDocHelper( String[] args )
- {
- // Connect to a running office and get the service manager
- mxMSFactory = connect( args );
- // Create a new spreadsheet document
- mxDocument = initDocument();
- }
-
-// __ helper methods ____________________________________________
-
- /** Returns the service manager.
- @return XMultiServiceFactory interface of the service manager. */
- public unoidl.com.sun.star.lang.XMultiServiceFactory getServiceManager()
- {
- return mxMSFactory;
- }
-
- /** Returns the whole spreadsheet document.
- @return XSpreadsheetDocument interface of the document. */
- public unoidl.com.sun.star.sheet.XSpreadsheetDocument getDocument()
- {
- return mxDocument;
- }
-
- /** Returns the spreadsheet with the specified index (0-based).
- @param nIndex The index of the sheet.
- @return XSpreadsheet interface of the sheet. */
- public unoidl.com.sun.star.sheet.XSpreadsheet getSpreadsheet( int nIndex )
- {
- // Collection of sheets
- unoidl.com.sun.star.sheet.XSpreadsheets xSheets =
- mxDocument.getSheets();
-
- unoidl.com.sun.star.container.XIndexAccess xSheetsIA =
- (unoidl.com.sun.star.container.XIndexAccess) xSheets;
-
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet =
- (unoidl.com.sun.star.sheet.XSpreadsheet)
- xSheetsIA.getByIndex( nIndex ).Value;
-
- return xSheet;
- }
-
- /** Inserts a new empty spreadsheet with the specified name.
- @param aName The name of the new sheet.
- @param nIndex The insertion index.
- @return The XSpreadsheet interface of the new sheet. */
- public unoidl.com.sun.star.sheet.XSpreadsheet insertSpreadsheet(
- String aName, short nIndex )
- {
- // Collection of sheets
- unoidl.com.sun.star.sheet.XSpreadsheets xSheets =
- mxDocument.getSheets();
-
- xSheets.insertNewByName( aName, nIndex );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet =
- (unoidl.com.sun.star.sheet.XSpreadsheet)
- xSheets.getByName( aName ).Value;
-
- return xSheet;
- }
-
-// ________________________________________________________________
-// Methods to fill values into cells.
-
- /** Writes a double value into a spreadsheet.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCellName The address of the cell (or a named range).
- @param fValue The value to write into the cell. */
- public void setValue(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aCellName,
- double fValue )
- {
- xSheet.getCellRangeByName( aCellName ).getCellByPosition(
- 0, 0 ).setValue( fValue );
- }
-
- /** Writes a formula into a spreadsheet.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCellName The address of the cell (or a named range).
- @param aFormula The formula to write into the cell. */
- public void setFormula(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aCellName,
- String aFormula )
- {
- xSheet.getCellRangeByName( aCellName ).getCellByPosition(
- 0, 0 ).setFormula( aFormula );
- }
-
- /** Writes a date with standard date format into a spreadsheet.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCellName The address of the cell (or a named range).
- @param nDay The day of the date.
- @param nMonth The month of the date.
- @param nYear The year of the date. */
- public void setDate(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aCellName,
- int nDay, int nMonth, int nYear )
- {
- // Set the date value.
- unoidl.com.sun.star.table.XCell xCell =
- xSheet.getCellRangeByName( aCellName ).getCellByPosition( 0, 0 );
- String aDateStr = nMonth + "/" + nDay + "/" + nYear;
- xCell.setFormula( aDateStr );
-
- // Set standard date format.
- unoidl.com.sun.star.util.XNumberFormatsSupplier xFormatsSupplier =
- (unoidl.com.sun.star.util.XNumberFormatsSupplier) getDocument();
- unoidl.com.sun.star.util.XNumberFormatTypes xFormatTypes =
- (unoidl.com.sun.star.util.XNumberFormatTypes)
- xFormatsSupplier.getNumberFormats();
- int nFormat = xFormatTypes.getStandardFormat(
- unoidl.com.sun.star.util.NumberFormat.DATE,
- new unoidl.com.sun.star.lang.Locale() );
-
- unoidl.com.sun.star.beans.XPropertySet xPropSet =
- (unoidl.com.sun.star.beans.XPropertySet) xCell;
- xPropSet.setPropertyValue(
- "NumberFormat",
- new uno.Any( (Int32) nFormat ) );
- }
-
- /** Draws a colored border around the range and writes the headline
- in the first cell.
-
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aRange The address of the cell range (or a named range).
- @param aHeadline The headline text. */
- public void prepareRange(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aRange, String aHeadline )
- {
- unoidl.com.sun.star.beans.XPropertySet xPropSet = null;
- unoidl.com.sun.star.table.XCellRange xCellRange = null;
-
- // draw border
- xCellRange = xSheet.getCellRangeByName( aRange );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- unoidl.com.sun.star.table.BorderLine aLine =
- new unoidl.com.sun.star.table.BorderLine();
- aLine.Color = 0x99CCFF;
- aLine.InnerLineWidth = aLine.LineDistance = 0;
- aLine.OuterLineWidth = 100;
- unoidl.com.sun.star.table.TableBorder aBorder =
- new unoidl.com.sun.star.table.TableBorder();
- aBorder.TopLine = aBorder.BottomLine = aBorder.LeftLine =
- aBorder.RightLine = aLine;
- aBorder.IsTopLineValid = aBorder.IsBottomLineValid = true;
- aBorder.IsLeftLineValid = aBorder.IsRightLineValid = true;
- xPropSet.setPropertyValue(
- "TableBorder",
- new uno.Any(
- typeof (unoidl.com.sun.star.table.TableBorder), aBorder ) );
-
- // draw headline
- unoidl.com.sun.star.sheet.XCellRangeAddressable xAddr =
- (unoidl.com.sun.star.sheet.XCellRangeAddressable) xCellRange;
- unoidl.com.sun.star.table.CellRangeAddress aAddr =
- xAddr.getRangeAddress();
-
- xCellRange = xSheet.getCellRangeByPosition(
- aAddr.StartColumn,
- aAddr.StartRow, aAddr.EndColumn, aAddr.StartRow );
-
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0x99CCFF ) );
- // write headline
- unoidl.com.sun.star.table.XCell xCell =
- xCellRange.getCellByPosition( 0, 0 );
- xCell.setFormula( aHeadline );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCell;
- xPropSet.setPropertyValue(
- "CharColor", new uno.Any( (Int32) 0x003399 ) );
- xPropSet.setPropertyValue(
- "CharWeight",
- new uno.Any( (Single) unoidl.com.sun.star.awt.FontWeight.BOLD ) );
- }
-
-// ________________________________________________________________
-// Methods to create cell addresses and range addresses.
-
- /** Creates a unoidl.com.sun.star.table.CellAddress and initializes it
- with the given range.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCell The address of the cell (or a named cell). */
- public unoidl.com.sun.star.table.CellAddress createCellAddress(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aCell )
- {
- unoidl.com.sun.star.sheet.XCellAddressable xAddr =
- (unoidl.com.sun.star.sheet.XCellAddressable)
- xSheet.getCellRangeByName( aCell ).getCellByPosition( 0, 0 );
- return xAddr.getCellAddress();
- }
-
- /** Creates a unoidl.com.sun.star.table.CellRangeAddress and initializes
- it with the given range.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aRange The address of the cell range (or a named range). */
- public unoidl.com.sun.star.table.CellRangeAddress createCellRangeAddress(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet, String aRange )
- {
- unoidl.com.sun.star.sheet.XCellRangeAddressable xAddr =
- (unoidl.com.sun.star.sheet.XCellRangeAddressable)
- xSheet.getCellRangeByName( aRange );
- return xAddr.getRangeAddress();
- }
-
-// ________________________________________________________________
-// Methods to convert cell addresses and range addresses to strings.
-
- /** Returns the text address of the cell.
- @param nColumn The column index.
- @param nRow The row index.
- @return A string containing the cell address. */
- public String getCellAddressString( int nColumn, int nRow )
- {
- String aStr = "";
- if (nColumn > 25)
- aStr += (char) ('A' + nColumn / 26 - 1);
- aStr += (char) ('A' + nColumn % 26);
- aStr += (nRow + 1);
- return aStr;
- }
-
- /** Returns the text address of the cell range.
- @param aCellRange The cell range address.
- @return A string containing the cell range address. */
- public String getCellRangeAddressString(
- unoidl.com.sun.star.table.CellRangeAddress aCellRange )
- {
- return
- getCellAddressString( aCellRange.StartColumn, aCellRange.StartRow )
- + ":"
- + getCellAddressString( aCellRange.EndColumn, aCellRange.EndRow );
- }
-
- /** Returns the text address of the cell range.
- @param xCellRange The XSheetCellRange interface of the cell range.
- @param bWithSheet true = Include sheet name.
- @return A string containing the cell range address. */
- public String getCellRangeAddressString(
- unoidl.com.sun.star.sheet.XSheetCellRange xCellRange, bool bWithSheet )
- {
- String aStr = "";
- if (bWithSheet)
- {
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet =
- xCellRange.getSpreadsheet();
- unoidl.com.sun.star.container.XNamed xNamed =
- (unoidl.com.sun.star.container.XNamed) xSheet;
- aStr += xNamed.getName() + ".";
- }
- unoidl.com.sun.star.sheet.XCellRangeAddressable xAddr =
- (unoidl.com.sun.star.sheet.XCellRangeAddressable) xCellRange;
- aStr += getCellRangeAddressString( xAddr.getRangeAddress() );
- return aStr;
- }
-
- /** Returns a list of addresses of all cell ranges contained in the
- collection.
-
- @param xRangesIA The XIndexAccess interface of the collection.
- @return A string containing the cell range address list. */
- public String getCellRangeListString(
- unoidl.com.sun.star.container.XIndexAccess xRangesIA )
- {
- String aStr = "";
- int nCount = xRangesIA.getCount();
- for (int nIndex = 0; nIndex < nCount; ++nIndex)
- {
- if (nIndex > 0)
- aStr += " ";
- uno.Any aRangeObj = xRangesIA.getByIndex( nIndex );
- unoidl.com.sun.star.sheet.XSheetCellRange xCellRange =
- (unoidl.com.sun.star.sheet.XSheetCellRange) aRangeObj.Value;
- aStr += getCellRangeAddressString( xCellRange, false );
- }
- return aStr;
- }
-
-// ________________________________________________________________
-
- /** Connect to a running office that is accepting connections.
- @return The ServiceManager to instantiate office components. */
- private XMultiServiceFactory connect( String [] args )
- {
-
- m_xContext = uno.util.Bootstrap.bootstrap();
-
- return (XMultiServiceFactory) m_xContext.getServiceManager();
- }
-
- public void Dispose()
- {
-
- }
-
- /** Creates an empty spreadsheet document.
- @return The XSpreadsheetDocument interface of the document. */
- private unoidl.com.sun.star.sheet.XSpreadsheetDocument initDocument()
- {
- XComponentLoader aLoader = (XComponentLoader)
- mxMSFactory.createInstance( "com.sun.star.frame.Desktop" );
-
- XComponent xComponent = aLoader.loadComponentFromURL(
- "private:factory/scalc", "_blank", 0,
- new unoidl.com.sun.star.beans.PropertyValue[0] );
-
- return (unoidl.com.sun.star.sheet.XSpreadsheetDocument) xComponent;
- }
-
-// ________________________________________________________________
-}
diff --git a/odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetSample.cs b/odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetSample.cs
deleted file mode 100644
index 9b78a289..00000000
--- a/odk/examples/CLI/CSharp/Spreadsheet/SpreadsheetSample.cs
+++ /dev/null
@@ -1,1478 +0,0 @@
-
-using System;
-
-// __________ implementation ____________________________________
-
-/** Create and modify a spreadsheet document.
- */
-public class SpreadsheetSample : SpreadsheetDocHelper
-{
-
- public static void Main( String [] args )
- {
- try
- {
- using ( SpreadsheetSample aSample = new SpreadsheetSample( args ) )
- {
- aSample.doSampleFunctions();
- }
- Console.WriteLine( "\nSamples done." );
- }
- catch (Exception ex)
- {
- Console.WriteLine( "Sample caught exception! " + ex );
- }
- }
-
- public SpreadsheetSample( String[] args )
- : base( args )
- {
- }
-
- /** This sample function performs all changes on the document. */
- public void doSampleFunctions()
- {
- doCellSamples();
- doCellRangeSamples();
- doCellRangesSamples();
- doCellCursorSamples();
- doFormattingSamples();
- doDocumentSamples();
- doDatabaseSamples();
- doDataPilotSamples();
- doNamedRangesSamples();
- doFunctionAccessSamples();
- doApplicationSettingsSamples();
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the service com.sun.star.sheet.SheetCell. */
- private void doCellSamples()
- {
- Console.WriteLine( "\n*** Samples for service sheet.SheetCell ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
- unoidl.com.sun.star.table.XCell xCell = null;
- unoidl.com.sun.star.beans.XPropertySet xPropSet = null;
- String aText;
- prepareRange( xSheet, "A1:C7", "Cells and Cell Ranges" );
-
- // --- Get cell B3 by position - (column, row) ---
- xCell = xSheet.getCellByPosition( 1, 2 );
-
- // --- Insert two text paragraphs into the cell. ---
- unoidl.com.sun.star.text.XText xText =
- (unoidl.com.sun.star.text.XText) xCell;
- unoidl.com.sun.star.text.XTextCursor xTextCursor =
- xText.createTextCursor();
-
- xText.insertString( xTextCursor, "Text in first line.", false );
- xText.insertControlCharacter( xTextCursor,
- unoidl.com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false );
- xText.insertString( xTextCursor, "And a ", false );
-
- // create a hyperlink
- unoidl.com.sun.star.lang.XMultiServiceFactory xServiceMan =
- (unoidl.com.sun.star.lang.XMultiServiceFactory) getDocument();
- Object aHyperlinkObj =
- xServiceMan.createInstance( "com.sun.star.text.TextField.URL" );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) aHyperlinkObj;
- xPropSet.setPropertyValue(
- "URL", new uno.Any( "http://www.example.org" ) );
- xPropSet.setPropertyValue(
- "Representation", new uno.Any( "hyperlink" ) );
- // ... and insert
- unoidl.com.sun.star.text.XTextContent xContent =
- (unoidl.com.sun.star.text.XTextContent) aHyperlinkObj;
- xText.insertTextContent( xTextCursor, xContent, false );
-
- // --- Query the separate paragraphs. ---
- unoidl.com.sun.star.container.XEnumerationAccess xParaEA =
- (unoidl.com.sun.star.container.XEnumerationAccess) xCell;
- unoidl.com.sun.star.container.XEnumeration xParaEnum =
- xParaEA.createEnumeration();
- // Go through the paragraphs
- while( xParaEnum.hasMoreElements() )
- {
- uno.Any aPortionObj = xParaEnum.nextElement();
- unoidl.com.sun.star.container.XEnumerationAccess xPortionEA =
- (unoidl.com.sun.star.container.XEnumerationAccess)
- aPortionObj.Value;
- unoidl.com.sun.star.container.XEnumeration xPortionEnum =
- xPortionEA.createEnumeration();
- aText = "";
- // Go through all text portions of a paragraph and construct string.
- while( xPortionEnum.hasMoreElements() )
- {
- unoidl.com.sun.star.text.XTextRange xRange =
- (unoidl.com.sun.star.text.XTextRange)
- xPortionEnum.nextElement().Value;
- aText += xRange.getString();
- }
- Console.WriteLine( "Paragraph text: " + aText );
- }
-
-
- // --- Change cell properties. ---
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCell;
- // from styles.CharacterProperties
- xPropSet.setPropertyValue(
- "CharColor", new uno.Any( (Int32) 0x003399 ) );
- xPropSet.setPropertyValue(
- "CharHeight", new uno.Any( (Single) 20.0 ) );
- // from styles.ParagraphProperties
- xPropSet.setPropertyValue(
- "ParaLeftMargin", new uno.Any( (Int32) 500 ) );
- // from table.CellProperties
- xPropSet.setPropertyValue(
- "IsCellBackgroundTransparent", new uno.Any( false ) );
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0x99CCFF ) );
-
-
- // --- Get cell address. ---
- unoidl.com.sun.star.sheet.XCellAddressable xCellAddr =
- (unoidl.com.sun.star.sheet.XCellAddressable) xCell;
- unoidl.com.sun.star.table.CellAddress aAddress =
- xCellAddr.getCellAddress();
- aText = "Address of this cell: Column=" + aAddress.Column;
- aText += "; Row=" + aAddress.Row;
- aText += "; Sheet=" + aAddress.Sheet;
- Console.WriteLine( aText );
-
-
- // --- Insert an annotation ---
- unoidl.com.sun.star.sheet.XSheetAnnotationsSupplier xAnnotationsSupp =
- (unoidl.com.sun.star.sheet.XSheetAnnotationsSupplier) xSheet;
- unoidl.com.sun.star.sheet.XSheetAnnotations xAnnotations =
- xAnnotationsSupp.getAnnotations();
- xAnnotations.insertNew( aAddress, "This is an annotation" );
-
- unoidl.com.sun.star.sheet.XSheetAnnotationAnchor xAnnotAnchor =
- (unoidl.com.sun.star.sheet.XSheetAnnotationAnchor) xCell;
- unoidl.com.sun.star.sheet.XSheetAnnotation xAnnotation =
- xAnnotAnchor.getAnnotation();
- xAnnotation.setIsVisible( true );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the service com.sun.star.sheet.SheetCellRange. */
- private void doCellRangeSamples()
- {
- Console.WriteLine(
- "\n*** Samples for service sheet.SheetCellRange ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
- unoidl.com.sun.star.table.XCellRange xCellRange = null;
- unoidl.com.sun.star.beans.XPropertySet xPropSet = null;
- unoidl.com.sun.star.table.CellRangeAddress aRangeAddress = null;
-
- // Preparation
- setFormula( xSheet, "B5", "First cell" );
- setFormula( xSheet, "B6", "Second cell" );
- // Get cell range B5:B6 by position - (column, row, column, row)
- xCellRange = xSheet.getCellRangeByPosition( 1, 4, 1, 5 );
-
-
- // --- Change cell range properties. ---
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- // from com.sun.star.styles.CharacterProperties
- xPropSet.setPropertyValue(
- "CharColor", new uno.Any( (Int32) 0x003399 ) );
- xPropSet.setPropertyValue(
- "CharHeight", new uno.Any( (Single) 20.0 ) );
- // from com.sun.star.styles.ParagraphProperties
- xPropSet.setPropertyValue(
- "ParaLeftMargin", new uno.Any( (Int32) 500 ) );
- // from com.sun.star.table.CellProperties
- xPropSet.setPropertyValue(
- "IsCellBackgroundTransparent", new uno.Any( false ) );
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0x99CCFF ) );
-
-
- // --- Replace text in all cells. ---
- unoidl.com.sun.star.util.XReplaceable xReplace =
- (unoidl.com.sun.star.util.XReplaceable) xCellRange;
- unoidl.com.sun.star.util.XReplaceDescriptor xReplaceDesc =
- xReplace.createReplaceDescriptor();
- xReplaceDesc.setSearchString( "cell" );
- xReplaceDesc.setReplaceString( "text" );
- // property SearchWords searches for whole cells!
- xReplaceDesc.setPropertyValue( "SearchWords", new uno.Any( false ) );
- int nCount = xReplace.replaceAll( xReplaceDesc );
- Console.WriteLine( "Search text replaced " + nCount + " times." );
-
-
- // --- Merge cells. ---
- xCellRange = xSheet.getCellRangeByName( "F3:G6" );
- prepareRange( xSheet, "E1:H7", "XMergeable" );
- unoidl.com.sun.star.util.XMergeable xMerge =
- (unoidl.com.sun.star.util.XMergeable) xCellRange;
- xMerge.merge( true );
-
-
- // --- Change indentation. ---
-/* does not work (bug in XIndent implementation)
- prepareRange( xSheet, "I20:I23", "XIndent" );
- setValue( xSheet, "I21", 1 );
- setValue( xSheet, "I22", 1 );
- setValue( xSheet, "I23", 1 );
-
- xCellRange = xSheet.getCellRangeByName( "I21:I22" );
- unoidl.com.sun.star.util.XIndent xIndent =
- (unoidl.com.sun.star.util.XIndent) xCellRange;
- xIndent.incrementIndent();
-
- xCellRange = xSheet.getCellRangeByName( "I22:I23" );
- xIndent = (unoidl.com.sun.star.util.XIndent) xCellRange;
- xIndent.incrementIndent();
-*/
-
-
- // --- Column properties. ---
- xCellRange = xSheet.getCellRangeByName( "B1" );
- unoidl.com.sun.star.table.XColumnRowRange xColRowRange =
- (unoidl.com.sun.star.table.XColumnRowRange) xCellRange;
- unoidl.com.sun.star.table.XTableColumns xColumns =
- xColRowRange.getColumns();
-
- uno.Any aColumnObj = xColumns.getByIndex( 0 );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) aColumnObj.Value;
- xPropSet.setPropertyValue( "Width", new uno.Any( (Int32) 6000 ) );
-
- unoidl.com.sun.star.container.XNamed xNamed =
- (unoidl.com.sun.star.container.XNamed) aColumnObj.Value;
- Console.WriteLine(
- "The name of the wide column is " + xNamed.getName() + "." );
-
-
- // --- Cell range data ---
- prepareRange( xSheet, "A9:C30", "XCellRangeData" );
-
- xCellRange = xSheet.getCellRangeByName( "A10:C30" );
- unoidl.com.sun.star.sheet.XCellRangeData xData =
- (unoidl.com.sun.star.sheet.XCellRangeData) xCellRange;
- uno.Any [][] aValues =
- {
- new uno.Any [] { new uno.Any( "Name" ),
- new uno.Any( "Fruit" ),
- new uno.Any( "Quantity" ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 7.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 9.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 5.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 6.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 2.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 7.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 7.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 9.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Oranges" ),
- new uno.Any( (Double) 4.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( "Apples" ),
- new uno.Any( (Double) 9.0 ) }
- };
- xData.setDataArray( aValues );
-
-
- // --- Get cell range address. ---
- unoidl.com.sun.star.sheet.XCellRangeAddressable xRangeAddr =
- (unoidl.com.sun.star.sheet.XCellRangeAddressable) xCellRange;
- aRangeAddress = xRangeAddr.getRangeAddress();
- Console.WriteLine(
- "Address of this range: Sheet=" + aRangeAddress.Sheet );
- Console.WriteLine(
- "Start column=" + aRangeAddress.StartColumn + "; Start row=" +
- aRangeAddress.StartRow );
- Console.WriteLine(
- "End column =" + aRangeAddress.EndColumn + "; End row =" +
- aRangeAddress.EndRow );
-
-
- // --- Sheet operation. ---
- // uses the range filled with XCellRangeData
- unoidl.com.sun.star.sheet.XSheetOperation xSheetOp =
- (unoidl.com.sun.star.sheet.XSheetOperation) xData;
- double fResult = xSheetOp.computeFunction(
- unoidl.com.sun.star.sheet.GeneralFunction.AVERAGE );
- Console.WriteLine(
- "Average value of the data table A10:C30: " + fResult );
-
-
- // --- Fill series ---
- // Prepare the example
- setValue( xSheet, "E10", 1 );
- setValue( xSheet, "E11", 4 );
- setDate( xSheet, "E12", 30, 1, 2002 );
- setFormula( xSheet, "I13", "Text 10" );
- setFormula( xSheet, "E14", "Jan" );
- setValue( xSheet, "K14", 10 );
- setValue( xSheet, "E16", 1 );
- setValue( xSheet, "F16", 2 );
- setDate( xSheet, "E17", 28, 2, 2002 );
- setDate( xSheet, "F17", 28, 1, 2002 );
- setValue( xSheet, "E18", 6 );
- setValue( xSheet, "F18", 4 );
-
- unoidl.com.sun.star.sheet.XCellSeries xSeries = null;
- // Fill 2 rows linear with end value
- // -> 2nd series is not filled completely
- xSeries = getCellSeries( xSheet, "E10:I11" );
- xSeries.fillSeries(
- unoidl.com.sun.star.sheet.FillDirection.TO_RIGHT,
- unoidl.com.sun.star.sheet.FillMode.LINEAR,
- unoidl.com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, 2, 9 );
- // Add months to a date
- xSeries = getCellSeries( xSheet, "E12:I12" );
- xSeries.fillSeries(
- unoidl.com.sun.star.sheet.FillDirection.TO_RIGHT,
- unoidl.com.sun.star.sheet.FillMode.DATE,
- unoidl.com.sun.star.sheet.FillDateMode.FILL_DATE_MONTH,
- 1, 0x7FFFFFFF );
- // Fill right to left with a text containing a value
- xSeries = getCellSeries( xSheet, "E13:I13" );
- xSeries.fillSeries(
- unoidl.com.sun.star.sheet.FillDirection.TO_LEFT,
- unoidl.com.sun.star.sheet.FillMode.LINEAR,
- unoidl.com.sun.star.sheet.FillDateMode.FILL_DATE_DAY,
- 10, 0x7FFFFFFF );
- // Fill with an user defined list
- xSeries = getCellSeries( xSheet, "E14:I14" );
- xSeries.fillSeries(
- unoidl.com.sun.star.sheet.FillDirection.TO_RIGHT,
- unoidl.com.sun.star.sheet.FillMode.AUTO,
- unoidl.com.sun.star.sheet.FillDateMode.FILL_DATE_DAY,
- 1, 0x7FFFFFFF );
- // Fill bottom to top with a geometric series
- xSeries = getCellSeries( xSheet, "K10:K14" );
- xSeries.fillSeries(
- unoidl.com.sun.star.sheet.FillDirection.TO_TOP,
- unoidl.com.sun.star.sheet.FillMode.GROWTH,
- unoidl.com.sun.star.sheet.FillDateMode.FILL_DATE_DAY,
- 2, 0x7FFFFFFF );
- // Auto fill
- xSeries = getCellSeries( xSheet, "E16:K18" );
- xSeries.fillAuto(
- unoidl.com.sun.star.sheet.FillDirection.TO_RIGHT, 2 );
- // Fill series copies cell formats -> draw border here
- prepareRange( xSheet, "E9:K18", "XCellSeries" );
-
-
- // --- Array formulas ---
- xCellRange = xSheet.getCellRangeByName( "E21:G23" );
- prepareRange( xSheet, "E20:G23", "XArrayFormulaRange" );
- unoidl.com.sun.star.sheet.XArrayFormulaRange xArrayFormula =
- (unoidl.com.sun.star.sheet.XArrayFormulaRange) xCellRange;
- // Insert a 3x3 unit matrix.
- xArrayFormula.setArrayFormula( "=A10:C12" );
- Console.WriteLine(
- "Array formula is: " + xArrayFormula.getArrayFormula() );
-
-
- // --- Multiple operations ---
- setFormula( xSheet, "E26", "=E27^F26" );
- setValue( xSheet, "E27", 1 );
- setValue( xSheet, "F26", 1 );
- getCellSeries( xSheet, "E27:E31" ).fillAuto(
- unoidl.com.sun.star.sheet.FillDirection.TO_BOTTOM, 1 );
- getCellSeries( xSheet, "F26:J26" ).fillAuto(
- unoidl.com.sun.star.sheet.FillDirection.TO_RIGHT, 1 );
- setFormula( xSheet, "F33", "=SIN(E33)" );
- setFormula( xSheet, "G33", "=COS(E33)" );
- setFormula( xSheet, "H33", "=TAN(E33)" );
- setValue( xSheet, "E34", 0 );
- setValue( xSheet, "E35", 0.2 );
- getCellSeries( xSheet, "E34:E38" ).fillAuto(
- unoidl.com.sun.star.sheet.FillDirection.TO_BOTTOM, 2 );
- prepareRange( xSheet, "E25:J38", "XMultipleOperation" );
-
- unoidl.com.sun.star.table.CellRangeAddress aFormulaRange =
- createCellRangeAddress( xSheet, "E26" );
- unoidl.com.sun.star.table.CellAddress aColCell =
- createCellAddress( xSheet, "E27" );
- unoidl.com.sun.star.table.CellAddress aRowCell =
- createCellAddress( xSheet, "F26" );
-
- xCellRange = xSheet.getCellRangeByName( "E26:J31" );
- unoidl.com.sun.star.sheet.XMultipleOperation xMultOp =
- (unoidl.com.sun.star.sheet.XMultipleOperation) xCellRange;
- xMultOp.setTableOperation(
- aFormulaRange, unoidl.com.sun.star.sheet.TableOperationMode.BOTH,
- aColCell, aRowCell );
-
- aFormulaRange = createCellRangeAddress( xSheet, "F33:H33" );
- aColCell = createCellAddress( xSheet, "E33" );
- // Row cell not needed
-
- xCellRange = xSheet.getCellRangeByName( "E34:H38" );
- xMultOp = (unoidl.com.sun.star.sheet.XMultipleOperation) xCellRange;
- xMultOp.setTableOperation(
- aFormulaRange, unoidl.com.sun.star.sheet.TableOperationMode.COLUMN,
- aColCell, aRowCell );
-
-
- // --- Cell Ranges Query ---
- xCellRange = xSheet.getCellRangeByName( "A10:C30" );
- unoidl.com.sun.star.sheet.XCellRangesQuery xRangesQuery =
- (unoidl.com.sun.star.sheet.XCellRangesQuery) xCellRange;
- unoidl.com.sun.star.sheet.XSheetCellRanges xCellRanges =
- xRangesQuery.queryContentCells(
- (short) unoidl.com.sun.star.sheet.CellFlags.STRING );
- Console.WriteLine(
- "Cells in A10:C30 containing text: "
- + xCellRanges.getRangeAddressesAsString() );
- }
-
- /** Returns the XCellSeries interface of a cell range.
- @param xSheet The spreadsheet containing the cell range.
- @param aRange The address of the cell range.
- @return The XCellSeries interface. */
- private unoidl.com.sun.star.sheet.XCellSeries getCellSeries(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet, String aRange )
- {
- return (unoidl.com.sun.star.sheet.XCellSeries)
- xSheet.getCellRangeByName( aRange );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding cell range collections. */
- private void doCellRangesSamples()
- {
- Console.WriteLine( "\n*** Samples for cell range collections ***\n" );
-
- // Create a new cell range container
- unoidl.com.sun.star.lang.XMultiServiceFactory xDocFactory =
- (unoidl.com.sun.star.lang.XMultiServiceFactory) getDocument();
- unoidl.com.sun.star.sheet.XSheetCellRangeContainer xRangeCont =
- (unoidl.com.sun.star.sheet.XSheetCellRangeContainer)
- xDocFactory.createInstance(
- "com.sun.star.sheet.SheetCellRanges" );
-
-
- // --- Insert ranges ---
- insertRange( xRangeCont, 0, 0, 0, 0, 0, false ); // A1:A1
- insertRange( xRangeCont, 0, 0, 1, 0, 2, true ); // A2:A3
- insertRange( xRangeCont, 0, 1, 0, 1, 2, false ); // B1:B3
-
-
- // --- Query the list of filled cells ---
- Console.WriteLine( "All filled cells: " );
- unoidl.com.sun.star.container.XEnumerationAccess xCellsEA =
- xRangeCont.getCells();
- unoidl.com.sun.star.container.XEnumeration xEnum =
- xCellsEA.createEnumeration();
- while( xEnum.hasMoreElements() )
- {
- uno.Any aCellObj = xEnum.nextElement();
- unoidl.com.sun.star.sheet.XCellAddressable xAddr =
- (unoidl.com.sun.star.sheet.XCellAddressable) aCellObj.Value;
- unoidl.com.sun.star.table.CellAddress aAddr =
- xAddr.getCellAddress();
- Console.WriteLine(
- getCellAddressString( aAddr.Column, aAddr.Row ) + " " );
- }
- Console.WriteLine();
- }
-
- /** Inserts a cell range address into a cell range container and prints
- a message.
- @param xContainer unoidl.com.sun.star.sheet.XSheetCellRangeContainer
- interface of the container.
- @param nSheet Index of sheet of the range.
- @param nStartCol Index of first column of the range.
- @param nStartRow Index of first row of the range.
- @param nEndCol Index of last column of the range.
- @param nEndRow Index of last row of the range.
- @param bMerge Determines whether the new range should be merged
- with the existing ranges.
- */
- private void insertRange(
- unoidl.com.sun.star.sheet.XSheetCellRangeContainer xContainer,
- int nSheet, int nStartCol, int nStartRow, int nEndCol, int nEndRow,
- bool bMerge )
- {
- unoidl.com.sun.star.table.CellRangeAddress aAddress =
- new unoidl.com.sun.star.table.CellRangeAddress();
- aAddress.Sheet = (short)nSheet;
- aAddress.StartColumn = nStartCol;
- aAddress.StartRow = nStartRow;
- aAddress.EndColumn = nEndCol;
- aAddress.EndRow = nEndRow;
- xContainer.addRangeAddress( aAddress, bMerge );
- Console.WriteLine(
- "Inserting " + getCellRangeAddressString( aAddress )
- + " " + (bMerge ? " with" : "without") + " merge,"
- + " resulting list: " + xContainer.getRangeAddressesAsString() );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding cell cursors. */
- private void doCellCursorSamples()
- {
- Console.WriteLine( "\n*** Samples for cell cursor ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
-
-
- // --- Find the array formula using a cell cursor ---
- unoidl.com.sun.star.table.XCellRange xRange =
- xSheet.getCellRangeByName( "F22" );
- unoidl.com.sun.star.sheet.XSheetCellRange xCellRange =
- (unoidl.com.sun.star.sheet.XSheetCellRange) xRange;
- unoidl.com.sun.star.sheet.XSheetCellCursor xCursor =
- xSheet.createCursorByRange( xCellRange );
-
- xCursor.collapseToCurrentArray();
- unoidl.com.sun.star.sheet.XArrayFormulaRange xArray =
- (unoidl.com.sun.star.sheet.XArrayFormulaRange) xCursor;
- Console.WriteLine(
- "Array formula in " + getCellRangeAddressString( xCursor, false )
- + " contains formula " + xArray.getArrayFormula() );
-
-
- // --- Find the used area ---
- unoidl.com.sun.star.sheet.XUsedAreaCursor xUsedCursor =
- (unoidl.com.sun.star.sheet.XUsedAreaCursor) xCursor;
- xUsedCursor.gotoStartOfUsedArea( false );
- xUsedCursor.gotoEndOfUsedArea( true );
- // xUsedCursor and xCursor are interfaces of the same object -
- // so modifying xUsedCursor takes effect on xCursor:
- Console.WriteLine(
- "The used area is: " + getCellRangeAddressString( xCursor, true ) );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the formatting of cells and ranges. */
- private void doFormattingSamples()
- {
- Console.WriteLine( "\n*** Formatting samples ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 1 );
- unoidl.com.sun.star.table.XCellRange xCellRange;
- unoidl.com.sun.star.beans.XPropertySet xPropSet = null;
- unoidl.com.sun.star.container.XIndexAccess xRangeIA = null;
- unoidl.com.sun.star.lang.XMultiServiceFactory xServiceManager;
-
-
- // --- Cell styles ---
- // get the cell style container
- unoidl.com.sun.star.style.XStyleFamiliesSupplier xFamiliesSupplier =
- (unoidl.com.sun.star.style.XStyleFamiliesSupplier) getDocument();
- unoidl.com.sun.star.container.XNameAccess xFamiliesNA =
- xFamiliesSupplier.getStyleFamilies();
- uno.Any aCellStylesObj = xFamiliesNA.getByName( "CellStyles" );
- unoidl.com.sun.star.container.XNameContainer xCellStylesNA =
- (unoidl.com.sun.star.container.XNameContainer) aCellStylesObj.Value;
-
- // create a new cell style
- xServiceManager =
- (unoidl.com.sun.star.lang.XMultiServiceFactory) getDocument();
- Object aCellStyle = xServiceManager.createInstance(
- "com.sun.star.style.CellStyle" );
- String aStyleName = "MyNewCellStyle";
- xCellStylesNA.insertByName(
- aStyleName, new uno.Any( typeof (Object), aCellStyle ) );
-
- // modify properties of the new style
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) aCellStyle;
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0x888888 ) );
- xPropSet.setPropertyValue(
- "IsCellBackgroundTransparent", new uno.Any( false ) );
-
-
-
- // --- Query equal-formatted cell ranges ---
- // prepare example, use the new cell style
- xCellRange = xSheet.getCellRangeByName( "D2:F2" );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- xPropSet.setPropertyValue( "CellStyle", new uno.Any( aStyleName ) );
-
- xCellRange = xSheet.getCellRangeByName( "A3:G3" );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- xPropSet.setPropertyValue( "CellStyle", new uno.Any( aStyleName ) );
-
- // All ranges in one container
- xCellRange = xSheet.getCellRangeByName( "A1:G3" );
- Console.WriteLine( "Service CellFormatRanges:" );
- unoidl.com.sun.star.sheet.XCellFormatRangesSupplier xFormatSupp =
- (unoidl.com.sun.star.sheet.XCellFormatRangesSupplier) xCellRange;
- xRangeIA = xFormatSupp.getCellFormatRanges();
- Console.WriteLine( getCellRangeListString( xRangeIA ) );
-
- // Ranges sorted in SheetCellRanges containers
- Console.WriteLine( "\nService UniqueCellFormatRanges:" );
- unoidl.com.sun.star.sheet.XUniqueCellFormatRangesSupplier
- xUniqueFormatSupp =
- (unoidl.com.sun.star.sheet.XUniqueCellFormatRangesSupplier)
- xCellRange;
- unoidl.com.sun.star.container.XIndexAccess xRangesIA =
- xUniqueFormatSupp.getUniqueCellFormatRanges();
- int nCount = xRangesIA.getCount();
- for (int nIndex = 0; nIndex < nCount; ++nIndex)
- {
- uno.Any aRangesObj = xRangesIA.getByIndex( nIndex );
- xRangeIA =
- (unoidl.com.sun.star.container.XIndexAccess) aRangesObj.Value;
- Console.WriteLine(
- "Container " + (nIndex + 1) + ": " +
- getCellRangeListString( xRangeIA ) );
- }
-
-
- // --- Table auto formats ---
- // get the global collection of table auto formats,
- // use global service manager
- xServiceManager = getServiceManager();
- Object aAutoFormatsObj = xServiceManager.createInstance(
- "com.sun.star.sheet.TableAutoFormats" );
- unoidl.com.sun.star.container.XNameContainer xAutoFormatsNA =
- (unoidl.com.sun.star.container.XNameContainer) aAutoFormatsObj;
-
- // create a new table auto format and insert into the container
- String aAutoFormatName = "Temp_Example";
- bool bExistsAlready = xAutoFormatsNA.hasByName( aAutoFormatName );
- uno.Any aAutoFormatObj;
- if (bExistsAlready)
- // auto format already exists -> use it
- aAutoFormatObj = xAutoFormatsNA.getByName( aAutoFormatName );
- else
- {
- // create a new auto format (with document service manager!)
- xServiceManager =
- (unoidl.com.sun.star.lang.XMultiServiceFactory) getDocument();
- aAutoFormatObj = new uno.Any(
- typeof (Object),
- xServiceManager.createInstance(
- "com.sun.star.sheet.TableAutoFormat" ) );
- xAutoFormatsNA.insertByName( aAutoFormatName, aAutoFormatObj );
- }
- // index access to the auto format fields
- unoidl.com.sun.star.container.XIndexAccess xAutoFormatIA =
- (unoidl.com.sun.star.container.XIndexAccess) aAutoFormatObj.Value;
-
- // set properties of all auto format fields
- for (int nRow = 0; nRow < 4; ++nRow)
- {
- int nRowColor = 0;
- switch (nRow)
- {
- case 0: nRowColor = 0x999999; break;
- case 1: nRowColor = 0xFFFFCC; break;
- case 2: nRowColor = 0xEEEEEE; break;
- case 3: nRowColor = 0x999999; break;
- }
-
- for (int nColumn = 0; nColumn < 4; ++nColumn)
- {
- int nColor = nRowColor;
- if ((nColumn == 0) || (nColumn == 3))
- nColor -= 0x333300;
-
- // get the auto format field and apply properties
- uno.Any aFieldObj = xAutoFormatIA.getByIndex(
- 4 * nRow + nColumn );
- xPropSet =
- (unoidl.com.sun.star.beans.XPropertySet) aFieldObj.Value;
- xPropSet.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) nColor ) );
- }
- }
-
- // set the auto format to the spreadsheet
- xCellRange = xSheet.getCellRangeByName( "A5:H25" );
- unoidl.com.sun.star.table.XAutoFormattable xAutoForm =
- (unoidl.com.sun.star.table.XAutoFormattable) xCellRange;
- xAutoForm.autoFormat( aAutoFormatName );
-
- // remove the auto format
- if (!bExistsAlready)
- xAutoFormatsNA.removeByName( aAutoFormatName );
-
-
- // --- Conditional formats ---
- xSheet = getSpreadsheet( 0 );
- prepareRange( xSheet, "K20:K23", "Cond. Format" );
- setValue( xSheet, "K21", 1 );
- setValue( xSheet, "K22", 2 );
- setValue( xSheet, "K23", 3 );
-
- // get the conditional format object of the cell range
- xCellRange = xSheet.getCellRangeByName( "K21:K23" );
- xPropSet = (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- unoidl.com.sun.star.sheet.XSheetConditionalEntries xEntries =
- (unoidl.com.sun.star.sheet.XSheetConditionalEntries)
- xPropSet.getPropertyValue( "ConditionalFormat" ).Value;
-
- // create a condition and apply it to the range
- unoidl.com.sun.star.beans.PropertyValue[] aCondition =
- new unoidl.com.sun.star.beans.PropertyValue[3];
- aCondition[0] = new unoidl.com.sun.star.beans.PropertyValue();
- aCondition[0].Name = "Operator";
- aCondition[0].Value =
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.ConditionOperator),
- unoidl.com.sun.star.sheet.ConditionOperator.GREATER );
- aCondition[1] = new unoidl.com.sun.star.beans.PropertyValue();
- aCondition[1].Name = "Formula1";
- aCondition[1].Value = new uno.Any( "1" );
- aCondition[2] = new unoidl.com.sun.star.beans.PropertyValue();
- aCondition[2].Name = "StyleName";
- aCondition[2].Value = new uno.Any( aStyleName );
- xEntries.addNew( aCondition );
- xPropSet.setPropertyValue(
- "ConditionalFormat",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.XSheetConditionalEntries),
- xEntries ) );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the spreadsheet document. */
- private void doDocumentSamples()
- {
- Console.WriteLine( "\n*** Samples for spreadsheet document ***\n" );
-
-
- // --- Insert a new spreadsheet ---
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet =
- insertSpreadsheet( "A new sheet", (short) 0x7FFF );
-
-
- // --- Copy a cell range ---
- prepareRange( xSheet, "A1:B3", "Copy from" );
- prepareRange( xSheet, "D1:E3", "To" );
- setValue( xSheet, "A2", 123 );
- setValue( xSheet, "B2", 345 );
- setFormula( xSheet, "A3", "=SUM(A2:B2)" );
- setFormula( xSheet, "B3", "=FORMULA(A3)" );
-
- unoidl.com.sun.star.sheet.XCellRangeMovement xMovement =
- (unoidl.com.sun.star.sheet.XCellRangeMovement) xSheet;
- unoidl.com.sun.star.table.CellRangeAddress aSourceRange =
- createCellRangeAddress( xSheet, "A2:B3" );
- unoidl.com.sun.star.table.CellAddress aDestCell =
- createCellAddress( xSheet, "D2" );
- xMovement.copyRange( aDestCell, aSourceRange );
-
-
- // --- Print automatic column page breaks ---
- unoidl.com.sun.star.sheet.XSheetPageBreak xPageBreak =
- (unoidl.com.sun.star.sheet.XSheetPageBreak) xSheet;
- unoidl.com.sun.star.sheet.TablePageBreakData[] aPageBreakArray =
- xPageBreak.getColumnPageBreaks();
-
- Console.Write( "Automatic column page breaks:" );
- for (int nIndex = 0; nIndex < aPageBreakArray.Length; ++nIndex)
- if (!aPageBreakArray[nIndex].ManualBreak)
- Console.Write( " " + aPageBreakArray[nIndex].Position );
- Console.WriteLine();
-
-
- // --- Document properties ---
- unoidl.com.sun.star.beans.XPropertySet xPropSet =
- (unoidl.com.sun.star.beans.XPropertySet) getDocument();
-
- String aText = "Value of property IsIterationEnabled: ";
- aText +=
- (Boolean) xPropSet.getPropertyValue( "IsIterationEnabled" ).Value;
- Console.WriteLine( aText );
- aText = "Value of property IterationCount: ";
- aText += (Int32) xPropSet.getPropertyValue( "IterationCount" ).Value;
- Console.WriteLine( aText );
- aText = "Value of property NullDate: ";
- unoidl.com.sun.star.util.Date aDate = (unoidl.com.sun.star.util.Date)
- xPropSet.getPropertyValue( "NullDate" ).Value;
- aText += aDate.Year + "-" + aDate.Month + "-" + aDate.Day;
- Console.WriteLine( aText );
-
-
- // --- Data validation ---
- prepareRange( xSheet, "A5:C7", "Validation" );
- setFormula( xSheet, "A6", "Insert values between 0.0 and 5.0 below:" );
-
- unoidl.com.sun.star.table.XCellRange xCellRange =
- xSheet.getCellRangeByName( "A7:C7" );
- unoidl.com.sun.star.beans.XPropertySet xCellPropSet =
- (unoidl.com.sun.star.beans.XPropertySet) xCellRange;
- // validation properties
- unoidl.com.sun.star.beans.XPropertySet xValidPropSet =
- (unoidl.com.sun.star.beans.XPropertySet)
- xCellPropSet.getPropertyValue( "Validation" ).Value;
- xValidPropSet.setPropertyValue(
- "Type",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.ValidationType),
- unoidl.com.sun.star.sheet.ValidationType.DECIMAL ) );
- xValidPropSet.setPropertyValue(
- "ShowErrorMessage", new uno.Any( true ) );
- xValidPropSet.setPropertyValue(
- "ErrorMessage", new uno.Any( "This is an invalid value!" ) );
- xValidPropSet.setPropertyValue(
- "ErrorAlertStyle",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.ValidationAlertStyle),
- unoidl.com.sun.star.sheet.ValidationAlertStyle.STOP ) );
- // condition
- unoidl.com.sun.star.sheet.XSheetCondition xCondition =
- (unoidl.com.sun.star.sheet.XSheetCondition) xValidPropSet;
- xCondition.setOperator(
- unoidl.com.sun.star.sheet.ConditionOperator.BETWEEN );
- xCondition.setFormula1( "0.0" );
- xCondition.setFormula2( "5.0" );
- // apply on cell range
- xCellPropSet.setPropertyValue(
- "Validation",
- new uno.Any(
- typeof (unoidl.com.sun.star.beans.XPropertySet),
- xValidPropSet ) );
-
-
- // --- Scenarios ---
- uno.Any [][] aValues = {
- new uno.Any [] { uno.Any.VOID, uno.Any.VOID },
- new uno.Any [] { uno.Any.VOID, uno.Any.VOID }
- };
-
- aValues[ 0 ][ 0 ] = new uno.Any( (Double) 11 );
- aValues[ 0 ][ 1 ] = new uno.Any( (Double) 12 );
- aValues[ 1 ][ 0 ] = new uno.Any( "Test13" );
- aValues[ 1 ][ 1 ] = new uno.Any( "Test14" );
- insertScenario(
- xSheet, "B10:C11", aValues,
- "First Scenario", "The first scenario." );
-
- aValues[ 0 ][ 0 ] = new uno.Any( "Test21" );
- aValues[ 0 ][ 1 ] = new uno.Any( "Test22" );
- aValues[ 1 ][ 0 ] = new uno.Any( (Double) 23 );
- aValues[ 1 ][ 1 ] = new uno.Any( (Double) 24 );
- insertScenario(
- xSheet, "B10:C11", aValues,
- "Second Scenario", "The visible scenario." );
-
- aValues[ 0 ][ 0 ] = new uno.Any( (Double) 31 );
- aValues[ 0 ][ 1 ] = new uno.Any( (Double) 32 );
- aValues[ 1 ][ 0 ] = new uno.Any( "Test33" );
- aValues[ 1 ][ 1 ] = new uno.Any( "Test34" );
- insertScenario(
- xSheet, "B10:C11", aValues,
- "Third Scenario", "The last scenario." );
-
- // show second scenario
- showScenario( xSheet, "Second Scenario" );
- }
-
- /** Inserts a scenario containing one cell range into a sheet and
- applies the value array.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aRange The range address for the scenario.
- @param aValueArray The array of cell contents.
- @param aScenarioName The name of the new scenario.
- @param aScenarioComment The user comment for the scenario. */
- private void insertScenario(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aRange,
- uno.Any [][] aValueArray,
- String aScenarioName,
- String aScenarioComment )
- {
- // get the cell range with the given address
- unoidl.com.sun.star.table.XCellRange xCellRange =
- xSheet.getCellRangeByName( aRange );
-
- // create the range address sequence
- unoidl.com.sun.star.sheet.XCellRangeAddressable xAddr =
- (unoidl.com.sun.star.sheet.XCellRangeAddressable) xCellRange;
- unoidl.com.sun.star.table.CellRangeAddress[] aRangesSeq =
- new unoidl.com.sun.star.table.CellRangeAddress[1];
- aRangesSeq[0] = xAddr.getRangeAddress();
-
- // create the scenario
- unoidl.com.sun.star.sheet.XScenariosSupplier xScenSupp =
- (unoidl.com.sun.star.sheet.XScenariosSupplier) xSheet;
- unoidl.com.sun.star.sheet.XScenarios xScenarios =
- xScenSupp.getScenarios();
- xScenarios.addNewByName( aScenarioName, aRangesSeq, aScenarioComment );
-
- // insert the values into the range
- unoidl.com.sun.star.sheet.XCellRangeData xData =
- (unoidl.com.sun.star.sheet.XCellRangeData) xCellRange;
- xData.setDataArray( aValueArray );
- }
-
- /** Activates a scenario.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aScenarioName The name of the scenario. */
- private void showScenario(
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet,
- String aScenarioName )
- {
- // get the scenario set
- unoidl.com.sun.star.sheet.XScenariosSupplier xScenSupp =
- (unoidl.com.sun.star.sheet.XScenariosSupplier) xSheet;
- unoidl.com.sun.star.sheet.XScenarios xScenarios =
- xScenSupp.getScenarios();
-
- // get the scenario and activate it
- uno.Any aScenarioObj = xScenarios.getByName( aScenarioName );
- unoidl.com.sun.star.sheet.XScenario xScenario =
- (unoidl.com.sun.star.sheet.XScenario) aScenarioObj.Value;
- xScenario.apply();
- }
-
-// ________________________________________________________________
-
- private void doNamedRangesSamples()
- {
- Console.WriteLine( "\n*** Samples for named ranges ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheetDocument xDocument =
- getDocument();
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet =
- getSpreadsheet( 0 );
-
-
- // --- Named ranges ---
- prepareRange( xSheet, "G42:H45", "Named ranges" );
- xSheet.getCellByPosition( 6, 42 ).setValue( 1 );
- xSheet.getCellByPosition( 6, 43 ).setValue( 2 );
- xSheet.getCellByPosition( 7, 42 ).setValue( 3 );
- xSheet.getCellByPosition( 7, 43 ).setValue( 4 );
-
- // insert a named range
- unoidl.com.sun.star.beans.XPropertySet xDocProp =
- (unoidl.com.sun.star.beans.XPropertySet) xDocument;
- uno.Any aRangesObj = xDocProp.getPropertyValue( "NamedRanges" );
- unoidl.com.sun.star.sheet.XNamedRanges xNamedRanges =
- (unoidl.com.sun.star.sheet.XNamedRanges) aRangesObj.Value;
- unoidl.com.sun.star.table.CellAddress aRefPos =
- new unoidl.com.sun.star.table.CellAddress();
- aRefPos.Sheet = 0;
- aRefPos.Column = 6;
- aRefPos.Row = 44;
- xNamedRanges.addNewByName( "ExampleName", "SUM(G43:G44)", aRefPos, 0 );
-
- // use the named range in formulas
- xSheet.getCellByPosition( 6, 44 ).setFormula( "=ExampleName" );
- xSheet.getCellByPosition( 7, 44 ).setFormula( "=ExampleName" );
-
-
- // --- Label ranges ---
- prepareRange( xSheet, "G47:I50", "Label ranges" );
- unoidl.com.sun.star.table.XCellRange xRange =
- xSheet.getCellRangeByPosition( 6, 47, 7, 49 );
- unoidl.com.sun.star.sheet.XCellRangeData xData =
- ( unoidl.com.sun.star.sheet.XCellRangeData ) xRange;
- uno.Any [][] aValues =
- {
- new uno.Any [] { new uno.Any( "Apples" ),
- new uno.Any( "Oranges" ) },
- new uno.Any [] { new uno.Any( (Double) 5 ),
- new uno.Any( (Double) 7 ) },
- new uno.Any [] { new uno.Any( (Double) 6 ),
- new uno.Any( (Double) 8 ) }
- };
- xData.setDataArray( aValues );
-
- // insert a column label range
- uno.Any aLabelsObj = xDocProp.getPropertyValue( "ColumnLabelRanges" );
- unoidl.com.sun.star.sheet.XLabelRanges xLabelRanges =
- (unoidl.com.sun.star.sheet.XLabelRanges) aLabelsObj.Value;
- unoidl.com.sun.star.table.CellRangeAddress aLabelArea =
- new unoidl.com.sun.star.table.CellRangeAddress();
- aLabelArea.Sheet = 0;
- aLabelArea.StartColumn = 6;
- aLabelArea.StartRow = 47;
- aLabelArea.EndColumn = 7;
- aLabelArea.EndRow = 47;
- unoidl.com.sun.star.table.CellRangeAddress aDataArea =
- new unoidl.com.sun.star.table.CellRangeAddress();
- aDataArea.Sheet = 0;
- aDataArea.StartColumn = 6;
- aDataArea.StartRow = 48;
- aDataArea.EndColumn = 7;
- aDataArea.EndRow = 49;
- xLabelRanges.addNew( aLabelArea, aDataArea );
-
- // use the label range in formulas
- xSheet.getCellByPosition( 8, 48 ).setFormula( "=Apples+Oranges" );
- xSheet.getCellByPosition( 8, 49 ).setFormula( "=Apples+Oranges" );
- }
-
-// ________________________________________________________________
-
- /** Helper for doDatabaseSamples: get name of first database. */
- private String getFirstDatabaseName()
- {
- String aDatabase = null;
- unoidl.com.sun.star.lang.XMultiServiceFactory xServiceManager =
- getServiceManager();
- unoidl.com.sun.star.container.XNameAccess xContext =
- (unoidl.com.sun.star.container.XNameAccess)
- xServiceManager.createInstance(
- "com.sun.star.sdb.DatabaseContext" );
- String[] aNames = xContext.getElementNames();
- if ( aNames.Length > 0 )
- aDatabase = aNames[0];
- return aDatabase;
- }
-
- /** Helper for doDatabaseSamples: get name of first table in a database. */
- private String getFirstTableName( String aDatabase )
- {
- if ( aDatabase == null )
- return null;
-
- String aTable = null;
- unoidl.com.sun.star.lang.XMultiServiceFactory xServiceManager =
- getServiceManager();
- unoidl.com.sun.star.container.XNameAccess xContext =
- (unoidl.com.sun.star.container.XNameAccess)
- xServiceManager.createInstance(
- "com.sun.star.sdb.DatabaseContext" );
- unoidl.com.sun.star.sdb.XCompletedConnection xSource =
- (unoidl.com.sun.star.sdb.XCompletedConnection)
- xContext.getByName( aDatabase ).Value;
- unoidl.com.sun.star.task.XInteractionHandler xHandler =
- (unoidl.com.sun.star.task.XInteractionHandler)
- xServiceManager.createInstance(
- "com.sun.star.task.InteractionHandler" );
- unoidl.com.sun.star.sdbcx.XTablesSupplier xSupplier =
- (unoidl.com.sun.star.sdbcx.XTablesSupplier)
- xSource.connectWithCompletion( xHandler );
- unoidl.com.sun.star.container.XNameAccess xTables =
- xSupplier.getTables();
- String[] aNames = xTables.getElementNames();
- if ( aNames.Length > 0 )
- aTable = aNames[0];
- return aTable;
- }
-
- private void doDatabaseSamples()
- {
- Console.WriteLine( "\n*** Samples for database operations ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 2 );
-
-
- // --- put some example data into the sheet ---
- unoidl.com.sun.star.table.XCellRange xRange =
- xSheet.getCellRangeByName( "B3:D24" );
- unoidl.com.sun.star.sheet.XCellRangeData xData =
- (unoidl.com.sun.star.sheet.XCellRangeData) xRange;
- uno.Any [][] aValues =
- {
- new uno.Any [] { new uno.Any( "Name" ),
- new uno.Any( "Year" ),
- new uno.Any( "Sales" ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 2001 ),
- new uno.Any( (Double) 4.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 1997 ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 1998 ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 1997 ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 2002 ),
- new uno.Any( (Double) 9.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 1999 ),
- new uno.Any( (Double) 7.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 1996 ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 2000 ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 1999 ),
- new uno.Any( (Double) 5.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 2002 ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 2001 ),
- new uno.Any( (Double) 5.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 2000 ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 1996 ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 1996 ),
- new uno.Any( (Double) 7.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 1997 ),
- new uno.Any( (Double) 3.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 2000 ),
- new uno.Any( (Double) 9.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 1998 ),
- new uno.Any( (Double) 1.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 1999 ),
- new uno.Any( (Double) 6.0 ) },
- new uno.Any [] { new uno.Any( "Carol" ),
- new uno.Any( (Double) 2002 ),
- new uno.Any( (Double) 8.0 ) },
- new uno.Any [] { new uno.Any( "Alice" ),
- new uno.Any( (Double) 1998 ),
- new uno.Any( (Double) 5.0 ) },
- new uno.Any [] { new uno.Any( "Bob" ),
- new uno.Any( (Double) 2001 ),
- new uno.Any( (Double) 6.0 ) }
- };
- xData.setDataArray( aValues );
-
-
- // --- filter for second column >= 1998 ---
- unoidl.com.sun.star.sheet.XSheetFilterable xFilter =
- (unoidl.com.sun.star.sheet.XSheetFilterable) xRange;
- unoidl.com.sun.star.sheet.XSheetFilterDescriptor xFilterDesc =
- xFilter.createFilterDescriptor( true );
- unoidl.com.sun.star.sheet.TableFilterField[] aFilterFields =
- new unoidl.com.sun.star.sheet.TableFilterField[1];
- aFilterFields[0] = new unoidl.com.sun.star.sheet.TableFilterField();
- aFilterFields[0].Field = 1;
- aFilterFields[0].IsNumeric = true;
- aFilterFields[0].Operator =
- unoidl.com.sun.star.sheet.FilterOperator.GREATER_EQUAL;
- aFilterFields[0].NumericValue = 1998;
- xFilterDesc.setFilterFields( aFilterFields );
- unoidl.com.sun.star.beans.XPropertySet xFilterProp =
- (unoidl.com.sun.star.beans.XPropertySet) xFilterDesc;
- xFilterProp.setPropertyValue(
- "ContainsHeader", new uno.Any( true ) );
- xFilter.filter( xFilterDesc );
-
-
- // --- do the same filter as above, using criteria from a cell range ---
- unoidl.com.sun.star.table.XCellRange xCritRange =
- xSheet.getCellRangeByName( "B27:B28" );
- unoidl.com.sun.star.sheet.XCellRangeData xCritData =
- (unoidl.com.sun.star.sheet.XCellRangeData) xCritRange;
- uno.Any [][] aCritValues =
- {
- new uno.Any [] { new uno.Any( "Year" ) },
- new uno.Any [] { new uno.Any( ">= 1998" ) }
- };
- xCritData.setDataArray( aCritValues );
- unoidl.com.sun.star.sheet.XSheetFilterableEx xCriteria =
- (unoidl.com.sun.star.sheet.XSheetFilterableEx) xCritRange;
- xFilterDesc = xCriteria.createFilterDescriptorByObject( xFilter );
- if ( xFilterDesc != null )
- xFilter.filter( xFilterDesc );
-
-
- // --- sort by second column, ascending ---
- unoidl.com.sun.star.util.SortField[] aSortFields =
- new unoidl.com.sun.star.util.SortField[1];
- aSortFields[0] = new unoidl.com.sun.star.util.SortField();
- aSortFields[0].Field = 1;
- aSortFields[0].SortAscending = true;
-
- unoidl.com.sun.star.beans.PropertyValue[] aSortDesc =
- new unoidl.com.sun.star.beans.PropertyValue[2];
- aSortDesc[0] = new unoidl.com.sun.star.beans.PropertyValue();
- aSortDesc[0].Name = "SortFields";
- aSortDesc[0].Value =
- new uno.Any(
- typeof (unoidl.com.sun.star.util.SortField []),
- aSortFields );
- aSortDesc[1] = new unoidl.com.sun.star.beans.PropertyValue();
- aSortDesc[1].Name = "ContainsHeader";
- aSortDesc[1].Value = new uno.Any( true );
-
- unoidl.com.sun.star.util.XSortable xSort =
- (unoidl.com.sun.star.util.XSortable) xRange;
- xSort.sort( aSortDesc );
-
-
- // --- insert subtotals ---
- unoidl.com.sun.star.sheet.XSubTotalCalculatable xSub =
- (unoidl.com.sun.star.sheet.XSubTotalCalculatable) xRange;
- unoidl.com.sun.star.sheet.XSubTotalDescriptor xSubDesc =
- xSub.createSubTotalDescriptor( true );
- unoidl.com.sun.star.sheet.SubTotalColumn[] aColumns =
- new unoidl.com.sun.star.sheet.SubTotalColumn[1];
- // calculate sum of third column
- aColumns[0] = new unoidl.com.sun.star.sheet.SubTotalColumn();
- aColumns[0].Column = 2;
- aColumns[0].Function = unoidl.com.sun.star.sheet.GeneralFunction.SUM;
- // group by first column
- xSubDesc.addNew( aColumns, 0 );
- xSub.applySubTotals( xSubDesc, true );
-
- String aDatabase = getFirstDatabaseName();
- String aTableName = getFirstTableName( aDatabase );
- if ( aDatabase != null && aTableName != null )
- {
- // --- import from database ---
- unoidl.com.sun.star.beans.PropertyValue[] aImportDesc =
- new unoidl.com.sun.star.beans.PropertyValue[3];
- aImportDesc[0] = new unoidl.com.sun.star.beans.PropertyValue();
- aImportDesc[0].Name = "DatabaseName";
- aImportDesc[0].Value = new uno.Any( aDatabase );
- aImportDesc[1] = new unoidl.com.sun.star.beans.PropertyValue();
- aImportDesc[1].Name = "SourceType";
- aImportDesc[1].Value =
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.DataImportMode),
- unoidl.com.sun.star.sheet.DataImportMode.TABLE );
- aImportDesc[2] = new unoidl.com.sun.star.beans.PropertyValue();
- aImportDesc[2].Name = "SourceObject";
- aImportDesc[2].Value = new uno.Any( aTableName );
-
- unoidl.com.sun.star.table.XCellRange xImportRange =
- xSheet.getCellRangeByName( "B35:B35" );
- unoidl.com.sun.star.util.XImportable xImport =
- (unoidl.com.sun.star.util.XImportable) xImportRange;
- xImport.doImport( aImportDesc );
-
-
- // --- use the temporary database range to find the
- // imported data's size ---
- unoidl.com.sun.star.beans.XPropertySet xDocProp =
- (unoidl.com.sun.star.beans.XPropertySet) getDocument();
- uno.Any aRangesObj = xDocProp.getPropertyValue( "DatabaseRanges" );
- unoidl.com.sun.star.container.XNameAccess xRanges =
- (unoidl.com.sun.star.container.XNameAccess) aRangesObj.Value;
- String[] aNames = xRanges.getElementNames();
- for ( int i=0; i<aNames.Length; i++ )
- {
- uno.Any aRangeObj = xRanges.getByName( aNames[i] );
- unoidl.com.sun.star.beans.XPropertySet xRangeProp =
- (unoidl.com.sun.star.beans.XPropertySet) aRangeObj.Value;
- bool bUser = (Boolean)
- xRangeProp.getPropertyValue( "IsUserDefined" ).Value;
- if ( !bUser )
- {
- // this is the temporary database range -
- // get the cell range and format it
- unoidl.com.sun.star.sheet.XCellRangeReferrer xRef =
- (unoidl.com.sun.star.sheet.XCellRangeReferrer)
- aRangeObj.Value;
- unoidl.com.sun.star.table.XCellRange xResultRange =
- xRef.getReferredCells();
- unoidl.com.sun.star.beans.XPropertySet xResultProp =
- (unoidl.com.sun.star.beans.XPropertySet) xResultRange;
- xResultProp.setPropertyValue(
- "IsCellBackgroundTransparent", new uno.Any( false ) );
- xResultProp.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0xFFFFCC ) );
- }
- }
- }
- else
- Console.WriteLine("can't get database");
- }
-
-// ________________________________________________________________
-
- private void doDataPilotSamples()
- {
- Console.WriteLine( "\n*** Samples for Data Pilot ***\n" );
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
-
-
- // --- Create a new DataPilot table ---
- prepareRange( xSheet, "A38:C38", "Data Pilot" );
- unoidl.com.sun.star.sheet.XDataPilotTablesSupplier xDPSupp =
- (unoidl.com.sun.star.sheet.XDataPilotTablesSupplier) xSheet;
- unoidl.com.sun.star.sheet.XDataPilotTables xDPTables =
- xDPSupp.getDataPilotTables();
- unoidl.com.sun.star.sheet.XDataPilotDescriptor xDPDesc =
- xDPTables.createDataPilotDescriptor();
- // set source range (use data range from CellRange test)
- unoidl.com.sun.star.table.CellRangeAddress aSourceAddress =
- createCellRangeAddress( xSheet, "A10:C30" );
- xDPDesc.setSourceRange( aSourceAddress );
- // settings for fields
- unoidl.com.sun.star.container.XIndexAccess xFields =
- xDPDesc.getDataPilotFields();
- uno.Any aFieldObj;
- unoidl.com.sun.star.beans.XPropertySet xFieldProp;
- // use first column as column field
- aFieldObj = xFields.getByIndex(0);
- xFieldProp = (unoidl.com.sun.star.beans.XPropertySet) aFieldObj.Value;
- xFieldProp.setPropertyValue(
- "Orientation",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.DataPilotFieldOrientation),
- unoidl.com.sun.star.sheet.DataPilotFieldOrientation.COLUMN ) );
- // use second column as row field
- aFieldObj = xFields.getByIndex(1);
- xFieldProp = (unoidl.com.sun.star.beans.XPropertySet) aFieldObj.Value;
- xFieldProp.setPropertyValue(
- "Orientation",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.DataPilotFieldOrientation),
- unoidl.com.sun.star.sheet.DataPilotFieldOrientation.ROW ) );
- // use third column as data field, calculating the sum
- aFieldObj = xFields.getByIndex(2);
- xFieldProp = (unoidl.com.sun.star.beans.XPropertySet) aFieldObj.Value;
- xFieldProp.setPropertyValue(
- "Orientation",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.DataPilotFieldOrientation),
- unoidl.com.sun.star.sheet.DataPilotFieldOrientation.DATA ) );
- xFieldProp.setPropertyValue(
- "Function",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.GeneralFunction),
- unoidl.com.sun.star.sheet.GeneralFunction.SUM ) );
- // select output position
- unoidl.com.sun.star.table.CellAddress aDestAddress =
- createCellAddress( xSheet, "A40" );
- xDPTables.insertNewByName( "DataPilotExample", aDestAddress, xDPDesc );
-
-
- // --- Modify the DataPilot table ---
- uno.Any aDPTableObj = xDPTables.getByName( "DataPilotExample" );
- xDPDesc =
- (unoidl.com.sun.star.sheet.XDataPilotDescriptor) aDPTableObj.Value;
- xFields = xDPDesc.getDataPilotFields();
- // add a second data field from the third column,
- // calculating the average
- aFieldObj = xFields.getByIndex(2);
- xFieldProp = (unoidl.com.sun.star.beans.XPropertySet) aFieldObj.Value;
- xFieldProp.setPropertyValue(
- "Orientation",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.DataPilotFieldOrientation),
- unoidl.com.sun.star.sheet.DataPilotFieldOrientation.DATA ) );
- xFieldProp.setPropertyValue(
- "Function",
- new uno.Any(
- typeof (unoidl.com.sun.star.sheet.GeneralFunction),
- unoidl.com.sun.star.sheet.GeneralFunction.AVERAGE ) );
- }
-
-// ________________________________________________________________
-
- private void doFunctionAccessSamples()
- {
- Console.WriteLine( "\n*** Samples for function handling ***\n" );
- unoidl.com.sun.star.lang.XMultiServiceFactory xServiceManager =
- getServiceManager();
-
-
- // --- Calculate a function ---
- Object aFuncInst = xServiceManager.createInstance(
- "com.sun.star.sheet.FunctionAccess" );
- unoidl.com.sun.star.sheet.XFunctionAccess xFuncAcc =
- (unoidl.com.sun.star.sheet.XFunctionAccess) aFuncInst;
- // put the data in a two-dimensional array
- Double [][] aData = { new Double [] { 1.0, 2.0, 3.0 } };
- // construct the array of function arguments
- uno.Any [] aArgs = new uno.Any [2];
- aArgs[0] = new uno.Any( typeof (Double [][]), aData );
- aArgs[1] = new uno.Any( (Double) 2.0 );
- uno.Any aResult = xFuncAcc.callFunction( "ZTEST", aArgs );
- Console.WriteLine(
- "ZTEST result for data {1,2,3} and value 2 is " + aResult.Value );
-
-
- // --- Get the list of recently used functions ---
- Object aRecInst = xServiceManager.createInstance(
- "com.sun.star.sheet.RecentFunctions" );
- unoidl.com.sun.star.sheet.XRecentFunctions xRecFunc =
- (unoidl.com.sun.star.sheet.XRecentFunctions) aRecInst;
- int[] nRecentIds = xRecFunc.getRecentFunctionIds();
-
-
- // --- Get the names for these functions ---
- Object aDescInst = xServiceManager.createInstance(
- "com.sun.star.sheet.FunctionDescriptions" );
- unoidl.com.sun.star.sheet.XFunctionDescriptions xFuncDesc =
- (unoidl.com.sun.star.sheet.XFunctionDescriptions) aDescInst;
- Console.Write("Recently used functions: ");
- for (int nFunction=0; nFunction<nRecentIds.Length; nFunction++)
- {
- unoidl.com.sun.star.beans.PropertyValue[] aProperties =
- xFuncDesc.getById( nRecentIds[nFunction] );
- for (int nProp=0; nProp<aProperties.Length; nProp++)
- if ( aProperties[nProp].Name.Equals( "Name" ) )
- Console.Write( aProperties[nProp].Value + " " );
- }
- Console.WriteLine();
- }
-
-// ________________________________________________________________
-
- private void doApplicationSettingsSamples()
- {
- Console.WriteLine( "\n*** Samples for application settings ***\n" );
- unoidl.com.sun.star.lang.XMultiServiceFactory xServiceManager =
- getServiceManager();
-
-
- // --- Get the user defined sort lists ---
- Object aSettings = xServiceManager.createInstance(
- "com.sun.star.sheet.GlobalSheetSettings" );
- unoidl.com.sun.star.beans.XPropertySet xPropSet =
- (unoidl.com.sun.star.beans.XPropertySet) aSettings;
- String[] aEntries = (String [])
- xPropSet.getPropertyValue( "UserLists" ).Value;
- Console.WriteLine("User defined sort lists:");
- for ( int i=0; i<aEntries.Length; i++ )
- Console.WriteLine( aEntries[i] );
- }
-
-// ________________________________________________________________
-
-}
diff --git a/odk/examples/CLI/CSharp/Spreadsheet/ViewSample.cs b/odk/examples/CLI/CSharp/Spreadsheet/ViewSample.cs
deleted file mode 100644
index 7b73d178..00000000
--- a/odk/examples/CLI/CSharp/Spreadsheet/ViewSample.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-
-using System;
-using System.Threading;
-
-// __________ implementation ____________________________________
-
-/** Create and modify a spreadsheet view.
- */
-public class ViewSample : SpreadsheetDocHelper
-{
-
- public static void Main( String [] args )
- {
- try
- {
- using ( ViewSample aSample = new ViewSample( args ) )
- {
- aSample.doSampleFunction();
- }
- Console.WriteLine( "\nSamples done." );
- }
- catch (Exception ex)
- {
- Console.WriteLine( "Sample caught exception! " + ex );
- }
- }
-
-// ________________________________________________________________
-
- public ViewSample( String[] args )
- : base( args )
- {
- }
-
-// ________________________________________________________________
-
- /** This sample function performs all changes on the view. */
- public void doSampleFunction()
- {
- unoidl.com.sun.star.sheet.XSpreadsheetDocument xDoc = getDocument();
- unoidl.com.sun.star.frame.XModel xModel =
- (unoidl.com.sun.star.frame.XModel) xDoc;
- unoidl.com.sun.star.frame.XController xController =
- xModel.getCurrentController();
-
- // --- Spreadsheet view ---
- // freeze the first column and first two rows
- unoidl.com.sun.star.sheet.XViewFreezable xFreeze =
- (unoidl.com.sun.star.sheet.XViewFreezable) xController;
- if ( null != xFreeze )
- Console.WriteLine( "got xFreeze" );
- xFreeze.freezeAtPosition( 1, 2 );
-
- // --- View pane ---
- // get the cell range shown in the second pane and assign
- // a cell background to them
- unoidl.com.sun.star.container.XIndexAccess xIndex =
- (unoidl.com.sun.star.container.XIndexAccess) xController;
- uno.Any aPane = xIndex.getByIndex(1);
- unoidl.com.sun.star.sheet.XCellRangeReferrer xRefer =
- (unoidl.com.sun.star.sheet.XCellRangeReferrer) aPane.Value;
- unoidl.com.sun.star.table.XCellRange xRange = xRefer.getReferredCells();
- unoidl.com.sun.star.beans.XPropertySet xRangeProp =
- (unoidl.com.sun.star.beans.XPropertySet) xRange;
- xRangeProp.setPropertyValue(
- "IsCellBackgroundTransparent", new uno.Any( false ) );
- xRangeProp.setPropertyValue(
- "CellBackColor", new uno.Any( (Int32) 0xFFFFCC ) );
-
- // --- View settings ---
- // change the view to display green grid lines
- unoidl.com.sun.star.beans.XPropertySet xProp =
- (unoidl.com.sun.star.beans.XPropertySet) xController;
- xProp.setPropertyValue(
- "ShowGrid", new uno.Any( true ) );
- xProp.setPropertyValue(
- "GridColor", new uno.Any( (Int32) 0x00CC00 ) );
-
- // --- Range selection ---
- // let the user select a range and use it as the view's selection
- unoidl.com.sun.star.sheet.XRangeSelection xRngSel =
- (unoidl.com.sun.star.sheet.XRangeSelection) xController;
- ExampleRangeListener aListener = new ExampleRangeListener();
- xRngSel.addRangeSelectionListener( aListener );
- unoidl.com.sun.star.beans.PropertyValue[] aArguments =
- new unoidl.com.sun.star.beans.PropertyValue[2];
- aArguments[0] = new unoidl.com.sun.star.beans.PropertyValue();
- aArguments[0].Name = "Title";
- aArguments[0].Value = new uno.Any( "Please select a range" );
- aArguments[1] = new unoidl.com.sun.star.beans.PropertyValue();
- aArguments[1].Name = "CloseOnMouseRelease";
- aArguments[1].Value = new uno.Any( true );
- xRngSel.startRangeSelection( aArguments );
- Monitor.Enter( aListener );
- try
- {
- Monitor.Wait( aListener ); // wait until the selection is done
- }
- finally
- {
- Monitor.Exit( aListener );
- }
- xRngSel.removeRangeSelectionListener( aListener );
- if ( aListener.aResult != null && aListener.aResult.Length != 0 )
- {
- unoidl.com.sun.star.view.XSelectionSupplier xSel =
- (unoidl.com.sun.star.view.XSelectionSupplier) xController;
- unoidl.com.sun.star.sheet.XSpreadsheetView xView =
- (unoidl.com.sun.star.sheet.XSpreadsheetView) xController;
- unoidl.com.sun.star.sheet.XSpreadsheet xSheet =
- xView.getActiveSheet();
- unoidl.com.sun.star.table.XCellRange xResultRange =
- xSheet.getCellRangeByName( aListener.aResult );
- xSel.select(
- new uno.Any(
- typeof (unoidl.com.sun.star.table.XCellRange),
- xResultRange ) );
- }
- }
-
-// ________________________________________________________________
-
- // listener to react on finished selection
-
- private class ExampleRangeListener
- : unoidl.com.sun.star.sheet.XRangeSelectionListener
- {
- public String aResult;
-
- public void done( unoidl.com.sun.star.sheet.RangeSelectionEvent aEvent )
- {
- aResult = aEvent.RangeDescriptor;
- Monitor.Enter( this );
- try
- {
- Monitor.Pulse( this );
- }
- finally
- {
- Monitor.Exit( this );
- }
- }
-
- public void aborted(
- unoidl.com.sun.star.sheet.RangeSelectionEvent aEvent )
- {
- Monitor.Enter( this );
- try
- {
- Monitor.Pulse( this );
- }
- finally
- {
- Monitor.Exit( this );
- }
- }
-
- public void disposing( unoidl.com.sun.star.lang.EventObject aObj )
- {
- }
- }
-
-// ________________________________________________________________
-
-}
diff --git a/odk/examples/CLI/VB.NET/WriterDemo/Makefile b/odk/examples/CLI/VB.NET/WriterDemo/Makefile
deleted file mode 100644
index 2fd3f993..00000000
--- a/odk/examples/CLI/VB.NET/WriterDemo/Makefile
+++ /dev/null
@@ -1,68 +0,0 @@
-# Builds the WriterDemo examples of the Developers Guide.
-
-PRJ = ../../../..
-SETTINGS = $(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-CSC_FLAGS = -warnaserror+ -incremental- -noconfig
-VBC_FLAGS = -warnaserror+
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS+=-Zi -MT
-CSC_FLAGS += -debug+ -checked+ -define:DEBUG -define:TRACE
-VBC_FLAGS += -debug+ -define:DEBUG=1 -define:TRACE=1
-else
-CSC_FLAGS += -o
-endif
-
-WRITERDEMO_OUT:= $(OUT_BIN)/VB_dotNET_WriterDemo
-
-# Targets
-.PHONY : ALL
-ALL : WriterDemo
-
-include $(SETTINGS)/stdtarget.mk
-
-# build executables
-$(WRITERDEMO_OUT)/%.exe: %.vb
- -$(MKDIR) $(subst /,$(PS),$(@D))
- vbc $(VBC_FLAGS) \
- -target:exe \
- -out:$@ \
- -libpath:"$(PRJ)\cli" \
- -reference:cli_basetypes.dll \
- -reference:cli_uretypes.dll \
- -reference:cli_oootypes.dll \
- -reference:cli_ure.dll \
- -reference:cli_cppuhelper.dll \
- -reference:System.dll \
- -reference:System.Drawing.dll \
- -reference:System.Windows.Forms.dll \
- $^
-
-ifeq "$(OS)" "WIN"
-WriterDemo : $(WRITERDEMO_OUT)/WriterDemo.exe
- @echo -------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) WriterDemo.run
- @echo -------------------------------------------------------------------------------
-else
-WriterDemo :
- @echo --------------------------------------------------------------------------------
- @echo This example works only under Windows!
- @echo --------------------------------------------------------------------------------
-endif
-
-%.run : $(WRITERDEMO_OUT)/%.exe
- @echo -------------------------------------------------------------------------------
- @echo Executing sample $@ $(UNORC) $(CONNECT_STRING)...
- @echo -------------------------------------------------------------------------------
- cd $(subst /,\\,$(WRITERDEMO_OUT)) && $(basename $@).exe
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_BIN)/VB_dotNET_WriterDemo)
-
diff --git a/odk/examples/CLI/VB.NET/WriterDemo/WriterDemo.vb b/odk/examples/CLI/VB.NET/WriterDemo/WriterDemo.vb
deleted file mode 100644
index 48eea4e4..00000000
--- a/odk/examples/CLI/VB.NET/WriterDemo/WriterDemo.vb
+++ /dev/null
@@ -1,242 +0,0 @@
-'*************************************************************************
-'
-' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'
-' Copyright 2000, 2010 Oracle and/or its affiliates.
-'
-' OpenOffice.org - a multi-platform office productivity suite
-'
-' 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.
-'
-'*************************************************************************
-
-Option Explicit On
-Option Strict On
-
-imports System
-imports System.Collections
-imports Microsoft.VisualBasic
-imports unoidl.com.sun.star.lang
-imports unoidl.com.sun.star.uno
-imports unoidl.com.sun.star.bridge
-imports uno.util
-
-Module WriterDemo
-
-Sub Main( ByVal args() As String)
-' If args.Length <> 2 Then
-' Console.WriteLine("WriterDemo takes two arguments. A file url to the office" & _
-' "program directory and a connection string.")
-' End If
-'Connect to a running office
-'--------------------------------------------------
-
-'Create a service manager of the remote office
-'Dim ht As Hashtable = New Hashtable()
-'ht.Add("SYSBINDIR", args(0))
-Dim xContext As XComponentContext
-'xLocalContext = Bootstrap.defaultBootstrap_InitialComponentContext( _
-' args(0) & "/uno.ini", ht.GetEnumerator())
-
-xContext = Bootstrap.bootstrap()
-
-'Dim xURLResolver As XUnoUrlResolver
-'xURLResolver = DirectCast(xLocalContext.getServiceManager(). _
-' createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", _
-' xLocalContext), XUnoUrlResolver)
-
-'Dim xRemoteContext As XComponentContext
-'xRemoteContext = DirectCast(xURLResolver.resolve( _
-' "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"), _
-' XComponentContext)
-
-Dim xFactory As XMultiServiceFactory
-xFactory = DirectCast(xContext.getServiceManager(), _
- XMultiServiceFactory)
-
-'Create the Desktop
-Dim xDesktop As unoidl.com.sun.star.frame.XDesktop
-xDesktop = DirectCast(xFactory.createInstance("com.sun.star.frame.Desktop"), _
- unoidl.com.sun.star.frame.XDesktop)
-
-'Open a new empty writer document
-Dim xComponentLoader As unoidl.com.sun.star.frame.XComponentLoader
-xComponentLoader = DirectCast(xDesktop, unoidl.com.sun.star.frame.XComponentLoader)
-Dim arProps() As unoidl.com.sun.star.beans.PropertyValue = _
- New unoidl.com.sun.star.beans.PropertyValue(){}
-Dim xComponent As unoidl.com.sun.star.lang.XComponent
- xComponent = xComponentLoader.loadComponentFromURL( _
- "private:factory/swriter", "_blank", 0, arProps)
-Dim xTextDocument As unoidl.com.sun.star.text.XTextDocument
-xTextDocument = DirectCast(xComponent, unoidl.com.sun.star.text.XTextDocument)
-
-'Create a text object
-Dim xText As unoidl.com.sun.star.text.XText
-xText = xTextDocument.getText()
-
-Dim xSimpleText As unoidl.com.sun.star.text.XSimpleText
-xSimpleText = DirectCast(xText, unoidl.com.sun.star.text.XSimpleText)
-
-'Create a cursor object
-Dim xCursor As unoidl.com.sun.star.text.XTextCursor
-xCursor = xSimpleText.createTextCursor()
-
-'Inserting some Text
-xText.insertString(xCursor, "The first line in the newly created text document." _
- & vbLf, false)
-
-'Create instance of a text table with 4 columns and 4 rows
-Dim objTextTable As Object
-objTextTable= DirectCast(xTextDocument, unoidl.com.sun.star.lang.XMultiServiceFactory). _
- createInstance("com.sun.star.text.TextTable")
-Dim xTextTable As unoidl.com.sun.star.text.XTextTable
-xTextTable = DirectCast(objTextTable, unoidl.com.sun.star.text.XTextTable)
-xTextTable.initialize(4, 4)
-xText.insertTextContent(xCursor, xTextTable, false)
-
-'Set the table background color
-Dim xPropertySetTable As unoidl.com.sun.star.beans.XPropertySet
-xPropertySetTable = DirectCast(objTextTable, unoidl.com.sun.star.beans.XPropertySet)
-xPropertySetTable.setPropertyValue("BackTransparent", New uno.Any(False))
-xPropertySetTable.setPropertyValue("BackColor", New uno.Any(&Hccccff))
-
-'Get first row
-Dim xTableRows As unoidl.com.sun.star.table.XTableRows
-xTableRows = xTextTable.getRows()
-Dim anyRow As uno.Any
-anyRow = DirectCast(xTableRows, unoidl.com.sun.star.container.XIndexAccess).getByIndex( 0)
-
-'Set a different background color for the first row
-Dim xPropertySetFirstRow As unoidl.com.sun.star.beans.XPropertySet
-xPropertySetFirstRow = DirectCast(anyRow.Value, unoidl.com.sun.star.beans.XPropertySet)
-xPropertySetFirstRow.setPropertyValue("BackTransparent", New uno.Any(False))
-xPropertySetFirstRow.setPropertyValue("BackColor", New uno.Any(&H6666AA))
-
-'Fill the first table row
-insertIntoCell("A1","FirstColumn", xTextTable)
-insertIntoCell("B1","SecondColumn", xTextTable)
-insertIntoCell("C1","ThirdColumn", xTextTable)
-insertIntoCell("D1","SUM", xTextTable)
-
-'Fill the remaining rows
-xTextTable.getCellByName("A2").setValue(22.5)
-xTextTable.getCellByName("B2").setValue(5615.3)
-xTextTable.getCellByName("C2").setValue(-2315.7)
-xTextTable.getCellByName("D2").setFormula("sum <A2:C2>")
-
-xTextTable.getCellByName("A3").setValue(21.5)
-xTextTable.getCellByName("B3").setValue (615.3)
-xTextTable.getCellByName("C3").setValue( -315.7)
-xTextTable.getCellByName("D3").setFormula( "sum <A3:C3>")
-
-xTextTable.getCellByName("A4").setValue( 121.5)
-xTextTable.getCellByName("B4").setValue( -615.3)
-xTextTable.getCellByName("C4").setValue( 415.7)
-xTextTable.getCellByName("D4").setFormula( "sum <A4:C4>")
-
-'Change the CharColor and add a Shadow
-Dim xPropertySetCursor As unoidl.com.sun.star.beans.XPropertySet
-xPropertySetCursor = DirectCast(xCursor, unoidl.com.sun.star.beans.XPropertySet)
-xPropertySetCursor.setPropertyValue("CharColor", New uno.Any(255))
-xPropertySetCursor.setPropertyValue("CharShadowed", New uno.Any(true))
-
-'Create a paragraph break
-xSimpleText.insertControlCharacter(xCursor, _
- unoidl.com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
-
-'Inserting colored Text.
-xSimpleText.insertString(xCursor," This is a colored Text - blue with shadow" & vbLf, _
- False)
-
-'Create a paragraph break
-xSimpleText.insertControlCharacter(xCursor, _
- unoidl.com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
-
-'Create a TextFrame.
-Dim objTextFrame As Object
-objTextFrame = DirectCast(xTextDocument, unoidl.com.sun.star.lang.XMultiServiceFactory). _
- createInstance("com.sun.star.text.TextFrame")
-
-Dim xTextFrame As unoidl.com.sun.star.text.XTextFrame = _
- DirectCast(objTextFrame, unoidl.com.sun.star.text.XTextFrame)
-
-'Set the size of the frame
-Dim aSize As unoidl.com.sun.star.awt.Size = _
- New unoidl.com.sun.star.awt.Size(15000, 400)
-DirectCast(xTextFrame, unoidl.com.sun.star.drawing.XShape).setSize(aSize)
-
-'Set anchortype
-Dim xPropertySetFrame As unoidl.com.sun.star.beans.XPropertySet
-xPropertySetFrame = DirectCast(xTextFrame, unoidl.com.sun.star.beans.XPropertySet)
-xPropertySetFrame.setPropertyValue("AnchorType", New uno.Any( _
- GetType(unoidl.com.sun.star.text.TextContentAnchorType), _
- unoidl.com.sun.star.text.TextContentAnchorType.AS_CHARACTER))
-
-'insert the frame
-xText.insertTextContent(xCursor, xTextFrame, False)
-
-'Get the text object of the frame
-
-Dim xFrameText As unoidl.com.sun.star.text.XText
-xFrameText = xTextFrame.getText()
-
-Dim xFrameSimpleText As unoidl.com.sun.star.text.XSimpleText
-xFrameSimpleText = DirectCast(xFrameText, unoidl.com.sun.star.text.XSimpleText)
-
-'Create a cursor object
-Dim xFrameCursor As unoidl.com.sun.star.text.XTextCursor
-xFrameCursor = xFrameSimpleText.createTextCursor()
-
-'Inserting some Text
-xFrameSimpleText.insertString(xFrameCursor, _
- "The first line in the newly created text frame.", False)
-xFrameSimpleText.insertString(xFrameCursor, _
- vbLf & "With this second line the height of the frame raises.", False)
-
-'Create a paragraph break
-xSimpleText.insertControlCharacter(xFrameCursor, _
- unoidl.com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
-
-'Change the CharColor and add a Shadow
-xPropertySetCursor.setPropertyValue("CharColor", New uno.Any(65536))
-xPropertySetCursor.setPropertyValue("CharShadowed", New uno.Any(False))
-
-'Insert another string
-xText.insertString(xCursor, vbLf + " That's all for now !!", False)
-
-End Sub
-
-Sub insertIntoCell(sCellName As String,sText As String, _
- xTable As unoidl.com.sun.star.text.XTextTable)
- Dim xCell As unoidl.com.sun.star.table.XCell
- xCell = xTable.getCellByName(sCellName)
-
- Dim xSimpleTextCell As unoidl.com.sun.star.text.XSimpleText
- xSimpleTextCell = DirectCast(xCell, unoidl.com.sun.star.text.XSimpleText)
-
- Dim xCursor As unoidl.com.sun.star.text.XTextCursor
- xCursor = xSimpleTextCell.createTextCursor()
-
- Dim xPropertySetCursor As unoidl.com.sun.star.beans.XPropertySet
- xPropertySetCursor = DirectCast(xCursor, unoidl.com.sun.star.beans.XPropertySet)
-
- xPropertySetCursor.setPropertyValue("CharColor", New uno.Any(&Hffffff))
- xSimpleTextCell.insertString(xCursor, sText, False)
-End Sub
-
-End Module
diff --git a/odk/examples/CLI/makefile.mk b/odk/examples/CLI/makefile.mk
deleted file mode 100644
index fb5344f9..00000000
--- a/odk/examples/CLI/makefile.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=cli
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-CSHARP=\
- $(DESTDIRCLIEXAMPLES)$/CSharp$/Spreadsheet$/GeneralTableSample.cs \
- $(DESTDIRCLIEXAMPLES)$/CSharp$/Spreadsheet$/SpreadsheetDocHelper.cs \
- $(DESTDIRCLIEXAMPLES)$/CSharp$/Spreadsheet$/SpreadsheetSample.cs \
- $(DESTDIRCLIEXAMPLES)$/CSharp$/Spreadsheet$/ViewSample.cs \
- $(DESTDIRCLIEXAMPLES)$/CSharp$/Spreadsheet$/Makefile
-
-VBDOTNET=\
- $(DESTDIRCLIEXAMPLES)$/VB.NET$/WriterDemo$/WriterDemo.vb \
- $(DESTDIRCLIEXAMPLES)$/VB.NET$/WriterDemo$/Makefile
-
-
-DIR_FILE_LIST= \
- $(CSHARP) \
- $(VBDOTNET)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/ex_$(TARGET)_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/ex_$(TARGET)_files.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Accessibility/ConnectionTask.java b/odk/examples/DevelopersGuide/Accessibility/ConnectionTask.java
deleted file mode 100644
index 56016c07..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/ConnectionTask.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.event.ActionListener;
-import javax.swing.*;
-import java.awt.*;
-import java.util.*;
-
-import com.sun.star.awt.XFocusListener;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.accessibility.*;
-import com.sun.star.awt.XExtendedToolkit;
-
-
-/** This timer task tries to connect to a running Office application in regular
- intervals until a connection can be successfully established.
-*/
-class ConnectionTask
- extends TimerTask
-{
- public ConnectionTask (EventListenerProxy xListener)
- {
- Init (xListener);
- }
-
- private void Init (EventListenerProxy xListener)
- {
- mxListener = xListener;
- mbInitialized = false;
-
- maTimer = new java.util.Timer ();
- maTimer.schedule (this, 0, mnPeriod);
- }
-
-
- /** This method is run every time the task is executed. It tries to
- connect to and register the listener at an Office application. If it
- can establish a connection it terminates the timer task. Otherwise it
- waits until the next activation.
- */
- public void run ()
- {
- if (registerListeners())
- {
- // Focus listener was successfully registered so we can cancel this task.
- MessageArea.println ("\nconnected successfully to office");
- cancel ();
- maTimer = null;
- }
- }
-
-
-
-
- /** Try to register the listener.
- */
- private boolean registerListeners ()
- {
- // Get toolkit.
- XExtendedToolkit xToolkit = getToolkit ();
-
- // Register at toolkit as focus event listener.
- if (xToolkit != null)
- {
- xToolkit.addTopWindowListener (mxListener);
- int nTopWindowCount = xToolkit.getTopWindowCount();
- try
- {
- com.sun.star.lang.EventObject aEvent = new com.sun.star.lang.EventObject();
- for (int i=0; i<nTopWindowCount; i++)
- {
- XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(
- XAccessible.class,
- xToolkit.getTopWindow(i));
- XAccessibleContext xContext = xAccessible.getAccessibleContext();
- if (xContext.getAccessibleName().length() > 0)
- {
- // Simulate an event that leads to registration the
- // listener at the window.
- aEvent.Source = xToolkit.getTopWindow(i);
- mxListener.windowOpened (aEvent);
- }
- }
- }
-
- catch (com.sun.star.lang.IndexOutOfBoundsException aException)
- {
- // This exception signals that the number of top windows has
- // changed since our last call to getTopWindowCount().
- }
- return true;
- }
- else
- return false;
- }
-
-
-
-
- /** Get the toolkit from an Office which can then be used to register
- the listener.
- */
- private XExtendedToolkit getToolkit ()
- {
- XMultiServiceFactory xFactory = connectToOffice();
-
- // Get toolkit.
- XExtendedToolkit xToolkit = null;
- try
- {
- if (xFactory != null)
- {
- xToolkit = (XExtendedToolkit) UnoRuntime.queryInterface(
- XExtendedToolkit.class,
- xFactory.createInstance ("stardiv.Toolkit.VCLXToolkit"));
- }
- }
- catch (com.sun.star.uno.Exception aException)
- {
- MessageArea.println ("caught exception while creating extended toolkit");
- // Ignored.
- }
-
- return xToolkit;
- }
-
-
-
-
- /** Connect to a running (Star|Open)Office application
- */
- private XMultiServiceFactory connectToOffice ()
- {
- // connect to a running office and get the ServiceManager
- try
- {
- com.sun.star.uno.XComponentContext xCmpContext = null;
-
- // get the remote office component context
- xCmpContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if( xCmpContext != null )
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xCmpContext.getServiceManager();
-
- return (XMultiServiceFactory) UnoRuntime.queryInterface (
- XMultiServiceFactory.class, xMCF);
- }
-
- catch (Exception e)
- {
- if ( ! mbInitialized)
- MessageArea.println ("Could not connect to office");
- else
- MessageArea.print (".");
- }
- mbInitialized = true;
- return null;
- }
-
- /** Time in milliseconds between two attempts to connect to an Office
- application.
- */
- private int mnPeriod = 1000;
-
- private EventListenerProxy mxListener;
- private boolean mbInitialized;
-
- /** This timer is used for the registration loop to retry to connect to
- the Office until a connection can be established.
- */
- private java.util.Timer maTimer;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/EventHandler.java b/odk/examples/DevelopersGuide/Accessibility/EventHandler.java
deleted file mode 100644
index 611d0d19..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/EventHandler.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.Vector;
-
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
-import com.sun.star.accessibility.*;
-
-/** Handle all the events send from accessibility objects. The events
- denoting new or removed top windows are handled as well.
-
- It does not implement any listener interface as does the
- EventListenerProxy class because it is interested only in a sub set of
- the event types.
-*/
-public class EventHandler
-{
- public EventHandler ()
- {
- mnTopWindowCount = 0;
- maListenerProxy = new EventListenerProxy (this);
- maConnectionTask = new ConnectionTask (maListenerProxy);
- maObjectDisplays = new Vector ();
- }
-
- public synchronized void addObjectDisplay (IAccessibleObjectDisplay aDisplay)
- {
- maObjectDisplays.add (aDisplay);
- }
-
-
- public void finalize ()
- {
- // When it is running then cancel the timer that tries to connect to
- // the Office.
- if (maConnectionTask != null)
- maConnectionTask.cancel();
- }
-
-
-
- public void disposing (com.sun.star.lang.EventObject aEvent)
- {
- // Ignored: We are not holding references to accessibility objects.
- }
-
-
-
-
- /** This method is called back when a new top level window has been opened.
- */
- public void windowOpened (XAccessible xAccessible)
- {
- if (xAccessible != null)
- {
- // Update the counter of currently open top level windows
- // observed by this object.
- mnTopWindowCount += 1;
-
- XAccessibleContext xContext = xAccessible.getAccessibleContext();
- if (xContext != null)
- {
- MessageArea.println ("new top level window has accessible name "
- + xContext.getAccessibleName());
-
- // Register at all accessible objects of the new window.
- new RegistrationThread (
- maListenerProxy,
- xContext,
- true,
- true);
- }
- else
- MessageArea.println ("new top level window is not accessible.");
- }
- else
- MessageArea.println ("new top level window is not accessible.");
- }
-
-
-
-
- public void windowClosed (XAccessible xAccessible)
- {
- mnTopWindowCount -= 1;
- MessageArea.println ("window closed, " + mnTopWindowCount + " still open");
- if (mnTopWindowCount == 0)
- {
- // This was the last window. Wait for a new connection.
- MessageArea.println ("lost connection to office");
- new ConnectionTask (maListenerProxy);
- }
- if (xAccessible != null)
- new RegistrationThread (
- maListenerProxy,
- xAccessible.getAccessibleContext(),
- false,
- true);
- }
-
-
-
-
- /** Print a message that the given object just received the focus. Call
- all accessible object diplays and tell them to update.
- */
- private synchronized void focusGained (XAccessibleContext xContext)
- {
- if (xContext != null)
- {
- MessageArea.println ("focusGained: " + xContext.getAccessibleName()
- + " with role "
- + NameProvider.getRoleName (xContext.getAccessibleRole()));
-
- // Tell the object displays to update their views.
- for (int i=0; i<maObjectDisplays.size(); i++)
- {
- IAccessibleObjectDisplay aDisplay =
- (IAccessibleObjectDisplay)maObjectDisplays.get(i);
- if (aDisplay != null)
- aDisplay.setAccessibleObject (xContext);
- }
-
- // Remember the currently focused object.
- mxFocusedObject = xContext;
- }
- else
- MessageArea.println ("focusGained: null");
- }
-
-
-
-
- /** Print a message that the given object just lost the focus. Call
- all accessible object diplays and tell them to update.
- */
- private synchronized void focusLost (XAccessibleContext xContext)
- {
- if (xContext != null)
- {
- MessageArea.println ("focusLost: "
- + xContext.getAccessibleName()
- + " with role "
- + NameProvider.getRoleName (xContext.getAccessibleRole()));
-
- // Tell the object displays to update their views.
- for (int i=0; i<maObjectDisplays.size(); i++)
- {
- IAccessibleObjectDisplay aDisplay =
- (IAccessibleObjectDisplay)maObjectDisplays.get(i);
- if (aDisplay != null)
- aDisplay.setAccessibleObject (null);
- }
- mxFocusedObject = null;
- }
- else
- MessageArea.println ("focusLost: null");
- }
-
-
-
-
- /** Handle a change of the caret position. Ignore this on all objects
- but the one currently focused.
- */
- private void handleCaretEvent (XAccessibleContext xContext,
- long nOldPosition, long nNewPosition)
- {
- if (xContext == mxFocusedObject)
- MessageArea.println ("caret moved from " + nOldPosition + " to " + nNewPosition);
- }
-
-
-
-
- /** Print a message that a state has been changed.
- @param xContext
- The accessible context of the object whose state has changed.
- @param nOldState
- When not zero then this value describes a state that has been reset.
- @param nNewValue
- When not zero then this value describes a state that has been set.
- */
- private void handleStateChange (XAccessibleContext xContext, short nOldState, short nNewState)
- {
- // Determine which state has changed and what is its new value.
- short nState;
- boolean aNewValue;
- if (nOldState >= 0)
- {
- nState = nOldState;
- aNewValue = false;
- }
- else
- {
- nState = nNewState;
- aNewValue = true;
- }
-
- // Print a message about the changed state.
- MessageArea.print ("setting state " + NameProvider.getStateName(nState)
- + " to " + aNewValue);
- if (xContext != null)
- {
- MessageArea.println (" at " + xContext.getAccessibleName() + " with role "
- + NameProvider.getRoleName(xContext.getAccessibleRole()));
- }
- else
- MessageArea.println (" at null");
-
- // Further handling of some states
- switch (nState)
- {
- case AccessibleStateType.FOCUSED:
- if (aNewValue)
- focusGained (xContext);
- else
- focusLost (xContext);
- }
- }
-
-
-
-
- /** Handle a child event that describes the creation of removal of a
- single child.
- */
- private void handleChildEvent (
- XAccessibleContext aOldChild,
- XAccessibleContext aNewChild)
- {
- if (aOldChild != null)
- // Remove event listener from the child and all of its descendants.
- new RegistrationThread (maListenerProxy, aOldChild, false, false);
- else if (aNewChild != null)
- // Add event listener to the new child and all of its descendants.
- new RegistrationThread (maListenerProxy, aNewChild, true, false);
- }
-
-
-
-
- /** Handle the change of some visible data of an object.
- */
- private void handleVisibleDataEvent (XAccessibleContext xContext)
- {
- // The given object may affect the visible appearance of the focused
- // object even when the two are not identical when the given object
- // is an ancestor of the focused object.
- // In order to not check this we simply call an update on the
- // focused object.
- if (mxFocusedObject != null)
- for (int i=0; i<maObjectDisplays.size(); i++)
- {
- IAccessibleObjectDisplay aDisplay =
- (IAccessibleObjectDisplay)maObjectDisplays.get(i);
- if (aDisplay != null)
- aDisplay.updateAccessibleObject (mxFocusedObject);
- }
- }
-
-
-
-
- /** Print some information about an event that is not handled by any
- more specialized handler.
- */
- private void handleGenericEvent (
- int nEventId,
- Object aSource,
- Object aOldValue,
- Object aNewValue)
- {
- // Print event to message area.
- MessageArea.print ("received event "
- + NameProvider.getEventName (nEventId) + " from ");
- XAccessibleContext xContext = objectToContext (aSource);
- if (xContext != null)
- MessageArea.print (xContext.getAccessibleName());
- else
- MessageArea.print ("null");
- MessageArea.println (" / "
- + NameProvider.getRoleName(xContext.getAccessibleRole()));
- }
-
-
-
- /** This is the main method for handling accessibility events. It is
- assumed that it is not called directly from the Office but from a
- listener proxy that runs in a separate thread so that calls back to
- the Office do not result in dead-locks.
- */
- public void notifyEvent (com.sun.star.accessibility.AccessibleEventObject aEvent)
- {
- try // Guard against disposed objects.
- {
- switch (aEvent.EventId)
- {
- case AccessibleEventId.CHILD:
- handleChildEvent (
- objectToContext (aEvent.OldValue),
- objectToContext (aEvent.NewValue));
- break;
-
- case AccessibleEventId.STATE_CHANGED:
- {
- short nOldState = -1;
- short nNewState = -1;
- try
- {
- if (AnyConverter.isShort (aEvent.NewValue))
- nNewState = AnyConverter.toShort (aEvent.NewValue);
- if (AnyConverter.isShort (aEvent.OldValue))
- nOldState = AnyConverter.toShort (aEvent.OldValue);
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {}
- handleStateChange (
- objectToContext (aEvent.Source),
- nOldState,
- nNewState);
- }
- break;
-
- case AccessibleEventId.VISIBLE_DATA_CHANGED:
- case AccessibleEventId.BOUNDRECT_CHANGED:
- handleVisibleDataEvent (objectToContext (aEvent.Source));
- break;
-
- case AccessibleEventId.CARET_CHANGED:
- try
- {
- handleCaretEvent (
- objectToContext (aEvent.Source),
- AnyConverter.toLong(aEvent.OldValue),
- AnyConverter.toLong(aEvent.NewValue));
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {}
- break;
-
- default:
- handleGenericEvent (aEvent.EventId,
- aEvent.Source, aEvent.OldValue, aEvent.NewValue);
- break;
- }
- }
- catch (com.sun.star.lang.DisposedException e)
- {}
- }
-
-
-
-
- /** Convert the given object into an accessible context. The object is
- interpreted as UNO Any and may contain either an XAccessible or
- XAccessibleContext reference.
- @return
- The returned value is null when the given object can not be
- converted to an XAccessibleContext reference.
- */
- private XAccessibleContext objectToContext (Object aObject)
- {
- XAccessibleContext xContext = null;
- XAccessible xAccessible = null;
- try
- {
- xAccessible = (XAccessible)AnyConverter.toObject(
- new Type(XAccessible.class), aObject);
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {}
- if (xAccessible != null)
- xContext = xAccessible.getAccessibleContext();
- else
- try
- {
- xContext = (XAccessibleContext)AnyConverter.toObject(
- new Type(XAccessibleContext.class), aObject);
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {}
- return xContext;
- }
-
-
-
-
- /** The proxy that runs in a seperate thread and allows to call back to
- the Office without running into dead-locks.
- */
- private EventListenerProxy maListenerProxy;
-
- /** The currently focused object. A value of null means that no object
- has the focus.
- */
- private XAccessibleContext mxFocusedObject;
-
- /** Keep track of the currently open top windows to start a registration
- loop when the last window (and the Office) is closed.
- */
- private long mnTopWindowCount;
-
- /** A list of objects that can display accessible objects in specific
- ways such as showing a graphical representation or some textual
- descriptions.
- */
- private Vector maObjectDisplays;
-
- /** The timer task that attempts in regular intervals to connect to a
- running Office application.
- */
- private ConnectionTask maConnectionTask;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java b/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java
deleted file mode 100644
index 526ebdc7..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleEventListener;
-import com.sun.star.accessibility.AccessibleEventObject;
-import com.sun.star.lang.EventObject;
-import com.sun.star.awt.XTopWindowListener;
-import com.sun.star.uno.UnoRuntime;
-
-import java.util.LinkedList;
-
-/** This class acts as a proxy for the simple screen reader. It waits for
- two types of events:
- 1. Accessibility events signal modifications concerning accessibility
- objects.
- 2. Top window events inform the listener about new or removed windows.
-
- This class exists because events had to be handled in a seperate thread
- to avoid dead locks: The thread that receives an event must no call back
- to the Office directly.
-
- Soon this should not be necessary anymore. There is now a flag which
- switches between synchronous and asynchronous callbacks.
-
- All reveived events are eventually forwarded to the actual listener. In
- this way it decouples the Office from the listener.
-*/
-class EventListenerProxy
- implements Runnable, XAccessibleEventListener, XTopWindowListener
-{
- public EventListenerProxy (EventHandler aListener)
- {
- maListener = aListener;
- mbAsynchron = true;
- if (mbAsynchron)
- {
- maEventQueue = new LinkedList();
- new Thread (this, "EventListenerProxy").start();
- }
- }
-
- private void addEvent (Runnable aEventObject)
- {
- if (mbAsynchron)
- synchronized (maEventQueue)
- {
- maEventQueue.addLast (aEventObject);
- // Tell the queue that there is a new event in the queue.
- maEventQueue.notify();
- }
- else
- {
- System.out.println ("running " + aEventObject);
- aEventObject.run();
- System.out.println (" done");
- }
- }
-
-
-
-
- /** In an infinite loop, check for events to deliver, then wait on lock
- (which will be notified when new events arrive)
- */
- public void run ()
- {
- while (true)
- {
- // Process all events that are currently in the queue.
- Runnable aEvent;
- do
- {
- synchronized (maEventQueue)
- {
- if (maEventQueue.size() > 0)
- aEvent = (Runnable)maEventQueue.removeFirst();
- else
- aEvent = null;
- }
-
- if (aEvent != null)
- {
- try
- {
- aEvent.run();
- }
- catch (Throwable aException)
- {
- MessageArea.println(
- "Exception during event delivery: " + aException);
- aException.printStackTrace();
- }
- }
- }
- while (aEvent != null);
-
- // Now that the queue is empty go to sleep again.
- try
- {
- synchronized (maEventQueue)
- {
- maEventQueue.wait();
- }
- }
- catch (Exception aException)
- {
- // Ignore this exception since there is not much
- // that we can do about it.
- }
- }
- }
-
-
- public void disposing( final EventObject aEvent)
- {
- addEvent (new Runnable()
- {
- public void run()
- {
- maListener.disposing (aEvent);
- }
- } );
- }
-
- public void notifyEvent (final AccessibleEventObject aEvent)
- {
- addEvent (
- new Runnable()
- {
- public void run()
- {
- maListener.notifyEvent (aEvent);
- }
- } );
- }
-
- public void windowOpened (final com.sun.star.lang.EventObject aEvent)
- {
- addEvent (
- new Runnable()
- {
- public void run()
- {
- maListener.windowOpened (
- (XAccessible) UnoRuntime.queryInterface(
- XAccessible.class,
- aEvent.Source));
- }
- } );
- }
- public void windowClosing (final com.sun.star.lang.EventObject aEvent)
- {
- // Ignored.
- }
- public void windowClosed (final com.sun.star.lang.EventObject aEvent)
- {
- addEvent (
- new Runnable()
- {
- public void run()
- {
- maListener.windowClosed (
- (XAccessible) UnoRuntime.queryInterface(
- XAccessible.class,
- aEvent.Source));
- }
- } );
- }
- public void windowMinimized (com.sun.star.lang.EventObject aEvent)
- {
- // Ignored.
- }
- public void windowNormalized (com.sun.star.lang.EventObject aEvent)
- {
- // Ignored.
- }
- public void windowActivated (com.sun.star.lang.EventObject aEvent)
- {
- // Ignored.
- }
- public void windowDeactivated (com.sun.star.lang.EventObject aEvent)
- {
- // Ignored.
- }
-
- /** The queue of event objects, LinkedList<Runnable>.
- The queue object will also serve as lock for the consumer/producer type
- syncronization.
- */
- private LinkedList maEventQueue;
-
- /** This is the actual listener that the events will eventually forwarded to.
- */
- private EventHandler maListener;
-
- /** This flag determines whether event forwarding is done asynchroniously
- or synchroniously.
- */
- private boolean mbAsynchron;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/GraphicalDisplay.java b/odk/examples/DevelopersGuide/Accessibility/GraphicalDisplay.java
deleted file mode 100644
index b3645353..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/GraphicalDisplay.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import javax.swing.*;
-import java.awt.Dimension;
-import java.awt.*;
-import java.awt.geom.*;
-
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.uno.UnoRuntime;
-
-
-/** Display the currently focused accessible object graphically.
-*/
-public class GraphicalDisplay
- extends JPanel
- implements IAccessibleObjectDisplay
-{
- /** Create a new graphical widget the displays some of the geometrical
- information availbable from accessible objects.
- */
- public GraphicalDisplay ()
- {
- setPreferredSize (new Dimension (300,200));
- }
-
-
- /** Paint some or all of the area of this widget with the outlines of
- the currently focues object and its ancestors.
- */
- public synchronized void paintComponent (Graphics g)
- {
- super.paintComponent (g);
-
- setupTransformation ();
-
- // Draw the screen representation to give a hint of the location of the
- // accessible object on the screen.
- Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
- // Fill the screen rectangle.
- g.setColor (new Color (250,240,230));
- g.fillRect (
- (int)(mnHOffset+0.5),
- (int)(mnVOffset+0.5),
- (int)(mnScale*aScreenSize.getWidth()),
- (int)(mnScale*aScreenSize.getHeight()));
- // Draw a frame arround the screen rectangle to increase its visibility.
- g.setColor (Color.BLACK);
- g.drawRect (
- (int)(mnHOffset+0.5),
- (int)(mnVOffset+0.5),
- (int)(mnScale*aScreenSize.getWidth()),
- (int)(mnScale*aScreenSize.getHeight()));
-
- // Now do the actual display of the accessible object.
- drawAccessibleObject (g, mxContext, Color.GREEN);
- }
- public synchronized void paintChildren (Graphics g)
- {
- }
- public synchronized void paintBorder (Graphics g)
- {
- }
-
-
-
-
- /** Draw a simple representation of the given accessible object in the
- specified color.
- */
- public void drawAccessibleObject (Graphics g, XAccessibleContext xContext, Color aColor)
- {
- if (xContext != null)
- {
- // First draw our parent.
- XAccessible xParent = xContext.getAccessibleParent();
- if (xParent != null)
- drawAccessibleObject (g, xParent.getAccessibleContext(), Color.GRAY);
-
- // When the context supports the XAccessibleComponent interface
- // then draw its outline.
- XAccessibleComponent xComponent =
- (XAccessibleComponent)UnoRuntime.queryInterface(
- XAccessibleComponent.class, xContext);
- if (xComponent != null)
- {
- // Get size and location on screen and transform them to fit
- // everything inside this widget.
- Point aLocation = xComponent.getLocationOnScreen();
- Size aSize = xComponent.getSize();
- g.setColor (aColor);
- g.drawRect (
- (int)(mnHOffset + mnScale*aLocation.X+0.5),
- (int)(mnVOffset + mnScale*aLocation.Y+0.5),
- (int)(mnScale*aSize.Width),
- (int)(mnScale*aSize.Height));
- }
- }
- }
-
-
- public synchronized void setAccessibleObject (XAccessibleContext xContext)
- {
- mxContext = xContext;
- repaint ();
- }
-
- public synchronized void updateAccessibleObject (XAccessibleContext xContext)
- {
- repaint ();
- }
-
-
- /** Set up the transformation so that the graphical display can show a
- centered representation of the whole screen.
- */
- private void setupTransformation ()
- {
- Dimension aScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension aWidgetSize = getSize();
- if ((aScreenSize.getWidth() > 0) && (aScreenSize.getHeight() > 0))
- {
- // Calculate the scales that would map the screen onto the
- // widget in both of the coordinate axes and select the smaller
- // of the two: it maps the screen onto the widget in both axes
- // at the same time.
- double nHScale = (aWidgetSize.getWidth() - 10) / aScreenSize.getWidth();
- double nVScale = (aWidgetSize.getHeight() - 10) / aScreenSize.getHeight();
- if (nHScale < nVScale)
- mnScale = nHScale;
- else
- mnScale = nVScale;
-
- // Calculate offsets that center the scaled screen inside the widget.
- mnHOffset = (aWidgetSize.getWidth() - mnScale*aScreenSize.getWidth()) / 2.0;
- mnVOffset = (aWidgetSize.getHeight() - mnScale*aScreenSize.getHeight()) / 2.0;
- }
- else
- {
- // In case of a degenerate (not yet initialized?) screen size
- // use some meaningless default values.
- mnScale = 1;
- mnHOffset = 0;
- mnVOffset = 0;
- }
- }
-
-
- private XAccessibleContext mxContext;
- private double mnScale;
- private double mnHOffset;
- private double mnVOffset;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/IAccessibleObjectDisplay.java b/odk/examples/DevelopersGuide/Accessibility/IAccessibleObjectDisplay.java
deleted file mode 100644
index ae6fd896..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/IAccessibleObjectDisplay.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.accessibility.XAccessibleContext;
-
-interface IAccessibleObjectDisplay
-{
-
- /** Set the accessible object to display. Call this method e.g. when a
- new object has been focused.
- */
- public void setAccessibleObject (XAccessibleContext xContext);
-
- public void updateAccessibleObject (XAccessibleContext xContext);
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/Makefile b/odk/examples/DevelopersGuide/Accessibility/Makefile
deleted file mode 100644
index 6eda8233..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/Makefile
+++ /dev/null
@@ -1,113 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Build the simple screen reader (SSR) described in the Developers
-# Guide Accessibility chapter.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=DevGuideAccessibilityExample
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME =SSR
-APP1_JAR =$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-JAVAFILES = \
- MessageArea.java \
- ConnectionTask.java \
- EventHandler.java \
- EventListenerProxy.java \
- GraphicalDisplay.java \
- NameProvider.java \
- IAccessibleObjectDisplay.java \
- RegistrationThread.java \
- SSR.java \
- TextualDisplay.java
-
-APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(JAVAFILES))
-APP1_CLASSNAMES = $(patsubst %.java,%.class,$(JAVAFILES)) \
- EventListenerProxy$(ICL)1.class \
- EventListenerProxy$(ICL)2.class \
- EventListenerProxy$(ICL)3.class \
- EventListenerProxy$(ICL)4.class
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $(JAVAFILES)
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(APP1_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP1_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Before you run this example you should start your office with at least a
- @echo new empty document and you should have enabled the accessibility support.
- @echo Please use the following command to execute the Simple Screen Reader example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/Accessibility/MessageArea.java b/odk/examples/DevelopersGuide/Accessibility/MessageArea.java
deleted file mode 100644
index d71fc096..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/MessageArea.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.Font;
-import java.awt.Rectangle;
-import java.awt.Color;
-import java.awt.Graphics;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JScrollBar;
-
-
-
-/** A message area displays text in a scrollable text widget. It is a
- singleton. Other objects can access it directly to display messages.
-*/
-public class MessageArea
- extends JScrollPane
-{
- public static synchronized MessageArea Instance ()
- {
- if (saInstance == null)
- saInstance = new MessageArea ();
- return saInstance;
- }
-
-
-
-
- /** Create a new message area. This method is private because the class is
- a singleton and may therefore not be instanciated from the outside.
- */
- private MessageArea ()
- {
- maText = new JTextArea();
- maText.setBackground (new Color (255,250,240));
- maText.setFont (new Font ("Helvetica", Font.PLAIN, 9));
- setViewportView (maText);
- setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
- setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
-
- printMessage (
- "class path is " + System.getProperty ("java.class.path") + "\n");
- }
-
-
-
-
- /** Show the given string at the end of the message area and scroll to make
- it visible.
- */
- public static synchronized void print (String aMessage)
- {
- Instance().printMessage(aMessage);
- }
-
-
-
-
- /** Show the given string at the end of the message area and scroll to make
- it visible.
- */
- public static void println (String aMessage)
- {
- Instance().printMessage (aMessage+"\n");
- }
-
-
- public void paintComponent (Graphics g)
- {
- // Synchronize with the graphics object to prevent paint problems.
- // Remember that this is not done by Swing itself.
- synchronized (g)
- {
- JScrollBar sb = getVerticalScrollBar();
- if (sb != null)
- {
- int nScrollBarValue = sb.getMaximum() - sb.getVisibleAmount() - 1;
- sb.setValue (nScrollBarValue);
- }
- super.paintComponent (g);
- }
- }
-
-
-
-
- /** Append the given string to the end of the text and scroll so that it
- becomes visible. This is an internal method. Use one of the static
- and public ones.
- */
- private synchronized void printMessage (String aMessage)
- {
- maText.append (aMessage);
- }
-
-
-
-
- private static MessageArea saInstance = null;
- private JTextArea maText;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/NameProvider.java b/odk/examples/DevelopersGuide/Accessibility/NameProvider.java
deleted file mode 100644
index 5d4c1340..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/NameProvider.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.HashMap;
-import com.sun.star.accessibility.AccessibleStateType;
-import com.sun.star.accessibility.AccessibleEventId;
-import com.sun.star.accessibility.AccessibleRole;
-import com.sun.star.accessibility.AccessibleRelationType;
-
-
-/** Provide names for several accessibility constants groups.
-*/
-public class NameProvider
-{
- /** Return the name of the specified state.
- @param nStateId
- Id of the state for which to return its name. This is one of
- the ids listed in the <type>AccessibleStateType</const>
- constants group.
- @return
- Returns the name of the specified state or an empty string if an
- invalid / unknown state id was given.
- */
- public static String getStateName (int nStateId)
- {
- return (String)maStateMap.get (new Integer(nStateId));
- }
-
-
- /** Return the name of the specified event.
- @param nEventId
- Id of the event type for which to return its name. This is one
- of the ids listed in the <type>AccessibleEventId</const>
- constants group.
- @return
- Returns the name of the specified event type or an empty string
- if an invalid / unknown event id was given.
- */
- public static String getEventName (int nEventId)
- {
- return (String)maEventMap.get (new Integer(nEventId));
- }
-
-
- /** Return the name of the specified role.
- @param nRole
- Id of the role for which to return its name. This is one of
- the ids listed in the <type>AccessibleRole</const>
- constants group.
- @return
- Returns the name of the specified role or an empty string if an
- invalid / unknown role id was given.
- */
- public static String getRoleName (int nRole)
- {
- return (String)maRoleMap.get (new Integer(nRole));
- }
-
-
- /** Return the name of the specified relation.
- @param nRelation
- Id of the relation for which to return its name. This is one of
- the ids listed in the <type>AccessibleRelationType</const>
- constants group.
- @return
- Returns the name of the specified relation type or an empty
- string if an invalid / unknown role id was given.
- */
- public static String getRelationName (int nRelation)
- {
- return (String)maRelationMap.get (new Integer(nRelation));
- }
-
-
- private static HashMap maStateMap = new HashMap();
- private static HashMap maEventMap = new HashMap();
- private static HashMap maRoleMap = new HashMap();
- private static HashMap maRelationMap = new HashMap();
-
- static {
- maStateMap.put (new Integer (AccessibleStateType.INVALID), "INVALID");
- maStateMap.put (new Integer (AccessibleStateType.ACTIVE), "ACTIVE");
- maStateMap.put (new Integer (AccessibleStateType.ARMED), "ARMED");
- maStateMap.put (new Integer (AccessibleStateType.BUSY), "BUSY");
- maStateMap.put (new Integer (AccessibleStateType.CHECKED), "CHECKED");
- maStateMap.put (new Integer (AccessibleStateType.DEFUNC), "DEFUNC");
- maStateMap.put (new Integer (AccessibleStateType.EDITABLE), "EDITABLE");
- maStateMap.put (new Integer (AccessibleStateType.ENABLED), "ENABLED");
- maStateMap.put (new Integer (AccessibleStateType.EXPANDABLE), "EXPANDABLE");
- maStateMap.put (new Integer (AccessibleStateType.EXPANDED), "EXPANDED");
- maStateMap.put (new Integer (AccessibleStateType.FOCUSABLE), "FOCUSABLE");
- maStateMap.put (new Integer (AccessibleStateType.FOCUSED), "FOCUSED");
- maStateMap.put (new Integer (AccessibleStateType.HORIZONTAL), "HORIZONTAL");
- maStateMap.put (new Integer (AccessibleStateType.ICONIFIED), "ICONIFIED");
- maStateMap.put (new Integer (AccessibleStateType.MODAL), "MODAL");
- maStateMap.put (new Integer (AccessibleStateType.MULTI_LINE), "MULTI_LINE");
- maStateMap.put (new Integer (AccessibleStateType.MULTI_SELECTABLE), "MULTI_SELECTABLE");
- maStateMap.put (new Integer (AccessibleStateType.OPAQUE), "OPAQUE");
- maStateMap.put (new Integer (AccessibleStateType.PRESSED), "PRESSED");
- maStateMap.put (new Integer (AccessibleStateType.RESIZABLE), "RESIZABLE");
- maStateMap.put (new Integer (AccessibleStateType.SELECTABLE), "SELECTABLE");
- maStateMap.put (new Integer (AccessibleStateType.SELECTED), "SELECTED");
- maStateMap.put (new Integer (AccessibleStateType.SENSITIVE), "SENSITIVE");
- maStateMap.put (new Integer (AccessibleStateType.SHOWING), "SHOWING");
- maStateMap.put (new Integer (AccessibleStateType.SINGLE_LINE), "SINGLE_LINE");
- maStateMap.put (new Integer (AccessibleStateType.STALE), "STALE");
- maStateMap.put (new Integer (AccessibleStateType.TRANSIENT), "TRANSIENT");
- maStateMap.put (new Integer (AccessibleStateType.VERTICAL), "VERTICAL");
- maStateMap.put (new Integer (AccessibleStateType.VISIBLE), "VISIBLE");
- maStateMap.put (new Integer (AccessibleStateType.MANAGES_DESCENDANTS),
- "MANAGES_DESCENDANTS");
- // maStateMap.put (new Integer (AccessibleStateType.INCONSISTENT),"INCONSISTENT");
-
-
- maEventMap.put (new Integer (0),
- "[UNKNOWN]");
- maEventMap.put (new Integer (AccessibleEventId.NAME_CHANGED),
- "NAME_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.DESCRIPTION_CHANGED),
- "DESCRIPTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.ACTION_CHANGED),
- "ACTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.STATE_CHANGED),
- "STATE_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.ACTIVE_DESCENDANT_CHANGED),
- "ACTIVE_DESCENDANT_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.BOUNDRECT_CHANGED),
- "BOUNDRECT_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.CHILD),
- "CHILD");
- maEventMap.put (new Integer (AccessibleEventId.INVALIDATE_ALL_CHILDREN),
- "INVALIDATE_ALL_CHILDREN");
- maEventMap.put (new Integer (AccessibleEventId.SELECTION_CHANGED),
- "SELECTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.VISIBLE_DATA_CHANGED),
- "VISIBLE_DATA_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.VALUE_CHANGED),
- "VALUE_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.CONTENT_FLOWS_FROM_RELATION_CHANGED),
- "CONTENT_FLOWS_FROM_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.CONTENT_FLOWS_TO_RELATION_CHANGED),
- "CONTENT_FLOWS_TO_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.CONTROLLED_BY_RELATION_CHANGED),
- "CONTROLLED_BY_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.CONTROLLER_FOR_RELATION_CHANGED),
- "CONTROLLER_FOR_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.LABEL_FOR_RELATION_CHANGED),
- "LABEL_FOR_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.LABELED_BY_RELATION_CHANGED),
- "LABELED_BY_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.MEMBER_OF_RELATION_CHANGED),
- "MEMBER_OF_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.SUB_WINDOW_OF_RELATION_CHANGED),
- "SUB_WINDOW_OF_RELATION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.CARET_CHANGED),
- "CARET_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TEXT_SELECTION_CHANGED),
- "TEXT_SELECTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TEXT_CHANGED),
- "TEXT_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TEXT_ATTRIBUTE_CHANGED),
- "TEXT_ATTRIBUTE_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.HYPERTEXT_CHANGED),
- "HYPERTEXT_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_CAPTION_CHANGED),
- "TABLE_CAPTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_COLUMN_DESCRIPTION_CHANGED),
- "TABLE_COLUMN_DESCRIPTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_COLUMN_HEADER_CHANGED),
- "TABLE_COLUMN_HEADER_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_MODEL_CHANGED),
- "TABLE_MODEL_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_ROW_DESCRIPTION_CHANGED),
- "TABLE_ROW_DESCRIPTION_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_ROW_HEADER_CHANGED),
- "TABLE_ROW_HEADER_CHANGED");
- maEventMap.put (new Integer (AccessibleEventId.TABLE_SUMMARY_CHANGED),
- "TABLE_SUMMARY_CHANGED");
-
- maRoleMap.put (new Integer(AccessibleRole.UNKNOWN), "UNKNOWN");
- maRoleMap.put (new Integer (AccessibleRole.UNKNOWN), "UNKNOWN");
- maRoleMap.put (new Integer (AccessibleRole.ALERT), "ALERT");
- maRoleMap.put (new Integer (AccessibleRole.COLUMN_HEADER), "COLUMN_HEADER");
- maRoleMap.put (new Integer (AccessibleRole.CANVAS), "CANVAS");
- maRoleMap.put (new Integer (AccessibleRole.CHECK_BOX), "CHECK_BOX");
- maRoleMap.put (new Integer (AccessibleRole.CHECK_MENU_ITEM), "CHECK_MENU_ITEM");
- maRoleMap.put (new Integer (AccessibleRole.COLOR_CHOOSER), "COLOR_CHOOSER");
- maRoleMap.put (new Integer (AccessibleRole.COMBO_BOX), "COMBO_BOX");
- maRoleMap.put (new Integer (AccessibleRole.DESKTOP_ICON), "DESKTOP_ICON");
- maRoleMap.put (new Integer (AccessibleRole.DESKTOP_PANE), "DESKTOP_PANE");
- maRoleMap.put (new Integer (AccessibleRole.DIRECTORY_PANE), "DIRECTORY_PANE");
- maRoleMap.put (new Integer (AccessibleRole.DIALOG), "DIALOG");
- maRoleMap.put (new Integer (AccessibleRole.DOCUMENT), "DOCUMENT");
- maRoleMap.put (new Integer (AccessibleRole.EMBEDDED_OBJECT), "EMBEDDED_OBJECT");
- maRoleMap.put (new Integer (AccessibleRole.END_NOTE), "END_NOTE");
- maRoleMap.put (new Integer (AccessibleRole.FILE_CHOOSER), "FILE_CHOOSER");
- maRoleMap.put (new Integer (AccessibleRole.FILLER), "FILLER");
- maRoleMap.put (new Integer (AccessibleRole.FONT_CHOOSER), "FONT_CHOOSER");
- maRoleMap.put (new Integer (AccessibleRole.FOOTER), "FOOTER");
- maRoleMap.put (new Integer (AccessibleRole.FOOTNOTE), "FOOTNOTE");
- maRoleMap.put (new Integer (AccessibleRole.FRAME), "FRAME");
- maRoleMap.put (new Integer (AccessibleRole.GLASS_PANE), "GLASS_PANE");
- maRoleMap.put (new Integer (AccessibleRole.GRAPHIC), "GRAPHIC");
- maRoleMap.put (new Integer (AccessibleRole.GROUP_BOX), "GROUP_BOX");
- maRoleMap.put (new Integer (AccessibleRole.HEADER), "HEADER");
- maRoleMap.put (new Integer (AccessibleRole.HEADING), "HEADING");
- maRoleMap.put (new Integer (AccessibleRole.HYPER_LINK), "HYPER_LINK");
- maRoleMap.put (new Integer (AccessibleRole.ICON), "ICON");
- maRoleMap.put (new Integer (AccessibleRole.INTERNAL_FRAME), "INTERNAL_FRAME");
- maRoleMap.put (new Integer (AccessibleRole.LABEL), "LABEL");
- maRoleMap.put (new Integer (AccessibleRole.LAYERED_PANE), "LAYERED_PANE");
- maRoleMap.put (new Integer (AccessibleRole.LIST), "LIST");
- maRoleMap.put (new Integer (AccessibleRole.LIST_ITEM), "LIST_ITEM");
- maRoleMap.put (new Integer (AccessibleRole.MENU), "MENU");
- maRoleMap.put (new Integer (AccessibleRole.MENU_BAR), "MENU_BAR");
- maRoleMap.put (new Integer (AccessibleRole.MENU_ITEM), "MENU_ITEM");
- maRoleMap.put (new Integer (AccessibleRole.OPTION_PANE), "OPTION_PANE");
- maRoleMap.put (new Integer (AccessibleRole.PAGE_TAB), "PAGE_TAB");
- maRoleMap.put (new Integer (AccessibleRole.PAGE_TAB_LIST), "PAGE_TAB_LIST");
- maRoleMap.put (new Integer (AccessibleRole.PANEL), "PANEL");
- maRoleMap.put (new Integer (AccessibleRole.PARAGRAPH), "PARAGRAPH");
- maRoleMap.put (new Integer (AccessibleRole.PASSWORD_TEXT), "PASSWORD_TEXT");
- maRoleMap.put (new Integer (AccessibleRole.POPUP_MENU), "POPUP_MENU");
- maRoleMap.put (new Integer (AccessibleRole.PUSH_BUTTON), "PUSH_BUTTON");
- maRoleMap.put (new Integer (AccessibleRole.PROGRESS_BAR), "PROGRESS_BAR");
- maRoleMap.put (new Integer (AccessibleRole.RADIO_BUTTON), "RADIO_BUTTON");
- maRoleMap.put (new Integer (AccessibleRole.RADIO_MENU_ITEM), "RADIO_MENU_ITEM");
- maRoleMap.put (new Integer (AccessibleRole.ROW_HEADER), "ROW_HEADER");
- maRoleMap.put (new Integer (AccessibleRole.ROOT_PANE), "ROOT_PANE");
- maRoleMap.put (new Integer (AccessibleRole.SCROLL_BAR), "SCROLL_BAR");
- maRoleMap.put (new Integer (AccessibleRole.SCROLL_PANE), "SCROLL_PANE");
- maRoleMap.put (new Integer (AccessibleRole.SHAPE), "SHAPE");
- maRoleMap.put (new Integer (AccessibleRole.SEPARATOR), "SEPARATOR");
- maRoleMap.put (new Integer (AccessibleRole.SLIDER), "SLIDER");
- maRoleMap.put (new Integer (AccessibleRole.SPIN_BOX), "SPIN_BOX");
- maRoleMap.put (new Integer (AccessibleRole.SPLIT_PANE), "SPLIT_PANE");
- maRoleMap.put (new Integer (AccessibleRole.STATUS_BAR), "STATUS_BAR");
- maRoleMap.put (new Integer (AccessibleRole.TABLE), "TABLE");
- maRoleMap.put (new Integer (AccessibleRole.TABLE_CELL), "TABLE_CELL");
- maRoleMap.put (new Integer (AccessibleRole.TEXT), "TEXT");
- maRoleMap.put (new Integer (AccessibleRole.TEXT_FRAME), "TEXT_FRAME");
- maRoleMap.put (new Integer (AccessibleRole.TOGGLE_BUTTON), "TOGGLE_BUTTON");
- maRoleMap.put (new Integer (AccessibleRole.TOOL_BAR), "TOOL_BAR");
- maRoleMap.put (new Integer (AccessibleRole.TOOL_TIP), "TOOL_TIP");
- maRoleMap.put (new Integer (AccessibleRole.TREE), "TREE");
- maRoleMap.put (new Integer (AccessibleRole.VIEW_PORT), "VIEW_PORT");
- maRoleMap.put (new Integer (AccessibleRole.WINDOW), "WINDOW");
-
- maRelationMap.put (new Integer (AccessibleRelationType.INVALID), "INVALID");
- maRelationMap.put (new Integer (AccessibleRelationType.CONTENT_FLOWS_FROM), "CONTENT_FLOWS_FROM");
- maRelationMap.put (new Integer (AccessibleRelationType.CONTENT_FLOWS_TO), "CONTENT_FLOWS_TO");
- maRelationMap.put (new Integer (AccessibleRelationType.CONTROLLED_BY), "CONTROLLED_BY");
- maRelationMap.put (new Integer (AccessibleRelationType.CONTROLLER_FOR), "CONTROLLER_FOR");
- maRelationMap.put (new Integer (AccessibleRelationType.LABEL_FOR), "LABEL_FOR");
- maRelationMap.put (new Integer (AccessibleRelationType.LABELED_BY), "LABELED_BY");
- maRelationMap.put (new Integer (AccessibleRelationType.MEMBER_OF), "MEMBER_OF");
- maRelationMap.put (new Integer (AccessibleRelationType.SUB_WINDOW_OF), "SUB_WINDOW_OF");
- }
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/RegistrationThread.java b/odk/examples/DevelopersGuide/Accessibility/RegistrationThread.java
deleted file mode 100644
index 9d574c9d..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/RegistrationThread.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.event.ActionListener;
-import javax.swing.*;
-import java.awt.*;
-import java.util.*;
-
-import com.sun.star.awt.XTopWindowListener;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.accessibility.*;
-import com.sun.star.awt.XExtendedToolkit;
-
-/** This class is used as a thread and registers or unregsiters a listener
- given the constructor at all nodes of a tree of accessibility objects.
-*/
-public class RegistrationThread
- implements Runnable
-{
- /** Start a new thread that adds or removes the given listener at all
- accessible objects in the sub-tree rooted in the given accessible
- object.
- @param aListener
- The listener that is added or removed.
- @param xRoot
- The root of the sub-tree of accessibility objects.
- @param bRegister
- This flag decides whether to add or remove the listener.
- */
- public RegistrationThread (
- EventListenerProxy aListener,
- XAccessibleContext xRoot,
- boolean bRegister,
- boolean bShowMessages)
- {
- maListener = aListener;
- mxRoot = xRoot;
- mbRegister = bRegister;
- mbShowMessages = bShowMessages;
-
- if (mxRoot != null)
- {
- if (mbShowMessages)
- MessageArea.println ("starting to register at " + mxRoot.getAccessibleName());
- new Thread (this, "RegistrationThread").start();
- }
- }
-
-
-
- public void run ()
- {
- System.out.println ("starting registration");
- long nNodeCount = traverseTree (mxRoot);
- System.out.println ("ending registration");
- if (mbShowMessages)
- {
- if ( ! mbRegister)
- MessageArea.print ("un");
- MessageArea.println ("registered at " + nNodeCount
- + " objects in accessibility tree of " + mxRoot.getAccessibleName());
- }
- }
-
-
-
-
- /** Register this object as listener for accessibility events at all nodes
- of the given tree.
- @param xRoot
- The root node of the tree at which to register.
- */
- public long traverseTree (XAccessibleContext xRoot)
- {
- long nNodeCount = 0;
- if (xRoot != null)
- {
- // Register the root node.
- XAccessibleEventBroadcaster xBroadcaster =
- (XAccessibleEventBroadcaster) UnoRuntime.queryInterface (
- XAccessibleEventBroadcaster.class,
- xRoot);
- if (xBroadcaster != null)
- {
- if (mbRegister)
- xBroadcaster.addEventListener (maListener);
- else
- xBroadcaster.removeEventListener (maListener);
- nNodeCount += 1;
- }
-
- // Call this method recursively to register all sub-trees.
- try
- {
- int nChildCount = xRoot.getAccessibleChildCount();
- for (int i=0; i<nChildCount; i++)
- {
- XAccessible xChild = xRoot.getAccessibleChild (i);
- if (xChild != null)
- nNodeCount += traverseTree (xChild.getAccessibleContext());
- }
- }
- catch (com.sun.star.lang.IndexOutOfBoundsException aException)
- {
- // The set of children has changed since our last call to
- // getAccesibleChildCount(). Don't try any further on this
- // sub-tree.
- }
- catch (com.sun.star.lang.DisposedException aException)
- {
- // The child has been destroyed since our last call to
- // getAccesibleChildCount(). That is OK. Don't try any
- // further on this sub-tree.
- }
- }
- return nNodeCount;
- }
-
- private EventListenerProxy maListener;
- private XAccessibleContext mxRoot;
- private boolean mbRegister;
- private boolean mbShowMessages;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/SSR.java b/odk/examples/DevelopersGuide/Accessibility/SSR.java
deleted file mode 100644
index f3b07208..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/SSR.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.event.ActionListener;
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
-import javax.swing.*;
-
-
-/** The simple screen reader (SSR) registers at the toolkit as focus listener
- and displays information about the currently focused object.
-*/
-public class SSR
- implements ActionListener
-{
- /** Just pass the control to the SSR class.
- */
- public static void main (String args[])
- {
- new SSR ();
- }
-
-
-
-
- /** Create a new instance of the simple screen reader.
- */
- public SSR ()
- {
- Layout ();
-
- // Create the event handler and tell it where to display information
- // about the currently focused accessible object.
- maEventHandler = new EventHandler ();
- maEventHandler.addObjectDisplay (maTextualDisplay);
- maEventHandler.addObjectDisplay (maGraphicalDisplay);
- }
-
-
-
-
- /** Setup the GUI. It is divided into three areas. The lower half is
- ocupied by a message area that logs all the events received from
- accessibility objects. The upper half is shared by two different
- displays of the currently focused object. On left there is a textual
- representation. On the right there is a graphical view of the
- objects's outline.
- */
- private void Layout ()
- {
- GridBagConstraints constraints;
-
- JPanel aPanel = new JPanel (true);
- aPanel.setLayout (new GridBagLayout());
- aPanel.setOpaque (true);
-
- mFrame = new JFrame ("Simple Screen Reader 0.3");
- mFrame.setContentPane(aPanel);
- mFrame.setSize (600,400);
-
-
- addComponent (new JLabel ("Focused Object:"),
- 0,0, 1,1, 0,0, GridBagConstraints.WEST, GridBagConstraints.NONE);
-
-
- maTextualDisplay = new TextualDisplay ();
- addComponent (maTextualDisplay,
- 0,1, 1,1, 1,1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);
-
- maGraphicalDisplay = new GraphicalDisplay ();
- addComponent (maGraphicalDisplay,
- 1,0, 1,2, 1,1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);
-
- addComponent (new JLabel ("Messages:"),
- 0,2, 1,1, 0,0, GridBagConstraints.WEST, GridBagConstraints.NONE);
-
- addComponent (MessageArea.Instance(),
- 0,3, 2,1, 1,1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);
-
-
- JButton aButton = new JButton ("Quit SSR");
- addComponent (aButton,
- 0,4, 1,1, 0,0, GridBagConstraints.WEST,GridBagConstraints.NONE);
- aButton.addActionListener (this);
-
- mFrame.show();
- }
-
-
-
-
- /** Add a GUI element with the given constraints to the main window.
- */
- private JComponent addComponent (JComponent aComponent,
- int x, int y, int width, int height, double weightx, double weighty,
- int anchor, int fill)
- {
- aComponent.setDoubleBuffered (false);
- GridBagConstraints aConstraints = new GridBagConstraints();
- aConstraints.gridx = x;
- aConstraints.gridy = y;
- aConstraints.gridwidth = width;
- aConstraints.gridheight = height;
- aConstraints.weightx = weightx;
- aConstraints.weighty = weighty;
- aConstraints.anchor = anchor;
- aConstraints.fill = fill;
-
- mFrame.getContentPane().add (aComponent, aConstraints);
-
- return aComponent;
- }
-
-
-
-
- /** This call-back handles button presses.
- */
- public void actionPerformed (java.awt.event.ActionEvent e)
- {
- if (e.getActionCommand().equals ("Quit SSR"))
- {
- maEventHandler.finalize ();
- System.exit(0);
- }
- }
-
-
- /// The main frame that contains all other GUI elements.
- private JFrame mFrame;
-
- /// A textutal representation of the currently focused object.
- private TextualDisplay maTextualDisplay;
-
- /// A graphical representation of the currently focused object.
- private GraphicalDisplay maGraphicalDisplay;
-
- /// The event handler that reacts to all the accessibility events.
- private EventHandler maEventHandler;
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/TextualDisplay.java b/odk/examples/DevelopersGuide/Accessibility/TextualDisplay.java
deleted file mode 100644
index 3776d635..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/TextualDisplay.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.Dimension;
-import javax.swing.JTextArea;
-import javax.swing.JScrollPane;
-import java.util.Vector;
-
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleComponent;
-import com.sun.star.accessibility.XAccessibleStateSet;
-
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-/** Display textual information for a given accessible object. This
- includes the names of that object of its ancestors as well as some
- information retrieved from the XAccessibleContext and
- XAccessibleComponent interfaces.
-*/
-class TextualDisplay
- extends JScrollPane
- implements IAccessibleObjectDisplay
-{
- /** Create a new scroll pane that contains a text widget which display
- information about given accessible objects.
- */
- public TextualDisplay ()
- {
- // Create a text widget for displaying the text information...
- maText = new JTextArea (80,10);
- maText.setBackground (new Color (250,240,230));
- maText.setFont (new Font ("Courier", Font.PLAIN, 11));
-
- // ...and set-up the scroll pane to show this widget.
- setViewportView (maText);
- setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
- setHorizontalScrollBarPolicy (JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
- }
-
-
-
-
- /** Set the accessible object to display. Call this method e.g. when a
- new object has been focused.
- */
- public synchronized void setAccessibleObject (XAccessibleContext xContext)
- {
- // First clear the display area.
- msTextContent = new String ();
-
- if (xContext != null)
- {
- String sIndentation = showParents (xContext);
- showContextInfo (xContext, sIndentation);
- showComponentInfo (xContext, sIndentation);
- }
-
- maText.setText (msTextContent);
- }
-
-
-
-
- public synchronized void updateAccessibleObject (XAccessibleContext xContext)
- {
- setAccessibleObject (xContext);
- }
-
-
-
- /** Show some of the information available over the given object's
- XAccessibleContext interface.
- */
- private void showContextInfo (XAccessibleContext xContext, String sIndentation)
- {
- // Show the description.
- msTextContent += sIndentation + "Description: "
- + xContext.getAccessibleDescription() + "\n";
-
- showStates (xContext, sIndentation);
- }
-
-
-
-
- /** Show a list of all of the the given object's states. Use the
- NameConverter class to transform the numerical state ids into human
- readable names.
- @param xContext
- The accessible context for which to show the state names.
- */
- private void showStates (XAccessibleContext xContext, String sIndentation)
- {
- // Get the state set object...
- XAccessibleStateSet xStateSet = xContext.getAccessibleStateSet();
- // ...and retrieve an array of numerical ids.
- short aStates[] = xStateSet.getStates();
-
- // Iterate over the array and print the names of the states.
- msTextContent += sIndentation + "States : ";
- for (int i=0; i<aStates.length; i++)
- {
- if (i > 0)
- msTextContent += ", ";
- msTextContent += NameProvider.getStateName(aStates[i]);
- }
- msTextContent += "\n";
- }
-
-
-
-
- /** When the given object supports the XAccessibleComponent interface then
- show its size and location on the screen.
- */
- private void showComponentInfo (XAccessibleContext xContext, String sIndentation)
- {
- // Try to cast the given accessible context to the
- // XAccessibleComponent interface.
- XAccessibleComponent xComponent =
- (XAccessibleComponent)UnoRuntime.queryInterface(
- XAccessibleComponent.class, xContext);
- if (xComponent != null)
- {
- Point aLocation = xComponent.getLocationOnScreen();
- msTextContent += sIndentation + "Position : "
- + aLocation.X + ", " + aLocation.Y + "\n";
-
- Size aSize = xComponent.getSize();
- msTextContent += sIndentation + "Size : "
- + aSize.Width + ", " + aSize.Height + "\n";
- }
- }
-
-
-
-
-
- /** Print the names of the given object and its parents and return an
- indentation string that can be used to print further information
- about the object.
- */
- private String showParents (XAccessibleContext xContext)
- {
- // Create the path from the given object to its tree's root.
- Vector aPathToRoot = new Vector();
- while (xContext != null)
- {
- aPathToRoot.add (xContext);
- // Go up the hierarchy one level to the object's parent.
- try
- {
- XAccessible xParent = xContext.getAccessibleParent();
- if (xParent != null)
- xContext = xParent.getAccessibleContext();
- else
- xContext = null;
- }
- catch (Exception e)
- {
- System.err.println ("caught exception " + e + " while getting path to root");
- }
- }
-
- // Print the path in the accessibility tree from the given context to
- // the root.
- String sIndentation = new String ();
- for (int i=aPathToRoot.size()-1; i>=0; i--)
- {
- XAccessibleContext xParentContext = (XAccessibleContext)aPathToRoot.get(i);
- String sParentName = xParentContext.getAccessibleName();
- if (sParentName.length() == 0)
- sParentName = "<unnamed> / Role "
- + NameProvider.getRoleName(xParentContext.getAccessibleRole());
- msTextContent += sIndentation + sParentName + "\n";
- sIndentation += msIndentation;
- }
-
- return sIndentation;
- }
-
-
-
- /// The text widget that is used for the actual text display.
- private JTextArea maText;
-
- /// The indentation with which an object's child is indented.
- private final String msIndentation = new String(" ");
-
- /// The text content displayed by this object.
- private String msTextContent = new String ();
-}
diff --git a/odk/examples/DevelopersGuide/Accessibility/makefile.mk b/odk/examples/DevelopersGuide/Accessibility/makefile.mk
deleted file mode 100644
index 5efa8ee7..00000000
--- a/odk/examples/DevelopersGuide/Accessibility/makefile.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-ACCESSIBILITY_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/ConnectionTask.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/EventHandler.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/EventListenerProxy.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/GraphicalDisplay.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/IAccessibleObjectDisplay.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/MessageArea.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/NameProvider.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/RegistrationThread.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/SSR.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Accessibility$/TextualDisplay.java
-
-DIR_FILE_LIST= \
- $(ACCESSIBILITY_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_accessibility_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_accessibility.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/CreatingDialogs.odt b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/CreatingDialogs.odt
deleted file mode 100644
index dd55f907..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/CreatingDialogs.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/Makefile b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/Makefile
deleted file mode 100644
index e6549be0..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/Makefile
+++ /dev/null
@@ -1,139 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the CreatingDialogs example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=BaDCreatingDialogsExample
-OUT_COMP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-COMPONENT_NAME=SampleDialog
-COMPONENT_PACKAGE = $(OUT_BIN)/$(COMPONENT_NAME).$(UNOOXT_EXT)
-COMPONENT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).$(UNOOXT_EXT)")
-COMPONENT_JAR_NAME = $(COMPONENT_NAME).uno.jar
-COMPONENT_JAR = $(OUT_CLASS)/$(COMPONENT_JAR_NAME)
-COMPONENT_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMPONENT_NAME).uno.Manifest
-COMPONENT_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT_NAME)/META-INF/manifest.xml
-REGISTERFLAG = $(OUT_MISC)/devguide_basicanddialogs_creatingdialogs_register_component.flag
-
-# often the java files are structured in a hierarchy similar to the package,
-# for the example we know the package
-PACKAGE = com.sun.star.comp.sdk.examples
-
-JAVAFILES = \
- SampleDialog.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-$(COMPONENT_NAME)_CLASSFILES = SampleDialog.class \
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL: $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(PACKAGE).$(basename $(basename $(@F)))> $@
-
-$(OUT_COMP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $<
-
-# rule for component jar file
-$(COMPONENT_JAR) : $(COMPONENT_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) .
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMPONENT_PACKAGE) : $(COMPONENT_JAR) $(COMPONENT_UNOPKG_MANIFEST)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_CLASS)) && $(SDK_ZIP) ../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(REGISTERFLAG) : $(COMPONENT_PACKAGE)
-ifneq "$(SDK_AUTO_DEPLOYMENT)" ""
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(EXAMPLE_NAME) : $(REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The SampleDialog Java component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo Please load the "$(QM)CreatingDialogs.odt$(QM)" document to use the component or use it
- @echo by yourself in your office installation, see the example description.
- @echo -
- @echo $(MAKE) CreatingDialogs.odt.load
- @echo --------------------------------------------------------------------------------
-
-CreatingDialogs.odt.load : $(REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java b/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java
deleted file mode 100644
index 6145a3c4..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/CreatingDialogs/SampleDialog.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-package com.sun.star.comp.sdk.examples;
-
-import com.sun.star.awt.ActionEvent;
-import com.sun.star.awt.XActionListener;
-import com.sun.star.awt.XButton;
-import com.sun.star.lang.XComponent;
-import com.sun.star.awt.XControl;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.awt.XControlContainer;
-import com.sun.star.awt.XDialog;
-import com.sun.star.awt.XFixedText;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindow;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.task.XJobExecutor;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-/** example of a Java component which creates a dialog at runtime
-
- This component can be tested by the following StarOffice Basic code:
- Sub Main
- Dim oJobExecutor
- oJobExecutor = CreateUnoService( "com.sun.star.examples.SampleDialog" )
- oJobExecutor.trigger( "execute" )
- End Sub
-*/
-
-public class SampleDialog extends WeakBase implements XServiceInfo, XJobExecutor {
-
- static final String __serviceName = "com.sun.star.examples.SampleDialog";
-
- private static final String _buttonName = "Button1";
- private static final String _cancelButtonName = "CancelButton";
- private static final String _labelName = "Label1";
- private static final String _labelPrefix = "Number of button clicks: ";
-
- private XComponentContext _xComponentContext;
-
- public SampleDialog( XComponentContext xComponentContext ) {
- _xComponentContext = xComponentContext;
- }
-
- // static component operations
- public static XSingleServiceFactory __getServiceFactory( String implName,
- XMultiServiceFactory multiFactory,
- XRegistryKey regKey ) {
- XSingleServiceFactory xSingleServiceFactory = null;
- if ( implName.equals( SampleDialog.class.getName() ) ) {
- xSingleServiceFactory = FactoryHelper.getServiceFactory(
- SampleDialog.class, SampleDialog.__serviceName, multiFactory, regKey );
- }
- return xSingleServiceFactory;
- }
-
- public static boolean __writeRegistryServiceInfo( XRegistryKey regKey ) {
- return FactoryHelper.writeRegistryServiceInfo(
- SampleDialog.class.getName(), SampleDialog.__serviceName, regKey );
- }
-
- // XServiceInfo
- public String getImplementationName( ) {
- return getClass().getName();
- }
-
- // XServiceInfo
- public boolean supportsService( /*IN*/String serviceName ) {
- if ( serviceName.equals( __serviceName))
- return true;
- return false;
- }
-
- // XServiceInfo
- public String[] getSupportedServiceNames( ) {
- String[] retValue= new String[0];
- retValue[0] = __serviceName;
- return retValue;
- }
-
- // XJobExecutor
- public void trigger(String sEvent) {
- if ( sEvent.compareTo( "execute" ) == 0 ) {
- try {
- createDialog();
- }
- catch ( Exception e ) {
- throw new com.sun.star.lang.WrappedTargetRuntimeException( e.getMessage(), this, e );
- }
- }
- }
-
- /** method for creating a dialog at runtime
- */
- private void createDialog() throws com.sun.star.uno.Exception {
-
- // get the service manager from the component context
- XMultiComponentFactory xMultiComponentFactory = _xComponentContext.getServiceManager();
-
- // create the dialog model and set the properties
- Object dialogModel = xMultiComponentFactory.createInstanceWithContext(
- "com.sun.star.awt.UnoControlDialogModel", _xComponentContext );
- XPropertySet xPSetDialog = ( XPropertySet )UnoRuntime.queryInterface(
- XPropertySet.class, dialogModel );
- xPSetDialog.setPropertyValue( "PositionX", new Integer( 100 ) );
- xPSetDialog.setPropertyValue( "PositionY", new Integer( 100 ) );
- xPSetDialog.setPropertyValue( "Width", new Integer( 150 ) );
- xPSetDialog.setPropertyValue( "Height", new Integer( 100 ) );
- xPSetDialog.setPropertyValue( "Title", new String( "Runtime Dialog Demo" ) );
-
- // get the service manager from the dialog model
- XMultiServiceFactory xMultiServiceFactory = ( XMultiServiceFactory )UnoRuntime.queryInterface(
- XMultiServiceFactory.class, dialogModel );
-
- // create the button model and set the properties
- Object buttonModel = xMultiServiceFactory.createInstance(
- "com.sun.star.awt.UnoControlButtonModel" );
- XPropertySet xPSetButton = ( XPropertySet )UnoRuntime.queryInterface(
- XPropertySet.class, buttonModel );
- xPSetButton.setPropertyValue( "PositionX", new Integer( 20 ) );
- xPSetButton.setPropertyValue( "PositionY", new Integer( 70 ) );
- xPSetButton.setPropertyValue( "Width", new Integer( 50 ) );
- xPSetButton.setPropertyValue( "Height", new Integer( 14 ) );
- xPSetButton.setPropertyValue( "Name", _buttonName );
- xPSetButton.setPropertyValue( "TabIndex", new Short( (short)0 ) );
- xPSetButton.setPropertyValue( "Label", new String( "Click Me" ) );
-
- // create the label model and set the properties
- Object labelModel = xMultiServiceFactory.createInstance(
- "com.sun.star.awt.UnoControlFixedTextModel" );
- XPropertySet xPSetLabel = ( XPropertySet )UnoRuntime.queryInterface(
- XPropertySet.class, labelModel );
- xPSetLabel.setPropertyValue( "PositionX", new Integer( 40 ) );
- xPSetLabel.setPropertyValue( "PositionY", new Integer( 30 ) );
- xPSetLabel.setPropertyValue( "Width", new Integer( 100 ) );
- xPSetLabel.setPropertyValue( "Height", new Integer( 14 ) );
- xPSetLabel.setPropertyValue( "Name", _labelName );
- xPSetLabel.setPropertyValue( "TabIndex", new Short( (short)1 ) );
- xPSetLabel.setPropertyValue( "Label", _labelPrefix );
-
- // create a Cancel button model and set the properties
- Object cancelButtonModel = xMultiServiceFactory.createInstance(
- "com.sun.star.awt.UnoControlButtonModel" );
- XPropertySet xPSetCancelButton = ( XPropertySet )UnoRuntime.queryInterface(
- XPropertySet.class, cancelButtonModel );
- xPSetCancelButton.setPropertyValue( "PositionX", new Integer( 80 ) );
- xPSetCancelButton.setPropertyValue( "PositionY", new Integer( 70 ) );
- xPSetCancelButton.setPropertyValue( "Width", new Integer( 50 ) );
- xPSetCancelButton.setPropertyValue( "Height", new Integer( 14 ) );
- xPSetCancelButton.setPropertyValue( "Name", _cancelButtonName );
- xPSetCancelButton.setPropertyValue( "TabIndex", new Short( (short)2 ) );
- xPSetCancelButton.setPropertyValue( "PushButtonType", new Short( (short)2 ) );
- xPSetCancelButton.setPropertyValue( "Label", new String( "Cancel" ) );
-
- // insert the control models into the dialog model
- XNameContainer xNameCont = ( XNameContainer )UnoRuntime.queryInterface(
- XNameContainer.class, dialogModel );
- xNameCont.insertByName( _buttonName, buttonModel );
- xNameCont.insertByName( _labelName, labelModel );
- xNameCont.insertByName( _cancelButtonName, cancelButtonModel );
-
- // create the dialog control and set the model
- Object dialog = xMultiComponentFactory.createInstanceWithContext(
- "com.sun.star.awt.UnoControlDialog", _xComponentContext );
- XControl xControl = ( XControl )UnoRuntime.queryInterface(
- XControl.class, dialog );
- XControlModel xControlModel = ( XControlModel )UnoRuntime.queryInterface(
- XControlModel.class, dialogModel );
- xControl.setModel( xControlModel );
-
- // add an action listener to the button control
- XControlContainer xControlCont = ( XControlContainer )UnoRuntime.queryInterface(
- XControlContainer.class, dialog );
- Object objectButton = xControlCont.getControl( "Button1" );
- XButton xButton = ( XButton )UnoRuntime.queryInterface(
- XButton.class, objectButton );
- xButton.addActionListener( new ActionListenerImpl( xControlCont ) );
-
- // create a peer
- Object toolkit = xMultiComponentFactory.createInstanceWithContext(
- "com.sun.star.awt.ExtToolkit", _xComponentContext );
- XToolkit xToolkit = ( XToolkit )UnoRuntime.queryInterface(
- XToolkit.class, toolkit );
- XWindow xWindow = ( XWindow )UnoRuntime.queryInterface(
- XWindow.class, xControl );
- xWindow.setVisible( false );
- xControl.createPeer( xToolkit, null );
-
- // execute the dialog
- XDialog xDialog = ( XDialog )UnoRuntime.queryInterface(
- XDialog.class, dialog );
- xDialog.execute();
-
- // dispose the dialog
- XComponent xComponent = ( XComponent )UnoRuntime.queryInterface(
- XComponent.class, dialog );
- xComponent.dispose();
- }
-
- /** action listener
- */
- public class ActionListenerImpl implements com.sun.star.awt.XActionListener {
-
- private int _nCounts = 0;
-
- private XControlContainer _xControlCont;
-
- public ActionListenerImpl( XControlContainer xControlCont ) {
- _xControlCont = xControlCont;
- }
-
- // XEventListener
- public void disposing( EventObject eventObject ) {
- _xControlCont = null;
- }
-
- // XActionListener
- public void actionPerformed( ActionEvent actionEvent ) {
-
- // increase click counter
- _nCounts++;
-
- // set label text
- Object label = _xControlCont.getControl( "Label1" );
- XFixedText xLabel = ( XFixedText )UnoRuntime.queryInterface(
- XFixedText.class, label );
- xLabel.setText( _labelPrefix + _nCounts );
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/FirstStepsBasic.odt b/odk/examples/DevelopersGuide/BasicAndDialogs/FirstStepsBasic.odt
deleted file mode 100644
index 4024740f..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/FirstStepsBasic.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/Makefile b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/Makefile
deleted file mode 100644
index c5f17ec6..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/Makefile
+++ /dev/null
@@ -1,126 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the CreatingDialogs example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=BaDToolkitControls
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=ToolkitControls
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)devguide_basic_$(COMP_NAME)_register_component.flag
-
-COMP_LIBRARY_FILES=\
- ToolkitControls/dialog.xlb\
- ToolkitControls/FileDialog.xba\
- ToolkitControls/FileDialogDlg.xdl\
- ToolkitControls/MultiPage.xba\
- ToolkitControls/MultiPageDlg.xdl\
- ToolkitControls/ProgressBar.xba\
- ToolkitControls/ProgressBarDlg.xdl\
- ToolkitControls/script.xlb\
- ToolkitControls/ScrollBar.xba\
- ToolkitControls/ScrollBarDlg.xdl
-
-# Targets
-.PHONY: ALL
-ALL : $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.basic-library$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME)$(QM)"/$(CSEP) >> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_UNOPKG_MANIFEST) $(COMP_LIBRARY_FILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ ToolkitControls/dialog.xlb \
- ToolkitControls/FileDialog.xba ToolkitControls/FileDialogDlg.xdl \
- ToolkitControls/MultiPage.xba ToolkitControls/MultiPageDlg.xdl \
- ToolkitControls/ProgressBar.xba ToolkitControls/ProgressBarDlg.xdl \
- ToolkitControls/script.xlb ToolkitControls/ScrollBar.xba \
- ToolkitControls/ScrollBarDlg.xdl
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(SAMPLE_NAME) : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)ToolkitControls$(QM)" library was installed in your office installation
- @echo if SDK_AUTO_DEPLOYMENT = YES. You can use it in the BASIC IDE as a normal
- @echo Basic library.
- @echo You can also load the document "$(QM)$(COMP_NAME).odt$(QM)" and press a button
- @echo to run one of the example macros.
- @echo -
- @echo $(MAKE) $(COMP_NAME).odt.load
- @echo --------------------------------------------------------------------------------
-
-$(COMP_NAME).odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(COMP_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls.odt b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls.odt
deleted file mode 100644
index ffedaa75..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialog.xba b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialog.xba
deleted file mode 100644
index 4a36d762..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialog.xba
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FileDialog" script:language="StarBasic">REM ***** BASIC *****
-
-Dim oDialog As Object
-
-Sub Main()
-
- Dim oLibContainer As Object, oLib As Object
- Dim oInputStreamProvider As Object
-
- Const sLibName = &quot;ToolkitControls&quot;
- Const sDialogName = &quot;FileDialogDlg&quot;
-
- REM load/get library and input stream provider
- oLibContainer = DialogLibraries
- oLibContainer.loadLibrary( sLibName )
- oLib = oLibContainer.getByName( sLibName )
- oInputStreamProvider = oLib.getByName( sDialogName )
-
- REM create dialog control
- oDialog = CreateUnoDialog( oInputStreamProvider )
-
- REM show the dialog
- oDialog.execute()
-
-End Sub
-
-Sub OpenFileDialog()
-
- Dim oFilePicker As Object, oSimpleFileAccess As Object
- Dim oPathSettings As Object
- Dim oTextField As Object, oTextFieldModel As Object
- Dim sFileURL As String
- Dim sFiles As Variant
-
- REM file dialog
- oFilePicker = CreateUnoService( &quot;com.sun.star.ui.dialogs.FilePicker&quot; )
-
- REM set filter
- oFilePicker.AppendFilter( &quot;All files (*.*)&quot;, &quot;*.*&quot; )
- oFilePicker.AppendFilter( &quot;StarOffice 6.0 Text Text Document&quot;, &quot;*.sxw&quot; )
- oFilePicker.AppendFilter( &quot;StarOffice 6.0 Spreadsheet&quot;, &quot;*.sxc&quot; )
- oFilePicker.SetCurrentFilter( &quot;All files (*.*)&quot; )
-
- REM if no file URL is set, get path settings from configuration
- oTextFieldModel = oDialog.Model.TextField1
- sFileURL = ConvertToURL( oTextFieldModel.Text )
- If sFileURL = &quot;&quot; Then
- oSettings = CreateUnoService( &quot;com.sun.star.frame.Settings&quot; )
- oPathSettings = CreateUnoService( &quot;com.sun.star.util.PathSettings&quot; )
- sFileURL = oPathSettings.getPropertyValue( &quot;Work&quot; )
- End If
-
- REM set display directory
- oSimpleFileAccess = CreateUnoService( &quot;com.sun.star.ucb.SimpleFileAccess&quot; )
- If oSimpleFileAccess.exists( sFileURL ) And oSimpleFileAccess.isFolder( sFileURL ) Then
- oFilePicker.setDisplayDirectory( sFileURL )
- End If
-
- REM execute file dialog
- If oFilePicker.execute() Then
- sFiles = oFilePicker.getFiles()
- sFileURL = sFiles(0)
- If oSimpleFileAccess.exists( sFileURL ) Then
- REM set file path in text field
- oTextField = oDialog.GetControl(&quot;TextField1&quot;)
- oTextField.SetText( ConvertFromURL( sFileURL ) )
- End If
- End If
-
-End Sub
-</script:module> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialogDlg.xdl b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialogDlg.xdl
deleted file mode 100644
index 06f1c4cd..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/FileDialogDlg.xdl
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="FileDialogDlg" dlg:title="File Dialog Demo" dlg:left="138" dlg:top="80" dlg:width="203" dlg:height="157">
- <dlg:bulletinboard>
- <dlg:textfield dlg:id="TextField1" dlg:tab-index="0" dlg:left="6" dlg:top="35" dlg:width="168" dlg:height="12"/>
- <dlg:button dlg:id="CommandButton1" dlg:tab-index="1" dlg:left="180" dlg:top="35" dlg:width="14" dlg:height="14" dlg:value="...">
- <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ToolkitControls.FileDialog.OpenFileDialog" script:language="StarBasic"/>
- </dlg:button>
- <dlg:text dlg:id="Label1" dlg:tab-index="2" dlg:left="6" dlg:top="20" dlg:width="80" dlg:height="10" dlg:value="Enter File Path"/>
- <dlg:button dlg:id="CommandButton2" dlg:tab-index="3" dlg:left="8" dlg:top="116" dlg:width="44" dlg:height="16" dlg:value="Cancel" dlg:button-type="cancel"/>
- </dlg:bulletinboard>
-</dlg:window> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPage.xba b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPage.xba
deleted file mode 100644
index 3a957158..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPage.xba
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="MultiPage" script:language="StarBasic">REM ***** BASIC *****
-
-Dim oDialog As Object
-
-Sub Main()
-
- Dim oLibContainer As Object, oLib As Object
- Dim oInputStreamProvider As Object
- Dim oDialogModel As Object
-
- Const sLibName = &quot;ToolkitControls&quot;
- Const sDialogName = &quot;MultiPageDlg&quot;
-
- REM load/get library and input stream provider
- oLibContainer = DialogLibraries
- oLibContainer.loadLibrary( sLibName )
- oLib = oLibContainer.getByName( sLibName )
- oInputStreamProvider = oLib.getByName( sDialogName )
-
- REM create dialog control
- oDialog = CreateUnoDialog( oInputStreamProvider )
-
- REM initialize dialog and controls
- Initialize()
-
- REM show the dialog
- oDialog.execute()
-
-End Sub
-
-
-Sub Initialize()
-
- Dim oDialogModel As Object
- Dim oNextButton As Object, oNextButtonModel As Object
- Dim oListBox As Object
- Dim oCheckBoxModel As Object
- Dim oOptionButtonModel As Object
- Dim oCurrencyFieldModel As Object
- Dim oNumericFieldModel As Object
- Dim oComboBox As Object, oComboBoxModel As Object
- Dim i As Integer
- Dim sName As String
- Dim sPizzas As Variant, sToppings As Variant
- Dim sCreditCards As Variant
- Dim sMonths As Variant
- Dim iCount As Integer
-
- REM dialog properties
- oDialogModel = oDialog.Model
- oDialogModel.Step = 1
-
- REM next button properties
- oNextButtonModel = oDialogModel.NextButton
- oNextButtonModel.DefaultButton = True
- oNextButton = oDialog.getControl(&quot;NextButton&quot;)
- oNextButton.setFocus()
-
- REM enable/disable back button, set label of next button
- PageChanged()
-
- REM set control properties on dialog page 1
-
- REM pizzas in list box
- oListBox = oDialog.getControl(&quot;ListBox1&quot;)
- sPizzas = Array(&quot;Margarita&quot;,&quot;Vegeterian&quot;,&quot;Ham &amp; Pineapple&quot;,&quot;Mexican&quot;,&quot;Seafood&quot;)
- oListBox.addItems( sPizzas, 0 )
- oListBox.selectItem( sPizzas(0), True )
-
- REM extra toppings
- sToppings = Array(&quot;Extra Cheese&quot;,&quot;Corn&quot;,&quot;Onions&quot;,&quot;Olives&quot;)
- For i = 0 To 3
- sName = &quot;CheckBox&quot; + i
- oCheckBoxModel = oDialogModel.getByName( sName )
- oCheckBoxModel.Label = sToppings( i )
- Next i
-
- REM default pizza size
- oOptionButtonModel = oDialogModel.OptionButton2
- oOptionButtonModel.State = True
-
- REM currency field properties
- oCurrencyFieldModel = oDialogModel.CurrencyField1
- oCurrencyFieldModel.ReadOnly = True
- oCurrencyFieldModel.DecimalAccuracy = 2
- oCurrencyFieldModel.CurrencySymbol = &quot;€&quot;
- oCurrencyFieldModel.PrependCurrencySymbol = True
-
- REM calculate prize for default settings
- CalculatePrize()
-
- REM set control properties on dialog page 2
-
- REM numeric field properties
- oNumericFieldModel = oDialogModel.NumericField1
- oNumericFieldModel.DecimalAccuracy = 0
-
- REM set control properties on dialog page 3
-
- REM default payment method
- oOptionButtonModel = oDialogModel.OptionButton4
- oOptionButtonModel.State = True
-
- REM credit cards in combo box
- oComboBox = oDialog.getControl(&quot;ComboBox1&quot;)
- sCreditCards = Array(&quot;Visa&quot;,&quot;Master/EuroCard&quot;,&quot;American Express&quot;)
- oComboBox.addItems( sCreditCards, 0 )
- oComboBoxModel = oDialogModel.ComboBox1
- oComboBoxModel.Text = sCreditCards(0)
-
- REM expiration month
- oListBox = oDialog.getControl(&quot;ListBox2&quot;)
- sMonths = Array(&quot;01&quot;,&quot;02&quot;,&quot;03&quot;,&quot;04&quot;,&quot;05&quot;,&quot;06&quot;,&quot;07&quot;,&quot;08&quot;,&quot;09&quot;,&quot;10&quot;,&quot;11&quot;,&quot;12&quot;)
- oListBox.addItems( sMonths, 0 )
- oListBox.selectItemPos( Month(Date())-1, True )
-
- REM expiration year
- oListBox = oDialog.getControl(&quot;ListBox3&quot;)
- For i = Year(Date()) To Year(Date()) + 4
- iCount = oListBox.getItemCount()
- oListBox.addItem( Str( i ), iCount )
- Next i
- oListBox.selectItemPos( 0, True )
-
-End Sub
-
-
-Sub CalculatePrize()
-
- Dim oDialogModel As Object
- Dim oListBox As Object
- Dim oCheckBoxModel As Object
- Dim oCurrencyFieldModel As Object
- Dim Position As Integer
- Dim sName As String
- Dim i As Integer, nChecked As Integer
- Dim Prizes As Variant
- Dim Prize As Double
-
- REM prizes for medium size pizzas
- Prizes = Array( 4, 5, 6, 6, 7 )
-
- REM get the position of the currently selected pizza
- oListBox = oDialog.getControl(&quot;ListBox1&quot;)
- Position = oListBox.getSelectedItemPos()
- Prize = Prizes( Position )
-
- REM small pizzas are 1€ cheaper, large pizzas are 1€ more expensive
- oDialogModel = oDialog.Model
- If oDialogModel.OptionButton1.State = 1 Then
- Prize = Prize - 1
- ElseIf oDialogModel.OptionButton3.State = 1 Then
- Prize = Prize + 1
- End If
-
- REM get the number of extra toppings (0.5€ per extra topping)
- For i = 0 To 3
- sName = &quot;CheckBox&quot; + i
- oCheckBoxModel = oDialogModel.getByName( sName )
- If oCheckBoxModel.State = 1 Then
- nChecked = nChecked + 1
- End If
- Next i
- Prize = Prize + nChecked * 0.5
-
- REM set the value of the currency field
- oCurrencyFieldModel = oDialogModel.CurrencyField1
- oCurrencyFieldModel.Value = Prize
-
-End Sub
-
-
-Sub PaymentMethodChanged()
-
- Dim oDialogModel As Object
- Dim bEnabled As Boolean
-
- REM get dialog model
- oDialogModel = oDialog.getModel()
-
- If oDialogModel.OptionButton4.State = 1 Then
- REM enable controls for payment by credit card
- bEnabled = True
- ElseIf oDialogModel.OptionButton5.State = 1 Then
- REM disable controls for payment by check
- bEnabled = False
- End If
-
- REM enable/disable controls
- With oDialogModel
- .Label11.Enabled = bEnabled
- .Label12.Enabled = bEnabled
- .Label13.Enabled = bEnabled
- .ComboBox1.Enabled = bEnabled
- .TextField6.Enabled = bEnabled
- .ListBox2.Enabled = bEnabled
- .ListBox3.Enabled = bEnabled
- .TextField7.Enabled = bEnabled
- End With
-
-End Sub
-
-
-Sub NextPage()
-
- Dim oDialogModel As Object
-
- REM get dialog model
- oDialogModel = oDialog.getModel()
-
- If oDialogModel.Step &lt; 3 Then
- REM next page
- oDialogModel.Step = oDialogModel.Step + 1
- REM enable/disable back button, set label of next button
- PageChanged()
- ElseIf oDialogModel.Step = 3 Then
- REM submit order
- SubmitOrder()
- REM hide dialog
- oDialog.endExecute()
- End If
-
-End Sub
-
-
-Sub PreviousPage()
-
- Dim oDialogModel As Object
-
- REM get dialog model
- oDialogModel = oDialog.getModel()
-
- If oDialogModel.Step &gt; 1 Then
- REM previous page
- oDialogModel.Step = oDialogModel.Step - 1
- REM enable/disable back button, set label of next button
- PageChanged()
- End If
-
-End Sub
-
-
-Sub PageChanged()
-
- Dim oDialogModel As Object
- Dim oBackButtonModel As Object
- Dim oNextButtonModel As Object
-
- Const sLabelNext = &quot;Next &gt;&gt;&quot;
- Const sLabelSubmit = &quot;Submit&quot;
-
- REM get dialog model
- oDialogModel = oDialog.getModel()
-
- REM get back button model
- oBackButtonModel = oDialogModel.getByName(&quot;BackButton&quot;)
-
- REM enable/disable back button
- If oDialogModel.Step = 1 Then
- oBackButtonModel.Enabled = False
- Else
- oBackButtonModel.Enabled = True
- End If
-
- REM get next button model
- oNextButtonModel = oDialogModel.getByName(&quot;NextButton&quot;)
-
- REM set label of next button
- If oDialogModel.Step = 3 Then
- oNextButtonModel.Label = sLabelSubmit
- Else
- oNextButtonModel.Label = sLabelNext
- End If
-
-End Sub
-
-
-Sub SubmitOrder()
-
- MsgBox &quot;Your pizza will be delivered in 45 minutes.&quot;
-
-End Sub
-
-</script:module> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPageDlg.xdl b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPageDlg.xdl
deleted file mode 100644
index bc6360b3..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPageDlg.xdl
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="MultiPageDlg" dlg:title="Multi Page Dialog Demo" dlg:left="138" dlg:top="80" dlg:width="203" dlg:height="157" dlg:page="1">
- <dlg:bulletinboard>
- <dlg:button dlg:id="CancelButton" dlg:tab-index="0" dlg:left="6" dlg:top="135" dlg:width="50" dlg:height="14" dlg:value="Cancel" dlg:button-type="cancel"/>
- <dlg:button dlg:id="BackButton" dlg:tab-index="1" dlg:left="76" dlg:top="135" dlg:width="50" dlg:height="14" dlg:value="&lt;&lt; Back">
- <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ToolkitControls.MultiPage.PreviousPage" script:language="StarBasic"/>
- </dlg:button>
- <dlg:button dlg:id="NextButton" dlg:tab-index="2" dlg:left="147" dlg:top="135" dlg:width="50" dlg:height="14" dlg:value="Next &gt;&gt;">
- <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ToolkitControls.MultiPage.NextPage" script:language="StarBasic"/>
- </dlg:button>
- <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="185" dlg:height="9" dlg:page="1" dlg:value="Select a Pizza"/>
- <dlg:text dlg:id="Label1" dlg:tab-index="4" dlg:left="11" dlg:top="22" dlg:width="57" dlg:height="9" dlg:page="1" dlg:value="~Pizza"/>
- <dlg:menulist dlg:id="ListBox1" dlg:tab-index="5" dlg:left="11" dlg:top="35" dlg:width="60" dlg:height="12" dlg:page="1" dlg:spin="true">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:menulist>
- <dlg:text dlg:id="Label2" dlg:tab-index="6" dlg:left="11" dlg:top="61" dlg:width="60" dlg:height="11" dlg:page="1" dlg:value="Extra Toppings"/>
- <dlg:checkbox dlg:id="CheckBox0" dlg:tab-index="7" dlg:left="11" dlg:top="75" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="CheckBox0" dlg:checked="false">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:checkbox>
- <dlg:checkbox dlg:id="CheckBox1" dlg:tab-index="8" dlg:left="11" dlg:top="88" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="CheckBox1" dlg:checked="false">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:checkbox>
- <dlg:checkbox dlg:id="CheckBox2" dlg:tab-index="9" dlg:left="11" dlg:top="101" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="CheckBox2" dlg:checked="false">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:checkbox>
- <dlg:checkbox dlg:id="CheckBox3" dlg:tab-index="10" dlg:left="11" dlg:top="114" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="CheckBox3" dlg:checked="false">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:checkbox>
- <dlg:fixedline dlg:id="FixedLine2" dlg:tab-index="11" dlg:left="96" dlg:top="22" dlg:width="9" dlg:height="106" dlg:page="1" dlg:align="vertical"/>
- <dlg:text dlg:id="Label3" dlg:tab-index="12" dlg:left="120" dlg:top="22" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="Size"/>
- <dlg:radiogroup>
- <dlg:radio dlg:id="OptionButton1" dlg:tab-index="13" dlg:left="120" dlg:top="36" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="Small">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:radio>
- <dlg:radio dlg:id="OptionButton2" dlg:tab-index="14" dlg:left="120" dlg:top="49" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="Medium">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:radio>
- <dlg:radio dlg:id="OptionButton3" dlg:tab-index="15" dlg:left="120" dlg:top="62" dlg:width="60" dlg:height="9" dlg:page="1" dlg:value="Large">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.CalculatePrize" script:language="StarBasic"/>
- </dlg:radio>
- </dlg:radiogroup>
- <dlg:text dlg:id="Label4" dlg:tab-index="16" dlg:left="120" dlg:top="114" dlg:width="25" dlg:height="9" dlg:page="1" dlg:value="Prize"/>
- <dlg:currencyfield dlg:id="CurrencyField1" dlg:tab-index="17" dlg:left="150" dlg:top="113" dlg:width="30" dlg:height="12" dlg:page="1"/>
- <dlg:fixedline dlg:id="FixedLine3" dlg:tab-index="18" dlg:left="6" dlg:top="6" dlg:width="185" dlg:height="9" dlg:page="2" dlg:value="Enter the Delivery Address"/>
- <dlg:text dlg:id="Label5" dlg:tab-index="19" dlg:left="11" dlg:top="27" dlg:width="50" dlg:height="9" dlg:page="2" dlg:value="Full Name"/>
- <dlg:textfield dlg:id="TextField2" dlg:tab-index="20" dlg:left="70" dlg:top="25" dlg:width="110" dlg:height="12" dlg:page="2"/>
- <dlg:text dlg:id="Label6" dlg:tab-index="21" dlg:left="11" dlg:top="47" dlg:width="50" dlg:height="9" dlg:page="2" dlg:value="Address"/>
- <dlg:textfield dlg:id="TextField3" dlg:tab-index="22" dlg:left="70" dlg:top="45" dlg:width="110" dlg:height="12" dlg:page="2"/>
- <dlg:text dlg:id="Label7" dlg:tab-index="23" dlg:left="11" dlg:top="67" dlg:width="50" dlg:height="9" dlg:page="2" dlg:value="City"/>
- <dlg:textfield dlg:id="TextField4" dlg:tab-index="24" dlg:left="70" dlg:top="65" dlg:width="80" dlg:height="12" dlg:page="2"/>
- <dlg:text dlg:id="Label8" dlg:tab-index="25" dlg:left="11" dlg:top="87" dlg:width="50" dlg:height="9" dlg:page="2" dlg:value="ZIP / Postal Code"/>
- <dlg:numericfield dlg:id="NumericField1" dlg:tab-index="26" dlg:left="70" dlg:top="85" dlg:width="50" dlg:height="12" dlg:page="2"/>
- <dlg:text dlg:id="Label9" dlg:tab-index="27" dlg:left="11" dlg:top="107" dlg:width="50" dlg:height="9" dlg:page="2" dlg:value="Phone Number"/>
- <dlg:textfield dlg:id="TextField5" dlg:tab-index="28" dlg:left="70" dlg:top="105" dlg:width="80" dlg:height="12" dlg:page="2"/>
- <dlg:fixedline dlg:id="FixedLine4" dlg:tab-index="29" dlg:left="6" dlg:top="6" dlg:width="185" dlg:height="9" dlg:page="3" dlg:value="Select a Payment Method"/>
- <dlg:radiogroup>
- <dlg:radio dlg:id="OptionButton4" dlg:tab-index="30" dlg:left="12" dlg:top="26" dlg:width="40" dlg:height="9" dlg:page="3" dlg:value="Credit Card">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.PaymentMethodChanged" script:language="StarBasic"/>
- </dlg:radio>
- <dlg:radio dlg:id="OptionButton5" dlg:tab-index="31" dlg:left="12" dlg:top="110" dlg:width="40" dlg:height="9" dlg:page="3" dlg:value="Check">
- <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ToolkitControls.MultiPage.PaymentMethodChanged" script:language="StarBasic"/>
- </dlg:radio>
- </dlg:radiogroup>
- <dlg:combobox dlg:id="ComboBox1" dlg:tab-index="32" dlg:left="76" dlg:top="25" dlg:width="70" dlg:height="12" dlg:page="3" dlg:spin="true"/>
- <dlg:text dlg:id="Label11" dlg:tab-index="33" dlg:left="21" dlg:top="46" dlg:width="50" dlg:height="9" dlg:page="3" dlg:value="Credit Card No."/>
- <dlg:textfield dlg:id="TextField6" dlg:tab-index="34" dlg:left="76" dlg:top="45" dlg:width="70" dlg:height="12" dlg:page="3"/>
- <dlg:text dlg:id="Label12" dlg:tab-index="35" dlg:left="21" dlg:top="66" dlg:width="50" dlg:height="9" dlg:page="3" dlg:value="Expiration Date"/>
- <dlg:menulist dlg:id="ListBox2" dlg:tab-index="36" dlg:left="76" dlg:top="65" dlg:width="20" dlg:height="12" dlg:page="3" dlg:spin="true"/>
- <dlg:menulist dlg:id="ListBox3" dlg:tab-index="37" dlg:left="100" dlg:top="65" dlg:width="27" dlg:height="12" dlg:page="3" dlg:spin="true"/>
- <dlg:text dlg:id="Label13" dlg:tab-index="38" dlg:left="21" dlg:top="86" dlg:width="50" dlg:height="9" dlg:page="3" dlg:value="Cardholder&apos;s Name"/>
- <dlg:textfield dlg:id="TextField7" dlg:tab-index="39" dlg:left="76" dlg:top="85" dlg:width="70" dlg:height="12" dlg:page="3"/>
- <dlg:textfield dlg:id="TextField1" dlg:tab-index="40" dlg:left="-47" dlg:top="46" dlg:width="0" dlg:height="2" dlg:page="3"/>
- </dlg:bulletinboard>
-</dlg:window> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBar.xba b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBar.xba
deleted file mode 100644
index 648b4091..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBar.xba
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ProgressBar" script:language="StarBasic">REM ***** BASIC *****
-
-Dim oDialog As Object
-
-Sub Main()
-
- Dim oLibContainer As Object, oLib As Object
- Dim oInputStreamProvider As Object
- Dim oProgressBar As Object
-
- Const sLibName = &quot;ToolkitControls&quot;
- Const sDialogName = &quot;ProgressBarDlg&quot;
-
- REM load/get library and input stream provider
- oLibContainer = DialogLibraries
- oLibContainer.loadLibrary( sLibName )
- oLib = oLibContainer.getByName( sLibName )
- oInputStreamProvider = oLib.getByName( sDialogName )
-
- REM create dialog control
- oDialog = CreateUnoDialog( oInputStreamProvider )
-
- REM hide progress bar
- oProgressBar = oDialog.getControl(&quot;ProgressBar1&quot;)
- oProgressBar.setVisible( False )
-
- REM show the dialog
- oDialog.execute()
-
-End Sub
-
-Sub ProgressBarDemo()
-
- Dim oProgressBar As Object, oProgressBarModel As Object
- Dim oCancelButtonModel As Object
- Dim oStartButtonModel As Object
- Dim ProgressValue As Long
-
- REM progress bar settings
- Const ProgressValueMin = 0
- Const ProgressValueMax = 50
- Const ProgressStep = 1
-
- REM set minimum and maximum progress value
- oProgressBarModel = oDialog.Model.ProgressBar1
- oProgressBarModel.ProgressValueMin = ProgressValueMin
- oProgressBarModel.ProgressValueMax = ProgressValueMax
-
- REM disable cancel and start button
- oCancelButtonModel = oDialog.Model.CommandButton1
- oCancelButtonModel.Enabled = False
- oStartButtonModel = oDialog.Model.CommandButton2
- oStartButtonModel.Enabled = False
-
- REM show progress bar
- oProgressBar = oDialog.getControl(&quot;ProgressBar1&quot;)
- oProgressBar.setVisible( True )
-
- REM increase progress value every second
- For ProgressValue = ProgressValueMin To ProgressValueMax Step ProgressStep
- oProgressBarModel.ProgressValue = ProgressValue
- Wait 40
- Next ProgressValue
-
- REM hide progress bar
- oProgressBar.setVisible( False )
-
- REM enable cancel and start button
- oCancelButtonModel.Enabled = True
- oStartButtonModel.Enabled = True
-
-End Sub
-
-</script:module> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBarDlg.xdl b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBarDlg.xdl
deleted file mode 100644
index f39f5bfd..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ProgressBarDlg.xdl
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ProgressBarDlg" dlg:title="Progress Bar Demo" dlg:left="138" dlg:top="80" dlg:width="203" dlg:height="157">
- <dlg:bulletinboard>
- <dlg:progressmeter dlg:id="ProgressBar1" dlg:tab-index="0" dlg:left="6" dlg:top="70" dlg:width="190" dlg:height="9" dlg:value="0"/>
- <dlg:button dlg:id="CommandButton1" dlg:tab-index="1" dlg:left="6" dlg:top="135" dlg:width="50" dlg:height="14" dlg:value="Cancel" dlg:button-type="cancel"/>
- <dlg:button dlg:id="CommandButton2" dlg:tab-index="2" dlg:left="147" dlg:top="135" dlg:width="50" dlg:height="14" dlg:value="Start Demo">
- <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ToolkitControls.ProgressBar.ProgressBarDemo" script:language="StarBasic"/>
- </dlg:button>
- </dlg:bulletinboard>
-</dlg:window> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBar.xba b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBar.xba
deleted file mode 100644
index 6ea6bddb..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBar.xba
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ScrollBar" script:language="StarBasic">REM ***** BASIC *****
-
-Dim oDialog As Object
-Const Border = 5
-
-Sub Main()
-
- Dim oLibContainer As Object, oLib As Object
- Dim oInputStreamProvider As Object
- Dim oDialogModel As Object
- Dim oScrollBarModel As Object
- Dim oLabelModel As Object
- Dim sLabel As String
- Dim VisibleSize As Double
-
- Const sLibName = &quot;ToolkitControls&quot;
- Const sDialogName = &quot;ScrollBarDlg&quot;
-
- REM load/get library and input stream provider
- oLibContainer = DialogLibraries
- oLibContainer.loadLibrary( sLibName )
- oLib = oLibContainer.getByName( sLibName )
- oInputStreamProvider = oLib.getByName( sDialogName )
-
- REM create dialog control
- oDialog = CreateUnoDialog( oInputStreamProvider )
-
- REM set the label
- sLabel = &quot;This Text exceeds the visible area of the dialog and can be&quot;
- sLabel = sLabel + &quot; scrolled horizontally by clicking on the scroll bar.&quot;
- oDialogModel = oDialog.Model
- oLabelModel = oDialogModel.Label1
- oLabelModel.Label = sLabel
-
- REM scroll bar settings
- oScrollBarModel = oDialog.Model.ScrollBar1
- oScrollBarModel.ScrollValueMax = 100
- VisibleSize = (oDialogModel.Width - Border - oLabelModel.PositionX) / oLabelModel.Width
- VisibleSize = VisibleSize * oScrollBarModel.ScrollValueMax
- oScrollBarModel.VisibleSize = VisibleSize
- oScrollBarModel.BlockIncrement = oScrollBarModel.VisibleSize
- oScrollBarModel.LineIncrement = oScrollBarModel.BlockIncrement / 20
-
- REM show the dialog
- oDialog.execute()
-
-End Sub
-
-Sub AdjustmentHandler()
-
- Dim oLabelModel As Object
- Dim oScrollBarModel As Object
- Dim ScrollValue As Long, ScrollValueMax As Long
- Dim VisibleSize As Long
- Dim Factor As Double
-
- Static bInit As Boolean
- Static PositionX0 As Long
- Static Offset As Long
-
- REM get the model of the label control
- oLabelModel = oDialog.Model.Label1
-
- REM on initialization remember the position of the label control and calculate offset
- If bInit = False Then
- bInit = True
- PositionX0 = oLabelModel.PositionX
- OffSet = PositionX0 + oLabelModel.Width - (oDialog.Model.Width - Border)
- End If
-
- REM get the model of the scroll bar control
- oScrollBarModel = oDialog.Model.ScrollBar1
-
- REM get the actual scroll value
- ScrollValue = oScrollBarModel.ScrollValue
-
- REM calculate and set new position of the label control
- ScrollValueMax = oScrollBarModel.ScrollValueMax
- VisibleSize = oScrollBarModel.VisibleSize
- Factor = Offset / (ScrollValueMax - VisibleSize)
- oLabelModel.PositionX = PositionX0 - Factor * ScrollValue
-
-End Sub
-</script:module> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBarDlg.xdl b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBarDlg.xdl
deleted file mode 100644
index 95957e37..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/ScrollBarDlg.xdl
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ScrollBarDlg" dlg:title="Scroll Bar Demo" dlg:left="138" dlg:top="80" dlg:width="200" dlg:height="157">
- <dlg:styles>
- <dlg:style dlg:style-id="0" dlg:font-height="18"/>
- </dlg:styles>
- <dlg:bulletinboard>
- <dlg:scrollbar dlg:id="ScrollBar1" dlg:tab-index="0" dlg:left="5" dlg:top="137" dlg:width="190" dlg:height="15">
- <script:event script:event-name="on-adjustmentvaluechange" script:location="application" script:macro-name="ToolkitControls.ScrollBar.AdjustmentHandler" script:language="StarBasic"/>
- </dlg:scrollbar>
- <dlg:text dlg:style-id="0" dlg:id="Label1" dlg:tab-index="1" dlg:left="5" dlg:top="39" dlg:width="600" dlg:height="17" dlg:value="Label1"/>
- </dlg:bulletinboard>
-</dlg:window> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/dialog.xlb b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/dialog.xlb
deleted file mode 100644
index a74e020a..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/dialog.xlb
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="ToolkitControls" library:readonly="false" library:passwordprotected="false">
- <library:element library:name="FileDialogDlg"/>
- <library:element library:name="ProgressBarDlg"/>
- <library:element library:name="ScrollBarDlg"/>
- <library:element library:name="MultiPageDlg"/>
-</library:library> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/script.xlb b/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/script.xlb
deleted file mode 100644
index 03741ae3..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/script.xlb
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="ToolkitControls" library:readonly="false" library:passwordprotected="false">
- <library:element library:name="FileDialog"/>
- <library:element library:name="ProgressBar"/>
- <library:element library:name="ScrollBar"/>
- <library:element library:name="MultiPage"/>
-</library:library> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/BasicAndDialogs/makefile.mk b/odk/examples/DevelopersGuide/BasicAndDialogs/makefile.mk
deleted file mode 100644
index 3dd72c26..00000000
--- a/odk/examples/DevelopersGuide/BasicAndDialogs/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-BASICANDDIALOGS_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/FirstStepsBasic.odt
-
-CREATINGDIALOGS_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/CreatingDialogs$/SampleDialog.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/CreatingDialogs$/CreatingDialogs.odt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/CreatingDialogs$/Makefile
-
-TOOLKITCONTROLS_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls.odt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/dialog.xlb \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/FileDialog.xba \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/FileDialogDlg.xdl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/MultiPage.xba \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/MultiPageDlg.xdl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/ProgressBar.xba \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/ProgressBarDlg.xdl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/script.xlb \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/ScrollBar.xba \
- $(DESTDIRDEVGUIDEEXAMPLES)$/BasicAndDialogs$/ToolkitControls$/ToolkitControls$/ScrollBarDlg.xdl
-
-DIR_FILE_LIST= \
- $(BASICANDDIALOGS_FILES) \
- $(CREATINGDIALOGS_FILES) \
- $(TOOLKITCONTROLS_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_basicanddialogs_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_basicanddialogs.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Charts/AddInChart.ods b/odk/examples/DevelopersGuide/Charts/AddInChart.ods
deleted file mode 100644
index 01708ed7..00000000
--- a/odk/examples/DevelopersGuide/Charts/AddInChart.ods
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Charts/CalcHelper.java b/odk/examples/DevelopersGuide/Charts/CalcHelper.java
deleted file mode 100644
index c9bac593..00000000
--- a/odk/examples/DevelopersGuide/Charts/CalcHelper.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import java.util.Random;
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-
-// factory for creating components
-import com.sun.star.comp.servicemanager.ServiceManager;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-
-// property access
-import com.sun.star.beans.*;
-
-// container access
-import com.sun.star.container.*;
-
-// application specific classes
-import com.sun.star.sheet.*;
-import com.sun.star.table.*;
-import com.sun.star.chart.*;
-import com.sun.star.text.XText;
-
-import com.sun.star.document.XEmbeddedObjectSupplier;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-// base graphics things
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-
-// Exceptions
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-
-// __________ Implementation __________
-
-/** Helper for accessing a calc document
- @author Bj&ouml;rn Milcke
- */
-public class CalcHelper
-{
- public CalcHelper( XSpreadsheetDocument aDoc )
- {
- maSpreadSheetDoc = aDoc;
- initSpreadSheet();
- }
-
- // ____________________
-
- public XSpreadsheet getChartSheet() throws RuntimeException
- {
- XNameAccess aSheetsNA = (XNameAccess) UnoRuntime.queryInterface(
- XNameAccess.class, maSpreadSheetDoc.getSheets() );
-
- XSpreadsheet aSheet = null;
- try
- {
- aSheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, aSheetsNA.getByName( msChartSheetName ) );
- }
- catch( NoSuchElementException ex )
- {
- System.out.println( "Couldn't find sheet with name " + msChartSheetName + ": " + ex );
- }
- catch( Exception ex )
- {}
-
- return aSheet;
- }
-
- // ____________________
-
- public XSpreadsheet getDataSheet() throws RuntimeException
- {
- XNameAccess aSheetsNA = (XNameAccess) UnoRuntime.queryInterface(
- XNameAccess.class, maSpreadSheetDoc.getSheets() );
-
- XSpreadsheet aSheet = null;
- if( aSheetsNA != null )
- {
- try
- {
- aSheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, aSheetsNA.getByName( msDataSheetName ) );
- }
- catch( NoSuchElementException ex )
- {
- System.out.println( "Couldn't find sheet with name " + msDataSheetName + ": " + ex );
- }
- catch( Exception ex )
- {}
- }
-
- return aSheet;
- }
-
- // ____________________
-
- /** Insert a chart using the given name as name of the OLE object and the range as correspoding
- range of data to be used for rendering. The chart is placed in the sheet for charts at
- position aUpperLeft extending as large as given in aExtent.
-
- The service name must be the name of a diagram service that can be instantiated via the
- factory of the chart document
- */
- public XChartDocument insertChart(
- String sChartName,
- CellRangeAddress aRange,
- Point aUpperLeft,
- Size aExtent,
- String sChartServiceName )
- {
- XChartDocument aResult = null;
- XTableChartsSupplier aSheet;
-
- // get the sheet to insert the chart
- try
- {
- aSheet = (XTableChartsSupplier) UnoRuntime.queryInterface(
- XTableChartsSupplier.class, getChartSheet() );
- }
- catch( Exception ex )
- {
- System.out.println( "Sheet not found" + ex );
- return aResult;
- }
-
- XTableCharts aChartCollection = aSheet.getCharts();
- XNameAccess aChartCollectionNA = (XNameAccess) UnoRuntime.queryInterface(
- XNameAccess.class, aChartCollection );
-
- if( aChartCollectionNA != null &&
- ! aChartCollectionNA.hasByName( sChartName ) )
- {
- Rectangle aRect = new Rectangle( aUpperLeft.X, aUpperLeft.Y, aExtent.Width, aExtent.Height );
-
- CellRangeAddress[] aAddresses = new CellRangeAddress[ 1 ];
- aAddresses[ 0 ] = aRange;
-
- // first bool: ColumnHeaders
- // second bool: RowHeaders
- aChartCollection.addNewByName( sChartName, aRect, aAddresses, true, false );
-
- try
- {
- XTableChart aTableChart = (XTableChart) UnoRuntime.queryInterface(
- XTableChart.class, aChartCollectionNA.getByName( sChartName ));
-
- // the table chart is an embedded object which contains the chart document
- aResult = (XChartDocument) UnoRuntime.queryInterface(
- XChartDocument.class,
- ((XEmbeddedObjectSupplier) UnoRuntime.queryInterface(
- XEmbeddedObjectSupplier.class,
- aTableChart )).getEmbeddedObject());
-
- // create a diagram via the factory and set this as new diagram
- aResult.setDiagram(
- (XDiagram) UnoRuntime.queryInterface(
- XDiagram.class,
- ((XMultiServiceFactory) UnoRuntime.queryInterface(
- XMultiServiceFactory.class,
- aResult )).createInstance( sChartServiceName )));
- }
- catch( NoSuchElementException ex )
- {
- System.out.println( "Couldn't find chart with name " + sChartName + ": " + ex );
- }
- catch( Exception ex )
- {}
- }
-
- return aResult;
- }
-
- // ____________________
-
- /** Fill a rectangular range with random numbers.
- The first column has increasing values
- */
- public XCellRange insertRandomRange( int nColumnCount, int nRowCount )
- {
- XCellRange aRange = null;
-
- // get the sheet to insert the chart
- try
- {
- XSpreadsheet aSheet = getDataSheet();
- XCellRange aSheetRange = (XCellRange) UnoRuntime.queryInterface( XCellRange.class, aSheet );
-
- aRange = aSheetRange.getCellRangeByPosition(
- 0, 0,
- nColumnCount - 1, nRowCount - 1 );
-
- int nCol, nRow;
- double fBase = 0.0;
- double fRange = 10.0;
- double fValue;
- Random aGenerator = new Random();
-
-
- for( nCol = 0; nCol < nColumnCount; nCol++ )
- {
- if( 0 == nCol )
- {
- (aSheet.getCellByPosition( nCol, 0 )).setFormula( "X" );
- }
- else
- {
- (aSheet.getCellByPosition( nCol, 0 )).setFormula( "Random " + nCol );
- }
-
- for( nRow = 1; nRow < nRowCount; nRow++ )
- {
- if( 0 == nCol )
- {
- // x values: ascending numbers
- fValue = (double)nRow + aGenerator.nextDouble();
- }
- else
- {
- fValue = fBase + ( aGenerator.nextGaussian() * fRange );
- }
-
- // put value into cell
-
- // note: getCellByPosition is a method at ...table.XCellRange which
- // the XSpreadsheet inherits via ...sheet.XSheetCellRange
- (aSheet.getCellByPosition( nCol, nRow )).setValue( fValue );
- }
- }
-
- }
- catch( Exception ex )
- {
- System.out.println( "Sheet not found" + ex );
- }
-
- return aRange;
- }
-
- // ____________________
-
- public XCellRange insertFormulaRange( int nColumnCount, int nRowCount )
- {
- XCellRange aRange = null;
-
- // get the sheet to insert the chart
- try
- {
- XSpreadsheet aSheet = getDataSheet();
- XCellRange aSheetRange = (XCellRange) UnoRuntime.queryInterface( XCellRange.class, aSheet );
-
- aRange = aSheetRange.getCellRangeByPosition(
- 0, 0,
- nColumnCount - 1, nRowCount - 1 );
-
- int nCol, nRow;
- double fValue;
- double fFactor = 2.0 * java.lang.Math.PI / (double)(nRowCount - 1);
- String aFormula;
-
- // set variable factor for cos formula
- int nFactorCol = nColumnCount + 2;
- (aSheet.getCellByPosition( nFactorCol - 1, 0 )).setValue( 0.2 );
-
- XText xCellText = (XText) UnoRuntime.queryInterface( XText.class, aSheet.getCellByPosition( nFactorCol - 1, 1 ) );
- xCellText.setString( "Change the factor above and\nwatch the changes in the chart" );
-
- for( nCol = 0; nCol < nColumnCount; nCol++ )
- {
- for( nRow = 0; nRow < nRowCount; nRow++ )
- {
- if( 0 == nCol )
- {
- // x values: ascending numbers
- fValue = (double)nRow * fFactor;
- (aSheet.getCellByPosition( nCol, nRow )).setValue( fValue );
- }
- else
- {
- aFormula = new String( "=" );
- if( nCol % 2 == 0 )
- aFormula += "SIN";
- else
- aFormula += "COS";
- aFormula += "(INDIRECT(ADDRESS(" + (nRow + 1) + ";1)))+RAND()*INDIRECT(ADDRESS(1;" + nFactorCol + "))";
- (aSheet.getCellByPosition( nCol, nRow )).setFormula( aFormula );
- }
- }
- }
-
- }
- catch( Exception ex )
- {
- System.out.println( "Sheet not found" + ex );
- }
-
- return aRange;
- }
-
- // ____________________
-
- /** Bring the sheet containing charts visually to the foreground
- */
- public void raiseChartSheet()
- {
- ((XSpreadsheetView) UnoRuntime.queryInterface(
- XSpreadsheetView.class,
- ((XModel) UnoRuntime.queryInterface(
- XModel.class,
- maSpreadSheetDoc )).getCurrentController()) ).setActiveSheet( getChartSheet() );
- }
-
-
- // __________ private members and methods __________
-
- private final String msDataSheetName = "Data";
- private final String msChartSheetName = "Chart";
-
- private XSpreadsheetDocument maSpreadSheetDoc;
-
-
- // ____________________
-
- /** create two sheets, one for data and one for charts in the document
- */
- private void initSpreadSheet()
- {
- if( maSpreadSheetDoc != null )
- {
- XSpreadsheets aSheets = maSpreadSheetDoc.getSheets();
- XNameContainer aSheetsNC = (XNameContainer) UnoRuntime.queryInterface(
- XNameContainer.class, aSheets );
- XIndexAccess aSheetsIA = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, aSheets );
-
- if( aSheets != null &&
- aSheetsNC != null &&
- aSheetsIA != null )
- {
- try
- {
- // remove all sheets except one
- for( int i = aSheetsIA.getCount() - 1; i > 0; i-- )
- {
- aSheetsNC.removeByName(
- ( (XNamed) UnoRuntime.queryInterface(
- XNamed.class, aSheetsIA.getByIndex( i ) )).getName() );
- }
-
- XNamed aFirstSheet = (XNamed) UnoRuntime.queryInterface(
- XNamed.class,
- aSheetsIA.getByIndex( 0 ));
-
- // first sheet becomes data sheet
- aFirstSheet.setName( msDataSheetName );
-
- // second sheet becomes chart sheet
- aSheets.insertNewByName( msChartSheetName, (short)1 );
- }
- catch( Exception ex )
- {
- System.out.println( "Couldn't initialize Spreadsheet Document: " + ex );
- }
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Charts/ChartHelper.java b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
deleted file mode 100644
index 5d44dc03..00000000
--- a/odk/examples/DevelopersGuide/Charts/ChartHelper.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Any;
-
-// factory for creating components
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XComponent;
-import com.sun.star.beans.XPropertySet;
-
-// application specific classes
-import com.sun.star.chart.XChartDocument;
-import com.sun.star.chart.XDiagram;
-import com.sun.star.drawing.*;
-import com.sun.star.frame.XModel;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XText;
-//import com.sun.star.text.VertOrientation;
-//import com.sun.star.text.HoriOrientation;
-import com.sun.star.document.XEmbeddedObjectSupplier;
-
-// base graphics things
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-// Exceptions
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-
-// __________ Implementation __________
-
-/** Helper for creating an OLE chart
- @author Bj&ouml;rn Milcke
- */
-public class ChartHelper
-{
- public ChartHelper( XModel aContainerDoc )
- {
- maContainerDocument = aContainerDoc;
- }
-
- public XChartDocument insertOLEChartInWriter(
- String sChartName,
- Point aUpperLeft,
- Size aExtent,
- String sChartServiceName )
- {
- XChartDocument aResult = null;
-
- XMultiServiceFactory aFact = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class,
- maContainerDocument );
-
- if( aFact != null )
- {
- try
- {
- XTextContent xTextContent = (XTextContent)UnoRuntime.queryInterface(
- XTextContent.class,
- aFact.createInstance("com.sun.star.text.TextEmbeddedObject"));
-
- if ( xTextContent != null )
- {
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xTextContent);
-
- Any aAny = new Any(String.class, msChartClassID);
- xPropSet.setPropertyValue("CLSID", aAny );
-
- XTextDocument xTextDoc = (XTextDocument)
- UnoRuntime.queryInterface(XTextDocument.class,
- maContainerDocument);
- XText xText = xTextDoc.getText();
- XTextCursor xCursor = xText.createTextCursor();
-
- //insert embedded object in text -> object will be created
- xText.insertTextContent( xCursor, xTextContent, true );
-
- // set size and position
- XShape xShape = (XShape)UnoRuntime.queryInterface(
- XShape.class, xTextContent);
- xShape.setSize( aExtent );
-
- aAny = new Any(Short.class,
- new Short(com.sun.star.text.VertOrientation.NONE));
- xPropSet.setPropertyValue("VertOrient", aAny );
- aAny = new Any(Short.class,
- new Short(com.sun.star.text.HoriOrientation.NONE));
- xPropSet.setPropertyValue("HoriOrient", aAny );
- aAny = new Any(Integer.class, new Integer(aUpperLeft.Y));
- xPropSet.setPropertyValue("VertOrientPosition", aAny );
- aAny = new Any(Integer.class, new Integer(aUpperLeft.X));
- xPropSet.setPropertyValue("HoriOrientPosition", aAny );
-
- // retrieve the chart document as model of the OLE shape
- aResult = (XChartDocument) UnoRuntime.queryInterface(
- XChartDocument.class,
- xPropSet.getPropertyValue( "Model" ));
-
- // create a diagram via the factory and set this as
- // new diagram
- aResult.setDiagram(
- (XDiagram) UnoRuntime.queryInterface(
- XDiagram.class,
- ((XMultiServiceFactory) UnoRuntime.queryInterface(
- XMultiServiceFactory.class,
- aResult )).createInstance(sChartServiceName )));
- }
- } catch( Exception ex)
- {
- System.out.println( "caught exception: " + ex );
- }
- }
-
- return aResult;
- }
-
- public XChartDocument insertOLEChartInDraw(
- String sChartName,
- Point aUpperLeft,
- Size aExtent,
- String sChartServiceName )
- {
- XChartDocument aResult = null;
-
- XShapes aPage = null;
-
- // try interface for multiple pages in a document
- XDrawPagesSupplier aSupplier = (XDrawPagesSupplier)
- UnoRuntime.queryInterface(XDrawPagesSupplier.class,
- maContainerDocument );
-
- if( aSupplier != null )
- {
- try
- {
- // get first page
- aPage = (XShapes) UnoRuntime.queryInterface(
- XShapes.class, aSupplier.getDrawPages().getByIndex( 0 ) );
- }
- catch( Exception ex )
- {
- System.out.println( "First page not found in shape collection: " +
- ex );
- }
- }
- else
- {
- // try interface for single draw page (e.g. spreadsheet)
- XDrawPageSupplier aOnePageSupplier = (XDrawPageSupplier)
- UnoRuntime.queryInterface(XDrawPageSupplier.class,
- maContainerDocument );
-
- if( aOnePageSupplier != null )
- {
- aPage = (XShapes) UnoRuntime.queryInterface(
- XShapes.class, aOnePageSupplier.getDrawPage());
- }
- }
-
- if( aPage != null )
- {
- XMultiServiceFactory aFact = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class,
- maContainerDocument );
-
- if( aFact != null )
- {
- try
- {
- // create an OLE shape
- XShape aShape = (XShape) UnoRuntime.queryInterface(
- XShape.class,
- aFact.createInstance( "com.sun.star.drawing.OLE2Shape" ));
-
- // insert the shape into the page
- aPage.add( aShape );
- aShape.setPosition( aUpperLeft );
- aShape.setSize( aExtent );
-
- // make the OLE shape a chart
- XPropertySet aShapeProp = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, aShape );
- if( aShapeProp != null )
- {
- // set the class id for charts
- aShapeProp.setPropertyValue( "CLSID", msChartClassID );
-
- // retrieve the chart document as model of the OLE shape
- aResult = (XChartDocument) UnoRuntime.queryInterface(
- XChartDocument.class,
- aShapeProp.getPropertyValue( "Model" ));
-
- // create a diagram via the factory and set this as
- // new diagram
- aResult.setDiagram(
- (XDiagram) UnoRuntime.queryInterface(
- XDiagram.class,
- ((XMultiServiceFactory) UnoRuntime.queryInterface(
- XMultiServiceFactory.class,
- aResult )).createInstance(sChartServiceName )));
- }
- }
- catch( Exception ex )
- {
- System.out.println( "Couldn't change the OLE shape into a chart: " + ex );
- }
- }
- }
-
- return aResult;
- }
-
-
- // __________ private members and methods __________
-
- private final String msChartClassID = "12dcae26-281f-416f-a234-c3086127382e";
-
- private XModel maContainerDocument;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
deleted file mode 100644
index 44ae4603..00000000
--- a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-
-// property access
-import com.sun.star.beans.*;
-
-// application specific classes
-import com.sun.star.chart.*;
-import com.sun.star.drawing.*;
-
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.table.XCellRange;
-import com.sun.star.sheet.XCellRangeAddressable;
-
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
-// base graphics things
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
-
-
-// __________ Implementation __________
-
-/** Create a spreadsheet add some data and add a chart
- @author Bj&ouml;rn Milcke
- */
-public class ChartInCalc
-{
- // ____________________
-
- public static void main( String args[] )
- {
- Helper aHelper = new Helper( args );
-
- CalcHelper aCalcHelper = new CalcHelper( aHelper.createSpreadsheetDocument() );
-
- // insert a cell range with 4 columns and 24 rows filled with random numbers
- XCellRange aRange = aCalcHelper.insertRandomRange( 4, 24 );
- CellRangeAddress aRangeAddress = ((XCellRangeAddressable) UnoRuntime.queryInterface(
- XCellRangeAddressable.class, aRange)).getRangeAddress();
-
- // change view to sheet containing the chart
- aCalcHelper.raiseChartSheet();
-
- // the unit for measures is 1/100th of a millimeter
- // position at (1cm, 1cm)
- Point aPos = new Point( 1000, 1000 );
-
- // size of the chart is 15cm x 9.271cm
- Size aExtent = new Size( 15000, 9271 );
-
- // insert a new chart into the "Chart" sheet of the
- // spreadsheet document
- XChartDocument aChartDoc = aCalcHelper.insertChart(
- "ScatterChart",
- aRangeAddress,
- aPos,
- aExtent,
- "com.sun.star.chart.XYDiagram" );
-
- // instantiate test class with newly created chart
- ChartInCalc aTest = new ChartInCalc( aChartDoc );
-
- try
- {
- aTest.lockControllers();
-
- aTest.testDiagram();
- aTest.testArea();
- aTest.testWall();
- aTest.testTitle();
- aTest.testAxis();
- aTest.testGrid();
-
- // show an intermediate state, ...
- aTest.unlockControllers();
- aTest.lockControllers();
-
- // ..., because the following takes a while:
- // an internet URL has to be resolved
- aTest.testDataRowProperties();
- aTest.testDataPointProperties();
-
- aTest.unlockControllers();
- }
- catch( Exception ex )
- {
- System.out.println( "UNO Exception caught: " + ex );
- System.out.println( "Message: " + ex.getMessage() );
- }
-
- System.exit( 0 );
- }
-
-
- // ________________________________________
-
- public ChartInCalc( XChartDocument aChartDoc )
- {
- maChartDocument = aChartDoc;
- maDiagram = maChartDocument.getDiagram();
- }
-
- // ____________________
-
- public void lockControllers()
- throws RuntimeException
- {
- ((XModel) UnoRuntime.queryInterface( XModel.class, maChartDocument )).lockControllers();
- }
-
- // ____________________
-
- public void unlockControllers()
- throws RuntimeException
- {
- ((XModel) UnoRuntime.queryInterface( XModel.class, maChartDocument )).unlockControllers();
- }
-
- // ____________________
-
- public void testDiagram()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XPropertySet aDiaProp = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, maDiagram );
-
- if( aDiaProp != null )
- {
- // change chart type
- aDiaProp.setPropertyValue( "Lines", new Boolean( true ));
-
- // change attributes for all series
- // set line width to 0.5mm
- aDiaProp.setPropertyValue( "LineWidth", new Integer( 50 ));
- }
- }
-
- // ____________________
-
- public void testDataRowProperties()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- // change properties of the data series
- try
- {
- XPropertySet aSeriesProp;
- for( int i = 1; i <= 3; i++ )
- {
- aSeriesProp = maDiagram.getDataRowProperties( i );
- aSeriesProp.setPropertyValue( "LineColor", new Integer(
- 0x400000 * i +
- 0x005000 * i +
- 0x0000ff - 0x40 * i ));
- if( 1 == i )
- {
- StringBuffer sUrl = new StringBuffer("file:///");
- try {
- /* for use without net it's easier to load a local graphic */
- java.io.File sourceFile = new java.io.File("bullet.gif");
- sUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
- } catch (java.io.IOException e) {
- sUrl = new StringBuffer("http://graphics.openoffice.org/chart/bullet1.gif");
- }
-
- // set a bitmap via URL as symbol for the first series
- aSeriesProp.setPropertyValue( "SymbolType", new Integer( ChartSymbolType.BITMAPURL ));
- aSeriesProp.setPropertyValue( "SymbolBitmapURL", sUrl.toString() );
- }
- else
- {
- aSeriesProp.setPropertyValue( "SymbolType", new Integer( ChartSymbolType.SYMBOL1 ));
- aSeriesProp.setPropertyValue( "SymbolSize", new Size( 250, 250 ));
- }
- }
- }
- catch( IndexOutOfBoundsException ex )
- {
- System.out.println( "Oops, there not enough series for setting properties: " + ex );
- }
- }
-
- // ____________________
-
- public void testDataPointProperties()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- // set properties for a single data point
- try
- {
- // determine the maximum value of the first series
- int nMaxIndex = 0;
-
- XChartDataArray aDataArray = (XChartDataArray) UnoRuntime.queryInterface(
- XChartDataArray.class, maChartDocument.getData());
- double aData[][] = aDataArray.getData();
-
- int i;
- double fMax = aData[ 0 ][ 1 ];
- for( i = 1; i < aData.length; i++ )
- {
- if( aData[ i ][ 1 ] > fMax )
- {
- fMax = aData[ i ][ 1 ];
- nMaxIndex = i;
- }
- }
-
- // first parameter is the index of the point, the second one is the series
- XPropertySet aPointProp = maDiagram.getDataPointProperties( 0, 1 );
-
- // set a different, larger symbol
- aPointProp.setPropertyValue( "SymbolType", new Integer( ChartSymbolType.SYMBOL6 ));
- aPointProp.setPropertyValue( "SymbolSize", new Size( 600, 600 ));
-
- // add a label text with bold font, bordeaux red 14pt
- aPointProp.setPropertyValue( "DataCaption", new Integer( ChartDataCaption.VALUE ));
- aPointProp.setPropertyValue( "CharHeight", new Float( 14.0 ));
- aPointProp.setPropertyValue( "CharColor", new Integer( 0x993366 ));
- aPointProp.setPropertyValue( "CharWeight", new Float( FontWeight.BOLD ));
- }
- catch( IndexOutOfBoundsException ex )
- {
- System.out.println( "Oops, there not enough data points or series for setting properties: " + ex );
- }
- }
-
- // ____________________
-
- public void testArea()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XPropertySet aArea = maChartDocument.getArea();
-
- if( aArea != null )
- {
- // change background color of entire chart
- aArea.setPropertyValue( "FillStyle", FillStyle.SOLID );
- aArea.setPropertyValue( "FillColor", new Integer( 0xeeeeee ));
- }
- }
-
- // ____________________
-
- public void testWall()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XPropertySet aWall = ((X3DDisplay) UnoRuntime.queryInterface(
- X3DDisplay.class, maDiagram )).getWall();
-
- // change background color of area
- aWall.setPropertyValue( "FillStyle", FillStyle.SOLID );
- aWall.setPropertyValue( "FillColor", new Integer( 0xcccccc ));
- }
-
- // ____________________
-
- public void testTitle()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- // change main title
- XPropertySet aDocProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument );
- aDocProp.setPropertyValue( "HasMainTitle", new Boolean( true ));
-
- XShape aTitle = maChartDocument.getTitle();
- XPropertySet aTitleProp = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aTitle );
-
- // set new text
- if( aTitleProp != null )
- {
- aTitleProp.setPropertyValue( "String", "Random Scatter Chart" );
- aTitleProp.setPropertyValue( "CharHeight", new Float(14.0) );
- }
-
- // align title with y axis
- XShape aAxis = (XShape) UnoRuntime.queryInterface(
- XShape.class, ((XAxisYSupplier) UnoRuntime.queryInterface(
- XAxisYSupplier.class, maDiagram )).getYAxis() );
-
- if( aAxis != null &&
- aTitle != null )
- {
- Point aPos = aTitle.getPosition();
- aPos.X = ( aAxis.getPosition() ).X;
- aTitle.setPosition( aPos );
- }
- }
-
- // ____________________
-
- public void testAxis()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException,
- MalformedNumberFormatException
- {
- // x axis
- XPropertySet aAxisProp = ((XAxisXSupplier) UnoRuntime.queryInterface(
- XAxisXSupplier.class, maDiagram )).getXAxis();
- if( aAxisProp != null )
- {
- aAxisProp.setPropertyValue( "Max", new Integer( 24 ));
- aAxisProp.setPropertyValue( "StepMain", new Integer( 3 ));
- }
-
- // change number format for y axis
- aAxisProp = ((XAxisYSupplier) UnoRuntime.queryInterface(
- XAxisYSupplier.class, maDiagram )).getYAxis();
-
- // add a new custom number format and get the new key
- int nNewNumberFormat = 0;
- XNumberFormatsSupplier aNumFmtSupp = (XNumberFormatsSupplier) UnoRuntime.queryInterface(
- XNumberFormatsSupplier.class, maChartDocument );
-
- if( aNumFmtSupp != null )
- {
- XNumberFormats aFormats = aNumFmtSupp.getNumberFormats();
- Locale aLocale = new Locale( "de", "DE", "de" );
-
- String aFormatStr = aFormats.generateFormat( nNewNumberFormat, aLocale, true, true, (short)3, (short)1 );
- nNewNumberFormat = aFormats.addNew( aFormatStr, aLocale );
- }
-
- if( aAxisProp != null )
- {
- aAxisProp.setPropertyValue( "NumberFormat", new Integer( nNewNumberFormat ));
- }
- }
-
- // ____________________
-
- public void testGrid()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- // y major grid
- XPropertySet aGridProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class,
- ( (XAxisYSupplier) UnoRuntime.queryInterface(
- XAxisYSupplier.class, maDiagram )).getYMainGrid());
-
- if( aGridProp != null )
- {
- LineDash aDash = new LineDash();
- aDash.Style = DashStyle.ROUND;
- aDash.Dots = 2;
- aDash.DotLen = 10;
- aDash.Dashes = 1;
- aDash.DashLen = 200;
- aDash.Distance = 100;
-
- aGridProp.setPropertyValue( "LineColor", new Integer( 0x999999 ));
- aGridProp.setPropertyValue( "LineStyle", LineStyle.DASH );
- aGridProp.setPropertyValue( "LineDash", aDash );
- aGridProp.setPropertyValue( "LineWidth", new Integer( 30 ));
- }
- }
-
-
- // ______________________________
- //
- // private members
- // ______________________________
-
- private XChartDocument maChartDocument;
- private XDiagram maDiagram;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
deleted file mode 100644
index ed21c900..00000000
--- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-
-// property access
-import com.sun.star.beans.*;
-
-// application specific classes
-import com.sun.star.chart.*;
-import com.sun.star.drawing.*;
-
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
-// base graphics things
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
-
-
-// __________ Implementation __________
-
-/** Create a spreadsheet add some data and add a chart
- @author Bj&ouml;rn Milcke
- */
-public class ChartInDraw
-{
- // ____________________
-
- public static void main( String args[] )
- {
- Helper aHelper = new Helper( args );
-
- ChartHelper aChartHelper = new ChartHelper( aHelper.createDrawingDocument());
-
- // the unit for measures is 1/100th of a millimeter
- // position at (1cm, 1cm)
- Point aPos = new Point( 1000, 1000 );
-
- // size of the chart is 15cm x 12cm
- Size aExtent = new Size( 15000, 13000 );
-
- // insert a new chart into the "Chart" sheet of the
- // spreadsheet document
- XChartDocument aChartDoc = aChartHelper.insertOLEChartInDraw(
- "BarChart",
- aPos,
- aExtent,
- "com.sun.star.chart.BarDiagram" );
-
- // instantiate test class with newly created chart
- ChartInDraw aTest = new ChartInDraw( aChartDoc );
-
- try
- {
- aTest.lockControllers();
-
- aTest.testArea();
- aTest.testWall();
- aTest.testTitle();
- aTest.testLegend();
- aTest.testThreeD();
-
- aTest.unlockControllers();
- }
- catch( Exception ex )
- {
- System.out.println( "UNO Exception caught: " + ex );
- System.out.println( "Message: " + ex.getMessage() );
- }
-
- System.exit( 0 );
- }
-
-
- // ________________________________________
-
- public ChartInDraw( XChartDocument aChartDoc )
- {
- maChartDocument = aChartDoc;
- maDiagram = maChartDocument.getDiagram();
- }
-
- // ____________________
-
- public void lockControllers()
- throws RuntimeException
- {
- ((XModel) UnoRuntime.queryInterface( XModel.class, maChartDocument )).lockControllers();
- }
-
- // ____________________
-
- public void unlockControllers()
- throws RuntimeException
- {
- ((XModel) UnoRuntime.queryInterface( XModel.class, maChartDocument )).unlockControllers();
- }
-
- // ____________________
-
- public void testArea()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XPropertySet aArea = maChartDocument.getArea();
-
- if( aArea != null )
- {
- // change background color of entire chart
- aArea.setPropertyValue( "FillStyle", FillStyle.SOLID );
- aArea.setPropertyValue( "FillColor", new Integer( 0xeeeeee ));
- }
- }
-
- // ____________________
-
- public void testWall()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XPropertySet aWall = ((X3DDisplay) UnoRuntime.queryInterface(
- X3DDisplay.class, maDiagram )).getWall();
-
- // change background color of area
- aWall.setPropertyValue( "FillColor", new Integer( 0xcccccc ));
- aWall.setPropertyValue( "FillStyle", FillStyle.SOLID );
- }
-
- // ____________________
-
- public void testTitle()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- // change main title
- XPropertySet aDocProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument );
- aDocProp.setPropertyValue( "HasMainTitle", new Boolean( true ));
-
- XShape aTitle = maChartDocument.getTitle();
- XPropertySet aTitleProp = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aTitle );
-
- // set new text
- if( aTitleProp != null )
- {
- aTitleProp.setPropertyValue( "String", "Bar Chart in a Draw Document" );
- }
- }
-
- // ____________________
-
- public void testLegend()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XShape aLegend = maChartDocument.getLegend();
- XPropertySet aLegendProp = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, aLegend );
-
- aLegendProp.setPropertyValue( "Alignment", ChartLegendPosition.LEFT );
- aLegendProp.setPropertyValue( "FillStyle", FillStyle.SOLID );
- aLegendProp.setPropertyValue( "FillColor", new Integer( 0xeeddee ));
- }
-
- // ____________________
-
- public void testThreeD()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException,
- com.sun.star.lang.IndexOutOfBoundsException
- {
- XPropertySet aDiaProp = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, maDiagram );
- Boolean aTrue = new Boolean( true );
-
- aDiaProp.setPropertyValue( "Dim3D", aTrue );
- aDiaProp.setPropertyValue( "Deep", aTrue );
- // from Chart3DBarProperties:
- aDiaProp.setPropertyValue( "SolidType", new Integer( ChartSolidType.CYLINDER ));
-
- // change floor color to Magenta6
- XPropertySet aFloor = ((X3DDisplay) UnoRuntime.queryInterface(
- X3DDisplay.class, maDiagram )).getFloor();
- aFloor.setPropertyValue( "FillColor", new Integer( 0x6b2394 ));
-
- // apply changes to get a 3d scene
- unlockControllers();
- lockControllers();
-
-
- // rotate scene to a different angle
- HomogenMatrix aMatrix = new HomogenMatrix();
- HomogenMatrixLine aLines[] = new HomogenMatrixLine[]
- {
- new HomogenMatrixLine( 1.0, 0.0, 0.0, 0.0 ),
- new HomogenMatrixLine( 0.0, 1.0, 0.0, 0.0 ),
- new HomogenMatrixLine( 0.0, 0.0, 1.0, 0.0 ),
- new HomogenMatrixLine( 0.0, 0.0, 0.0, 1.0 )
- };
-
- aMatrix.Line1 = aLines[ 0 ];
- aMatrix.Line2 = aLines[ 1 ];
- aMatrix.Line3 = aLines[ 2 ];
- aMatrix.Line4 = aLines[ 3 ];
-
- // rotate 10 degrees along the x axis
- double fAngle = 10.0;
- double fCosX = java.lang.Math.cos( java.lang.Math.PI / 180.0 * fAngle );
- double fSinX = java.lang.Math.sin( java.lang.Math.PI / 180.0 * fAngle );
-
- // rotate -20 degrees along the y axis
- fAngle = -20.0;
- double fCosY = java.lang.Math.cos( java.lang.Math.PI / 180.0 * fAngle );
- double fSinY = java.lang.Math.sin( java.lang.Math.PI / 180.0 * fAngle );
-
- // rotate -5 degrees along the z axis
- fAngle = -5.0;
- double fCosZ = java.lang.Math.cos( java.lang.Math.PI / 180.0 * fAngle );
- double fSinZ = java.lang.Math.sin( java.lang.Math.PI / 180.0 * fAngle );
-
- aMatrix.Line1.Column1 = fCosY * fCosZ;
- aMatrix.Line1.Column2 = fCosY * -fSinZ;
- aMatrix.Line1.Column3 = fSinY;
-
- aMatrix.Line2.Column1 = fSinX * fSinY * fCosZ + fCosX * fSinZ;
- aMatrix.Line2.Column2 = -fSinX * fSinY * fSinZ + fCosX * fCosZ;
- aMatrix.Line2.Column3 = -fSinX * fCosY;
-
- aMatrix.Line3.Column1 = -fCosX * fSinY * fCosZ + fSinX * fSinZ;
- aMatrix.Line3.Column2 = fCosX * fSinY * fSinZ + fSinX * fCosZ;
- aMatrix.Line3.Column3 = fCosX * fCosY;
-
- aDiaProp.setPropertyValue( "D3DTransformMatrix", aMatrix );
-
- // add a red light source
-
- // in a chart by default only the second (non-specular) light source is switched on
- // light source 1 is a specular light source
- aDiaProp.setPropertyValue( "D3DSceneLightColor1", new Integer( 0xff3333 ));
-
- // set direction
- com.sun.star.drawing.Direction3D aDirection = new com.sun.star.drawing.Direction3D();
-
- aDirection.DirectionX = -0.75;
- aDirection.DirectionY = 0.5;
- aDirection.DirectionZ = 0.5;
-
- aDiaProp.setPropertyValue( "D3DSceneLightDirection1", aDirection );
- aDiaProp.setPropertyValue( "D3DSceneLightOn1", new Boolean( true ));
- }
-
- // ______________________________
- //
- // private members
- // ______________________________
-
- private XChartDocument maChartDocument;
- private XDiagram maDiagram;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java
deleted file mode 100644
index 22108393..00000000
--- a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-
-// property access
-import com.sun.star.beans.*;
-
-// application specific classes
-import com.sun.star.chart.*;
-import com.sun.star.drawing.*;
-import com.sun.star.text.XTextDocument;
-
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
-// base graphics things
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
-
-
-// __________ Implementation __________
-
-/** Test to create a writer document and insert an OLE Chart.
-
- Be careful! This does not really work. The Writer currently has no
- interface for dealing with OLE objects. You can add an OLE shape to the
- Writer's drawing layer, but it is not treated correctly as OLE object.
- Thus, you can not activate the chart by double-clicking. The office may
- also crash when the document is closed!
-
- @author Bj&ouml;rn Milcke
- */
-public class ChartInWriter
-{
- // ____________________
-
- public static void main( String args[] )
- {
- Helper aHelper = new Helper( args );
-
- ChartHelper aChartHelper = new ChartHelper(
- (XModel) UnoRuntime.queryInterface( XModel.class,
- aHelper.createTextDocument()));
-
- // the unit for measures is 1/100th of a millimeter
- // position at (1cm, 1cm)
- Point aPos = new Point( 1000, 1000 );
-
- // size of the chart is 15cm x 12cm
- Size aExtent = new Size( 15000, 13000 );
-
- // insert a new chart into the "Chart" sheet of the
- // spreadsheet document
- XChartDocument aChartDoc = aChartHelper.insertOLEChartInWriter(
- "BarChart",
- aPos,
- aExtent,
- "com.sun.star.chart.AreaDiagram" );
-
- // instantiate test class with newly created chart
- ChartInWriter aTest = new ChartInWriter( aChartDoc );
-
- try
- {
- aTest.lockControllers();
-
- // do tests here
- aTest.testWall();
-
- aTest.unlockControllers();
- }
- catch( Exception ex )
- {
- System.out.println( "UNO Exception caught: " + ex );
- System.out.println( "Message: " + ex.getMessage() );
- }
-
- System.exit( 0 );
- }
-
-
- // ________________________________________
-
- public ChartInWriter( XChartDocument aChartDoc )
- {
- maChartDocument = aChartDoc;
- maDiagram = maChartDocument.getDiagram();
- }
-
- // ____________________
-
- public void lockControllers()
- throws RuntimeException
- {
- ((XModel) UnoRuntime.queryInterface( XModel.class, maChartDocument )).lockControllers();
- }
-
- // ____________________
-
- public void unlockControllers()
- throws RuntimeException
- {
- ((XModel) UnoRuntime.queryInterface( XModel.class, maChartDocument )).unlockControllers();
- }
-
- // ____________________
-
- public void testWall()
- throws RuntimeException, UnknownPropertyException, PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException, WrappedTargetException
- {
- XPropertySet aWall = ((X3DDisplay) UnoRuntime.queryInterface(
- X3DDisplay.class, maDiagram )).getWall();
-
- // change background color of area
- aWall.setPropertyValue( "FillColor", new Integer( 0xeecc99 ));
- aWall.setPropertyValue( "FillStyle", FillStyle.SOLID );
- }
-
- // ______________________________
- //
- // private members
- // ______________________________
-
- private XChartDocument maChartDocument;
- private XDiagram maDiagram;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/Helper.java b/odk/examples/DevelopersGuide/Charts/Helper.java
deleted file mode 100644
index cae86ca2..00000000
--- a/odk/examples/DevelopersGuide/Charts/Helper.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import java.util.Random;
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.*;
-
-// factory for creating components
-import com.sun.star.comp.servicemanager.ServiceManager;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-
-// property access
-import com.sun.star.beans.*;
-
-// container access
-import com.sun.star.container.*;
-
-// application specific classes
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.text.XTextDocument;
-
-import com.sun.star.document.XEmbeddedObjectSupplier;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-// Exceptions
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-
-// __________ Implementation __________
-
-/** Helper for creating a calc document adding cell values and charts
- @author Bj&ouml;rn Milcke
- */
-public class Helper
-{
- public Helper( String[] args )
- {
- // connect to a running office and get the ServiceManager
- try {
- // get the remote office component context
- maContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- maMCFactory = maContext.getServiceManager();
- }
- catch( Exception e) {
- System.out.println( "Couldn't get ServiceManager: " + e );
- e.printStackTrace();
- System.exit(1);
- }
- }
-
- // ____________________
-
- public XSpreadsheetDocument createSpreadsheetDocument()
- {
- return (XSpreadsheetDocument) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, createDocument( "scalc" ));
- }
-
- // ____________________
-
- public XModel createPresentationDocument()
- {
- return createDocument( "simpress" );
- }
-
- // ____________________
-
- public XModel createDrawingDocument()
- {
- return createDocument( "sdraw" );
- }
-
- // ____________________
-
- public XModel createTextDocument()
- {
- return createDocument( "swriter" );
- }
-
- // ____________________
-
- public XModel createDocument( String sDocType )
- {
- XModel aResult = null;
- try
- {
- XComponentLoader aLoader = (XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class,
- maMCFactory.createInstanceWithContext("com.sun.star.frame.Desktop",
- maContext) );
-
- aResult = (XModel) UnoRuntime.queryInterface(
- XModel.class,
- aLoader.loadComponentFromURL( "private:factory/" + sDocType,
- "_blank",
- 0,
- new PropertyValue[ 0 ] ) );
- }
- catch( Exception e )
- {
- System.err.println("Couldn't create Document of type "+ sDocType +": "+e);
- e.printStackTrace();
- System.exit( 0 );
- }
-
- return aResult;
- }
-
- public XComponentContext getComponentContext(){
- return maContext;
-
- }
-
- // __________ private members and methods __________
-
- private final String msDataSheetName = "Data";
- private final String msChartSheetName = "Chart";
- private final String msChartName = "SampleChart";
-
- private XComponentContext maContext;
- private XMultiComponentFactory maMCFactory;
- private XSpreadsheetDocument maSpreadSheetDoc;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components
deleted file mode 100644
index e9a7baa4..00000000
--- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="JavaSampleChartAddIn.uno.jar">
- <implementation name="JavaSampleChartAddIn">
- <service name="com.sun.star.comp.Chart.JavaSampleChartAddIn"/>
- <service name="com.sun.star.chart.Diagram"/>
- <service name="com.sun.star.chart.ChartAxisYSupplier"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
deleted file mode 100644
index fe599c13..00000000
--- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.lib.uno.helper.WeakBase;
-
-// factories
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-// graphics stuff
-import com.sun.star.drawing.*;
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.Size;
-
-// chart stuff
-import com.sun.star.chart.*;
-
-// property access
-import com.sun.star.beans.*;
-
-// Add-In stuff
-import com.sun.star.lang.XInitialization;
-import com.sun.star.util.XRefreshable;
-import com.sun.star.lang.XServiceName;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XTypeProvider;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-
-import javax.swing.JOptionPane;
-
-public class JavaSampleChartAddIn extends WeakBase implements
- XInitialization,
- XRefreshable,
- XDiagram,
- XServiceName,
- XServiceInfo
-{
- public JavaSampleChartAddIn()
- {}
-
- // __________ interface methods __________
-
- // XInitialization
- public void initialize( Object[] aArguments )
- throws Exception, RuntimeException
- {
- if( aArguments.length > 0 )
- {
- maChartDocument = (XChartDocument) UnoRuntime.queryInterface(
- XChartDocument.class, aArguments[ 0 ]);
-
- XPropertySet aDocProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument );
- if( aDocProp != null )
- {
- // set base diagram which will be extended in refresh()
- aDocProp.setPropertyValue( "BaseDiagram", "com.sun.star.chart.XYDiagram" );
- }
-
- // get the draw page
- XDrawPageSupplier aPageSupp = (XDrawPageSupplier) UnoRuntime.queryInterface(
- XDrawPageSupplier.class, maChartDocument );
- if( aPageSupp != null )
- maDrawPage = (XDrawPage) UnoRuntime.queryInterface(
- XDrawPage.class, aPageSupp.getDrawPage() );
-
- // get a factory for creating shapes
- maShapeFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(
- XMultiServiceFactory.class, maChartDocument );
- }
- }
-
- // XRefreshable
- public void refresh() throws RuntimeException
- {
- // recycle shapes in first call, if document was loaded
- if( maBottomLine == null ||
- maTopLine == null )
- {
- // try to recycle loaded shapes
- XPropertySet aDocProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument );
- if( aDocProp != null )
- {
- try
- {
- XIndexAccess aShapesIA = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, aDocProp.getPropertyValue( "AdditionalShapes" ));
- if( aShapesIA != null &&
- aShapesIA.getCount() > 0 )
- {
- XShape aShape;
- String aName;
- for( int i = aShapesIA.getCount() - 1; i >= 0; --i )
- {
- aShape = (XShape) UnoRuntime.queryInterface(
- XShape.class, aShapesIA.getByIndex( i ));
- if( aShape != null )
- {
- XPropertySet aProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, aShape );
- aName = (String) aProp.getPropertyValue( "Name" );
-
- if( aName.equals( "top" ))
- {
- maTopLine = aShape;
- }
- else if( aName.equals( "bottom" ))
- {
- maBottomLine = aShape;
- }
- }
- }
- }
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( null, ex, "Exception caught", JOptionPane.WARNING_MESSAGE );
- }
- }
- }
-
- // create top line if it does not yet exist
- try
- {
- if( maTopLine == null )
- {
- maTopLine = (XShape) UnoRuntime.queryInterface(
- XShape.class, maShapeFactory.createInstance( "com.sun.star.drawing.LineShape" ));
- maDrawPage.add( maTopLine );
-
- // make line red and thicker
- XPropertySet aShapeProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maTopLine );
-
- aShapeProp.setPropertyValue( "LineColor", new Integer( 0xe01010 ));
- aShapeProp.setPropertyValue( "LineWidth", new Integer( 50 ));
- aShapeProp.setPropertyValue( "Name", "top" );
- }
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( null, ex, "Exception caught", JOptionPane.WARNING_MESSAGE );
- }
-
- // create bottom line if it does not yet exist
- try
- {
- if( maBottomLine == null )
- {
- maBottomLine = (XShape) UnoRuntime.queryInterface(
- XShape.class, maShapeFactory.createInstance( "com.sun.star.drawing.LineShape" ));
- maDrawPage.add( maBottomLine );
-
- // make line green and thicker
- XPropertySet aShapeProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maBottomLine );
-
- aShapeProp.setPropertyValue( "LineColor", new Integer( 0x10e010 ));
- aShapeProp.setPropertyValue( "LineWidth", new Integer( 50 ));
- aShapeProp.setPropertyValue( "Name", "bottom" );
- }
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( null, ex, "Exception caught", JOptionPane.WARNING_MESSAGE );
- }
-
- if( maTopLine == null ||
- maBottomLine == null )
- {
- JOptionPane.showMessageDialog( null, "One of the lines is still null", "Assertion", JOptionPane.WARNING_MESSAGE );
- return;
- }
-
- // position lines
- // --------------
-
- // get data
- XChartDataArray aDataArray = (XChartDataArray) UnoRuntime.queryInterface(
- XChartDataArray.class, maChartDocument.getData());
- double aData[][] = aDataArray.getData();
-
- // get axes
- XDiagram aDiagram = maChartDocument.getDiagram();
- XShape aXAxis = (XShape) UnoRuntime.queryInterface(
- XShape.class, ((XAxisXSupplier) UnoRuntime.queryInterface(
- XAxisXSupplier.class, aDiagram )).getXAxis() );
- XShape aYAxis = (XShape) UnoRuntime.queryInterface(
- XShape.class, ((XAxisYSupplier) UnoRuntime.queryInterface(
- XAxisYSupplier.class, aDiagram )).getYAxis() );
-
- // calculate points for hull
- final int nLength = aData.length;
- int i, j;
- double fMax, fMin;
-
- Point aMaxPtSeq[][] = new Point[ 1 ][];
- aMaxPtSeq[ 0 ] = new Point[ nLength ];
- Point aMinPtSeq[][] = new Point[ 1 ][];
- aMinPtSeq[ 0 ] = new Point[ nLength ];
-
- for( i = 0; i < nLength; i++ )
- {
- fMin = fMax = aData[ i ][ 1 ];
- for( j = 1; j < aData[ i ].length; j++ )
- {
- if( aData[ i ][ j ] > fMax )
- fMax = aData[ i ][ j ];
- else if( aData[ i ][ j ] < fMin )
- fMin = aData[ i ][ j ];
- }
- aMaxPtSeq[ 0 ][ i ] = new Point( getAxisPosition( aXAxis, aData[ i ][ 0 ], false ),
- getAxisPosition( aYAxis, fMax, true ));
- aMinPtSeq[ 0 ][ i ] = new Point( getAxisPosition( aXAxis, aData[ i ][ 0 ], false ),
- getAxisPosition( aYAxis, fMin, true ));
- }
-
- // apply point sequences to lines
- try
- {
- XPropertySet aShapeProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maTopLine );
- aShapeProp.setPropertyValue( "PolyPolygon", aMaxPtSeq );
-
- aShapeProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maBottomLine );
- aShapeProp.setPropertyValue( "PolyPolygon", aMinPtSeq );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( null, ex, "Exception caught", JOptionPane.WARNING_MESSAGE );
- }
- }
-
- public void addRefreshListener( com.sun.star.util.XRefreshListener aListener )
- throws RuntimeException
- {
- // we don't want this but we have to implement the interface
- }
-
- public void removeRefreshListener( com.sun.star.util.XRefreshListener aListener )
- throws RuntimeException
- {
- // we don't want this but we have to implement the interface
- }
-
-
- // XServiceName
- public String getServiceName() throws RuntimeException
- {
- return new String( smServiceName );
- }
-
- // XServiceInfo
- public boolean supportsService( String aServiceName )
- {
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- boolean bResult = false;
-
- for( i = 0; !bResult && i < nLength; ++i )
- bResult = aServiceName.equals( aServices[ i ] );
-
- return bResult;
- }
-
- public String getImplementationName()
- {
- return( JavaSampleChartAddIn.class.getName() );
- }
-
- public String[] getSupportedServiceNames()
- {
- return getSupportedServiceNames_Static();
- }
-
- // XDiagram
- public String getDiagramType() throws RuntimeException
- {
- return new String( smServiceName );
- }
-
- public XPropertySet getDataRowProperties( int nRow )
- throws com.sun.star.lang.IndexOutOfBoundsException, RuntimeException
- {
- return maChartDocument.getDiagram().getDataRowProperties( nRow );
- }
-
- public XPropertySet getDataPointProperties( int nCol, int nRow )
- throws com.sun.star.lang.IndexOutOfBoundsException, RuntimeException
- {
- return maChartDocument.getDiagram().getDataPointProperties( nCol, nRow );
- }
-
- // XShape : XDiagram
- public Size getSize() throws RuntimeException
- {
- return ((XShape) UnoRuntime.queryInterface( XShape.class, maChartDocument.getDiagram())).getSize();
- }
- public void setSize( Size aSize ) throws RuntimeException, PropertyVetoException
- {
- ((XShape) UnoRuntime.queryInterface( XShape.class, maChartDocument.getDiagram())).setSize( aSize );
- }
-
- public Point getPosition() throws RuntimeException
- {
- return ((XShape) UnoRuntime.queryInterface( XShape.class, maChartDocument.getDiagram())).getPosition();
- }
- public void setPosition( Point aPos ) throws RuntimeException
- {
- ((XShape) UnoRuntime.queryInterface( XShape.class, maChartDocument.getDiagram())).setPosition( aPos );
- }
-
- // XShapeDescriptor : XShape : XDiagram
- public String getShapeType() throws RuntimeException
- {
- return new String( "com.sun.star.comp.Chart.JavaSampleDiagramShape" );
- }
-
-
- // __________ private members __________
- private com.sun.star.chart.XChartDocument maChartDocument;
- private com.sun.star.drawing.XDrawPage maDrawPage;
- private com.sun.star.lang.XMultiServiceFactory maShapeFactory;
-
- // shapes added by add-in
- private com.sun.star.drawing.XShape maTopLine;
- private com.sun.star.drawing.XShape maBottomLine;
-
- // __________ private methods __________
-
- private int getAxisPosition( XShape aAxis, double fValue, boolean bVertical )
- {
- int nResult = 0;
-
- if( aAxis != null )
- {
- XPropertySet aAxisProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, aAxis );
-
- try
- {
- double fMin, fMax;
- fMin = ((Double) aAxisProp.getPropertyValue( "Min" )).doubleValue();
- fMax = ((Double) aAxisProp.getPropertyValue( "Max" )).doubleValue();
- double fRange = fMax - fMin;
-
- if( fMin <= fValue && fValue <= fMax &&
- fRange != 0 )
- {
- if( bVertical )
- {
- nResult = aAxis.getPosition().Y +
- (int)((double)(aAxis.getSize().Height) *
- (1.0 - (( fValue - fMin ) / fRange )));
- }
- else
- {
- nResult = aAxis.getPosition().X +
- (int)((double)(aAxis.getSize().Width) *
- (( fValue - fMin ) / fRange ));
- }
- }
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( null, ex, "Exception caught", JOptionPane.WARNING_MESSAGE );
- }
- }
- return nResult;
- }
-
- // __________ static things __________
-
- private static final String smServiceName = "com.sun.star.comp.Chart.JavaSampleChartAddIn";
-
- public static String[] getSupportedServiceNames_Static()
- {
- String[] aResult = { smServiceName,
- "com.sun.star.chart.Diagram",
- "com.sun.star.chart.ChartAxisYSupplier" };
- return aResult;
- }
-
-
- /**
- * Returns a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleServiceFactory</code> for creating the component
- * @param implName the name of the implementation for which a service is desired
- * @param multiFactory the service manager to be used if needed
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(
- String implName,
- XMultiServiceFactory multiFactory,
- com.sun.star.registry.XRegistryKey regKey )
- {
- XSingleServiceFactory xSingleServiceFactory = null;
-
- if( implName.equals( JavaSampleChartAddIn.class.getName()) )
- {
- xSingleServiceFactory = com.sun.star.comp.loader.FactoryHelper.getServiceFactory(
- JavaSampleChartAddIn.class, smServiceName,
- multiFactory, regKey );
- }
-
- return xSingleServiceFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey regKey )
-// {
-// boolean bResult = true;
-
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// JavaSampleChartAddIn.class.getName(), aServices[ i ], regKey );
-// }
-// return bResult;
-// }
-}
diff --git a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
deleted file mode 100644
index 41ee1afb..00000000
--- a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-// base classes
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-
-// property access
-import com.sun.star.beans.*;
-
-// application specific classes
-import com.sun.star.chart.*;
-import com.sun.star.drawing.*;
-
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.table.XCellRange;
-import com.sun.star.sheet.XSpreadsheetDocument;
-
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.util.XNumberFormats;
-
-// base graphics things
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.FontWeight;
-import com.sun.star.awt.FontRelief;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.lang.IndexOutOfBoundsException;
-import com.sun.star.util.MalformedNumberFormatException;
-
-
-// __________ Implementation __________
-
-/** Create a spreadsheet add some data.
- Create a presentation and add a chart.
- Connect the chart to a calc range via a listener
- @author Bj&ouml;rn Milcke
- */
-public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener
-{
- public static void main( String args[] )
- {
- ListenAtCalcRangeInDraw aMySelf = new ListenAtCalcRangeInDraw( args );
-
- aMySelf.run();
- }
-
- public ListenAtCalcRangeInDraw( String args[] )
- {
- Helper aHelper = new Helper( args );
-
- maSheetDoc = aHelper.createSpreadsheetDocument();
- maDrawDoc = aHelper.createDrawingDocument();
- CalcHelper aCalcHelper = new CalcHelper( maSheetDoc );
- ChartHelper aChartHelper = new ChartHelper( maDrawDoc );
-
- XCellRange aRange = aCalcHelper.insertFormulaRange( 3, 30 );
-
- // the unit for measures is 1/100th of a millimeter
- // position at (1cm, 1cm)
- Point aPos = new Point( 1000, 1000 );
-
- // size of the chart is 15cm x 9.271cm
- Size aExtent = new Size( 15000, 9271 );
-
- // insert a new chart into the "Chart" sheet of the
- // spreadsheet document
- maChartDocument = aChartHelper.insertOLEChartInDraw(
- "ChartWithCalcData",
- aPos,
- aExtent,
- "com.sun.star.chart.XYDiagram" );
-
- // attach the data coming from the cell range to the chart
- maChartData = (XChartData) UnoRuntime.queryInterface( XChartData.class, aRange );
- maChartDocument.attachData( maChartData );
- }
-
- // ____________________
-
- public void run()
- {
- try
- {
- ((XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument )).setPropertyValue(
- "HasSubTitle", new Boolean( true ));
-
- // start listening for death of spreadsheet
- ((XComponent) UnoRuntime.queryInterface(
- XComponent.class, maSheetDoc )).addEventListener( this );
-
- // start listening for death of chart
- ((XComponent) UnoRuntime.queryInterface(
- XComponent.class, maChartDocument )).addEventListener( this );
-
- //start listening for change of data
- maChartData.addChartDataChangeEventListener( this );
- }
- catch( Exception ex )
- {
- System.out.println( "Oops: " + ex );
- }
-
- // call listener
- ChartDataChangeEvent aEvent = new ChartDataChangeEvent();
- aEvent.Type = ChartDataChangeType.ALL;
- chartDataChanged( aEvent );
- }
-
- // ____________________
-
- // XEventListener (base of XChartDataChangeEventListener)
- public void disposing( EventObject aSourceObj )
- {
- if( UnoRuntime.queryInterface( XChartDocument.class, aSourceObj.Source ) != null )
- System.out.println( "Disconnecting Listener because Chart was shut down" );
-
- if( UnoRuntime.queryInterface( XSpreadsheetDocument.class, aSourceObj.Source ) != null )
- System.out.println( "Disconnecting Listener because Spreadsheet was shut down" );
-
- // remove data change listener
- maChartData.removeChartDataChangeEventListener( this );
-
- // remove dispose listeners
- ((XComponent) UnoRuntime.queryInterface(
- XComponent.class, maSheetDoc )).removeEventListener( this );
- ((XComponent) UnoRuntime.queryInterface(
- XComponent.class, maChartDocument )).removeEventListener( this );
-
- System.exit( 0 );
- }
-
- // ____________________
-
- // XChartDataChangeEventListener
- public void chartDataChanged( ChartDataChangeEvent aEvent )
- {
- // update subtitle
- String aTitle = new String( "Last Update: " + new java.util.Date( System.currentTimeMillis() ));
-
- try
- {
- XPropertySet aDocProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument );
- aDocProp.setPropertyValue( "HasMainTitle", new Boolean( true ));
-
- ((XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, maChartDocument.getSubTitle())).setPropertyValue(
- "String", aTitle );
-
- maChartDocument.attachData( maChartData );
- }
- catch( Exception ex )
- {
- System.out.println( "Oops: " + ex );
- }
-
- System.out.println( "Data has changed" );
- }
-
-
- // __________ private __________
-
- private XSpreadsheetDocument maSheetDoc;
- private XModel maDrawDoc;
- private XChartDocument maChartDocument;
- private XChartData maChartData;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/Makefile b/odk/examples/DevelopersGuide/Charts/Makefile
deleted file mode 100644
index d6727662..00000000
--- a/odk/examples/DevelopersGuide/Charts/Makefile
+++ /dev/null
@@ -1,200 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Charts examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=DevGuideChartExample
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-APP1_NAME=ChartInCalc
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP2_NAME=ChartInDraw
-APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
-APP3_NAME=ChartInWriter
-APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
-APP4_NAME=ListenAtCalcRangeInDraw
-APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
-APP5_NAME=SelectionChangeListener
-APP5_JAR=$(SAMPLE_CLASS_OUT)/$(APP5_NAME).jar
-
-COMP_NAME=JavaSampleChartAddIn
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME = $(COMP_NAME).uno.jar
-COMP_JAR = $(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE = $(SAMPLE_CLASS_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(SAMPLE_CLASS_OUT)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-COMPJAVAFILES = \
- JavaSampleChartAddIn.java
-
-APP_JAVAFILES = \
- Helper.java \
- CalcHelper.java \
- ChartHelper.java
-
-COMPCLASSFILES= $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(COMPJAVAFILES))
-
-APP_CLASSFILES= $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES))
-APP_CLASSNAMES= $(patsubst %.java,%.class,$(APP_JAVAFILES))
-
-$(COMP_NAME)_CLASSFILES = $(COMP_NAME).class
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_CLASS_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(basename $(basename $(@F)))> $@
-
-# rule for client/example application class files, explicit dependencies to common
-# java files which are used in all examples.
-$(SAMPLE_CLASS_OUT)/%.class : %.java $(APP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $< $(APP_JAVAFILES)
-
-$(COMPCLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(COMPJAVAFILES)
-
-# rule for client/example application manifest file
-$(SAMPLE_CLASS_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-# rule for client/example application jar file
-$(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $*.mf $**.class $(APP_CLASSNAMES)
-
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(COMPCLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-# rule for component package manifest
-$(SAMPLE_CLASS_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component pacakge file
-$(COMP_PACKAGE) : $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) ../../bin/$(@F) -u $(<F)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) ../../../bin/$(@F) -u META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(APP1_JAR) : $(SAMPLE_CLASS_OUT)/$(APP1_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP1_NAME).class
-$(APP2_JAR) : $(SAMPLE_CLASS_OUT)/$(APP2_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP2_NAME).class
-$(APP3_JAR) : $(SAMPLE_CLASS_OUT)/$(APP3_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP3_NAME).class
-$(APP4_JAR) : $(SAMPLE_CLASS_OUT)/$(APP4_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP4_NAME).class
-$(APP5_JAR) : $(SAMPLE_CLASS_OUT)/$(APP5_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP5_NAME).class
-
-$(SAMPLE_NAME) : $(COMP_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR) $(APP5_JAR)
- @echo --------------------------------------------------------------------------------
- @echo When you run the "$(QM)$(APP5_NAME)$(QM)" example please select the
- @echo legend or the title to add a $(APP5_NAME). The example terminates
- @echo when the document is closed.
- @echo -
- @echo Please use the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo $(MAKE) $(APP4_NAME).run
- @echo $(MAKE) $(APP5_NAME).run
- @echo --------
- @echo The Chart add-in component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo Load the "$(QM)AddInChart.ods$(QM)" document in your office to see the new chart type,
- @echo and see the example description.
- @echo -
- @echo $(MAKE) AddInChart.ods.load
- @echo --------------------------------------------------------------------------------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-AddInChart.ods.load : $(REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
deleted file mode 100644
index d895be7d..00000000
--- a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.*;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-// application specific classes
-import com.sun.star.chart.*;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.view.XSelectionChangeListener;
-import com.sun.star.view.XSelectionSupplier;
-
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.table.XCellRange;
-import com.sun.star.sheet.XCellRangeAddressable;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.XMessageBoxFactory;
-import com.sun.star.awt.XWindow;
-
-// __________ Implementation __________
-
-/** Create a spreadsheet add some data.
- * Create a presentation and add a chart.
- * Connect the chart to a calc range via a listener
- *
- * Note: This example does not work in StarOffice 6.0. It will be available
- * in the StarOffice Accessibility release.
- *
- * @author Bj&ouml;rn Milcke
- */
-public class SelectionChangeListener implements XSelectionChangeListener {
- public static void main( String args[] ) {
- SelectionChangeListener aMySelf = new SelectionChangeListener( args );
-
- aMySelf.run();
- }
-
- public SelectionChangeListener( String args[] ) {
- Helper aHelper = new Helper( args );
-
- maContext = aHelper.getComponentContext();
-
- CalcHelper aCalcHelper = new CalcHelper( aHelper.createSpreadsheetDocument() );
-
- // insert a cell range with 4 columns and 12 rows filled with random numbers
- XCellRange aRange = aCalcHelper.insertRandomRange( 4, 12 );
- CellRangeAddress aRangeAddress = ((XCellRangeAddressable) UnoRuntime.queryInterface(
- XCellRangeAddressable.class, aRange)).getRangeAddress();
-
- // change view to sheet containing the chart
- aCalcHelper.raiseChartSheet();
-
- // the unit for measures is 1/100th of a millimeter
- // position at (1cm, 1cm)
- Point aPos = new Point( 1000, 1000 );
-
- // size of the chart is 15cm x 9.271cm
- Size aExtent = new Size( 15000, 9271 );
-
- // insert a new chart into the "Chart" sheet of the
- // spreadsheet document
- maChartDocument = aCalcHelper.insertChart(
- "SampleChart",
- aRangeAddress,
- aPos,
- aExtent,
- "com.sun.star.chart.XYDiagram" );
- }
-
- // ____________________
-
- public void run() {
- boolean bTrying = true;
-
- while( bTrying ) {
- // start listening for selection changes
- XSelectionSupplier aSelSupp = (XSelectionSupplier) UnoRuntime.queryInterface(
- XSelectionSupplier.class,
- (((XModel) UnoRuntime.queryInterface(
- XModel.class, maChartDocument )).getCurrentController()) );
- if( aSelSupp != null ) {
- aSelSupp.addSelectionChangeListener( this );
- System.out.println( "Successfully attached as selection change listener" );
- bTrying = false;
- }
-
- // start listening for death of Controller
- XComponent aComp = (XComponent) UnoRuntime.queryInterface( XComponent.class, aSelSupp );
- if( aComp != null ) {
- aComp.addEventListener( this );
- System.out.println( "Successfully attached as dispose listener" );
- }
-
- try {
- Thread.currentThread().sleep( 500 );
- } catch( InterruptedException ex ) {
- }
- }
- }
-
- // ____________________
-
- // XEventListener (base of XSelectionChangeListener)
- public void disposing( EventObject aSourceObj ) {
- System.out.println( "disposing called. detaching as listener" );
-
- // stop listening for selection changes
- XSelectionSupplier aCtrl = (XSelectionSupplier) UnoRuntime.queryInterface(
- XSelectionSupplier.class, aSourceObj );
- if( aCtrl != null )
- aCtrl.removeSelectionChangeListener( this );
-
- // remove as dispose listener
- XComponent aComp = (XComponent) UnoRuntime.queryInterface( XComponent.class, aSourceObj );
- if( aComp != null )
- aComp.removeEventListener( this );
-
- // bail out
- System.exit( 0 );
- }
-
- // ____________________
-
- // XSelectionChangeListener
- public void selectionChanged( EventObject aEvent ) {
- XController aCtrl = (XController) UnoRuntime.queryInterface( XController.class, aEvent.Source );
- if( aCtrl != null ) {
- XMultiComponentFactory mMCF = maContext.getServiceManager();
-
- MyMessageBox aMsgBox = new MyMessageBox(mMCF);
-
- aMsgBox.start();
-
- System.out.println("Listener finished");
- }
- }
-
- // __________ private __________
-
- private class MyMessageBox extends Thread{
- private XMultiComponentFactory mMCF;
-
- public MyMessageBox(XMultiComponentFactory xMCF){
- mMCF = xMCF;
- }
-
- public void run() {
- XDesktop aDesktop = null;
- XInterface aToolKit = null;
- try {
- Thread.sleep(1000);
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- }
- try {
- Object oDesktop = mMCF.createInstanceWithContext("com.sun.star.frame.Desktop", maContext);
- Object oToolKit = mMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", maContext);
-
- aDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
- aToolKit = (XInterface) UnoRuntime.queryInterface(XInterface.class, oToolKit);
- } catch (Exception ex) {
- ex.printStackTrace();
- }
-
- XWindow xWin = aDesktop.getCurrentFrame().getContainerWindow();
- XWindowPeer aWinPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xWin);
-
- Rectangle aRect = new Rectangle();
- int button = com.sun.star.awt.MessageBoxButtons.BUTTONS_OK;
- XMessageBoxFactory aMBF = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class, aToolKit);
- XMessageBox xMB = aMBF.createMessageBox(aWinPeer, aRect, "infobox" , button, "Event-Notify", "Listener was called, selcetion has changed");
- xMB.execute();
- }
- }
-
- private XChartDocument maChartDocument;
- private XComponentContext maContext;
-}
diff --git a/odk/examples/DevelopersGuide/Charts/bullet.gif b/odk/examples/DevelopersGuide/Charts/bullet.gif
deleted file mode 100644
index 0f8efd14..00000000
--- a/odk/examples/DevelopersGuide/Charts/bullet.gif
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Charts/makefile.mk b/odk/examples/DevelopersGuide/Charts/makefile.mk
deleted file mode 100644
index 225d8d7e..00000000
--- a/odk/examples/DevelopersGuide/Charts/makefile.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-CHARTS_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/AddInChart.ods \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/CalcHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/ChartHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/ChartInCalc.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/ChartInDraw.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/ChartInWriter.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/Helper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/JavaSampleChartAddIn.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/ListenAtCalcRangeInDraw.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/SelectionChangeListener.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/bullet.gif \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Charts$/Makefile
-
-DIR_FILE_LIST= \
- $(CHARTS_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_charts_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_charts.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
-
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu
deleted file mode 100644
index b9776251..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
-
- <node oor:name="AddonMenu">
-
- <node oor:name="myAsyncJobAlias" oor:op="replace">
-
- <prop oor:name="URL" oor:type="xs:string">
-
- <value>vnd.sun.star.job:alias=AsyncJob</value>
-
- </prop>
-
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value>private:image/3216</value>
-
- </prop>
-
- <prop oor:name="Title" oor:type="xs:string">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="en-US">AsyncJob (ALIAS)...</value>
- <value xml:lang="de">AsyncJob (ALIAS) ...</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
-
- <node oor:name="myAsyncJobEvent" oor:op="replace">
-
- <prop oor:name="URL" oor:type="xs:string">
-
- <value>vnd.sun.star.job:event=onMyOwnJobEvent</value>
-
- </prop>
-
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value>private:image/3216</value>
-
- </prop>
-
- <prop oor:name="Title" oor:type="xs:string">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="en-US">AsyncJob (EVENT)...</value>
- <value xml:lang="de">AsyncJob (EVENT) ...</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
-
- <node oor:name="myAsyncJobService" oor:op="replace">
-
- <prop oor:name="URL" oor:type="xs:string">
-
- <value>vnd.sun.star.job:service=com.sun.star.comp.framework.java.services.AsyncJob</value>
-
- </prop>
-
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value>private:image/3216</value>
-
- </prop>
-
- <prop oor:name="Title" oor:type="xs:string">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="en-US">AsyncJob (SERVICE)...</value>
- <value xml:lang="de">AsyncJob (SERVICE) ...</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data>
-
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components
deleted file mode 100644
index c47f26b0..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="AsyncJob.uno.jar">
- <implementation name="com.sun.star.comp.framework.java.services.AsyncJob">
- <service name="com.sun.star.task.AsyncJob"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
deleted file mode 100644
index 790a52d4..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+++ /dev/null
@@ -1,444 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//_______________________________________________
-// imports
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.awt.*;
-import com.sun.star.beans.*;
-import com.sun.star.task.*;
-import com.sun.star.uno.*;
-import java.lang.*;
-import javax.swing.*;
-
-//_______________________________________________
-// implementation
-
-/** it implements a simple job component.
- *
- * Such jobs are executable in different ways:
- * <ul>
- * <li>registered for a special URL schema "vnd.sun.star.jobs:*" and used from the generic dispatch framework</li>
- * <li>the global com.sun.star.task.JobExecutor service and registered for special events.</li>
- * </ul>
- */
-public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
-{
- //___________________________________________
- // const
- public final XComponentContext m_xCmpCtx;
-
- /** the const list of supported uno service names. */
- public static final java.lang.String[] SERVICENAMES = {"com.sun.star.task.AsyncJob"};
-
- /** the const uno implementation name.
- * It must be an unique value! The best naming schema seams to use
- * a registered domain in reverse order ...
- */
- public static final java.lang.String IMPLEMENTATIONNAME = "com.sun.star.comp.framework.java.services.AsyncJob";
-
- //___________________________________________
- // interface
-
- /** initialize a new instance of this class with default values. */
- public AsyncJob( XComponentContext xCompContext )
- {
- m_xCmpCtx = xCompContext;
- }
-
- //___________________________________________
-
- /** starts execution of this job.
- *
- * @param lArgs
- * list which contains:
- * <ul>
- * <li>generic job configuration data</li>
- * <li>job specific configuration data</li>
- * <li>some environment informations</li>
- * <li>may optional arguments of a corresponding dispatch request</li>
- * </ul>
- *
- * @params xListener
- * callback to the executor of this job, which control our life time
- *
- * @throws com.sun.star.lang.IllegalArgumentException
- * if given argument list seams to be wrong
- */
- public synchronized void executeAsync(com.sun.star.beans.NamedValue[] lArgs ,
- com.sun.star.task.XJobListener xListener)
- throws com.sun.star.lang.IllegalArgumentException
- {
- // For asynchronous jobs a valid listener reference is guranteed normaly ...
- if (xListener == null)
- throw new com.sun.star.lang.IllegalArgumentException("invalid listener");
-
- // extract all possible sub list of given argument list
- com.sun.star.beans.NamedValue[] lGenericConfig = null;
- com.sun.star.beans.NamedValue[] lJobConfig = null;
- com.sun.star.beans.NamedValue[] lEnvironment = null;
- com.sun.star.beans.NamedValue[] lDynamicData = null;
-
- int c = lArgs.length;
- for (int i=0; i<c; ++i)
- {
- if (lArgs[i].Name.equals("Config"))
- lGenericConfig = (com.sun.star.beans.NamedValue[])com.sun.star.uno.AnyConverter.toArray(lArgs[i].Value);
- else
- if (lArgs[i].Name.equals("JobConfig"))
- lJobConfig = (com.sun.star.beans.NamedValue[])com.sun.star.uno.AnyConverter.toArray(lArgs[i].Value);
- else
- if (lArgs[i].Name.equals("Environment"))
- lEnvironment = (com.sun.star.beans.NamedValue[])com.sun.star.uno.AnyConverter.toArray(lArgs[i].Value);
- else
- if (lArgs[i].Name.equals("DynamicData"))
- lDynamicData = (com.sun.star.beans.NamedValue[])com.sun.star.uno.AnyConverter.toArray(lArgs[i].Value);
- }
-
- // Analyze the environment info. This sub list is the only guarenteed one!
- if (lEnvironment == null)
- throw new com.sun.star.lang.IllegalArgumentException("no environment");
-
- java.lang.String sEnvType = null;
- java.lang.String sEventName = null;
- com.sun.star.frame.XFrame xFrame = null;
- c = lEnvironment.length;
- for (int i=0; i<c; ++i)
- {
- if (lEnvironment[i].Name.equals("EnvType"))
- sEnvType = com.sun.star.uno.AnyConverter.toString(lEnvironment[i].Value);
- else
- if (lEnvironment[i].Name.equals("EventName"))
- sEventName = com.sun.star.uno.AnyConverter.toString(lEnvironment[i].Value);
- else
- if (lEnvironment[i].Name.equals("Frame"))
- xFrame = (com.sun.star.frame.XFrame)com.sun.star.uno.AnyConverter.toObject(
- new com.sun.star.uno.Type(com.sun.star.frame.XFrame.class),
- lEnvironment[i].Value);
- }
-
- // Further the environment property "EnvType" is required as minimum.
- if (
- (sEnvType==null) ||
- (
- (!sEnvType.equals("EXECUTOR")) &&
- (!sEnvType.equals("DISPATCH"))
- )
- )
- {
- java.lang.String sMessage = "\"" + sEnvType + "\" isn't a valid value for EnvType";
- throw new com.sun.star.lang.IllegalArgumentException(sMessage);
- }
-
- // Analyze the set of shared config data.
- java.lang.String sAlias = null;
- if (lGenericConfig!=null)
- {
- c = lGenericConfig.length;
- for (int i=0; i<c; ++i)
- {
- if (lGenericConfig[i].Name.equals("Alias"))
- sAlias = com.sun.star.uno.AnyConverter.toString(lGenericConfig[i].Value);
- }
- }
-
- // do your job ...
- // Here we print out all found arguments.
- java.lang.String sOut = formatOutArgs(lGenericConfig, lJobConfig, lEnvironment, lDynamicData);
- if (xFrame != null)
- showInfoModal(xFrame.getContainerWindow(), "Arguments of AsyncJob initialization ...", sOut);
- else
- showInfoNonModal("Arguments of AsyncJob initialization ...", sOut);
-
- // use return value to start different actions
- // But look for the right environment. Some options make no sense inside the wrong env.
- com.sun.star.beans.NamedValue aDeactivation = null;
- com.sun.star.beans.NamedValue aDispatchResult = null;
- com.sun.star.beans.NamedValue aSaveRequest = null;
-
- // SaveArguments will be made everytimes!
- c = 1;
-
- if (lJobConfig==null)
- lJobConfig = new com.sun.star.beans.NamedValue[1];
- lJobConfig[0] = new com.sun.star.beans.NamedValue();
- lJobConfig[0].Name = "arg_1";
- lJobConfig[0].Value = "val_1";
-
- aSaveRequest = new com.sun.star.beans.NamedValue();
- aSaveRequest.Name = "SaveArguments";
- aSaveRequest.Value = lJobConfig;
-
- // Deactivation is usefull inside EXECUTOR environment only
- if (sEnvType.equals("EXECUTOR"))
- {
- ++c;
- aDeactivation = new com.sun.star.beans.NamedValue();
- aDeactivation.Name = "Deactivate";
- aDeactivation.Value = java.lang.Boolean.TRUE;
- }
-
- // Sending of result events is usefull inside DISPATCH environment only
- if (sEnvType.equals("DISPATCH"))
- {
- ++c;
- aDispatchResult = new com.sun.star.beans.NamedValue();
- aDispatchResult.Name = "SendDispatchResult";
- aDispatchResult.Value = new com.sun.star.frame.DispatchResultEvent(this, com.sun.star.frame.DispatchResultState.SUCCESS, null);
- }
-
- // pack it together for return
- int i=0;
- com.sun.star.beans.NamedValue[] lReturn = new com.sun.star.beans.NamedValue[c];
- lReturn[i++] = aSaveRequest;
- if (aDeactivation!=null)
- lReturn[i++] = aDeactivation;
- if (aDispatchResult!=null)
- lReturn[i++] = aDispatchResult;
-
- xListener.jobFinished(this, lReturn);
- }
-
- //___________________________________________
-
- /** show an info box with the UNO based toolkit.
- *
- * It tries to use the container window of a may well know
- * office frame as parent. If such parent window could be located,
- * the info box can be shown in modal mode. If a parent is missing
- * (because this job is called inside an EXECUTOR environment, which
- * does not set any frame context here) the info box can't be created!
- * Because the toolkit needs parents for non top level windows ...
- * In that case the only way is to implement this info box
- * native or make it non modal using java dialogs inside it's own thread ...
- * (see showInfoNonModal() too)
- *
- * @param xParent
- * used as parent window of the shown info box.
- *
- * @param sTitle
- * is shown as title of the info box.
- *
- * @param sMessage
- * inclused the message body, which is shown as info.
- */
-
- private void showInfoModal( com.sun.star.awt.XWindow xParent ,
- java.lang.String sTitle ,
- java.lang.String sMessage )
- {
- try
- {
- // get access to the office toolkit environment
- com.sun.star.awt.XToolkit xKit = (com.sun.star.awt.XToolkit)UnoRuntime.queryInterface(
- com.sun.star.awt.XToolkit.class,
- m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
- m_xCmpCtx));
-
- // describe the info box ini it's parameters
- com.sun.star.awt.WindowDescriptor aDescriptor = new com.sun.star.awt.WindowDescriptor();
- aDescriptor.WindowServiceName = "infobox";
- aDescriptor.Bounds = new com.sun.star.awt.Rectangle(0,0,300,200);
- aDescriptor.WindowAttributes = com.sun.star.awt.WindowAttribute.BORDER |
- com.sun.star.awt.WindowAttribute.MOVEABLE |
- com.sun.star.awt.WindowAttribute.CLOSEABLE;
- aDescriptor.Type = com.sun.star.awt.WindowClass.MODALTOP;
- aDescriptor.ParentIndex = 1;
- aDescriptor.Parent = (com.sun.star.awt.XWindowPeer)UnoRuntime.queryInterface(
- com.sun.star.awt.XWindowPeer.class,
- xParent);
-
- // create the info box window
- com.sun.star.awt.XWindowPeer xPeer = xKit.createWindow(aDescriptor);
- com.sun.star.awt.XMessageBox xInfoBox = (com.sun.star.awt.XMessageBox)UnoRuntime.queryInterface(
- com.sun.star.awt.XMessageBox.class,
- xPeer);
- if (xInfoBox == null)
- return;
-
- // fill it with all given informations and show it
- xInfoBox.setCaptionText(sTitle);
- xInfoBox.setMessageText(sMessage);
- xInfoBox.execute();
- }
- catch(java.lang.Throwable exIgnore)
- {
- // ignore any problem, which can occure here.
- // It's not realy a bug for this example job, if
- // it's message could not be printed out!
- }
- }
-
- //___________________________________________
-
- private void showInfoNonModal( java.lang.String sTitle ,
- java.lang.String sMessage )
- {
- // Couldnt be implemented realy using the toolkit ...
- // Because we need a parent anytime.
- // And showing e.g. a java dialog can make some trouble
- // inside office ... but we have no chance here.
- final java.lang.String sFinalTitle = sTitle;
- final java.lang.String sFinalMessage = sMessage;
-
- // On Mac OS X, AWT/Swing must not be accessed from the AppKit thread, so call
- // SwingUtilities.invokeLater always on a fresh thread to avoid that problem
- // (also, the current thread must not wait for that fresh thread to terminate,
- // as that would cause a deadlock if this thread is the AppKit thread):
- final Runnable doRun = new Runnable() {
- public void run() {
- javax.swing.JOptionPane.showMessageDialog(null, sFinalMessage, sFinalTitle, javax.swing.JOptionPane.INFORMATION_MESSAGE);
- }
- };
-
- new Thread( doRun ) {
- public void run() { javax.swing.SwingUtilities.invokeLater(doRun); }
- }.start();
- }
-
- //___________________________________________
-
- /** helper to print out the given argument list.
- *
- * @param lGenericConfig
- * contains all shared configuration items for a job
- *
- * @param lJobConfig
- * contains all job sepcific configuration items
- *
- * @param lEnvironment
- * contains some environment informations
- *
- * @param lDynamicData
- * contains optional data of a might corresponding dispatch() request
- */
-
- private java.lang.String formatOutArgs(com.sun.star.beans.NamedValue[] lGenericConfig,
- com.sun.star.beans.NamedValue[] lJobConfig ,
- com.sun.star.beans.NamedValue[] lEnvironment ,
- com.sun.star.beans.NamedValue[] lDynamicData )
- {
- java.lang.StringBuffer sOut = new java.lang.StringBuffer(1024);
-
- sOut.append("list \"Config\": ");
- if (lGenericConfig==null)
- sOut.append("0 items\n");
- else
- {
- int c = lGenericConfig.length;
- sOut.append(c+" items\n");
- for (int i=0; i<c; ++i)
- sOut.append("\t["+i+"] \""+lGenericConfig[i].Name+"\" = {"+lGenericConfig[i].Value+"}\n");
- }
- sOut.append("list \"JobConfig\": ");
- if (lJobConfig==null)
- sOut.append("0 items\n");
- else
- {
- int c = lJobConfig.length;
- sOut.append(c+" items\n");
- for (int i=0; i<c; ++i)
- sOut.append("\t["+i+"] \""+lJobConfig[i].Name+"\" = {"+lJobConfig[i].Value+"}\n");
- }
- sOut.append("list \"Environment\": ");
- if (lEnvironment==null)
- sOut.append("0 items\n");
- else
- {
- int c = lEnvironment.length;
- sOut.append(c+" items\n");
- for (int i=0; i<c; ++i)
- sOut.append("\t["+i+"] \""+lEnvironment[i].Name+"\" = {"+lEnvironment[i].Value+"}\n");
- }
- sOut.append("list \"DynamicData\": ");
- if (lDynamicData==null)
- sOut.append("0 items\n");
- else
- {
- int c = lDynamicData.length;
- sOut.append(c+" items\n");
- for (int i=0; i<c; ++i)
- sOut.append("\t["+i+"] \""+lDynamicData[i].Name+"\" = {"+lDynamicData[i].Value+"}\n");
- }
-
- return sOut.toString();
- }
-
- public String[] getSupportedServiceNames() {
- return SERVICENAMES;
- }
-
- public boolean supportsService( String sService ) {
- int len = SERVICENAMES.length;
-
- for( int i=0; i < len; i++) {
- if ( sService.equals( SERVICENAMES[i] ) )
- return true;
- }
-
- return false;
- }
-
- public String getImplementationName() {
- return( AsyncJob.class.getName() );
- }
-
-
- //___________________________________________
-
- public synchronized static com.sun.star.lang.XSingleComponentFactory __getComponentFactory(java.lang.String sImplName)
- {
- com.sun.star.lang.XSingleComponentFactory xFactory = null;
- if (sImplName.equals(AsyncJob.IMPLEMENTATIONNAME))
- xFactory = Factory.createComponentFactory(AsyncJob.class, SERVICENAMES);
-
- return xFactory;
- }
-
- //___________________________________________
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public synchronized static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xRegKey)
-// {
-// return Factory.writeRegistryServiceInfo(
-// AsyncJob.IMPLEMENTATIONNAME,
-// AsyncJob.SERVICENAMES,
-// xRegKey);
-// }
-}
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Jobs.xcu b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Jobs.xcu
deleted file mode 100644
index f33c68e5..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Jobs.xcu
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="Jobs">
- <node oor:name="AsyncJob" oor:op="replace">
- <prop oor:name="Service" oor:type="xs:string">
- <value>com.sun.star.comp.framework.java.services.AsyncJob</value>
- </prop>
- <node oor:name="Arguments">
- <prop oor:name="arg_1" oor:type="xs:string">
- <value>val_1</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="Events">
- <node oor:name="onFirstVisibleTask" oor:op="modify">
- <node oor:name="JobList">
- <node oor:name="AsyncJob" oor:op="replace"/>
- </node>
- </node>
- <node oor:name="onMyOwnJobEvent" oor:op="replace">
- <node oor:name="JobList">
- <node oor:name="AsyncJob" oor:op="replace"/>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile
deleted file mode 100644
index 052cea35..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile
+++ /dev/null
@@ -1,137 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the DevGuide Jobs Addon component example of the SDK.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=AsyncJob
-OUT_COMP_CLASS=$(OUT_CLASS)/$(COMP_NAME)
-OUT_COMP_MISC=$(OUT_MISC)/$(COMP_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(OUT_CLASS)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
-REGISTERFLAG=$(OUT_COMP_MISC)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-JAVAFILES = AsyncJob.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : DevGuideJobsAddon
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(basename $(basename $(@F)))> $@
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) .
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)Jobs.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_JAR) Addons.xcu Jobs.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_CLASS)) && $(SDK_ZIP) ../bin/$(@F) $(<F)
- $(SDK_ZIP) -u $@ Addons.xcu Jobs.xcu $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-
-$(REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-DevGuideJobsAddon : $(REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)AsyncJob$(QM)" addon component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_MISC))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_JAR)))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu
deleted file mode 100644
index 579bcd3e..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu
+++ /dev/null
@@ -1,220 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="AddonMenu">
- <node oor:name="org.openoffice.Office.addon.example.function" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Add-On example</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 1</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function2</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 2</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- <node oor:name="OfficeMenuBar">
- <node oor:name="org.openoffice.Office.addon.example" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On example</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 1</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>private:separator</value>
- </prop>
- </node>
- <node oor:name="m3" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On sub menu</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="submenu1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function2</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 2</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- </node>
- </node>
- <node oor:name="OfficeToolBar">
- <node oor:name="org.openoffice.Office.addon.example" oor:op="replace">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Function 1</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function2</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Function 2</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="Images">
- <node oor:name="com.sun.star.comp.framework.addon.image1" oor:op="replace">
- <prop oor:name="URL">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmall" oor:type="xs:hexBinary">
- <value>424df80000000000000076000000280000001000000010000000010004000000000000000000120b0000120b000000000000000000000000ff0000ffff0000ff0000ffff0000ff000000ff00ff00ffffff00c0c0c0008080800000000000000080000080800000800000808000008000000080008000cccccccccccccccc2c266b181b666c2c5cc66b818b6665c555566b181b66655555566b818b66655555566b181b6665555a8666bbb6668a55a0a866666668a0a5000a8666668a000a6000a86668a000a556000a868a000a55556000a8a000a5555556000a000a55555555600000a55555555556000a55555555555560a55555550000</value>
- </prop>
- <prop oor:name="ImageBig" oor:type="xs:hexBinary">
- <value>424d180200000000000076000000280000001a0000001a000000010004000000000000000000120b0000120b000000000000000000000000ff0000ffff0000ff0000ffff0000ff000000ff00ff00ffffff00c0c0c000808080000000000000008000008080000080000080800000800000008000800055555555555555555555555555999990cccccccccccccccccccccccccc9055552cc2c6666b18181b6666c2cc2c99ccccc2ccc6666b81818b66668c2cc5902cc25c2586666b18181b66668ccc5590c2cc555586666b81818b6666855555995c25555586666b18181b6666855555995555555586666b81818b6666855555005555555586666b18181b666685555590555555a5866666b181b6666685a5550955555a0a8666666bbb6666668a0a559955a5a000a866666666666668a000a5995a0a00000a8666666666668a00000a90a000600000a86666666668a00000a50900005600000a866666668a00000a5599600055600000a8666668a00000a555095600555600000a86668a00000a55559955605555600000a868a00000a5555599555655555600000a8a00000a555555005555555555600000a00000a555555590555555555556000000000a555555550955555555555560000000a555555555995555555555555600000a555555555590555555555555556000a555555555550055555555555555560a555555555555905555555555555555555555555555559055550000</value>
- </prop>
- <prop oor:name="ImageSmallHC" oor:type="xs:hexBinary">
- <value>424df60000000000000076000000280000001000000010000000010004000000000080000000120b0000120b000000000000000000000000ff0000ffff0000ff0000ffff0000ff000000ff00ff00ffffff00c0c0c00080808000000000000000800000808000008000008080000080000000800080002222222222222222222996969699922252299669669995255559969696999555555996696699955555599696969995555969996669996955969699999996969566696999996966699666969996966695596669696966695555966696966695555559666966695555555596666695555555555966695555555555559695555555</value>
- </prop>
- <prop oor:name="ImageBigHC" oor:type="xs:hexBinary">
- <value/>
- </prop>
- </node>
- </node>
- <node oor:name="com.sun.star.comp.framework.addon.image2" oor:op="replace">
- <prop oor:name="URL">
- <value>org.openoffice.Office.addon.example:Help</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmall" oor:type="xs:hexBinary">
- <value>424d36030000000000003600000028000000100000001000000001001800000000000003000000000000000000000000000000000000ff00ffff00ffff00ffff00fff0eeee6c5f602512133c2b2c2b1719594a4bdcd8d8ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff5443453a2525d0c5bdffffffffffffffffffe6e7e8493c3c5e514eb7b1b0ff00ffff00ffff00ffff00ffff00ff5c4a4dc0bbbcfffffffbeadee7bca8e7bcabdfb4a2f1c4b0fffffad0d0cd584a4dc5bbb8ff00ffff00ffff00ffddd9d9514449ffffffd49578b7511eb5582ed29d85ce8b6db54513ba5f32eeccb8fffffffffffbd3cfcfff00ffff00ffd9cdc5e0d9dadc9270ba4613bf511dc99076edeae7f2dcced27b54bc4811ba5724d3ad96ffffff402d30ff00ffefeae6e9e0daeabba4ba4308cb5b28cb5f2ecc7046d99979db8f66ce6635cc5d2dbf4e1ab85225ffeee5726361b1aaaad8cbc2ffffffbf4911c65b21cf6532cc5d2bcc764edbae97dfa284ce6a3bcc5b2bcc602ebb4310d28259ffffff332124d7cbc2fffffebb2600d0703bcc612ecb5b2bca7a56dfd3cdf5f4f1e1a686cd6333ce622dc95e2abe3901ffffff2b1a1dd8cdc4ffffffbe2f00d36f40cb602dcb5928c95a29ce8666e9ded7f1dcd2d77e56cd612acc6530c43a00ffffff312125d5c8beffffffcf3f00d66e3dcc632fc95d2ccb5522c44f19cf8c6becd4ccde9b81d06435d05b26c65619ffffff251317d9cdc5fefffff09361e87437da794ad29a7edfa68ad56f3bd5835bedd5cbe3b399d36939db6126e9b395ffffff3f3033f5f2f0ded6d1fff1e4f9a36ff28b52e3b39beeefedf3e5d9f2e7def4f0eaeba87ee66d2fee9e72fffffcb28d89c7c6c6ff00ffcbb6aaffffffffebdcfec08ff6b584edcebbeddaddf3dfdff5cab3f79c66fbaa7dfce8dcffffffb99e9bff00ffff00ffdccbc3e0d6cef2f2f2fffffcfff2d1fadca3f6cf91fac588fdc68bffe4c5fffefaffffffe2d4c8f2efeeff00ffff00ffff00fff0ebe6dfd0c9dbcac2f8f7f4fffffffffffffffffffdf8f2e3d9d1cfbfb4ebe3ddff00ffff00ffff00ffff00ffff00ffff00ffff00fffafaf9e1d6ced5c2b9d9c9c2d5c6beddcfc8f4f0efff00ffff00ffff00ffff00ffff00ff</value>
- </prop>
- <prop oor:name="ImageBig" oor:type="xs:hexBinary">
- <value>424d560800000000000036000000280000001a0000001a00000001001800000000002008000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff524142524142524142524142524142524142524142524142ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ff524142524142bda69cd6c7bddecfc6ded7d6e7dfd6e7d7cebdbebdb59694524142524142ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ff524142fffffffffffffffffffffffffffffffffffffffffff7f7f7ffffffffffffffefefbdb6ad524142524142ff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ff524142ffffffffffffffffffefefefdedfdebdb6adc6a694d6a68cdebeade7d7ceefefeff7f7f7ffffffefe7deefe7de524142ff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffbda69cffffffffffffffffffefe7ded6a68cbd6139bd5929ce6942c6795abd5929bd5931ce8663debeadefefeffffffffff7f7efe7de524142ff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffbda69cffffffffffffe7cfc6ce7142bd5929bd5929bd6139d6c7bdffffffd69e84bd5929bd5929bd5929d69e7befefefffffffffefef524142ff00ffff00ffff00ffff00ff0000ff00ffff00ffdecfc6ffffffffffffe7cfc6c66139bd5929c66131ce6131bd7152dedfdeffffffe7c7bdce6131ce6131bd5929bd5929ce8e6befefefffffffdecfc6524142ff00ffff00ffff00ff0000ff00ffff00ffdecfc6ffffffefe7e7ce7142c66131ce6131ce6131ce6131c66131d6a68cefcfbdd68652ce6131ce6131ce6131c66131bd5929d6a68cffffffffffff524142ff00ffff00ffff00ff0000ff00ffdecfc6fff7f7ffffffdeae94bd5929ce6131ce6931ce6131ce6131ce6131ce6939d67142ce6131ce6131ce6131ce6131ce6131bd5929c66139f7dfd6ffffffdecfc6524142ff00ffff00ff0000ff00ffdecfc6fffffff7efefd6714ac66131ce6931ce6931ce6131ce6131c66939debeadffefe7de966bc66131ce6131ce6131ce6131ce6131bd5929deae94ffffffffefe7524142ff00ffff00ff0000ff00ffdecfc6ffffffefd7cece6131ce6931ce6931ce6131ce6131ce6131c66939d6d7d6ffffffdeb69cce6131ce6131ce6131ce6131ce6131bd5929ce8e63f7f7f7ffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffefc7adce6131ce6939ce6931ce6131ce6131ce6131ce6131c6a694f7f7f7fff7efd68e63ce6131ce6131ce6131ce6931ce6131d6714af7efefffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffefc7adce6131d66939ce6931ce6131ce6131ce6131ce6131c66139debeadfffffffff7efd68e63ce6131ce6931ce6931ce6131d6714af7efefffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffffcfb5d67139d67142d66939ce6131ce6131ce6131ce6131ce6131c66939d6c7bdffffffffefefd6714ace6131d66939ce6931d68652fff7f7ffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffffe7dee7794ade7142d67139ce6931ce6131ce6131ce6131ce6131ce6131ce7142f7efefffffffe7ae94ce6131d66939d66939d69673ffffffffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffffffffefa67bef8652de7142d6714adebeadefdfcede9e7bce6131ce6131ce6131f7dfd6ffffffefc7add66939de7142d66939efc7b5ffffffffefef524142ff00ffff00ff0000ff00ffdecfc6f7f7f7ffffffffdfc6f7965af78e5ade794acecfceffffffffefe7d68652ce6131d69e84ffffffffffffdeae94d67139de7142ef9663fff7f7ffffffd6c7bd524142ff00ffff00ff0000ff00ffff00ffdecfc6fffffffffffff7c7adff9e6bf7965ad69e84efefeffffffffffff7ffefdeffffffffffffefe7e7ef9663e7864aef8652f7dfceffffffffffffb59694ff00ffff00ffff00ff0000ff00ffff00ffdecfc6f7f7efffffffffffffffd7adffb684ffa673efb69cdedfdeefefefefefefefefefefe7deefae8cf7965aff9663ffcfb5ffffffffffffdecfc6b59694ff00ffff00ffff00ff0000ff00ffff00ffff00ffdecfc6ffffffffffffffffffffefd6ffdfadffc794ffc794efb69cefb69cffbe9cffb684ffae7bffb68cffe7d6fffffffffffff7efe7bdb6adff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffdecfc6fffffffffffffffffffffff7ffffe7ffffd6ffefb5ffefb5ffdfadffdfadffefd6fffff7fffffffffffffff7efdecfc6ff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffdecfc6fff7efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdecfc6decfc6ff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffdecfc6decfc6fff7effffffffffffffffffffffffffffffffffffffffff7decfc6decfc6ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffdecfc6decfc6decfc6decfc6decfc6decfc6decfc6decfc6ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000</value>
- </prop>
- <prop oor:name="ImageSmallHC" oor:type="xs:hexBinary">
- <value>424d36030000000000003600000028000000100000001000000001001800000000000003000000000000000000000000000000000000ff00ffff00ffff00ffff00fff0eeee6c5f602512133c2b2c2b1719594a4bdcd8d8ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff5443453a2525d0c5bdffffffffffffffffffe6e7e8493c3c5e514eb7b1b0ff00ffff00ffff00ffff00ffff00ff5c4a4dc0bbbcffffffffffffffffffffffffffffffffffffffffffd0d0cd584a4dc5bbb8ff00ffff00ffff00ffddd9d9514449ffffffffffffffffffffffff251317251317fffffffffffffffffffffffffffffbd3cfcfff00ffff00ffd9cdc5e0d9daffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff402d30ff00ffefeae6e9e0daffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffffffffff726361b1aaaad8cbc2ffffffffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffffffffffffffff332124d7cbc2fffffeffffffffffffffffffffffffffffff251317251317000000ffffffffffffffffffffffffffffff2b1a1dd8cdc4ffffffffffffffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffffffffff312125d5c8beffffffffffffffffffffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffff251317d9cdc5feffffffffffffffffffffff000000000000ffffffffffff251317251317ffffffffffffffffffffffff3f3033f5f2f0ded6d1ffffffffffffffffff000000251317251317251317251317000000ffffffffffffffffffb28d89c7c6c6ff00ffcbb6aaffffffffffffffffffffffff000000251317251317000000ffffffffffffffffffffffffb99e9bff00ffff00ffdccbc3e0d6cef2f2f2fffffffffffffffffffffffffffffffffffffffffffffefaffffffe2d4c8f2efeeff00ffff00ffff00fff0ebe6dfd0c9dbcac2f8f7f4fffffffffffffffffffdf8f2e3d9d1cfbfb4ebe3ddff00ffff00ffff00ffff00ffff00ffff00ffff00fffafaf9e1d6ced5c2b9d9c9c2d5c6beddcfc8f4f0efff00ffff00ffff00ffff00ffff00ff</value>
- </prop>
- <prop oor:name="ImageBigHC" oor:type="xs:hexBinary">
- <value/>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="OfficeHelp">
- <node oor:name="com.sun.star.comp.framework.addon" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Help</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value> <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">Ãœber Add-On Beispiel</value>
- <value xml:lang="en-US">About Add-On Example</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
deleted file mode 100644
index a6bc6835..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
+++ /dev/null
@@ -1,163 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the ProtocolHandlerAddon C++ component example of the SDK.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=ProtocolHandlerAddon_cpp
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
-#COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
-COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
-
-REGISTERFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_register_component.flag
-
-CXXFILES = component.cxx \
- addon.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- Example
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-#$(COMP_MAPFILE) : $(SLOFILES)
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-#ifeq "$(OS)" "MACOSX"
-# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-#endif
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-# rule for component package manifest
-$(OUT_COMP_GEN)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)ProtocolHandler.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP_COMPONENTS) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)org.openoffice.Office.addon.example$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)com.sun.star.frame.ProtocolHandler$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) Addons.xcu ProtocolHandler.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_NAME).components
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
- $(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu
- cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-Example : $(REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)ProtocolHandler$(QM)" addon component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo --------------------------------------------------------------------------------
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu
deleted file mode 100644
index c71e8c38..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<oor:component-data oor:name="ProtocolHandler" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="HandlerSet">
- <node oor:name="org.openoffice.Office.addon.example" oor:op="replace">
- <prop oor:name="Protocols" oor:type="oor:string-list">
- <value>org.openoffice.Office.addon.example:*</value>
- </prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
deleted file mode 100644
index de478e67..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <addon.hxx>
-#include <osl/diagnose.h>
-#include <rtl/ustring.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/awt/XToolkit.hpp>
-#include <com/sun/star/awt/XWindowPeer.hpp>
-#include <com/sun/star/awt/WindowAttribute.hpp>
-#include <com/sun/star/awt/XMessageBox.hpp>
-
-using rtl::OUString;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::awt;
-using com::sun::star::lang::XMultiServiceFactory;
-using com::sun::star::beans::PropertyValue;
-using com::sun::star::util::URL;
-
-// This is the service name an Add-On has to implement
-#define SERVICE_NAME "com.sun.star.frame.ProtocolHandler"
-
-
-/**
- * Show a message box with the UNO based toolkit
- */
-static void ShowMessageBox( const Reference< XToolkit >& rToolkit, const Reference< XFrame >& rFrame, const OUString& aTitle, const OUString& aMsgText )
-{
- if ( rFrame.is() && rToolkit.is() )
- {
- // describe window properties.
- WindowDescriptor aDescriptor;
- aDescriptor.Type = WindowClass_MODALTOP;
- aDescriptor.WindowServiceName = OUString( RTL_CONSTASCII_USTRINGPARAM( "infobox" ));
- aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = Reference< XWindowPeer >( rFrame->getContainerWindow(), UNO_QUERY );
- aDescriptor.Bounds = Rectangle(0,0,300,200);
- aDescriptor.WindowAttributes = WindowAttribute::BORDER |
-WindowAttribute::MOVEABLE |
-WindowAttribute::CLOSEABLE;
-
- Reference< XWindowPeer > xPeer = rToolkit->createWindow( aDescriptor );
- if ( xPeer.is() )
- {
- Reference< XMessageBox > xMsgBox( xPeer, UNO_QUERY );
- if ( xMsgBox.is() )
- {
- xMsgBox->setCaptionText( aTitle );
- xMsgBox->setMessageText( aMsgText );
- xMsgBox->execute();
- }
- }
- }
-}
-
-/**
- * Called by the Office framework.
- * One-time initialization. We have to store the context information
- * given, like the frame we are bound to, into our members.
- */
-void SAL_CALL Addon::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException)
-{
- Reference < XFrame > xFrame;
- if ( aArguments.getLength() )
- {
- aArguments[0] >>= xFrame;
- mxFrame = xFrame;
- }
-
- // Create the toolkit to have access to it later
- mxToolkit = Reference< XToolkit >( mxMSF->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.awt.Toolkit" ))), UNO_QUERY );
-}
-
-/**
- * Called by the Office framework.
- * We are ask to query the given URL and return a dispatch object if the URL
- * contains an Add-On command.
- */
-Reference< XDispatch > SAL_CALL Addon::queryDispatch( const URL& aURL, const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags )
- throw( RuntimeException )
-{
- Reference < XDispatch > xRet;
- if ( aURL.Protocol.compareToAscii("org.openoffice.Office.addon.example:") == 0 )
- {
- if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
- xRet = this;
- else if ( aURL.Path.compareToAscii( "Function2" ) == 0 )
- xRet = this;
- else if ( aURL.Path.compareToAscii( "Help" ) == 0 )
- xRet = this;
- }
-
- return xRet;
-}
-
-/**
- * Called by the Office framework.
- * We are ask to execute the given Add-On command URL.
- */
-void SAL_CALL Addon::dispatch( const URL& aURL, const Sequence < PropertyValue >& lArgs ) throw (RuntimeException)
-{
- if ( aURL.Protocol.compareToAscii("org.openoffice.Office.addon.example:") == 0 )
- {
- if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
- {
- ShowMessageBox( mxToolkit, mxFrame,
- OUString( RTL_CONSTASCII_USTRINGPARAM( "SDK Add-On example" )),
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Function 1 activated" )) );
- }
- else if ( aURL.Path.compareToAscii( "Function2" ) == 0 )
- {
- ShowMessageBox( mxToolkit, mxFrame,
- OUString( RTL_CONSTASCII_USTRINGPARAM( "SDK Add-On example" )),
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Function 2 activated" )) );
- }
- else if ( aURL.Path.compareToAscii( "Help" ) == 0 )
- {
- // Show info box
- ShowMessageBox( mxToolkit, mxFrame,
- OUString( RTL_CONSTASCII_USTRINGPARAM( "About SDK Add-On example" )),
- OUString( RTL_CONSTASCII_USTRINGPARAM( "This is the SDK Add-On example" )) );
- }
- }
-}
-
-/**
- * Called by the Office framework.
- * We are ask to query the given sequence of URLs and return dispatch objects if the URLs
- * contain Add-On commands.
- */
-Sequence < Reference< XDispatch > > SAL_CALL Addon::queryDispatches( const Sequence < DispatchDescriptor >& seqDescripts )
- throw( RuntimeException )
-{
- sal_Int32 nCount = seqDescripts.getLength();
- Sequence < Reference < XDispatch > > lDispatcher( nCount );
-
- for( sal_Int32 i=0; i<nCount; ++i )
- lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL, seqDescripts[i].FrameName, seqDescripts[i].SearchFlags );
-
- return lDispatcher;
-}
-
-/**
- * Called by the Office framework.
- * We are ask to query the given sequence of URLs and return dispatch objects if the URLs
- * contain Add-On commands.
- */
-void SAL_CALL Addon::addStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
-{
-}
-
-/**
- * Called by the Office framework.
- * We are ask to query the given sequence of URLs and return dispatch objects if the URLs
- * contain Add-On commands.
- */
-void SAL_CALL Addon::removeStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
-{
-}
-
-//##################################################################################################
-//#### Helper functions for the implementation of UNO component interfaces #########################
-//##################################################################################################
-
-::rtl::OUString Addon_getImplementationName()
-throw (RuntimeException)
-{
- return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
-}
-
-sal_Bool SAL_CALL Addon_supportsService( const ::rtl::OUString& ServiceName )
-throw (RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
-}
-
-Sequence< ::rtl::OUString > SAL_CALL Addon_getSupportedServiceNames()
-throw (RuntimeException)
-{
- Sequence < ::rtl::OUString > aRet(1);
- ::rtl::OUString* pArray = aRet.getArray();
- pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
- return aRet;
-}
-
-Reference< XInterface > SAL_CALL Addon_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*) new Addon( rSMgr );
-}
-
-//##################################################################################################
-//#### Implementation of the recommended/mandatory interfaces of a UNO component ###################
-//##################################################################################################
-
-// XServiceInfo
-::rtl::OUString SAL_CALL Addon::getImplementationName( )
- throw (RuntimeException)
-{
- return Addon_getImplementationName();
-}
-
-sal_Bool SAL_CALL Addon::supportsService( const ::rtl::OUString& rServiceName )
- throw (RuntimeException)
-{
- return Addon_supportsService( rServiceName );
-}
-
-Sequence< ::rtl::OUString > SAL_CALL Addon::getSupportedServiceNames( )
- throw (RuntimeException)
-{
- return Addon_getSupportedServiceNames();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
deleted file mode 100644
index 63f90f23..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _Addon_HXX
-#define _Addon_HXX
-
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/implbase4.hxx>
-
-#define IMPLEMENTATION_NAME "org.openoffice.Office.addon.example"
-
-namespace com
-{
- namespace sun
- {
- namespace star
- {
- namespace frame
- {
- class XFrame;
- }
- namespace awt
- {
- class XToolkit;
- }
- }
- }
-}
-
-class Addon : public cppu::WeakImplHelper4
-<
- com::sun::star::frame::XDispatchProvider,
- com::sun::star::frame::XDispatch,
- com::sun::star::lang::XInitialization,
- com::sun::star::lang::XServiceInfo
->
-{
-private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > mxToolkit;
-
-public:
- Addon( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ) {}
-
- // XDispatchProvider
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
- SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL,
- const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags )
- throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > >
- SAL_CALL queryDispatches(
- const ::com::sun::star::uno::Sequence < ::com::sun::star::frame::DispatchDescriptor >& seqDescriptor )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XDispatch
- virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArgs )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl,
- const ::com::sun::star::util::URL& aURL ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl,
- const ::com::sun::star::util::URL& aURL ) throw (::com::sun::star::uno::RuntimeException);
-
- // XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
-};
-
-::rtl::OUString Addon_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
-
-sal_Bool SAL_CALL Addon_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Addon_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL Addon_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
-
-#endif // _Addon_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
deleted file mode 100644
index 973c12fe..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/queryinterface.hxx> // helper for queryInterface() impl
-#include <cppuhelper/factory.hxx> // helper for component factory
-// generated c++ interfaces
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-// include our specific addon header to get access to functions and definitions
-#include <addon.hxx>
-
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-
-//##################################################################################################
-//#### EXPORTED ####################################################################################
-//##################################################################################################
-
-
-/**
- * This function creates an implementation section in the registry and another subkey
- *
- * for each supported service.
- * @param pServiceManager the service manager
- * @param pRegistryKey the registry key
- */
-// This method not longer necessary since OOo 3.4 where the component registration was
-// was changed to passive component registration. For more details see
-// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-//
-// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
-// {
-// sal_Bool result = sal_False;
-
-// if (pRegistryKey)
-// {
-// try
-// {
-// Reference< XRegistryKey > xNewKey(
-// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-// OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLEMENTATION_NAME "/UNO/SERVICES") ) ) );
-
-// const Sequence< OUString > & rSNL =
-// Addon_getSupportedServiceNames();
-// const OUString * pArray = rSNL.getConstArray();
-// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
-// xNewKey->createKey( pArray[nPos] );
-
-// return sal_True;
-// }
-// catch (InvalidRegistryException &)
-// {
-// // we should not ignore exceptions
-// }
-// }
-// return result;
-// }
-
-/**
- * This function is called to get service factories for an implementation.
- *
- * @param pImplName name of implementation
- * @param pServiceManager a service manager, need for component creation
- * @param pRegistryKey the registry key for this component, need for persistent data
- * @return a component factory
- */
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
-{
- void * pRet = 0;
-
- if (rtl_str_compare( pImplName, IMPLEMENTATION_NAME ) == 0)
- {
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ),
- Addon_createInstance,
- Addon_getSupportedServiceNames() ) );
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Addons.xcu b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Addons.xcu
deleted file mode 100644
index fb904e9a..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Addons.xcu
+++ /dev/null
@@ -1,220 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="AddonMenu">
- <node oor:name="org.openoffice.Office.addon.example.function" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Add-On example</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 1</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function2</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 2</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- <node oor:name="OfficeMenuBar">
- <node oor:name="org.openoffice.Office.addon.example" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On example</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 1</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>private:separator</value>
- </prop>
- </node>
- <node oor:name="m3" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On sub menu</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="submenu1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function2</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Add-On Function 2</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- </node>
- </node>
- <node oor:name="OfficeToolBar">
- <node oor:name="org.openoffice.Office.addon.example" oor:op="replace">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Function 1</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Function2</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">Function 2</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="Images">
- <node oor:name="com.sun.star.comp.framework.addon.image1" oor:op="replace">
- <prop oor:name="URL">
- <value>org.openoffice.Office.addon.example:Function1</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmall" oor:type="xs:hexBinary">
- <value>424df80000000000000076000000280000001000000010000000010004000000000000000000120b0000120b000000000000000000000000ff0000ffff0000ff0000ffff0000ff000000ff00ff00ffffff00c0c0c0008080800000000000000080000080800000800000808000008000000080008000cccccccccccccccc2c266b181b666c2c5cc66b818b6665c555566b181b66655555566b818b66655555566b181b6665555a8666bbb6668a55a0a866666668a0a5000a8666668a000a6000a86668a000a556000a868a000a55556000a8a000a5555556000a000a55555555600000a55555555556000a55555555555560a55555550000</value>
- </prop>
- <prop oor:name="ImageBig" oor:type="xs:hexBinary">
- <value>424d180200000000000076000000280000001a0000001a000000010004000000000000000000120b0000120b000000000000000000000000ff0000ffff0000ff0000ffff0000ff000000ff00ff00ffffff00c0c0c000808080000000000000008000008080000080000080800000800000008000800055555555555555555555555555999990cccccccccccccccccccccccccc9055552cc2c6666b18181b6666c2cc2c99ccccc2ccc6666b81818b66668c2cc5902cc25c2586666b18181b66668ccc5590c2cc555586666b81818b6666855555995c25555586666b18181b6666855555995555555586666b81818b6666855555005555555586666b18181b666685555590555555a5866666b181b6666685a5550955555a0a8666666bbb6666668a0a559955a5a000a866666666666668a000a5995a0a00000a8666666666668a00000a90a000600000a86666666668a00000a50900005600000a866666668a00000a5599600055600000a8666668a00000a555095600555600000a86668a00000a55559955605555600000a868a00000a5555599555655555600000a8a00000a555555005555555555600000a00000a555555590555555555556000000000a555555550955555555555560000000a555555555995555555555555600000a555555555590555555555555556000a555555555550055555555555555560a555555555555905555555555555555555555555555559055550000</value>
- </prop>
- <prop oor:name="ImageSmallHC" oor:type="xs:hexBinary">
- <value>424df60000000000000076000000280000001000000010000000010004000000000080000000120b0000120b000000000000000000000000ff0000ffff0000ff0000ffff0000ff000000ff00ff00ffffff00c0c0c00080808000000000000000800000808000008000008080000080000000800080002222222222222222222996969699922252299669669995255559969696999555555996696699955555599696969995555969996669996955969699999996969566696999996966699666969996966695596669696966695555966696966695555559666966695555555596666695555555555966695555555555559695555555</value>
- </prop>
- <prop oor:name="ImageBigHC" oor:type="xs:hexBinary">
- <value/>
- </prop>
- </node>
- </node>
- <node oor:name="com.sun.star.comp.framework.addon.image2" oor:op="replace">
- <prop oor:name="URL">
- <value>org.openoffice.Office.addon.example:Help</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmall" oor:type="xs:hexBinary">
- <value>424d36030000000000003600000028000000100000001000000001001800000000000003000000000000000000000000000000000000ff00ffff00ffff00ffff00fff0eeee6c5f602512133c2b2c2b1719594a4bdcd8d8ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff5443453a2525d0c5bdffffffffffffffffffe6e7e8493c3c5e514eb7b1b0ff00ffff00ffff00ffff00ffff00ff5c4a4dc0bbbcfffffffbeadee7bca8e7bcabdfb4a2f1c4b0fffffad0d0cd584a4dc5bbb8ff00ffff00ffff00ffddd9d9514449ffffffd49578b7511eb5582ed29d85ce8b6db54513ba5f32eeccb8fffffffffffbd3cfcfff00ffff00ffd9cdc5e0d9dadc9270ba4613bf511dc99076edeae7f2dcced27b54bc4811ba5724d3ad96ffffff402d30ff00ffefeae6e9e0daeabba4ba4308cb5b28cb5f2ecc7046d99979db8f66ce6635cc5d2dbf4e1ab85225ffeee5726361b1aaaad8cbc2ffffffbf4911c65b21cf6532cc5d2bcc764edbae97dfa284ce6a3bcc5b2bcc602ebb4310d28259ffffff332124d7cbc2fffffebb2600d0703bcc612ecb5b2bca7a56dfd3cdf5f4f1e1a686cd6333ce622dc95e2abe3901ffffff2b1a1dd8cdc4ffffffbe2f00d36f40cb602dcb5928c95a29ce8666e9ded7f1dcd2d77e56cd612acc6530c43a00ffffff312125d5c8beffffffcf3f00d66e3dcc632fc95d2ccb5522c44f19cf8c6becd4ccde9b81d06435d05b26c65619ffffff251317d9cdc5fefffff09361e87437da794ad29a7edfa68ad56f3bd5835bedd5cbe3b399d36939db6126e9b395ffffff3f3033f5f2f0ded6d1fff1e4f9a36ff28b52e3b39beeefedf3e5d9f2e7def4f0eaeba87ee66d2fee9e72fffffcb28d89c7c6c6ff00ffcbb6aaffffffffebdcfec08ff6b584edcebbeddaddf3dfdff5cab3f79c66fbaa7dfce8dcffffffb99e9bff00ffff00ffdccbc3e0d6cef2f2f2fffffcfff2d1fadca3f6cf91fac588fdc68bffe4c5fffefaffffffe2d4c8f2efeeff00ffff00ffff00fff0ebe6dfd0c9dbcac2f8f7f4fffffffffffffffffffdf8f2e3d9d1cfbfb4ebe3ddff00ffff00ffff00ffff00ffff00ffff00ffff00fffafaf9e1d6ced5c2b9d9c9c2d5c6beddcfc8f4f0efff00ffff00ffff00ffff00ffff00ff</value>
- </prop>
- <prop oor:name="ImageBig" oor:type="xs:hexBinary">
- <value>424d560800000000000036000000280000001a0000001a00000001001800000000002008000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff524142524142524142524142524142524142524142524142ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ff524142524142bda69cd6c7bddecfc6ded7d6e7dfd6e7d7cebdbebdb59694524142524142ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ff524142fffffffffffffffffffffffffffffffffffffffffff7f7f7ffffffffffffffefefbdb6ad524142524142ff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ff524142ffffffffffffffffffefefefdedfdebdb6adc6a694d6a68cdebeade7d7ceefefeff7f7f7ffffffefe7deefe7de524142ff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffbda69cffffffffffffffffffefe7ded6a68cbd6139bd5929ce6942c6795abd5929bd5931ce8663debeadefefeffffffffff7f7efe7de524142ff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffbda69cffffffffffffe7cfc6ce7142bd5929bd5929bd6139d6c7bdffffffd69e84bd5929bd5929bd5929d69e7befefefffffffffefef524142ff00ffff00ffff00ffff00ff0000ff00ffff00ffdecfc6ffffffffffffe7cfc6c66139bd5929c66131ce6131bd7152dedfdeffffffe7c7bdce6131ce6131bd5929bd5929ce8e6befefefffffffdecfc6524142ff00ffff00ffff00ff0000ff00ffff00ffdecfc6ffffffefe7e7ce7142c66131ce6131ce6131ce6131c66131d6a68cefcfbdd68652ce6131ce6131ce6131c66131bd5929d6a68cffffffffffff524142ff00ffff00ffff00ff0000ff00ffdecfc6fff7f7ffffffdeae94bd5929ce6131ce6931ce6131ce6131ce6131ce6939d67142ce6131ce6131ce6131ce6131ce6131bd5929c66139f7dfd6ffffffdecfc6524142ff00ffff00ff0000ff00ffdecfc6fffffff7efefd6714ac66131ce6931ce6931ce6131ce6131c66939debeadffefe7de966bc66131ce6131ce6131ce6131ce6131bd5929deae94ffffffffefe7524142ff00ffff00ff0000ff00ffdecfc6ffffffefd7cece6131ce6931ce6931ce6131ce6131ce6131c66939d6d7d6ffffffdeb69cce6131ce6131ce6131ce6131ce6131bd5929ce8e63f7f7f7ffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffefc7adce6131ce6939ce6931ce6131ce6131ce6131ce6131c6a694f7f7f7fff7efd68e63ce6131ce6131ce6131ce6931ce6131d6714af7efefffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffefc7adce6131d66939ce6931ce6131ce6131ce6131ce6131c66139debeadfffffffff7efd68e63ce6131ce6931ce6931ce6131d6714af7efefffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffffcfb5d67139d67142d66939ce6131ce6131ce6131ce6131ce6131c66939d6c7bdffffffffefefd6714ace6131d66939ce6931d68652fff7f7ffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffffe7dee7794ade7142d67139ce6931ce6131ce6131ce6131ce6131ce6131ce7142f7efefffffffe7ae94ce6131d66939d66939d69673ffffffffffff524142ff00ffff00ff0000ff00ffdecfc6ffffffffffffefa67bef8652de7142d6714adebeadefdfcede9e7bce6131ce6131ce6131f7dfd6ffffffefc7add66939de7142d66939efc7b5ffffffffefef524142ff00ffff00ff0000ff00ffdecfc6f7f7f7ffffffffdfc6f7965af78e5ade794acecfceffffffffefe7d68652ce6131d69e84ffffffffffffdeae94d67139de7142ef9663fff7f7ffffffd6c7bd524142ff00ffff00ff0000ff00ffff00ffdecfc6fffffffffffff7c7adff9e6bf7965ad69e84efefeffffffffffff7ffefdeffffffffffffefe7e7ef9663e7864aef8652f7dfceffffffffffffb59694ff00ffff00ffff00ff0000ff00ffff00ffdecfc6f7f7efffffffffffffffd7adffb684ffa673efb69cdedfdeefefefefefefefefefefe7deefae8cf7965aff9663ffcfb5ffffffffffffdecfc6b59694ff00ffff00ffff00ff0000ff00ffff00ffff00ffdecfc6ffffffffffffffffffffefd6ffdfadffc794ffc794efb69cefb69cffbe9cffb684ffae7bffb68cffe7d6fffffffffffff7efe7bdb6adff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffdecfc6fffffffffffffffffffffff7ffffe7ffffd6ffefb5ffefb5ffdfadffdfadffefd6fffff7fffffffffffffff7efdecfc6ff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffdecfc6fff7efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdecfc6decfc6ff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffdecfc6decfc6fff7effffffffffffffffffffffffffffffffffffffffff7decfc6decfc6ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffdecfc6decfc6decfc6decfc6decfc6decfc6decfc6decfc6ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000</value>
- </prop>
- <prop oor:name="ImageSmallHC" oor:type="xs:hexBinary">
- <value>424d36030000000000003600000028000000100000001000000001001800000000000003000000000000000000000000000000000000ff00ffff00ffff00ffff00fff0eeee6c5f602512133c2b2c2b1719594a4bdcd8d8ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff5443453a2525d0c5bdffffffffffffffffffe6e7e8493c3c5e514eb7b1b0ff00ffff00ffff00ffff00ffff00ff5c4a4dc0bbbcffffffffffffffffffffffffffffffffffffffffffd0d0cd584a4dc5bbb8ff00ffff00ffff00ffddd9d9514449ffffffffffffffffffffffff251317251317fffffffffffffffffffffffffffffbd3cfcfff00ffff00ffd9cdc5e0d9daffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff402d30ff00ffefeae6e9e0daffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffffffffff726361b1aaaad8cbc2ffffffffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffffffffffffffff332124d7cbc2fffffeffffffffffffffffffffffffffffff251317251317000000ffffffffffffffffffffffffffffff2b1a1dd8cdc4ffffffffffffffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffffffffff312125d5c8beffffffffffffffffffffffffffffffffffffffffffffffff251317251317ffffffffffffffffffffffff251317d9cdc5feffffffffffffffffffffff000000000000ffffffffffff251317251317ffffffffffffffffffffffff3f3033f5f2f0ded6d1ffffffffffffffffff000000251317251317251317251317000000ffffffffffffffffffb28d89c7c6c6ff00ffcbb6aaffffffffffffffffffffffff000000251317251317000000ffffffffffffffffffffffffb99e9bff00ffff00ffdccbc3e0d6cef2f2f2fffffffffffffffffffffffffffffffffffffffffffffefaffffffe2d4c8f2efeeff00ffff00ffff00fff0ebe6dfd0c9dbcac2f8f7f4fffffffffffffffffffdf8f2e3d9d1cfbfb4ebe3ddff00ffff00ffff00ffff00ffff00ffff00ffff00fffafaf9e1d6ced5c2b9d9c9c2d5c6beddcfc8f4f0efff00ffff00ffff00ffff00ffff00ff</value>
- </prop>
- <prop oor:name="ImageBigHC" oor:type="xs:hexBinary">
- <value/>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="OfficeHelp">
- <node oor:name="com.sun.star.comp.framework.addon" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.example:Help</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">Ãœber Add-On Beispiel</value>
- <value xml:lang="en-US">About Add-On Example</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
deleted file mode 100644
index 82a87aea..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
+++ /dev/null
@@ -1,139 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the ProtoclHandlerAddon Java component example of the SDK.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=ProtocolHandlerAddon_java
-OUT_COMP_CLASS=$(OUT_CLASS)/$(COMP_NAME)
-OUT_COMP_MISC=$(OUT_MISC)/$(COMP_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(OUT_CLASS)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_COMPONENTS=$(COMP_NAME).components
-
-REGISTERFLAG=$(OUT_COMP_MISC)$(PS)java_$(COMP_NAME)_register_component.flag
-
-JAVAFILES = ProtocolHandlerAddon.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : DevGuideProtocolHandlerAddon
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: ProtocolHandlerAddon> $@
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) .
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)ProtocolHandler.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_JAR) Addons.xcu ProtocolHandler.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_MISC))
- cd $(subst /,$(PS),$(OUT_COMP_MISC)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
- $(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-DevGuideProtocolHandlerAddon : $(REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)ProtocolHandler$(QM)" addon component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $SDJ_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_MISC))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_JAR)))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandler.xcu b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandler.xcu
deleted file mode 100644
index 27444dd1..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandler.xcu
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data oor:name="ProtocolHandler" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="HandlerSet">
- <node oor:name="ProtocolHandlerAddon$ProtocolHandlerAddonImpl" oor:op="replace">
- <prop oor:name="Protocols" oor:type="oor:string-list">
- <value>org.openoffice.Office.addon.example:*</value>
- </prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
deleted file mode 100644
index 0a242afb..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.Type;
-import com.sun.star.frame.XStatusListener;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.DispatchDescriptor;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.WindowAttribute;
-import com.sun.star.awt.WindowClass;
-import com.sun.star.awt.WindowDescriptor;
-import com.sun.star.awt.Rectangle;
-
-public class ProtocolHandlerAddon {
- /** This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class ProtocolHandlerAddonImpl extends WeakBase implements
- XDispatchProvider,
- XDispatch,
- XInitialization,
- XServiceInfo {
-
- /** The service name, that must be used to get an instance of this service.
- */
- static private final String[] m_serviceNames = { "com.sun.star.frame.ProtocolHandler" };
-
- /** The component context, that gives access to the service manager and all registered services.
- */
- private XComponentContext m_xCmpCtx;
-
- /** The toolkit, that we can create UNO dialogs.
- */
- private XToolkit m_xToolkit;
-
- /** The frame where the addon depends on.
- */
- private XFrame m_xFrame;
- private XStatusListener m_xStatusListener;
-
-
- /** The constructor of the inner class has a XMultiServiceFactory parameter.
- * @param xmultiservicefactoryInitialization A special service factory
- * could be introduced while initializing.
- */
- public ProtocolHandlerAddonImpl( XComponentContext xComponentContext ) {
- m_xCmpCtx = xComponentContext;
- }
-
- /** This method is a member of the interface for initializing an object
- * directly after its creation.
- * @param object This array of arbitrary objects will be passed to the
- * component after its creation.
- * @throws Exception Every exception will not be handled, but will be
- * passed to the caller.
- */
- public void initialize( Object[] object )
- throws com.sun.star.uno.Exception {
-
- if ( object.length > 0 )
- {
- m_xFrame = ( XFrame ) UnoRuntime.queryInterface(
- XFrame.class, object[ 0 ] );
- }
-
- // Create the toolkit to have access to it later
- m_xToolkit = (XToolkit) UnoRuntime.queryInterface(
- XToolkit.class,
- m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
- m_xCmpCtx));
- }
-
- /** This method returns an array of all supported service names.
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- public static String[] getServiceNames() {
- return m_serviceNames;
- }
-
- /** This method returns true, if the given service will be
- * supported by the component.
- * @param stringService Service name.
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService( String sService ) {
- int len = m_serviceNames.length;
-
- for( int i=0; i < len; i++) {
- if ( sService.equals( m_serviceNames[i] ) )
- return true;
- }
-
- return false;
- }
-
- /** Return the class name of the component.
- * @return Class name of the component.
- */
- public String getImplementationName() {
- return ProtocolHandlerAddonImpl.class.getName();
- }
-
- // XDispatchProvider
- public XDispatch queryDispatch( /*IN*/com.sun.star.util.URL aURL,
- /*IN*/String sTargetFrameName,
- /*IN*/int iSearchFlags ) {
- XDispatch xRet = null;
- if ( aURL.Protocol.compareTo("org.openoffice.Office.addon.example:") == 0 ) {
- if ( aURL.Path.compareTo( "Function1" ) == 0 )
- xRet = this;
- if ( aURL.Path.compareTo( "Function2" ) == 0 )
- xRet = this;
- if ( aURL.Path.compareTo( "Help" ) == 0 )
- xRet = this;
- }
- return xRet;
- }
-
- public XDispatch[] queryDispatches( /*IN*/DispatchDescriptor[] seqDescripts ) {
- int nCount = seqDescripts.length;
- XDispatch[] lDispatcher = new XDispatch[nCount];
-
- for( int i=0; i<nCount; ++i )
- lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL,
- seqDescripts[i].FrameName,
- seqDescripts[i].SearchFlags );
-
- return lDispatcher;
- }
-
- // XDispatch
- public void dispatch( /*IN*/com.sun.star.util.URL aURL,
- /*IN*/com.sun.star.beans.PropertyValue[] aArguments ) {
-
- if ( aURL.Protocol.compareTo("org.openoffice.Office.addon.example:") == 0 )
- {
- if ( aURL.Path.compareTo( "Function1" ) == 0 )
- {
- showMessageBox("SDK DevGuide Add-On example", "Function 1 activated");
- }
- if ( aURL.Path.compareTo( "Function2" ) == 0 )
- {
- showMessageBox("SDK DevGuide Add-On example", "Function 2 activated");
- }
- if ( aURL.Path.compareTo( "Help" ) == 0 )
- {
- showMessageBox("About SDK DevGuide Add-On example", "This is the SDK Add-On example");
- }
- }
- }
-
- public void addStatusListener( /*IN*/XStatusListener xControl,
- /*IN*/com.sun.star.util.URL aURL ) {
- }
-
- public void removeStatusListener( /*IN*/XStatusListener xControl,
- /*IN*/com.sun.star.util.URL aURL ) {
- }
-
- public void showMessageBox(String sTitle, String sMessage) {
- try {
- if ( null != m_xFrame && null != m_xToolkit ) {
-
- // describe window properties.
- WindowDescriptor aDescriptor = new WindowDescriptor();
- aDescriptor.Type = WindowClass.MODALTOP;
- aDescriptor.WindowServiceName = new String( "infobox" );
- aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = (XWindowPeer)UnoRuntime.queryInterface(
- XWindowPeer.class, m_xFrame.getContainerWindow());
- aDescriptor.Bounds = new Rectangle(0,0,300,200);
- aDescriptor.WindowAttributes = WindowAttribute.BORDER |
- WindowAttribute.MOVEABLE |
- WindowAttribute.CLOSEABLE;
-
- XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
- if ( null != xPeer ) {
- XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
- XMessageBox.class, xPeer);
- if ( null != xMsgBox )
- {
- xMsgBox.setCaptionText( sTitle );
- xMsgBox.setMessageText( sMessage );
- xMsgBox.execute();
- }
- }
- }
- } catch ( com.sun.star.uno.Exception e) {
- // do your error handling
- }
- }
- }
-
-
- /** Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return Returns a <code>XSingleServiceFactory</code> for creating the
- * component.
- * @see com.sun.star.comp.loader.JavaLoader#
- * @param stringImplementationName The implementation name of the component.
- * @param xmultiservicefactory The service manager, who gives access to every
- * known service.
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplementationName.equals( ProtocolHandlerAddonImpl.class.getName() ) )
- xFactory = Factory.createComponentFactory(ProtocolHandlerAddonImpl.class,
- ProtocolHandlerAddonImpl.getServiceNames());
-
- return xFactory;
- }
-
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @see com.sun.star.lib.uno.helper.Factory#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// XRegistryKey xRegistryKey ) {
-// return Factory.writeRegistryServiceInfo(
-// ProtocolHandlerAddonImpl.class.getName(),
-// ProtocolHandlerAddonImpl.getServiceNames(),
-// xRegistryKey );
-// }
-}
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components
deleted file mode 100644
index 13665ebb..00000000
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="ProtocolHandlerAddon_java.uno.jar">
- <implementation name="ProtocolHandlerAddon$ProtocolHandlerAddonImpl">
- <service name="com.sun.star.frame.ProtocolHandler"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
deleted file mode 100644
index 84195a8f..00000000
--- a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
+++ /dev/null
@@ -1,238 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the C++ component example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=CppComponentSample
-SAMPLE_INC_OUT=$(OUT_INC)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-SAMPLE_SLO_OUT=$(OUT_SLO)/$(SAMPLE_NAME)
-SAMPLE_OBJ_OUT=$(OUT_OBJ)/$(SAMPLE_NAME)
-
-COMP_NAME=CppComponent
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-
-APP1_NAME= TestCppComponent
-APP1_BINARY= $(OUT_BIN)/$(APP1_NAME)$(EXE_EXT)
-
-COMP_RDB_NAME = $(COMP_NAME).uno.rdb
-COMP_RDB = $(SAMPLE_GEN_OUT)/$(COMP_RDB_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(SAMPLE_GEN_OUT)/$(COMP_NAME)/META-INF/manifest.xml
-#COMP_MAPFILE = $(SAMPLE_GEN_OUT)/$(COMP_NAME).uno.map
-COMP_COMPONENTS = $(SAMPLE_GEN_OUT)/$(COMP_NAME).components
-
-COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_register_component.flag
-COMP_TYPEFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_types.flag
-
-IDLFILES = some.idl
-
-CXXFILES = service1_impl.cxx \
- service2_impl.cxx
-
-SLOFILES = $(patsubst %.cxx,$(SAMPLE_SLO_OUT)/%.$(OBJ_EXT),$(CXXFILES))
-
-GENURDFILES = $(patsubst %.idl,$(SAMPLE_GEN_OUT)/%.urd,$(IDLFILES))
-
-TYPELIST=-Tmy_module.XSomething \
- -Tmy_modules.MyService1 \
- -Tmy_module.MyService2
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -I. -I$(IDL_DIR) -O$(SAMPLE_GEN_OUT) $<
-
-$(SAMPLE_GEN_OUT)/%.rdb : $(GENURDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GENURDFILES)
-
-$(COMP_TYPEFLAG) : $(COMP_RDB) $(SDKTYPEFLAG)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CPPUMAKER) -Gc -BUCR -O$(SAMPLE_INC_OUT) $(TYPESLIST) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
- echo flagged > $@
-
-$(SAMPLE_SLO_OUT)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(SAMPLE_INC_OUT) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-#$(COMP_MAPFILE) : $(SLOFILES)
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-#ifeq "$(OS)" "MACOSX"
-# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-#endif
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(SAMPLE_GEN_OUT)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-# rule for component package manifest
-$(SAMPLE_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP_COMPONENTS) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)my_module.my_sc_implementation.MyService1$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)my_module.MyService1$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)my_module.my_sc_implementation.MyService2$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)my_module.MyService2$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) $(COMP_RDB) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_NAME).components
- cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(UNOPKG_PLATFORM)/$(<F)
- cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(SAMPLE_OBJ_OUT)/$(APP1_NAME).$(OBJ_EXT) : $(APP1_NAME).cxx $(COMP_TYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(SAMPLE_INC_OUT) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(OUT_BIN)/_$(APP1_NAME)$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/$(APP1_NAME).$(OBJ_EXT)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
-ifeq "$(OS)" "WIN"
- $(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(SAMPLE_GEN_OUT)/$(basename $(@F)).map \
- $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-else
- $(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS_BIN) $@
-endif
-endif
-
-$(OUT_BIN)/$(APP1_NAME)$(EXE_EXT) : $(OUT_BIN)/_$(APP1_NAME)$(EXE_EXT)
- $(COPY) $(subst /,$(PS),$(BIN_DIR)/unoapploader$(EXE_EXT)) $(subst /,$(PS),$@)
-# touch the target to renew the date for correct dependencies.
-# Note: no touch under windows! The unoapploader.exe is copied always.
-ifneq "$(OS)" "WIN"
- touch $@
-endif
-
-$(SAMPLE_NAME) : $(COMP_REGISTERFLAG) $(APP1_BINARY)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------
- @echo The simple C++ component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description. You can also load the "$(QM)SimpleComponent.odt$(QM)" document containing
- @echo a StarBasic macro which uses this component.
- @echo -
- @echo $(MAKE) SimpleComponent.odt.load
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_BIN)/%$(EXE_EXT)
- $(subst /,$(PS),$(OUT_BIN))$(PS)$(basename $@)
-# cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
-
-SimpleComponent.odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_INC_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_SLO_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_OBJ_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/$(COMP_NAME)*))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/*$(APP1_NAME)*))
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/SimpleComponent.odt b/odk/examples/DevelopersGuide/Components/CppComponent/SimpleComponent.odt
deleted file mode 100644
index e8d7e913..00000000
--- a/odk/examples/DevelopersGuide/Components/CppComponent/SimpleComponent.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx
deleted file mode 100644
index 024c9f50..00000000
--- a/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-#include <sal/main.h>
-#include <cppuhelper/bootstrap.hxx>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <my_module/MyService1.hpp>
-#include <my_module/MyService2.hpp>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::frame;
-
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-
-SAL_IMPLEMENT_MAIN()
-{
- try
- {
- // get the remote office component context
- Reference< XComponentContext > xContext( ::cppu::bootstrap() );
- fprintf(stdout, "\nconnected to a running office...\n");
-
- // create a new instance of MyService1
- Reference<my_module::XSomething> xSomething =
- my_module::MyService1::create(xContext);
-
- // call methodOne and print the return value on stdout
- OUString s = xSomething->methodOne(OUString(RTL_CONSTASCII_USTRINGPARAM("Hello World!")));
- fprintf(stdout,"\nCreate new instance of MyService1\nCall of XSomething.methOne at MyService1 = %s", OUStringToOString( s, RTL_TEXTENCODING_ASCII_US ).getStr());
-
- // create a new instance of MyService2 with the specified string argument
- xSomething = my_module::MyService2::create(xContext, OUString(RTL_CONSTASCII_USTRINGPARAM("Hello My World!")));
-
- // call methodTwo and print the return value of methodTwo
- s = xSomething->methodTwo();
- fprintf(stdout, "\n\nCreate new instance of MyService2 with argument\nCall of XSomething.methTwo at MyService2 = %s", OUStringToOString( s, RTL_TEXTENCODING_ASCII_US ).getStr());
-
- fprintf(stdout, "\n\nPlease press 'return' to finish the example!\n");
- getchar();
- }
- catch ( ::cppu::BootstrapException & e )
- {
- fprintf(stderr, "\ncaught BootstrapException: %s\n",
- OUStringToOString( e.getMessage(), RTL_TEXTENCODING_ASCII_US ).getStr());
- return 1;
- }
- catch ( Exception & e )
- {
- fprintf(stderr, "\ncaught UNO exception: %s\n",
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
- return 1;
- }
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
deleted file mode 100644
index 80be3361..00000000
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ /dev/null
@@ -1,258 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <osl/interlck.h>
-#include <osl/mutex.hxx>
-#include <rtl/uuid.h>
-#include <rtl/instance.hpp>
-#include <cppuhelper/factory.hxx>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <my_module/XSomething.hpp>
-
-
-using namespace ::rtl; // for OUString
-using namespace ::com::sun::star; // for odk interfaces
-using namespace ::com::sun::star::uno; // for basic types
-
-namespace my_sc_impl
-{
-
-Sequence< OUString > SAL_CALL getSupportedServiceNames_MyService1Impl()
-{
- Sequence< OUString > names(1);
- names[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("my_module.MyService1"));
- return names;
-}
-
-OUString SAL_CALL getImplementationName_MyService1Impl()
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.my_sc_implementation.MyService1") );
-}
-
-
-class MyService1Impl
- : public ::my_module::XSomething
- , public lang::XServiceInfo
- , public lang::XTypeProvider
-{
- oslInterlockedCount m_refcount;
- OUString m_sData;
- // it's good practise to store the context for further use when you use
- // other UNO API's in your implementation
- Reference< XComponentContext > m_xContext;
-public:
- inline MyService1Impl(Reference< XComponentContext > const & xContext) throw ()
- : m_refcount( 0 ),
- m_xContext(xContext)
- {}
-
- virtual ~MyService1Impl() {}
-
- // XInterface
- virtual Any SAL_CALL queryInterface( Type const & type )
- throw (RuntimeException);
- virtual void SAL_CALL acquire()
- throw ();
- virtual void SAL_CALL release()
- throw ();
- // XTypeProvider
- virtual Sequence< Type > SAL_CALL getTypes()
- throw (RuntimeException);
- virtual Sequence< sal_Int8 > SAL_CALL getImplementationId()
- throw (RuntimeException);
- // XSomething
- virtual OUString SAL_CALL methodOne( OUString const & str )
- throw (RuntimeException);
- virtual OUString SAL_CALL methodTwo( )
- throw (RuntimeException);
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName()
- throw (RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( OUString const & serviceName )
- throw (RuntimeException);
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames()
- throw (RuntimeException);
-};
-
-// XInterface implementation
-Any MyService1Impl::queryInterface( Type const & type )
- throw (RuntimeException)
-{
- if (type.equals(::cppu::UnoType< Reference< XInterface > >::get()))
- {
- // return XInterface interface
- // (resolve ambiguity by casting to lang::XTypeProvider)
- Reference< XInterface > x(
- static_cast< lang::XTypeProvider * >( this ) );
- return makeAny( x );
- }
- if (type.equals(::cppu::UnoType< Reference< lang::XTypeProvider > >::get()))
- {
- // return XInterface interface
- Reference< XInterface > x(
- static_cast< lang::XTypeProvider * >( this ) );
- return makeAny( x );
- }
- if (type.equals(::cppu::UnoType< Reference< lang::XServiceInfo > >::get()))
- {
- // return XServiceInfo interface
- Reference< lang::XServiceInfo > x(
- static_cast< lang::XServiceInfo * >( this ) );
- return makeAny( x );
- }
- if (type.equals(::cppu::UnoType< Reference< ::my_module::XSomething > >::get()))
- {
- // return sample interface
- Reference< ::my_module::XSomething > x(
- static_cast< ::my_module::XSomething * >( this ) );
- return makeAny( x );
- }
- // querying for unsupported type
- return Any();
-}
-
-void MyService1Impl::acquire()
- throw ()
-{
- // thread-safe incrementation of reference count
- ::osl_incrementInterlockedCount( &m_refcount );
-}
-
-void MyService1Impl::release()
- throw ()
-{
- // thread-safe decrementation of reference count
- if (0 == ::osl_decrementInterlockedCount( &m_refcount ))
- {
- delete this; // shutdown this object
- }
-}
-
-// XTypeProvider implementation
-Sequence< Type > MyService1Impl::getTypes()
- throw (RuntimeException)
-{
- Sequence< Type > seq( 3 );
- seq[ 0 ] = ::cppu::UnoType< Reference< lang::XTypeProvider > >::get();
- seq[ 1 ] = ::cppu::UnoType< Reference< lang::XServiceInfo > >::get();
- seq[ 2 ] = ::cppu::UnoType< Reference< ::my_module::XSomething > >::get();
- return seq;
-}
-namespace
-{
- // class to create an unique id
- class UniqueIdInit
- {
- private:
- ::com::sun::star::uno::Sequence< sal_Int8 > m_aSeq;
- public:
- UniqueIdInitIdInit() : m_aSeq(16)
- {
- rtl_createUuid( (sal_uInt8*)m_aSeq.getArray(), 0, sal_True );
- }
- const ::com::sun::star::uno::Sequence< sal_Int8 >& getSeq() const { return m_aSeq; }
- };
- //A multi-thread safe UniqueIdInitIdInit singleton wrapper
- class theService1ImplImplementationId
- : public rtl::Static< UniqueIdInitIdInit,
- theService1ImplImplementationId >
- {
- };
-}
-Sequence< sal_Int8 > MyService1Impl::getImplementationId()
- throw (RuntimeException)
-{
- //create a singleton that generates a unique id on
- //first initialization and returns the same one
- //on subsequent calls.
- return theService1ImplImplementationId::get().getSeq();
-}
-
-// XSomething implementation
-OUString MyService1Impl::methodOne( OUString const & str )
- throw (RuntimeException)
-{
- m_sData = str;
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "called methodOne() of MyService1 implementation: ") ) + m_sData;
-}
-
-OUString MyService1Impl::methodTwo( )
- throw (RuntimeException)
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "called methodTwo() of MyService1 implementation: ") ) + m_sData;
-}
-
-// XServiceInfo implementation
-OUString MyService1Impl::getImplementationName()
- throw (RuntimeException)
-{
- // unique implementation name
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.my_sc_implementation.MyService1") );
-}
-sal_Bool MyService1Impl::supportsService( OUString const & serviceName )
- throw (RuntimeException)
-{
- // this object only supports one service, so the test is simple
- return serviceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "my_module.MyService1") );
-}
-Sequence< OUString > MyService1Impl::getSupportedServiceNames()
- throw (RuntimeException)
-{
- // this object only supports one service
- OUString serviceName( RTL_CONSTASCII_USTRINGPARAM("my_module.MyService1") );
- return Sequence< OUString >( &serviceName, 1 );
-}
-
-Reference< XInterface > SAL_CALL create_MyService1Impl(
- Reference< XComponentContext > const & xContext )
- SAL_THROW( () )
-{
- return static_cast< lang::XTypeProvider * >( new MyService1Impl( xContext) );
-}
-
-// forward decl: implemented in service2_impl.cxx
-Reference< XInterface > SAL_CALL create_MyService2Impl(
- Reference< XComponentContext > const & ) SAL_THROW( () );
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
deleted file mode 100644
index 5d82ffc8..00000000
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <cppuhelper/implbase3.hxx> // "3" implementing three interfaces
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/implementationentry.hxx>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <my_module/XSomething.hpp>
-
-
-using namespace ::rtl; // for OUString
-using namespace ::com::sun::star; // for odk interfaces
-using namespace ::com::sun::star::uno; // for basic types
-
-
-namespace my_sc_impl
-{
-
-extern Sequence< OUString > SAL_CALL getSupportedServiceNames_MyService1Impl();
-extern OUString SAL_CALL getImplementationName_MyService1Impl();
-extern Reference< XInterface > SAL_CALL create_MyService1Impl(
- Reference< XComponentContext > const & xContext )
- SAL_THROW( () );
-
-static Sequence< OUString > getSupportedServiceNames_MyService2Impl()
-{
- Sequence<OUString> names(1);
- names[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("my_module.MyService2"));
- return names;
-}
-
-static OUString getImplementationName_MyService2Impl()
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.my_sc_implementation.MyService2") );
-}
-
-class MyService2Impl : public ::cppu::WeakImplHelper3<
- ::my_module::XSomething, lang::XServiceInfo, lang::XInitialization >
-{
- OUString m_sData;
- // it's good practise to store the context for further use when you use
- // other UNO API's in your implementation
- Reference< XComponentContext > m_xContext;
-public:
- inline MyService2Impl(Reference< XComponentContext > const & xContext) throw ()
- : m_xContext(xContext)
- {}
-
- virtual ~MyService2Impl() {}
-
- // focus on three given interfaces,
- // no need to implement XInterface, XTypeProvider, XWeak
-
- // XInitialization will be called upon
- // createInstanceWithArguments[AndContext]()
- virtual void SAL_CALL initialize( Sequence< Any > const & args )
- throw (Exception);
- // XSomething
- virtual OUString SAL_CALL methodOne( OUString const & str )
- throw (RuntimeException);
- virtual OUString SAL_CALL methodTwo( )
- throw (RuntimeException);
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName()
- throw (RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( OUString const & serviceName )
- throw (RuntimeException);
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames()
- throw (RuntimeException);
-};
-
-// XInitialization implemention
-void MyService2Impl::initialize( Sequence< Any > const & args )
- throw (Exception)
-{
- if (args.getLength() != 1)
- {
- throw lang::IllegalArgumentException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "give a string instanciating this component!") ),
- // resolve to XInterface reference:
- static_cast< ::cppu::OWeakObject * >(this),
- 0 ); // argument pos
- }
- if (! (args[ 0 ] >>= m_sData))
- {
- throw lang::IllegalArgumentException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "no string given as argument!") ),
- // resolve to XInterface reference:
- static_cast< ::cppu::OWeakObject * >(this),
- 0 ); // argument pos
- }
-}
-
-// XSomething implementation
-OUString MyService2Impl::methodOne( OUString const & str )
- throw (RuntimeException)
-{
- m_sData = str;
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "called methodOne() of MyService2 implementation: ") ) + m_sData;
-}
-
-OUString MyService2Impl::methodTwo( )
- throw (RuntimeException)
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "called methodTwo() of MyService2 implementation: ") ) + m_sData;
-}
-
-// XServiceInfo implementation
-OUString MyService2Impl::getImplementationName()
- throw (RuntimeException)
-{
- // unique implementation name
- return OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.my_sc_implementation.MyService2") );
-}
-
-sal_Bool MyService2Impl::supportsService( OUString const & serviceName )
- throw (RuntimeException)
-{
- // this object only supports one service, so the test is simple
- return serviceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "my_module.MyService2") );
-}
-
-Sequence< OUString > MyService2Impl::getSupportedServiceNames()
- throw (RuntimeException)
-{
- return getSupportedServiceNames_MyService2Impl();
-}
-
-Reference< XInterface > SAL_CALL create_MyService2Impl(
- Reference< XComponentContext > const & xContext )
- SAL_THROW( () )
-{
- return static_cast< ::cppu::OWeakObject * >( new MyService2Impl( xContext ) );
-}
-
-}
-
-/* shared lib exports implemented without helpers in service_impl1.cxx */
-namespace my_sc_impl
-{
-static struct ::cppu::ImplementationEntry s_component_entries [] =
-{
- {
- create_MyService1Impl, getImplementationName_MyService1Impl,
- getSupportedServiceNames_MyService1Impl,
- ::cppu::createSingleComponentFactory,
- 0, 0
- },
- {
- create_MyService2Impl, getImplementationName_MyService2Impl,
- getSupportedServiceNames_MyService2Impl,
- ::cppu::createSingleComponentFactory,
- 0, 0
- },
- { 0, 0, 0, 0, 0, 0 }
-};
-}
-
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- sal_Char const * implName, lang::XMultiServiceFactory * xMgr,
- registry::XRegistryKey * xRegistry )
-{
- return ::cppu::component_getFactoryHelper(
- implName, xMgr, xRegistry, ::my_sc_impl::s_component_entries );
-}
-
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/some.idl b/odk/examples/DevelopersGuide/Components/CppComponent/some.idl
deleted file mode 100644
index d08cc643..00000000
--- a/odk/examples/DevelopersGuide/Components/CppComponent/some.idl
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/lang/IllegalArgumentException.idl>
-
-module my_module
-{
-
- interface XSomething
- {
- string methodOne( [in] string val );
- string methodTwo();
- };
-
- service MyService1 : XSomething;
-
- service MyService2 : XSomething
- {
- create([in]string sArgument)
- raises (::com::sun::star::lang::IllegalArgumentException);
- };
-};
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/JavaComponent.components b/odk/examples/DevelopersGuide/Components/JavaComponent/JavaComponent.components
deleted file mode 100644
index 67ac8696..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/JavaComponent.components
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="JavaComponent.uno.jar">
- <implementation name="TestComponentA">
- <service name="com.sun.star.test.SomethingA"/>
- </implementation>
- <implementation name="TestComponentB">
- <service name="com.sun.star.test.SomethingB"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/Makefile b/odk/examples/DevelopersGuide/Components/JavaComponent/Makefile
deleted file mode 100644
index 327d4f2d..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/Makefile
+++ /dev/null
@@ -1,207 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the SpreadSheet examples of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-
-COMP_NAME=JavaComponent
-OUT_COMP_CLASS = $(OUT_CLASS)/$(COMP_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
-COMP_RDB_NAME = $(COMP_NAME).uno.rdb
-COMP_RDB = $(OUT_COMP_GEN)/$(COMP_RDB_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME = $(COMP_NAME).uno.jar
-COMP_JAR = $(OUT_COMP_CLASS)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_COMPONENTS=$(COMP_NAME).components
-
-APP1_NAME=TestJavaComponent
-APP1_JAR=$(OUT_COMP_CLASS)/$(APP1_NAME).jar
-
-REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(COMP_NAME)_register_component.flag
-
-IDLFILES = XSomethingA.idl \
- XSomethingB.idl \
- SomethingA.idl \
- SomethingB.idl
-
-# normally the idl file should be stored in a directory tree fitting the module
-# structure, for the example we know the module structure
-PACKAGE = com/sun/star/test
-
-COMPJAVAFILES = \
- TestComponentA.java \
- TestComponentB.java \
- TestServiceProvider.java
-
-GENCLASSFILES = $(patsubst %.idl,$(OUT_COMP_CLASS)/$(PACKAGE)/%.class,$(IDLFILES))
-GENCLASSNAMES = $(patsubst %.idl,$(PACKAGE)/%.class,$(IDLFILES))
-GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GENURDFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/%.urd,$(IDLFILES))
-
-COMPCLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(COMPJAVAFILES))
-
-$(COMP_NAME)_CLASSFILES = $(patsubst %.java,%.class,$(COMPJAVAFILES))
-
-$(COMP_NAME)_CLASSFILES += $(subst $(OUT_COMP_CLASS)/,,$(GENCLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- JavaComponentExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@
- @echo RegistrationClassName: TestServiceProvider>> $@
-
-$(OUT_COMP_GEN)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -I. -I$(IDL_DIR) -O$(OUT_COMP_GEN) $^
-
-$(OUT_COMP_GEN)/%.rdb : $(GENURDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GENURDFILES)
-
-$(OUT_COMP_CLASS)/$(PACKAGE)/%.class : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-$(OUT_COMP_CLASS)/%.class : %.java $(GENCLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $<
-
-$(COMPCLASSFILES) : $(COMPJAVAFILES) $(GENCLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(COMPJAVAFILES)
-
-# rule for client/example application manifest file
-$(OUT_COMP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-# rule for client/example application jar file
-# Note that the example needs the component files as well for local usage
-$(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(APP1_NAME).class $(COMPCLASSFILES) $(GENCLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(basename $(@F)).class $($(COMP_NAME)_CLASSFILES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(COMPCLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component pacakge file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$(COMP_RDB)) $(subst /,$(PS),$(OUT_COMP_CLASS))
- $(SDK_ZIP) $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
- $(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_COMP_CLASS)/$(COMP_RDB_NAME)))
-
-$(REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-JavaComponentExample : $(REGISTERFLAG) $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP1_NAME).local
- @echo --------
- @echo The Java components were installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the
- @echo example description.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-%.local: $(OUT_COMP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< local
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl
deleted file mode 100644
index 769a03e5..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_COM_SUN_STAR_TEST_SOMETHINGA_IDL
-#define INCLUDED_COM_SUN_STAR_TEST_SOMETHINGA_IDL
-
-#include <XSomethingA.idl>
-
-module com { module sun { module star { module test {
- service SomethingA: XSomethingA;
-}; }; }; };
-
-#endif
-
-
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl
deleted file mode 100644
index 0a6bd944..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_COM_SUN_STAR_TEST_SOMETHINGB_IDL
-#define INCLUDED_COM_SUN_STAR_TEST_SOMETHINGB_IDL
-
-#include <XSomethingB.idl>
-
-module com { module sun { module star { module test {
- service SomethingB : XSomethingB;
-}; }; }; };
-
-#endif
-
-
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
deleted file mode 100644
index ed81b0f7..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.test.XSomethingA;
-import com.sun.star.uno.Type;
-
-// TestComponentA use the implementation helper WeakBase
-public class TestComponentA extends WeakBase implements XServiceInfo, XSomethingA {
- static final String __serviceName= "com.sun.star.test.SomethingA";
-
- static byte[] _implementationId;
-
- public TestComponentA() {
- }
-
- // XSomethingA
- public String methodOne(String val) {
- return val;
- }
-
- //XServiceInfo
- public String getImplementationName( ) {
- return getClass().getName();
- }
- // XServiceInfo
- public boolean supportsService( /*IN*/String serviceName ) {
- if ( serviceName.equals( __serviceName))
- return true;
- return false;
- }
- //XServiceInfo
- public String[] getSupportedServiceNames( ) {
- String[] retValue= new String[0];
- retValue[0]= __serviceName;
- return retValue;
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
deleted file mode 100644
index 848c9b45..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.test.XSomethingB;
-import com.sun.star.uno.Type;
-
-// TestComponentB implements all necessary interfaces self, this is only
-// for demonstration. More convenient is to use the impelmentation WeakBase or
-// ComponentBase, see implementation of TestComponentA.
-public class TestComponentB implements XTypeProvider, XServiceInfo, XSomethingB {
- static final String __serviceName= "com.sun.star.test.SomethingB";
-
- static byte[] _implementationId;
- private XComponentContext context;
- private Object[] args;
-
- public TestComponentB(XComponentContext context, Object[] args) {
- this.context= context;
- this.args= args;
- }
-
- // XSomethingB
- public String methodTwo(String val) {
- if (args.length > 0 && args[0] instanceof String )
- return (String) args[0];
- return val;
- }
-
- //XTypeProvider
- public com.sun.star.uno.Type[] getTypes( ) {
- Type[] retValue= new Type[3];
- retValue[0]= new Type( XServiceInfo.class);
- retValue[1]= new Type( XTypeProvider.class);
- retValue[2]= new Type( XSomethingB.class);
- return retValue;
- }
- //XTypeProvider
- synchronized public byte[] getImplementationId( ) {
- if (_implementationId == null) {
- _implementationId= new byte[16];
- int hash = hashCode();
- _implementationId[0] = (byte)(hash & 0xff);
- _implementationId[1] = (byte)((hash >>> 8) & 0xff);
- _implementationId[2] = (byte)((hash >>> 16) & 0xff);
- _implementationId[3] = (byte)((hash >>>24) & 0xff);
- }
- return _implementationId;
- }
-
- //XServiceInfo
- public String getImplementationName( ) {
- return getClass().getName();
- }
-
- // XServiceInfo
- public boolean supportsService( /*IN*/String serviceName ) {
- if ( serviceName.equals( __serviceName))
- return true;
- return false;
- }
- //XServiceInfo
- public String[] getSupportedServiceNames( ) {
- String[] retValue= new String[0];
- retValue[0]= __serviceName;
- return retValue;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
deleted file mode 100644
index 50fff36b..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.test.XSomethingB;
-import com.sun.star.test.SomethingB;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.container.XSet;
-
-// sample starbasic code, you can execute it after you have connected to the office.
-// Sub Main
-// o = createUnoService( "com.sun.star.test.SomethingB" )
-// msgbox o.methodOne( "from the office !" )
-// End Sub
-
-public class TestJavaComponent
-{
-
- public static void insertIntoServiceManager(
- XMultiComponentFactory serviceManager, Object singleFactory )
- throws com.sun.star.uno.Exception
- {
- XSet set = (XSet ) UnoRuntime.queryInterface( XSet.class, serviceManager );
- set.insert( singleFactory );
- }
-
- public static void removeFromServiceManager(
- XMultiComponentFactory serviceManager, Object singleFactory )
- throws com.sun.star.uno.Exception
- {
- XSet set = (XSet ) UnoRuntime.queryInterface( XSet.class, serviceManager );
- set.remove( singleFactory );
-
- }
-
- public static void main(String[] args) throws java.lang.Exception
- {
- try {
- boolean bLocal = false;
-
- XMultiComponentFactory xUsedServiceManager = null;
- XComponentContext xUsedComponentContext = null;
-
- if( args.length == 1 && args[0].equals( "local" ))
- {
- XComponentContext xLocalComponentContext =
- Bootstrap.createInitialComponentContext( null );
-
- // initial serviceManager
- XMultiComponentFactory xLocalServiceManager =
- xLocalComponentContext.getServiceManager();
-
- bLocal = true;
- xUsedServiceManager = xLocalServiceManager;
- xUsedComponentContext = xLocalComponentContext;
-
- System.out.println( "Using local servicemanager" );
- } else {
- // get the remote office component context
- xUsedComponentContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- xUsedServiceManager = xUsedComponentContext.getServiceManager();
- System.out.println( "Using remote servicemanager" );
- }
-
- if ( xUsedServiceManager == null )
- {
- System.out.println( "ERROR: no service manager" );
- System.exit(0);
- }
-
- Object factory = new Object();
- if ( bLocal )
- {
- // retrieve the factory for the component implementation
- factory = TestServiceProvider.__getServiceFactory(
- "TestComponentB", null, null);
-
- // insert the factory into the local servicemanager
- // From now on, the service can be instantiated !
- insertIntoServiceManager( xUsedServiceManager, factory );
- }
-
- XSomethingB xSomethingB = SomethingB.create(xUsedComponentContext);
-
- // and call the test method.
- String s= xSomethingB.methodTwo("Hello World!");
- System.out.println(s);
-
- if ( bLocal )
- {
- // remove it again from the servicemanager,
- removeFromServiceManager( xUsedServiceManager, factory );
- }
-
- }
- catch ( Exception e )
- {
- System.out.println( "UNO Exception caught: " + e );
- System.out.println( "Message: " + e.getMessage() );
- e.printStackTrace(System.out);
- }
-
- // quit, even when a remote bridge is running
- System.exit(0);
- }
-}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
deleted file mode 100644
index 5f78eb47..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.comp.loader.FactoryHelper;
-
-public class TestServiceProvider
-{
- public static XSingleServiceFactory __getServiceFactory(
- String implName,
- XMultiServiceFactory multiFactory,
- XRegistryKey regKey) {
- XSingleServiceFactory xSingleServiceFactory = null;
-
- if (implName.equals( TestComponentA.class.getName()) )
- xSingleServiceFactory = FactoryHelper.getServiceFactory(
- TestComponentA.class, TestComponentA.__serviceName,
- multiFactory, regKey);
- else if (implName.equals(TestComponentB.class.getName()))
- xSingleServiceFactory= FactoryHelper.getServiceFactory(
- TestComponentB.class, TestComponentB.__serviceName,
- multiFactory, regKey);
- return xSingleServiceFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
-// boolean bregA= FactoryHelper.writeRegistryServiceInfo(
-// TestComponentA.class.getName(),
-// TestComponentA.__serviceName, regKey);
-// boolean bregB= FactoryHelper.writeRegistryServiceInfo(
-// TestComponentB.class.getName(),
-// TestComponentB.__serviceName, regKey);
-// return bregA && bregB;
-// }
-}
-
-
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl
deleted file mode 100644
index 15096be8..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGA_IDL
-#define INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGA_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
-
-module com { module sun { module star { module test {
- interface XSomethingA {
- string methodOne([in]string value);
- };
-}; }; }; };
-
-#endif
-
-
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl
deleted file mode 100644
index c328bafd..00000000
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGB_IDL
-#define INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGB_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
-
-module com { module sun { module star { module test {
- interface XSomethingB {
- string methodTwo([in]string value);
- };
-}; }; }; };
-
-#endif
-
-
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components
deleted file mode 100644
index 94a4848c..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="LicenseTest.uno.jar">
- <implementation name="LicenseTest$_LicenseTest">
- <service name="org.openoffice.LicenseTest"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl
deleted file mode 100644
index 6f42dd8e..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _org_openoffice_LicenseTest_idl_
-#define _org_openoffice_LicenseTest_idl_
-
-#include <com/sun/star/lang/XServiceInfo.idl>
-
-// org
-module org {
- // openoffice
- module openoffice {
- // example service, XServiceInfo is implemented here for demonstration
- // issues. XServiceInfo must be implemented by all components.
- service LicenseTest: ::com::sun::star::lang::XServiceInfo;
- };
-};
-
-#endif
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
deleted file mode 100644
index 2465f2a9..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.Type;
-
-/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getComponentFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
- */
-public class LicenseTest {
- /** This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class _LicenseTest extends WeakBase
- implements XServiceInfo {
- /** The service name, that must be used to get an instance of this service.
- */
- static private final String __serviceName =
- "org.openoffice.LicenseTest";
-
- /** The initial component contextr, that gives access to
- * the service manager, supported singletons, ...
- * It's often later used
- */
- private XComponentContext m_cmpCtx;
-
- /** The service manager, that gives access to all registered services.
- * It's often later used
- */
- private XMultiComponentFactory m_xMCF;
-
- /** The constructor of the inner class has a XMultiServiceFactory parameter.
- * @param xmultiservicefactoryInitialization A special service factory
- * could be introduced while initializing.
- */
- public _LicenseTest(XComponentContext xCompContext) {
- try {
- m_cmpCtx = xCompContext;
- m_xMCF = m_cmpCtx.getServiceManager();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
-
- /** This method returns an array of all supported service names.
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- /** This method is a simple helper function to used in the
- * static component initialisation functions as well as in
- * getSupportedServiceNames.
- */
- public static String[] getServiceNames() {
- String[] sSupportedServiceNames = { __serviceName };
- return sSupportedServiceNames;
- }
-
- /** This method returns true, if the given service will be
- * supported by the component.
- * @param sServiceName Service name.
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService( String sServiceName ) {
- return sServiceName.equals( __serviceName );
- }
-
- /** Return the class name of the component.
- * @return Class name of the component.
- */
- public String getImplementationName() {
- return _LicenseTest.class.getName();
- }
- }
-
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleComponentFactory</code> for creating
- * the component
- * @param sImplName the name of the implementation for which a
- * service is desired
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory(String sImplName)
- {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplName.equals( _LicenseTest.class.getName() ) )
- xFactory = Factory.createComponentFactory(_LicenseTest.class,
- _LicenseTest.getServiceNames());
-
- return xFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(_LicenseTest.class.getName(),
-// _LicenseTest.getServiceNames(),
-// regKey);
-// }
- /** This method is a member of the interface for initializing an object
- * directly after its creation.
- * @param object This array of arbitrary objects will be passed to the
- * component after its creation.
- * @throws Exception Every exception will not be handled, but will be
- * passed to the caller.
- */
- public void initialize( Object[] object )
- throws com.sun.star.uno.Exception {
- /* The component describes what arguments its expected and in which
- * order!At this point you can read the objects and can intialize
- * your component using these objects.
- */
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile b/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile
deleted file mode 100644
index c82f0ba7..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile
+++ /dev/null
@@ -1,172 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the License Test component example of the SDK.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-
-# we use the sample directory name dor separating this example
-# from others in the output directory
-SAMPLE_NAME=LicenseTest
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=LicenseTest
-COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME)
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_RDB_NAME=$(COMP_NAME).uno.rdb
-COMP_RDB=$(COMP_GEN_OUT)/$(COMP_RDB_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_LOCAL_FILES = description.xml registration/license_de.txt registration/license_en_US.txt
-COMP_COMPONENTS=$(COMP_NAME).components
-
-IDLFILES = LicenseTest.idl
-
-# normally the idl file should be stored in a directory tree fitting the module structure,
-# for the example we know the module structure
-PACKAGE = org/openoffice
-
-COMP_JAVAFILES = LicenseTest.java
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-GEN_CLASSFILES = $(patsubst %.idl,$(SAMPLE_CLASS_OUT)/$(PACKAGE)/%.class,$(IDLFILES))
-GEN_TYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GEN_URDFILES = $(patsubst %.idl,$(SAMPLE_GEN_OUT)/%.urd,$(IDLFILES))
-
-# the generated types are necessary for the component and the application jar
-GEN_CLASSFILENAMES = $(subst $(SAMPLE_CLASS_OUT)/,,$(GEN_CLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP1_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : JavaLicenseTestExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMP_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@
- @echo RegistrationClassName: $(basename $*)>> $@
-
-$(SAMPLE_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -C -I. -I$(IDL_DIR) -O$(SAMPLE_GEN_OUT) $<
-
-$(COMP_GEN_OUT)/%.rdb : $(GEN_URDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GEN_URDFILES)
-
-$(GEN_CLASSFILES) : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GEN_TYPELIST) -O$(SAMPLE_CLASS_OUT) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-# component as well as application are dependent from the generated types
-# rule for component class files
-$(COMP_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $<
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP_CLASS_OUT) .
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(GEN_CLASSFILENAMES)
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_LOCAL_FILES) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(COMP_RDB_NAME)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
- $(SDK_ZIP) -u $@ $(COMP_LOCAL_FILES)
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-JavaLicenseTestExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The $(COMP_NAME) component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo This extension demonstrates the $(QM)Simple License$(QM) feature.
- @echo --------------------------------------------------------------------------------
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml b/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml
deleted file mode 100644
index aef2e4d7..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<description xmlns="http://openoffice.org/extensions/description/2006"
- xmlns:xlink="http://www.w3.org/1999/xlink">
-
- <registration>
- <simple-license accept-by="admin" default-license-id="de">
- <license-text xlink:href="registration/license_de.txt" lang="de" license-id="de" />
- <license-text xlink:href="registration/license_en_US.txt" lang="en-US" />
- </simple-license>
- </registration>
-</description>
-
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_de.txt b/odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_de.txt
deleted file mode 100644
index 6deedf8b..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_de.txt
+++ /dev/null
@@ -1 +0,0 @@
-Eine ganz kurze Lizenz. \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_en_US.txt b/odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_en_US.txt
deleted file mode 100644
index 127a4569..00000000
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/registration/license_en_US.txt
+++ /dev/null
@@ -1 +0,0 @@
-A very short license. \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/Makefile
deleted file mode 100644
index 7070493a..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/Makefile
+++ /dev/null
@@ -1,81 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Comonent Thumbs of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-include thumbs.mk
-
-SUBDIRS= org/openoffice/test org/openoffice/comp/test
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(SUBDIRS) \
- ComponentsThumbsExample
-
-include $(SETTINGS)/stdtarget.mk
-
-.PHONY : $(SUBDIRS)
-$(SUBDIRS) :
- $(MAKE) -C $@
-
-org/openoffice/comp/test : org/openoffice/test
-
-ComponentsThumbsExample : $(COMP_PACKAGE)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------
- @echo The ImageShrink Java component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- $(MAKE) -C org/openoffice/test clean
- $(MAKE) -C org/openoffice/comp/test clean
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components
deleted file mode 100644
index 11d958fe..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="ImageShrink.uno.jar">
- <implementation name="org.openoffice.comp.test.ImageShrink">
- <service name="org.openoffice.test.ImageShrink"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
deleted file mode 100644
index 06ebde77..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-package org.openoffice.comp.test;
-
-
-/*
- * ImageShrink.java
- *
- * Created on 4. Mai 2002, 20:25
- */
-
-
-/**
- *
- * @author dschulten
- */
-
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.lib.uno.helper.WeakBase;
-
-public class ImageShrink extends WeakBase
- implements com.sun.star.lang.XServiceInfo,
- org.openoffice.test.XImageShrinkFilter {
-
- com.sun.star.uno.XComponentContext xComponentContext = null;
-
-
- // maintain a static implementation id for all instances of ImageShrink
- // initialized by the first call to getImplementationId()
- static byte[] _implementationId;
-
-
- // hold the service name in a private static member variable of the class
- protected static final String __serviceName = "org.openoffice.test.ImageShrink";
-
-
- String destDir = "";
- String sourceDir = "";
- boolean cancel = false;
- com.sun.star.awt.Size dimension = new com.sun.star.awt.Size();
-
- /** Creates a new instance of ImageShrink */
- public ImageShrink() {
- }
-
-
- // static __getServiceFactory() Implementation
- public static XSingleServiceFactory __getServiceFactory(String implName,
- XMultiServiceFactory multiFactory,
- com.sun.star.registry.XRegistryKey regKey) {
-
- com.sun.star.lang.XSingleServiceFactory xSingleServiceFactory = null;
- if (implName.equals( ImageShrink.class.getName()) )
- xSingleServiceFactory = FactoryHelper.getServiceFactory( ImageShrink.class,
- ImageShrink.__serviceName,
- multiFactory,
- regKey);
-
- return xSingleServiceFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// //System.out.println(ImageShrink.class.getName());
-// return FactoryHelper.writeRegistryServiceInfo( ImageShrink.class.getName(),
-// __serviceName,
-// regKey);
-// }
-
- // XFilter implementation (a sub-interface of XImageShrinkFilter)
- public void cancel() {
- cancel = true;
- }
-
- public boolean filter(com.sun.star.beans.PropertyValue[] propertyValue) {
- // while cancel = false,
- // scale images found in sourceDir according to dimension and
- // write them to destDir, using the image file format given in
-
-
- // []propertyValue
- return true;
- }
-
- // XImageShrink implementation (a sub-interface of XImageShrinkFilter)
- public String getDestinationDirectory() {
- return destDir;
- }
-
- public com.sun.star.awt.Size getDimension() {
- return dimension;
- }
-
- public String getSourceDirectory() {
- return sourceDir;
- }
-
- public void setDestinationDirectory(String str) {
- destDir = str;
- }
-
- public void setDimension(com.sun.star.awt.Size size) {
- dimension = size;
- }
-
- public void setSourceDirectory(String str) {
- sourceDir = str;
- }
-
- //XServiceInfo implementation
- public String getImplementationName( ) {
- return getClass().getName();
- }
-
- public boolean supportsService(String serviceName) {
- if ( serviceName.equals( __serviceName))
- return true;
- return false;
- }
-
- public String[] getSupportedServiceNames( ) {
- return new String[] { __serviceName };
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
deleted file mode 100644
index 6894e1d9..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
+++ /dev/null
@@ -1,129 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the SpreadSheet examples of the Developers Guide.
-
-PRJ=../../../../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-include ../../../../thumbs.mk
-
-# Define non-platform/compiler specific settings
-PACKAGE = org/openoffice/comp/test
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(REGISTERFLAG) \
- $(APP1_JAR)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@
- @echo RegistrationClassName: $(subst /,.,$(PACKAGE)).$(basename $(basename $(@F)))>> $@
-
-$(OUT_COMP_CLASS)/$(PACKAGE)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $<
-
-$(OUT_COMP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $(subst /,.,$(PACKAGE)).$*>> $@
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(OUT_COMP_CLASS)/$(PACKAGE)/$(COMP_NAME).class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) $(PACKAGE)/$(basename $(basename $(@F))).class $(patsubst %.class,-C $(OUT_COMP_CLASS) %.class,$(GENCLASSNAMES))
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$(COMP_RDB)) $(subst /,$(PS),$(OUT_COMP_CLASS))
- $(SDK_ZIP) $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
- $(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_CLASS)/$(COMP_RDB_NAME)))
-
-$(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(PACKAGE)/$(APP1_NAME).class
- -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) $(PACKAGE)/$(basename $(@F)).class $(patsubst %.class,-C $(OUT_COMP_CLASS) %.class,$(GENCLASSNAMES))
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-
-$(REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-.PHONY: clean
-clean :
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_JAR)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(APP1_JAR)))
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
deleted file mode 100644
index 7dbc23fc..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-package org.openoffice.comp.test;
-
-import com.sun.star.uno.UnoRuntime;
-
-
-/**
- * Test class for testing the ImageShrink service skeleton.
- * Note: the image shrink functionality is not implemented
- */
-public class Thumbs {
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- try {
- // get the remote office component context
- com.sun.star.uno.XComponentContext xRemoteContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- System.out.println("Connected to a running office ...");
-
- // use the generated default create method to instantiate a
- // new ImageShrink object
- org.openoffice.test.XImageShrinkFilter xImageShrinkFilter =
- org.openoffice.test.ImageShrink.create(xRemoteContext);
-
- System.out.println("ImageShrink component succesfully instantiated");
-
- java.io.File f = new java.io.File(".");
- System.out.println("set SourceDrectory ...");
- xImageShrinkFilter.setSourceDirectory(f.getCanonicalPath());
-
- System.out.println("source Directory = "
- + xImageShrinkFilter.getSourceDirectory());
- }
- catch (java.lang.Exception e){
- System.err.println("Error: " + e);
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl
deleted file mode 100644
index 56f89f0e..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _org_openoffice_test_ImageShrink_idl_
-#define _org_openoffice_test_ImageShrink_idl_
-
-#include <org/openoffice/test/XImageShrinkFilter.idl>
-
-module org { module openoffice { module test {
-
- service ImageShrink : XImageShrinkFilter;
-
-}; }; };
-
-#endif
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
deleted file mode 100644
index fc453a11..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the SpreadSheet examples of the Developers Guide.
-
-PRJ=../../../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-include ../../../thumbs.mk
-
-PACKAGE = org/openoffice/test
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(GENCLASSFILES)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_GEN)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -I. -I../../.. -I$(IDL_DIR) -O$(OUT_COMP_GEN) $^
-
-$(OUT_COMP_GEN)/%.rdb : $(GENURDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GENURDFILES)
-
-$(OUT_COMP_CLASS)/%.class : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-.PHONY: clean
-clean :
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(GENCLASSFILES)))
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl
deleted file mode 100644
index 8b001321..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _org_openoffice_test_XImageShrink_idl_
-#define _org_openoffice_test_XImageShrink_idl_
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/awt/Size.idl>
-
-module org { module openoffice { module test {
-
-interface XImageShrink {
-
- [attribute] string SourceDirectory;
- [attribute] string DestinationDirectory;
- [attribute] com::sun::star::awt::Size Dimension;
-
-};
-
-}; }; };
-
-#endif
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl
deleted file mode 100644
index 23bbacb2..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _org_openoffice_test_XImageShrinkFilter_idl_
-#define _org_openoffice_test_XImageShrinkFilter_idl_
-
-#include <com/sun/star/document/XFilter.idl>
-#include <org/openoffice/test/XImageShrink.idl>
-
-module org { module openoffice { module test {
-
-interface XImageShrinkFilter {
- interface XImageShrink;
- interface com::sun::star::document::XFilter;
-};
-
-}; }; };
-
-#endif
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk b/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
deleted file mode 100644
index cec8a3f4..00000000
--- a/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-OUT_COMP_CLASS = $(OUT_CLASS)/ComponentThumbsExample
-OUT_COMP_GEN = $(OUT_MISC)/ComponentThumbsExample
-
-COMP_NAME=ImageShrink
-COMP_RDB_NAME = $(COMP_NAME).uno.rdb
-COMP_RDB = $(OUT_COMP_GEN)/$(COMP_RDB_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME = $(COMP_NAME).uno.jar
-COMP_JAR = $(OUT_COMP_CLASS)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
-REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-IDL_PACKAGE=org/openoffice/test
-
-IDLFILES = XImageShrink.idl \
- XImageShrinkFilter.idl \
- ImageShrink.idl
-
-GENCLASSFILES = $(patsubst %.idl,$(OUT_COMP_CLASS)/$(IDL_PACKAGE)/%.class,$(IDLFILES))
-GENCLASSNAMES = $(patsubst %.idl,$(IDL_PACKAGE)/%.class,$(IDLFILES))
-GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(IDL_PACKAGE)/% ,$(IDLFILES)))
-GENURDFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/%.urd,$(IDLFILES))
-
-APP1_NAME=Thumbs
-APP1_JAR=$(OUT_COMP_CLASS)/$(APP1_NAME).jar
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.components b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.components
deleted file mode 100644
index 56d7c8eb..00000000
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="DialogComponent.uno.jar">
- <implementation name="DialogComponent$_DialogComponent">
- <service name="com.sun.star.test.TestDialogHandler"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
deleted file mode 100644
index b3d04f0d..00000000
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.awt.XDialog;
-import com.sun.star.awt.XDialogProvider2;
-import com.sun.star.awt.XDialogEventHandler;
-import com.sun.star.awt.XControl;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.awt.XControlContainer;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XFrame;
-
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.WindowAttribute;
-import com.sun.star.awt.WindowClass;
-import com.sun.star.awt.WindowDescriptor;
-import com.sun.star.awt.Rectangle;
-
-import com.sun.star.test.XTestDialogHandler;
-
-// DialogComponent implements all necessary interfaces self, this is only
-// for demonstration. More convenient is to use the impelmentation WeakBase or
-// ComponentBase, see implementation of TestComponentA.
-public class DialogComponent {
-
- // public static class _DialogComponent extends WeakBase
- public static class _DialogComponent
- implements XTypeProvider, XServiceInfo, XTestDialogHandler, XDialogEventHandler {
-
- static final String __serviceName= "com.sun.star.test.TestDialogHandler";
-
- static byte[] _implementationId;
- private XComponentContext m_xCmpCtx;
-
- private XFrame m_xFrame;
- private XToolkit m_xToolkit;
-
- public _DialogComponent(XComponentContext context) {
- m_xCmpCtx= context;
-
- try {
- // Create the toolkit to have access to it later
- m_xToolkit = (XToolkit) UnoRuntime.queryInterface(
- XToolkit.class,
- m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
- m_xCmpCtx));
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- // XTestDialogHandler
- public String createDialog( String DialogURL, XModel xModel, XFrame xFrame ) {
- m_xFrame = xFrame;
-
- try {
- XMultiComponentFactory xMCF = m_xCmpCtx.getServiceManager();
- Object obj;
-
- // If valid we must pass the XModel when creating a DialogProvider object
- if( xModel != null ) {
- Object[] args = new Object[1];
- args[0] = xModel;
-
- obj = xMCF.createInstanceWithArgumentsAndContext(
- "com.sun.star.awt.DialogProvider2", args, m_xCmpCtx );
- }
- else {
- obj = xMCF.createInstanceWithContext(
- "com.sun.star.awt.DialogProvider2", m_xCmpCtx );
- }
-
- XDialogProvider2 xDialogProvider = (XDialogProvider2)
- UnoRuntime.queryInterface( XDialogProvider2.class, obj );
-
- XDialog xDialog = xDialogProvider.createDialogWithHandler( DialogURL, this );
- if( xDialog != null )
- xDialog.execute();
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- return "Created dialog \"" + DialogURL + "\"";
- }
-
- public void copyText( XDialog xDialog, Object aEventObject ) {
- XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(
- XControlContainer.class, xDialog );
- String aTextPropertyStr = "Text";
- String aText = "";
- XControl xTextField1Control = xControlContainer.getControl( "TextField1" );
- XControlModel xControlModel1 = xTextField1Control.getModel();
- XPropertySet xPropertySet1 = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xControlModel1 );
- try
- {
- aText = (String)xPropertySet1.getPropertyValue( aTextPropertyStr );
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- XControl xTextField2Control = xControlContainer.getControl( "TextField2" );
- XControlModel xControlModel2 = xTextField2Control.getModel();
- XPropertySet xPropertySet2 = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xControlModel2 );
- try
- {
- xPropertySet2.setPropertyValue( aTextPropertyStr, aText );
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- showMessageBox( "DialogComponent", "copyText() called" );
- }
-
- public void handleEvent() {
- showMessageBox( "DialogComponent", "handleEvent() called" );
- }
-
- public void handleEventWithArguments( XDialog xDialog, Object aEventObject ) {
- showMessageBox( "DialogComponent", "handleEventWithArguments() called\n\n" +
- "Event Object = " + aEventObject );
- }
-
- private final String aHandlerMethod1 = "doit1";
- private final String aHandlerMethod2 = "doit2";
- private final String aHandlerMethod3 = "doit3";
-
- //XDialogEventHandler
- public boolean callHandlerMethod( /*IN*/XDialog xDialog, /*IN*/Object EventObject, /*IN*/String MethodName ) {
- if ( MethodName.equals( aHandlerMethod1 ) )
- {
- showMessageBox( "DialogComponent", "callHandlerMethod() handled \"" + aHandlerMethod1 + "\"" );
- return true;
- }
- else if ( MethodName.equals( aHandlerMethod2 ) )
- {
- showMessageBox( "DialogComponent", "callHandlerMethod() handled \"" + aHandlerMethod2 + "\"" );
- return true;
- }
- else if ( MethodName.equals( aHandlerMethod3 ) )
- {
- showMessageBox( "DialogComponent", "callHandlerMethod() handled \"" + aHandlerMethod3 + "\"" );
- return true;
- }
- return false;
- }
-
- public String[] getSupportedMethodNames() {
- String[] retValue= new String[3];
- retValue[0]= aHandlerMethod1;
- retValue[1]= aHandlerMethod2;
- retValue[2]= aHandlerMethod3;
- return retValue;
- }
-
-
- //XTypeProvider
- public com.sun.star.uno.Type[] getTypes( ) {
- Type[] retValue= new Type[4];
- retValue[0]= new Type( XServiceInfo.class);
- retValue[1]= new Type( XTypeProvider.class);
- retValue[2]= new Type( XTestDialogHandler.class);
- retValue[3]= new Type( XDialogEventHandler.class);
- return retValue;
- }
- //XTypeProvider
- synchronized public byte[] getImplementationId( ) {
- if (_implementationId == null) {
- _implementationId= new byte[16];
- int hash = hashCode();
- _implementationId[0] = (byte)(hash & 0xff);
- _implementationId[1] = (byte)((hash >>> 8) & 0xff);
- _implementationId[2] = (byte)((hash >>> 16) & 0xff);
- _implementationId[3] = (byte)((hash >>>24) & 0xff);
- }
- return _implementationId;
- }
-
-
-
- /** This method is a simple helper function to used in the
- * static component initialisation functions as well as in
- * getSupportedServiceNames.
- */
- public static String[] getServiceNames() {
- String[] sSupportedServiceNames = { __serviceName };
- return sSupportedServiceNames;
- }
-
- //XServiceInfo
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- //XServiceInfo
- public boolean supportsService( String sServiceName ) {
- return sServiceName.equals( __serviceName );
- }
-
- //XServiceInfo
- public String getImplementationName() {
- // return DialogComponent.class.getName();
- return _DialogComponent.class.getName();
- }
-
- public void showMessageBox(String sTitle, String sMessage) {
- try {
- if ( null != m_xFrame && null != m_xToolkit ) {
-
- // describe window properties.
- WindowDescriptor aDescriptor = new WindowDescriptor();
- aDescriptor.Type = WindowClass.MODALTOP;
- aDescriptor.WindowServiceName = new String( "infobox" );
- aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = (XWindowPeer)UnoRuntime.queryInterface(
- XWindowPeer.class, m_xFrame.getContainerWindow());
- aDescriptor.Bounds = new Rectangle(0,0,300,200);
- aDescriptor.WindowAttributes = WindowAttribute.BORDER |
- WindowAttribute.MOVEABLE |
- WindowAttribute.CLOSEABLE;
-
- XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
- if ( null != xPeer ) {
- XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
- XMessageBox.class, xPeer);
- if ( null != xMsgBox )
- {
- xMsgBox.setCaptionText( sTitle );
- xMsgBox.setMessageText( sMessage );
- xMsgBox.execute();
- }
- }
- }
- } catch ( com.sun.star.uno.Exception e) {
- // do your error handling
- }
- }
- }
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleComponentFactory</code> for creating
- * the component
- * @param sImplName the name of the implementation for which a
- * service is desired
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory(String sImplName)
- {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplName.equals( _DialogComponent.class.getName() ) )
- xFactory = Factory.createComponentFactory(_DialogComponent.class,
- _DialogComponent.getServiceNames());
-
- return xFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(_DialogComponent.class.getName(),
-// _DialogComponent.getServiceNames(),
-// regKey);
-// }
-}
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.odt b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.odt
deleted file mode 100644
index bd6a9b40..00000000
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/Makefile b/odk/examples/DevelopersGuide/Components/dialogcomponent/Makefile
deleted file mode 100644
index 7afc11f0..00000000
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/Makefile
+++ /dev/null
@@ -1,179 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java dialog component example of the SDK.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-
-# we use the sample directory name dor separating this example
-# from others in the output directory
-SAMPLE_NAME=DialogComponentSample
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=DialogComponent
-COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME)
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_RDB_NAME=$(COMP_NAME).uno.rdb
-COMP_RDB=$(COMP_GEN_OUT)/$(COMP_RDB_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-IDLFILES = XTestDialogHandler.idl \
- TestDialogHandler.idl
-
-# normally the idl file should be stored in a directory tree fitting the module structure,
-# for the example we know the module structure
-PACKAGE = com/sun/star/test
-#PACKAGE = org/openoffice
-
-COMP_JAVAFILES = DialogComponent.java
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-GEN_CLASSFILES = $(patsubst %.idl,$(SAMPLE_CLASS_OUT)/$(PACKAGE)/%.class,$(IDLFILES))
-GEN_TYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GEN_URDFILES = $(patsubst %.idl,$(SAMPLE_GEN_OUT)/%.urd,$(IDLFILES))
-
-# the generated types are necessary for the component and the application jar
-GEN_CLASSFILENAMES = $(subst $(SAMPLE_CLASS_OUT)/,,$(GEN_CLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP1_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : DialogComponentExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMP_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@
- @echo RegistrationClassName: $(basename $*)>> $@
-
-$(SAMPLE_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -C -I. -I$(IDL_DIR) -O$(SAMPLE_GEN_OUT) $<
-
-$(COMP_GEN_OUT)/%.rdb : $(GEN_URDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GEN_URDFILES)
-
-$(GEN_CLASSFILES) : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GEN_TYPELIST) -O$(SAMPLE_CLASS_OUT) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-# component as well as application are dependent from the generated types
-# rule for component class files
-$(COMP_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $<
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP_CLASS_OUT) .
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(GEN_CLASSFILENAMES)
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(COMP_RDB_NAME)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-DialogComponentExample : $(COMP_REGISTERFLAG)
-# TODO: adapt
- @echo --------------------------------------------------------------------------------
- @echo The PropTest was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo Load the "$(QM)PropertySet.odt$(QM)" document to see how this component works. You can
- @echo use this component inside your office installation, see the example description.
- @echo -
- @echo $(MAKE) DialogComponent.odt.load
- @echo --------------------------------------------------------------------------------
-
-DialogComponent.odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl b/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl
deleted file mode 100644
index b465d8c6..00000000
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl
+++ /dev/null
@@ -1,47 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-#ifndef INCLUDED_COM_SUN_STAR_TEST_TESTDIALOGHANDLER_IDL
-#define INCLUDED_COM_SUN_STAR_TEST_TESTDIALOGHANDLER_IDL
-
-#include "XTestDialogHandler.idl"
-
-module com { module sun { module star { module test {
- service TestDialogHandler : XTestDialogHandler;
-}; }; }; };
-
-#endif
-
-
-
-
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl b/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl
deleted file mode 100644
index 5952d314..00000000
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl
+++ /dev/null
@@ -1,53 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_COM_SUN_STAR_TEST_XTESTDIALOGHANDLER_IDL
-#define INCLUDED_COM_SUN_STAR_TEST_XTESTDIALOGHANDLER_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/awt/XDialog.idl>
-#include <com/sun/star/frame/XModel.idl>
-#include <com/sun/star/frame/XFrame.idl>
-
-module com { module sun { module star { module test {
- interface XTestDialogHandler {
- string createDialog( [in] string DialogURL, [in] ::com::sun::star::frame::XModel xModel,
- [in] ::com::sun::star::frame::XFrame xFrame );
- void copyText( [in] ::com::sun::star::awt::XDialog xDialog, [in] any aEventObject );
- void handleEvent();
- void handleEventWithArguments( [in] ::com::sun::star::awt::XDialog xDialog, [in] any aEventObject );
- };
-}; }; }; };
-
-#endif
diff --git a/odk/examples/DevelopersGuide/Components/makefile.mk b/odk/examples/DevelopersGuide/Components/makefile.mk
deleted file mode 100644
index 7c399b33..00000000
--- a/odk/examples/DevelopersGuide/Components/makefile.mk
+++ /dev/null
@@ -1,123 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-DESTJOBSADDON=$(DESTDIRDEVGUIDEEXAMPLES)$/Components$/Addons$/JobsAddon
-JOBSADDON_FILES=\
- $(DESTJOBSADDON)$/Addons.xcu \
- $(DESTJOBSADDON)$/AsyncJob.java \
- $(DESTJOBSADDON)$/Jobs.xcu \
- $(DESTJOBSADDON)$/Makefile
-
-DESTPROTOCOLHANDLERADDONCPP=$(DESTDIRDEVGUIDEEXAMPLES)$/Components$/Addons$/ProtocolHandlerAddon_cpp
-PROTOCOLHANLDERADDONCPP_FILES=\
- $(DESTPROTOCOLHANDLERADDONCPP)$/addon.cxx \
- $(DESTPROTOCOLHANDLERADDONCPP)$/addon.hxx \
- $(DESTPROTOCOLHANDLERADDONCPP)$/Addons.xcu \
- $(DESTPROTOCOLHANDLERADDONCPP)$/component.cxx \
- $(DESTPROTOCOLHANDLERADDONCPP)$/Makefile \
- $(DESTPROTOCOLHANDLERADDONCPP)$/ProtocolHandler.xcu \
- $(DESTPROTOCOLHANDLERADDONCPP)$/ProtocolHandlerAddon_cpp.uno.xml
-
-DESTPROTOCOLHANDLERADDONJAVA=$(DESTDIRDEVGUIDEEXAMPLES)$/Components$/Addons$/ProtocolHandlerAddon_java
-PROTOCOLHANLDERADDONJAVA_FILES=\
- $(DESTPROTOCOLHANDLERADDONJAVA)$/Addons.xcu \
- $(DESTPROTOCOLHANDLERADDONJAVA)$/Makefile \
- $(DESTPROTOCOLHANDLERADDONJAVA)$/ProtocolHandler.xcu \
- $(DESTPROTOCOLHANDLERADDONJAVA)$/ProtocolHandlerAddon.java \
- $(DESTPROTOCOLHANDLERADDONJAVA)$/ProtocolHandlerAddon_java.uno.xml
-
-CPPCOMPONENT_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/CppComponent.uno.xml \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/service1_impl.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/service2_impl.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/TestCppComponent.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/SimpleComponent.odt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/CppComponent$/some.idl
-
-JAVACOMPONENT_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/TestComponentA.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/TestComponentB.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/TestServiceProvider.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/TestJavaComponent.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/XSomethingA.idl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/XSomethingB.idl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/SomethingA.idl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Components$/JavaComponent$/SomethingB.idl
-
-DESTTHUMBS=$(DESTDIRDEVGUIDEEXAMPLES)$/Components$/Thumbs
-THUMBS_FILES=\
- $(DESTTHUMBS)$/org$/openoffice$/comp$/test$/ImageShrink.java \
- $(DESTTHUMBS)$/org$/openoffice$/comp$/test$/Thumbs.java \
- $(DESTTHUMBS)$/org$/openoffice$/comp$/test$/Makefile \
- $(DESTTHUMBS)$/org$/openoffice$/test$/ImageShrink.idl \
- $(DESTTHUMBS)$/org$/openoffice$/test$/XImageShrink.idl \
- $(DESTTHUMBS)$/org$/openoffice$/test$/XImageShrinkFilter.idl \
- $(DESTTHUMBS)$/org$/openoffice$/test$/Makefile \
- $(DESTTHUMBS)$/thumbs.mk \
- $(DESTTHUMBS)$/Makefile
-
-
-DIR_FILE_LIST= \
- $(JOBSADDON_FILES) \
- $(PROTOCOLHANLDERADDONCPP_FILES) \
- $(PROTOCOLHANLDERADDONJAVA_FILES) \
- $(CPPCOMPONENT_FILES) \
- $(JAVACOMPONENT_FILES) \
- $(THUMBS_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_components_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_components.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
deleted file mode 100644
index 6e88494d..00000000
--- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// Import everything we use
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.beans.XHierarchicalPropertySet;
-import com.sun.star.beans.XMultiHierarchicalPropertySet;
-import com.sun.star.beans.XPropertyState;
-import com.sun.star.beans.XMultiPropertyStates;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-
-import com.sun.star.configuration.XTemplateInstance;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNameReplace;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.container.XNamed;
-import com.sun.star.container.XChild;
-import com.sun.star.container.XHierarchicalNameAccess;
-import com.sun.star.container.XHierarchicalName;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.EventObject;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.uno.AnyConverter;
-
-import com.sun.star.util.XChangesBatch;
-import com.sun.star.util.XChangesNotifier;
-import com.sun.star.util.XChangesListener;
-import com.sun.star.util.ChangesEvent;
-/** Config examples
- @author Joerg Barfurth
- */
-
-/* These examples show how to use the following features of the Config API:
-
- o Accessing data
- o Updating data
- o Updating properties in groups
- o Adding and removing items in sets
- o Resetting data to their defaults
-
- Each example is in a separate method call.
-*/
-public class ConfigExamples
-{
- // The ComponentContext interface of the remote component context
- private XComponentContext mxContext = null;
-
- // The MultiComponentFactory interface of the ServiceManager
- private XMultiComponentFactory mxServiceManager = null;
-
- // The MultiServiceFactory interface of the ConfigurationProvider
- private XMultiServiceFactory mxProvider = null;
-
- public static void main( String args[] )
- {
- try {
- // get the remote office component context
- com.sun.star.uno.XComponentContext xContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- if( xContext != null )
- System.out.println("Connected to a running office ...");
- else
- System.out.println( "ERROR: Cannot connect - no remote component context available." );
-
- // Create an instance of the class and call it's run method
- ConfigExamples aExample = new ConfigExamples(xContext);
- aExample.run( );
-
- // if you own the service manager dispose it here
- // to ensure that the default provider is properly disposed and flushed
- System.exit(0);
- }
- catch( Exception e )
- {
- e.printStackTrace();
- System.exit(-1);
- }
- }
-
- /** Create a ConfigExamples instance supplying a service factory
- */
- public ConfigExamples(XComponentContext xContext)
- {
- mxContext = xContext;
- mxServiceManager = xContext.getServiceManager();
- }
-
- /** Run the examples with a default ConfigurationProvider
- */
- public void run()
- throws com.sun.star.uno.Exception
- {
- mxProvider = createProvider();
-
- runExamples( );
-
- // we are using the default ConfigurationProvider, so we must not dispose it
- mxProvider = null;
- }
-
- /** Run the examples with a given ConfigurationProvider
- */
- public void runExamples( )
- {
- if (checkProvider(mxProvider))
- {
- System.out.println("\nStarting examples.");
-
- readDataExample();
-
- browseDataExample();
-
- updateGroupExample();
-
- resetGroupExample();
-
- updateSetExample();
-
- System.out.println("\nAll Examples completed.");
- }
- else
- System.out.println("ERROR: Cannot run examples without ConfigurationProvider.");
-
- }
-
- /** Do some simple checks, if tehre is a valid ConfigurationProvider
- */
- public static boolean checkProvider(XMultiServiceFactory xProvider)
- {
- // check the provider we have
- if (xProvider == null)
- {
- System.out.println("No provider available. Cannot access configuration data.");
- return false;
-
- }
-
- try
- {
- // check the provider implementation
- XServiceInfo xProviderServices =
- (XServiceInfo) UnoRuntime.queryInterface( XServiceInfo.class, xProvider );
-
- if (xProviderServices == null ||
- !xProviderServices.supportsService("com.sun.star.configuration.ConfigurationProvider"))
- {
- System.out.println("WARNING: The provider is not a com.sun.star.configuration.ConfigurationProvider");
- }
-
- if (xProviderServices != null)
- {
- System.out.println("Using provider implementation: " + xProviderServices.getImplementationName());
- }
-
- return true;
- }
- catch (com.sun.star.uno.RuntimeException e)
- {
- System.err.println("ERROR: Failure while checking the provider services.");
- e.printStackTrace();
- return false;
- }
- }
-
- /** Get the provider we have
- */
- public XMultiServiceFactory getProvider( )
- {
- return mxProvider;
- }
-
- /** Create a default configuration provider
- */
- public XMultiServiceFactory createProvider( )
- throws com.sun.star.uno.Exception
- {
- final String sProviderService = "com.sun.star.configuration.ConfigurationProvider";
-
- // create the provider and return it as a XMultiServiceFactory
- XMultiServiceFactory xProvider = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class,
- mxServiceManager.createInstanceWithContext(sProviderService,
- mxContext));
-
- return xProvider;
- }
-
- /** Create a specified read-only configuration view
- */
- public Object createConfigurationView( String sPath )
- throws com.sun.star.uno.Exception
- {
- XMultiServiceFactory xProvider = getProvider();
-
- // The service name: Need only read access:
- final String sReadOnlyView = "com.sun.star.configuration.ConfigurationAccess";
-
- // creation arguments: nodepath
- com.sun.star.beans.PropertyValue aPathArgument = new com.sun.star.beans.PropertyValue();
- aPathArgument.Name = "nodepath";
- aPathArgument.Value = sPath;
-
- Object[] aArguments = new Object[1];
- aArguments[0] = aPathArgument;
-
- // create the view
- Object xViewRoot = xProvider.createInstanceWithArguments(sReadOnlyView, aArguments);
-
- return xViewRoot;
- }
-
- /** Create a specified updatable configuration view
- */
- Object createUpdatableView( String sPath )
- throws com.sun.star.uno.Exception
- {
- XMultiServiceFactory xProvider = getProvider();
-
- // The service name: Need update access:
- final String cUpdatableView = "com.sun.star.configuration.ConfigurationUpdateAccess";
-
- // creation arguments: nodepath
- com.sun.star.beans.PropertyValue aPathArgument = new com.sun.star.beans.PropertyValue();
- aPathArgument.Name = "nodepath";
- aPathArgument.Value = sPath;
-
- Object[] aArguments = new Object[1];
- aArguments[0] = aPathArgument;
-
- // create the view
- Object xViewRoot = xProvider.createInstanceWithArguments(cUpdatableView, aArguments);
-
- return xViewRoot;
- }
-
- /** This method demonstrates read access to data
- */
- protected void readDataExample ()
- {
- try
- {
- System.out.println("\n--- starting example: read grid option settings --------------------");
- Object aData = readGridConfiguration( );
- System.out.println("Read grid options: " + aData);
-
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates browsing access to data
- */
- protected void browseDataExample ()
- {
- try
- {
- System.out.println("\n--- starting example: browse filter configuration ------------------");
- printRegisteredFilters( );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates update access to group data
- */
- protected void updateGroupExample ()
- {
- try
- {
- System.out.println("\n--- starting example: update group data --------------");
- editGridOptions( );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates resetting data to its default state
- */
- protected void resetGroupExample ()
- {
- try
- {
- System.out.println("\n--- starting example: reset group data -----------------------------");
- Object aOldData = readGridConfiguration( );
- resetGridConfiguration( );
- Object aNewData = readGridConfiguration( );
- System.out.println("Before reset: user grid options: " + aOldData);
- System.out.println("After reset: default grid options: " + aNewData);
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates update access to set data
- */
- protected void updateSetExample ()
- {
- try
- {
- System.out.println("\n--- starting example: update set data ---------------");
- storeSampleDataSource( );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
-// READ example
- /// class to hold information about grid settings
- public static class GridOptions
- {
- public boolean visible;
- public int resolution_x;
- public int resolution_y;
- public int subdivision_x;
- public int subdivision_y;
-
- public String toString() {
- StringBuffer aBuffer = new StringBuffer();
- aBuffer.append("[ Grid is "); aBuffer.append(visible ? "VISIBLE" : "HIDDEN");
- aBuffer.append("; resolution = (" + resolution_x + "," + resolution_y + ")");
- aBuffer.append("; subdivision = (" + subdivision_x + "," + subdivision_y + ")");
- aBuffer.append(" ]");
- return aBuffer.toString();
- }
- };
-
- /// This method reads information about grid settings
- protected GridOptions readGridConfiguration()
- throws com.sun.star.uno.Exception
- {
- // The path to the root element
- final String cGridOptionsPath = "/org.openoffice.Office.Calc/Grid";
-
- // create the view
- Object xViewRoot = createConfigurationView(cGridOptionsPath);
-
- // the result structure
- GridOptions options = new GridOptions();
-
- // accessing a single nested value
- XHierarchicalPropertySet xProperties =
- (XHierarchicalPropertySet)UnoRuntime.queryInterface(XHierarchicalPropertySet.class, xViewRoot);
-
- Object aVisible = xProperties.getHierarchicalPropertyValue("Option/VisibleGrid");
- options.visible = ((Boolean) aVisible).booleanValue();
-
- // accessing a nested object and its subproperties
- Object xSubdivision = xProperties.getHierarchicalPropertyValue("Subdivision");
-
- XMultiPropertySet xSubdivProperties =
- (XMultiPropertySet)UnoRuntime.queryInterface(XMultiPropertySet.class, xSubdivision);
-
- // variables for multi-element access
- String[] aElementNames = new String[2];
-
- aElementNames[0] = "XAxis";
- aElementNames[1] = "YAxis";
-
- Object[] aElementValues = xSubdivProperties.getPropertyValues(aElementNames);
-
- options.subdivision_x = ((Integer) aElementValues[0]).intValue();
- options.subdivision_y = ((Integer) aElementValues[1]).intValue();
-
- // accessing deeply nested subproperties
- Object xResolution = xProperties.getHierarchicalPropertyValue("Resolution");
-
- XMultiHierarchicalPropertySet xResolutionProperties =
- (XMultiHierarchicalPropertySet)
- UnoRuntime.queryInterface(XMultiHierarchicalPropertySet.class, xResolution);
-
- aElementNames[0] = "XAxis/Metric";
- aElementNames[1] = "YAxis/Metric";
-
- aElementValues = xResolutionProperties.getHierarchicalPropertyValues(aElementNames);
-
- options.resolution_x = ((Integer) aElementValues[0]).intValue();
- options.resolution_y = ((Integer) aElementValues[1]).intValue();
-
- // all options have been retrieved - clean up and return
- // we are done with the view - dispose it
-
- ((XComponent)UnoRuntime.queryInterface(XComponent.class, xViewRoot)).dispose();
-
- return options;
- }
-
-// BROWSE example
- /// Interface to procees information when browsing the configuration tree
- public static interface IConfigurationProcessor
- {
- /// process a value item
- public abstract void processValueElement( String sPath_, Object aValue_ );
- /// process a structural item
- public abstract void processStructuralElement( String sPath_, XInterface xElement_);
- };
-
- /// Internal method to recursively browse a structural element in preorder
- public void browseElementRecursively( XInterface xElement, IConfigurationProcessor aProcessor )
- throws com.sun.star.uno.Exception
- {
- // First process this as an element (preorder traversal)
- XHierarchicalName xElementPath =
- (XHierarchicalName) UnoRuntime.queryInterface(XHierarchicalName.class, xElement);
-
- String sPath = xElementPath.getHierarchicalName();
-
- aProcessor.processStructuralElement( sPath, xElement);
-
- // now process this as a container
- XNameAccess xChildAccess =
- (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xElement);
-
- // get a list of child elements
- String[] aElementNames = xChildAccess.getElementNames();
-
- // and process them one by one
- for(int i=0; i< aElementNames.length; ++i)
- {
- Object aChild = xChildAccess.getByName( aElementNames[i] );
- AnyConverter aAnyConv = new AnyConverter();
- // is it a structural element (object) ...
- if ( aAnyConv.isObject(aChild) && !aAnyConv.isArray(aChild) )
- {
- // then get an interface
- XInterface xChildElement = (XInterface)UnoRuntime.queryInterface(XInterface.class, aChild);
-
- // and continue processing child elements recursively
- browseElementRecursively( xChildElement, aProcessor );
- }
- // ... or is it a simple value
- else
- {
- // Build the path to it from the path of
- // the element and the name of the child
- String sChildPath;
- sChildPath =
- xElementPath.composeHierarchicalName(aElementNames[i]);
-
- // and process the value
- aProcessor.processValueElement( sChildPath, aChild );
- }
- }
- }
-
- /** Method to browse the part rooted at sRootPath
- of the configuration that the Provider provides.
-
- All nodes will be processed by the IConfigurationProcessor passed.
- */
- public void browseConfiguration( String sRootPath, IConfigurationProcessor aProcessor )
- throws com.sun.star.uno.Exception
- {
- // create the root element
- XInterface xViewRoot = (XInterface)createConfigurationView( sRootPath );
-
- // now do the processing
- browseElementRecursively( xViewRoot, aProcessor );
-
- // we are done with the view - dispose it
- // This assumes that the processor
- // does not keep a reference to the elements in processStructuralElement
-
- ((XComponent) UnoRuntime.queryInterface(XComponent.class,xViewRoot)).dispose();
- xViewRoot = null;
- }
-
- /** Method to browse the filter configuration.
-
- Information about installed filters will be printed.
- */
- public void printRegisteredFilters()
- throws com.sun.star.uno.Exception
- {
- final String sProviderService = "com.sun.star.configuration.ConfigurationProvider";
- final String sFilterKey = "/org.openoffice.TypeDetection.Filter/Filters";
-
- // browse the configuration, dumping filter information
- browseConfiguration( sFilterKey,
- new IConfigurationProcessor () {
- /// prints Path and Value of properties
- public void processValueElement( String sPath_, Object aValue_ ) {
- if (new AnyConverter().isArray(aValue_))
- {
- final Object [] aArray = (Object [])aValue_;
-
- System.out.print("\tValue: " + sPath_ + " = { ");
- for (int i=0; i<aArray.length; ++i)
- {
- if (i != 0) System.out.print(", ");
- System.out.print(aArray[i]);
- }
- System.out.println(" }");
- }
- else
- System.out.println("\tValue: " + sPath_ + " = " + aValue_);
- }
-
- /// prints the Filter entries
- public void processStructuralElement( String sPath_, XInterface xElement_) {
- // get template information, to detect instances of the 'Filter' template
- XTemplateInstance xInstance =
- ( XTemplateInstance )UnoRuntime.queryInterface( XTemplateInstance .class,xElement_);
-
- // only select the Filter entries
- if (xInstance != null && xInstance.getTemplateName().endsWith("Filter")) {
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface(XNamed.class,xElement_);
- System.out.println("Filter " + xNamed.getName() + " (" + sPath_ + ")");
- }
- }
- } );
- }
-
-// GROUP UPDATE example
-
- /** This method simulates editing configuration data using a GridEditor dialog class
- */
- public void editGridOptions( )
- throws com.sun.star.uno.Exception
- {
- // The path to the root element
- final String cGridOptionsPath = "/org.openoffice.Office.Calc/Grid";
-
- // create the view
- Object xViewRoot = createUpdatableView( cGridOptionsPath );
-
- // the 'editor'
- GridOptionsEditor dialog = new GridOptionsEditor();
-
- // set up the initial values and register listeners
- // get a data access interface, to supply the view with a model
- XMultiHierarchicalPropertySet xProperties =
- (XMultiHierarchicalPropertySet)
- UnoRuntime.queryInterface(XMultiHierarchicalPropertySet.class, xViewRoot);
-
- dialog.setModel( xProperties );
-
- // get a listener object (probably an adapter) that notifies
- // the dialog of external changes to its model
- XChangesListener xListener = dialog.createChangesListener( );
-
- XChangesNotifier xNotifier =
- (XChangesNotifier)UnoRuntime.queryInterface(XChangesNotifier.class, xViewRoot);
-
- xNotifier.addChangesListener( xListener );
-
- // trigger the listener
- changeSomeData( cGridOptionsPath + "/Subdivision" );
-
- if (dialog.execute() == GridOptionsEditor.SAVE_SETTINGS)
- {
- // changes have been applied to the view here
- XChangesBatch xUpdateControl =
- (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class,xViewRoot);
-
- try
- {
- xUpdateControl.commitChanges();
- }
- catch (Exception e)
- {
- dialog.informUserOfError( e );
- }
- }
-
- // all changes have been handled - clean up and return
- // listener is done now
- xNotifier.removeChangesListener( xListener );
-
- // we are done with the view - dispose it
- ((XComponent)UnoRuntime.queryInterface(XComponent.class, xViewRoot)).dispose();
- }
-
- /** A class that changes some grid options settings
-
- The interface of this class is chose to resemble a possible UI dialog class
- */
- private class GridOptionsEditor {
- /// the data this editor edits
- XMultiHierarchicalPropertySet mxModel;
-
- public static final int CANCELED = 0;
- public static final int SAVE_SETTINGS = 1;
-
- // sets a model and updates the display
- public void setModel(XMultiHierarchicalPropertySet xModel) {
- mxModel = xModel;
- updateDisplay();
- }
-
- // this method 'runs' the 'dialog'
- public int execute() {
- try
- {
- System.out.println("-- GridEditor executing --");
- // simulate a user action changing some data
- toggleVisibility();
- System.out.println("-- GridEditor done --");
- return SAVE_SETTINGS;
- }
- catch (Exception e)
- {
- informUserOfError(e);
- return CANCELED;
- }
- }
-
- /// this method is called to report an error during dialog execution to the zuser
- public void informUserOfError(Exception e) {
- System.err.println("ERROR in GridEditor:");
- e.printStackTrace();
- }
-
- /// this method is called to allow the dialog to get feedback about changes occurring elsewhere
- public XChangesListener createChangesListener() {
- if (mxModel == null) return null;
-
- return (new XChangesListener () {
- public void changesOccurred( ChangesEvent event ) {
- System.out.println("GridEditor - Listener received changes event containing " +
- event.Changes.length + " change(s).");
- updateDisplay();
- }
-
- public void disposing(EventObject event) {
- System.out.println("GridEditor - Listener received disposed event: releasing model");
- setModel(null);
- }
- });
- }
- /// this method is called when data has changed to display the updated data
- private void updateDisplay() {
- if (mxModel != null)
- System.out.println("Grid options editor: data=" + readModel());
- else
- System.out.println("Grid options editor: no model set");
- }
-
- // this method is used to read all relevant data from the model
- private GridOptions readModel()
- {
- try
- {
- String [] aOptionNames = new String [5];
- aOptionNames[0] = "Option/VisibleGrid";
- aOptionNames[1] = "Subdivision/XAxis";
- aOptionNames[2] = "Subdivision/YAxis";
- aOptionNames[3] = "Resolution/XAxis/Metric";
- aOptionNames[4] = "Resolution/YAxis/Metric";
-
- Object [] aValues = mxModel.getHierarchicalPropertyValues(aOptionNames);
-
- GridOptions result = new GridOptions();
- result.visible = ((Boolean)aValues[0]).booleanValue();
- result.subdivision_x = ((Integer)aValues[1]).intValue();
- result.subdivision_y = ((Integer)aValues[2]).intValue();
- result.resolution_x = ((Integer)aValues[3]).intValue();
- result.resolution_y = ((Integer)aValues[4]).intValue();
-
- return result;
- }
- catch (Exception e)
- {
- informUserOfError(e);
- return null;
- }
- }
-
- // this method executes an edit
- private void toggleVisibility()
- {
- try
- {
- XHierarchicalPropertySet xHPS =
- (XHierarchicalPropertySet)UnoRuntime.queryInterface(XHierarchicalPropertySet.class, mxModel);
-
- final String sSetting = "Option/VisibleGrid";
-
- System.out.println("GridEditor: toggling Visibility");
-
- Boolean bOldValue = (Boolean)xHPS.getHierarchicalPropertyValue(sSetting);
-
- Boolean bNewValue = new Boolean( ! bOldValue.booleanValue() );
-
- xHPS.setHierarchicalPropertyValue(sSetting,bNewValue);
- }
- catch (Exception e)
- {
- informUserOfError(e);
- }
- }
- }
-
- /** This method creates an extra updatable view to change some data
- and trigger the listener of the GridEditor
- */
- void changeSomeData(String xKey)
- {
- try
- {
- Object xOtherViewRoot = createUpdatableView(xKey);
-
- XNameReplace aReplace = (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, xOtherViewRoot);
-
- String aItemNames [] = aReplace.getElementNames();
- for (int i=0; i < aItemNames.length; ++i) {
- Object aItem = aReplace.getByName( aItemNames [i] );
- AnyConverter aAnyConv = new AnyConverter();
- // replace integers by a 'complement' value
- if ( aAnyConv.isInt(aItem) )
- {
- int nOld = aAnyConv.toInt(aItem);
- int nNew = 9999 - nOld;
-
- System.out.println("Replacing integer value: " + aItemNames [i]);
- aReplace.replaceByName( aItemNames [i], new Integer( nNew ) );
- }
-
- // and booleans by their negated value
- else if ( aAnyConv.isBoolean(aItem) )
- {
- boolean bOld = aAnyConv.toBoolean(aItem);
- boolean bNew = ! bOld;
-
- System.out.println("Replacing boolean value: " + aItemNames [i]);
- aReplace.replaceByName( aItemNames [i], new Boolean( bNew ) );
- }
- }
-
- // commit the changes
- XChangesBatch xUpdateControl =
- (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class,xOtherViewRoot);
-
- xUpdateControl.commitChanges();
-
- // we are done with the view - dispose it
- ((XComponent)UnoRuntime.queryInterface(XComponent.class, xOtherViewRoot)).dispose();
- }
- catch (Exception e)
- {
- System.err.println("Could not change some data in a different view. An exception occurred:");
- e.printStackTrace();
- }
- }
-
-// GROUP RESET EXAMPLE
- /// This method resets the grid settings to their default values
- protected void resetGridConfiguration()
- throws com.sun.star.uno.Exception
- {
- // The path to the root element
- final String cGridOptionsPath = "/org.openoffice.Office.Calc/Grid";
-
- // create the view
- Object xViewRoot = createUpdatableView(cGridOptionsPath);
-
- // resetting a single nested value
- XHierarchicalNameAccess xHierarchicalAccess =
- (XHierarchicalNameAccess)UnoRuntime.queryInterface(XHierarchicalNameAccess.class, xViewRoot);
-
- // get using absolute name
- Object xOptions = xHierarchicalAccess.getByHierarchicalName(cGridOptionsPath + "/Option");
-
- XPropertyState xOptionState =
- (XPropertyState)UnoRuntime.queryInterface(XPropertyState.class, xOptions);
-
- xOptionState.setPropertyToDefault("VisibleGrid");
-
- // resetting more deeply nested values
- Object xResolutionX = xHierarchicalAccess.getByHierarchicalName("Resolution/XAxis");
- Object xResolutionY = xHierarchicalAccess.getByHierarchicalName("Resolution/YAxis");
-
- XPropertyState xResolutionStateX =
- (XPropertyState)UnoRuntime.queryInterface(XPropertyState.class, xResolutionX);
- XPropertyState xResolutionStateY =
- (XPropertyState)UnoRuntime.queryInterface(XPropertyState.class, xResolutionY);
-
- xResolutionStateX.setPropertyToDefault("Metric");
- xResolutionStateY.setPropertyToDefault("Metric");
-
- // resetting multiple sibling values
- Object xSubdivision = xHierarchicalAccess.getByHierarchicalName("Subdivision");
-
- XMultiPropertyStates xSubdivisionStates =
- (XMultiPropertyStates)UnoRuntime.queryInterface(XMultiPropertyStates.class, xSubdivision);
-
- xSubdivisionStates.setAllPropertiesToDefault();
-
- // commit the changes
- XChangesBatch xUpdateControl =
- (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class,xViewRoot);
-
- xUpdateControl.commitChanges();
-
- // we are done with the view - dispose it
- ((XComponent)UnoRuntime.queryInterface(XComponent.class, xViewRoot)).dispose();
- }
-
-
-// SET UPDATE EXAMPLE
- private static boolean SET_EXAMPLE_BROKEN_IN_THIS_RELEASE = true;
-
- /** This method stores a sample data source given some connection data.
-
- ATTENTION: This example requires an older version of the
- org.openoffice.Office.DataAccess schema.
- It does not work with the current schema.
- Because of this, the method currenty does nothing.
- You can still use the techniques shown in the example code.
- */
- void storeSampleDataSource()
- throws com.sun.star.uno.Exception
- {
- if (SET_EXAMPLE_BROKEN_IN_THIS_RELEASE)
- {
- System.out.println("- DISABLED: (the existing example does not work with this version) -");
- return; // this function does not work
- }
-
- String sSampleDataSourceName = "SampleTextDatabase";
-
- String sSampleDataSourceURL = "sdbc:flat:$(userurl)/database/SampleTextDatabase";
- // String sSampleDataSourceURL = "sdbc:flat:file:///usr/local/database/SampleTextDatabase";
- // String sSampleDataSourceURL = "sdbc:flat:file:///C:/data/database/SampleTextDatabase";
-
- com.sun.star.beans.NamedValue [] aSettings = new com.sun.star.beans.NamedValue [2];
- aSettings[0] = new com.sun.star.beans.NamedValue("HeaderLine",new Boolean(true));
- aSettings[1] = new com.sun.star.beans.NamedValue("FieldDelimiter",";");
-
- String [] aTableFilter = new String[2];
- aTableFilter[0] = "table.txt";
- aTableFilter[1] = "othertable.txt";
-
- storeDataSource(sSampleDataSourceName,sSampleDataSourceURL,"",false,0,aSettings,aTableFilter);
- }
-
- /// This method stores a data source given some connection data
- void storeDataSource(
- String sDataSourceName,
- String sDataSourceURL,
- String sUser,
- boolean bNeedsPassword,
- int nTimeout,
- com.sun.star.beans.NamedValue [] aDriverSettings,
- String [] aTableFilter
- )
- throws com.sun.star.uno.Exception
- {
- // create the view and get the data source element
- Object xDataSource = createDataSourceDescription(getProvider(),sDataSourceName);
-
- // set the values
- XPropertySet xDataSourceProperties =
- (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xDataSource);
-
- xDataSourceProperties.setPropertyValue("URL", sDataSourceURL );
- xDataSourceProperties.setPropertyValue("User", sUser );
- xDataSourceProperties.setPropertyValue("IsPasswordRequired", new Boolean( bNeedsPassword ) );
- xDataSourceProperties.setPropertyValue("LoginTimeout", new Integer( nTimeout ) );
-
- if ( aTableFilter != null )
- xDataSourceProperties.setPropertyValue("TableFilter", aTableFilter );
-
- // store the driver-specific settings
- if (aDriverSettings != null)
- {
- Object xSettingsSet = xDataSourceProperties.getPropertyValue("DataSourceSettings");
- storeSettings( xSettingsSet, aDriverSettings);
- }
-
- // save the data and dispose the view
- // recover the view root
- Object xViewRoot = getViewRoot(xDataSource);
-
- // commit the changes
- XChangesBatch xUpdateControl =
- (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class,xViewRoot);
-
- xUpdateControl.commitChanges();
-
- // now clean up
- ((XComponent) UnoRuntime.queryInterface(XComponent.class, xViewRoot)).dispose();
- }
-
- /** This method gets the DataSourceDescription for a data source.
- It either gets the existing entry or creates a new instance.
- */
- Object createDataSourceDescription(XMultiServiceFactory xProvider, String sDataSourceName )
- throws com.sun.star.uno.Exception
- {
- // The service name: Need an update access:
- final String cUpdatableView = "com.sun.star.configuration.ConfigurationUpdateAccess";
-
- // The path to the DataSources set node
- final String cDataSourcesPath = "/org.openoffice.Office.DataAccess/DataSources";
-
- // creation arguments: nodepath
- com.sun.star.beans.PropertyValue aPathArgument = new com.sun.star.beans.PropertyValue();
- aPathArgument.Name = "nodepath";
- aPathArgument.Value = cDataSourcesPath ;
-
- Object[] aArguments = new Object[1];
- aArguments[0] = aPathArgument;
-
- // create the view
- Object xViewRoot =
- xProvider.createInstanceWithArguments(cUpdatableView, aArguments);
-
- XNameAccess xSetOfDataSources =
- (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,xViewRoot);
-
- Object xDataSourceDescriptor = null; // the result
- if ( xSetOfDataSources .hasByName( sDataSourceName ))
- {
- // the element is there
- try
- {
- // the view should point to the element directly, so we need to extend the path
- XHierarchicalName xComposePath = (XHierarchicalName)
- UnoRuntime.queryInterface(XHierarchicalName.class, xSetOfDataSources );
-
- String sElementPath = xComposePath.composeHierarchicalName( sDataSourceName );
-
- // use the name of the element now
- aPathArgument.Value = sElementPath;
-
- // create another view now
- Object[] aDeepArguments = new Object[1];
- aDeepArguments[0] = aPathArgument;
-
- // create the view
- xDataSourceDescriptor =
- xProvider.createInstanceWithArguments(cUpdatableView, aDeepArguments);
-
- if ( xDataSourceDescriptor != null) // all went fine
- {
- // dispose the other view
- ((XComponent)UnoRuntime.queryInterface(XComponent.class, xViewRoot)).dispose();
- xViewRoot = null;
- }
- }
- catch (Exception e)
- {
- // something went wrong, we retry with a new element
- System.err.println("WARNING: An exception occurred while creating a view for an existing data source: " + e);
- xDataSourceDescriptor = null;
- }
- }
-
- // do we have a result element yet ?
- if ( xDataSourceDescriptor == null)
- {
- // get the container
- XNameContainer xSetUpdate =
- (XNameContainer)UnoRuntime.queryInterface(XNameContainer.class, xViewRoot);
-
- // create a new detached set element (instance of DataSourceDescription)
- XSingleServiceFactory xElementFactory =
- (XSingleServiceFactory)UnoRuntime.queryInterface(XSingleServiceFactory.class, xSetUpdate);
-
- // the new element is the result !
- xDataSourceDescriptor = xElementFactory.createInstance();
-
- // insert it - this also names the element
- xSetUpdate.insertByName( sDataSourceName , xDataSourceDescriptor );
- }
-
- return xDataSourceDescriptor ;
- }
-
- /// this method stores a number of settings in a set node containing DataSourceSetting objects
- void storeSettings(Object xSettingsSet, com.sun.star.beans.NamedValue [] aSettings )
- throws com.sun.star.uno.Exception
- {
- if (aSettings == null)
- return;
-
- // get the settings set as a container
- XNameContainer xSettingsContainer =
- (XNameContainer) UnoRuntime.queryInterface( XNameContainer.class, xSettingsSet);
-
- // and get a factory interface for creating the entries
- XSingleServiceFactory xSettingsFactory =
- (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, xSettingsSet);
-
- // now insert the individual settings
- for (int i = 0; i < aSettings.length; ++i) {
- // create a DataSourceSetting object
- XPropertySet xSetting = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xSettingsFactory.createInstance() );
-
- // can set the value before inserting
- xSetting.setPropertyValue( "Value", aSettings[i].Value );
-
- // and now insert or replace as appropriate
- if (xSettingsContainer.hasByName( aSettings[i].Name ))
- xSettingsContainer.replaceByName( aSettings[i].Name, xSetting );
- else
- xSettingsContainer.insertByName( aSettings[i].Name, xSetting );
- }
- }
-
-// HELPER FUNCTIONS
-
- /// This method get the view root node given an interface to any node in the view
- public static Object getViewRoot(Object xElement)
- {
- Object xResult = xElement;
-
- // set the result to its parent until that would be null
- Object xParent;
- do
- {
- XChild xParentAccess =
- (XChild) UnoRuntime.queryInterface(XChild.class,xResult);
-
- if (xParentAccess != null)
- xParent = xParentAccess.getParent();
- else
- xParent = null;
-
- if (xParent != null)
- xResult = xParent;
- }
- while (xParent != null);
-
- return xResult;
- }
-
-// workaround methods for unimplemented functionality
-
- /// WORKAROUND: does the same as xNamedItem.setName(sNewName) should do
- void renameSetItem(XNamed xNamedItem, String sNewName)
- throws com.sun.star.uno.Exception
- {
- XChild xChildItem = (XChild)
- UnoRuntime.queryInterface(XChild.class, xNamedItem);
-
- XNameContainer xParentSet = (XNameContainer)
- UnoRuntime.queryInterface( XNameContainer.class, xChildItem.getParent() );
-
- String sOldName = xNamedItem.getName();
-
- // now rename the item
- xParentSet.removeByName(sOldName);
- xParentSet.insertByName(sNewName,xNamedItem);
- }
-
- /// WORKAROUND: does the same as xChildItem.setParent( xNewParent ) should do
- void moveSetItem(XChild xChildItem, XNameContainer xNewParent)
- throws com.sun.star.uno.Exception
- {
- XNamed xNamedItem = (XNamed)
- UnoRuntime.queryInterface(XNamed.class, xChildItem);
-
- XNameContainer xOldParent = (XNameContainer)
- UnoRuntime.queryInterface( XNameContainer.class, xChildItem.getParent() );
-
- String sItemName = xNamedItem.getName();
-
- // now rename the item
- xOldParent.removeByName(sItemName);
- xNewParent.insertByName(sItemName,xChildItem);
- }
-
-
-// ------- the end -----------
-}
diff --git a/odk/examples/DevelopersGuide/Config/Makefile b/odk/examples/DevelopersGuide/Config/Makefile
deleted file mode 100644
index 9b1e54fc..00000000
--- a/odk/examples/DevelopersGuide/Config/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Configuration example of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=DevGuideConfigExamples
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-# some special macro names for separating the example jar stuff
-APP1_NAME=ConfigExamples
-APP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME)
-APP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME)
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP1_JAR_MANIFEST=$(APP1_GEN_OUT)/$(APP1_NAME).mf
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP1_CLASS_OUT))
-
-# Targets
-.PHONY: ALL
-ALL : $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-# rule for example application class files
-$(APP1_CLASS_OUT)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $<
-
-# rule for client/example application manifest file
-$(APP1_GEN_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-# rule for client/example application jar file
-$(APP1_JAR) : $(APP1_JAR_MANIFEST) $(APP1_CLASS_OUT)/$(APP1_NAME).class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(SAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
diff --git a/odk/examples/DevelopersGuide/Config/makefile.mk b/odk/examples/DevelopersGuide/Config/makefile.mk
deleted file mode 100644
index d65ce268..00000000
--- a/odk/examples/DevelopersGuide/Config/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-CONFIG_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Config$/ConfigExamples.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Config$/Makefile
-
-DIR_FILE_LIST= \
- $(CONFIG_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_config_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_config.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java
deleted file mode 100644
index 855b816b..00000000
--- a/odk/examples/DevelopersGuide/Database/CodeSamples.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.io.*;
-
-import com.sun.star.comp.helper.RegistryServiceFactory;
-import com.sun.star.comp.servicemanager.ServiceManager;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XComponent;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.sdbc.*;
-import com.sun.star.sdb.*;
-import com.sun.star.sdbcx.*;
-import com.sun.star.frame.*;
-
-public class CodeSamples
-{
- public static XComponentContext xContext;
- public static XMultiComponentFactory xMCF;
-
- public static void main(String argv[]) throws java.lang.Exception
- {
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xMCF = xContext.getServiceManager();
- }
- catch(Exception e) {
- System.err.println("ERROR: can't get a component context from a running office ...");
- e.printStackTrace();
- System.exit(1);
- }
-
- try{
- createQuerydefinition( );
- printQueryColumnNames( );
-
- XConnection con = openConnectionWithDriverManager();
- if ( con != null ) {
- {
- SalesMan sm = new SalesMan( con );
-
- try {
- sm.dropSalesManTable( ); // doesn't matter here
- }
- catch(com.sun.star.uno.Exception e)
- {
- }
- sm.createSalesManTable( );
- sm.insertDataIntoSalesMan( );
- sm.updateSalesMan( );
- sm.retrieveSalesManData( );
- }
-
- {
- Sales sm = new Sales( con );
-
- try {
- sm.dropSalesTable( ); // doesn't matter here
- }
- catch(com.sun.star.uno.Exception e)
- {
- }
- sm.createSalesTable( );
- sm.insertDataIntoSales( );
- sm.updateSales( );
- sm.retrieveSalesData( );
- sm.displayColumnNames( );
- }
- displayTableStructure( con );
- }
- // printDataSources();
- }
- catch(Exception e)
- {
- System.err.println(e);
- e.printStackTrace();
- }
- System.exit(0);
- }
-
- // check if the connection is not null aand dispose it later on.
- public static void checkConnection(XConnection con) throws com.sun.star.uno.Exception
- {
- if(con != null)
- {
- System.out.println("Connection was created!");
- // now we dispose the connection to close it
- XComponent xComponent = (XComponent)UnoRuntime.queryInterface(XComponent.class,con);
- if(xComponent != null)
- {
- // connections must be disposed
- xComponent.dispose();
- System.out.println("Connection disposed!");
- }
- }
- else
- System.out.println("Connection could not be created!");
- }
-
- // uses the driver manager to create a new connection and dispose it.
- public static XConnection openConnectionWithDriverManager() throws com.sun.star.uno.Exception
- {
- XConnection con = null;
- // create the DriverManager
- Object driverManager =
- xMCF.createInstanceWithContext("com.sun.star.sdbc.DriverManager",
- xContext);
- // query for the interface
- com.sun.star.sdbc.XDriverManager xDriverManager;
- xDriverManager = (XDriverManager)UnoRuntime.queryInterface(XDriverManager.class,driverManager);
- if(xDriverManager != null)
- {
- // first create the needed url
- String url = "jdbc:mysql://localhost:3306/TestTables";
- // second create the necessary properties
- com.sun.star.beans.PropertyValue [] props = new com.sun.star.beans.PropertyValue[]
- {
- new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.gjt.mm.mysql.Driver",com.sun.star.beans.PropertyState.DIRECT_VALUE)
- };
- // now create a connection to mysql
- con = xDriverManager.getConnectionWithInfo(url,props);
- }
- return con;
- }
-
- // uses the driver directly to create a new connection and dispose it.
- public static XConnection openConnectionWithDriver() throws com.sun.star.uno.Exception
- {
- XConnection con = null;
- // create the Driver with the implementation name
- Object aDriver =
- xMCF.createInstanceWithContext("org.openoffice.comp.drivers.MySQL.Driver",
- xContext);
- // query for the interface
- com.sun.star.sdbc.XDriver xDriver;
- xDriver = (XDriver)UnoRuntime.queryInterface(XDriver.class,aDriver);
- if(xDriver != null)
- {
- // first create the needed url
- String url = "jdbc:mysql://localhost:3306/TestTables";
- // second create the necessary properties
- com.sun.star.beans.PropertyValue [] props = new com.sun.star.beans.PropertyValue[]
- {
- new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.gjt.mm.mysql.Driver",com.sun.star.beans.PropertyState.DIRECT_VALUE)
- };
- // now create a connection to mysql
- con = xDriver.connect(url,props);
- }
- return con;
- }
-
- // print all available datasources
- public static void printDataSources() throws com.sun.star.uno.Exception
- {
- // create a DatabaseContext and print all DataSource names
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.DatabaseContext",
- xContext));
- String aNames [] = xNameAccess.getElementNames();
- for(int i=0;i<aNames.length;++i)
- System.out.println(aNames[i]);
- }
-
- // displays the structure of the first table
- public static void displayTableStructure(XConnection con) throws com.sun.star.uno.Exception
- {
- XDatabaseMetaData dm = con.getMetaData();
- XResultSet rsTables = dm.getTables(null,"%","SALES",null);
- XRow rowTB = (XRow)UnoRuntime.queryInterface(XRow.class, rsTables);
- while ( rsTables.next() )
- {
- String catalog = rowTB.getString( 1 );
- if ( rowTB.wasNull() )
- catalog = null;
-
- String schema = rowTB.getString( 2 );
- if ( rowTB.wasNull() )
- schema = null;
-
- String table = rowTB.getString( 3 );
- String type = rowTB.getString( 4 );
- System.out.println("Catalog: " + catalog + " Schema: " + schema + " Table: " + table + " Type: " + type);
- System.out.println("------------------ Columns ------------------");
- XResultSet rsColumns = dm.getColumns(catalog,schema,table,"%");
- XRow rowCL = (XRow)UnoRuntime.queryInterface(XRow.class, rsColumns);
- while ( rsColumns.next() )
- {
- System.out.println("Column: " + rowCL.getString( 4 ) + " Type: " + rowCL.getInt( 5 ) + " TypeName: " + rowCL.getString( 6 ) );
- }
-
- }
- }
-
- // quote the given name
- public static String quoteTableName(XConnection con, String sCatalog, String sSchema, String sTable) throws com.sun.star.uno.Exception
- {
- XDatabaseMetaData dbmd = con.getMetaData();
- String sQuoteString = dbmd.getIdentifierQuoteString();
- String sSeparator = ".";
- String sComposedName = "";
- String sCatalogSep = dbmd.getCatalogSeparator();
- if (0 != sCatalog.length() && dbmd.isCatalogAtStart() && 0 != sCatalogSep.length())
- {
- sComposedName += sCatalog;
- sComposedName += dbmd.getCatalogSeparator();
- }
- if (0 != sSchema.length())
- {
- sComposedName += sSchema;
- sComposedName += sSeparator;
- sComposedName += sTable;
- }
- else
- {
- sComposedName += sTable;
- }
- if (0 != sCatalog.length() && !dbmd.isCatalogAtStart() && 0 != sCatalogSep.length())
- {
- sComposedName += dbmd.getCatalogSeparator();
- sComposedName += sCatalog;
- }
- return sComposedName;
- }
-
- // creates a new query definition
- public static void createQuerydefinition() throws com.sun.star.uno.Exception
- {
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.DatabaseContext",
- xContext));
- // we use the first datasource
- XQueryDefinitionsSupplier xQuerySup = (XQueryDefinitionsSupplier)
- UnoRuntime.queryInterface(XQueryDefinitionsSupplier.class,
- xNameAccess.getByName( "Bibliography" ));
- XNameAccess xQDefs = xQuerySup.getQueryDefinitions();
- // create new query definition
- XSingleServiceFactory xSingleFac = (XSingleServiceFactory)
- UnoRuntime.queryInterface(XSingleServiceFactory.class, xQDefs);
-
- XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class,xSingleFac.createInstance());
- xProp.setPropertyValue("Command","SELECT * FROM biblio");
- xProp.setPropertyValue("EscapeProcessing",new Boolean(true));
-
- XNameContainer xCont = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xQDefs);
- try
- {
- if ( xCont.hasByName("Query1") )
- xCont.removeByName("Query1");
- }
- catch(com.sun.star.uno.Exception e)
- {}
- xCont.insertByName("Query1",xProp);
- XDocumentDataSource xDs = (XDocumentDataSource)UnoRuntime.queryInterface(XDocumentDataSource.class, xQuerySup);
-
- XStorable xStore = (XStorable)UnoRuntime.queryInterface(XStorable.class,xDs.getDatabaseDocument());
- xStore.store();
- }
-
- // prints all column names from Query1
- public static void printQueryColumnNames() throws com.sun.star.uno.Exception
- {
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.DatabaseContext",
- xContext));
- // we use the first datasource
- XDataSource xDS = (XDataSource)UnoRuntime.queryInterface(
- XDataSource.class, xNameAccess.getByName( "Bibliography" ));
- XConnection con = xDS.getConnection("","");
- XQueriesSupplier xQuerySup = (XQueriesSupplier)
- UnoRuntime.queryInterface(XQueriesSupplier.class, con);
-
- XNameAccess xQDefs = xQuerySup.getQueries();
-
- XColumnsSupplier xColsSup = (XColumnsSupplier) UnoRuntime.queryInterface(
- XColumnsSupplier.class,xQDefs.getByName("Query1"));
- XNameAccess xCols = xColsSup.getColumns();
- String aNames [] = xCols.getElementNames();
- for(int i=0;i<aNames.length;++i)
- System.out.println(aNames[i]);
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/How_to_write_my_own_driver.txt b/odk/examples/DevelopersGuide/Database/DriverSkeleton/How_to_write_my_own_driver.txt
deleted file mode 100644
index c2b54711..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/How_to_write_my_own_driver.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-How to write my own sdbc driver
-
-Pre implementation steps
-- search all occurrences of skeleton and replace them to a name which you prefer
-
-1. Implement a class called driver or modify the existing skeleton -> have a look at SDriver.?xx
-2. Implement a class called connection -> have a look at SConnection.?xx
-3. Have a look at the DatabaseMetaData -> see SDatabaseMetaData.cxx
- The methods which should be implemented at least are
- - getTableTypes
- - getTables
- - getTypeInfo
- - getColumns
-
-4. You need a statement to show/access some data -> have a look at SStatement.cxx
- -> especially executeQuery()
-
-5. The ResultSet: without you see nothing -> look at SResultSet.cxx
-6. The ResultSetMetaData needed to get some information about what are waiting for us
- -> look at SResultSetMetaData.cxx
-
-7. The prepared statement is the last class we have to implement now
- -> you have to allow statements like "SELECT * FROM table WHERE id = ?"
-
-8. congratulations you have now implement your own driver :-)
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
deleted file mode 100644
index 7f77f1ff..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
+++ /dev/null
@@ -1,165 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Databse SDBC driver skeleton example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=DatabaseSDBCDriverSkeleton
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-COMP_LIBRARY=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
-OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
-OUT_COMP_MISC=$(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_MISC)/$(COMP_NAME)/META-INF/manifest.xml
-#COMP_MAPFILE = $(OUT_COMP_MISC)/$(COMP_NAME).uno.map
-COMP_COMPONENTS = $(OUT_COMP_MISC)/$(COMP_NAME).components
-
-COMP_REGISTERFLAG = $(OUT_COMP_MISC)/devguide_$(COMP_NAME)_register_component.flag
-
-CXXFILES = SConnection.cxx \
- SDatabaseMetaData.cxx \
- propertyids.cxx \
- SDriver.cxx \
- SPreparedStatement.cxx \
- SResultSet.cxx \
- SResultSetMetaData.cxx \
- SServices.cxx \
- SStatement.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- DatabaseSDBCDriverSkeletonExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(STL_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-#$(COMP_MAPFILE) : $(SLOFILES)
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-#ifeq "$(OS)" "MACOSX"
-# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-#endif
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_MISC)/$(COMP_NAME).map $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-# rule for component package manifest
-$(OUT_COMP_MISC)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP_COMPONENTS) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)com.sun.star.comp.sdbc.SkeletonDriver$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)com.sun.star.sdbc.Driver$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-$(COMP_PACKAGE) : $(COMP_LIBRARY) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_MISC)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(OUT_COMP_MISC)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_NAME).components
- cd $(subst /,$(PS),$(OUT_COMP_MISC)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
- cd $(subst /,$(PS),$(OUT_COMP_MISC)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-DatabaseSDBCDriverSkeletonExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The Database SDBC skeleton driver component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description and the howto of implementing a sdbc driver.
- @echo --------------------------------------------------------------------------------
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_MISC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_LIBRARY)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/OSubComponent.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/OSubComponent.hxx
deleted file mode 100644
index 4d728611..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/OSubComponent.hxx
+++ /dev/null
@@ -1,254 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_
-#define _CONNECTIVITY_OSUBCOMPONENT_HXX_
-
-#include <cppuhelper/weak.hxx>
-#include <cppuhelper/interfacecontainer.h>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <cppuhelper/propshlp.hxx>
-#include <osl/mutex.hxx>
-#include <osl/diagnose.h>
-
-namespace cppu {
- class IPropertyArrayHelper;
-}
-
-namespace com
-{
- namespace sun
- {
- namespace star
- {
- namespace lang
- {
- class XComponent;
- }
- }
- }
-}
-namespace connectivity
-{
-
- namespace skeleton
- {
- void release(oslInterlockedCount& _refCount,
- ::cppu::OBroadcastHelper& rBHelper,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
- ::com::sun::star::lang::XComponent* _pObject);
-
- void checkDisposed(sal_Bool _bThrow) throw ( ::com::sun::star::lang::DisposedException );
- //************************************************************
- // OSubComponent
- //************************************************************
- template <class SELF, class WEAK> class OSubComponent
- {
- protected:
- // the parent must support the tunnel implementation
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
- SELF* m_pDerivedImplementation;
-
- public:
- OSubComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParent,
- SELF* _pDerivedImplementation)
- :m_xParent(_xParent)
- ,m_pDerivedImplementation(_pDerivedImplementation)
- {
- }
-
- protected:
- void dispose_ChildImpl()
- {
- ::osl::MutexGuard aGuard( m_pDerivedImplementation->rBHelper.rMutex );
- m_xParent = NULL;
- }
- void relase_ChildImpl()
- {
- release(m_pDerivedImplementation->m_refCount,
- m_pDerivedImplementation->rBHelper,
- m_xParent,
- m_pDerivedImplementation);
-
- m_pDerivedImplementation->WEAK::release();
- }
- };
-
-
- template <class TYPE>
- class OPropertyArrayUsageHelper
- {
- protected:
- static sal_Int32 s_nRefCount;
- static ::cppu::IPropertyArrayHelper* s_pProps;
- static ::osl::Mutex s_aMutex;
-
- public:
- OPropertyArrayUsageHelper();
- virtual ~OPropertyArrayUsageHelper()
- { // ARGHHHHHHH ..... would like to implement this in proparrhlp_impl.hxx (as we do with all other methods)
- // but SUNPRO 5 compiler (linker) doesn't like this
- ::osl::MutexGuard aGuard(s_aMutex);
- OSL_ENSURE(s_nRefCount > 0, "OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !");
- if (!--s_nRefCount)
- {
- delete s_pProps;
- s_pProps = NULL;
- }
- }
-
- /** call this in the getInfoHelper method of your derived class. The method returns the array helper of the
- class, which is created if neccessary.
- */
- ::cppu::IPropertyArrayHelper* getArrayHelper();
-
- protected:
- /** used to implement the creation of the array helper which is shared amongst all instances of the class.
- This method needs to be implemented in derived classes.
- <BR>
- The method gets called with s_aMutex acquired.
- <BR>
- as long as IPropertyArrayHelper has no virtual destructor, the implementation of ~OPropertyArrayUsageHelper
- assumes that you created an ::cppu::OPropertyArrayHelper when deleting s_pProps.
- @return an pointer to the newly created array helper. Must not be NULL.
- */
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const = 0;
- };
-
- template<class TYPE>
- sal_Int32 OPropertyArrayUsageHelper< TYPE >::s_nRefCount = 0;
-
- template<class TYPE>
- ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = NULL;
-
- template<class TYPE>
- ::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex;
-
- //------------------------------------------------------------------
- template <class TYPE>
- OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper()
- {
- ::osl::MutexGuard aGuard(s_aMutex);
- ++s_nRefCount;
- }
-
- //------------------------------------------------------------------
- template <class TYPE>
- ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper()
- {
- OSL_ENSURE(s_nRefCount, "OPropertyArrayUsageHelper::getArrayHelper : suspicious call : have a refcount of 0 !");
- if (!s_pProps)
- {
- ::osl::MutexGuard aGuard(s_aMutex);
- if (!s_pProps)
- {
- s_pProps = createArrayHelper();
- OSL_ENSURE(s_pProps, "OPropertyArrayUsageHelper::getArrayHelper : createArrayHelper returned nonsense !");
- }
- }
- return s_pProps;
- }
-
-
-
- class OBase_Mutex
- {
- public:
- ::osl::Mutex m_aMutex;
- };
-
- namespace internal
- {
- template <class T>
- void implCopySequence(const T* _pSource, T*& _pDest, sal_Int32 _nSourceLen)
- {
- for (sal_Int32 i=0; i<_nSourceLen; ++i, ++_pSource, ++_pDest)
- *_pDest = *_pSource;
- }
- }
- //-------------------------------------------------------------------------
- /// concat two sequences
- template <class T>
- ::com::sun::star::uno::Sequence<T> concatSequences(const ::com::sun::star::uno::Sequence<T>& _rLeft, const ::com::sun::star::uno::Sequence<T>& _rRight)
- {
- sal_Int32 nLeft(_rLeft.getLength()), nRight(_rRight.getLength());
- const T* pLeft = _rLeft.getConstArray();
- const T* pRight = _rRight.getConstArray();
-
- sal_Int32 nReturnLen(nLeft + nRight);
- ::com::sun::star::uno::Sequence<T> aReturn(nReturnLen);
- T* pReturn = aReturn.getArray();
-
- internal::implCopySequence(pLeft, pReturn, nLeft);
- internal::implCopySequence(pRight, pReturn, nRight);
-
- return aReturn;
- }
-
-
-#define DECLARE_SERVICE_INFO() \
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); \
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); \
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) \
-
-#define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) \
- ::rtl::OUString SAL_CALL classname::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) \
- { \
- return ::rtl::OUString::createFromAscii(implasciiname); \
- } \
- ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) \
- { \
- ::com::sun::star::uno::Sequence< ::rtl::OUString > aSupported(1); \
- aSupported[0] = ::rtl::OUString::createFromAscii(serviceasciiname); \
- return aSupported; \
- } \
- sal_Bool SAL_CALL classname::supportsService( const ::rtl::OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException) \
- { \
- Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames()); \
- const ::rtl::OUString* pSupported = aSupported.getConstArray(); \
- const ::rtl::OUString* pEnd = pSupported + aSupported.getLength(); \
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported) \
- ; \
- \
- return pSupported != pEnd; \
- } \
-
-
- }
-}
-#endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/OTypeInfo.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/OTypeInfo.hxx
deleted file mode 100644
index 4a28333a..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/OTypeInfo.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _CONNECTIVITY_OTYPEINFO_HXX_
-#define _CONNECTIVITY_OTYPEINFO_HXX_
-
-#include <com/sun/star/sdbc/ColumnSearch.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-
-namespace connectivity
-{
- struct OTypeInfo
- {
- ::rtl::OUString aTypeName; // Name des Types in der Datenbank
- ::rtl::OUString aLiteralPrefix; // Prefix zum Quoten
- ::rtl::OUString aLiteralSuffix; // Suffix zum Quoten
- ::rtl::OUString aCreateParams; // Parameter zum Erstellen
- ::rtl::OUString aLocalTypeName;
-
- sal_Int32 nPrecision; // Laenge des Types
-
- sal_Int16 nMaximumScale; // Nachkommastellen
- sal_Int16 nMinimumScale; // Min Nachkommastellen
-
- sal_Int16 nType; // Datenbanktyp
- sal_Int16 nSearchType; // kann nach dem Typen gesucht werden
- sal_Int16 nNumPrecRadix; // indicating the radix, which is usually 2 or 10
-
- sal_Bool bCurrency : 1, // Waehrung
- bAutoIncrement : 1, // Ist es ein automatisch incrementierendes Feld
- bNullable : 1, // Kann das Feld NULL annehmen
- bCaseSensitive : 1, // Ist der Type Casesensitive
- bUnsigned : 1, // Ist der Type Unsigned
- bEmpty_1 : 1, // for later use
- bEmpty_2 : 1;
-
- OTypeInfo()
- :bCurrency(sal_False)
- ,bAutoIncrement(sal_False)
- ,bNullable(sal_True)
- ,bCaseSensitive(sal_False)
- ,bUnsigned(sal_False)
- ,nMaximumScale(0)
- ,nMinimumScale(0)
- ,nType( ::com::sun::star::sdbc::DataType::OTHER)
- ,nPrecision(0)
- ,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL)
- {}
-
- inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
- { return ::rtl_allocateMemory( nSize ); }
- inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
- { return _pHint; }
- inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
- { ::rtl_freeMemory( pMem ); }
- inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
- { }
-
- sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
- sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
-
- inline ::rtl::OUString getDBName() const { return aTypeName; }
- };
-}
-#endif // _CONNECTIVITY_OTYPEINFO_HXX_
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
deleted file mode 100644
index d9cfb337..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
+++ /dev/null
@@ -1,404 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include "SConnection.hxx"
-
-#include "SDatabaseMetaData.hxx"
-#include "SDriver.hxx"
-#include "SStatement.hxx"
-#include "SPreparedStatement.hxx"
-#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/TransactionIsolation.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-
-using namespace connectivity::skeleton;
-
-//------------------------------------------------------------------------------
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-// --------------------------------------------------------------------------------
-OConnection::OConnection(SkeletonDriver* _pDriver)
- : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this),
- OMetaConnection_BASE(m_aMutex),
- m_pDriver(_pDriver),
- m_bClosed(sal_False),
- m_xMetaData(NULL),
- m_bUseCatalog(sal_False),
- m_bUseOldDateFormat(sal_False)
-{
- m_pDriver->acquire();
-}
-//-----------------------------------------------------------------------------
-OConnection::~OConnection()
-{
- if(!isClosed())
- close();
- m_pDriver->release();
- m_pDriver = NULL;
-}
-//-----------------------------------------------------------------------------
-void SAL_CALL OConnection::release() throw()
-{
- relase_ChildImpl();
-}
-// -----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException)
-{
- osl_incrementInterlockedCount( &m_refCount );
-
- // some example code how to get the information out of the sequence
-
- sal_Int32 nLen = url.indexOf(':');
- nLen = url.indexOf(':',nLen+1);
- ::rtl::OUString aDSN(RTL_CONSTASCII_USTRINGPARAM("DSN=")), aUID, aPWD, aSysDrvSettings;
- aDSN += url.copy(nLen+1);
-
- const char* pUser = "user";
- const char* pTimeout = "Timeout";
- const char* pSilent = "Silent";
- const char* pPwd = "password";
- const char* pUseCatalog = "UseCatalog";
- const char* pSysDrv = "SystemDriverSettings";
-
- sal_Int32 nTimeout = 20;
- sal_Bool bSilent = sal_True;
- const PropertyValue *pBegin = info.getConstArray();
- const PropertyValue *pEnd = pBegin + info.getLength();
- for(;pBegin != pEnd;++pBegin)
- {
- if(!pBegin->Name.compareToAscii(pTimeout))
- pBegin->Value >>= nTimeout;
- else if(!pBegin->Name.compareToAscii(pSilent))
- pBegin->Value >>= bSilent;
- else if(!pBegin->Name.compareToAscii(pUser))
- {
- pBegin->Value >>= aUID;
- aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";UID=")) + aUID;
- }
- else if(!pBegin->Name.compareToAscii(pPwd))
- {
- pBegin->Value >>= aPWD;
- aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";PWD=")) + aPWD;
- }
- else if(!pBegin->Name.compareToAscii(pUseCatalog))
- {
- pBegin->Value >>= m_bUseCatalog;
- }
- else if(!pBegin->Name.compareToAscii(pSysDrv))
- {
- pBegin->Value >>= aSysDrvSettings;
- aDSN += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";"));
- aDSN += aSysDrvSettings;
- }
- }
- m_sUser = aUID;
-
- osl_decrementInterlockedCount( &m_refCount );
-}
-// XServiceInfo
-// --------------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.skeleton.OConnection", "com.sun.star.sdbc.Connection")
-
-// --------------------------------------------------------------------------------
-Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // create a statement
- // the statement can only be executed once
- Reference< XStatement > xReturn = new OStatement(this);
- m_aStatements.push_back(WeakReferenceHelper(xReturn));
- return xReturn;
-}
-// --------------------------------------------------------------------------------
-Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const ::rtl::OUString& _sSql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // the pre
- if(m_aTypeInfo.empty())
- buildTypeInfo();
-
- // create a statement
- // the statement can only be executed more than once
- Reference< XPreparedStatement > xReturn = new OPreparedStatement(this,m_aTypeInfo,_sSql);
- m_aStatements.push_back(WeakReferenceHelper(xReturn));
- return xReturn;
-}
-// --------------------------------------------------------------------------------
-Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const ::rtl::OUString& _sSql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // not implemented yet :-) a task to do
- return NULL;
-}
-// --------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OConnection::nativeSQL( const ::rtl::OUString& _sSql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- // when you need to transform SQL92 to you driver specific you can do it here
-
- return _sSql;
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- // here you have to set your commit mode please have a look at the jdbc documentation to get a clear explanation
-}
-// --------------------------------------------------------------------------------
-sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- // you have to distinguish which if you are in autocommit mode or not
- // at normal case true should be fine here
-
- return sal_True;
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // when you database does support transactions you should commit here
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
-
- // same as commit but for the other case
-}
-// --------------------------------------------------------------------------------
-sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
-
- // just simple -> we are close when we are disposed taht means someone called dispose(); (XComponent)
- return OConnection_BASE::rBHelper.bDisposed;
-}
-// --------------------------------------------------------------------------------
-Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // here we have to create the class with biggest interface
- // The answer is 42 :-)
- Reference< XDatabaseMetaData > xMetaData = m_xMetaData;
- if(!xMetaData.is())
- {
- xMetaData = new ODatabaseMetaData(this); // need the connection because it can return it
- m_xMetaData = xMetaData;
- }
-
- return xMetaData;
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // set you connection to readonly
-}
-// --------------------------------------------------------------------------------
-sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // return if your connection to readonly
- return sal_False;
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::setCatalog( const ::rtl::OUString& catalog ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // if your database doesn't work with catalogs you go to next method otherwise you kjnow what to do
-}
-// --------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
-
- // return your current catalog
- return ::rtl::OUString();
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // set your isolation level
- // please have a look at @see com.sun.star.sdbc.TransactionIsolation
-}
-// --------------------------------------------------------------------------------
-sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
-
- // please have a look at @see com.sun.star.sdbc.TransactionIsolation
- return TransactionIsolation::NONE;
-}
-// --------------------------------------------------------------------------------
-Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- // if your driver has special database types you can return it here
-
- return NULL;
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
-{
- // the other way around
-}
-// --------------------------------------------------------------------------------
-// XCloseable
-void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException)
-{
- // we just dispose us
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OConnection_BASE::rBHelper.bDisposed);
-
- }
- dispose();
-}
-// --------------------------------------------------------------------------------
-// XWarningsSupplier
-Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException)
-{
- // when you collected some warnings -> return it
- return Any();
-}
-// --------------------------------------------------------------------------------
-void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException)
-{
- // you should clear your collected warnings here
-}
-//--------------------------------------------------------------------
-void OConnection::buildTypeInfo() throw( SQLException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
-
- Reference< XResultSet> xRs = getMetaData ()->getTypeInfo ();
- Reference< XRow> xRow(xRs,UNO_QUERY);
- // Information for a single SQL type
-
- // Loop on the result set until we reach end of file
-
- while (xRs->next ())
- {
- OTypeInfo aInfo;
- aInfo.aTypeName = xRow->getString (1);
- aInfo.nType = xRow->getShort (2);
- aInfo.nPrecision = xRow->getInt (3);
- aInfo.aLiteralPrefix = xRow->getString (4);
- aInfo.aLiteralSuffix = xRow->getString (5);
- aInfo.aCreateParams = xRow->getString (6);
- aInfo.bNullable = xRow->getBoolean (7) == ColumnValue::NULLABLE;
- aInfo.bCaseSensitive = xRow->getBoolean (8);
- aInfo.nSearchType = xRow->getShort (9);
- aInfo.bUnsigned = xRow->getBoolean (10);
- aInfo.bCurrency = xRow->getBoolean (11);
- aInfo.bAutoIncrement = xRow->getBoolean (12);
- aInfo.aLocalTypeName = xRow->getString (13);
- aInfo.nMinimumScale = xRow->getShort (14);
- aInfo.nMaximumScale = xRow->getShort (15);
- aInfo.nNumPrecRadix = (sal_Int16)xRow->getInt(18);
-
-
-
- // Now that we have the type info, save it
- // in the Hashtable if we don't already have an
- // entry for this SQL type.
-
- m_aTypeInfo.push_back(aInfo);
- }
-
- // Close the result set/statement.
-
- Reference< XCloseable> xClose(xRs,UNO_QUERY);
- xClose->close();
-}
-//------------------------------------------------------------------------------
-void OConnection::disposing()
-{
- // we noticed that we should be destroied in near future so we have to dispose our statements
- ::osl::MutexGuard aGuard(m_aMutex);
-
- for (OWeakRefArray::iterator i = m_aStatements.begin(); m_aStatements.end() != i; ++i)
- {
- Reference< XComponent > xComp(i->get(), UNO_QUERY);
- if (xComp.is())
- xComp->dispose();
- }
- m_aStatements.clear();
-
- m_bClosed = sal_True;
- m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>();
-
- dispose_ChildImpl();
- OConnection_BASE::disposing();
-}
-// -----------------------------------------------------------------------------
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx
deleted file mode 100644
index 8961cf49..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.hxx
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SCONNECTION_HXX
-#define CONNECTIVITY_SCONNECTION_HXX
-
-#include <com/sun/star/sdbc/SQLWarning.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include "OSubComponent.hxx"
-#include "OTypeInfo.hxx"
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#include <com/sun/star/sdbc/XConnection.hpp>
-#include <cppuhelper/compbase3.hxx>
-#include <cppuhelper/weakref.hxx>
-
-#include <map>
-
-namespace connectivity
-{
- namespace skeleton
- {
-
- typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::sdbc::XConnection,
- ::com::sun::star::sdbc::XWarningsSupplier,
- ::com::sun::star::lang::XServiceInfo
- > OMetaConnection_BASE;
-
- class OStatement_Base;
- class SkeletonDriver;
- class ODatabaseMetaData;
-
- typedef OMetaConnection_BASE OConnection_BASE; // implements basics and text encoding
- typedef ::std::vector< ::connectivity::OTypeInfo> TTypeInfoVector;
- typedef std::vector< ::com::sun::star::uno::WeakReferenceHelper > OWeakRefArray;
-
- class OConnection : public OBase_Mutex,
- public OConnection_BASE,
- public connectivity::skeleton::OSubComponent<OConnection, OConnection_BASE>
- {
- friend class connectivity::skeleton::OSubComponent<OConnection, OConnection_BASE>;
-
- protected:
-
- rtl_TextEncoding m_nTextEncoding; // the encoding which is used for all text conversions
- //====================================================================
- // Data attributes
- //====================================================================
- TTypeInfoVector m_aTypeInfo; // vector containing an entry
- // for each row returned by
- // DatabaseMetaData.getTypeInfo.
- ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
-
- OWeakRefArray m_aStatements; // vector containing a list
- // of all the Statement objects
- // for this Connection
-
- ::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by
- // an operation
- ::rtl::OUString m_aURL; // URL of connection
- ::rtl::OUString m_sUser; // the user name
- SkeletonDriver* m_pDriver; // Pointer to the owning
- // driver object
-
- sal_Bool m_bClosed;
- sal_Bool m_bUseCatalog; // should we use the catalog on filebased databases
- sal_Bool m_bUseOldDateFormat;
-
-
- void buildTypeInfo() throw( ::com::sun::star::sdbc::SQLException);
-
- public:
- virtual void construct( const ::rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException);
-
- OConnection(SkeletonDriver* _pDriver);
- virtual ~OConnection();
-
- void closeAllStatements () throw( ::com::sun::star::sdbc::SQLException);
-
- // OComponentHelper
- virtual void SAL_CALL disposing(void);
- // XInterface
- virtual void SAL_CALL release() throw();
-
- // XServiceInfo
- DECLARE_SERVICE_INFO();
- // XConnection
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL nativeSQL( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setAutoCommit( sal_Bool autoCommit ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getAutoCommit( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL commit( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL rollback( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isClosed( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setReadOnly( sal_Bool readOnly ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isReadOnly( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setCatalog( const ::rtl::OUString& catalog ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getCatalog( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setTransactionIsolation( sal_Int32 level ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getTransactionIsolation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTypeMap( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setTypeMap( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XCloseable
- virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XWarningsSupplier
- virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- //
-
- // should we use the catalog on filebased databases
- inline sal_Bool isCatalogUsed() const { return m_bUseCatalog; }
- inline ::rtl::OUString getUserName() const { return m_sUser; }
- inline SkeletonDriver* getDriver() const { return m_pDriver;}
- inline rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; }
- };
- }
-}
-#endif // CONNECTIVITY_SCONNECTION_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
deleted file mode 100644
index 20543d50..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
+++ /dev/null
@@ -1,889 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include "SDatabaseMetaData.hxx"
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/TransactionIsolation.hpp>
-
-using namespace connectivity::skeleton;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-
-ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon)
-: m_pConnection(_pCon)
-, m_bUseCatalog(sal_True)
-{
- OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
- if(!m_pConnection->isCatalogUsed())
- {
- osl_incrementInterlockedCount( &m_refCount );
- m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
- osl_decrementInterlockedCount( &m_refCount );
- }
-}
-// -------------------------------------------------------------------------
-ODatabaseMetaData::~ODatabaseMetaData()
-{
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aVal;
- if(m_bUseCatalog)
- { // do some special here for you database
- }
-
- return aVal;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aVal;
- if(m_bUseCatalog)
- {
- }
- return aVal;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException)
-{
- // normally this is "
- ::rtl::OUString aVal(RTL_CONSTASCII_USTRINGPARAM("\""));
- return aVal;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aVal;
- return aVal;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException)
-{
- sal_Bool bValue = sal_False;
- if(m_bUseCatalog)
- {
- }
- return bValue;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException)
-{
- return sal_True; // should be supported at least
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue(RTL_CONSTASCII_USTRINGPARAM("sdbc:skeleton:"));
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException)
-{
- return 1;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException)
-{
- return TransactionIsolation::NONE;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException)
-{
- return 0;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException)
-{
- ::rtl::OUString aValue;
- return aValue;
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nValue = 0; // 0 means no limit
- return nValue;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException)
-{
- return (Reference< XConnection >)m_pConnection;//new OConnection(m_aConnectionHandle);
-}
-// -------------------------------------------------------------------------
-// here follow all methods which return a resultset
-// the first methods is an example implementation how to use this resultset
-// of course you could implement it on your and you should do this because
-// the general way is more memory expensive
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo( ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -----------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,
- const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
- const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern,
- const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
- const Any& catalog, const ::rtl::OUString& schemaPattern,
- const ::rtl::OUString& tableNamePattern, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns(
- const Any& catalog, const ::rtl::OUString& schemaPattern,
- const ::rtl::OUString& procedureNamePattern, const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
- const Any& catalog, const ::rtl::OUString& schemaPattern,
- const ::rtl::OUString& procedureNamePattern ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,
- sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier(
- const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope,
- sal_Bool nullable ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
- const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
- const Any& primaryCatalog, const ::rtl::OUString& primarySchema,
- const ::rtl::OUString& primaryTable, const Any& foreignCatalog,
- const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) throw(SQLException, RuntimeException)
-{
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException)
-{
- OSL_FAIL("Not implemented yet!");
- throw SQLException();
- return NULL;
-}
-// -----------------------------------------------------------------------------
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx
deleted file mode 100644
index 4e62def3..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.hxx
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SDATABASEMETADATA_HXX
-#define CONNECTIVITY_SDATABASEMETADATA_HXX
-
-#include "SConnection.hxx"
-#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#include <cppuhelper/implbase1.hxx>
-
-namespace connectivity
-{
- namespace skeleton
- {
- //**************************************************************
- //************ Class: ODatabaseMetaData
- //**************************************************************
-
- typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XDatabaseMetaData> ODatabaseMetaData_BASE;
-
- class ODatabaseMetaData : public ODatabaseMetaData_BASE
- {
- OConnection* m_pConnection;
- sal_Bool m_bUseCatalog;
- public:
-
- inline OConnection* getOwnConnection() const { return m_pConnection; }
-
- ODatabaseMetaData(OConnection* _pCon);
- virtual ~ODatabaseMetaData();
-
- // as I mentioned before this interface is really BIG
- // XDatabaseMetaData
- virtual sal_Bool SAL_CALL allProceduresAreCallable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL allTablesAreSelectable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getUserName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isReadOnly( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL nullsAreSortedHigh( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL nullsAreSortedLow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL nullsAreSortedAtStart( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL nullsAreSortedAtEnd( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getDatabaseProductName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getDatabaseProductVersion( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getDriverName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getDriverVersion( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getDriverMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getDriverMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL usesLocalFiles( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL usesLocalFilePerTable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsMixedCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL storesUpperCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL storesLowerCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL storesMixedCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsMixedCaseQuotedIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL storesUpperCaseQuotedIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL storesLowerCaseQuotedIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL storesMixedCaseQuotedIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getIdentifierQuoteString( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getSQLKeywords( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getNumericFunctions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getStringFunctions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getSystemFunctions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getTimeDateFunctions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getSearchStringEscape( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getExtraNameCharacters( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsAlterTableWithAddColumn( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsAlterTableWithDropColumn( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsColumnAliasing( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL nullPlusNonNullIsNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsTypeConversion( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsTableCorrelationNames( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsDifferentTableCorrelationNames( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsExpressionsInOrderBy( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsOrderByUnrelated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsGroupBy( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsGroupByUnrelated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsGroupByBeyondSelect( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsLikeEscapeClause( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsMultipleResultSets( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsMultipleTransactions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsNonNullableColumns( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsMinimumSQLGrammar( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCoreSQLGrammar( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsExtendedSQLGrammar( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsANSI92EntryLevelSQL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsANSI92IntermediateSQL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsANSI92FullSQL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsIntegrityEnhancementFacility( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsOuterJoins( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsFullOuterJoins( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsLimitedOuterJoins( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getSchemaTerm( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getProcedureTerm( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getCatalogTerm( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isCatalogAtStart( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getCatalogSeparator( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSchemasInDataManipulation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSchemasInProcedureCalls( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSchemasInTableDefinitions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSchemasInIndexDefinitions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSchemasInPrivilegeDefinitions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCatalogsInDataManipulation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCatalogsInProcedureCalls( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCatalogsInTableDefinitions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCatalogsInIndexDefinitions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCatalogsInPrivilegeDefinitions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsPositionedDelete( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsPositionedUpdate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSelectForUpdate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsStoredProcedures( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSubqueriesInComparisons( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSubqueriesInExists( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSubqueriesInIns( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsSubqueriesInQuantifieds( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsCorrelatedSubqueries( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsUnion( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsUnionAll( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsOpenCursorsAcrossCommit( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsOpenCursorsAcrossRollback( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsOpenStatementsAcrossCommit( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsOpenStatementsAcrossRollback( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxBinaryLiteralLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxCharLiteralLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxColumnNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxColumnsInGroupBy( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxColumnsInIndex( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxColumnsInOrderBy( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxColumnsInSelect( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxColumnsInTable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxConnections( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxCursorNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxIndexLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxSchemaNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxProcedureNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxCatalogNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxRowSize( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL doesMaxRowSizeIncludeBlobs( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxStatementLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxStatements( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxTableNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxTablesInSelect( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxUserNameLength( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getDefaultTransactionIsolation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsTransactions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsTransactionIsolationLevel( sal_Int32 level ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsDataDefinitionAndDataManipulationTransactions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsDataManipulationTransactionsOnly( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL dataDefinitionCausesTransactionCommit( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL dataDefinitionIgnoredInTransactions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getProcedures( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& procedureNamePattern ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getProcedureColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& procedureNamePattern, const ::rtl::OUString& columnNamePattern ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTables( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& types ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getSchemas( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getCatalogs( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTableTypes( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumnPrivileges( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, const ::rtl::OUString& columnNamePattern ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTablePrivileges( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getBestRowIdentifier( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope, sal_Bool nullable ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getVersionColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getPrimaryKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getImportedKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getExportedKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getCrossReference( const ::com::sun::star::uno::Any& primaryCatalog, const ::rtl::OUString& primarySchema, const ::rtl::OUString& primaryTable, const ::com::sun::star::uno::Any& foreignCatalog, const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTypeInfo( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getIndexInfo( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Bool unique, sal_Bool approximate ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsResultSetType( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL ownUpdatesAreVisible( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL ownDeletesAreVisible( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL ownInsertsAreVisible( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL othersUpdatesAreVisible( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL othersDeletesAreVisible( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL othersInsertsAreVisible( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL updatesAreDetected( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL deletesAreDetected( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL insertsAreDetected( sal_Int32 setType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsBatchUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getUDTs( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const ::com::sun::star::uno::Sequence< sal_Int32 >& types ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- };
- }
-}
-
-#endif // CONNECTIVITY_SDATABASEMETADATA_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
deleted file mode 100644
index 39d006d5..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include "SDriver.hxx"
-#include "SConnection.hxx"
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-using namespace connectivity::skeleton;
-
-namespace connectivity
-{
- namespace skeleton
- {
- //------------------------------------------------------------------
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SkeletonDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
- {
- return *(new SkeletonDriver());
- }
- }
-}
-// --------------------------------------------------------------------------------
-SkeletonDriver::SkeletonDriver()
- : ODriver_BASE(m_aMutex)
-{
-}
-// --------------------------------------------------------------------------------
-void SkeletonDriver::disposing()
-{
- ::osl::MutexGuard aGuard(m_aMutex);
-
- // when driver will be destroied so all our connections have to be destroied as well
- for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
- {
- Reference< XComponent > xComp(i->get(), UNO_QUERY);
- if (xComp.is())
- xComp->dispose();
- }
- m_xConnections.clear();
-
- ODriver_BASE::disposing();
-}
-
-// static ServiceInfo
-//------------------------------------------------------------------------------
-rtl::OUString SkeletonDriver::getImplementationName_Static( ) throw(RuntimeException)
-{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.SkeletonDriver"));
- // this name is referenced in the configuration and in the skeleton.xml
- // Please take care when changing it.
-}
-//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static( ) throw (RuntimeException)
-{
- // which service is supported
- // for more information @see com.sun.star.sdbc.Driver
- Sequence< ::rtl::OUString > aSNS( 1 );
- aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver"));
- return aSNS;
-}
-
-//------------------------------------------------------------------
-::rtl::OUString SAL_CALL SkeletonDriver::getImplementationName( ) throw(RuntimeException)
-{
- return getImplementationName_Static();
-}
-
-//------------------------------------------------------------------
-sal_Bool SAL_CALL SkeletonDriver::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
-{
- Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
- const ::rtl::OUString* pSupported = aSupported.getConstArray();
- const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
-}
-
-//------------------------------------------------------------------
-Sequence< ::rtl::OUString > SAL_CALL SkeletonDriver::getSupportedServiceNames( ) throw(RuntimeException)
-{
- return getSupportedServiceNames_Static();
-}
-
-// --------------------------------------------------------------------------------
-Reference< XConnection > SAL_CALL SkeletonDriver::connect( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
-{
- // create a new connection with the given properties and append it to our vector
- OConnection* pCon = new OConnection(this);
- Reference< XConnection > xCon = pCon; // important here because otherwise the connection could be deleted inside (refcount goes -> 0)
- pCon->construct(url,info); // late constructor call which can throw exception and allows a correct dtor call when so
- m_xConnections.push_back(WeakReferenceHelper(*pCon));
-
- return xCon;
-}
-// --------------------------------------------------------------------------------
-sal_Bool SAL_CALL SkeletonDriver::acceptsURL( const ::rtl::OUString& url )
- throw(SQLException, RuntimeException)
-{
- // here we have to look if we support this url format
- // change the URL format to your needs, but please aware that the first on who accepts the URl wins.
- return (!url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:skeleton:")),14));
-}
-// --------------------------------------------------------------------------------
-Sequence< DriverPropertyInfo > SAL_CALL SkeletonDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
-{
- // if you have somthing special to say, return it here :-)
- return Sequence< DriverPropertyInfo >();
-}
-// --------------------------------------------------------------------------------
-sal_Int32 SAL_CALL SkeletonDriver::getMajorVersion( ) throw(RuntimeException)
-{
- return 0; // depends on you
-}
-// --------------------------------------------------------------------------------
-sal_Int32 SAL_CALL SkeletonDriver::getMinorVersion( ) throw(RuntimeException)
-{
- return 1; // depends on you
-}
-// --------------------------------------------------------------------------------
-
-//.........................................................................
-namespace connectivity
-{
- namespace skeleton
- {
-//.........................................................................
-
-void release(oslInterlockedCount& _refCount,
- ::cppu::OBroadcastHelper& rBHelper,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
- ::com::sun::star::lang::XComponent* _pObject)
-{
- if (osl_decrementInterlockedCount( &_refCount ) == 0)
- {
- osl_incrementInterlockedCount( &_refCount );
-
- if (!rBHelper.bDisposed && !rBHelper.bInDispose)
- {
- // remember the parent
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xParent;
- {
- ::osl::MutexGuard aGuard( rBHelper.rMutex );
- xParent = _xInterface;
- _xInterface = NULL;
- }
-
- // First dispose
- _pObject->dispose();
-
- // only the alive ref holds the object
- OSL_ASSERT( _refCount == 1 );
-
- // release the parent in the ~
- if (xParent.is())
- {
- ::osl::MutexGuard aGuard( rBHelper.rMutex );
- _xInterface = xParent;
- }
- }
- }
- else
- osl_incrementInterlockedCount( &_refCount );
-}
-
-void checkDisposed(sal_Bool _bThrow) throw ( DisposedException )
-{
- if (_bThrow)
- throw DisposedException();
-
-}
-//.........................................................................
- }
-}
-//.........................................................................
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.hxx
deleted file mode 100644
index 2c1cb2cc..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SDRIVER_HXX
-#define CONNECTIVITY_SDRIVER_HXX
-
-#include <com/sun/star/sdbc/XDriver.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/compbase2.hxx>
-#include "SConnection.hxx"
-
-namespace connectivity
-{
- namespace skeleton
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SkeletonDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception );
-
- typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver,
- ::com::sun::star::lang::XServiceInfo > ODriver_BASE;
-
- class SkeletonDriver : public ODriver_BASE
- {
- protected:
- ::osl::Mutex m_aMutex; // mutex is need to control member access
- OWeakRefArray m_xConnections; // vector containing a list
- // of all the Connection objects
- // for this Driver
- public:
-
- SkeletonDriver();
-
- // OComponentHelper
- virtual void SAL_CALL disposing(void);
- // XInterface
- static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-
- // XDriver
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL acceptsURL( const ::rtl::OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
- };
- }
-
-}
-
-#endif // CONNECTIVITY_SDRIVER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx
deleted file mode 100644
index f896abb1..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx
+++ /dev/null
@@ -1,390 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-#include <osl/diagnose.h>
-#include "SPreparedStatement.hxx"
-#include <com/sun/star/sdbc/DataType.hpp>
-#include "SResultSetMetaData.hxx"
-#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include "propertyids.hxx"
-
-using namespace connectivity::skeleton;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-using namespace com::sun::star::container;
-using namespace com::sun::star::io;
-using namespace com::sun::star::util;
-
-IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.skeleton.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
-
-
-OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql)
- :OStatement_BASE2(_pConnection)
- ,m_aTypeInfo(_TypeInfo)
- ,m_bPrepared(sal_False)
- ,m_sSqlStatement(sql)
- ,m_nNumParams(0)
-{
-}
-// -----------------------------------------------------------------------------
-OPreparedStatement::~OPreparedStatement()
-{
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::acquire() throw()
-{
- OStatement_BASE2::acquire();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::release() throw()
-{
- OStatement_BASE2::release();
-}
-// -----------------------------------------------------------------------------
-Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- Any aRet = OStatement_BASE2::queryInterface(rType);
- if(!aRet.hasValue())
- aRet = OPreparedStatement_BASE::queryInterface(rType);
- return aRet;
-}
-// -------------------------------------------------------------------------
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
-{
- return concatSequences(OPreparedStatement_BASE::getTypes(),OStatement_BASE2::getTypes());
-}
-// -------------------------------------------------------------------------
-
-Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- if(!m_xMetaData.is())
- m_xMetaData = new OResultSetMetaData(getOwnConnection());
- return m_xMetaData;
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
- // Reset last warning message
-
- try {
- clearWarnings ();
- OStatement_BASE2::close();
- }
- catch (SQLException &) {
- // If we get an error, ignore
- }
-
- // Remove this Statement object from the Connection object's
- // list
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
- // same as in statement with the difference that this statement also can contain parameter
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- // same as in statement with the difference that this statement also can contain parameter
- return 0;
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-
-Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- return (Reference< XConnection >)m_pConnection;
-}
-// -------------------------------------------------------------------------
-
-Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- Reference< XResultSet > rs = NULL;
-
-
- return rs;
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-
-void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 aVal ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
-{
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- ::osl::MutexGuard aGuard( m_aMutex );
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-
-void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException)
-{
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::clearBatch( ) throw(SQLException, RuntimeException)
-{
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OPreparedStatement::addBatch( ) throw(SQLException, RuntimeException)
-{
-}
-// -------------------------------------------------------------------------
-
-Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch( ) throw(SQLException, RuntimeException)
-{
- return Sequence< sal_Int32 > ();
-}
-// -------------------------------------------------------------------------
-void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
-{
- switch(nHandle)
- {
- case PROPERTY_ID_RESULTSETCONCURRENCY:
- break;
- case PROPERTY_ID_RESULTSETTYPE:
- break;
- case PROPERTY_ID_FETCHDIRECTION:
- break;
- case PROPERTY_ID_USEBOOKMARKS:
- break;
- default:
- OStatement_Base::setFastPropertyValue_NoBroadcast(nHandle,rValue);
- }
-}
-// -----------------------------------------------------------------------------
-void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex)
-{
- if( !_parameterIndex || _parameterIndex > m_nNumParams)
- throw SQLException();
-}
-// -----------------------------------------------------------------------------
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx
deleted file mode 100644
index 709d676d..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.hxx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SPREPAREDSTATEMENT_HXX
-#define CONNECTIVITY_SPREPAREDSTATEMENT_HXX
-#include "SStatement.hxx"
-#include <com/sun/star/sdbc/XPreparedStatement.hpp>
-#include <com/sun/star/sdbc/XParameters.hpp>
-#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#include <com/sun/star/sdbc/XPreparedBatchExecution.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-
-namespace connectivity
-{
- namespace skeleton
- {
-
- class OBoundParam;
- typedef ::cppu::ImplHelper5< ::com::sun::star::sdbc::XPreparedStatement,
- ::com::sun::star::sdbc::XParameters,
- ::com::sun::star::sdbc::XPreparedBatchExecution,
- ::com::sun::star::sdbc::XResultSetMetaDataSupplier,
- ::com::sun::star::lang::XServiceInfo> OPreparedStatement_BASE;
-
- class OPreparedStatement : public OStatement_BASE2,
- public OPreparedStatement_BASE
- {
- protected:
- struct Parameter
- {
- ::com::sun::star::uno::Any aValue;
- sal_Int32 nDataType;
-
- Parameter(const ::com::sun::star::uno::Any& rValue,
- sal_Int32 rDataType) : aValue(rValue),nDataType(rDataType)
- {
- }
-
- };
-
- ::std::vector< Parameter> m_aParameters;
- //====================================================================
- // Data attributes
- //====================================================================
- TTypeInfoVector m_aTypeInfo; // Hashtable containing an entry
- // for each row returned by
- // DatabaseMetaData.getTypeInfo.
-
- sal_Int32 m_nNumParams; // Number of parameter markers
- // for the prepared statement
-
- ::rtl::OUString m_sSqlStatement;
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData;
- sal_Bool m_bPrepared;
-
- void checkParameterIndex(sal_Int32 _parameterIndex);
-
- protected:
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue)
- throw (::com::sun::star::uno::Exception);
- virtual ~OPreparedStatement();
- public:
- DECLARE_SERVICE_INFO();
- // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
- OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql);
-
- //XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
- //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
-
- // XPreparedStatement
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL executeUpdate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL execute( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XParameters
- virtual void SAL_CALL setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setFloat( sal_Int32 parameterIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setDouble( sal_Int32 parameterIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setBytes( sal_Int32 parameterIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setDate( sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setTime( sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setTimestamp( sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setBinaryStream( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setCharacterStream( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setObject( sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setObjectWithInfo( sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setRef( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setBlob( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setClob( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setArray( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL clearParameters( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XPreparedBatchExecution
- virtual void SAL_CALL addBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL clearBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL executeBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XCloseable
- virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XResultSetMetaDataSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- };
- }
-}
-#endif // CONNECTIVITY_SPREPAREDSTATEMENT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
deleted file mode 100644
index aea4dc60..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
+++ /dev/null
@@ -1,875 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include "SResultSet.hxx"
-#include "SResultSetMetaData.hxx"
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/sdbcx/CompareBookmark.hpp>
-#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include "propertyids.hxx"
-
-using namespace connectivity::skeleton;
-using namespace cppu;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-using namespace com::sun::star::sdbcx;
-using namespace com::sun::star::container;
-using namespace com::sun::star::io;
-using namespace com::sun::star::util;
-
-//------------------------------------------------------------------------------
-// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet");
-::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) \
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.skeleton.ResultSet"));
-}
-// -------------------------------------------------------------------------
- Sequence< ::rtl::OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException)
-{
- Sequence< ::rtl::OUString > aSupported(2);
- aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet"));
- aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet"));
- return aSupported;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw( RuntimeException)
-{
- Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
- const ::rtl::OUString* pSupported = aSupported.getConstArray();
- const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
-}
-
-// -------------------------------------------------------------------------
-OResultSet::OResultSet(OStatement_Base* pStmt)
- : OResultSet_BASE(m_aMutex)
- ,OPropertySetHelper(OResultSet_BASE::rBHelper)
- ,m_aStatement((OWeakObject*)pStmt)
- ,m_xMetaData(NULL)
- ,m_nTextEncoding(pStmt->getOwnConnection()->getTextEncoding())
- ,m_pStatement(pStmt)
- ,m_bWasNull(sal_True)
-{
-}
-// -------------------------------------------------------------------------
-OResultSet::~OResultSet()
-{
-}
-// -------------------------------------------------------------------------
-void OResultSet::disposing(void)
-{
- OPropertySetHelper::disposing();
-
- ::osl::MutexGuard aGuard(m_aMutex);
-
- m_aStatement = NULL;
- m_xMetaData = NULL;
-}
-// -------------------------------------------------------------------------
-Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- Any aRet = OPropertySetHelper::queryInterface(rType);
- if(!aRet.hasValue())
- aRet = OResultSet_BASE::queryInterface(rType);
- return aRet;
-}
-// -------------------------------------------------------------------------
- Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException)
-{
- OTypeCollection aTypes(
- ::cppu::UnoType< Reference< ::com::sun::star::beans::XMultiPropertySet > >::get(),
- ::cppu::UnoType< Reference< ::com::sun::star::beans::XFastPropertySet > >::get(),
- ::cppu::UnoType< Reference< ::com::sun::star::beans::XPropertySet > >::get());
-
- return concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OResultSet::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException)
-{
-
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- // find the first column with the name columnName
-
- ::osl::MutexGuard aGuard( m_aMutex );
-
- Reference< XResultSetMetaData > xMeta = getMetaData();
- sal_Int32 nLen = xMeta->getColumnCount();
- sal_Int32 i = 1;
- for(;i<=nLen;++i)
- if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) :
- columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i)))
- break;
- return i;
-}
-// -------------------------------------------------------------------------
-Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return NULL;
-}
-
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- sal_Int8 nRet = 0;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
-
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- ::osl::MutexGuard aGuard( m_aMutex );
-
- return Sequence< sal_Int8 >();
-}
-// -------------------------------------------------------------------------
-
-Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- Date nRet;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- double nRet = 0;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- float nVal(0);
- return nVal;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- sal_Int32 nRet=0;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- sal_Int32 nValue = 0;
- return nValue;
-}
-// -------------------------------------------------------------------------
-
-sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_Int64();
-}
-// -------------------------------------------------------------------------
-
-Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- if(!m_xMetaData.is())
- m_xMetaData = new OResultSetMetaData(m_pStatement->getOwnConnection());
- return m_xMetaData;
-}
-// -------------------------------------------------------------------------
-Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return NULL;
-}
-
-// -------------------------------------------------------------------------
-
-Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return NULL;
-}
-// -------------------------------------------------------------------------
-Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return NULL;
-}
-// -------------------------------------------------------------------------
-
-Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return NULL;
-}
-// -------------------------------------------------------------------------
-
-Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return Any();
-}
-// -------------------------------------------------------------------------
-
-sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- sal_Int16 nRet=0;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-
-::rtl::OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- ::rtl::OUString nRet;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- ::osl::MutexGuard aGuard( m_aMutex );
-
- Time nRet;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-
-DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- ::osl::MutexGuard aGuard( m_aMutex );
-
- DateTime nRet;
- return nRet;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- // here you have to implement your movements
- // return true means there is no data
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_True;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- // move before the first row so that isBeforeFirst returns false
- // the smae for other movement methods
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException)
-{
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- }
- dispose();
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return m_aStatement.get();
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return m_bWasNull;
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::cancel( ) throw(RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException)
-{
-}
-// -------------------------------------------------------------------------
-Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException)
-{
- return Any();
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- // you only have to implement this if you want to insert new rows
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- // only when you allow updates
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- // only when you allow insert's
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
-{
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- ::osl::MutexGuard aGuard( m_aMutex );
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
-{
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- ::osl::MutexGuard aGuard( m_aMutex );
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -----------------------------------------------------------------------
-void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const DateTime& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-}
-// -------------------------------------------------------------------------
-// XRowLocate
-Any SAL_CALL OResultSet::getBookmark( ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- // if you don't want to support bookmark you must remove the XRowLocate interface
-
- return Any();
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& first, const Any& second ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
-
- return CompareBookmark::NOT_EQUAL;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks( ) throw( SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
-{
- throw SQLException();
-}
-// -------------------------------------------------------------------------
-// XDeleteRows
-Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-
- return Sequence< sal_Int32 >();
-}
-// -------------------------------------------------------------------------
-IPropertyArrayHelper* OResultSet::createArrayHelper( ) const
-{
- Sequence< Property > aProps(6);
- Property* pProperties = aProps.getArray();
- sal_Int32 nPos = 0;
- DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY);
- DECL_PROP0(FETCHDIRECTION, sal_Int32);
- DECL_PROP0(FETCHSIZE, sal_Int32);
- DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY);
- DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY);
- DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY);
-
- return new OPropertyArrayHelper(aProps);
-}
-// -------------------------------------------------------------------------
-IPropertyArrayHelper & OResultSet::getInfoHelper()
-{
- return *const_cast<OResultSet*>(this)->getArrayHelper();
-}
-// -------------------------------------------------------------------------
-sal_Bool OResultSet::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException)
-{
- switch(nHandle)
- {
- case PROPERTY_ID_ISBOOKMARKABLE:
- case PROPERTY_ID_CURSORNAME:
- case PROPERTY_ID_RESULTSETCONCURRENCY:
- case PROPERTY_ID_RESULTSETTYPE:
- throw ::com::sun::star::lang::IllegalArgumentException();
- break;
- case PROPERTY_ID_FETCHDIRECTION:
- case PROPERTY_ID_FETCHSIZE:
- default:
- ;
- }
- return sal_False;
-}
-// -------------------------------------------------------------------------
-void OResultSet::setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const Any& rValue
- )
- throw (Exception)
-{
- switch(nHandle)
- {
- case PROPERTY_ID_ISBOOKMARKABLE:
- case PROPERTY_ID_CURSORNAME:
- case PROPERTY_ID_RESULTSETCONCURRENCY:
- case PROPERTY_ID_RESULTSETTYPE:
- throw Exception();
- break;
- case PROPERTY_ID_FETCHDIRECTION:
- break;
- case PROPERTY_ID_FETCHSIZE:
- break;
- default:
- ;
- }
-}
-// -------------------------------------------------------------------------
-void OResultSet::getFastPropertyValue(
- Any& rValue,
- sal_Int32 nHandle
- ) const
-{
- switch(nHandle)
- {
- case PROPERTY_ID_ISBOOKMARKABLE:
- case PROPERTY_ID_CURSORNAME:
- case PROPERTY_ID_RESULTSETCONCURRENCY:
- case PROPERTY_ID_RESULTSETTYPE:
- case PROPERTY_ID_FETCHDIRECTION:
- case PROPERTY_ID_FETCHSIZE:
- ;
- }
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OResultSet::acquire() throw()
-{
- OResultSet_BASE::acquire();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OResultSet::release() throw()
-{
- OResultSet_BASE::release();
-}
-// -----------------------------------------------------------------------------
-::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
-{
- return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
-}
-// -----------------------------------------------------------------------------
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.hxx
deleted file mode 100644
index b626a56a..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.hxx
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SRESULTSET_HXX
-#define CONNECTIVITY_SRESULTSET_HXX
-
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#include <com/sun/star/sdbc/XRow.hpp>
-#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
-#include <com/sun/star/sdbc/XCloseable.hpp>
-#include <com/sun/star/sdbc/XColumnLocate.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
-#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
-#include <com/sun/star/sdbc/XRowUpdate.hpp>
-#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#include <com/sun/star/sdbcx/XDeleteRows.hpp>
-#include <cppuhelper/compbase12.hxx>
-#include "SStatement.hxx"
-#include "OSubComponent.hxx"
-
-namespace connectivity
-{
- namespace skeleton
- {
-
- /*
- ** OResultSet
- */
- typedef ::cppu::WeakComponentImplHelper12< ::com::sun::star::sdbc::XResultSet,
- ::com::sun::star::sdbc::XRow,
- ::com::sun::star::sdbc::XResultSetMetaDataSupplier,
- ::com::sun::star::util::XCancellable,
- ::com::sun::star::sdbc::XWarningsSupplier,
- ::com::sun::star::sdbc::XResultSetUpdate,
- ::com::sun::star::sdbc::XRowUpdate,
- ::com::sun::star::sdbcx::XRowLocate,
- ::com::sun::star::sdbcx::XDeleteRows,
- ::com::sun::star::sdbc::XCloseable,
- ::com::sun::star::sdbc::XColumnLocate,
- ::com::sun::star::lang::XServiceInfo> OResultSet_BASE;
-
- class OResultSet : public OBase_Mutex,
- public OResultSet_BASE,
- public ::cppu::OPropertySetHelper,
- public OPropertyArrayUsageHelper<OResultSet>
- {
- protected:
- OStatement_Base* m_pStatement;
- ::com::sun::star::uno::WeakReferenceHelper m_aStatement;
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
- rtl_TextEncoding m_nTextEncoding;
- sal_Bool m_bWasNull;
-
- // OPropertyArrayUsageHelper
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
- // OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
-
- virtual sal_Bool SAL_CALL convertFastPropertyValue(
- ::com::sun::star::uno::Any & rConvertedValue,
- ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException);
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue
- )
- throw (::com::sun::star::uno::Exception);
- virtual void SAL_CALL getFastPropertyValue(
- ::com::sun::star::uno::Any& rValue,
- sal_Int32 nHandle
- ) const;
-
- // you can't delete objects of this type
- virtual ~OResultSet();
- public:
- DECLARE_SERVICE_INFO();
-
- OResultSet( OStatement_Base* pStmt);
-
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
- {
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
- }
-
- // ::cppu::OComponentHelper
- virtual void SAL_CALL disposing(void);
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
- //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
- // XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- // XResultSet
- virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL beforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL afterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XRow
- virtual sal_Bool SAL_CALL wasNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getString( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XResultSetMetaDataSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XCancellable
- virtual void SAL_CALL cancel( ) throw(::com::sun::star::uno::RuntimeException);
- // XCloseable
- virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XWarningsSupplier
- virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XResultSetUpdate
- virtual void SAL_CALL insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XRowUpdate
- virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XColumnLocate
- virtual sal_Int32 SAL_CALL findColumn( const ::rtl::OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XRowLocate
- virtual ::com::sun::star::uno::Any SAL_CALL getBookmark( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XDeleteRows
- virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- };
- }
-}
-#endif // CONNECTIVITY_SRESULTSET_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx
deleted file mode 100644
index 53423d53..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include "SResultSetMetaData.hxx"
-
-using namespace connectivity::skeleton;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::sdbc;
-
-// -------------------------------------------------------------------------
-OResultSetMetaData::~OResultSetMetaData()
-{
-}
-// -------------------------------------------------------------------------
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return 50;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- sal_Int32 nType = 0;
- return nType;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException)
-{
- // this make no sense here so you have to change this
- return 0;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Column")) + ::rtl::OUString::valueOf(column);
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return ::rtl::OUString();
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-
-sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return 0;
-}
-// -----------------------------------------------------------------------------
-sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
-{
- return 0;
-}
-// -------------------------------------------------------------------------
-
-sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return 0;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_True;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-;
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
-{
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx
deleted file mode 100644
index 92418de6..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SRESULSETMETADATA_HXX
-#define CONNECTIVITY_SRESULSETMETADATA_HXX
-
-#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include "SConnection.hxx"
-
-namespace connectivity
-{
- namespace skeleton
- {
- //**************************************************************
- //************ Class: ResultSetMetaData
- //**************************************************************
- typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> OResultSetMetaData_BASE;
-
- class OResultSetMetaData : public OResultSetMetaData_BASE
- {
- OConnection* m_pConnection;
-
- protected:
- virtual ~OResultSetMetaData();
- public:
- // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
- OResultSetMetaData(OConnection* _pConnection) : m_pConnection(_pConnection){}
-
- /// Avoid ambigous cast error from the compiler.
- inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
- { return this; }
-
- virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isSearchable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isCurrency( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getColumnName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getSchemaName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getTableName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getCatalogName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- };
- }
-}
-
-#endif // CONNECTIVITY_SRESULSETMETADATA_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
deleted file mode 100644
index e388d00d..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <sal/types.h>
-#include "SDriver.hxx"
-#include <cppuhelper/factory.hxx>
-#include <osl/diagnose.h>
-
-using namespace connectivity::skeleton;
-using ::rtl::OUString;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::registry::XRegistryKey;
-using ::com::sun::star::lang::XSingleServiceFactory;
-using ::com::sun::star::lang::XMultiServiceFactory;
-
-typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
- (
- const Reference< XMultiServiceFactory > & rServiceManager,
- const OUString & rComponentName,
- ::cppu::ComponentInstantiation pCreateFunction,
- const Sequence< OUString > & rServiceNames,
- rtl_ModuleCount* _pTemp
- );
-
-//***************************************************************************************
-//
-// The required C-Api must be provided!
-// It contains of 3 special functions that have to be exported.
-//
-
-//---------------------------------------------------------------------------------------
-void REGISTER_PROVIDER(
- const OUString& aServiceImplName,
- const Sequence< OUString>& Services,
- const Reference< ::com::sun::star::registry::XRegistryKey > & xKey)
-{
- OUString aMainKeyName(RTL_CONSTASCII_USTRINGPARAM("/"));
- aMainKeyName += aServiceImplName;
- aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-
- Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) );
- OSL_ENSURE(xNewKey.is(), "SKELETON::component_writeInfo : could not create a registry key !");
-
- for (sal_uInt32 i=0; i<Services.getLength(); ++i)
- xNewKey->createKey(Services[i]);
-}
-
-
-//---------------------------------------------------------------------------------------
-struct ProviderRequest
-{
- Reference< XSingleServiceFactory > xRet;
- Reference< XMultiServiceFactory > const xServiceManager;
- OUString const sImplementationName;
-
- ProviderRequest(
- void* pServiceManager,
- sal_Char const* pImplementationName
- )
- : xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
- , sImplementationName(OUString::createFromAscii(pImplementationName))
- {
- }
-
- inline
- sal_Bool CREATE_PROVIDER(
- const OUString& Implname,
- const Sequence< OUString > & Services,
- ::cppu::ComponentInstantiation Factory,
- createFactoryFunc creator
- )
- {
- if (!xRet.is() && (Implname == sImplementationName))
- try
- {
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
- }
- catch(...)
- {
- }
- return xRet.is();
- }
-
- void* getProvider() const { return xRet.get(); }
-};
-
-//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
- const sal_Char* pImplementationName,
- void* pServiceManager,
- void* pRegistryKey)
-{
- void* pRet = 0;
- if (pServiceManager)
- {
- ProviderRequest aReq(pServiceManager,pImplementationName);
-
- aReq.CREATE_PROVIDER(
- SkeletonDriver::getImplementationName_Static(),
- SkeletonDriver::getSupportedServiceNames_Static(),
- SkeletonDriver_CreateInstance, ::cppu::createSingleFactory)
- ;
-
- if(aReq.xRet.is())
- aReq.xRet->acquire();
-
- pRet = aReq.getProvider();
- }
-
- return pRet;
-};
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
deleted file mode 100644
index 5e1bee3d..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
+++ /dev/null
@@ -1,370 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-#include <osl/diagnose.h>
-#include "SStatement.hxx"
-#include "SConnection.hxx"
-#include "SResultSet.hxx"
-#include <osl/thread.h>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/FetchDirection.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <cppuhelper/typeprovider.hxx>
-#include "propertyids.hxx"
-
-using namespace connectivity::skeleton;
-//------------------------------------------------------------------------------
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::sdbc;
-using namespace com::sun::star::sdbcx;
-using namespace com::sun::star::container;
-using namespace com::sun::star::io;
-using namespace com::sun::star::util;
-//------------------------------------------------------------------------------
-OStatement_Base::OStatement_Base(OConnection* _pConnection )
- : OStatement_BASE(m_aMutex),
- OPropertySetHelper(OStatement_BASE::rBHelper),
- rBHelper(OStatement_BASE::rBHelper),
- m_pConnection(_pConnection)
-{
- m_pConnection->acquire();
-}
-// -----------------------------------------------------------------------------
-OStatement_Base::~OStatement_Base()
-{
-}
-//------------------------------------------------------------------------------
-void OStatement_Base::disposeResultSet()
-{
- // free the cursor if alive
- Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
- if (xComp.is())
- xComp->dispose();
- m_xResultSet = Reference< XResultSet>();
-}
-//------------------------------------------------------------------------------
-void OStatement_BASE2::disposing()
-{
- ::osl::MutexGuard aGuard(m_aMutex);
-
- disposeResultSet();
-
- if (m_pConnection)
- m_pConnection->release();
- m_pConnection = NULL;
-
- dispose_ChildImpl();
- OStatement_Base::disposing();
-}
-//-----------------------------------------------------------------------------
-void SAL_CALL OStatement_BASE2::release() throw()
-{
- relase_ChildImpl();
-}
-//-----------------------------------------------------------------------------
-Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- Any aRet = OStatement_BASE::queryInterface(rType);
- if(!aRet.hasValue())
- aRet = OPropertySetHelper::queryInterface(rType);
- return aRet;
-}
-// -------------------------------------------------------------------------
-Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException)
-{
- ::cppu::OTypeCollection aTypes(
- ::cppu::UnoType< Reference< XMultiPropertySet > >::get(),
- ::cppu::UnoType< Reference< XFastPropertySet > >::get(),
- ::cppu::UnoType< Reference< XPropertySet > >::get());
-
- return concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes());
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- // cancel the current sql statement
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException)
-{
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- }
- dispose();
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OStatement::clearBatch( ) throw(SQLException, RuntimeException)
-{
- // if you support batches clear it here
-}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL OStatement_Base::execute( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- // returns true when a resultset is available
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
- Reference< XResultSet > xRS = NULL;
- // create a resultset as result of executing the sql statement
- // you have to here something :-)
- m_xResultSet = xRS; // we nedd a reference to it for later use
- return xRS;
-}
-// -------------------------------------------------------------------------
-
-Reference< XConnection > SAL_CALL OStatement_Base::getConnection( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- // just return our connection here
- return (Reference< XConnection >)m_pConnection;
-}
-// -----------------------------------------------------------------------------
-sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
-{
- return 0;
-}
-// -------------------------------------------------------------------------
-
-Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this));
- if(!aRet.hasValue())
- aRet = OStatement_Base::queryInterface(rType);
- return aRet;
-}
-// -------------------------------------------------------------------------
-
-void SAL_CALL OStatement::addBatch( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
- m_aBatchList.push_back(sql);
-}
-// -------------------------------------------------------------------------
-Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- return Sequence< sal_Int32 >();
-}
-// -------------------------------------------------------------------------
-
-
-sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- // the return values gives information about how many rows are affected by executing the sql statement
- return 0;
-
-}
-// -------------------------------------------------------------------------
-
-Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-// return our save resultset here
- return m_xResultSet;
-}
-// -------------------------------------------------------------------------
-
-sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
- // if your driver supports more than only one resultset
- // and has one more at this moment return true
- return sal_False;
-}
-// -------------------------------------------------------------------------
-
-// -------------------------------------------------------------------------
-Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
- return makeAny(m_aLastWarning);
-}
-// -------------------------------------------------------------------------
-
-// -------------------------------------------------------------------------
-void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeException)
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed(OStatement_BASE::rBHelper.bDisposed);
-
-
- m_aLastWarning = SQLWarning();
-}
-// -------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper* OStatement_Base::createArrayHelper( ) const
-{
- // this properties are define by the service statement
- // they must in alphabetic order
- Sequence< Property > aProps(10);
- Property* pProperties = aProps.getArray();
- sal_Int32 nPos = 0;
- DECL_PROP0(CURSORNAME, ::rtl::OUString);
- DECL_BOOL_PROP0(ESCAPEPROCESSING);
- DECL_PROP0(FETCHDIRECTION,sal_Int32);
- DECL_PROP0(FETCHSIZE, sal_Int32);
- DECL_PROP0(MAXFIELDSIZE,sal_Int32);
- DECL_PROP0(MAXROWS, sal_Int32);
- DECL_PROP0(QUERYTIMEOUT,sal_Int32);
- DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32);
- DECL_PROP0(RESULTSETTYPE,sal_Int32);
- DECL_BOOL_PROP0(USEBOOKMARKS);
-
- return new ::cppu::OPropertyArrayHelper(aProps);
-}
-
-// -------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper()
-{
- return *const_cast<OStatement_Base*>(this)->getArrayHelper();
-}
-// -------------------------------------------------------------------------
-sal_Bool OStatement_Base::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException)
-{
- sal_Bool bConverted = sal_False;
- // here we have to try to convert
- return bConverted;
-}
-// -------------------------------------------------------------------------
-void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
-{
- // set the value to what ever is nescessary
- switch(nHandle)
- {
- case PROPERTY_ID_QUERYTIMEOUT:
- case PROPERTY_ID_MAXFIELDSIZE:
- case PROPERTY_ID_MAXROWS:
- case PROPERTY_ID_CURSORNAME:
- case PROPERTY_ID_RESULTSETCONCURRENCY:
- case PROPERTY_ID_RESULTSETTYPE:
- case PROPERTY_ID_FETCHDIRECTION:
- case PROPERTY_ID_FETCHSIZE:
- case PROPERTY_ID_ESCAPEPROCESSING:
- case PROPERTY_ID_USEBOOKMARKS:
- default:
- ;
- }
-}
-// -------------------------------------------------------------------------
-void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
-{
- switch(nHandle)
- {
- case PROPERTY_ID_QUERYTIMEOUT:
- case PROPERTY_ID_MAXFIELDSIZE:
- case PROPERTY_ID_MAXROWS:
- case PROPERTY_ID_CURSORNAME:
- case PROPERTY_ID_RESULTSETCONCURRENCY:
- case PROPERTY_ID_RESULTSETTYPE:
- case PROPERTY_ID_FETCHDIRECTION:
- case PROPERTY_ID_FETCHSIZE:
- case PROPERTY_ID_ESCAPEPROCESSING:
- case PROPERTY_ID_USEBOOKMARKS:
- default:
- ;
- }
-}
-// -------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.sdbc.Statement");
-// -----------------------------------------------------------------------------
-void SAL_CALL OStatement_Base::acquire() throw()
-{
- OStatement_BASE::acquire();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OStatement_Base::release() throw()
-{
- OStatement_BASE::release();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OStatement::acquire() throw()
-{
- OStatement_BASE2::acquire();
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OStatement::release() throw()
-{
- OStatement_BASE2::release();
-}
-// -----------------------------------------------------------------------------
-Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( ) throw(RuntimeException)
-{
- return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
-}
-// -----------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx
deleted file mode 100644
index d8d32a4a..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef CONNECTIVITY_SSTATEMENT_HXX
-#define CONNECTIVITY_SSTATEMENT_HXX
-
-#include <com/sun/star/sdbc/XStatement.hpp>
-#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#include <com/sun/star/sdbc/XMultipleResults.hpp>
-#include <com/sun/star/sdbc/XBatchExecution.hpp>
-#include <com/sun/star/sdbc/XCloseable.hpp>
-#include <com/sun/star/sdbc/SQLWarning.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
-#include <cppuhelper/compbase5.hxx>
-#include "SConnection.hxx"
-#include <list>
-#include "OSubComponent.hxx"
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-namespace connectivity
-{
- namespace skeleton
- {
-
- typedef ::cppu::WeakComponentImplHelper5< ::com::sun::star::sdbc::XStatement,
- ::com::sun::star::sdbc::XWarningsSupplier,
- ::com::sun::star::util::XCancellable,
- ::com::sun::star::sdbc::XCloseable,
- ::com::sun::star::sdbc::XMultipleResults> OStatement_BASE;
-
- //**************************************************************
- //************ Class: OStatement_Base
- // is a base class for the normal statement and for the prepared statement
- //**************************************************************
- class OStatement_Base : public OBase_Mutex,
- public OStatement_BASE,
- public ::cppu::OPropertySetHelper,
- public OPropertyArrayUsageHelper<OStatement_Base>
-
- {
- ::com::sun::star::sdbc::SQLWarning m_aLastWarning;
- protected:
- ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
- // for this Statement
-
- ::std::list< ::rtl::OUString> m_aBatchList;
-
- OConnection* m_pConnection; // The owning Connection object
- protected:
-
- void disposeResultSet();
-
- // OPropertyArrayUsageHelper
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
- // OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
- virtual sal_Bool SAL_CALL convertFastPropertyValue(
- ::com::sun::star::uno::Any & rConvertedValue,
- ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException);
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception);
- virtual void SAL_CALL getFastPropertyValue(
- ::com::sun::star::uno::Any& rValue,
- sal_Int32 nHandle) const;
- virtual ~OStatement_Base();
-
- public:
- ::cppu::OBroadcastHelper& rBHelper;
- OStatement_Base(OConnection* _pConnection );
- using OStatement_BASE::operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >;
-
- // OComponentHelper
- virtual void SAL_CALL disposing(void){OStatement_BASE::disposing();}
- // XInterface
- virtual void SAL_CALL release() throw();
- virtual void SAL_CALL acquire() throw();
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
-
- // XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- // XStatement
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ;
- virtual sal_Int32 SAL_CALL executeUpdate( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ;
- virtual sal_Bool SAL_CALL execute( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ;
- // XWarningsSupplier
- virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XCancellable
- virtual void SAL_CALL cancel( ) throw(::com::sun::star::uno::RuntimeException);
- // XCloseable
- virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // XMultipleResults
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getResultSet( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getUpdateCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getMoreResults( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
-
- // other methods
- OConnection* getOwnConnection() const { return m_pConnection;}
- };
-
- class OStatement_BASE2 :public OStatement_Base
- ,public OSubComponent<OStatement_BASE2, OStatement_BASE>
-
- {
- friend class OSubComponent<OStatement_BASE2, OStatement_BASE>;
- public:
- OStatement_BASE2(OConnection* _pConnection ) : OStatement_Base(_pConnection ),
- OSubComponent<OStatement_BASE2, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this){}
- // OComponentHelper
- virtual void SAL_CALL disposing(void);
- // XInterface
- virtual void SAL_CALL release() throw();
- };
-
- class OStatement : public OStatement_BASE2,
- public ::com::sun::star::sdbc::XBatchExecution,
- public ::com::sun::star::lang::XServiceInfo
- {
- protected:
- virtual ~OStatement(){}
- public:
- // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
- OStatement( OConnection* _pConnection) : OStatement_BASE2( _pConnection){}
- DECLARE_SERVICE_INFO();
-
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
- // XBatchExecution
- virtual void SAL_CALL addBatch( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL clearBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL executeBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- };
- }
-}
-#endif // CONNECTIVITY_SSTATEMENT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx
deleted file mode 100644
index 9cd66a47..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <osl/diagnose.h>
-#include "propertyids.hxx"
-namespace connectivity
-{
-namespace skeleton
-{
- const sal_Char* getPROPERTY_QUERYTIMEOUT() { return "QueryTimeOut"; }
- const sal_Char* getPROPERTY_MAXFIELDSIZE() { return "MaxFieldSize"; }
- const sal_Char* getPROPERTY_MAXROWS() { return "MaxRows"; }
- const sal_Char* getPROPERTY_CURSORNAME() { return "CursorName"; }
- const sal_Char* getPROPERTY_RESULTSETCONCURRENCY() { return "ResultSetConcurrency"; }
- const sal_Char* getPROPERTY_RESULTSETTYPE() { return "ResultSetType"; }
- const sal_Char* getPROPERTY_FETCHDIRECTION() { return "FetchDirection"; }
- const sal_Char* getPROPERTY_FETCHSIZE() { return "FetchSize"; }
- const sal_Char* getPROPERTY_ESCAPEPROCESSING() { return "EscapeProcessing"; }
- const sal_Char* getPROPERTY_USEBOOKMARKS() { return "UseBookmarks"; }
-
- const sal_Char* getPROPERTY_NAME() { return "Name"; }
- const sal_Char* getPROPERTY_TYPE() { return "Type"; }
- const sal_Char* getPROPERTY_TYPENAME() { return "TypeName"; }
- const sal_Char* getPROPERTY_PRECISION() { return "Precision"; }
- const sal_Char* getPROPERTY_SCALE() { return "Scale"; }
- const sal_Char* getPROPERTY_ISNULLABLE() { return "IsNullable"; }
- const sal_Char* getPROPERTY_ISAUTOINCREMENT() { return "IsAutoIncrement"; }
- const sal_Char* getPROPERTY_ISROWVERSION() { return "IsRowVersion"; }
- const sal_Char* getPROPERTY_DESCRIPTION() { return "Description"; }
- const sal_Char* getPROPERTY_DEFAULTVALUE() { return "DefaultValue"; }
-
- const sal_Char* getPROPERTY_REFERENCEDTABLE() { return "ReferencedTable"; }
- const sal_Char* getPROPERTY_UPDATERULE() { return "UpdateRule"; }
- const sal_Char* getPROPERTY_DELETERULE() { return "DeleteRule"; }
- const sal_Char* getPROPERTY_CATALOG() { return "Catalog"; }
- const sal_Char* getPROPERTY_ISUNIQUE() { return "IsUnique"; }
- const sal_Char* getPROPERTY_ISPRIMARYKEYINDEX() { return "IsPrimaryKeyIndex"; }
- const sal_Char* getPROPERTY_ISCLUSTERED() { return "IsClustered"; }
- const sal_Char* getPROPERTY_ISASCENDING() { return "IsAscending"; }
- const sal_Char* getPROPERTY_SCHEMANAME() { return "SchemaName"; }
- const sal_Char* getPROPERTY_CATALOGNAME() { return "CatalogName"; }
- const sal_Char* getPROPERTY_COMMAND() { return "Command"; }
- const sal_Char* getPROPERTY_CHECKOPTION() { return "CheckOption"; }
- const sal_Char* getPROPERTY_PASSWORD() { return "Password"; }
- const sal_Char* getPROPERTY_RELATEDCOLUMN() { return "RelatedColumn"; }
-
- const sal_Char* getSTAT_INVALID_INDEX() { return "Invalid descriptor index"; }
-
- const sal_Char* getPROPERTY_FUNCTION() { return "Function"; }
- const sal_Char* getPROPERTY_TABLENAME() { return "TableName"; }
- const sal_Char* getPROPERTY_REALNAME() { return "RealName"; }
- const sal_Char* getPROPERTY_DBASEPRECISIONCHANGED() { return "DbasePrecisionChanged"; }
- const sal_Char* getPROPERTY_ISCURRENCY() { return "IsCurrency"; }
- const sal_Char* getPROPERTY_ISBOOKMARKABLE() { return "IsBookmarkable"; }
-
- const sal_Char* getPROPERTY_FORMATKEY() { return "FormatKey"; }
- const sal_Char* getPROPERTY_LOCALE() { return "Locale"; }
-
- const sal_Char* getPROPERTY_AUTOINCREMENTCREATION() { return "AutoIncrementCreation"; }
- const sal_Char* getPROPERTY_PRIVILEGES() { return "Privileges"; }
- //============================================================
- //= error messages
- //============================================================
- const sal_Char* getERRORMSG_SEQUENCE() { return "Function sequence error"; }
- const sal_Char* getSQLSTATE_SEQUENCE() { return "HY010"; }
- const sal_Char* getSQLSTATE_GENERAL() { return "HY0000"; }
- const sal_Char* getSTR_DELIMITER() { return "/"; }
-
- OPropertyMap::~OPropertyMap()
- {
- ::std::map<sal_Int32 , rtl_uString*>::iterator aIter = m_aPropertyMap.begin();
- for(;aIter != m_aPropertyMap.end();++aIter)
- if(aIter->second)
- rtl_uString_release(aIter->second);
- }
- // ------------------------------------------------------------------------------
- ::rtl::OUString OPropertyMap::getNameByIndex(sal_Int32 _nIndex) const
- {
- ::rtl::OUString sRet;
- ::std::map<sal_Int32 , rtl_uString*>::const_iterator aIter = m_aPropertyMap.find(_nIndex);
- if(aIter == m_aPropertyMap.end())
- sRet = const_cast<OPropertyMap*>(this)->fillValue(_nIndex);
- else
- sRet = aIter->second;
- return sRet;
- }
- // ------------------------------------------------------------------------------
- ::rtl::OUString OPropertyMap::fillValue(sal_Int32 _nIndex)
- {
- rtl_uString* pStr = NULL;
- switch(_nIndex)
- {
- case PROPERTY_ID_QUERYTIMEOUT: { rtl_uString_newFromAscii(&pStr,getPROPERTY_QUERYTIMEOUT() ); break; }
- case PROPERTY_ID_MAXFIELDSIZE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_MAXFIELDSIZE() ); break; }
- case PROPERTY_ID_MAXROWS: { rtl_uString_newFromAscii(&pStr,getPROPERTY_MAXROWS() ); break; }
- case PROPERTY_ID_CURSORNAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CURSORNAME() ); break; }
- case PROPERTY_ID_RESULTSETCONCURRENCY: { rtl_uString_newFromAscii(&pStr,getPROPERTY_RESULTSETCONCURRENCY() ); break; }
- case PROPERTY_ID_RESULTSETTYPE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_RESULTSETTYPE() ); break; }
- case PROPERTY_ID_FETCHDIRECTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FETCHDIRECTION() ); break; }
- case PROPERTY_ID_FETCHSIZE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FETCHSIZE() ); break; }
- case PROPERTY_ID_ESCAPEPROCESSING: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ESCAPEPROCESSING() ); break; }
- case PROPERTY_ID_USEBOOKMARKS: { rtl_uString_newFromAscii(&pStr,getPROPERTY_USEBOOKMARKS() ); break; }
- // Column
- case PROPERTY_ID_NAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_NAME() ); break; }
- case PROPERTY_ID_TYPE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_TYPE() ); break; }
- case PROPERTY_ID_TYPENAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_TYPENAME() ); break; }
- case PROPERTY_ID_PRECISION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_PRECISION() ); break; }
- case PROPERTY_ID_SCALE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_SCALE() ); break; }
- case PROPERTY_ID_ISNULLABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISNULLABLE() ); break; }
- case PROPERTY_ID_ISAUTOINCREMENT: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISAUTOINCREMENT() ); break; }
- case PROPERTY_ID_ISROWVERSION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISROWVERSION() ); break; }
- case PROPERTY_ID_DESCRIPTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DESCRIPTION() ); break; }
- case PROPERTY_ID_DEFAULTVALUE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DEFAULTVALUE() ); break; }
-
- case PROPERTY_ID_REFERENCEDTABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_REFERENCEDTABLE() ); break; }
- case PROPERTY_ID_UPDATERULE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_UPDATERULE() ); break; }
- case PROPERTY_ID_DELETERULE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DELETERULE() ); break; }
- case PROPERTY_ID_CATALOG: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CATALOG() ); break; }
- case PROPERTY_ID_ISUNIQUE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISUNIQUE() ); break; }
- case PROPERTY_ID_ISPRIMARYKEYINDEX: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISPRIMARYKEYINDEX() ); break; }
- case PROPERTY_ID_ISCLUSTERED: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISCLUSTERED() ); break; }
- case PROPERTY_ID_ISASCENDING: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISASCENDING() ); break; }
- case PROPERTY_ID_SCHEMANAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_SCHEMANAME() ); break; }
- case PROPERTY_ID_CATALOGNAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CATALOGNAME() ); break; }
-
- case PROPERTY_ID_COMMAND: { rtl_uString_newFromAscii(&pStr,getPROPERTY_COMMAND() ); break; }
- case PROPERTY_ID_CHECKOPTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_CHECKOPTION() ); break; }
- case PROPERTY_ID_PASSWORD: { rtl_uString_newFromAscii(&pStr,getPROPERTY_PASSWORD() ); break; }
- case PROPERTY_ID_RELATEDCOLUMN: { rtl_uString_newFromAscii(&pStr,getPROPERTY_RELATEDCOLUMN() ); break; }
-
- case PROPERTY_ID_FUNCTION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FUNCTION() ); break; }
- case PROPERTY_ID_TABLENAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_TABLENAME() ); break; }
- case PROPERTY_ID_REALNAME: { rtl_uString_newFromAscii(&pStr,getPROPERTY_REALNAME() ); break; }
- case PROPERTY_ID_DBASEPRECISIONCHANGED: { rtl_uString_newFromAscii(&pStr,getPROPERTY_DBASEPRECISIONCHANGED() ); break; }
- case PROPERTY_ID_ISCURRENCY: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISCURRENCY() ); break; }
- case PROPERTY_ID_ISBOOKMARKABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ISBOOKMARKABLE() ); break; }
- case PROPERTY_ID_INVALID_INDEX: { rtl_uString_newFromAscii(&pStr,getSTAT_INVALID_INDEX() ); break; }
- case PROPERTY_ID_ERRORMSG_SEQUENCE: { rtl_uString_newFromAscii(&pStr,getERRORMSG_SEQUENCE() ); break; }
- case PROPERTY_ID_HY010: { rtl_uString_newFromAscii(&pStr,getSQLSTATE_SEQUENCE() ); break; }
- case PROPERTY_ID_HY0000: { rtl_uString_newFromAscii(&pStr,getSQLSTATE_GENERAL() ); break; }
- case PROPERTY_ID_DELIMITER: { rtl_uString_newFromAscii(&pStr,getSTR_DELIMITER() ); break; }
- case PROPERTY_ID_FORMATKEY: { rtl_uString_newFromAscii(&pStr,getPROPERTY_FORMATKEY() ); break; }
- case PROPERTY_ID_LOCALE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_LOCALE() ); break; }
- case PROPERTY_ID_AUTOINCREMENTCREATION: { rtl_uString_newFromAscii(&pStr,getPROPERTY_AUTOINCREMENTCREATION() ); break; }
- case PROPERTY_ID_PRIVILEGES: { rtl_uString_newFromAscii(&pStr,getPROPERTY_PRIVILEGES() ); break; }
- }
- m_aPropertyMap[_nIndex] = pStr;
- return pStr;
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx
deleted file mode 100644
index ca0d5bf2..00000000
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
-#define _CONNECTIVITY_PROPERTYIDS_HXX_
-
-// this define has to be set to split the names into different dll's or so's
-// every dll has his own set of property names
-#include <rtl/ustring.hxx>
-#ifndef _MAP_
-#include <map>
-#endif
-
-namespace connectivity
-{
-namespace skeleton
-{
- class OPropertyMap
- {
- ::std::map<sal_Int32 , rtl_uString*> m_aPropertyMap;
-
- ::rtl::OUString fillValue(sal_Int32 _nIndex);
- public:
- OPropertyMap()
- {
- }
- ~OPropertyMap();
- ::rtl::OUString getNameByIndex(sal_Int32 _nIndex) const;
-
- static OPropertyMap& getPropMap()
- {
- static OPropertyMap s_aPropMap;
- return s_aPropMap;
- }
- };
-
-
-
- typedef const sal_Char* (*PVFN)();
-
- struct UStringDescription
- {
- const sal_Char* pZeroTerminatedName;
- sal_Int32 nLength;
-
- UStringDescription(PVFN _fCharFkt);
- operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName,nLength,RTL_TEXTENCODING_ASCII_US); }
- ~UStringDescription();
- private:
- UStringDescription();
- };
- }
-}
-
-
-//------------------------------------------------------------------------------
-#define DECL_PROP1IMPL(varname, type) \
-pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::cppu::UnoType< type >::get(),
-//------------------------------------------------------------------------------
-#define DECL_PROP0(varname, type) \
- DECL_PROP1IMPL(varname, type) 0)
-//------------------------------------------------------------------------------
-#define DECL_BOOL_PROP1IMPL(varname) \
- pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(),
-//------------------------------------------------------------------------------
-#define DECL_BOOL_PROP0(varname) \
- DECL_BOOL_PROP1IMPL(varname) 0)
-
-
-#define PROPERTY_ID_QUERYTIMEOUT 1
-#define PROPERTY_ID_MAXFIELDSIZE 2
-#define PROPERTY_ID_MAXROWS 3
-#define PROPERTY_ID_CURSORNAME 4
-#define PROPERTY_ID_RESULTSETCONCURRENCY 5
-#define PROPERTY_ID_RESULTSETTYPE 6
-#define PROPERTY_ID_FETCHDIRECTION 7
-#define PROPERTY_ID_FETCHSIZE 8
-#define PROPERTY_ID_ESCAPEPROCESSING 9
-#define PROPERTY_ID_USEBOOKMARKS 10
-// Column
-#define PROPERTY_ID_NAME 11
-#define PROPERTY_ID_TYPE 12
-#define PROPERTY_ID_TYPENAME 13
-#define PROPERTY_ID_PRECISION 14
-#define PROPERTY_ID_SCALE 15
-#define PROPERTY_ID_ISNULLABLE 16
-#define PROPERTY_ID_ISAUTOINCREMENT 17
-#define PROPERTY_ID_ISROWVERSION 18
-#define PROPERTY_ID_DESCRIPTION 19
-#define PROPERTY_ID_DEFAULTVALUE 20
-
-#define PROPERTY_ID_REFERENCEDTABLE 21
-#define PROPERTY_ID_UPDATERULE 22
-#define PROPERTY_ID_DELETERULE 23
-#define PROPERTY_ID_CATALOG 24
-#define PROPERTY_ID_ISUNIQUE 25
-#define PROPERTY_ID_ISPRIMARYKEYINDEX 26
-#define PROPERTY_ID_ISCLUSTERED 27
-#define PROPERTY_ID_ISASCENDING 28
-#define PROPERTY_ID_SCHEMANAME 29
-#define PROPERTY_ID_CATALOGNAME 30
-
-#define PROPERTY_ID_COMMAND 31
-#define PROPERTY_ID_CHECKOPTION 32
-#define PROPERTY_ID_PASSWORD 33
-#define PROPERTY_ID_RELATEDCOLUMN 34
-
-#define PROPERTY_ID_FUNCTION 35
-#define PROPERTY_ID_TABLENAME 36
-#define PROPERTY_ID_REALNAME 37
-#define PROPERTY_ID_DBASEPRECISIONCHANGED 38
-#define PROPERTY_ID_ISCURRENCY 39
-#define PROPERTY_ID_ISBOOKMARKABLE 40
-
-#define PROPERTY_ID_INVALID_INDEX 41
-#define PROPERTY_ID_ERRORMSG_SEQUENCE 42
-#define PROPERTY_ID_HY010 43
-#define PROPERTY_ID_HY0000 44
-#define PROPERTY_ID_DELIMITER 45
-#define PROPERTY_ID_FORMATKEY 46
-#define PROPERTY_ID_LOCALE 47
-#define PROPERTY_ID_IM001 48
-
-#define PROPERTY_ID_AUTOINCREMENTCREATION 49
-
-#define PROPERTY_ID_PRIVILEGES 50
-
-#endif // _CONNECTIVITY_PROPERTYIDS_HXX_
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Database/Makefile b/odk/examples/DevelopersGuide/Database/Makefile
deleted file mode 100644
index 8f9dd84e..00000000
--- a/odk/examples/DevelopersGuide/Database/Makefile
+++ /dev/null
@@ -1,134 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Database examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=DataBaseExamples
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=CodeSamples
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-APP2_NAME=OpenQuery
-APP2_JAR=$(OUT_APP_CLASS)/$(APP2_NAME).jar
-APP3_NAME=RowSet
-APP3_JAR=$(OUT_APP_CLASS)/$(APP3_NAME).jar
-
-APP1_JAVAFILES = \
- Sales.java \
- SalesMan.java \
- CodeSamples.java \
- sdbcx.java
-
-APP3_JAVAFILES = \
- RowSetEventListener.java \
- RowSet.java
-
-APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP1_JAVAFILES))
-APP1_CLASSNAMES = $(patsubst %.java,%.class,$(APP1_JAVAFILES))
-
-APP3_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP3_JAVAFILES))
-APP3_CLASSNAMES = $(patsubst %.java,%.class,$(APP3_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(APP1_CLASSFILES) : $(APP1_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $(APP1_JAVAFILES)
-
-$(APP3_CLASSFILES) : $(APP3_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $(APP3_JAVAFILES)
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(APP1_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP1_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(basename $(@F)).class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP3_JAR) : $(OUT_APP_CLASS)/$(APP3_NAME).mf $(APP3_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP3_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(EXAMPLE_NAME) : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
- @echo --------------------------------------------------------------------------------
- @echo This examples needs a running database with name "$(QM)MYDB0$(QM)". Make sure that you
- @echo have created such a database and have established a connection to it.
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) CodeSamples.run
- @echo $(MAKE) OpenQuery.run
- @echo $(MAKE) RowSet.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/Database/OpenQuery.java b/odk/examples/DevelopersGuide/Database/OpenQuery.java
deleted file mode 100644
index 3f63651c..00000000
--- a/odk/examples/DevelopersGuide/Database/OpenQuery.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-
-
-
-/*
- * OpenQuery.java
- *
- * Created on 6. Juli 2002, 10:25
- */
-
-/**
- *
- * @author dschulten
- */
-public class OpenQuery {
-
- private XComponentContext xContext = null;
- private XMultiComponentFactory xMCF = null;
-
- /** Creates a new instance of OpenQuery */
- public OpenQuery() {
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- OpenQuery openQuery1 = new OpenQuery();
- try {
- openQuery1.openQuery();
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-
- protected void openQuery() throws com.sun.star.uno.Exception, java.lang.Exception {
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xMCF = xContext.getServiceManager();
- }
- catch( Exception e) {
- System.err.println("ERROR: can't get a component context from a running office ...");
- e.printStackTrace();
- System.exit(1);
- }
-
- // first we create our RowSet object and get its XRowSet interface
- Object rowSet = xMCF.createInstanceWithContext(
- "com.sun.star.sdb.RowSet", xContext);
-
- com.sun.star.sdbc.XRowSet xRowSet = (com.sun.star.sdbc.XRowSet)
- UnoRuntime.queryInterface(com.sun.star.sdbc.XRowSet.class, rowSet);
-
- // set the properties needed to connect to a database
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xRowSet);
-
- // the DataSourceName can be a data source registered with [PRODUCTNAME], among other possibilities
- xProp.setPropertyValue("DataSourceName","Bibliography");
-
- // the CommandType must be TABLE, QUERY or COMMAND, here we use COMMAND
- xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.COMMAND));
-
- // the Command could be a table or query name or a SQL command, depending on the CommandType
- xProp.setPropertyValue("Command","SELECT IDENTIFIER, AUTHOR FROM biblio ORDER BY IDENTIFIER");
-
- // if your database requires logon, you can use the properties User and Password
- // xProp.setPropertyValue("User", "JohnDoe");
- // xProp.setPropertyValue("Password", "mysecret");
-
- xRowSet.execute();
-
- // prepare the XRow and XColumnLocate interface for column access
- // XRow gets column values
- com.sun.star.sdbc.XRow xRow = (com.sun.star.sdbc.XRow)UnoRuntime.queryInterface(
- com.sun.star.sdbc.XRow.class, xRowSet);
- // XColumnLocate finds columns by name
- com.sun.star.sdbc.XColumnLocate xLoc = (com.sun.star.sdbc.XColumnLocate)
- UnoRuntime.queryInterface(
- com.sun.star.sdbc.XColumnLocate.class, xRowSet);
-
- // print output header
- System.out.println("Identifier\tAuthor");
- System.out.println("----------\t------");
-
- // output result rows
- while ( xRowSet != null && xRowSet.next() ) {
- String ident = xRow.getString(xLoc.findColumn("IDENTIFIER"));
- String author = xRow.getString(xLoc.findColumn("AUTHOR"));
- System.out.println(ident + "\t\t" + author);
- }
-
- // XResultSetUpdate for insertRow handling
- com.sun.star.sdbc.XResultSetUpdate xResultSetUpdate = (com.sun.star.sdbc.XResultSetUpdate)
- UnoRuntime.queryInterface(
- com.sun.star.sdbc.XResultSetUpdate.class, xRowSet);
-
- // XRowUpdate for row updates
- com.sun.star.sdbc.XRowUpdate xRowUpdate = (com.sun.star.sdbc.XRowUpdate)
- UnoRuntime.queryInterface(
- com.sun.star.sdbc.XRowUpdate.class, xRowSet);
-
- // move to insertRow buffer
- xResultSetUpdate.moveToInsertRow();
-
- // edit insertRow buffer
- xRowUpdate.updateString(xLoc.findColumn("IDENTIFIER"), "GOF95");
- xRowUpdate.updateString(xLoc.findColumn("AUTHOR"), "Gamma, Helm, Johnson, Vlissides");
-
- // write buffer to database
- xResultSetUpdate.insertRow();
-
- // throw away the row set
- com.sun.star.lang.XComponent xComp = (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, xRowSet);
- xComp.dispose();
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/Database/RowSet.java b/odk/examples/DevelopersGuide/Database/RowSet.java
deleted file mode 100644
index 9907b165..00000000
--- a/odk/examples/DevelopersGuide/Database/RowSet.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.io.*;
-
-import com.sun.star.comp.helper.RegistryServiceFactory;
-import com.sun.star.comp.servicemanager.ServiceManager;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XComponent;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.sdbc.*;
-import com.sun.star.sdbcx.Privilege;
-import com.sun.star.sdb.CommandType;
-import com.sun.star.sdb.XRowSetApproveBroadcaster;
-
-public class RowSet
-{
- private static XComponentContext xContext = null;
- private static XMultiComponentFactory xMCF = null;
- public static void main(String argv[]) throws java.lang.Exception
- {
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xMCF = xContext.getServiceManager();
- }
- catch( Exception e) {
- System.err.println("ERROR: can't get a component context from a running office ...");
- e.printStackTrace(System.out);
- System.exit(1);
- }
-
- try{
- showRowSetEvents();
- showRowSetRowCount();
- showRowSetPrivileges();
- useRowSet();
- }
- catch(com.sun.star.uno.Exception e)
- {
- System.err.println(e);
- e.printStackTrace();
- }
- System.exit(0);
- }
-
- public static void printDataSources() throws com.sun.star.uno.Exception
- {
- // create a DatabaseContext and print all DataSource names
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.DatabaseContext",
- xContext));
- String aNames [] = xNameAccess.getElementNames();
- for(int i=0;i<aNames.length;++i)
- System.out.println(aNames[i]);
- }
-
- public static void useRowSet() throws com.sun.star.uno.Exception
- {
- // first we create our RowSet object
- XRowSet xRowRes = (XRowSet)UnoRuntime.queryInterface(
- XRowSet.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.RowSet", xContext));
-
- System.out.println("RowSet created!");
- // set the properties needed to connect to a database
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xRowRes);
- xProp.setPropertyValue("DataSourceName","Bibliography");
- xProp.setPropertyValue("Command","biblio");
- xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE));
-
- xRowRes.execute();
- System.out.println("RowSet executed!");
-
-
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class,xRowRes);
- xComp.dispose();
- System.out.println("RowSet destroyed!");
- }
-
- public static void showRowSetPrivileges() throws com.sun.star.uno.Exception
- {
- // first we create our RowSet object
- XRowSet xRowRes = (XRowSet)UnoRuntime.queryInterface(
- XRowSet.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.RowSet", xContext));
-
- System.out.println("RowSet created!");
- // set the properties needed to connect to a database
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xRowRes);
- xProp.setPropertyValue("DataSourceName","Bibliography");
- xProp.setPropertyValue("Command","biblio");
- xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE));
-
- xRowRes.execute();
- System.out.println("RowSet executed!");
-
- Integer aPriv = (Integer)xProp.getPropertyValue("Privileges");
- int nPriv = aPriv.intValue();
- if( (nPriv & Privilege.SELECT) == Privilege.SELECT)
- System.out.println("SELECT");
- if( (nPriv & Privilege.INSERT) == Privilege.INSERT)
- System.out.println("INSERT");
- if( (nPriv & Privilege.UPDATE) == Privilege.UPDATE)
- System.out.println("UPDATE");
- if( (nPriv & Privilege.DELETE) == Privilege.DELETE)
- System.out.println("DELETE");
-
- // now destroy the RowSet
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class,xRowRes);
- xComp.dispose();
- System.out.println("RowSet destroyed!");
- }
-
- public static void showRowSetRowCount() throws com.sun.star.uno.Exception
- {
- // first we create our RowSet object
- XRowSet xRowRes = (XRowSet)UnoRuntime.queryInterface(
- XRowSet.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.RowSet", xContext));
-
- System.out.println("RowSet created!");
- // set the properties needed to connect to a database
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xRowRes);
- xProp.setPropertyValue("DataSourceName","Bibliography");
- xProp.setPropertyValue("Command","biblio");
- xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE));
-
- xRowRes.execute();
- System.out.println("RowSet executed!");
-
- // now look if the RowCount is already final
- System.out.println("The RowCount is final: " + xProp.getPropertyValue("IsRowCountFinal"));
-
- XResultSet xRes = (XResultSet)UnoRuntime.queryInterface(XResultSet.class,xRowRes);
- xRes.last();
-
- System.out.println("The RowCount is final: " + xProp.getPropertyValue("IsRowCountFinal"));
- System.out.println("There are " + xProp.getPropertyValue("RowCount") + " rows!");
-
- // now destroy the RowSet
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class,xRowRes);
- xComp.dispose();
- System.out.println("RowSet destroyed!");
- }
-
- public static void showRowSetEvents() throws com.sun.star.uno.Exception
- {
- // first we create our RowSet object
- XRowSet xRowRes = (XRowSet)UnoRuntime.queryInterface(
- XRowSet.class,
- xMCF.createInstanceWithContext("com.sun.star.sdb.RowSet", xContext));
-
- System.out.println("RowSet created!");
- // add our Listener
- System.out.println("Append our Listener!");
- RowSetEventListener pRow = new RowSetEventListener();
- XRowSetApproveBroadcaster xApBroad = (XRowSetApproveBroadcaster)UnoRuntime.queryInterface(XRowSetApproveBroadcaster.class,xRowRes);
- xApBroad.addRowSetApproveListener(pRow);
- xRowRes.addRowSetListener(pRow);
-
- // set the properties needed to connect to a database
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xRowRes);
- xProp.setPropertyValue("DataSourceName","Bibliography");
- xProp.setPropertyValue("Command","biblio");
- xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE));
-
- xRowRes.execute();
- System.out.println("RowSet executed!");
-
- // do some movements to check if we got all notifications
- XResultSet xRes = (XResultSet)UnoRuntime.queryInterface(XResultSet.class,xRowRes);
- System.out.println("beforeFirst");
- xRes.beforeFirst();
- // this should lead to no notifications because
- // we should stand before the first row at the beginning
- System.out.println("We stand before the first row: " + xRes.isBeforeFirst());
-
- System.out.println("next");
- xRes.next();
- System.out.println("next");
- xRes.next();
- System.out.println("last");
- xRes.last();
- System.out.println("next");
- xRes.next();
- System.out.println("We stand after the last row: " + xRes.isAfterLast());
- System.out.println("first");
- xRes.first();
- System.out.println("previous");
- xRes.previous();
- System.out.println("We stand before the first row: " + xRes.isBeforeFirst());
- System.out.println("afterLast");
- xRes.afterLast();
- System.out.println("We stand after the last row: " + xRes.isAfterLast());
-
- // now destroy the RowSet
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class,xRowRes);
- xComp.dispose();
- System.out.println("RowSet destroyed!");
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Database/RowSetEventListener.java b/odk/examples/DevelopersGuide/Database/RowSetEventListener.java
deleted file mode 100644
index aed05e53..00000000
--- a/odk/examples/DevelopersGuide/Database/RowSetEventListener.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.sdb.XRowSetApproveListener;
-import com.sun.star.sdbc.XRowSetListener;
-import com.sun.star.sdb.RowChangeEvent;
-import com.sun.star.lang.EventObject;
-
-public class RowSetEventListener implements XRowSetApproveListener,XRowSetListener
-{
- // XEventListener
- public void disposing(com.sun.star.lang.EventObject event)
- {
- System.out.println("RowSet will be destroyed!");
- }
- // XRowSetApproveBroadcaster
- public boolean approveCursorMove(EventObject event)
- {
- System.out.println("Before CursorMove!");
- return true;
- }
- public boolean approveRowChange(RowChangeEvent event)
- {
- System.out.println("Before row change!");
- return true;
- }
- public boolean approveRowSetChange(EventObject event)
- {
- System.out.println("Before RowSet change!");
- return true;
- }
-
- // XRowSetListener
- public void cursorMoved(com.sun.star.lang.EventObject event)
- {
- System.out.println("Cursor moved!");
- }
- public void rowChanged(com.sun.star.lang.EventObject event)
- {
- System.out.println("Row changed!");
- }
- public void rowSetChanged(com.sun.star.lang.EventObject event)
- {
- System.out.println("RowSet changed!");
- }
-}
diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java
deleted file mode 100644
index 92716578..00000000
--- a/odk/examples/DevelopersGuide/Database/Sales.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.io.*;
-
-// import com.sun.star.comp.helper.RegistryServiceFactory;
-// import com.sun.star.comp.servicemanager.ServiceManager;
-// import com.sun.star.lang.XMultiServiceFactory;
-// import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XComponent;
-// import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.*;
-import com.sun.star.util.Date;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.sdbc.*;
-
-public class Sales
-{
- private XConnection con;
-
- public Sales(XConnection connection )
- {
- con = connection;
- }
- // create the table sales.
- public void createSalesTable() throws com.sun.star.uno.Exception
- {
- String createTableSales = "CREATE TABLE SALES " +
- "(SALENR INTEGER NOT NULL, " +
- " COS_NR INTEGER, " +
- " SNR INTEGER, " +
- " NAME VARCHAR(50)," +
- " SALEDATE DATE," +
- " PRICE FLOAT(10), " +
- " PRIMARY KEY(SALENR)" +
- " )";
- XStatement stmt = con.createStatement();
- stmt.executeUpdate( createTableSales );
- }
-
- // drop the table sales.
- public void dropSalesTable() throws com.sun.star.uno.Exception
- {
- String createTableSalesman = "DROP TABLE SALES ";
- XStatement stmt = con.createStatement();
- stmt.executeUpdate( createTableSalesman );
- }
-
- // insert data into the table sales.
- public void insertDataIntoSales() throws com.sun.star.uno.Exception
- {
- XStatement stmt = con.createStatement();
- stmt.executeUpdate("INSERT INTO SALES " +
- "VALUES (1, '100', '1','Linux','2001-02-12',15)");
- stmt.executeUpdate("INSERT INTO SALES " +
- "VALUES (2, '101', '2','Beef','2001-10-18',15.78)");
- stmt.executeUpdate("INSERT INTO SALES " +
- "VALUES (3, '104', '4','orange juice','2001-08-09',1.5)");
- }
-
- // update the table sales with a prepared statement.
- public void updateSales() throws com.sun.star.uno.Exception
- {
- XStatement stmt = con.createStatement();
- String updateString = "UPDATE SALES " +
- "SET PRICE = 30 " +
- "WHERE SALENR = 1";
- stmt.executeUpdate(updateString);
- }
-
- // retrieve the data of the table sales.
- public void retrieveSalesData() throws com.sun.star.uno.Exception
- {
- XStatement stmt = con.createStatement();
- String query = "SELECT NAME, PRICE FROM SALES " +
- "WHERE SALENR = 1";
- XResultSet rs = stmt.executeQuery(query);
- XRow row = (XRow)UnoRuntime.queryInterface(XRow.class, rs);
- while (rs.next()) {
- String s = row.getString(1);
- float n = row.getFloat(2);
- System.out.println("The current price for " + s + " is: $" + n + ".");
- }
- }
-
- // create a scrollable resultset.
- public void retrieveSalesData2() throws com.sun.star.uno.Exception
- {
- // example for a programmatic way to do updates. This doesn't work with adabas.
- XStatement stmt = con.createStatement();
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,stmt);
-
- xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE));
- xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.UPDATABLE));
-
- XResultSet srs = stmt.executeQuery("SELECT NAME, PRICE FROM SALES");
- XRow row = (XRow)UnoRuntime.queryInterface(XRow.class,srs);
-
- srs.afterLast();
- while (srs.previous()) {
- String name = row.getString(1);
- float price = row.getFloat(2);
- System.out.println(name + " " + price);
- }
-
- srs.last();
- XRowUpdate updateRow = (XRowUpdate)UnoRuntime.queryInterface(XRowUpdate.class,srs);
- updateRow.updateFloat(2, (float)0.69);
-
- XResultSetUpdate updateRs = ( XResultSetUpdate )UnoRuntime.queryInterface(
- XResultSetUpdate.class,srs);
- updateRs.updateRow(); // this call updates the data in DBMS
-
- srs.last();
- updateRow.updateFloat(2, (float)0.99);
- updateRs.cancelRowUpdates();
- updateRow.updateFloat(2, (float)0.79);
- updateRs.updateRow();
- }
-
- // inserts a row programmatically.
- public void insertRow() throws com.sun.star.uno.Exception
- {
- // example for a programmatic way to do updates. This doesn't work with adabas.
- XStatement stmt = con.createStatement();
-// stmt.executeUpdate("INSERT INTO SALES " +
-// "VALUES (4, 102, 5, 'FTOP Darjeeling tea', '2002-01-02',150)");
-//
-// stmt = con.createStatement();
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,stmt);
- xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE));
- xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.UPDATABLE));
- XResultSet rs = stmt.executeQuery("SELECT * FROM SALES");
- XRow row = (XRow)UnoRuntime.queryInterface(XRow.class,rs);
-
- // insert a new row
- XRowUpdate updateRow = (XRowUpdate)UnoRuntime.queryInterface(XRowUpdate.class,rs);
- XResultSetUpdate updateRs = ( XResultSetUpdate )UnoRuntime. queryInterface(XResultSetUpdate.class,rs);
- updateRs.moveToInsertRow();
- updateRow.updateInt(1, 4);
- updateRow.updateInt(2, 102);
- updateRow.updateInt(3, 5);
- updateRow.updateString(4, "FTOP Darjeeling tea");
- updateRow.updateDate(5, new Date((short)1,(short)2,(short)2002));
- updateRow.updateFloat(6, 150);
- updateRs.insertRow();
- }
-
- // deletes a row programmatically.
- public void deleteRow() throws com.sun.star.uno.Exception
- {
- // example for a programmatic way to do updates. This doesn't work with adabas.
- XStatement stmt = con.createStatement();
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,stmt);
- xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE));
- xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.UPDATABLE));
- XResultSet rs = stmt.executeQuery("SELECT * FROM SALES");
- XRow row = (XRow)UnoRuntime.queryInterface(XRow.class,rs);
-
- XResultSetUpdate updateRs = ( XResultSetUpdate )UnoRuntime. queryInterface(XResultSetUpdate.class,rs);
- // move to the inserted row
- rs.absolute(4);
- updateRs.deleteRow();
- }
-
- // refresh a row
- public void refreshRow() throws com.sun.star.uno.Exception
- {
- // example for a programmatic way to do updates. This doesn't work with adabas.
- // first we need the 4 row
- insertRow();
-
- XStatement stmt = con.createStatement();
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,stmt);
- xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE));
- xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.READ_ONLY));
- XResultSet rs = stmt.executeQuery("SELECT NAME, PRICE FROM SALES");
- XRow row = (XRow)UnoRuntime.queryInterface(XRow.class, rs);
- rs.absolute(4);
- float price1 = row.getFloat(2);
-
- // modifiy the 4 row
- XRowUpdate updateRow = (XRowUpdate)UnoRuntime.queryInterface(XRowUpdate.class,rs);
- XResultSetUpdate updateRs = ( XResultSetUpdate )UnoRuntime. queryInterface(XResultSetUpdate.class,rs);
- updateRow.updateFloat(2, 150);
- updateRs.updateRow();
- // repositioning
- rs.absolute(4);
- rs.refreshRow();
- float price2 = row.getFloat(2);
- if (price2 != price1) {
- System.out.println("Prices are different.");
- }
- else
- System.out.println("Prices are equal.");
- deleteRow();
- }
-
- // displays the column names
- public void displayColumnNames() throws com.sun.star.uno.Exception
- {
- XStatement stmt = con.createStatement();
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,stmt);
- xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE));
- xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.READ_ONLY));
- XResultSet rs = stmt.executeQuery("SELECT NAME, PRICE FROM SALES");
- XResultSetMetaDataSupplier xRsMetaSup = (XResultSetMetaDataSupplier)
- UnoRuntime.queryInterface(XResultSetMetaDataSupplier.class,rs);
- XResultSetMetaData xRsMetaData = xRsMetaSup.getMetaData();
- int nColumnCount = xRsMetaData.getColumnCount();
- for(int i=1 ; i <= nColumnCount ; ++i)
- {
- System.out.println("Name: " + xRsMetaData.getColumnName(i) + " Type: " +
- xRsMetaData.getColumnType(i));
- }
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Database/SalesMan.java b/odk/examples/DevelopersGuide/Database/SalesMan.java
deleted file mode 100644
index 2e0e8709..00000000
--- a/odk/examples/DevelopersGuide/Database/SalesMan.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.io.*;
-
-// import com.sun.star.comp.helper.RegistryServiceFactory;
-// import com.sun.star.comp.servicemanager.ServiceManager;
-// import com.sun.star.lang.XMultiServiceFactory;
-// import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XComponent;
-// import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.*;
-import com.sun.star.util.Date;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.sdbc.*;
-
-public class SalesMan
-{
- private XConnection con;
-
- public SalesMan(XConnection connection )
- {
- con = connection;
- }
- // create the table salesman.
- public void createSalesManTable() throws com.sun.star.uno.Exception
- {
- String createTableSalesman = "CREATE TABLE SALESMAN " +
- "(SNR INTEGER NOT NULL, "+
- " FIRSTNAME VARCHAR(50)," +
- " LASTNAME VARCHAR(100)," +
- " STREET VARCHAR(50)," +
- " STATE VARCHAR(50)," +
- " ZIP INTEGER," +
- " BIRTHDATE DATE," +
- " PRIMARY KEY(SNR)" +
- " )";
- XStatement stmt = con.createStatement();
- stmt.executeUpdate( createTableSalesman );
- }
-
- // drop the table salesman
- public void dropSalesManTable() throws com.sun.star.uno.Exception
- {
- String createTableSalesman = "DROP TABLE SALESMAN ";
- XStatement stmt = con.createStatement();
- stmt.executeUpdate( createTableSalesman );
- }
-
- // insert data into the table salesman
- public void insertDataIntoSalesMan() throws com.sun.star.uno.Exception
- {
- XStatement stmt = con.createStatement();
- stmt.executeUpdate("INSERT INTO SALESMAN " +
- "VALUES (1, 'Joseph', 'Smith','Bond Street','CA',95460,"
- + "'1946-07-02')");
- stmt.executeUpdate("INSERT INTO SALESMAN " +
- "VALUES (2, 'Frank', 'Jones','Lake Silver','CA',95460,"
- + "'1963-12-24')");
- stmt.executeUpdate("INSERT INTO SALESMAN " +
- "VALUES (3, 'Jane', 'Esperansa','23 Hollywood drive','CA',95460,"
- + "'1972-04-01')");
- stmt.executeUpdate("INSERT INTO SALESMAN " +
- "VALUES (4, 'George', 'Flint','12 Washington street','CA',95460,"
- + "'1953-02-13')");
- stmt.executeUpdate("INSERT INTO SALESMAN " +
- "VALUES (5, 'Bob', 'Meyers','2 Moon way','CA',95460,"
- + "'1949-09-07')");
- }
-
- // update the table sales man with a prepared statement.
- public void updateSalesMan() throws com.sun.star.uno.Exception
- {
- XPreparedStatement updateStreet = con.prepareStatement(
- "UPDATE SALESMAN SET STREET = ? WHERE SNR = ?");
- XParameters setPara = (XParameters)UnoRuntime.queryInterface(XParameters.class,updateStreet);
- setPara.setString(1, "34 Main Road");
- setPara.setInt(2, 1);
- updateStreet.executeUpdate();
-
- setPara.setString(1, "Marryland");
- setPara.setInt(2, 4);
- updateStreet.executeUpdate();
- // changes STREET column of salesman George to Marryland
- setPara.setString(1, "Michigan road");
- updateStreet.executeUpdate();
- // changes again STREET column of salesman George to
- // Michigan road
- // parameter 2 stayed 4, and the first parameter was reset
- // to "Michigan road")
-
- setPara.setString(1, "Bond Street");
- setPara.setInt(2, 3);
- int n = updateStreet.executeUpdate();
- System.out.println("executeUpdate returns: " + n);
- // n = 1 because one row had a change in it
- }
-
- // retrieve the data of the table salesman
- public void retrieveSalesManData() throws com.sun.star.uno.Exception
- {
- XStatement stmt = con.createStatement();
- XResultSet rs = stmt.executeQuery("SELECT FIRSTNAME, LASTNAME, BIRTHDATE FROM SALESMAN");
- XRow row = (XRow)UnoRuntime.queryInterface(XRow.class,rs);
- while ( rs != null && rs.next() ) {
- String fn = row.getString( 1 );
- String ln = row.getString( 2 );
- Date dt = row.getDate( 3 );
- System.out.println(fn + " " + ln + " " + dt.Month + "/" + dt.Day + "/" + dt.Year);
- }
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Database/makefile.mk b/odk/examples/DevelopersGuide/Database/makefile.mk
deleted file mode 100644
index 35fed3e3..00000000
--- a/odk/examples/DevelopersGuide/Database/makefile.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-DATABASE_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/CodeSamples.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/OpenQuery.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/RowSet.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/RowSetEventListener.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/Sales.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/SalesMan.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/sdbcx.java
-
-DATABASEDRIVERSKELETON_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/How_to_write_my_own_driver.txt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/OSubComponent.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/OTypeInfo.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/propertyids.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/propertyids.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SConnection.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SConnection.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SDatabaseMetaData.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SDatabaseMetaData.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SDriver.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SDriver.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/skeleton.xml \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SPreparedStatement.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SPreparedStatement.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SResultSet.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SResultSet.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SResultSetMetaData.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SResultSetMetaData.hxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SServices.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SStatement.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Database$/DriverSkeleton$/SStatement.hxx
-
-DIR_FILE_LIST= \
- $(DATABASE_FILES) \
- $(DATABASEDRIVERSKELETON_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_database_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_database.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java
deleted file mode 100644
index e446ed5d..00000000
--- a/odk/examples/DevelopersGuide/Database/sdbcx.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.io.*;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.uno.*;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.sdbc.*;
-import com.sun.star.sdbcx.*;
-import com.sun.star.lang.XMultiServiceFactory;
-
-public class sdbcx
-{
- private XMultiServiceFactory xORB;
- private static XConnection con;
- private XTablesSupplier xTabSup;
-
- public static XMultiServiceFactory rSmgr;
- public static void main(String argv[]) throws java.lang.Exception
- {
- try{
- rSmgr = connect("socket,host=localhost,port=8100");
- sdbcx test = new sdbcx(rSmgr);
- test.createConnection();
- test.displayTableProperties();
- // now we dispose the connection to close it
- XComponent xComponent = (XComponent)UnoRuntime.queryInterface(XComponent.class,con);
- if(xComponent != null)
- {
- xComponent.dispose();
- System.out.println("Connection disposed!");
- }
- }
- catch(com.sun.star.uno.Exception e)
- {
- System.out.println(e);
- e.printStackTrace();
- }
- System.exit(0);
- }
- public static XMultiServiceFactory connect( String connectStr )
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException, java.lang.Exception
- {
- // initial serviceManager
- XMultiServiceFactory xLocalServiceManager =
- com.sun.star.comp.helper.Bootstrap.createSimpleServiceManager();
-
- // create a connector, so that it can contact the office
- Object xUrlResolver = xLocalServiceManager.createInstance( "com.sun.star.bridge.UnoUrlResolver" );
- XUnoUrlResolver urlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface(
- XUnoUrlResolver.class, xUrlResolver );
-
- Object rInitialObject = urlResolver.resolve( "uno:" + connectStr + ";urp;StarOffice.NamingService" );
-
- XNamingService rName = (XNamingService)UnoRuntime.queryInterface(
- XNamingService.class, rInitialObject );
-
- XMultiServiceFactory xMSF = null;
- if( rName != null ) {
- System.err.println( "got the remote naming service !" );
- Object rXsmgr = rName.getRegisteredObject("StarOffice.ServiceManager" );
-
- xMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface( XMultiServiceFactory.class, rXsmgr );
- }
-
- return ( xMSF );
- }
-
-
- public sdbcx(XMultiServiceFactory rSmgr )
- {
- xORB = rSmgr;
- }
-
- public void createConnection() throws com.sun.star.uno.Exception
- {
- // create the Driver with the implementation name
- Object aDriver = xORB.createInstance("com.sun.star.comp.sdbcx.adabas.ODriver");
- // query for the interface
- com.sun.star.sdbc.XDriver xDriver;
- xDriver = (XDriver)UnoRuntime.queryInterface(XDriver.class,aDriver);
- if(xDriver != null)
- {
- // first create the needed url
- String adabasURL = "sdbc:adabas::MYDB0";
- // second create the necessary properties
- com.sun.star.beans.PropertyValue [] adabasProps = new com.sun.star.beans.PropertyValue[]
- {
- new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE)
- };
- //
-
- // now create a connection to adabas
- con = xDriver.connect(adabasURL,adabasProps);
- if(con != null)
- {
- System.out.println("Connection could be created!");
- // we the XDatabaseDefinitionSupplier interface from the driver to get the XTablesSupplier
- XDataDefinitionSupplier xDDSup = (XDataDefinitionSupplier)UnoRuntime.queryInterface(
- XDataDefinitionSupplier.class,xDriver);
- if(xDDSup != null)
- {
- xTabSup = xDDSup.getDataDefinitionByConnection(con);
- if(xTabSup != null)
- {
- XNameAccess xTables = xTabSup.getTables();
- // now print all table names
- System.out.println("Tables available:");
- String [] aTableNames = xTables.getElementNames();
- for ( int i =0; i<= aTableNames.length-1; i++)
- System.out.println(aTableNames[i]);
- }
- }
- else
- System.out.println("The driver is not a SDBCX capable!");
- }
- else
- System.out.println("Connection could not be created!");
- }
- }
-
- public void displayTableProperties() throws com.sun.star.uno.Exception
- {
- XNameAccess xTables = xTabSup.getTables();
- String [] aTableNames = xTables.getElementNames();
- if(0 != aTableNames.length)
- {
- Object table = xTables.getByName(aTableNames[0]);
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,table);
- System.out.println("Name: " + xProp.getPropertyValue("Name"));
- System.out.println("CatalogName: " + xProp.getPropertyValue("CatalogName"));
- System.out.println("SchemaName: " + xProp.getPropertyValue("SchemaName"));
- System.out.println("Description: " + xProp.getPropertyValue("Description"));
- // the following property is optional so we first must check if it exists
- if(xProp.getPropertySetInfo().hasPropertyByName("Type"))
- System.out.println("Type: " + xProp.getPropertyValue("Type"));
- }
- }
-
- //###########################################################
- // 15. example
- // print all columns of a XColumnsSupplier
- //###########################################################
- public static void printColumns(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printColumns");
- // the table must be at least support a XColumnsSupplier interface
- System.out.println("--- Columns ---");
- XNameAccess xColumns = xColumnsSup.getColumns();
- String [] aColumnNames = xColumns.getElementNames();
- for ( int i =0; i<= aColumnNames.length-1; i++)
- System.out.println(" " + aColumnNames[i]);
- }
- //###########################################################
- // 16. example
- // print all keys inclusive the columns of a key
- //###########################################################
- public static void printKeys(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printKeys");
- XKeysSupplier xKeysSup = (XKeysSupplier)UnoRuntime.queryInterface(XKeysSupplier.class,xColumnsSup);
- if(xKeysSup != null)
- {
- System.out.println("--- Keys ---");
- XIndexAccess xKeys = xKeysSup.getKeys();
- for ( int i =0; i < xKeys.getCount(); i++)
- {
- Object key = xKeys.getByIndex(i);
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,key);
- System.out.println(" " + xProp.getPropertyValue("Name"));
- XColumnsSupplier xKeyColumnsSup = ( XColumnsSupplier ) UnoRuntime.queryInterface(XColumnsSupplier.class,xProp);
- printColumns(xKeyColumnsSup);
- }
- }
- }
- //###########################################################
- // 17. example
- // print all keys inclusive the columns of a key
- //###########################################################
- public static void printIndexes(XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printIndexes");
- XIndexesSupplier xIndexesSup = (XIndexesSupplier)UnoRuntime.queryInterface(XIndexesSupplier.class,xColumnsSup);
- if(xIndexesSup != null)
- {
- System.out.println("--- Indexes ---");
- XNameAccess xIndexs = xIndexesSup.getIndexes();
- String [] aIndexNames = xIndexs.getElementNames();
- for ( int i =0; i<= aIndexNames.length-1; i++)
- {
- System.out.println(" " + aIndexNames[i]);
- Object index = xIndexs.getByName(aIndexNames[i]);
- XColumnsSupplier xIndexColumnsSup = (XColumnsSupplier)UnoRuntime.queryInterface(XColumnsSupplier.class,index);
- printColumns(xIndexColumnsSup);
- }
- }
- }
-
- //###########################################################
- // 18. example
- // column properties
- //###########################################################
- public static void printColumnProperties(Object column) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printColumnProperties");
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,column);
- System.out.println("Name: " + xProp.getPropertyValue("Name"));
- System.out.println("Type: " + xProp.getPropertyValue("Type"));
- System.out.println("TypeName: " + xProp.getPropertyValue("TypeName"));
- System.out.println("Precision: " + xProp.getPropertyValue("Precision"));
- System.out.println("Scale: " + xProp.getPropertyValue("Scale"));
- System.out.println("IsNullable: " + xProp.getPropertyValue("IsNullable"));
- System.out.println("IsAutoIncrement: " + xProp.getPropertyValue("IsAutoIncrement"));
- System.out.println("IsCurrency: " + xProp.getPropertyValue("IsCurrency"));
- // the following property is optional so we first must check if it exists
- if(xProp.getPropertySetInfo().hasPropertyByName("IsRowVersion"))
- System.out.println("IsRowVersion: " + xProp.getPropertyValue("IsRowVersion"));
- if(xProp.getPropertySetInfo().hasPropertyByName("Description"))
- System.out.println("Description: " + xProp.getPropertyValue("Description"));
- if(xProp.getPropertySetInfo().hasPropertyByName("DefaultValue"))
- System.out.println("DefaultValue: " + xProp.getPropertyValue("DefaultValue"));
- }
-
- //###########################################################
- // 19. example
- // index properties
- //###########################################################
- public static void printIndexProperties(Object index) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printIndexProperties");
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,index);
- System.out.println("Name: " + xProp.getPropertyValue("Name"));
- System.out.println("Catalog: " + xProp.getPropertyValue("Catalog"));
- System.out.println("IsUnique: " + xProp.getPropertyValue("IsUnique"));
- System.out.println("IsPrimaryKeyIndex: " + xProp.getPropertyValue("IsPrimaryKeyIndex"));
- System.out.println("IsClustered: " + xProp.getPropertyValue("IsClustered"));
- }
-
- //###########################################################
- // 20. example
- // key properties
- //###########################################################
- public static void printKeyProperties(Object key) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printKeyProperties");
- XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,key);
- System.out.println("Name: " + xProp.getPropertyValue("Name"));
- System.out.println("Type: " + xProp.getPropertyValue("Type"));
- System.out.println("ReferencedTable: " + xProp.getPropertyValue("ReferencedTable"));
- System.out.println("UpdateRule: " + xProp.getPropertyValue("UpdateRule"));
- System.out.println("DeleteRule: " + xProp.getPropertyValue("DeleteRule"));
- }
-
- //###########################################################
- // 21. example
- // print all groups and the users with their privileges who belong to this group
- //###########################################################
- public static void printGroups(XTablesSupplier xTabSup) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example printGroups");
- XGroupsSupplier xGroupsSup = (XGroupsSupplier)UnoRuntime.queryInterface(XGroupsSupplier.class,xTabSup);
- if(xGroupsSup != null)
- {
- // the table must be at least support a XColumnsSupplier interface
- System.out.println("--- Groups ---");
- XNameAccess xGroups = xGroupsSup.getGroups();
- String [] aGroupNames = xGroups.getElementNames();
- for ( int i =0; i < aGroupNames.length; i++)
- {
- System.out.println(" " + aGroupNames[i]);
- XUsersSupplier xUsersSup = (XUsersSupplier)UnoRuntime.queryInterface(XUsersSupplier.class,xGroups.getByName(aGroupNames[i]));
- if(xUsersSup != null)
- {
- XAuthorizable xAuth = (XAuthorizable)UnoRuntime.queryInterface(XAuthorizable.class,xUsersSup);
- // the table must be at least support a XColumnsSupplier interface
- System.out.println("\t--- Users ---");
- XNameAccess xUsers = xUsersSup.getUsers();
- String [] aUserNames = xUsers.getElementNames();
- for ( int j =0; j < aUserNames.length; j++)
- {
- System.out.println("\t " + aUserNames[j] + " Privileges: " + xAuth.getPrivileges(aUserNames[j],PrivilegeObject.TABLE));
- }
- }
- }
- }
- }
-
- //###########################################################
- // 22. example
- // create the table salesmen
- //###########################################################
- public static void createTableSalesMen(XNameAccess xTables) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example createTableSalesMen");
- XDataDescriptorFactory xTabFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(XDataDescriptorFactory.class,xTables);
- if(xTabFac != null)
- {
- // create the new table
- XPropertySet xTable = xTabFac.createDataDescriptor();
- // set the name of the new table
- xTable.setPropertyValue("Name","SALESMAN");
- // append the columns
- XColumnsSupplier xColumSup = (XColumnsSupplier)UnoRuntime.queryInterface(XColumnsSupplier.class,xTable);
- XDataDescriptorFactory xColFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(XDataDescriptorFactory.class,xColumSup.getColumns());
- XAppend xAppend = (XAppend)UnoRuntime.queryInterface(XAppend.class,xColFac);
- // we only need one descriptor
- XPropertySet xCol = xColFac.createDataDescriptor();
- // create first column and append
- xCol.setPropertyValue("Name","SNR");
- xCol.setPropertyValue("Type",new Integer(DataType.INTEGER));
- xCol.setPropertyValue("IsNullable",new Integer(ColumnValue.NO_NULLS));
- xAppend.appendByDescriptor(xCol);
- // 2nd only set the properties which differs
- xCol.setPropertyValue("Name","FIRSTNAME");
- xCol.setPropertyValue("Type",new Integer(DataType.VARCHAR));
- xCol.setPropertyValue("IsNullable",new Integer(ColumnValue.NULLABLE));
- xCol.setPropertyValue("Precision",new Integer(50));
- xAppend.appendByDescriptor(xCol);
- // 3nd only set the properties which differs
- xCol.setPropertyValue("Name","LASTNAME");
- xCol.setPropertyValue("Precision",new Integer(100));
- xAppend.appendByDescriptor(xCol);
- // 4nd only set the properties which differs
- xCol.setPropertyValue("Name","STREET");
- xCol.setPropertyValue("Precision",new Integer(50));
- xAppend.appendByDescriptor(xCol);
- // 5nd only set the properties which differs
- xCol.setPropertyValue("Name","STATE");
- xAppend.appendByDescriptor(xCol);
- // 6nd only set the properties which differs
- xCol.setPropertyValue("Name","ZIP");
- xCol.setPropertyValue("Type",new Integer(DataType.INTEGER));
- xCol.setPropertyValue("Precision",new Integer(10)); // default value integer
- xAppend.appendByDescriptor(xCol);
- // 7nd only set the properties which differs
- xCol.setPropertyValue("Name","BIRTHDATE");
- xCol.setPropertyValue("Type",new Integer(DataType.DATE));
- xCol.setPropertyValue("Precision",new Integer(10)); // default value integer
- xAppend.appendByDescriptor(xCol);
- // now we create the primary key
- XKeysSupplier xKeySup = (XKeysSupplier)UnoRuntime.queryInterface(XKeysSupplier.class,xTable);
- XDataDescriptorFactory xKeyFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(XDataDescriptorFactory.class,xKeySup.getKeys());
- XAppend xKeyAppend = (XAppend)UnoRuntime.queryInterface(XAppend.class,xKeyFac);
- XPropertySet xKey = xKeyFac.createDataDescriptor();
- xKey.setPropertyValue("Type",new Integer(KeyType.PRIMARY));
- // now append the columns to key
- XColumnsSupplier xKeyColumSup = (XColumnsSupplier)UnoRuntime.queryInterface(XColumnsSupplier.class,xKey);
- XDataDescriptorFactory xKeyColFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(XDataDescriptorFactory.class,xKeyColumSup.getColumns());
- XAppend xKeyColAppend = (XAppend)UnoRuntime.queryInterface(XAppend.class,xKeyColFac);
- // we only need one descriptor
- XPropertySet xKeyCol = xKeyColFac.createDataDescriptor();
- xKeyCol.setPropertyValue("Name","SNR");
- // append the key column
- xKeyColAppend.appendByDescriptor(xKeyCol);
- // apend the key
- xKeyAppend.appendByDescriptor(xKey);
- // the last step is to append the new table to the tables collection
- XAppend xTableAppend = (XAppend)UnoRuntime.queryInterface(XAppend.class,xTabFac);
- xTableAppend.appendByDescriptor(xTable);
- }
- }
-
- //###########################################################
- // 23. example
- // create a user
- //###########################################################
- public static void createUser(XNameAccess xUsers) throws com.sun.star.uno.Exception,SQLException
- {
- System.out.println("Example createUser");
- XDataDescriptorFactory xUserFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(XDataDescriptorFactory.class,xUsers);
- if(xUserFac != null)
- {
- // create the new table
- XPropertySet xUser = xUserFac.createDataDescriptor();
- // set the name of the new table
- xUser.setPropertyValue("Name","BOSS");
- xUser.setPropertyValue("Password","BOSSWIFENAME");
- XAppend xAppend = (XAppend)UnoRuntime.queryInterface(XAppend.class,xUserFac);
- xAppend.appendByDescriptor(xUser);
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
deleted file mode 100644
index 12ae3f20..00000000
--- a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-
-
-
-// __________ Implementation __________
-
-/** ChangeOrderDemo
- @author Sven Jacobi
- */
-
-public class ChangeOrderDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/sdraw", "_blank", 0, pPropValues );
-
- // create two rectangles
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
-
- XShape xShape1 = ShapeHelper.createShape( xDrawDoc,
- new Point( 1000, 1000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.RectangleShape" );
-
- XShape xShape2 = ShapeHelper.createShape( xDrawDoc,
- new Point( 2000, 2000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.EllipseShape" );
-
- xShapes.add( xShape1 );
- ShapeHelper.addPortion( xShape1, " this shape was inserted first", false );
- ShapeHelper.addPortion( xShape1, "by changing the ZOrder it lie now on top", true );
- xShapes.add( xShape2 );
-
- XPropertySet xPropSet1 = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape1 );
- XPropertySet xPropSet2 = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape2 );
-
- int nOrderOfShape1 = ((Integer)xPropSet1.getPropertyValue( "ZOrder" )).intValue();
- int nOrderOfShape2 = ((Integer)xPropSet2.getPropertyValue( "ZOrder" )).intValue();
-
- xPropSet1.setPropertyValue( "ZOrder", new Integer( nOrderOfShape2 ) );
- xPropSet2.setPropertyValue( "ZOrder", new Integer( nOrderOfShape1 ) );
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java b/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
deleted file mode 100644
index 3a6bfee2..00000000
--- a/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.XControlModel;
-
-import com.sun.star.beans.PropertyValue;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XControlShape;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.view.XSelectionSupplier;
-
-
-// __________ Implementation __________
-
-/** ControlAndSelectDemo
- @author Sven Jacobi
-
- A (GroupBox) ControlShape will be created.
- Finally the ControlShape will be inserted into a selection.
-*/
-
-public class ControlAndSelectDemo
-{
- public static void main( String args[] )
- {
- XComponent xComponent = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xComponent = Helper.createDocument( xOfficeContext,
- "private:factory/sdraw", "_blank", 0, pPropValues );
-
- XMultiServiceFactory xFactory =
- (XMultiServiceFactory )UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xComponent );
-
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface(
- XDrawPage.class, xDrawPages.getByIndex( 0 ));
- XShapes xShapes = (XShapes)UnoRuntime.queryInterface(XShapes.class,
- xDrawPage );
-
-
- // create and insert the ControlShape
- Object xObj = xFactory.createInstance(
- "com.sun.star.drawing.ControlShape" );
- XShape xShape = (XShape)UnoRuntime.queryInterface( XShape.class, xObj );
- xShape.setPosition( new Point( 1000, 1000 ) );
- xShape.setSize( new Size( 2000, 2000 ) );
- xShapes.add( xShape );
-
- // create and set the control
- XControlModel xControlModel = (XControlModel)UnoRuntime.queryInterface(
- XControlModel.class,
- xFactory.createInstance( "com.sun.star.form.component.GroupBox" ) );
- XControlShape xControlShape = (XControlShape)UnoRuntime.queryInterface(
- XControlShape.class, xShape );
- xControlShape.setControl( xControlModel );
-
-
- // the following code will demonstrate how to
- // make a selection that contains our new created ControlShape
- XModel xModel = (XModel)UnoRuntime.queryInterface( XModel.class,
- xComponent );
- XController xController = xModel.getCurrentController();
- XSelectionSupplier xSelectionSupplier =(XSelectionSupplier)
- UnoRuntime.queryInterface( XSelectionSupplier.class, xController );
- // take care to use the global service factory only and not the one
- // that is provided by the component if you create the ShapeColletion
- XShapes xSelection = (XShapes)UnoRuntime.queryInterface( XShapes.class,
- xOfficeContext.getServiceManager().createInstanceWithContext(
- "com.sun.star.drawing.ShapeCollection", xOfficeContext ) );
- xSelection.add( xShape );
- xSelectionSupplier.select( xSelection );
- }
- catch( java.lang.Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java b/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java
deleted file mode 100644
index 46020dfa..00000000
--- a/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XNamed;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.container.XIndexContainer;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-
-import com.sun.star.presentation.XPresentation;
-import com.sun.star.presentation.XPresentationSupplier;
-import com.sun.star.presentation.XCustomPresentationSupplier;
-
-
-// __________ Implementation __________
-
-/** presentation demo
- @author Sven Jacobi
- */
-
-// This demo will demonstrate how to create a CustomShow
-
-// The first parameter describes the connection that is to use. If there is no parameter
-// "uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager" is used.
-
-
-public class CustomShowDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/simpress", "_blank", 0, pPropValues );
-
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xDrawDoc );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
-
- // take care that this document has ten pages
- while ( xDrawPages.getCount() < 10 )
- xDrawPages.insertNewByIndex( 0 );
-
- // assign a name to each page and also insert a text object including the name of the page
- String aNameArray[] = { "Introduction", "page one", "page two", "page three", "page four",
- "page five", "page six", "page seven", "page eight", "page nine" };
- int i;
- for ( i = 0; i < 10; i++ )
- {
- XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface(
- XDrawPage.class, xDrawPages.getByIndex( i ));
- XNamed xPageName = (XNamed)UnoRuntime.queryInterface(
- XNamed.class, xDrawPage );
- xPageName.setName( aNameArray[ i ] );
-
- // now we will create and insert the text object
- XShape xTextObj = ShapeHelper.createShape( xDrawDoc, new Point( 10000, 9000 ),
- new Size( 10000, 5000 ),
- "com.sun.star.drawing.TextShape" );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xDrawPage );
- xShapes.add( xTextObj );
- ShapeHelper.addPortion( xTextObj, aNameArray[ i ], true );
- }
-
- /* create two custom shows, one will play slide 6 to 10 and is named "ShortVersion"
- the other one will play slide 2 til 10 and is named "LongVersion" */
- XCustomPresentationSupplier xCustPresSupplier = (XCustomPresentationSupplier)
- UnoRuntime.queryInterface( XCustomPresentationSupplier.class, xDrawDoc );
-
- /* the following container is a container for further container
- which concludes the list of pages that are to play within a custom show */
- XNameContainer xNameContainer = xCustPresSupplier.getCustomPresentations();
- XSingleServiceFactory xFactory = (XSingleServiceFactory)
- UnoRuntime.queryInterface( XSingleServiceFactory.class, xNameContainer );
-
- Object xObj;
- XIndexContainer xContainer;
-
- /* instanciate an IndexContainer that will take
- a list of draw pages for the first custom show */
- xObj = xFactory.createInstance();
- xContainer = (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, xObj );
- for ( i = 5; i < 10; i++ )
- xContainer.insertByIndex( xContainer.getCount(), xDrawPages.getByIndex( i ) );
- xNameContainer.insertByName( "ShortVersion", xContainer );
-
- /* instanciate an IndexContainer that will take
- a list of draw page for the second custom show */
- xObj = xFactory.createInstance();
- xContainer = (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, xObj );
- for ( i = 1; i < 10; i++ )
- xContainer.insertByIndex( xContainer.getCount(), xDrawPages.getByIndex( i ) );
- xNameContainer.insertByName( "LongVersion", xContainer );
-
- /* which custom show is to use
- can been set in the presentation settings */
-
- XPresentationSupplier xPresSupplier = (XPresentationSupplier)
- UnoRuntime.queryInterface( XPresentationSupplier.class, xDrawDoc );
- XPresentation xPresentation = xPresSupplier.getPresentation();
- XPropertySet xPresPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xPresentation );
- xPresPropSet.setPropertyValue( "CustomShow", "ShortVersion" );
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java b/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java
deleted file mode 100644
index 1b806d78..00000000
--- a/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-
-import com.sun.star.container.XIndexAccess;
-
-import com.sun.star.document.XViewDataSupplier;
-
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-
-
-// __________ Implementation __________
-
-/** text demo
- @author Sven Jacobi
- */
-
-public class DrawViewDemo
-{
- public static void main( String args[] )
- {
- if ( args.length < 1 )
- {
- System.out.println( "usage: DrawViewDemo SourceURL" );
- System.exit(1);
- }
-
- XComponent xComponent = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- java.io.File sourceFile = new java.io.File(args[0]);
- StringBuffer sUrl = new StringBuffer("file:///");
- sUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- xComponent = Helper.createDocument( xOfficeContext,
- sUrl.toString(), "_blank", 0,
- pPropValues );
- XModel xModel =
- (XModel)UnoRuntime.queryInterface(
- XModel.class, xComponent );
-
-
- // print all available properties of first view
- System.out.println("*** print all available properties of first view");
- XViewDataSupplier xViewDataSupplier =
- (XViewDataSupplier)UnoRuntime.queryInterface(
- XViewDataSupplier.class, xModel );
- XIndexAccess xIndexAccess = xViewDataSupplier.getViewData();
- if ( xIndexAccess.getCount() != 0 )
- {
- PropertyValue[] aPropSeq = (PropertyValue[])
- xIndexAccess.getByIndex( 0 );
-
- for( int i = 0; i < aPropSeq.length; i++ )
- {
- System.out.println( aPropSeq[ i ].Name + " = " +
- aPropSeq[ i ].Value );
- }
- }
-
-
- // print all properties that are supported by the controller
- // and change into masterpage mode
- System.out.println("*** print all properties that are supported by the controller");
- XController xController = xModel.getCurrentController();
- XPropertySet xPropSet =
- (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xController );
- XPropertySetInfo xPropSetInfo = xPropSet.getPropertySetInfo();
- Property[] aPropSeq = xPropSetInfo.getProperties();
- for( int i = 0; i < aPropSeq.length; i++ )
- {
- System.out.println( aPropSeq[ i ].Name );
- }
- System.out.println("*** change into masterpage mode");
- xPropSet.setPropertyValue( "IsMasterPageMode", new Boolean( true ) );
-
- }
- catch( Exception ex )
- {
- System.out.println( ex.getMessage() );
- ex.printStackTrace(System.out);
- }
-
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java b/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java
deleted file mode 100644
index 6d34da14..00000000
--- a/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XNamed;
-
-import com.sun.star.drawing.PolygonFlags;
-import com.sun.star.drawing.PolyPolygonBezierCoords;
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XShapeGrouper;
-import com.sun.star.drawing.XDrawPage;
-
-import java.util.Random;
-
-
-// __________ Implementation __________
-
-/** drawing demo
- @author Sven Jacobi
- */
-
-// This drawing demo will create/load a document, and show how to
-// handle pages and shapes using the Office API,
-
-// Calling this demo two parameter can be used. The first parameter
-// describes if a document is to create or load: "draw" creates a
-// draw document, "impress" creates an impress document, any other
-// parameter is interpreted as URL and loads the corresponding
-// document. ( example for a URL is: "file:///c:/test.odp" )
-// The second parameter is the connection that is to use. If no parameter
-// is given a standard impress document is created by using following
-// connection: "uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager";
-
-public class DrawingDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- String sURL;
- if ( args.length == 0 )
- sURL = "impress";
- else
- sURL = args[ 0 ];
-
- if ( sURL.equals( "draw" ) )
- sURL = "private:factory/sdraw";
- else if ( sURL.equals( "impress" ) )
- sURL = "private:factory/simpress";
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- sURL, "_blank", 0, pPropValues );
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- System.exit( 0 );
- }
-
-
- Demo_PageCreation( xDrawDoc, 10 );
- Demo_PageNaming( xDrawDoc, "this page is called: LastPage" );
- Demo_ShapeCreation( xDrawDoc );
- Demo_PolyPolygonBezier( xDrawDoc );
- Demo_Group1( xDrawDoc );
- Demo_Group2( xDrawDoc );
- System.exit( 0 );
- }
-
- // This method appends draw pages to the document, so that a
- // minimum of n draw pages will be available.
- // For each second draw page also a new master page is created.
- public static void Demo_PageCreation( XComponent xDrawDoc, int n )
- {
- try
- {
- // If the document has less than n draw pages, append them,
- // a minimum of n draw pages will be available
- int i, nDrawPages;
- for ( nDrawPages = PageHelper.getDrawPageCount( xDrawDoc );
- nDrawPages < n; nDrawPages++ )
- PageHelper.insertNewDrawPageByIndex( xDrawDoc, nDrawPages );
- // Create a master page for each second drawpage
- int nMasterPages;
- for ( nMasterPages = PageHelper.getMasterPageCount( xDrawDoc );
- nMasterPages < ( ( nDrawPages + 1 ) / 2 ); nMasterPages++ )
- PageHelper.insertNewMasterPageByIndex( xDrawDoc, nMasterPages );
-
- // Now connect master page 1 to draw page 1 and 2,
- // master page 2 to draw page 3 and 4 and so on.
- for ( i = 0; i < nDrawPages; i++ )
- {
- XDrawPage xDrawPage = PageHelper.getDrawPageByIndex( xDrawDoc, i );
- XDrawPage xMasterPage = PageHelper.getMasterPageByIndex(
- xDrawDoc, i / 2 );
- PageHelper.setMasterPage( xDrawPage, xMasterPage );
- }
- }
- catch( Exception ex )
- {
- System.out.println("Demo_PageCreation: I have a page creation problem");
- }
- }
-
- // this method shows how to name a page, this is exemplary
- // be done for the last draw page
- public static void Demo_PageNaming(
- XComponent xDrawDoc, String sLastPageName )
- {
- try
- {
- XDrawPage xLastPage = PageHelper.getDrawPageByIndex( xDrawDoc,
- PageHelper.getDrawPageCount( xDrawDoc ) - 1 );
-
- // each drawpage is supporting an XNamed interface
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface(
- XNamed.class, xLastPage );
-
- // beware, the page must have an unique name
- xNamed.setName( sLastPageName );
- }
- catch( Exception ex )
- {
- System.out.println( "Demo_PageNaming: can't set page name" );
- }
- }
-
- // This method will add one rectangle shape into the lower left quarter of
- // every page that is available,
- public static void Demo_ShapeCreation( XComponent xDrawDoc )
- {
- try
- {
- boolean bIsImpressDocument = PageHelper.isImpressDocument( xDrawDoc );
-
- int nDrawingPages = PageHelper.getDrawPageCount( xDrawDoc );
- int nMasterPages = PageHelper.getMasterPageCount( xDrawDoc );
- int nGlobalPageCount = nDrawingPages + nMasterPages;
-
- if ( bIsImpressDocument )
- {
- // in impress each draw page also has a notes page
- nGlobalPageCount += nDrawingPages;
- // for each drawing master is also a notes master available
- nGlobalPageCount += nMasterPages;
- // one handout is existing
- nGlobalPageCount += 1;
- }
-
- // create and fill a container with all draw pages
- XDrawPage[] pPages = new XDrawPage[ nGlobalPageCount ];
- int i, nCurrentPageIndex = 0;
-
- // insert handout page
- if ( bIsImpressDocument )
- pPages[ nCurrentPageIndex++ ] = PageHelper.getHandoutMasterPage(
- xDrawDoc );
-
- // inserting all master pages
- for( i = 0; i < nMasterPages; i++ )
- {
- XDrawPage xMasterPage = PageHelper.getMasterPageByIndex(
- xDrawDoc, i );
- pPages[ nCurrentPageIndex++ ] = xMasterPage;
-
- // if the document is an impress, get the corresponding notes
- // master page
- if ( bIsImpressDocument )
- pPages[ nCurrentPageIndex++ ] = PageHelper.getNotesPage(
- xMasterPage );
- }
- for ( i = 0; i < nDrawingPages; i++ )
- {
- XDrawPage xDrawPage = PageHelper.getDrawPageByIndex( xDrawDoc, i );
- pPages[ nCurrentPageIndex++ ] = xDrawPage;
-
- // if the document is an impress, get the corresponding notes page
- if ( bIsImpressDocument )
- pPages[ nCurrentPageIndex++ ] = PageHelper.getNotesPage(
- xDrawPage );
- }
-
- // Now a complete list of pages is available in pPages.
- // The following code will insert a rectangle into each page.
- for ( i = 0; i < nGlobalPageCount; i++ )
- {
- Size aPageSize = PageHelper.getPageSize( pPages[ i ] );
- int nHalfWidth = aPageSize.Width / 2;
- int nHalfHeight = aPageSize.Height / 2;
-
- Random aRndGen = new Random();
- int nRndObjWidth = aRndGen.nextInt( nHalfWidth );
- int nRndObjHeight = aRndGen.nextInt( nHalfHeight );
-
- int nRndObjPosX = aRndGen.nextInt( nHalfWidth - nRndObjWidth );
- int nRndObjPosY = aRndGen.nextInt( nHalfHeight - nRndObjHeight )
- + nHalfHeight;
-
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, pPages[ i ] );
- ShapeHelper.createAndInsertShape( xDrawDoc, xShapes,
- new Point( nRndObjPosX, nRndObjPosY ),
- new Size( nRndObjWidth, nRndObjHeight ),
- "com.sun.star.drawing.RectangleShape" );
- }
- }
- catch( Exception ex )
- {
- System.out.println( "Demo_ShapeCreation:" + ex );
- }
- }
-
- // This method will show how to create a PolyPolygonBezier that lies is in the
- // topleft quarter of the page and positioned at the back
- public static void Demo_PolyPolygonBezier( XComponent xDrawDoc )
- {
- try
- {
- XShape xPolyPolygonBezier = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ),
- new Size( 0, 0 ),
- "com.sun.star.drawing.ClosedBezierShape" );
-
- // the fact that the shape must have been added to the page before
- // it is possible to apply changes to the PropertySet, it is a good
- // proceeding to add the shape as soon as possible
- XDrawPage xDrawPage;
- // if possible insert our new shape in the master page
- if ( PageHelper.isImpressDocument( xDrawDoc ) )
- xDrawPage = PageHelper.getMasterPageByIndex( xDrawDoc, 0 );
- else
- xDrawPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xDrawPage );
- xShapes.add( xPolyPolygonBezier );
-
- XPropertySet xShapeProperties = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xPolyPolygonBezier );
-
- // get pagesize
- XPropertySet xPageProperties = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xDrawPage );
- int nPageWidth = ((Integer)xPageProperties.getPropertyValue( "Width" )).intValue() / 2;
- int nPageHeight = ((Integer)xPageProperties.getPropertyValue( "Height" )).intValue() / 2;
-
- PolyPolygonBezierCoords aCoords = new PolyPolygonBezierCoords();
- // allocating the outer sequence
- int nPolygonCount = 50;
- aCoords.Coordinates = new Point[ nPolygonCount ][ ];
- aCoords.Flags = new PolygonFlags[ nPolygonCount ][ ];
- int i, n, nY;
- // fill the inner point sequence now
- for ( nY = 0, i = 0; i < nPolygonCount; i++, nY += nPageHeight / nPolygonCount )
- {
- // create a polygon using two normal and two control points
- // allocating the inner sequence
- int nPointCount = 8;
- Point[] pPolyPoints = new Point[ nPointCount ];
- PolygonFlags[] pPolyFlags = new PolygonFlags[ nPointCount ];
-
- for ( n = 0; n < nPointCount; n++ )
- pPolyPoints[ n ] = new Point();
-
- pPolyPoints[ 0 ].X = 0;
- pPolyPoints[ 0 ].Y = nY;
- pPolyFlags[ 0 ] = PolygonFlags.NORMAL;
- pPolyPoints[ 1 ].X = nPageWidth / 2;
- pPolyPoints[ 1 ].Y = nPageHeight;
- pPolyFlags[ 1 ] = PolygonFlags.CONTROL;
- pPolyPoints[ 2 ].X = nPageWidth / 2;;
- pPolyPoints[ 2 ].Y = nPageHeight;
- pPolyFlags[ 2 ] = PolygonFlags.CONTROL;
- pPolyPoints[ 3 ].X = nPageWidth;
- pPolyPoints[ 3 ].Y = nY;
- pPolyFlags[ 3 ] = PolygonFlags.NORMAL;
-
- pPolyPoints[ 4 ].X = nPageWidth - 1000;
- pPolyPoints[ 4 ].Y = nY;
- pPolyFlags[ 4 ] = PolygonFlags.NORMAL;
- pPolyPoints[ 5 ].X = nPageWidth / 2;
- pPolyPoints[ 5 ].Y = nPageHeight / 2;
- pPolyFlags[ 5 ] = PolygonFlags.CONTROL;
- pPolyPoints[ 6 ].X = nPageWidth / 2;;
- pPolyPoints[ 6 ].Y = nPageHeight / 2;
- pPolyFlags[ 6 ] = PolygonFlags.CONTROL;
- pPolyPoints[ 7 ].X = 1000;
- pPolyPoints[ 7 ].Y = nY;
- pPolyFlags[ 7 ] = PolygonFlags.NORMAL;
-
- aCoords.Coordinates[ i ]= pPolyPoints;
- aCoords.Flags[ i ] = pPolyFlags;
- }
- xShapeProperties.setPropertyValue( "PolyPolygonBezier", aCoords );
-
- // move the shape to the back by changing the ZOrder
- xShapeProperties.setPropertyValue( "ZOrder", new Integer( 1 ) );
- }
- catch ( Exception ex )
- {
- System.out.println( "Demo_PolyPolygonBezier:" + ex );
- }
- }
-
- // This method will create a group containing two ellipses
- // the shapes will be added into the top right corner of the first
- // draw page
- public static void Demo_Group1( XComponent xDrawDoc )
- {
- try
- {
- XShape xGroup = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ),
- new Size( 0, 0 ),
- "com.sun.star.drawing.GroupShape" );
-
- // before it is possible to insert shapes,
- // the group must have been added to the page
- XDrawPage xDrawPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xDrawPage );
- xShapes.add( xGroup );
-
- XShapes xShapesGroup = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xGroup );
-
- Size aPageSize = PageHelper.getPageSize( xDrawPage );
-
- int nWidth = 4000;
- int nHeight = 2000;
- int nPosX = ( aPageSize.Width * 3 ) / 4 - nWidth / 2;
- int nPosY1 = 2000;
- int nPosY2 = aPageSize.Height / 2 - ( nPosY1 + nHeight );
- XShape xRect1 = ShapeHelper.createShape( xDrawDoc,
- new Point( nPosX, nPosY1 ),
- new Size( nWidth, nHeight ),
- "com.sun.star.drawing.EllipseShape" );
- XShape xRect2 = ShapeHelper.createShape( xDrawDoc,
- new Point( nPosX, nPosY2 ),
- new Size( nWidth, nHeight ),
- "com.sun.star.drawing.EllipseShape" );
-
- xShapesGroup.add( xRect1 );
- xShapesGroup.add( xRect2 );
- }
- catch ( Exception ex )
- {
- System.out.println( "Demo_Group1:" + ex );
- }
- }
-
- // This method will group all available objects on the
- // first page.
- public static void Demo_Group2( XComponent xDrawDoc )
- {
- try
- {
- XDrawPage xDrawPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapeGrouper xShapeGrouper = (XShapeGrouper)
- UnoRuntime.queryInterface( XShapeGrouper.class, xDrawPage );
-
- XShapes xShapesPage = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xDrawPage );
-
- xShapeGrouper.group( xShapesPage );
- }
- catch ( Exception ex )
- {
- System.out.println( "Demo_Group2:" + ex );
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java b/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java
deleted file mode 100644
index 9380ffd2..00000000
--- a/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.drawing.LineDash;
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-
-import com.sun.star.awt.Gradient;
-import com.sun.star.awt.GradientStyle;
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-
-// __________ Implementation __________
-
-/** FillStyle and LineStyle demo
- @author Sven Jacobi
- */
-
-public class FillAndLineStyleDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/sdraw", "_blank", 0, pPropValues );
-
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
-
- XShape xRectangle = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ),
- new Size( 15000, 12000 ),
- "com.sun.star.drawing.RectangleShape" );
-
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
- xShapes.add( xRectangle );
-
- XPropertySet xPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xRectangle );
-
- /* apply a gradient fill style that goes from top left to bottom
- right and is changing its color from green to yellow */
- xPropSet.setPropertyValue( "FillStyle",
- com.sun.star.drawing.FillStyle.GRADIENT );
- Gradient aGradient = new Gradient();
- aGradient.Style = GradientStyle.LINEAR;
- aGradient.StartColor = 0x00ff00;
- aGradient.EndColor = 0xffff00;
- aGradient.Angle = 450;
- aGradient.Border = 0;
- aGradient.XOffset = 0;
- aGradient.YOffset = 0;
- aGradient.StartIntensity = 100;
- aGradient.EndIntensity = 100;
- aGradient.StepCount = 10;
- xPropSet.setPropertyValue( "FillGradient", aGradient );
-
- /* create a blue line with dashes and dots */
- xPropSet.setPropertyValue( "LineStyle",
- com.sun.star.drawing.LineStyle.DASH );
- LineDash aLineDash = new LineDash();
- aLineDash.Dots = 3;
- aLineDash.DotLen = 150;
- aLineDash.Dashes = 3;
- aLineDash.DashLen = 300;
- aLineDash.Distance = 150;
- xPropSet.setPropertyValue( "LineDash", aLineDash );
- xPropSet.setPropertyValue( "LineColor", new Integer( 0x0000ff ) );
- xPropSet.setPropertyValue( "LineWidth", new Integer( 200 ) );
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java b/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java
deleted file mode 100644
index 43765dec..00000000
--- a/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XIndexContainer;
-import com.sun.star.container.XIdentifierContainer;
-
-import com.sun.star.drawing.Alignment;
-import com.sun.star.drawing.EscapeDirection;
-import com.sun.star.drawing.GluePoint2;
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XGluePointsSupplier;
-
-
-
-// __________ Implementation __________
-
-/** GluePointDemo
- @author Sven Jacobi
- */
-
-public class GluePointDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/sdraw", "_blank", 0, pPropValues );
-
-
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
-
- // create two rectangles
- XShape xShape1 = ShapeHelper.createShape( xDrawDoc,
- new Point( 15000, 1000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.RectangleShape" );
-
- XShape xShape2 = ShapeHelper.createShape( xDrawDoc,
- new Point( 2000, 15000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.EllipseShape" );
-
- // and a connector
- XShape xConnector = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ),
- new Size( 0, 0 ),
- "com.sun.star.drawing.ConnectorShape" );
-
- xShapes.add( xShape1 );
- xShapes.add( xShape2 );
- xShapes.add( xConnector );
-
- XPropertySet xConnectorPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xConnector );
-
-// Index value of 0 : the shape is connected at the top
-// Index value of 1 : the shape is connected at the left
-// Index value of 2 : the shape is connected at the bottom
-// Index value of 3 : the shape is connected at the right
-
- int nStartIndex = 3;
- int nEndIndex = 1;
-
- // the "StartPosition" or "EndPosition" property needs not to be set
- // if there is a shape to connect
- xConnectorPropSet.setPropertyValue( "StartShape", xShape1 );
- xConnectorPropSet.setPropertyValue( "StartGluePointIndex",
- new Integer( nStartIndex ) );
-
- xConnectorPropSet.setPropertyValue( "EndShape", xShape2 );
- xConnectorPropSet.setPropertyValue( "EndGluePointIndex",
- new Integer( nEndIndex ) );
-
- XGluePointsSupplier xGluePointsSupplier;
- XIndexContainer xIndexContainer;
- XIdentifierContainer xIdentifierContainer;
-
- GluePoint2 aGluePoint = new GluePoint2();
- aGluePoint.IsRelative = false;
- aGluePoint.PositionAlignment = Alignment.CENTER;
- aGluePoint.Escape = EscapeDirection.SMART;
- aGluePoint.IsUserDefined = true;
- aGluePoint.Position.X = 0;
- aGluePoint.Position.Y = 0;
-
- // create and insert a glue point at shape1
- xGluePointsSupplier = (XGluePointsSupplier)
- UnoRuntime.queryInterface( XGluePointsSupplier.class, xShape1 );
- xIndexContainer = xGluePointsSupplier.getGluePoints();
- xIdentifierContainer = (XIdentifierContainer)
- UnoRuntime.queryInterface( XIdentifierContainer.class,
- xIndexContainer );
- int nIndexOfGluePoint1 = xIdentifierContainer.insert( aGluePoint );
-
- // create and insert a glue point at shape2
- xGluePointsSupplier = (XGluePointsSupplier)
- UnoRuntime.queryInterface( XGluePointsSupplier.class, xShape2 );
- xIndexContainer = xGluePointsSupplier.getGluePoints();
- xIdentifierContainer = (XIdentifierContainer)
- UnoRuntime.queryInterface( XIdentifierContainer.class,
- xIndexContainer );
- int nIndexOfGluePoint2 = xIdentifierContainer.insert( aGluePoint );
-
- // create and add a connector
- XShape xConnector2 = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ),
- new Size( 0, 0 ),
- "com.sun.star.drawing.ConnectorShape" );
- xShapes.add( xConnector2 );
-
- XPropertySet xConnector2PropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xConnector2 );
-
- xConnector2PropSet.setPropertyValue( "StartShape", xShape1 );
- xConnector2PropSet.setPropertyValue( "StartGluePointIndex",
- new Integer( nIndexOfGluePoint1 ) );
-
- xConnector2PropSet.setPropertyValue( "EndShape", xShape2 );
- xConnector2PropSet.setPropertyValue( "EndGluePointIndex",
- new Integer( nIndexOfGluePoint2 ) );
-
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
deleted file mode 100644
index a6ca8d38..00000000
--- a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.beans.PropertyValue;
-
-import com.sun.star.document.XExporter;
-import com.sun.star.document.XFilter;
-
-import com.sun.star.drawing.XDrawPage;
-
-// __________ Implementation __________
-
-/** text demo
- @author Sven Jacobi
- */
-
-public class GraphicExportDemo
-{
- public static void main( String args[] )
- {
- if ( args.length < 3 )
- {
- System.out.println( "usage: GraphicExportDemo SourceURL DestinationURL PageIndexToExport" );
- System.exit(1);
- }
-
- XComponent xComponent = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- java.io.File sourceFile = new java.io.File(args[0]);
- StringBuffer sUrl = new StringBuffer("file:///");
- sUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- xComponent = Helper.createDocument( xOfficeContext,
- sUrl.toString(), "_blank", 0,
- pPropValues );
-
- Object GraphicExportFilter =
- xOfficeContext.getServiceManager().createInstanceWithContext(
- "com.sun.star.drawing.GraphicExportFilter", xOfficeContext);
- XExporter xExporter = (XExporter)
- UnoRuntime.queryInterface( XExporter.class, GraphicExportFilter );
-
- PropertyValue aProps[] = new PropertyValue[2];
- aProps[0] = new PropertyValue();
- aProps[0].Name = "MediaType";
- aProps[0].Value = "image/gif";
-
- /* some graphics e.g. the Windows Metafile does not have a Media Type,
- for this case
- aProps[0].Name = "FilterName"; // it is possible to set a FilterName
- aProps[0].Value = "WMF";
- */
- java.io.File destFile = new java.io.File(args[1]);
- java.net.URL destUrl = destFile.toURI().toURL();
-
- aProps[1] = new PropertyValue();
- aProps[1].Name = "URL";
- aProps[1].Value = destUrl.toString();//args[ 1 ];
-
- int nPageIndex = Integer.parseInt( args[ 2 ] );
- if ( nPageIndex < PageHelper.getDrawPageCount( xComponent ) &&
- nPageIndex > 1 )
- {
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xComponent,
- nPageIndex );
- XComponent xComp = (XComponent)
- UnoRuntime.queryInterface( XComponent.class, xPage );
- xExporter.setSourceDocument( xComp );
- XFilter xFilter = (XFilter)
- UnoRuntime.queryInterface( XFilter.class, xExporter );
- xFilter.filter( aProps );
- System.out.println( "*** graphics on page \"" + nPageIndex
- + "\" from file \"" + args[0]
- + "\" exported under the name \""
- + args[1] + "\" in the local directory" );
- } else
- {
- System.out.println( "page index not in range" );
- }
-
-
- // close the document
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class,
- xComponent);
-
- if (xCloseable != null )
- xCloseable.close(false);
- else
- xComponent.dispose();
-
- System.out.println("*** document closed!");
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
-
- System.exit( 0 );
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Drawing/Helper.java b/odk/examples/DevelopersGuide/Drawing/Helper.java
deleted file mode 100644
index e9d316ee..00000000
--- a/odk/examples/DevelopersGuide/Drawing/Helper.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-public class Helper
-{
- // __________ static helper methods __________
-
- /** Connect to an office, if no office is running a new instance is started.
- * A new connection is established and the service manger from the running
- * offic eis returned.
- */
- static public com.sun.star.uno.XComponentContext connect()
- throws Exception
- {
- // get the remote office component context
- com.sun.star.uno.XComponentContext xOfficeContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // if connection fails an exception is thrown
- System.out.println("Connected to a running office ...");
-
- return xOfficeContext;
- }
-
- /** creates and instantiates new document
- */
- static public com.sun.star.lang.XComponent createDocument(
- com.sun.star.uno.XComponentContext xOfficeContext,
- String sURL, String sTargetFrame, int nSearchFlags,
- com.sun.star.beans.PropertyValue[] aArgs )
- throws Exception
- {
- com.sun.star.lang.XComponent xComponent = null;
- com.sun.star.frame.XComponentLoader aLoader =
- (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class,
- xOfficeContext.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Desktop", xOfficeContext));
-
- xComponent = (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, aLoader.loadComponentFromURL(
- sURL, sTargetFrame, nSearchFlags, aArgs ) );
-
- if ( xComponent == null )
- throw new Exception( "could not create document: " + sURL );
- return xComponent;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/LayerDemo.java b/odk/examples/DevelopersGuide/Drawing/LayerDemo.java
deleted file mode 100644
index 47fc9644..00000000
--- a/odk/examples/DevelopersGuide/Drawing/LayerDemo.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XNameAccess;
-
-import com.sun.star.style.ParagraphAdjust;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XLayer;
-import com.sun.star.drawing.XLayerManager;
-import com.sun.star.drawing.XLayerSupplier;
-
-
-// __________ Implementation __________
-
-/** LayerDemo
- @author Sven Jacobi
- */
-
-public class LayerDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/sdraw", "_blank", 0, pPropValues );
-
-
- // create two rectangles
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
-
- XShape xRect1 = ShapeHelper.createShape( xDrawDoc,
- new Point( 1000, 1000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.RectangleShape" );
-
- XShape xRect2 = ShapeHelper.createShape( xDrawDoc,
- new Point( 1000, 7000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.RectangleShape" );
-
- xShapes.add( xRect1 );
- xShapes.add( xRect2 );
- XPropertySet xTextProp = ShapeHelper.addPortion( xRect2,
- "this shape is locked",
- false );
- xTextProp.setPropertyValue( "ParaAdjust", ParagraphAdjust.CENTER );
- ShapeHelper.addPortion( xRect2, "and the shape above is not visible",
- true );
- ShapeHelper.addPortion( xRect2,
- "(switch to the layer view to gain access)",
- true );
-
-
- // query for the XLayerManager
- XLayerSupplier xLayerSupplier = (XLayerSupplier)
- (XLayerSupplier)UnoRuntime.queryInterface(
- XLayerSupplier.class, xDrawDoc );
- XNameAccess xNameAccess = xLayerSupplier.getLayerManager();
- XLayerManager xLayerManager = (XLayerManager)
- (XLayerManager)UnoRuntime.queryInterface(
- XLayerManager.class, xNameAccess );
-
- // create a layer and set its properties
- XPropertySet xLayerPropSet;
- XLayer xNotVisibleAndEditable = xLayerManager.insertNewByIndex(
- xLayerManager.getCount() );
-
- xLayerPropSet = (XPropertySet)
- (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xNotVisibleAndEditable );
- xLayerPropSet.setPropertyValue( "Name", "NotVisibleAndEditable" );
- xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( false ) );
- xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) );
-
- // create a second layer
- XLayer xNotEditable = xLayerManager.insertNewByIndex(
- xLayerManager.getCount() );
-
- xLayerPropSet = (XPropertySet)
- (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xNotEditable );
- xLayerPropSet.setPropertyValue( "Name", "NotEditable" );
- xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( true ) );
- xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) );
-
- // attach the layer to the rectangles
- xLayerManager.attachShapeToLayer( xRect1, xNotVisibleAndEditable );
- xLayerManager.attachShapeToLayer( xRect2, xNotEditable );
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/Makefile b/odk/examples/DevelopersGuide/Drawing/Makefile
deleted file mode 100644
index 2bf39023..00000000
--- a/odk/examples/DevelopersGuide/Drawing/Makefile
+++ /dev/null
@@ -1,175 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Drawing examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=DrawingExamples
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-APP1_NAME=ChangeOrderDemo
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP2_NAME=ControlAndSelectDemo
-APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
-APP3_NAME=CustomShowDemo
-APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
-APP4_NAME=DrawingDemo
-APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
-APP5_NAME=DrawViewDemo
-APP5_JAR=$(SAMPLE_CLASS_OUT)/$(APP5_NAME).jar
-APP6_NAME=FillAndLineStyleDemo
-APP6_JAR=$(SAMPLE_CLASS_OUT)/$(APP6_NAME).jar
-APP7_NAME=GluePointDemo
-APP7_JAR=$(SAMPLE_CLASS_OUT)/$(APP7_NAME).jar
-APP8_NAME=GraphicExportDemo
-APP8_JAR=$(SAMPLE_CLASS_OUT)/$(APP8_NAME).jar
-APP9_NAME=LayerDemo
-APP9_JAR=$(SAMPLE_CLASS_OUT)/$(APP9_NAME).jar
-APP10_NAME=ObjectTransformationDemo
-APP10_JAR=$(SAMPLE_CLASS_OUT)/$(APP10_NAME).jar
-APP11_NAME=Organigram
-APP11_JAR=$(SAMPLE_CLASS_OUT)/$(APP11_NAME).jar
-APP12_NAME=PresentationDemo
-APP12_JAR=$(SAMPLE_CLASS_OUT)/$(APP12_NAME).jar
-APP13_NAME=StyleDemo
-APP13_JAR=$(SAMPLE_CLASS_OUT)/$(APP13_NAME).jar
-APP14_NAME=TextDemo
-APP14_JAR=$(SAMPLE_CLASS_OUT)/$(APP14_NAME).jar
-
-APP_JAVAFILES = \
- Helper.java \
- PageHelper.java \
- ShapeHelper.java
-
-APP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES))
-APP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- DrawingExamples
-
-include $(SETTINGS)/stdtarget.mk
-
-$(APP_CLASSFILES) : $(APP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES)
-
-$(SAMPLE_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $<
-
-$(SAMPLE_CLASS_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class $(APP_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(SAMPLE_CLASS_OUT)/$(APP1_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP1_NAME).class
-$(APP2_JAR) : $(SAMPLE_CLASS_OUT)/$(APP2_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP2_NAME).class
-$(APP3_JAR) : $(SAMPLE_CLASS_OUT)/$(APP3_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP3_NAME).class
-$(APP4_JAR) : $(SAMPLE_CLASS_OUT)/$(APP4_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP4_NAME).class
-$(APP5_JAR) : $(SAMPLE_CLASS_OUT)/$(APP5_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP5_NAME).class
-$(APP6_JAR) : $(SAMPLE_CLASS_OUT)/$(APP6_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP6_NAME).class
-$(APP7_JAR) : $(SAMPLE_CLASS_OUT)/$(APP7_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP7_NAME).class
-$(APP8_JAR) : $(SAMPLE_CLASS_OUT)/$(APP8_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP8_NAME).class
-$(APP9_JAR) : $(SAMPLE_CLASS_OUT)/$(APP9_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP9_NAME).class
-$(APP10_JAR) : $(SAMPLE_CLASS_OUT)/$(APP10_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP10_NAME).class
-$(APP11_JAR) : $(SAMPLE_CLASS_OUT)/$(APP11_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP11_NAME).class
-$(APP12_JAR) : $(SAMPLE_CLASS_OUT)/$(APP12_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP12_NAME).class
-$(APP13_JAR) : $(SAMPLE_CLASS_OUT)/$(APP13_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP13_NAME).class
-$(APP14_JAR) : $(SAMPLE_CLASS_OUT)/$(APP14_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP14_NAME).class
-
-DrawingExamples : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR) $(APP5_JAR) $(APP6_JAR) $(APP7_JAR) $(APP8_JAR) $(APP9_JAR) $(APP10_JAR) $(APP11_JAR) $(APP12_JAR) $(APP13_JAR) $(APP14_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo $(MAKE) $(APP4_NAME).run
- @echo $(MAKE) $(APP5_NAME).run
- @echo $(MAKE) $(APP6_NAME).run
- @echo $(MAKE) $(APP7_NAME).run
- @echo $(MAKE) $(APP8_NAME).run
- @echo $(MAKE) $(APP9_NAME).run
- @echo $(MAKE) $(APP10_NAME).run
- @echo $(MAKE) $(APP11_NAME).run
- @echo $(MAKE) $(APP12_NAME).run
- @echo $(MAKE) $(APP13_NAME).run
- @echo $(MAKE) $(APP14_NAME).run
- @echo --------
- @echo The $(APP5_NAME) and the $(APP8_NAME) needs parameters. Please use the
- @echo following command to start the demo if you do not want the default parameters
- @echo specified in the this makefile:
- @echo --- $(APP5_NAME) ---
- @echo java -Dcom.sun.star.lib.loader.unopath="$(QM)$(OFFICE_PROGRAM_PATH)$(QM)" -jar $(APP5_NAME).jar "$(QM)SourceUrl$(QM)"
- @echo --- $(APP8_NAME) ---
- @echo java -Dcom.sun.star.lib.loader.unopath="$(QM)$(OFFICE_PROGRAM_PATH)$(QM)" -jar $(APP8_NAME).jar "$(QM)SourceUrl$(QM)" "$(QM)DestinationUrl$(QM)" "$(QM)index$(QM)"
- @echo --------------------------------------------------------------------------------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-$(APP5_NAME).run: $(APP5_JAR)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< SimplePresentation.odp
-
-$(APP8_NAME).run: $(APP8_JAR)
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/export)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< SimplePresentation.odp "$(SAMPLE_GEN_OUT)/export/MyTestExport.gif" 2
-
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
diff --git a/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java b/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java
deleted file mode 100644
index 56b5e806..00000000
--- a/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.HomogenMatrix3;
-
-import java.awt.geom.AffineTransform;
-
-// __________ Implementation __________
-
-/** ObjectTransformationDemo
- @author Sven Jacobi
- */
-
-public class ObjectTransformationDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/simpress", "_blank", 0, pPropValues );
-
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XPropertySet xPagePropSet= (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xPage );
-
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
-
-
- XShape xShape = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ), new Size( 10000, 2500 ),
- "com.sun.star.drawing.RectangleShape" );
- xShapes.add( xShape );
-
- XPropertySet xPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape );
-
- HomogenMatrix3 aHomogenMatrix3 = (HomogenMatrix3)
- xPropSet.getPropertyValue( "Transformation" );
-
- java.awt.geom.AffineTransform aOriginalMatrix =
- new java.awt.geom.AffineTransform(
- aHomogenMatrix3.Line1.Column1, aHomogenMatrix3.Line2.Column1,
- aHomogenMatrix3.Line1.Column2, aHomogenMatrix3.Line2.Column2,
- aHomogenMatrix3.Line1.Column3, aHomogenMatrix3.Line2.Column3 );
-
-
- AffineTransform aNewMatrix1 = new AffineTransform();
- aNewMatrix1.setToRotation( Math.PI /180 * 15 );
- aNewMatrix1.concatenate( aOriginalMatrix );
-
- AffineTransform aNewMatrix2 = new AffineTransform();
- aNewMatrix2.setToTranslation( 2000, 2000 );
- aNewMatrix2.concatenate( aNewMatrix1 );
-
- double aFlatMatrix[] = new double[ 6 ];
- aNewMatrix2.getMatrix( aFlatMatrix );
- aHomogenMatrix3.Line1.Column1 = aFlatMatrix[ 0 ];
- aHomogenMatrix3.Line2.Column1 = aFlatMatrix[ 1 ];
- aHomogenMatrix3.Line1.Column2 = aFlatMatrix[ 2 ];
- aHomogenMatrix3.Line2.Column2 = aFlatMatrix[ 3 ];
- aHomogenMatrix3.Line1.Column3 = aFlatMatrix[ 4 ];
- aHomogenMatrix3.Line2.Column3 = aFlatMatrix[ 5 ];
- xPropSet.setPropertyValue( "Transformation", aHomogenMatrix3 );
-
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/Organigram.java b/odk/examples/DevelopersGuide/Drawing/Organigram.java
deleted file mode 100644
index caa390dc..00000000
--- a/odk/examples/DevelopersGuide/Drawing/Organigram.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-
-import com.sun.star.frame.XComponentLoader;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.XComponentContext;
-
-
-/*
- * OpenQuery.java
- *
- * Created on 6. Juli 2002, 10:25
- */
-
-/**
- *
- * @author dschulten
- */
-public class Organigram {
-
- private XComponentContext xRemoteContext = null;
- private XMultiComponentFactory xRemoteServiceManager = null;
-
- /** Creates a new instance of OpenQuery */
- public Organigram() {
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Organigram organigram1 = new Organigram();
- try {
- organigram1.drawOrganigram();
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
- public void drawOrganigram() throws java.lang.Exception {
- // get the remote office component context
- xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- // get the remote service manager
- xRemoteServiceManager = xRemoteContext.getServiceManager();
-
- Object desktop = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xRemoteContext);
- XComponentLoader xComponentLoader = (XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, desktop);
-
- PropertyValue[] loadProps = new PropertyValue[0];
- XComponent xDrawComponent = xComponentLoader.loadComponentFromURL(
- "private:factory/sdraw", "_blank", 0, loadProps);
-
- // get draw page by index
- com.sun.star.drawing.XDrawPagesSupplier xDrawPagesSupplier =
- (com.sun.star.drawing.XDrawPagesSupplier)UnoRuntime.queryInterface(
- com.sun.star.drawing.XDrawPagesSupplier.class, xDrawComponent );
- com.sun.star.drawing.XDrawPages xDrawPages =
- xDrawPagesSupplier.getDrawPages();
- Object drawPage = xDrawPages.getByIndex(0);
- com.sun.star.drawing.XDrawPage xDrawPage = (com.sun.star.drawing.XDrawPage)
- UnoRuntime.queryInterface(com.sun.star.drawing.XDrawPage.class,
- drawPage);
-
- com.sun.star.lang.XMultiServiceFactory xDocumentFactory =
- (com.sun.star.lang.XMultiServiceFactory)UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xDrawComponent);
-
- com.sun.star.beans.XPropertySet xPageProps =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xDrawPage);
-
- int pageWidth = AnyConverter.toInt(xPageProps.getPropertyValue("Width"));
- int pageHeight = AnyConverter.toInt(xPageProps.getPropertyValue("Height"));
- int pageBorderTop = AnyConverter.toInt(xPageProps.getPropertyValue("BorderTop"));
- int pageBorderLeft = AnyConverter.toInt(xPageProps.getPropertyValue("BorderLeft"));
- int pageBorderRight = AnyConverter.toInt(xPageProps.getPropertyValue("BorderRight"));
- int drawWidth = pageWidth - pageBorderLeft - pageBorderRight;
- int horCenter = pageBorderLeft + drawWidth / 2;
-
- String[][] orgUnits = new String[2][4];
- orgUnits[0][0] = "Management";
- orgUnits[1][0] = "Production";
- orgUnits[1][1] = "Purchasing";
- orgUnits[1][2] = "IT Services";
- orgUnits[1][3] = "Sales";
- int[] levelCount = {1, 4};
-
- int horSpace = 300;
- int verSpace = 3000;
-
- int shapeWidth = (drawWidth - (levelCount[1] - 1) * horSpace) / levelCount[1];
- int shapeHeight = pageHeight / 20;
- int shapeX = pageWidth / 2 - shapeWidth / 2;
- int shapeY = pageBorderTop;
-
- int levelY;
- int levelX;
-
- com.sun.star.drawing.XShape xStartShape = null;
-
- for (int level = 0; level <= 1; level++) {
- levelY = pageBorderTop + 2000 + level * (shapeHeight + verSpace);
- for (int i = levelCount[level] - 1; i > -1; i--) {
- shapeX = horCenter - (levelCount[level] * shapeWidth +
- (levelCount[level] - 1) * horSpace) / 2
- + i * shapeWidth + i * horSpace;
- Object shape = xDocumentFactory.createInstance("com.sun.star.drawing.RectangleShape");
- com.sun.star.drawing.XShape xShape = (com.sun.star.drawing.XShape)
- UnoRuntime.queryInterface(
- com.sun.star.drawing.XShape.class, shape);
- xShape.setPosition(new com.sun.star.awt.Point(shapeX, levelY));
- xShape.setSize(new com.sun.star.awt.Size(shapeWidth, shapeHeight));
- xDrawPage.add(xShape);
-
- com.sun.star.text.XText xText = (com.sun.star.text.XText)
- UnoRuntime.queryInterface(
- com.sun.star.text.XText.class, xShape);
-
- xText.setString(orgUnits[level][i]);
-
- // memorize the root shape
- if (level == 0 && i == 0)
- xStartShape = xShape;
-
- if (level == 1) {
- Object connector = xDocumentFactory.createInstance("com.sun.star.drawing.ConnectorShape");
- com.sun.star.beans.XPropertySet xConnectorProps =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, connector);
- com.sun.star.drawing.XShape xConnector =
- (com.sun.star.drawing.XShape)UnoRuntime.queryInterface(
- com.sun.star.drawing.XShape.class, connector);
- xDrawPage.add(xConnector);
- xConnectorProps.setPropertyValue("StartShape", xStartShape);
- xConnectorProps.setPropertyValue("EndShape", xShape);
- xConnectorProps.setPropertyValue("StartGluePointIndex",
- new Integer(2)); // 2 = bottom glue point
- xConnectorProps.setPropertyValue("EndGluePointIndex",
- new Integer(0)); // 0 = top glue point
- }
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/PageHelper.java b/odk/examples/DevelopersGuide/Drawing/PageHelper.java
deleted file mode 100644
index 10391668..00000000
--- a/odk/examples/DevelopersGuide/Drawing/PageHelper.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XServiceInfo;
-
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.drawing.XMasterPageTarget;
-import com.sun.star.drawing.XMasterPagesSupplier;
-
-import com.sun.star.presentation.XPresentationPage;
-import com.sun.star.presentation.XHandoutMasterSupplier;
-
-
-public class PageHelper
-{
- // __________ static helper methods __________
-
- // __________ draw pages __________
-
- /** get the page count for standard pages
- */
- static public int getDrawPageCount( XComponent xComponent )
- {
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- return xDrawPages.getCount();
- }
-
- /** get draw page by index
- */
- static public XDrawPage getDrawPageByIndex( XComponent xComponent, int nIndex )
- throws com.sun.star.lang.IndexOutOfBoundsException,
- com.sun.star.lang.WrappedTargetException
- {
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- return (XDrawPage)UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex( nIndex ));
- }
-
- /** creates and inserts a draw page into the giving position,
- the method returns the new created page
- */
- static public XDrawPage insertNewDrawPageByIndex( XComponent xComponent, int nIndex )
- throws Exception
- {
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- return xDrawPages.insertNewByIndex( nIndex );
- }
-
- /** removes the given page
- */
- static public void removeDrawPage( XComponent xComponent, XDrawPage xDrawPage )
- {
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- xDrawPages.remove( xDrawPage );
- }
-
- /** get size of the given page
- */
- static public Size getPageSize( XDrawPage xDrawPage )
- throws com.sun.star.beans.UnknownPropertyException,
- com.sun.star.lang.WrappedTargetException
- {
- XPropertySet xPageProperties = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xDrawPage );
- return new Size(
- ((Integer)xPageProperties.getPropertyValue( "Width" )).intValue(),
- ((Integer)xPageProperties.getPropertyValue( "Height" )).intValue() );
- }
-
- // __________ master pages __________
-
- /** get the page count for master pages
- */
- static public int getMasterPageCount( XComponent xComponent )
- {
- XMasterPagesSupplier xMasterPagesSupplier =
- (XMasterPagesSupplier)UnoRuntime.queryInterface(
- XMasterPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xMasterPagesSupplier.getMasterPages();
- return xDrawPages.getCount();
- }
-
- /** get master page by index
- */
- static public XDrawPage getMasterPageByIndex( XComponent xComponent, int nIndex )
- throws com.sun.star.lang.IndexOutOfBoundsException,
- com.sun.star.lang.WrappedTargetException
- {
- XMasterPagesSupplier xMasterPagesSupplier =
- (XMasterPagesSupplier)UnoRuntime.queryInterface(
- XMasterPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xMasterPagesSupplier.getMasterPages();
- return (XDrawPage)UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex( nIndex ));
- }
-
- /** creates and inserts a new master page into the giving position,
- the method returns the new created page
- */
- static public XDrawPage insertNewMasterPageByIndex( XComponent xComponent, int nIndex )
- {
- XMasterPagesSupplier xMasterPagesSupplier =
- (XMasterPagesSupplier)UnoRuntime.queryInterface(
- XMasterPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xMasterPagesSupplier.getMasterPages();
- return xDrawPages.insertNewByIndex( nIndex );
- }
-
- /** removes the given page
- */
- static public void removeMasterPage( XComponent xComponent, XDrawPage xDrawPage )
- {
- XMasterPagesSupplier xMasterPagesSupplier =
- (XMasterPagesSupplier)UnoRuntime.queryInterface(
- XMasterPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xMasterPagesSupplier.getMasterPages();
- xDrawPages.remove( xDrawPage );
- }
-
- /** return the corresponding masterpage for the giving drawpage
- */
- static public XDrawPage getMasterPage( XDrawPage xDrawPage )
- {
- XMasterPageTarget xMasterPageTarget =
- (XMasterPageTarget)UnoRuntime.queryInterface(
- XMasterPageTarget.class, xDrawPage );
- return xMasterPageTarget.getMasterPage();
- }
-
- /** sets given masterpage at the drawpage
- */
- static public void setMasterPage( XDrawPage xDrawPage, XDrawPage xMasterPage )
- {
- XMasterPageTarget xMasterPageTarget =
- (XMasterPageTarget)UnoRuntime.queryInterface(
- XMasterPageTarget.class, xDrawPage );
- xMasterPageTarget.setMasterPage( xMasterPage );
- }
-
- // __________ presentation pages __________
-
- /** test if a Presentation Document is supported.
- This is important, because only presentation documents
- have notes and handout pages
- */
- static public boolean isImpressDocument( XComponent xComponent )
- {
- XServiceInfo xInfo = (XServiceInfo)UnoRuntime.queryInterface(
- XServiceInfo.class, xComponent );
- return xInfo.supportsService( "com.sun.star.presentation.PresentationDocument" );
- }
-
- /** in impress documents each normal draw page has a corresponding notes page
- */
- static public XDrawPage getNotesPage( XDrawPage xDrawPage )
- {
- XPresentationPage aPresentationPage =
- (XPresentationPage)UnoRuntime.queryInterface(
- XPresentationPage.class, xDrawPage );
- return aPresentationPage.getNotesPage();
- }
-
- /** in impress each documents has one handout page
- */
- static public XDrawPage getHandoutMasterPage( XComponent xComponent )
- {
- XHandoutMasterSupplier aHandoutMasterSupplier =
- (XHandoutMasterSupplier)UnoRuntime.queryInterface(
- XHandoutMasterSupplier.class, xComponent );
- return aHandoutMasterSupplier.getHandoutMasterPage();
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java b/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java
deleted file mode 100644
index 6a411336..00000000
--- a/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XServiceInfo;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XNamed;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-
-import com.sun.star.presentation.XPresentation;
-import com.sun.star.presentation.XPresentationSupplier;
-
-
-
-// __________ Implementation __________
-
-/** presentation demo
- @author Sven Jacobi
- */
-
-// This demo will demonstrate how to create a presentation using the Office API
-
-// The first parameter describes the connection that is to use. If there is no parameter
-// "uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager" is used.
-
-
-public class PresentationDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/simpress", "_blank", 0, pPropValues );
-
-
- XDrawPage xPage;
- XShapes xShapes;
- XPropertySet xShapePropSet;
-
- // create pages, so that three are available
- while ( PageHelper.getDrawPageCount( xDrawDoc ) < 3 )
- PageHelper.insertNewDrawPageByIndex( xDrawDoc, 0 );
-
-
- // set the slide transition for the first page
- xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
- // set slide transition effect
- setSlideTransition( xPage,
- com.sun.star.presentation.FadeEffect.FADE_FROM_RIGHT,
- com.sun.star.presentation.AnimationSpeed.FAST,
- 1, 0 ); // automatic object and slide transition
-
- // create a rectangle that is placed on the top left of the page
- xShapePropSet = ShapeHelper.createAndInsertShape( xDrawDoc,
- xShapes,new Point( 1000, 1000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.RectangleShape" );
- xShapePropSet.setPropertyValue("Effect",
- com.sun.star.presentation.AnimationEffect.WAVYLINE_FROM_BOTTOM );
-
- /* the following three properties provokes that the shape is dimmed
- to red
- after the animation has been finished */
- xShapePropSet.setPropertyValue( "DimHide", new Boolean( false ) );
- xShapePropSet.setPropertyValue( "DimPrevious", new Boolean( true ) );
- xShapePropSet.setPropertyValue( "DimColor", new Integer( 0xff0000 ) );
-
-
- // set the slide transition for the second page
- xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 1 );
- xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
- setSlideTransition( xPage,
- com.sun.star.presentation.FadeEffect.FADE_FROM_RIGHT,
- com.sun.star.presentation.AnimationSpeed.SLOW,
- 1, 0 ); // automatic object and slide transition
-
- // create an ellipse that is placed on the bottom right of second page
- xShapePropSet = ShapeHelper.createAndInsertShape( xDrawDoc,
- xShapes, new Point( 21000, 15000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.EllipseShape" );
- xShapePropSet.setPropertyValue(
- "Effect", com.sun.star.presentation.AnimationEffect.HIDE );
-
-
- // create two objects for the third page
- // clicking the first object lets the presentation jump
- // to page one by using ClickAction.FIRSTPAGE,
- // the second object lets the presentation jump to page two
- // by using a ClickAction.BOOKMARK;
- xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 2 );
- xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
- setSlideTransition( xPage,
- com.sun.star.presentation.FadeEffect.ROLL_FROM_LEFT,
- com.sun.star.presentation.AnimationSpeed.MEDIUM,
- 2, 0 );
- XShape xShape = ShapeHelper.createShape( xDrawDoc,
- new Point( 1000, 8000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.EllipseShape" );
- xShapes.add( xShape );
- ShapeHelper.addPortion( xShape, "click to go", false );
- ShapeHelper.addPortion( xShape, "to first page", true );
- xShapePropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape );
- xShapePropSet.setPropertyValue("Effect",
- com.sun.star.presentation.AnimationEffect.FADE_FROM_BOTTOM );
- xShapePropSet.setPropertyValue(
- "OnClick", com.sun.star.presentation.ClickAction.FIRSTPAGE );
-
-
- xShape = ShapeHelper.createShape( xDrawDoc,
- new Point( 22000, 8000 ), new Size( 5000, 5000 ),
- "com.sun.star.drawing.RectangleShape" );
- xShapes.add( xShape );
- ShapeHelper.addPortion( xShape, "click to go", false );
- ShapeHelper.addPortion( xShape, "to the second page", true );
- xShapePropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape );
- xShapePropSet.setPropertyValue("Effect",
- com.sun.star.presentation.AnimationEffect.FADE_FROM_BOTTOM );
-
- xShapePropSet.setPropertyValue(
- "OnClick", com.sun.star.presentation.ClickAction.BOOKMARK );
- // set the name of page two, and use it with the bookmark action
- XNamed xPageName = (XNamed)UnoRuntime.queryInterface(
- XNamed.class, PageHelper.getDrawPageByIndex( xDrawDoc, 1 ) );
- xPageName.setName( "page two" );
- xShapePropSet.setPropertyValue(
- "Bookmark", xPageName.getName() );
-
-
- /* start an endless presentation which is displayed in
- full-screen mode and placed on top */
-
- XPresentationSupplier xPresSupplier = (XPresentationSupplier)
- UnoRuntime.queryInterface( XPresentationSupplier.class, xDrawDoc );
- XPresentation xPresentation = xPresSupplier.getPresentation();
- XPropertySet xPresPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xPresentation );
- xPresPropSet.setPropertyValue( "IsEndless", new Boolean( true ) );
- xPresPropSet.setPropertyValue( "IsAlwaysOnTop", new Boolean( true ) );
- xPresPropSet.setPropertyValue( "Pause", new Integer( 0 ) );
- xPresentation.start();
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-
- // this simple method applies the slide transition to a page
- public static void setSlideTransition( XDrawPage xPage,
- com.sun.star.presentation.FadeEffect eEffect,
- com.sun.star.presentation.AnimationSpeed eSpeed,
- int nChange,
- int nDuration )
- {
- // the following test is only sensible if you do not exactly know
- // what type of page xPage is, for this purpose it can been tested
- // if the com.sun.star.presentation.DrawPage service is supported
- XServiceInfo xInfo = (XServiceInfo)UnoRuntime.queryInterface(
- XServiceInfo.class, xPage );
- if ( xInfo.supportsService( "com.sun.star.presentation.DrawPage" ) == true )
- {
- try
- {
- XPropertySet xPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xPage );
- xPropSet.setPropertyValue( "Effect", eEffect );
- xPropSet.setPropertyValue( "Speed", eSpeed );
- xPropSet.setPropertyValue( "Change", new Integer( nChange ) );
- xPropSet.setPropertyValue( "Duration", new Integer( nDuration ) );
- }
- catch( Exception ex )
- {
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java b/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java
deleted file mode 100644
index 72647f4f..00000000
--- a/odk/examples/DevelopersGuide/Drawing/ShapeHelper.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-
-import com.sun.star.text.ControlCharacter;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextRange;
-
-
-public class ShapeHelper
-{
- // __________ static helper methods __________
- //
- public static XPropertySet createAndInsertShape( XComponent xDrawDoc,
- XShapes xShapes, Point aPos, Size aSize, String sShapeType )
- throws java.lang.Exception
- {
- XShape xShape = createShape( xDrawDoc, aPos, aSize, sShapeType );
- xShapes.add( xShape );
- XPropertySet xPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape );
- return xPropSet;
- }
-
- /** create a Shape
- */
- public static XShape createShape( XComponent xDrawDoc,
- Point aPos, Size aSize, String sShapeType )
- throws java.lang.Exception
- {
- XShape xShape = null;
- XMultiServiceFactory xFactory =
- (XMultiServiceFactory )UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xDrawDoc );
- Object xObj = xFactory.createInstance( sShapeType );
- xShape = (XShape)UnoRuntime.queryInterface(
- XShape.class, xObj );
- xShape.setPosition( aPos );
- xShape.setSize( aSize );
- return xShape;
- }
-
- /**
- add text to a shape. the return value is the PropertySet
- of the text range that has been added
- */
- public static XPropertySet addPortion( XShape xShape, String sText, boolean bNewParagraph )
- throws com.sun.star.lang.IllegalArgumentException
- {
- XText xText = (XText)
- UnoRuntime.queryInterface( XText.class, xShape );
-
- XTextCursor xTextCursor = xText.createTextCursor();
- xTextCursor.gotoEnd( false );
- if ( bNewParagraph == true )
- {
- xText.insertControlCharacter( xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- xTextCursor.gotoEnd( false );
- }
- XTextRange xTextRange = (XTextRange)
- UnoRuntime.queryInterface( XTextRange.class, xTextCursor );
- xTextRange.setString( sText );
- xTextCursor.gotoEnd( true );
- XPropertySet xPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xTextRange );
- return xPropSet;
- }
-
- public static void setPropertyForLastParagraph( XShape xText, String sPropName,
- Object aValue )
- throws com.sun.star.beans.UnknownPropertyException,
- com.sun.star.beans.PropertyVetoException,
- com.sun.star.lang.IllegalArgumentException,
- com.sun.star.lang.WrappedTargetException,
- com.sun.star.container.NoSuchElementException
- {
- XEnumerationAccess xEnumerationAccess = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, xText );
- if ( xEnumerationAccess.hasElements() )
- {
- XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
- while( xEnumeration.hasMoreElements () )
- {
- Object xObj = xEnumeration.nextElement();
- if ( xEnumeration.hasMoreElements() == false )
- {
- XTextContent xTextContent = (XTextContent)UnoRuntime.queryInterface(
- XTextContent.class, xObj );
- XPropertySet xParaPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xTextContent );
- xParaPropSet.setPropertyValue( sPropName, aValue );
- }
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/SimplePresentation.odp b/odk/examples/DevelopersGuide/Drawing/SimplePresentation.odp
deleted file mode 100644
index 3f40f766..00000000
--- a/odk/examples/DevelopersGuide/Drawing/SimplePresentation.odp
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Drawing/StyleDemo.java b/odk/examples/DevelopersGuide/Drawing/StyleDemo.java
deleted file mode 100644
index c5a3ad39..00000000
--- a/odk/examples/DevelopersGuide/Drawing/StyleDemo.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-
-import com.sun.star.container.XNameAccess;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-
-import com.sun.star.frame.XModel;
-
-
-
-// __________ Implementation __________
-
-/** StyleDemo
- @author Sven Jacobi
- */
-
-public class StyleDemo
-{
- public static void main( String args[] )
- {
- XComponent xComponent = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xComponent = Helper.createDocument( xOfficeContext,
- "private:factory/simpress", "_blank", 0, pPropValues );
-
-
-
-
- /* The first part of this demo will set each "CharColor" Property
- that is available within the styles of the document to red. It
- will also print each family and style name to the standard output */
- XModel xModel =
- (XModel)UnoRuntime.queryInterface(
- XModel.class, xComponent );
- com.sun.star.style.XStyleFamiliesSupplier xSFS =
- (com.sun.star.style.XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(
- com.sun.star.style.XStyleFamiliesSupplier.class, xModel );
-
- com.sun.star.container.XNameAccess xFamilies = xSFS.getStyleFamilies();
-
- // the element should now contain at least two Styles. The first is
- // "graphics" and the other one is the name of the Master page
- String[] Families = xFamilies.getElementNames();
- for ( int i = 0; i < Families.length; i++ )
- {
- // this is the family
- System.out.println( "\n" + Families[ i ] );
-
- // and now all available styles
- Object aFamilyObj = xFamilies.getByName( Families[ i ] );
- com.sun.star.container.XNameAccess xStyles =
- (com.sun.star.container.XNameAccess)
- UnoRuntime.queryInterface(
- com.sun.star.container.XNameAccess.class, aFamilyObj );
- String[] Styles = xStyles.getElementNames();
- for( int j = 0; j < Styles.length; j++ )
- {
- System.out.println( " " + Styles[ j ] );
- Object aStyleObj = xStyles.getByName( Styles[ j ] );
- com.sun.star.style.XStyle xStyle = (com.sun.star.style.XStyle)
- UnoRuntime.queryInterface(
- com.sun.star.style.XStyle.class, aStyleObj );
- // now we have the XStyle Interface and the CharColor for
- // all styles is exemplary be set to red.
- XPropertySet xStylePropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xStyle );
- XPropertySetInfo xStylePropSetInfo =
- xStylePropSet.getPropertySetInfo();
- if ( xStylePropSetInfo.hasPropertyByName( "CharColor" ) )
- {
- xStylePropSet.setPropertyValue( "CharColor",
- new Integer( 0xff0000 ) );
- }
- }
- }
-
-
-
- /* now create a rectangle and apply the "title1" style of
- the "graphics" family */
-
- Object obj = xFamilies.getByName( "graphics" );
- com.sun.star.container.XNameAccess xStyles = (XNameAccess)
- UnoRuntime.queryInterface(com.sun.star.container.XNameAccess.class,
- obj );
- obj = xStyles.getByName( "title1" );
- com.sun.star.style.XStyle xTitle1Style = (com.sun.star.style.XStyle)
- UnoRuntime.queryInterface( com.sun.star.style.XStyle.class, obj );
-
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xComponent );
- XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
- XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface(
- XDrawPage.class, xDrawPages.getByIndex( 0 ));
- XShapes xShapes = (XShapes)UnoRuntime.queryInterface(XShapes.class,
- xDrawPage );
- XShape xShape = ShapeHelper.createShape( xComponent, new Point( 0, 0 ),
- new Size( 5000, 5000 ), "com.sun.star.drawing.RectangleShape" );
- xShapes.add( xShape );
- XPropertySet xPropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape );
- xPropSet.setPropertyValue( "Style", xTitle1Style );
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/TextDemo.java b/odk/examples/DevelopersGuide/Drawing/TextDemo.java
deleted file mode 100644
index cbc87a34..00000000
--- a/odk/examples/DevelopersGuide/Drawing/TextDemo.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.TextFitToSizeType;
-
-import com.sun.star.style.LineSpacing;
-import com.sun.star.style.LineSpacingMode;
-import com.sun.star.style.ParagraphAdjust;
-
-
-
-// __________ Implementation __________
-
-/** text demo
- @author Sven Jacobi
- */
-
-public class TextDemo
-{
- public static void main( String args[] )
- {
- XComponent xDrawDoc = null;
- try
- {
- // get the remote office context of a running office (a new office
- // instance is started if necessary)
- com.sun.star.uno.XComponentContext xOfficeContext = Helper.connect();
-
- // suppress Presentation Autopilot when opening the document
- // properties are the same as described for
- // com.sun.star.document.MediaDescriptor
- PropertyValue[] pPropValues = new PropertyValue[ 1 ];
- pPropValues[ 0 ] = new PropertyValue();
- pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
-
- xDrawDoc = Helper.createDocument( xOfficeContext,
- "private:factory/sdraw", "_blank", 0, pPropValues );
-
- XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
-
-
- XShape xRectangle;
- XPropertySet xTextPropSet, xShapePropSet;
- LineSpacing aLineSpacing = new LineSpacing();
- aLineSpacing.Mode = LineSpacingMode.PROP;
-
-
-
- // first shape
- xRectangle = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 0 ),
- new Size( 15000, 7500 ),
- "com.sun.star.drawing.RectangleShape" );
- xShapes.add( xRectangle );
- xShapePropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xRectangle );
-
-
- // first paragraph
- xTextPropSet = ShapeHelper.addPortion( xRectangle, "Portion1", false );
- xTextPropSet.setPropertyValue( "CharColor", new Integer( 0xff0000 ) );
- xTextPropSet = ShapeHelper.addPortion( xRectangle, "Portion2", false );
- xTextPropSet.setPropertyValue( "CharColor", new Integer( 0x8080ff ) );
- aLineSpacing.Height = 100;
- ShapeHelper.setPropertyForLastParagraph( xRectangle, "ParaLineSpacing",
- aLineSpacing );
-
- // second paragraph
- xTextPropSet = ShapeHelper.addPortion( xRectangle, "Portion3", true );
- xTextPropSet.setPropertyValue( "CharColor", new Integer( 0xff ) );
- aLineSpacing.Height = 200;
- ShapeHelper.setPropertyForLastParagraph( xRectangle, "ParaLineSpacing",
- aLineSpacing );
-
-
-
- // second shape
- xRectangle = ShapeHelper.createShape( xDrawDoc,
- new Point( 0, 10000 ),
- new Size( 21000, 12500 ),
- "com.sun.star.drawing.RectangleShape" );
- xShapes.add( xRectangle );
- xShapePropSet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xRectangle );
- xShapePropSet.setPropertyValue( "TextFitToSize",
- TextFitToSizeType.PROPORTIONAL );
- xShapePropSet.setPropertyValue( "TextLeftDistance", new Integer(2500));
- xShapePropSet.setPropertyValue( "TextRightDistance", new Integer(2500));
- xShapePropSet.setPropertyValue( "TextUpperDistance", new Integer(2500));
- xShapePropSet.setPropertyValue( "TextLowerDistance", new Integer(2500));
- xTextPropSet = ShapeHelper.addPortion( xRectangle,
- "using TextFitToSize", false );
- xTextPropSet.setPropertyValue( "ParaAdjust", ParagraphAdjust.CENTER );
- xTextPropSet.setPropertyValue( "CharColor", new Integer(0xff00));
- xTextPropSet = ShapeHelper.addPortion(xRectangle,
- "and a Border distance of 2,5 cm",
- true );
- xTextPropSet.setPropertyValue( "CharColor", new Integer( 0xff0000 ) );
-
- }
- catch( Exception ex )
- {
- System.out.println( ex );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Drawing/makefile.mk b/odk/examples/DevelopersGuide/Drawing/makefile.mk
deleted file mode 100644
index 50c892f6..00000000
--- a/odk/examples/DevelopersGuide/Drawing/makefile.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-DRAWING_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/ChangeOrderDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/ControlAndSelectDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/CustomShowDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/DrawingDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/DrawViewDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/FillAndLineStyleDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/GluePointDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/GraphicExportDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/Helper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/LayerDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/ObjectTransformationDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/Organigram.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/PageHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/PresentationDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/ShapeHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/SimplePresentation.odp \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/StyleDemo.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Drawing$/TextDemo.java
-
-DIR_FILE_LIST= \
- $(DRAWING_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_drawing_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_drawing.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Addons.xcu b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Addons.xcu
deleted file mode 100644
index 4d25fee3..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Addons.xcu
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="OfficeMenuBar">
- <node oor:name="com.foocorp.foo-ext:Menu" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en">Foo E~xtension</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <node oor:name="Submenu">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.sun.star.script:DialogWithHelp.Module1.main?language=Basic&amp;location=application</value>
- </prop>
- <prop oor:name="ImageIdentifier" oor:type="xs:string">
- <value/>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en">Start Foo Dialog...</value>
- </prop>
- </node>
- <node oor:name="m3" oor:op="replace">
- </node>
- </node>
- </node>
- </node>
- <node oor:name="OfficeToolBar">
- <node oor:name="com.foocorp.foo-ext:ToolbarItem1" oor:op="replace">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL">
- <value>vnd.sun.star.script:DialogWithHelp.Module1.main?language=Basic&amp;location=application</value>
- </prop>
- <prop oor:name="Title">
- <value xml:lang="en-US">Foo Toolbar Item</value>
- <value xml:lang="de">Foo Toolbar Eintrag</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Dialog1.xdl b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Dialog1.xdl
deleted file mode 100644
index e9e84bf4..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Dialog1.xdl
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog1" dlg:left="244" dlg:top="200" dlg:width="201" dlg:height="169" dlg:help-url="com.foocorp.foo-ext:FooDialog" dlg:closeable="true" dlg:moveable="true" dlg:title="Foo Dialog">
- <dlg:bulletinboard>
- <dlg:button dlg:id="CommandButton1" dlg:tab-index="0" dlg:left="26" dlg:top="26" dlg:width="75" dlg:height="35" dlg:help-url="com.foocorp.foo-ext:FooDialogButton" dlg:value="Do it !">
- <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:DialogWithHelp.Module1.HandleDoIt?language=Basic&amp;location=application" script:language="Script"/>
- </dlg:button>
- <dlg:button dlg:id="CommandButton2" dlg:tab-index="1" dlg:left="88" dlg:top="100" dlg:width="87" dlg:height="38" dlg:value="Dummy Button, no help"/>
- </dlg:bulletinboard>
-</dlg:window> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Module1.xba b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Module1.xba
deleted file mode 100644
index 9e7745e2..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/Module1.xba
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic">REM ***** BASIC *****
-
-Sub Main
- DialogLibraries.loadLibrary( &quot;DialogWithHelp&quot; )
- oDlg = CreateUnoDialog( DialogLibraries.DialogWithHelp.Dialog1 )
- oDlg.execute()
-End Sub
-
-Sub HandleDoIt
- msgbox &quot;I did it!&quot;
-End Sub
-
-
-</script:module> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/dialog.xlb b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/dialog.xlb
deleted file mode 100644
index bd7d00ef..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/dialog.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="DialogWithHelp" library:readonly="false" library:passwordprotected="false">
- <library:element library:name="Dialog1"/>
-</library:library> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/script.xlb b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/script.xlb
deleted file mode 100644
index 42317760..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/DialogWithHelp/script.xlb
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="DialogWithHelp" library:readonly="false" library:passwordprotected="false">
- <library:element library:name="Module1"/>
-</library:library> \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/META-INF/manifest.xml b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/META-INF/manifest.xml
deleted file mode 100644
index 2334c089..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/META-INF/manifest.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:full-path="DialogWithHelp/" manifest:media-type="application/vnd.sun.star.basic-library"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.help" manifest:full-path="help"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="Addons.xcu"/>
-</manifest:manifest>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Makefile b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Makefile
deleted file mode 100644
index d46590ef..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/Makefile
+++ /dev/null
@@ -1,118 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the DialogWithHelp example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=ExtDialogWithHelp
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=DialogWithHelp
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)devguide_basic_$(COMP_NAME)_register_component.flag
-
-COMP_LIBRARY_FILES=\
- DialogWithHelp/dialog.xlb\
- DialogWithHelp/script.xlb\
- DialogWithHelp/Module1.xba\
- DialogWithHelp/Dialog1.xdl
-
-COMP_MISC_FILES=\
- META-INF/manifest.xml\
- Addons.xcu\
- description.xml
-
-COMP_HELP_FILES=\
- help/de/com.foocorp.foo-ext/page1.xhp\
- help/de/com.foocorp.foo-ext/page2.xhp\
- help/de/com.foocorp.foo-ext/subfolder/anotherpage.xhp\
- help/en/com.foocorp.foo-ext/page1.xhp\
- help/en/com.foocorp.foo-ext/page2.xhp\
- help/en/com.foocorp.foo-ext/subfolder/anotherpage.xhp\
-
-# Targets
-.PHONY: ALL
-ALL : $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_LIBRARY_FILES) $(COMP_MISC_FILES) $(COMP_HELP_FILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_LIBRARY_FILES)
- $(SDK_ZIP) $@ $(COMP_MISC_FILES)
- $(SDK_ZIP) $@ $(COMP_HELP_FILES)
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(SAMPLE_NAME) : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)DialogWithHelp$(QM)" library was installed in your office installation
- @echo if SDK_AUTO_DEPLOYMENT = YES. You can use it in the BASIC IDE as a normal
- @echo Basic library. You also will find a new top level menu "$(QM)Foo Extension$(QM)"
- @echo with one menu entry "$(QM)Start Foo Dialog$(QM)" to start it directly. If a
- @echo document is active there is also a "$(QM)Foo Toolbar Item$(QM)" doing the same.
- @echo All help index entries provided by the help content start with Foo.
- @echo --------------------------------------------------------------------------------
-
-$(COMP_NAME).odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(COMP_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/description.xml b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/description.xml
deleted file mode 100644
index c2f2e398..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/description.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
- <version value="1.0" />
- <identifier value="com.foocorp.foo-ext"/>
- <dependencies/>
- <update-information/>
- <registration/>
-</description>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page1.xhp b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page1.xhp
deleted file mode 100644
index 34909072..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page1.xhp
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<helpdocument version="1.0">
-<meta>
-<topic id="comfoocorpfooextpage1" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="de">DE Extension foo page1 DE</title>
-<filename>/com.foocorp.foo-ext/page1.xhp</filename>
-</topic>
-</meta>
-<body>
-<bookmark xml-lang="de" branch="index" id="bm_id0001">
-<bookmark_value>Foo Einzel-Eintrag fuer page1</bookmark_value>
-<bookmark_value>Foo Alle Seiten;page1</bookmark_value>
-</bookmark>
-<bookmark xml-lang="de" branch="index" id="bm_id0002_swriter_sdraw">
-<bookmark_value>Foo Einzel-Eintrag page1, nur swriter/sdraw</bookmark_value>
-</bookmark>
-<paragraph role="heading" id="hd_id0001" xml-lang="de" level="1">DE Extension foo page1 DE</paragraph>
-<paragraph role="paragraph" id="par_id0001" xml-lang="de">Dies ist "page1" der Extension foo Hilfe.
-<comment>Kommentar am Ende des Paragraphen</comment></paragraph>
-<comment>Einige Links...</comment>
-<paragraph role="heading" id="hd_id0002" xml-lang="de" level="2">Einige Links...</paragraph>
-<paragraph role="paragraph" id="par_id0002" xml-lang="de">
-<link href="com.foocorp.foo-ext/page2.xhp">Dies</link> ist ein Link zu "page2" der Extension foo Hilfe.</paragraph>
-<paragraph role="paragraph" id="par_id0003" xml-lang="de">
-<link href="com.foocorp.foo-ext/page1.xhp#target">Dies</link> ist ein Link zu einer Section innerhalb einer Hilfe-Datei (unten in dieser Datei, kann aber auch in einer anderen Datei sein).</paragraph>
-<paragraph role="paragraph" id="par_id0004" xml-lang="de">
-<link href="text/shared/guide/main.xhp">Dies</link> ist ein Link zu einer Hilfe-Seite in der installierten Hilfe.</paragraph>
-<paragraph role="heading" id="hd_id0003" xml-lang="de" level="2">Etwas Fuell-Text</paragraph>
-<paragraph role="paragraph" id="par_id0005" xml-lang="de">Ich mag Fuell-Text. Ich mag Fuell-Text. Ich mag Fuell-Text.</paragraph>
-<paragraph role="paragraph" id="par_id0006" xml-lang="de">Ich mag Fuell-Text. Ich mag Fuell-Text. Ich mag Fuell-Text.</paragraph>
-<paragraph role="paragraph" id="par_id0007" xml-lang="de">Ich mag Fuell-Text. Ich mag Fuell-Text. Ich mag Fuell-Text.</paragraph>
-<paragraph role="paragraph" id="par_id0008" xml-lang="de">Ich mag Fuell-Text. Ich mag Fuell-Text. Ich mag Fuell-Text.</paragraph>
-<paragraph role="paragraph" id="par_id0009" xml-lang="de">Ich mag Fuell-Text. Ich mag Fuell-Text. Ich mag Fuell-Text.</paragraph>
-<paragraph role="paragraph" id="par_id0010" xml-lang="de">Ich mag Fuell-Text. Ich mag Fuell-Text. Ich mag Fuell-Text.</paragraph>
-<section id="target">
-<paragraph role="heading" id="hd_id0004" xml-lang="de" level="2">Section "target"</paragraph>
-<paragraph role="paragraph" id="par_id0011" xml-lang="de">
-This is a section within the file page1.xhp. The section has the name "target".
-</paragraph>
-</section>
-<paragraph role="heading" id="hd_id0005" xml-lang="de" level="2">Noch mehr Fuell-Text</paragraph>
-<paragraph role="paragraph" id="par_id0012" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0013" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0014" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0015" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0016" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0017" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0018" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0019" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0020" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0021" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0022" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0023" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0024" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0025" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0026" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0027" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0028" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0029" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0030" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0031" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0032" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0033" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0034" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0035" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<paragraph role="paragraph" id="par_id0036" xml-lang="de" >Dieser Text fuellt die Seite um die Section "target" oben anzeigen zu koennen.</paragraph>
-<section id="relatedtopics">
-<paragraph role="paragraph" id="par_id0037" xml-lang="de">
-Diese Section zeigt einen Link der durch Einfuegen der "linkvar" Variable aus subfolder/anotherpage.xhp erzeugt wurde.</paragraph>
-<embed href="com.foocorp.foo-ext/subfolder/anotherpage.xhp#linkvar"/>
-</section>
-</body>
-</helpdocument>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page2.xhp b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page2.xhp
deleted file mode 100644
index 7436b51b..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/page2.xhp
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<helpdocument version="1.0">
-<meta>
-<topic id="comfoocorpfooextpage2" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="de">DE Extension foo page2 DE</title>
-<filename>/com.foocorp.foo-ext/page2.xhp</filename>
-</topic>
-</meta>
-<body>
-<bookmark xml-lang="de" branch="index" id="bm_id0001">
-<bookmark_value>Foo Alle Seiten;page2</bookmark_value>
-</bookmark>
-<paragraph role="heading" id="hd_id0001" xml-lang="de" level="1">DE Extension foo page2 DE</paragraph>
-<paragraph role="paragraph" id="par_id0001" xml-lang="de">Dies ist "page2" der Extension foo Hilfe.</paragraph>
-<paragraph role="heading" id="hd_id0002" xml-lang="de" level="2">Einige Links...</paragraph>
-<paragraph role="paragraph" id="par_id0002" xml-lang="de">
-<link href="com.foocorp.foo-ext/page1.xhp#target">Dies</link> ist ein Link zu einer Section in "page1".</paragraph>
-<paragraph role="paragraph" id="par_id0003" xml-lang="de">
-<link href="text/shared/guide/main.xhp">Dies</link> ist ein Link zu einer Hilfe-Seite in der installierten Hilfe.</paragraph>
-<section id="relatedtopics">
-<paragraph role="paragraph" id="par_id0004" xml-lang="de">
-Diese Section zeigt einen Link der durch Einfuegen der "linkvar" Variable aus subfolder/anotherpage.xhp erzeugt wurde.
-</paragraph>
-<embed href="com.foocorp.foo-ext/subfolder/anotherpage.xhp#linkvar"/>
-</section>
-</body>
-</helpdocument>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/subfolder/anotherpage.xhp b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/subfolder/anotherpage.xhp
deleted file mode 100644
index 50358d06..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext/subfolder/anotherpage.xhp
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<helpdocument version="1.0">
-<meta>
-<topic id="comfoocorpfooextsubfolder/anotherpage" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="de">DE Extension foo subfolder/anotherpage DE</title>
-<filename>/com.foocorp.foo-ext/subfolder/anotherpage.xhp</filename>
-</topic>
-</meta>
-<body>
-<bookmark xml-lang="de" branch="index" id="bm_id0001">
-<bookmark_value>Foo Alle Seiten;subfolder/anotherpage</bookmark_value>
-</bookmark>
-<paragraph role="heading" id="hd_id0001" xml-lang="de" level="1">DE Extension foo subfolder/anotherpage DE</paragraph>
-<paragraph role="paragraph" id="par_id0001" xml-lang="de">Dies ist subfolder/anotherpage der Extension foo Hilfe.
-<comment>Comment at end of paragraph</comment></paragraph>
-<bookmark xml-lang="de" branch="hid/vnd.sun.star.script:DialogWithHelp.Module1.main?language=Basic&amp;location=application" id="bm_id0002" localize="false"/>
-<paragraph role="paragraph" id="hd_id0002" xml-lang="de"><ahelp hid="hid/vnd.sun.star.script:DialogWithHelp.Module1.main?language=Basic&amp;location=application" visibility="hidden">
-Hier klicken, um den eindrucksvollen Foo Dialog zu oeffnen</ahelp></paragraph>
-<bookmark xml-lang="de" branch="hid/com.foocorp.foo-ext:FooDialog" id="bm_id0003" localize="false"/>
-<paragraph role="heading" id="hd_id0002" xml-lang="de" level="2">Hilfe fuer den Foo Dialog</paragraph>
-<paragraph role="paragraph" id="hd_id0003" xml-lang="de">Der Foo Dialog ist ein sehr wichtiger Dialog, der...</paragraph>
-<bookmark xml-lang="de" branch="hid/com.foocorp.foo-ext:FooDialogButton" id="bm_id0004" localize="false"/>
-<paragraph role="paragraph" id="hd_id0004" xml-lang="de">
-<ahelp hid="hid/com.foocorp.foo-ext:FooDialogButton" visibility="hidden">
-Dieser Knopf bringt es!</ahelp></paragraph>
-<paragraph role="heading" id="hd_id0003" xml-lang="de" level="2">Hilfe fuer den "Do It !" Knopf</paragraph>
-<paragraph role="paragraph" id="hd_id0005" xml-lang="de">Der "Do It !" Knopf tut es!</paragraph>
-<paragraph role="heading" id="hd_id0004" xml-lang="de" level="2">Etwas fuelltext</paragraph>
-<paragraph role="paragraph" id="par_id0006" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0007" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0008" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0009" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0010" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0011" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0012" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0013" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0014" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0015" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0016" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0017" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0018" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0019" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0020" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0021" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0022" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0023" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0024" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0025" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0026" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0027" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0028" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0029" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0030" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0031" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0032" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0033" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0034" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0035" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0036" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0037" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0038" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0039" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0040" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0041" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0042" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0043" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0044" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0045" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0046" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0047" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0048" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0049" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0050" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0051" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0052" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0053" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0054" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0055" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0056" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0057" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0058" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0059" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0060" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0061" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0062" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0063" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0064" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0065" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0066" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0067" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0068" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="paragraph" id="par_id0069" xml-lang="de">Dieser Text fuellt die Seite.</paragraph>
-<paragraph role="heading" id="hd_id0005" xml-lang="de" level="2">Variable, die einen Link definiert</paragraph>
-<paragraph role="paragraph" id="par_id0070" xml-lang="de">
-<variable id="linkvar">
-<link href="com.foocorp.foo-ext/page2.xhp" name="linkvar page2">Link zu page2, definert als variable in subfolder/anotherpage.xhp</link>
-</variable>
-</paragraph>
-</body>
-</helpdocument>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page1.xhp b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page1.xhp
deleted file mode 100644
index 4d497420..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page1.xhp
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<helpdocument version="1.0">
-<meta>
-<topic id="comfoocorpfooextpage1" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="en-US">Extension foo page1</title>
-<filename>/com.foocorp.foo-ext/page1.xhp</filename>
-</topic>
-</meta>
-<body>
-<bookmark xml-lang="en-US" branch="index" id="bm_id0001">
-<bookmark_value>Foo Single level entry page1</bookmark_value>
-<bookmark_value>Foo All Pages;page1</bookmark_value>
-</bookmark>
-<bookmark xml-lang="en-US" branch="index" id="bm_id0002_swriter_sdraw">
-<bookmark_value>Foo Single level entry page1, swriter/sdraw only</bookmark_value>
-</bookmark>
-<paragraph role="heading" id="hd_id0001" xml-lang="en-US" level="1">Extension foo page1</paragraph>
-<paragraph role="paragraph" id="par_id0001" xml-lang="en-US">This is "page1" of extension foo help.
-<comment>Comment at end of paragraph</comment></paragraph>
-<comment>Some links...</comment>
-<paragraph role="heading" id="hd_id0002" xml-lang="en-US" level="2">Some links...</paragraph>
-<paragraph role="paragraph" id="par_id0002" xml-lang="en-US">
-<link href="com.foocorp.foo-ext/page2.xhp">This</link> is a link to "page2" of extension foo help.</paragraph>
-<paragraph role="paragraph" id="par_id0003" xml-lang="en-US">
-<link href="com.foocorp.foo-ext/page1.xhp#target">This</link> is a link to a section within a help file (down in this file, but can be in another file as well).</paragraph>
-<paragraph role="paragraph" id="par_id0004" xml-lang="en-US">
-<link href="text/shared/guide/main.xhp">This</link> is a link to a help page in the installed help.</paragraph>
-<paragraph role="heading" id="hd_id0003" xml-lang="en-US" level="2">Some fill text</paragraph>
-<paragraph role="paragraph" id="par_id0005" xml-lang="en-US">I like fill text. I like fill text. I like fill text.</paragraph>
-<paragraph role="paragraph" id="par_id0006" xml-lang="en-US">I like fill text. I like fill text. I like fill text.</paragraph>
-<paragraph role="paragraph" id="par_id0007" xml-lang="en-US">I like fill text. I like fill text. I like fill text.</paragraph>
-<paragraph role="paragraph" id="par_id0008" xml-lang="en-US">I like fill text. I like fill text. I like fill text.</paragraph>
-<paragraph role="paragraph" id="par_id0009" xml-lang="en-US">I like fill text. I like fill text. I like fill text.</paragraph>
-<paragraph role="paragraph" id="par_id0010" xml-lang="en-US">I like fill text. I like fill text. I like fill text.</paragraph>
-<section id="target">
-<paragraph role="heading" id="hd_id0004" xml-lang="en-US" level="2">Section "target"</paragraph>
-<paragraph role="paragraph" id="par_id0011" xml-lang="en-US">
-This is a section within the file page1.xhp. The section has the name "target".
-</paragraph>
-</section>
-<paragraph role="heading" id="hd_id0005" xml-lang="en-US" level="2">Some more fill text</paragraph>
-<paragraph role="paragraph" id="par_id0012" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0013" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0014" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0015" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0016" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0017" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0018" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0019" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0020" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0021" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0022" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0023" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0024" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0025" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0026" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0027" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0028" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0029" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0030" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0031" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0032" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0033" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0034" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0035" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<paragraph role="paragraph" id="par_id0036" xml-lang="en-US">This text fills the page allowing to show section "target" at the top.</paragraph>
-<section id="relatedtopics">
-<paragraph role="paragraph" id="par_id0037" xml-lang="en-US">
-This section shows a link created by embedding the "linkvar" variable defined in subfolder/anotherpage.xhp.</paragraph>
-<embed href="com.foocorp.foo-ext/subfolder/anotherpage.xhp#linkvar"/>
-</section>
-</body>
-</helpdocument>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page2.xhp b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page2.xhp
deleted file mode 100644
index 02bee1ce..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/page2.xhp
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<helpdocument version="1.0">
-<meta>
-<topic id="comfoocorpfooextpage2" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="en-US">Extension foo page2</title>
-<filename>/com.foocorp.foo-ext/page2.xhp</filename>
-</topic>
-</meta>
-<body>
-<bookmark xml-lang="en-US" branch="index" id="bm_id0001">
-<bookmark_value>Foo All Pages;page2</bookmark_value>
-</bookmark>
-<paragraph role="heading" id="hd_id0001" xml-lang="en-US" level="1">Extension foo page2</paragraph>
-<paragraph role="paragraph" id="par_id0001" xml-lang="en-US">This is "page2" of extension foo help.</paragraph>
-<paragraph role="heading" id="hd_id0002" xml-lang="en-US" level="2">Some links...</paragraph>
-<paragraph role="paragraph" id="par_id0002" xml-lang="en-US">
-<link href="com.foocorp.foo-ext/page1.xhp#target">This</link> is a link to a section within page1.</paragraph>
-<paragraph role="paragraph" id="par_id0003" xml-lang="en-US">
-<link href="text/shared/guide/main.xhp">This</link> is a link to a file of the already installed help.</paragraph>
-<section id="relatedtopics">
-<paragraph role="paragraph" id="par_id0004" xml-lang="en-US">
-This section shows a link created by embedding the "linkvar" variable defined in subfolder/anotherpage.xhp.</paragraph>
-<embed href="com.foocorp.foo-ext/subfolder/anotherpage.xhp#linkvar"/>
-</section>
-</body>
-</helpdocument>
diff --git a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/subfolder/anotherpage.xhp b/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/subfolder/anotherpage.xhp
deleted file mode 100644
index e2ccaa4e..00000000
--- a/odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext/subfolder/anotherpage.xhp
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<helpdocument version="1.0">
-<meta>
-<topic id="comfoocorpfooextsubfolder/anotherpage" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="en-US">Extension foo subfolder/anotherpage</title>
-<filename>/com.foocorp.foo-ext/subfolder/anotherpage.xhp</filename>
-</topic>
-</meta>
-<body>
-<bookmark xml-lang="en-US" branch="index" id="bm_id0001">
-<bookmark_value>Foo All Pages;subfolder/anotherpage</bookmark_value>
-</bookmark>
-<paragraph role="heading" id="hd_id0001" xml-lang="en-US" level="1">Extension foo subfolder/anotherpage</paragraph>
-<paragraph role="paragraph" id="par_id0001" xml-lang="en-US">This is subfolder/anotherpage of extension foo help.
-<comment>Comment at end of paragraph</comment></paragraph>
-<bookmark xml-lang="en-US" branch="hid/vnd.sun.star.script:DialogWithHelp.Module1.main?language=Basic&amp;location=application" id="bm_id0002" localize="false"/>
-<paragraph role="paragraph" id="hd_id0002" xml-lang="en-US"><ahelp hid="hid/vnd.sun.star.script:DialogWithHelp.Module1.main?language=Basic&amp;location=application" visibility="hidden">
-Click here to open the impressing Foo Dialog</ahelp></paragraph>
-<bookmark xml-lang="en-US" branch="hid/com.foocorp.foo-ext:FooDialog" id="bm_id0003" localize="false"/>
-<paragraph role="heading" id="hd_id0002" xml-lang="en-US" level="2">Help for the Foo Dialog</paragraph>
-<paragraph role="paragraph" id="hd_id0003" xml-lang="en-US">The Foo Dialog is a very important dialog that...</paragraph>
-<bookmark xml-lang="en-US" branch="hid/com.foocorp.foo-ext:FooDialogButton" id="bm_id0004" localize="false"/>
-<paragraph role="paragraph" id="hd_id0004" xml-lang="en-US">
-<ahelp hid="hid/com.foocorp.foo-ext:FooDialogButton" visibility="hidden">
-This button really does it!!</ahelp></paragraph>
-<paragraph role="heading" id="hd_id0003" xml-lang="en-US" level="2">Help for the "Do It !" button</paragraph>
-<paragraph role="paragraph" id="hd_id0005" xml-lang="en-US">The "Do It !" button does it!</paragraph>
-<paragraph role="heading" id="hd_id0004" xml-lang="en-US" level="2">Some fill text</paragraph>
-<paragraph role="paragraph" id="par_id0006" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0007" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0008" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0009" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0010" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0011" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0012" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0013" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0014" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0015" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0016" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0017" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0018" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0019" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0020" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0021" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0022" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0023" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0024" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0025" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0026" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0027" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0028" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0029" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0030" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0031" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0032" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0033" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0034" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0035" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0036" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0037" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0038" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0039" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0040" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0041" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0042" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0043" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0044" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0045" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0046" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0047" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0048" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0049" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0050" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0051" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0052" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0053" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0054" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0055" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0056" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0057" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0058" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0059" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0060" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0061" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0062" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0063" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0064" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0065" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0066" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0067" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0068" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="paragraph" id="par_id0069" xml-lang="en-US">This text fills the page.</paragraph>
-<paragraph role="heading" id="hd_id0005" xml-lang="en-US" level="2">Variable defining a link</paragraph>
-<paragraph role="paragraph" id="par_id0070" xml-lang="en-US">
-<variable id="linkvar">
-<link href="com.foocorp.foo-ext/page2.xhp" name="linkvar page2">Link to page2 defined as variable in subfolder/anotherpage.xhp</link>
-</variable>
-</paragraph>
-</body>
-</helpdocument>
diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java b/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java
deleted file mode 100644
index c965c664..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-public class FirstConnection extends java.lang.Object {
-
- public static void main(String[] args) {
- try {
- // get the remote office component context
- com.sun.star.uno.XComponentContext xContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- System.out.println("Connected to a running office ...");
-
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- String available = (null != xMCF ? "available" : "not available");
- System.out.println( "remote ServiceManager is " + available );
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java
deleted file mode 100644
index f4ef0922..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.sheet.XCellAddressable;
-import com.sun.star.sheet.XCellRangesQuery;
-import com.sun.star.sheet.XSheetCellRanges;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheetView;
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.table.XCell;
-import com.sun.star.uno.UnoRuntime;
-
-public class FirstLoadComponent {
-
- /** Creates a new instance of FirstLoadComponent */
- public FirstLoadComponent() {
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- try {
- // get the remote office component context
- XComponentContext xRemoteContext = Bootstrap.bootstrap();
- if (xRemoteContext == null) {
- System.err.println("ERROR: Could not bootstrap default Office.");
- }
-
- XMultiComponentFactory xRemoteServiceManager = xRemoteContext.getServiceManager();
-
- Object desktop = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xRemoteContext);
- XComponentLoader xComponentLoader = (XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, desktop);
-
- PropertyValue[] loadProps = new PropertyValue[0];
- XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, loadProps);
-
- XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)
- UnoRuntime.queryInterface(XSpreadsheetDocument.class,
- xSpreadsheetComponent);
-
- XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets();
- xSpreadsheets.insertNewByName("MySheet", (short)0);
- com.sun.star.uno.Type elemType = xSpreadsheets.getElementType();
-
- System.out.println(elemType.getTypeName());
- Object sheet = xSpreadsheets.getByName("MySheet");
- XSpreadsheet xSpreadsheet = (XSpreadsheet)UnoRuntime.queryInterface(
- XSpreadsheet.class, sheet);
-
- XCell xCell = xSpreadsheet.getCellByPosition(0, 0);
- xCell.setValue(21);
- xCell = xSpreadsheet.getCellByPosition(0, 1);
- xCell.setValue(21);
- xCell = xSpreadsheet.getCellByPosition(0, 2);
- xCell.setFormula("=sum(A1:A2)");
-
- XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCell);
- xCellProps.setPropertyValue("CellStyle", "Result");
-
- XModel xSpreadsheetModel = (XModel)UnoRuntime.queryInterface(
- XModel.class, xSpreadsheetComponent);
- XController xSpreadsheetController = xSpreadsheetModel.getCurrentController();
- XSpreadsheetView xSpreadsheetView = (XSpreadsheetView)
- UnoRuntime.queryInterface(XSpreadsheetView.class,
- xSpreadsheetController);
- xSpreadsheetView.setActiveSheet(xSpreadsheet);
-
- // *********************************************************
- // example for use of enum types
- xCellProps.setPropertyValue("VertJustify",
- com.sun.star.table.CellVertJustify.TOP);
-
-
- // *********************************************************
- // example for a sequence of PropertyValue structs
- // create an array with one PropertyValue struct, it contains
- // references only
- loadProps = new PropertyValue[1];
-
- // instantiate PropertyValue struct and set its member fields
- PropertyValue asTemplate = new PropertyValue();
- asTemplate.Name = "AsTemplate";
- asTemplate.Value = new Boolean(true);
-
- // assign PropertyValue struct to array of references for PropertyValue
- // structs
- loadProps[0] = asTemplate;
-
- // load calc file as template
- //xSpreadsheetComponent = xComponentLoader.loadComponentFromURL(
- // "file:///c:/temp/DataAnalysys.ods", "_blank", 0, loadProps);
-
- // *********************************************************
- // example for use of XEnumerationAccess
- XCellRangesQuery xCellQuery = (XCellRangesQuery)
- UnoRuntime.queryInterface(XCellRangesQuery.class, sheet);
- XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells(
- (short)com.sun.star.sheet.CellFlags.FORMULA);
- XEnumerationAccess xFormulas = xFormulaCells.getCells();
- XEnumeration xFormulaEnum = xFormulas.createEnumeration();
-
- while (xFormulaEnum.hasMoreElements()) {
- Object formulaCell = xFormulaEnum.nextElement();
- xCell = (XCell)UnoRuntime.queryInterface(XCell.class, formulaCell);
- XCellAddressable xCellAddress = (XCellAddressable)
- UnoRuntime.queryInterface(XCellAddressable.class, xCell);
- System.out.println("Formula cell in column " +
- xCellAddress.getCellAddress().Column
- + ", row " + xCellAddress.getCellAddress().Row
- + " contains " + xCell.getFormula());
- }
-
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit( 0 );
- }
- }
-
-}
-
-
-// import com.sun.star.uno.UnoRuntime;
-// import com.sun.star.uno.XComponentContext;
-// import com.sun.star.lang.XMultiComponentFactory;
-// import com.sun.star.lang.XComponent;
-// import com.sun.star.beans.XPropertySet;
-// import com.sun.star.beans.PropertyValue;
-// import com.sun.star.sheet.XSpreadsheetDocument;
-// import com.sun.star.sheet.XSpreadsheets;
-// import com.sun.star.sheet.XSpreadsheet;
-// import com.sun.star.sheet.XSpreadsheetView;
-// import com.sun.star.sheet.XCellRangesQuery;
-// import com.sun.star.sheet.XSheetCellRanges;
-// import com.sun.star.sheet.XCellAddressable;
-// import com.sun.star.table.XCell;
-// import com.sun.star.frame.XModel;
-// import com.sun.star.frame.XController;
-// import com.sun.star.frame.XComponentLoader;
-// import com.sun.star.container.XEnumeration;
-// import com.sun.star.container.XEnumerationAccess;
-
-// import com.sun.star.uno.AnyConverter;
-
-
-// /**
-// *
-// * @author dschulten
-// */
-// public class FirstLoadComponent {
-
-// /** Creates a new instance of FirstLoadComponent */
-// public FirstLoadComponent() {
-// }
-
-// /**
-// * @param args the command line arguments
-// */
-// private XComponentContext xRemoteContext = null;
-// private XMultiComponentFactory xRemoteServiceManager = null;
-
-// public static void main(String[] args) {
-// FirstLoadComponent firstLoadComponent1 = new FirstLoadComponent();
-// try {
-// firstLoadComponent1.useConnection();
-// }
-// catch (java.lang.Exception e){
-// System.out.println(e.getMessage());
-// e.printStackTrace();
-// }
-// finally {
-// System.exit(0);
-// }
-// }
-
-// private void useConnection() throws java.lang.Exception {
-// try {
-// // get the remote office component context
-// xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-// System.out.println("Connected to a running office ...");
-
-// xRemoteServiceManager = xRemoteContext.getServiceManager();
-// }
-// catch( Exception e) {
-// e.printStackTrace();
-// System.exit(1);
-// }
-
-// try {
-// Object desktop = xRemoteServiceManager.createInstanceWithContext(
-// "com.sun.star.frame.Desktop", xRemoteContext);
-// XComponentLoader xComponentLoader = (XComponentLoader)
-// UnoRuntime.queryInterface(XComponentLoader.class, desktop);
-
-// PropertyValue[] loadProps = new PropertyValue[0];
-// XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, loadProps);
-
-// XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)
-// UnoRuntime.queryInterface(XSpreadsheetDocument.class,
-// xSpreadsheetComponent);
-
-// XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets();
-// xSpreadsheets.insertNewByName("MySheet", (short)0);
-// com.sun.star.uno.Type elemType = xSpreadsheets.getElementType();
-
-// System.out.println(elemType.getTypeName());
-// Object sheet = xSpreadsheets.getByName("MySheet");
-// XSpreadsheet xSpreadsheet = (XSpreadsheet)UnoRuntime.queryInterface(
-// XSpreadsheet.class, sheet);
-
-// XCell xCell = xSpreadsheet.getCellByPosition(0, 0);
-// xCell.setValue(21);
-// xCell = xSpreadsheet.getCellByPosition(0, 1);
-// xCell.setValue(21);
-// xCell = xSpreadsheet.getCellByPosition(0, 2);
-// xCell.setFormula("=sum(A1:A2)");
-
-// XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface(
-// XPropertySet.class, xCell);
-// xCellProps.setPropertyValue("CellStyle", "Result");
-
-// XModel xSpreadsheetModel = (XModel)UnoRuntime.queryInterface(
-// XModel.class, xSpreadsheetComponent);
-// XController xSpreadsheetController = xSpreadsheetModel.getCurrentController();
-// XSpreadsheetView xSpreadsheetView = (XSpreadsheetView)
-// UnoRuntime.queryInterface(XSpreadsheetView.class,
-// xSpreadsheetController);
-// xSpreadsheetView.setActiveSheet(xSpreadsheet);
-
-// // *********************************************************
-// // example for use of enum types
-// xCellProps.setPropertyValue("VertJustify",
-// com.sun.star.table.CellVertJustify.TOP);
-
-
-// // *********************************************************
-// // example for a sequence of PropertyValue structs
-// // create an array with one PropertyValue struct, it contains
-// // references only
-// loadProps = new PropertyValue[1];
-
-// // instantiate PropertyValue struct and set its member fields
-// PropertyValue asTemplate = new PropertyValue();
-// asTemplate.Name = "AsTemplate";
-// asTemplate.Value = new Boolean(true);
-
-// // assign PropertyValue struct to array of references for PropertyValue
-// // structs
-// loadProps[0] = asTemplate;
-
-// // load calc file as template
-// //xSpreadsheetComponent = xComponentLoader.loadComponentFromURL(
-// // "file:///c:/temp/DataAnalysys.ods", "_blank", 0, loadProps);
-
-// // *********************************************************
-// // example for use of XEnumerationAccess
-// XCellRangesQuery xCellQuery = (XCellRangesQuery)
-// UnoRuntime.queryInterface(XCellRangesQuery.class, sheet);
-// XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells(
-// (short)com.sun.star.sheet.CellFlags.FORMULA);
-// XEnumerationAccess xFormulas = xFormulaCells.getCells();
-// XEnumeration xFormulaEnum = xFormulas.createEnumeration();
-
-// while (xFormulaEnum.hasMoreElements()) {
-// Object formulaCell = xFormulaEnum.nextElement();
-// xCell = (XCell)UnoRuntime.queryInterface(XCell.class, formulaCell);
-// XCellAddressable xCellAddress = (XCellAddressable)
-// UnoRuntime.queryInterface(XCellAddressable.class, xCell);
-// System.out.println("Formula cell in column " +
-// xCellAddress.getCellAddress().Column
-// + ", row " + xCellAddress.getCellAddress().Row
-// + " contains " + xCell.getFormula());
-// }
-
-// }
-// catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1
-// xRemoteContext = null;
-// throw e;
-// }
-// }
-// }
diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstUnoContact.java b/odk/examples/DevelopersGuide/FirstSteps/FirstUnoContact.java
deleted file mode 100644
index 4c8dd096..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/FirstUnoContact.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-public class FirstUnoContact {
-
- public static void main(String[] args) {
- try {
- // get the remote office component context
- com.sun.star.uno.XComponentContext xContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- System.out.println("Connected to a running office ...");
-
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- String available = (xMCF != null ? "available" : "not available");
- System.out.println( "remote ServiceManager is " + available );
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
deleted file mode 100644
index 047747e5..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
+++ /dev/null
@@ -1,462 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.beans.PropertyVetoException;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XWordCursor;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextTableCursor;
-import com.sun.star.table.XTableRows;
-import com.sun.star.table.XCellRange;
-import com.sun.star.table.XCell;
-import com.sun.star.table.XCellCursor;
-import com.sun.star.table.TableBorder;
-import com.sun.star.table.BorderLine;
-import com.sun.star.drawing.XShape;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Point;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSheetCellCursor;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.drawing.XDrawPageSupplier;
-import com.sun.star.drawing.XDrawPage;
-
-import com.sun.star.text.XTextTablesSupplier;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNamed;
-import com.sun.star.text.XBookmarksSupplier;
-import com.sun.star.text.XTextRange;
-
-/**
- *
- * @author dschulten
- */
-public class HelloTextTableShape {
-
- private XComponentContext xRemoteContext = null;
- private XMultiComponentFactory xRemoteServiceManager = null;
-
- /** Creates a new instance of HelloTextTableShape */
- public HelloTextTableShape() {
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- HelloTextTableShape helloTextTableShape1 = new HelloTextTableShape();
- try {
- helloTextTableShape1.useDocuments();
- }
- catch (java.lang.Exception e){
- System.err.println(e.getMessage());
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
-
- }
-
- protected void useDocuments() throws java.lang.Exception {
- useWriter();
- useCalc();
- useDraw();
- }
-
- protected void useWriter() throws java.lang.Exception {
- try {
- // create new writer document and get text, then manipulate text
- XComponent xWriterComponent = newDocComponent("swriter");
- XTextDocument xTextDocument = (XTextDocument)UnoRuntime.queryInterface(
- XTextDocument.class, xWriterComponent);
- XText xText = xTextDocument.getText();
-
- manipulateText(xText);
-
- // get internal service factory of the document
- XMultiServiceFactory xWriterFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xWriterComponent);
-
- // insert TextTable and get cell text, then manipulate text in cell
- Object table = xWriterFactory.createInstance("com.sun.star.text.TextTable");
- XTextContent xTextContentTable = (XTextContent)UnoRuntime.queryInterface(
- XTextContent.class, table);
-
- xText.insertTextContent(xText.getEnd(), xTextContentTable, false);
-
- XCellRange xCellRange = (XCellRange)UnoRuntime.queryInterface(
- XCellRange.class, table);
- XCell xCell = xCellRange.getCellByPosition(0, 1);
- XText xCellText = (XText)UnoRuntime.queryInterface(XText.class, xCell);
-
- manipulateText(xCellText);
- manipulateTable(xCellRange);
-
- // insert RectangleShape and get shape text, then manipulate text
- Object writerShape = xWriterFactory.createInstance(
- "com.sun.star.drawing.RectangleShape");
- XShape xWriterShape = (XShape)UnoRuntime.queryInterface(
- XShape.class, writerShape);
- xWriterShape.setSize(new Size(10000, 10000));
- XTextContent xTextContentShape = (XTextContent)UnoRuntime.queryInterface(
- XTextContent.class, writerShape);
-
- xText.insertTextContent(xText.getEnd(), xTextContentShape, false);
-
- XPropertySet xShapeProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, writerShape);
- // wrap text inside shape
- xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true));
-
-
- XText xShapeText = (XText)UnoRuntime.queryInterface(XText.class, writerShape);
-
- manipulateText(xShapeText);
- manipulateShape(xWriterShape);
-
-/* more code snippets used in the manual:
-
- Object bookmark = xWriterFactory.createInstance ( "com.sun.star.text.Bookmark" );
- // name the bookmark
- XNamed xNamed = (XNamed) UnoRuntime.queryInterface (
- XNamed.class, bookmark );
- xNamed.setName("MyUniqueBookmarkName");
-
- // get XTextContent interface and insert it at the end of the document
- XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface (
- XTextContent.class, bookmark );
- //mxDocText.insertTextContent ( mxDocText.getEnd(), xTextContent, false );
- xText.insertTextContent ( xText.getEnd(), xTextContent, false );
-
- //query BookmarksSupplier
- XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier)UnoRuntime.queryInterface(
- XBookmarksSupplier.class, xWriterComponent);
- XNameAccess xNamedBookmarks = xBookmarksSupplier.getBookmarks();
- Object foundBookmark = xNamedBookmarks.getByName("MyUniqueBookmarkName");
- XTextContent xFoundBookmark = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, foundBookmark);
- XTextRange xFound = xFoundBookmark.getAnchor();
- xFound.setString(" The throat mike, glued to her neck, "
- + "looked as much as possible like an analgesic dermadisk.");
-
-
-
-
- // first query the XTextTablesSupplier interface from our document
- XTextTablesSupplier xTablesSupplier = (XTextTablesSupplier) UnoRuntime.queryInterface(
- XTextTablesSupplier.class, xWriterComponent);
- // get the tables collection
- XNameAccess xNamedTables = xTablesSupplier.getTextTables();
-
- // now query the XIndexAccess from the tables collection
- XIndexAccess xIndexedTables = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, xNamedTables);
-
- // we need properties
- XPropertySet xTableProps = null;
-
- // get the tables
- for (int i = 0; i < xIndexedTables.getCount(); i++) {
- //Object table = xIndexedTables.getByIndex(i);
- table = xIndexedTables.getByIndex(i);
- xTableProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, table);
- xTableProps.setPropertyValue("BackColor", new Integer(0xC8FFB9));
- }
- */
- }
- catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1
- xRemoteContext = null;
- throw e;
- }
-
- }
-
- protected void useCalc() throws java.lang.Exception {
- try {
- // create new calc document and manipulate cell text
- XComponent xCalcComponent = newDocComponent("scalc");
- XSpreadsheetDocument xSpreadsheetDocument =
- (XSpreadsheetDocument)UnoRuntime.queryInterface(
- XSpreadsheetDocument .class, xCalcComponent);
- Object sheets = xSpreadsheetDocument.getSheets();
- XIndexAccess xIndexedSheets = (XIndexAccess)UnoRuntime.queryInterface(
- XIndexAccess.class, sheets);
- Object sheet = xIndexedSheets.getByIndex(0);
-
- //get cell A2 in first sheet
- XCellRange xSpreadsheetCells = (XCellRange)UnoRuntime.queryInterface(
- XCellRange.class, sheet);
- XCell xCell = xSpreadsheetCells.getCellByPosition(0,1);
- XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCell);
- xCellProps.setPropertyValue("IsTextWrapped", new Boolean(true));
-
- XText xCellText = (XText)UnoRuntime.queryInterface(XText.class, xCell);
-
- manipulateText(xCellText);
- manipulateTable(xSpreadsheetCells);
-
- // get internal service factory of the document
- XMultiServiceFactory xCalcFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xCalcComponent);
- // get Drawpage
- XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)UnoRuntime.queryInterface(XDrawPageSupplier.class, sheet);
- XDrawPage xDrawPage = xDrawPageSupplier.getDrawPage();
-
- // create and insert RectangleShape and get shape text, then manipulate text
- Object calcShape = xCalcFactory.createInstance(
- "com.sun.star.drawing.RectangleShape");
- XShape xCalcShape = (XShape)UnoRuntime.queryInterface(
- XShape.class, calcShape);
- xCalcShape.setSize(new Size(10000, 10000));
- xCalcShape.setPosition(new Point(7000, 3000));
-
- xDrawPage.add(xCalcShape);
-
- XPropertySet xShapeProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, calcShape);
- // wrap text inside shape
- xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true));
-
-
- XText xShapeText = (XText)UnoRuntime.queryInterface(XText.class, calcShape);
-
- manipulateText(xShapeText);
- manipulateShape(xCalcShape);
-
- }
- catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1
- xRemoteContext = null;
- throw e;
- }
-
- }
-
- protected void useDraw() throws java.lang.Exception {
- try {
- //create new draw document and insert ractangle shape
- XComponent xDrawComponent = newDocComponent("sdraw");
- XDrawPagesSupplier xDrawPagesSupplier =
- (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, xDrawComponent);
-
- Object drawPages = xDrawPagesSupplier.getDrawPages();
- XIndexAccess xIndexedDrawPages = (XIndexAccess)UnoRuntime.queryInterface(
- XIndexAccess.class, drawPages);
- Object drawPage = xIndexedDrawPages.getByIndex(0);
- XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface(XDrawPage.class, drawPage);
-
- // get internal service factory of the document
- XMultiServiceFactory xDrawFactory =
- (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xDrawComponent);
-
- Object drawShape = xDrawFactory.createInstance(
- "com.sun.star.drawing.RectangleShape");
- XShape xDrawShape = (XShape)UnoRuntime.queryInterface(XShape.class, drawShape);
- xDrawShape.setSize(new Size(10000, 20000));
- xDrawShape.setPosition(new Point(5000, 5000));
- xDrawPage.add(xDrawShape);
-
- XText xShapeText = (XText)UnoRuntime.queryInterface(XText.class, drawShape);
- XPropertySet xShapeProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, drawShape);
-
- // wrap text inside shape
- xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true));
-
- manipulateText(xShapeText);
- manipulateShape(xDrawShape);
- }
- catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1
- xRemoteContext = null;
- throw e;
- }
-
-
- }
-
- protected void manipulateText(XText xText) throws com.sun.star.uno.Exception {
- // simply set whole text as one string
- xText.setString("He lay flat on the brown, pine-needled floor of the forest, "
- + "his chin on his folded arms, and high overhead the wind blew in the tops "
- + "of the pine trees.");
-
- // create text cursor for selecting and formatting
- XTextCursor xTextCursor = xText.createTextCursor();
- XPropertySet xCursorProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xTextCursor);
-
- // use cursor to select "He lay" and apply bold italic
- xTextCursor.gotoStart(false);
- xTextCursor.goRight((short)6, true);
- // from CharacterProperties
- xCursorProps.setPropertyValue("CharPosture",
- com.sun.star.awt.FontSlant.ITALIC);
- xCursorProps.setPropertyValue("CharWeight",
- new Float(com.sun.star.awt.FontWeight.BOLD));
-
- // add more text at the end of the text using insertString
- xTextCursor.gotoEnd(false);
- xText.insertString(xTextCursor, " The mountainside sloped gently where he lay; "
- + "but below it was steep and he could see the dark of the oiled road "
- + "winding through the pass. There was a stream alongside the road "
- + "and far down the pass he saw a mill beside the stream and the falling water "
- + "of the dam, white in the summer sunlight.", false);
- // after insertString the cursor is behind the inserted text, insert more text
- xText.insertString(xTextCursor, "\n \"Is that the mill?\" he asked.", false);
- }
-
- protected void manipulateTable(XCellRange xCellRange) throws com.sun.star.uno.Exception {
-
- String backColorPropertyName = "";
- XPropertySet xTableProps = null;
-
- // enter column titles and a cell value
- XCell xCell = xCellRange.getCellByPosition(0,0);
- XText xCellText = (XText)UnoRuntime.queryInterface(XText.class, xCell);
- xCellText.setString("Quotation");
- xCell = xCellRange.getCellByPosition(1,0);
- xCellText = (XText)UnoRuntime.queryInterface(XText.class, xCell);
- xCellText.setString("Year");
- xCell = xCellRange.getCellByPosition(1,1);
- xCell.setValue(1940);
- XCellRange xSelectedCells = xCellRange.getCellRangeByName("A1:B1");
- XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xSelectedCells);
-
- // format table headers and table borders
- // we need to distinguish text and sheet tables:
- // property name for cell colors is different in text and sheet cells
- // we want to apply TableBorder to whole text table, but only to sheet cells with content
- XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface(
- XServiceInfo.class, xCellRange);
- if (xServiceInfo.supportsService("com.sun.star.sheet.Spreadsheet")) {
- backColorPropertyName = "CellBackColor";
- xSelectedCells = xCellRange.getCellRangeByName("A1:B2");
- xTableProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xSelectedCells);
- }
- else if (xServiceInfo.supportsService("com.sun.star.text.TextTable")) {
- backColorPropertyName = "BackColor";
- xTableProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCellRange);
- }
- // set cell background color
- xCellProps.setPropertyValue(backColorPropertyName, new Integer(0x99CCFF));
-
- // set table borders
- // create description for blue line, width 10
- BorderLine theLine = new BorderLine();
- theLine.Color = 0x000099;
- theLine.OuterLineWidth = 10;
- // apply line description to all border lines and make them valid
- TableBorder bord = new TableBorder();
- bord.VerticalLine = bord.HorizontalLine =
- bord.LeftLine = bord.RightLine =
- bord.TopLine = bord.BottomLine =
- theLine;
- bord.IsVerticalLineValid = bord.IsHorizontalLineValid =
- bord.IsLeftLineValid = bord.IsRightLineValid =
- bord.IsTopLineValid = bord.IsBottomLineValid =
- true;
-
- xTableProps.setPropertyValue("TableBorder", bord);
-
- bord = (TableBorder)xTableProps.getPropertyValue("TableBorder");
- theLine = bord.TopLine;
- int col = theLine.Color;
- System.out.println(col);
- }
-
- protected void manipulateShape(XShape xShape) throws com.sun.star.uno.Exception {
- XPropertySet xShapeProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xShape);
- xShapeProps.setPropertyValue("FillColor", new Integer(0x99CCFF));
- xShapeProps.setPropertyValue("LineColor", new Integer(0x000099));
- xShapeProps.setPropertyValue("RotateAngle", new Integer(3000));
-
- xShapeProps.setPropertyValue("TextLeftDistance", new Integer(0));
- xShapeProps.setPropertyValue("TextRightDistance", new Integer(0));
- xShapeProps.setPropertyValue("TextUpperDistance", new Integer(0));
- xShapeProps.setPropertyValue("TextLowerDistance", new Integer(0));
- }
-
-
- protected XComponent newDocComponent(String docType) throws java.lang.Exception {
- String loadUrl = "private:factory/" + docType;
- xRemoteServiceManager = this.getRemoteServiceManager();
- Object desktop = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xRemoteContext);
- XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
- XComponentLoader.class, desktop);
- PropertyValue[] loadProps = new PropertyValue[0];
- return xComponentLoader.loadComponentFromURL(loadUrl, "_blank", 0, loadProps);
- }
-
- protected XMultiComponentFactory getRemoteServiceManager() throws java.lang.Exception {
- if (xRemoteContext == null && xRemoteServiceManager == null) {
- try {
- // First step: get the remote office component context
- xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- xRemoteServiceManager = xRemoteContext.getServiceManager();
- }
- catch( Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- return xRemoteServiceManager;
- }
-}
diff --git a/odk/examples/DevelopersGuide/FirstSteps/Makefile b/odk/examples/DevelopersGuide/FirstSteps/Makefile
deleted file mode 100644
index 782e9d1f..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/Makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the FirstSteps examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=FirstStepsExamples
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=FirstUnoContact
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-APP2_NAME=FirstLoadComponent
-APP2_JAR=$(OUT_APP_CLASS)/$(APP2_NAME).jar
-APP3_NAME=HelloTextTableShape
-APP3_JAR=$(OUT_APP_CLASS)/$(APP3_NAME).jar
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class
-$(APP3_JAR) : $(OUT_APP_CLASS)/$(APP3_NAME).mf $(OUT_APP_CLASS)/$(APP3_NAME).class
-
-$(EXAMPLE_NAME) : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/FirstSteps/build_FirstUnoContact.xml b/odk/examples/DevelopersGuide/FirstSteps/build_FirstUnoContact.xml
deleted file mode 100644
index e2b534f8..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/build_FirstUnoContact.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project basedir="." default="all" name="FirstUnoContact">
-
- <property environment="env"/>
- <property name="OFFICE_HOME" value="${env.OFFICE_HOME}"/>
- <property name="OO_SDK_HOME" value="${env.OO_SDK_HOME}"/>
-
- <target name="init">
- <property name="OUTDIR" value="${OO_SDK_HOME}/WINExample.out/class/FirstUnoContact"/>
- </target>
-
- <path id="office.class.path">
- <filelist dir="${OFFICE_HOME}/program/classes"
- files="jurt.jar,unoil.jar,ridl.jar,juh.jar"/>
- </path>
-
- <fileset id="bootstrap.glue.code" dir="${OO_SDK_HOME}/classes">
- <patternset>
- <include name="com/sun/star/lib/loader/*.class"/>
- <include name="win/unowinreg.dll"/>
- </patternset>
- </fileset>
-
- <target name="compile" depends="init">
- <mkdir dir="${OUTDIR}"/>
- <javac debug="true" deprecation="true" destdir="${OUTDIR}" srcdir=".">
- <classpath refid="office.class.path"/>
- </javac>
- </target>
-
- <target name="jar" depends="init,compile">
- <jar basedir="${OUTDIR}" compress="true"
- jarfile="${OUTDIR}/FirstUnoContact.jar">
- <exclude name="**/*.java"/>
- <exclude name="*.jar"/>
- <fileset refid="bootstrap.glue.code"/>
- <manifest>
- <attribute name="Main-Class" value="com.sun.star.lib.loader.Loader"/>
- <section name="com/sun/star/lib/loader/Loader.class">
- <attribute name="Application-Class" value="FirstUnoContact"/>
- </section>
- </manifest>
- </jar>
- </target>
-
- <target name="all" description="Build everything." depends="init,compile,jar">
- <echo message="Application built. FirstUnoContact!"/>
- </target>
-
- <target name="run" description="Try running it." depends="init,all">
- <java jar="${OUTDIR}/FirstUnoContact.jar" failonerror="true" fork="true">
- </java>
- </target>
-
- <target name="clean" description="Clean all build products." depends="init">
- <delete>
- <fileset dir="${OUTDIR}">
- <include name="**/*.class"/>
- </fileset>
- </delete>
- <delete file="${OUTDIR}/FirstUnoContact.jar"/>
- </target>
-
-</project>
diff --git a/odk/examples/DevelopersGuide/FirstSteps/makefile.mk b/odk/examples/DevelopersGuide/FirstSteps/makefile.mk
deleted file mode 100644
index 3582a1e1..00000000
--- a/odk/examples/DevelopersGuide/FirstSteps/makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-FIRSTSTEPS_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/FirstSteps$/FirstUnoContact.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/FirstSteps$/build_FirstUnoContact.xml \
- $(DESTDIRDEVGUIDEEXAMPLES)$/FirstSteps$/FirstLoadComponent.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/FirstSteps$/HelloTextTableShape.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/FirstSteps$/Makefile
-
-DIR_FILE_LIST= \
- $(FIRSTSTEPS_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_firststeps_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_firststeps.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Forms/BooleanValidator.java b/odk/examples/DevelopersGuide/Forms/BooleanValidator.java
deleted file mode 100644
index 84e6a8a9..00000000
--- a/odk/examples/DevelopersGuide/Forms/BooleanValidator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/**
- *
- * @author fs93730
- */
-public class BooleanValidator extends ControlValidator
-{
- private boolean m_preventChecked;
- private com.sun.star.uno.AnyConverter m_converter;
-
- /** Creates a new instance of BooleanValidator */
- public BooleanValidator( boolean preventChecked )
- {
- m_preventChecked = preventChecked;
- m_converter = new com.sun.star.uno.AnyConverter();
- }
-
- public String explainInvalid( Object Value )
- {
- try
- {
- if ( m_converter.isVoid( Value ) )
- return "'indetermined' is not an allowed state";
- boolean value = ((Boolean)Value).booleanValue();
- if ( m_preventChecked && ( value == true ) )
- return "no no no. Don't check it.";
- }
- catch( java.lang.Exception e )
- {
- return "ooops. Unknown error";
- }
- return "";
- }
-
- public boolean isValid( Object Value )
- {
- try
- {
- if ( m_converter.isVoid( Value ) )
- return false;
-
- boolean value = ((Boolean)Value).booleanValue();
- if ( m_preventChecked && ( value == true ) )
- return false;
- return true;
- }
- catch( java.lang.Exception e )
- {
- }
- return false;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/ButtonOperator.java b/odk/examples/DevelopersGuide/Forms/ButtonOperator.java
deleted file mode 100644
index b07b6e80..00000000
--- a/odk/examples/DevelopersGuide/Forms/ButtonOperator.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-// java base stuff
-import com.sun.star.awt.ActionEvent;
-import com.sun.star.awt.XActionListener;
-import com.sun.star.awt.XButton;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.form.runtime.FormOperations;
-import com.sun.star.form.runtime.XFeatureInvalidation;
-import com.sun.star.form.runtime.XFormOperations;
-import com.sun.star.lang.EventObject;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import java.util.Vector;
-
-
-/**************************************************************************/
-/** a helper class for operating the buttons
-*/
-public class ButtonOperator implements XActionListener, XFeatureInvalidation
-{
- private XComponentContext m_componentContext;
- private DocumentHelper m_aDocument;
- private XPropertySet m_form;
- private XFormOperations m_formOperations;
-
- private Vector m_aButtons;
-
- /* ------------------------------------------------------------------ */
- /** ctor
- */
- public ButtonOperator( XComponentContext xCtx, DocumentHelper aDocument, XPropertySet _form )
- {
- m_componentContext = xCtx;
- m_aDocument = aDocument;
- m_form = _form;
- m_aButtons = new Vector();
- }
-
- /* ------------------------------------------------------------------ */
- private short getAssociatedFormFeature( XPropertySet _buttonModel )
- {
- short formFeature = -1;
- try
- {
- formFeature = Short.valueOf( (String)_buttonModel.getPropertyValue( "Tag" ) );
- }
- catch( com.sun.star.uno.Exception e )
- {
- }
- return formFeature;
- }
-
- /* ------------------------------------------------------------------ */
- /** get's the button which we operate and which is responsible for a given URL
- */
- private XPropertySet getButton( short _formFeature )
- {
- for ( int i=0; i < m_aButtons.size(); ++i )
- {
- XPropertySet button = (XPropertySet)m_aButtons.elementAt( i );
- if ( _formFeature == getAssociatedFormFeature( button ) )
- return button;
- }
- return null;
- }
-
- /* ------------------------------------------------------------------ */
- /** announces a button which the operator should be responsible for
- */
- private int getButtonIndex( XPropertySet xButton )
- {
- int nPos = -1;
- for ( int i=0; ( i < m_aButtons.size() ) && ( -1 == nPos ); ++i )
- {
- if ( xButton.equals( m_aButtons.elementAt( i ) ) )
- nPos = i;
- }
- return nPos;
- }
-
- /* ------------------------------------------------------------------ */
- /** announces a button which the operator should be responsible for
- */
- public void addButton( XPropertySet _buttonModel, short _formFeature ) throws java.lang.Exception
- {
- // the current view to the document
- DocumentViewHelper aCurrentView = m_aDocument.getCurrentView();
-
- // add a listener so we get noticed if the user presses the button
- XButton xButtonControl = (XButton)UnoRuntime.queryInterface( XButton.class,
- aCurrentView.getFormControl( _buttonModel ) );
- xButtonControl.addActionListener( this );
-
- _buttonModel.setPropertyValue( "Tag", String.valueOf( _formFeature ) );
-
- // remember the button
- m_aButtons.add( _buttonModel );
- }
-
- /* ------------------------------------------------------------------ */
- public void revokeButton( XPropertySet xButtonModel )
- {
- int nPos = getButtonIndex( xButtonModel );
- if ( -1 < nPos )
- {
- m_aButtons.remove( nPos );
- }
- }
-
- /* ==================================================================
- = XActionListener
- ================================================================== */
- /* ------------------------------------------------------------------ */
- /* called when a button has been pressed
- */
- public void actionPerformed( ActionEvent aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // get the model's name
- XPropertySet buttonModel = (XPropertySet)FLTools.getModel( aEvent.Source, XPropertySet.class );
- try
- {
- short formFeature = getAssociatedFormFeature( buttonModel );
- if ( formFeature != -1 )
- m_formOperations.execute( formFeature );
- }
- catch( final com.sun.star.uno.Exception e )
- {
- }
- }
-
- /* ------------------------------------------------------------------ */
- /* (to be) called when the form layer has been switched to alive mode
- * @todo
- * register as listener somewhere ...
- */
- public void onFormsAlive()
- {
- try
- {
- m_formOperations = FormOperations.createWithFormController(
- m_componentContext, m_aDocument.getCurrentView().getFormController( m_form ) );
- m_formOperations.setFeatureInvalidation( this );
- invalidateAllFeatures();
- }
- catch( final com.sun.star.uno.Exception e )
- {
- }
- }
-
- /* ==================================================================
- = XEventListener
- ================================================================== */
- public void disposing( EventObject aEvent )
- {
- // not interested in
- }
-
- /* ==================================================================
- = XFeatureInvalidation
- ================================================================== */
- private void updateButtonState( XPropertySet _buttonModel, short _formFeature )
- {
- try
- {
- _buttonModel.setPropertyValue( "Enabled", m_formOperations.isEnabled( _formFeature ) );
- }
- catch( com.sun.star.uno.Exception e )
- {
- }
- }
-
- public void invalidateFeatures( short[] _features ) throws com.sun.star.uno.RuntimeException
- {
- for ( int i=0; i<_features.length; ++i )
- {
- XPropertySet buttonModel = getButton( _features[i] );
- if ( buttonModel != null )
- updateButtonState( buttonModel, _features[i] );
- }
- }
-
- public void invalidateAllFeatures() throws com.sun.star.uno.RuntimeException
- {
- for ( int i=0; i < m_aButtons.size(); ++i )
- {
- XPropertySet buttonModel = (XPropertySet)m_aButtons.elementAt( i );
- updateButtonState( buttonModel, getAssociatedFormFeature( buttonModel ) );
- }
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java b/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java
deleted file mode 100644
index 6501120d..00000000
--- a/odk/examples/DevelopersGuide/Forms/ComponentTreeTraversal.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.container.*;
-import com.sun.star.lang.*;
-
-/**************************************************************************/
-/** an abstract interface for components doing an action on a form component
-*/
-interface IFormComponentAction
-{
- public abstract void handle( Object aFormComponent ) throws java.lang.Exception;
-};
-
-/**************************************************************************/
-/** a helper class for travelling a form component tree
-*/
-class ComponentTreeTraversal implements IFormComponentAction
-{
- /* ------------------------------------------------------------------ */
- /** Indicator method to decide wether to step down the tree.
-
- <p>The default implementation checks if the container given is a grid
- control model or a <service scope="com.sun.star.form">FormComponents</service>
- instance.</p>
- */
- protected boolean shouldStepInto( XIndexContainer xContainer ) throws com.sun.star.uno.Exception
- {
- // step down the tree, if possible
- XServiceInfo xSI = UNO.queryServiceInfo( xContainer );
- if ( null != xSI
- && ( xSI.supportsService( "com.sun.star.form.FormComponents" )
- || xSI.supportsService( "com.sun.star.form.component.GridControl" )
- )
- )
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- /* ------------------------------------------------------------------ */
- public void handle( Object aFormComponent ) throws com.sun.star.uno.Exception
- {
- XIndexContainer xCont = UNO.queryIndexContainer( aFormComponent );
- if ( ( null != xCont )
- && shouldStepInto( xCont )
- )
- {
- for ( int i=0; i<xCont.getCount(); ++i )
- {
- handle( xCont.getByIndex( i ) );
- }
- }
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/Forms/ControlLock.java b/odk/examples/DevelopersGuide/Forms/ControlLock.java
deleted file mode 100644
index 85cf988d..00000000
--- a/odk/examples/DevelopersGuide/Forms/ControlLock.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.lang.*;
-import com.sun.star.container.*;
-import com.sun.star.beans.*;
-import com.sun.star.form.*;
-import com.sun.star.util.*;
-import com.sun.star.sdbc.*;
-
-
-/**************************************************************************/
-/** A helper class for recursively locking control models which are bound
- to a specific field
-*/
-
-class LockControlModels extends ComponentTreeTraversal
-{
- private String m_sDataField;
- private Boolean m_aLockIt;
- private int m_nLevel; // nesting level relative to the form we started with
-
- /* ------------------------------------------------------------------ */
- public LockControlModels( String sDataField, boolean bLockIt )
- {
- m_sDataField = sDataField;
- m_aLockIt = new Boolean( bLockIt );
- m_nLevel = 0;
- }
-
- /* ------------------------------------------------------------------ */
- protected boolean shouldStepInto( XIndexContainer xContainer ) throws com.sun.star.uno.Exception
- {
- if ( !super.shouldStepInto( xContainer ) )
- return false; // don't try to be more clever than our base class
-
- XForm xForm = (XForm)UnoRuntime.queryInterface( XForm.class, xContainer );
- if ( ( null != xForm ) && ( m_nLevel > 1 ) )
- // don't step into sub forms - we only handle the form we were originally
- // applied to
- return false;
-
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- public void handle( Object aFormComponent ) throws com.sun.star.uno.Exception
- {
- // entering this nesting level
- ++m_nLevel;
-
- // check if the component has a DataField property
- XPropertySet xCompProps = UNO.queryPropertySet( aFormComponent );
- XPropertySetInfo xPSI = null;
- if ( null != xCompProps )
- xPSI = xCompProps.getPropertySetInfo();
-
- if ( ( null != xPSI ) && xPSI.hasPropertyByName( "DataField" ) )
- { // indeed it has ....
- String sDataField = (String)xCompProps.getPropertyValue( "DataField" );
- if ( sDataField.equals( m_sDataField ) )
- { // we found a control model which is bound to what we're looking for
- xCompProps.setPropertyValue( "ReadOnly", m_aLockIt );
- }
- }
-
- // allow the super class to step down, if possible
- super.handle( aFormComponent );
-
- // leaving this nesting level
- --m_nLevel;
- }
-};
-
-/**************************************************************************/
-/** a class which automatically handles control locking.
- <p>The class has to be bound to a form. Upon every movement of the form,
- all controls which are bound to a (to be specified) field are locked
- on existing and unlocked on new records.</p>
-*/
-class ControlLock implements XRowSetListener
-{
- private XPropertySet m_xForm;
- private String m_sDataField;
- private boolean m_bLockingEnabled;
- private boolean m_bPreviousRoundLock;
-
- /* ------------------------------------------------------------------ */
- ControlLock( XPropertySet xForm, String sBoundDataField )
- {
- m_xForm = xForm;
- m_sDataField = sBoundDataField;
- m_bLockingEnabled = false;
- m_bPreviousRoundLock = false;
- }
-
- /* ------------------------------------------------------------------ */
- /** updates the locks on the affected controls
- */
- protected void updateLocks( )
- {
- try
- {
- // first determine if we need to lock
- Boolean aIsNewRecord = (Boolean)m_xForm.getPropertyValue( "IsNew" );
-
- boolean bNeedLock = m_bLockingEnabled && !aIsNewRecord.booleanValue();
-
- if ( m_bPreviousRoundLock != bNeedLock )
- {
- LockControlModels aLocker = new LockControlModels( m_sDataField, bNeedLock );
- aLocker.handle( m_xForm );
- m_bPreviousRoundLock = bNeedLock;
- }
-
- // please note that we choose the expensive way here: We always loop through
- // _all_ control models belonging to the form. This clearly slows down the
- // whole process.
- // A better solution would be to cache the affected control models. Then we
- // could either rely on the fact that the model hierarchy is static, or we
- // could add ourself as container listener to the form.
- }
- catch(com.sun.star.uno.Exception e)
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ------------------------------------------------------------------ */
- /** enables the locking in general
- <p>If the control models are really locked depends on the current
- record of the form: on the insert row, controls are never locked.</p>
- */
- public void enableLock( boolean bLock )
- {
- // remember this new setting
- m_bLockingEnabled = bLock;
-
- // add or remove ourself as listener to get notified of cursor moves
- XRowSet xRowSet = (XRowSet)UnoRuntime.queryInterface(
- XRowSet.class, m_xForm );
- if ( m_bLockingEnabled )
- {
- xRowSet.addRowSetListener( this );
- }
- else
- {
- xRowSet.removeRowSetListener( this );
- }
-
- // update the locks
- updateLocks();
- }
-
- /* ==================================================================
- = UNO callbacks
- ================================================================== */
-
- /* ------------------------------------------------------------------ */
- // XResetListener overridables
- /* ------------------------------------------------------------------ */
- public void cursorMoved( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- updateLocks( );
- }
-
- /* ------------------------------------------------------------------ */
- public void rowChanged( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in
- }
-
- /* ------------------------------------------------------------------ */
- public void rowSetChanged( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in
- }
-
- /* ------------------------------------------------------------------ */
- // XEventListener overridables
- /* ------------------------------------------------------------------ */
- public void disposing( EventObject aEvent )
- {
- // not interested in
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/ControlValidation.java b/odk/examples/DevelopersGuide/Forms/ControlValidation.java
deleted file mode 100644
index f5aa1b08..00000000
--- a/odk/examples/DevelopersGuide/Forms/ControlValidation.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.util.*;
-import com.sun.star.lang.*;
-import com.sun.star.accessibility.*;
-import com.sun.star.container.*;
-import com.sun.star.beans.*;
-import com.sun.star.form.binding.*;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class ControlValidation extends DocumentBasedExample
-{
- /** Creates a new instance of ControlValidation */
- public ControlValidation()
- {
- super( DocumentType.WRITER );
- }
-
- /* ------------------------------------------------------------------ */
- /* public test methods */
- /* ------------------------------------------------------------------ */
- protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- super.prepareDocument();
-
- SingleControlValidation validation;
- XPropertySet focusField;
-
- validation = new SingleControlValidation( m_document, 5, 5, "DatabaseFormattedField", new NumericValidator() );
- focusField = validation.getInputField();
- validation.setExplanatoryText( "Please enter a number between 0 and 100, with at most 1 decimal digit" );
-
- validation = new SingleControlValidation( m_document, 90, 5, "DatabaseTextField", new TextValidator() );
- validation.setExplanatoryText( "Please enter a text whose length is a multiple of 3, and which does not contain the letter 'Z'" );
-
- validation = new SingleControlValidation( m_document, 5, 55, "DatabaseDateField", new DateValidator() );
- validation.setExplanatoryText( "Please enter a date in the current month" );
- validation.getInputField().setPropertyValue( "Dropdown", new Boolean( true ) );
-
- validation = new SingleControlValidation( m_document, 90, 55, "DatabaseTimeField", new TimeValidator() );
- validation.setExplanatoryText( "Please enter a time. Valid values are all full hours." );
-
- validation = new SingleControlValidation( m_document, 5, 110, "DatabaseCheckBox", new BooleanValidator( false ) );
- validation.setExplanatoryText( "Please check (well, or uncheck) the box. Don't leave it in indetermined state." );
- validation.getInputField().setPropertyValue( "TriState", new Boolean( true ) );
-
- validation = new SingleControlValidation( m_document, 90, 110, "DatabaseRadioButton", new BooleanValidator( true ), 3, 0 );
- validation.setExplanatoryText( "Please check any but the first button" );
-
- validation = new SingleControlValidation( m_document, 5, 165, "DatabaseListBox", new ListSelectionValidator( ), 1, 24 );
- validation.setExplanatoryText( "Please select not more than two entries." );
- validation.getInputField().setPropertyValue( "MultiSelection", new Boolean( true ) );
- validation.getInputField().setPropertyValue( "StringItemList", new String[] { "first", "second", "third", "forth", "fivth" } );
-
- // switch to alive mode
- m_document.getCurrentView( ).toggleFormDesignMode( );
- m_document.getCurrentView( ).grabControlFocus( focusField );
-
- // wait for the user telling us to exit
- waitForUserInput();
- }
-
- /* ------------------------------------------------------------------ */
- /** class entry point
- */
- public static void main(String argv[]) throws java.lang.Exception
- {
- ControlValidation aSample = new ControlValidation();
- aSample.run( argv );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/ControlValidator.java b/odk/examples/DevelopersGuide/Forms/ControlValidator.java
deleted file mode 100644
index e4be47b3..00000000
--- a/odk/examples/DevelopersGuide/Forms/ControlValidator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-/** base class for components validating the content of form controls
- *
- * @author fs@openoffice.org
- */
-public abstract class ControlValidator implements com.sun.star.form.validation.XValidator
-{
-
- /** Creates a new instance of ControlValidator */
- public ControlValidator()
- {
- }
-
- public void addValidityConstraintListener(com.sun.star.form.validation.XValidityConstraintListener xValidityConstraintListener)
- {
- }
-
- public void removeValidityConstraintListener(com.sun.star.form.validation.XValidityConstraintListener xValidityConstraintListener)
- {
- }
-
- protected boolean isVoid( Object Value )
- {
- try
- {
- return ( com.sun.star.uno.AnyConverter.getType(Value).getTypeClass()
- == com.sun.star.uno.TypeClass.VOID );
- }
- catch( java.lang.ClassCastException e )
- {
- }
- return false;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
deleted file mode 100644
index 4395e99d..00000000
--- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java
+++ /dev/null
@@ -1,932 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.beans.PropertyChangeEvent;
-import com.sun.star.beans.XPropertyChangeListener;
-import com.sun.star.beans.XPropertySet;
-
-
-// __________ Imports __________
-import com.sun.star.beans.XPropertySetInfo;
-
-// base classes
-import com.sun.star.container.XIndexContainer;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNamed;
-import com.sun.star.form.FormComponentType;
-import com.sun.star.form.ListSourceType;
-import com.sun.star.form.XGridColumnFactory;
-import com.sun.star.form.XReset;
-import com.sun.star.form.XResetListener;
-import com.sun.star.form.runtime.FormFeature;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.XComponent;
-import com.sun.star.sdb.CommandType;
-import com.sun.star.sdb.XColumnUpdate;
-import com.sun.star.sdbc.ResultSetConcurrency;
-import com.sun.star.sdbc.XConnection;
-import com.sun.star.sdbc.XDataSource;
-import com.sun.star.sdbc.XStatement;
-import com.sun.star.sdbcx.XColumnsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**************************************************************************/
-/** a class for enumerating a form component tree
-*/
-class PrintComponentTree extends ComponentTreeTraversal
-{
- private String m_sPrefix;
-
- public PrintComponentTree()
- {
- m_sPrefix = new String();
- }
-
- public void handle( Object aFormComponent ) throws com.sun.star.uno.Exception
- {
- // the name of the child
- XNamed xName = (XNamed)UnoRuntime.queryInterface( XNamed.class, aFormComponent );
-
- // if it's a form control model, check it's type
- XPropertySet xProps = UNO.queryPropertySet( aFormComponent );
- String sTypeName = FLTools.classifyFormComponentType( xProps );
-
- String sName;
- if ( null == xName )
- sName = "<unnamed>";
- else
- sName = xName.getName();
-
- // print the component's name
- if ( 0 != sTypeName.length() )
- {
- System.out.println( m_sPrefix + sName + " (" + sTypeName + ")" );
- }
- else
- {
- System.out.println( m_sPrefix + sName );
- }
-
- // let the super class step down the tree
- m_sPrefix = m_sPrefix + " ";
- super.handle( aFormComponent );
- m_sPrefix = m_sPrefix.substring( 0, m_sPrefix.length() - 1 );
- }
-};
-
-/**************************************************************************/
-/** a class revoking button models from a ButtonOperator instance
-*/
-class RevokeButtons extends ComponentTreeTraversal
-{
- private ButtonOperator m_aOperator;
-
- public RevokeButtons( ButtonOperator aOperator )
- {
- m_aOperator = aOperator;
- }
-
- public void handle( Object aFormComponent ) throws com.sun.star.uno.Exception
- {
- // check if it's a button
- XPropertySet xProps = UNO.queryPropertySet( aFormComponent );
- XPropertySetInfo xPI = null;
- if ( null != xProps )
- xPI = xProps.getPropertySetInfo();
- if ( ( null != xPI ) && xPI.hasPropertyByName( "ClassId" ) )
- {
- Short nClassId = (Short)xProps.getPropertyValue( "ClassId" );
- if ( FormComponentType.COMMANDBUTTON == nClassId.shortValue() )
- {
- // yes, it is
- m_aOperator.revokeButton( xProps );
- }
- }
-
- // let the super class step down the tree (if possible)
- super.handle( aFormComponent );
- }
-}
-
-/**************************************************************************/
-public class DataAwareness extends DocumentBasedExample implements XPropertyChangeListener, XResetListener
-{
- /* ================================================================== */
- private HsqlDatabase m_database;
-
- private static final String s_tableNameSalesmen = "SALESMEN";
- private static final String s_tableNameCustomers = "CUSTOMERS";
- private static final String s_tableNameSales = "SALES";
-
- private XPropertySet m_xMasterForm;
- private ButtonOperator m_aOperator;
- private SalesFilter m_aSalesFilter;
-
- private KeyGenerator m_aSalesmanKeyGenerator;
- private KeyGenerator m_aSalesKeyGenerator;
- private ControlLock m_aSalesmenLocker;
- private ControlLock m_aSalesLocker;
- private GridFieldValidator m_aSalesNameValidator;
-
- private boolean m_bDefaultSalesDate;
- private boolean m_bProtectKeyFields;
- private boolean m_bAllowEmptySales;
-
- /* ------------------------------------------------------------------ */
- public DataAwareness()
- {
- super( DocumentType.WRITER );
- m_bDefaultSalesDate = false;
- m_bProtectKeyFields = false;
- m_bAllowEmptySales = false;
- }
-
- /* ==================================================================
- = form components
- ================================================================== */
-
- /* ------------------------------------------------------------------ */
- /** enumerates and prints all the elements in the given container, together with the container itself
- */
- protected void enumFormComponents( XNameAccess xContainer ) throws java.lang.Exception
- {
- String sObjectName;
-
- XNamed xNameAcc = (XNamed)UnoRuntime.queryInterface( XNamed.class, xContainer );
- if ( null == xNameAcc )
- sObjectName = new String( "<unnamed>" );
- else
- sObjectName = xNameAcc.getName();
- System.out.println( new String( "enumerating the container named \"" ) + sObjectName +
- new String( "\"\n" ) );
-
- PrintComponentTree aPrinter = new PrintComponentTree();
- aPrinter.handle( xContainer );
- }
-
- /* ------------------------------------------------------------------ */
- /** enumerates and prints all form elements in the document
- */
- protected void enumFormComponents( ) throws java.lang.Exception
- {
- enumFormComponents( m_document.getFormComponentTreeRoot() );
- }
-
- /* ==================================================================
- = UNO callbacks
- ================================================================== */
-
- /* ------------------------------------------------------------------ */
- // XResetListener overridables
- /* ------------------------------------------------------------------ */
- public boolean approveReset( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in vetoing this
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- public void resetted( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // check if this reset occurred becase we're on a new record
- XPropertySet xFormProps = UNO.queryPropertySet( aEvent.Source );
- try
- {
- Boolean aIsNew = (Boolean)xFormProps.getPropertyValue( "IsNew" );
- if ( aIsNew.booleanValue() )
- { // yepp
-
- if ( !m_bDefaultSalesDate )
- { // we're interested to do all this only if the user told us to default the sales date
- // to "today"
- // As date fields do this defaulting automatically, the semantics is inverted here:
- // If we're told to default, we must do nothing, if we should not default, we must
- // reset the value which the date field set automatically.
-
- Integer aConcurrency = (Integer)xFormProps.getPropertyValue( "ResultSetConcurrency" );
- if ( ResultSetConcurrency.READ_ONLY != aConcurrency.intValue() )
- {
- // we're going to modify the record, though after that, to the user, it should look
- // like it has not been modified
- // So we need to ensure that we do not change the IsModified property with whatever we do
- Object aModifiedFlag = xFormProps.getPropertyValue( "IsModified" );
-
-
- // get the columns of our master form
- XColumnsSupplier xSuppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
- XColumnsSupplier.class, xFormProps );
- XNameAccess xCols = xSuppCols.getColumns();
-
- // and update the date column with a NULL value
- XColumnUpdate xDateColumn = (XColumnUpdate)UnoRuntime.queryInterface(
- XColumnUpdate.class, xCols.getByName( "SALEDATE" ) );
- xDateColumn.updateNull();
-
-
- // then restore the flag
- xFormProps.setPropertyValue( "IsModified", aModifiedFlag );
- }
- }
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ------------------------------------------------------------------ */
- // XPropertyChangeListener overridables
- /* ------------------------------------------------------------------ */
- public void propertyChange( PropertyChangeEvent aEvent ) throws com.sun.star.uno.RuntimeException
- {
- try
- {
- // did it come from a radio button or checkbox?
- if ( aEvent.PropertyName.equals( "State" ) )
- { // yep
- Short aNewState = (Short)aEvent.NewValue;
-
- XPropertySet xModel = UNO.queryPropertySet( aEvent.Source );
- String sName = (String)xModel.getPropertyValue( "Name" );
-
- Short aClassId = (Short)xModel.getPropertyValue( "ClassId" );
- if ( FormComponentType.RADIOBUTTON == aClassId.shortValue() )
- {
- String sRefValue = (String)xModel.getPropertyValue( "RefValue" );
-
- short nNewValue = ((Short)aEvent.NewValue).shortValue();
- if ( sName.equals( "KeyGen" ) )
- {
- // it's one of the options for key generation
- if ( sRefValue.equals( "none" ) )
- { // no automatic generation at all
- m_aSalesmanKeyGenerator.stopGenerator( );
- m_aSalesKeyGenerator.stopGenerator( );
- }
- else
- {
- boolean bGenerateOnReset = true;
- if ( sRefValue.equals( "update" ) )
- { // generate on update
- bGenerateOnReset = ( 0 == nNewValue );
- }
- else if ( sRefValue.equals( "reset" ) )
- { // generat on reset
- bGenerateOnReset = ( 0 != nNewValue );
- }
- m_aSalesmanKeyGenerator.activateKeyGenerator( bGenerateOnReset );
- m_aSalesKeyGenerator.activateKeyGenerator( bGenerateOnReset );
- }
- }
- }
- else if ( FormComponentType.CHECKBOX == aClassId.shortValue() )
- {
- boolean bEnabled = ( 0 != aNewState.shortValue() );
- if ( sName.equals( "defaultdate" ) )
- {
- m_bDefaultSalesDate = bEnabled;
- }
- else if ( sName.equals( "protectkeys" ) )
- {
- m_bProtectKeyFields = bEnabled;
- m_aSalesmenLocker.enableLock( m_bProtectKeyFields );
- m_aSalesLocker.enableLock( m_bProtectKeyFields );
- }
- else if ( sName.equals( "emptysales" ) )
- {
- m_bAllowEmptySales = bEnabled;
- m_aSalesNameValidator.enableColumnWatch( m_bAllowEmptySales );
- }
- }
- }
- }
- catch(com.sun.star.uno.Exception e)
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ------------------------------------------------------------------ */
- // XEventListener overridables
- /* ------------------------------------------------------------------ */
- public void disposing( EventObject aEvent )
- {
- // simply disambiguate
- super.disposing( aEvent );
- }
-
- /* ==================================================================
- = miscellaneous
- ================================================================== */
-
- /* ------------------------------------------------------------------ */
- /** skips line feeds in the input stream
-
- @returns
- the first character which does not belong to a line feed
- */
- protected int skipLineFeeds( java.io.InputStream aInput ) throws java.io.IOException
- {
- // read characters, until we encounter something which is not a line feed character
- int nChar = aInput.read( );
- while ( ( 13 == nChar ) || ( 10 == nChar ) )
- nChar = aInput.read( );
-
- // now read everything which is behind this single character we are interested in
- while ( 0 < aInput.available() )
- aInput.read( );
-
- return nChar;
- }
-
- /* ==================================================================
- = table handling
- ================================================================== */
- /* ------------------------------------------------------------------ */
- /** checks if a given table exists.
-
- <p>The check is made using a SELECT statement, so even if the connection
- is a n SDB-level connection, which may filter tables in it's table
- supplier, the result may be reliable ....</p>
- */
- protected boolean existsInvisibleTable( XConnection xConn, String sTableName ) throws java.lang.Exception
- {
- String sStatement = "SELECT * FROM ";
- sStatement += sTableName;
- sStatement += " WHERE 0=1";
-
- boolean bSuccess = false;
- try
- {
- XStatement xStatement = xConn.createStatement();
- xStatement.execute( sStatement );
- // if we reached this point, the table probably exists
- bSuccess = true;
- }
- catch(com.sun.star.sdbc.SQLException e)
- {
- }
- return bSuccess;
- }
-
- /* ------------------------------------------------------------------ */
- /** add a specified table name to the table filter of the given data source.
- */
- protected void makeTableVisible( XDataSource xDS, XConnection xConn, String sTableName ) throws java.lang.Exception
- {
- // get the table filter
- XPropertySet xDSP = UNO.queryPropertySet( xDS );
- String[] aCurrentFilter = (String[])xDSP.getPropertyValue( "TableFilter" );
-
- // check if the table name is already part of it
- String sAllTables = "*"; // all tables
-
- for ( int i=0; i<aCurrentFilter.length; ++i )
- {
- String sCurrentTableFilter = aCurrentFilter[i];
-
- if ( sCurrentTableFilter.equals( sTableName ) )
- return;
- if ( sCurrentTableFilter.equals( sAllTables ) )
- return;
- }
-
- // if we are here, we have to add our table to the filter sequence
- String[] aNewFilter = new String[ aCurrentFilter.length + 1 ];
- // copy the existent filter entries
- for ( int i=0; i<aCurrentFilter.length; ++i )
- aNewFilter[i] = aCurrentFilter[i];
- // add our table
- aNewFilter[ aCurrentFilter.length ] = sTableName;
-
- xDSP.setPropertyValue( "TableFilter", aNewFilter );
- }
-
- /* ------------------------------------------------------------------ */
- /** executes the given statement on the given connection
- */
- protected boolean implExecuteStatement( XConnection xConn, String sStatement ) throws java.lang.Exception
- {
- try
- {
- XStatement xStatement = xConn.createStatement( );
- xStatement.execute( sStatement );
- }
- catch(com.sun.star.sdbc.SQLException e)
- {
- System.err.println( e );
- return false;
- }
-
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates the table witht the given name, using the given statement
- */
- protected boolean implCreateTable( XConnection xConn, String sCreateStatement, String sTableName ) throws java.lang.Exception
- {
- if ( !implExecuteStatement( xConn, sCreateStatement ) )
- {
- System.out.println( " could not create the table " + sTableName + "." );
- System.out.println( );
- return false;
- }
-
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates the table SALESMEN
-
- @return
- <TRUE/> if and only if the creation succeeded
- */
- protected boolean createTableSalesman( XConnection xConn ) throws java.lang.Exception
- {
- String sCreateStatement = "CREATE TABLE " + s_tableNameSalesmen + " ";
- sCreateStatement += "(SNR INTEGER NOT NULL, ";
- sCreateStatement += "FIRSTNAME VARCHAR(50), ";
- sCreateStatement += "LASTNAME VARCHAR(100), ";
- sCreateStatement += "STREET VARCHAR(50), ";
- sCreateStatement += "STATE VARCHAR(50), ";
- sCreateStatement += "ZIP INTEGER, ";
- sCreateStatement += "BIRTHDATE DATE, ";
- sCreateStatement += "PRIMARY KEY(SNR))";
-
- if ( implCreateTable( xConn, sCreateStatement, s_tableNameSalesmen) )
- {
- String sInsertionPrefix = "INSERT INTO " + s_tableNameSalesmen + " VALUES ";
-
- implExecuteStatement( xConn, sInsertionPrefix + "(1, 'Joseph', 'Smith', 'Bond Street', 'CA', 95460, '1946-07-02')" );
- implExecuteStatement( xConn, sInsertionPrefix + "(2, 'Frank', 'Jones', 'Lake silver', 'CA', 95460, '1963-12-24')" );
- implExecuteStatement( xConn, sInsertionPrefix + "(3, 'Jane', 'Esperansa', '23 Hollywood driver', 'CA', 95460, '1972-04-01')" );
-
- return true;
- }
- return false;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates the table CUSTOMERS
-
- @return
- <TRUE/> if and only if the creation succeeded
- */
- protected boolean createTableCustomer( XConnection xConn ) throws java.lang.Exception
- {
- String sCreateStatement = "CREATE TABLE " + s_tableNameCustomers + " ";
- sCreateStatement += "(COS_NR INTEGER NOT NULL, ";
- sCreateStatement += "LASTNAME VARCHAR(100), ";
- sCreateStatement += "STREET VARCHAR(50), ";
- sCreateStatement += "CITY VARCHAR(50), ";
- sCreateStatement += "STATE VARCHAR(50), ";
- sCreateStatement += "ZIP INTEGER, ";
- sCreateStatement += "PRIMARY KEY(COS_NR))";
-
- if ( implCreateTable( xConn, sCreateStatement, s_tableNameCustomers ) )
- {
- String sInsertionPrefix = "INSERT INTO " + s_tableNameCustomers + " VALUES ";
-
- implExecuteStatement( xConn, sInsertionPrefix + "(100, 'Acme, Inc.', '99 Market Street', 'Groundsville', 'CA', 95199)" );
- implExecuteStatement( xConn, sInsertionPrefix + "(101, 'Superior BugSoft', '1 Party Place', 'Mendocino', 'CA', 95460)");
- implExecuteStatement( xConn, sInsertionPrefix + "(102, 'WeKnowAll, Inc.', '100 Coffee Lane', 'Meadows', 'CA', 93699)");
-
- return true;
- }
- return false;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates the table SALES
-
- @return
- <TRUE/> if and only if the creation succeeded
- */
- protected boolean createTableSales( XConnection xConn ) throws java.lang.Exception
- {
- String sCreateStatement = "CREATE TABLE " + s_tableNameSales + " ";
- sCreateStatement += "(SALENR INTEGER NOT NULL, ";
- sCreateStatement += "COS_NR INTEGER NOT NULL, ";
- sCreateStatement += "SNR INTEGER NOT NULL, ";
- sCreateStatement += "NAME VARCHAR(50), ";
- sCreateStatement += "SALEDATE DATE, ";
- sCreateStatement += "PRICE DECIMAL(8,2), ";
- sCreateStatement += "PRIMARY KEY(SALENR))";
-
- if ( implCreateTable( xConn, sCreateStatement, s_tableNameSales ) )
- {
- String sInsertionPrefix = "INSERT INTO " + s_tableNameSales + " VALUES ";
-
- implExecuteStatement( xConn, sInsertionPrefix + "(1, 100, 1, 'Fruits', '2005-02-12', 39.99)" );
- implExecuteStatement( xConn, sInsertionPrefix + "(2, 101, 3, 'Beef', '2005-10-18', 15.78)" );
- implExecuteStatement( xConn, sInsertionPrefix + "(3, 102, 3, 'Orange Juice', '2005-09-08', 25.63)" );
- implExecuteStatement( xConn, sInsertionPrefix + "(4, 101, 2, 'Oil', '2005-03-01', 12.30)" );
-
- return true;
- }
-
- return false;
- }
-
- /* ------------------------------------------------------------------ */
- /** ensures that the tables we need for our example exist
- */
- protected void ensureTables() throws java.lang.Exception
- {
- // get the data source
- XDataSource xDS = m_database.getDataSource();
- XPropertySet xDSProps = UNO.queryPropertySet( xDS );
-
- // connect to this data source
- XConnection xConn = xDS.getConnection( "", "" );
- XComponent xConnComp = UNO.queryComponent( xConn );
-
- createTableSalesman( xConn );
- createTableCustomer( xConn );
- createTableSales( xConn );
-
- // free the resources acquired by the connection
- xConnComp.dispose();
- }
-
- /* ==================================================================
- = sample document handling
- ================================================================== */
-
- /* ------------------------------------------------------------------ */
- /** creates the button used for demonstrating (amonst others) event handling
- @param nXPos
- x-position of the to be inserted shape
- @param nYPos
- y-position of the to be inserted shape
- @param nXSize
- width of the to be inserted shape
- @param sName
- the name of the model in the form component hierarchy
- @param sLabel
- the label of the button control
- @param sActionURL
- the URL of the action which should be triggered by the button
- @return
- the model of the newly created button
- */
- protected XPropertySet createButton( int nXPos, int nYPos, int nXSize, String sName, String sLabel, short _formFeature ) throws java.lang.Exception
- {
- XPropertySet xButton = m_formLayer.createControlAndShape( "CommandButton", nXPos, nYPos, nXSize, 6 );
- // the name for referring to it later:
- xButton.setPropertyValue( "Name", sName );
- // the label
- xButton.setPropertyValue( "Label", sLabel );
- // use the name as help text
- xButton.setPropertyValue( "HelpText", sName );
- // don't want buttons to be accessible by the "tab" key - this would be uncomfortable when traveling
- // with records with "tab"
- xButton.setPropertyValue( "Tabstop", new Boolean( false ) );
- // similar, they should not steal the focus when clicked
- xButton.setPropertyValue( "FocusOnClick", new Boolean( false ) );
-
- m_aOperator.addButton( xButton, _formFeature );
-
- return xButton;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a column in a grid
- @param xGridModel
- specifies the model of the grid where the new column should be inserted
- @param sColumnService
- specifies the service name of the column to create (e.g. "NumericField")
- @param sDataField
- specifies the database field to which the column should be bound
- @param nWidth
- specifies the column width (in mm). If 0, no width is set.
- @return
- the newly created column
- */
- XPropertySet createGridColumn( Object aGridModel, String sColumnService, String sDataField, int nWidth )
- throws com.sun.star.uno.Exception
- {
- // the container to insert columns into
- XIndexContainer xColumnContainer = UNO.queryIndexContainer( aGridModel );
- // the factory for creating column models
- XGridColumnFactory xColumnFactory = (XGridColumnFactory)UnoRuntime.queryInterface(
- XGridColumnFactory.class, aGridModel );
-
- // (let) create the new col
- XInterface xNewCol = (XInterface)xColumnFactory.createColumn( sColumnService );
- XPropertySet xColProps = UNO.queryPropertySet( xNewCol );
-
- // some props
- // the field the column is bound to
- xColProps.setPropertyValue( "DataField", sDataField );
- // the "display name" of the column
- xColProps.setPropertyValue( "Label", sDataField );
- // the name of the column within it's parent
- xColProps.setPropertyValue( "Name", sDataField );
-
- if ( nWidth > 0 )
- xColProps.setPropertyValue( "Width", new Integer( nWidth * 10 ) );
-
- // insert
- xColumnContainer.insertByIndex( xColumnContainer.getCount(), xNewCol );
-
- // outta here
- return xColProps;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a column in a grid
- */
- XPropertySet createGridColumn( Object aGridModel, String sColumnService, String sDataField )
- throws com.sun.star.uno.Exception
- {
- return createGridColumn( aGridModel, sColumnService, sDataField );
- }
-
- /* ------------------------------------------------------------------ */
- /** creates our sample document
- */
- protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- super.prepareDocument();
-
- m_database = new HsqlDatabase( m_xCtx );
-
- // ensure that we have the tables needed for our example
- ensureTables();
-
- // --------------------------------------------------------------
- /* create some shapes */
- XPropertySet xSNRField = m_formLayer.insertControlLine( "NumericField", "SNR", "", 3 );
- m_formLayer.insertControlLine( "TextField", "FIRSTNAME", "", 11);
- m_formLayer.insertControlLine( "TextField", "LASTNAME", "", 19 );
- m_formLayer.insertControlLine( "TextField", "STREET", "", 27 );
- m_formLayer.insertControlLine( "TextField", "STATE", "", 35 );
- XPropertySet xZipField = m_formLayer.insertControlLine( "NumericField", "ZIP", "", 43 );
- m_formLayer.insertControlLine( "FormattedField", "BIRTHDATE", "", 51 );
-
- // for the salesman number / zip code, we don't want to have decimal places:
- xSNRField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- xZipField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
-
- // --------------------------------------------------------------
- /** need the form the control models belong to
- for this, we simply obtain the parent for any of the control models we have
-
- Note that this involves knowledge about the implementation: If a control shape is
- inserted into a document, where the control model does not belong to the form component
- hierarchy, yet, it is automatically inserted into the first form, which is created
- if necessary.
- */
- m_xMasterForm = FLTools.getParent( xZipField );
-
- // set the data source signature at the form
- m_xMasterForm.setPropertyValue( "DataSourceName", m_database.getDocumentURL() );
- m_xMasterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
- m_xMasterForm.setPropertyValue( "Command", "SALESMEN" );
-
- // --------------------------------------------------------------
- // insert the buttons
- // create our button operator, if necessary
- m_aOperator = new ButtonOperator( m_xCtx, m_document, m_xMasterForm );
-
- createButton( 2, 63, 8, "first", "<<", FormFeature.MoveToFirst );
- createButton( 12, 63, 8, "prev", "<", FormFeature.MoveToPrevious );
- createButton( 22, 63, 8, "next", ">", FormFeature.MoveToNext );
- createButton( 32, 63, 8, "last", ">>", FormFeature.MoveToLast );
- createButton( 42, 63, 8, "new", ">*", FormFeature.MoveToInsertRow );
- createButton( 58, 63, 13, "reload", "reload", FormFeature.ReloadForm );
-
- // --------------------------------------------------------------
- // create a sub for for the sales
-
- // for this, first create a sub form and bind it to the SALES table
- XIndexContainer xSalesForm = m_document.createSubForm( m_xMasterForm, "Sales" );
- XPropertySet xSalesFormProps = UNO.queryPropertySet( xSalesForm );
-
- xSalesFormProps.setPropertyValue( "DataSourceName", m_database.getDocumentURL() );
- xSalesFormProps.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) );
-
- String sCommand = new String( "SELECT * FROM " );
- sCommand += s_tableNameSales;
- sCommand += " WHERE " + s_tableNameSales + ".SNR = :salesmen";
- xSalesFormProps.setPropertyValue( "Command", sCommand );
-
- // the master-details connection
- String[] aMasterFields = new String[] { "SNR" }; // the field in the master form
- String[] aDetailFields = new String[] { "salesmen" }; // the name in the detail form
- xSalesFormProps.setPropertyValue( "MasterFields", aMasterFields );
- xSalesFormProps.setPropertyValue( "DetailFields", aDetailFields );
-
- // the create thr grid model
- XPropertySet xSalesGridModel = m_formLayer.createControlAndShape( "GridControl", 2, 80, 162, 40, xSalesForm );
- xSalesGridModel.setPropertyValue( "Name", "SalesTable" );
- XPropertySet xKeyColumn = createGridColumn( xSalesGridModel, "NumericField", "SALENR", 12 );
- XPropertySet xCustomerColumn = createGridColumn( xSalesGridModel, "ListBox", "COS_NR", 40 );
- XPropertySet xSalesNameColumn = createGridColumn( xSalesGridModel, "TextField", "NAME", 25 );
- createGridColumn( xSalesGridModel, "DateField", "SALEDATE", 24 );
- createGridColumn( xSalesGridModel, "CurrencyField", "PRICE", 16 );
-
- // please note that a better solution for the SALEDATE field would have been to use
- // a FormattedField. But we want to demonstrate some effects with DateFields here ...
-
- m_aSalesNameValidator = new GridFieldValidator( m_xCtx, xSalesNameColumn );
- m_aSalesNameValidator.enableColumnWatch( m_bAllowEmptySales );
-
- xKeyColumn.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
-
- // init the list box which is for choosing the customer a sale belongs to
- xCustomerColumn.setPropertyValue( "BoundColumn", new Short( (short)1 ) );
- xCustomerColumn.setPropertyValue( "Label", "Customer" );
- xCustomerColumn.setPropertyValue( "ListSourceType", ListSourceType.SQL );
-
- String sListSource = "SELECT LASTNAME, COS_NR FROM ";
- sListSource += s_tableNameCustomers;
- String[] aListSource = new String[] { sListSource };
- xCustomerColumn.setPropertyValue( "ListSource", aListSource );
-
- // We want to demonstrate how to reset fields to NULL, we do this with the SALEDATE field
- // above. For this, we add as reset listener to the form
- XReset xFormReset = UNO.queryReset( xSalesForm );
- xFormReset.addResetListener( this );
-
-
- // --------------------------------------------------------------
- // the option for filtering the sales form
- XIndexContainer xSalesFilterForm = m_document.createSiblingForm( xSalesForm, "SalesFilter" );
- XPropertySet xSFFProps = UNO.queryPropertySet( xSalesFilterForm );
- XPropertySet xLabel = m_formLayer.createControlAndShape( "FixedText", 2, 125, 35, 6, xSalesFilterForm );
- xLabel.setPropertyValue( "Label", "show only sales since" );
- xLabel.setPropertyValue( "Name", "FilterLabel" );
-
- XPropertySet xFilterSelection = m_formLayer.createControlAndShape( "ListBox", 40, 125, 59, 6, xSalesFilterForm );
- xFilterSelection.setPropertyValue( "Name", "FilterList" );
- xFilterSelection.setPropertyValue( "LabelControl", xLabel );
- XPropertySet xManualFilter = m_formLayer.createControlAndShape( "DateField", 104, 125, 30, 6, xSalesFilterForm );
- xManualFilter.setPropertyValue( "Name", "ManualFilter" );
- XPropertySet xApplyFilter = m_formLayer.createControlAndShape( "CommandButton", 139, 125, 25, 6, xSalesFilterForm );
- xApplyFilter.setPropertyValue( "Name", "ApplyFilter" );
- xApplyFilter.setPropertyValue( "DefaultButton", new Boolean( true ) );
- m_aSalesFilter = new SalesFilter( m_document, xSalesFormProps, xFilterSelection,
- xManualFilter, xApplyFilter );
-
-
- // --------------------------------------------------------------
- // the options section
- // for this, we need a form which is a sibling of our master form (don't want to interfere
- // the controls which represent options only with the controls which are used for data access)
-
- XIndexContainer xOptionsForm = m_document.createSiblingForm( m_xMasterForm, "Options" );
-
- xLabel = m_formLayer.createControlAndShape( "GroupBox", 98, 0, 66, 62, xOptionsForm );
- xLabel.setPropertyValue( "Name", "Options" );
- xLabel.setPropertyValue( "Label", "Options" );
-
- // radio buttons which controls how we generate unique keys
- xLabel = m_formLayer.createControlAndShape( "GroupBox", 103, 5, 56, 25, xOptionsForm );
- xLabel.setPropertyValue( "Label", "key generation" );
- xLabel.setPropertyValue( "Name", "KeyGeneration" );
- XPropertySet xKeyGen = m_formLayer.createControlAndShape( "RadioButton", 106, 11, 50, 6, xOptionsForm );
- xKeyGen.setPropertyValue( "Name", "KeyGen" );
- xKeyGen.setPropertyValue( "Label", "no automatic generation" );
- xKeyGen.setPropertyValue( "RefValue", "none" );
- xKeyGen.addPropertyChangeListener( "State", this );
-
- xKeyGen = m_formLayer.createControlAndShape( "RadioButton", 106, 17, 50, 6, xOptionsForm );
- xKeyGen.setPropertyValue( "Name", "KeyGen" );
- xKeyGen.setPropertyValue( "Label", "before inserting a record" );
- xKeyGen.setPropertyValue( "RefValue", "update" );
- xKeyGen.addPropertyChangeListener( "State", this );
-
- xKeyGen = m_formLayer.createControlAndShape( "RadioButton", 106, 23, 50, 6, xOptionsForm );
- xKeyGen.setPropertyValue( "Name", "KeyGen" );
- xKeyGen.setPropertyValue( "Label", "when moving to a new record" );
- xKeyGen.setPropertyValue( "RefValue", "reset" );
- xKeyGen.addPropertyChangeListener( "State", this );
-
- // initialize listeners
- // master form - key generation
- m_aSalesmanKeyGenerator = new KeyGenerator( m_xMasterForm, "SNR", m_xCtx );
- m_aSalesmanKeyGenerator.activateKeyGenerator( true );
- // master form - control locking
- m_aSalesmenLocker = new ControlLock( m_xMasterForm, "SNR" );
- m_aSalesmenLocker.enableLock( m_bProtectKeyFields );
-
- // details form - key generation
- m_aSalesKeyGenerator = new KeyGenerator( xSalesFormProps, "SALENR", m_xCtx );
- m_aSalesKeyGenerator.activateKeyGenerator( true );
-
- // details form - control locking
- m_aSalesLocker = new ControlLock( xSalesFormProps, "SALENR" );
- m_aSalesLocker.enableLock( m_bProtectKeyFields );
-
- // initally, we want to generate keys when moving to a new record
- xKeyGen.setPropertyValue( "DefaultState", new Short( (short)1 ) );
-
- // --------------------------------------------------------------
- // second options block
- xLabel = m_formLayer.createControlAndShape( "GroupBox", 103, 33, 56, 25, xOptionsForm );
- xLabel.setPropertyValue( "Name", "Misc" );
- xLabel.setPropertyValue( "Label", "Miscellaneous" );
-
- XPropertySet xCheck = m_formLayer.createControlAndShape( "CheckBox", 106, 39, 60, 6, xOptionsForm );
- xCheck.setPropertyValue( "Name", "defaultdate" );
- xCheck.setPropertyValue( "Label", "default sales date to \"today\"" );
- xCheck.setPropertyValue( "HelpText", "When checked, newly entered sales records are pre-filled with today's date, else left empty." );
- xCheck.addPropertyChangeListener( "State", this );
-
- xCheck = m_formLayer.createControlAndShape( "CheckBox", 106, 45, 60, 6, xOptionsForm );
- xCheck.setPropertyValue( "Name", "protectkeys" );
- xCheck.setPropertyValue( "Label", "protect key fields from editing" );
- xCheck.setPropertyValue( "HelpText", "When checked, you cannot modify the values in the table's key fields (SNR and SALENR)" );
- xCheck.addPropertyChangeListener( "State", this );
-
- xCheck = m_formLayer.createControlAndShape( "CheckBox", 106, 51, 60, 6, xOptionsForm );
- xCheck.setPropertyValue( "Name", "emptysales" );
- xCheck.setPropertyValue( "Label", "check for empty sales names" );
- xCheck.setPropertyValue( "HelpText", "When checked, you cannot enter empty values into the NAME column of the 'Sales' table." );
- xCheck.addPropertyChangeListener( "State", this );
-
- // dump the form component tree
- enumFormComponents( );
- }
-
- /* ------------------------------------------------------------------ */
- protected void onFormsAlive()
- {
- m_aOperator.onFormsAlive();
- }
-
- /* ------------------------------------------------------------------ */
- /** performs any cleanup before exiting the program
- */
- protected void cleanUp( ) throws java.lang.Exception
- {
- // remove the listeners at the buttons
- RevokeButtons aRevoke = new RevokeButtons( m_aOperator );
- aRevoke.handle( m_document.getFormComponentTreeRoot( ) );
-
- // remove the key generator listeners from the form
- m_aSalesmanKeyGenerator.stopGenerator( );
- m_aSalesKeyGenerator.stopGenerator( );
-
- // and the control lockers
- m_aSalesmenLocker.enableLock( false );
- m_aSalesLocker.enableLock( false );
-
- // the validator for the grid column
- m_aSalesNameValidator.enableColumnWatch( false );
-
- // remove our own reset listener from the form
- XNameAccess xMasterAsNames = (XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class, m_xMasterForm );
- XReset xFormReset = UNO.queryReset( xMasterAsNames.getByName( "Sales" ) );
- xFormReset.removeResetListener( this );
-
- super.cleanUp();
- }
-
- /* ------------------------------------------------------------------ */
- /** class entry point
- */
- public static void main(String argv[]) throws java.lang.Exception
- {
- DataAwareness aSample = new DataAwareness();
- aSample.run( argv );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/DateValidator.java b/odk/examples/DevelopersGuide/Forms/DateValidator.java
deleted file mode 100644
index 69ba9fd4..00000000
--- a/odk/examples/DevelopersGuide/Forms/DateValidator.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.form.binding.*;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class DateValidator extends ControlValidator
-{
-
- /** Creates a new instance of NumericValidator */
- public DateValidator( )
- {
- }
-
- public String explainInvalid( Object Value )
- {
- try
- {
- if ( isVoid( Value ) )
- return "empty input";
-
- com.sun.star.util.Date dateValue = (com.sun.star.util.Date)Value;
- if ( isDedicatedInvalidDate( dateValue ) )
- return "this is no valid date";
-
- if ( !isNextMonthsDate( dateValue ) )
- return "date must denote a day in the current month";
- }
- catch( java.lang.Exception e )
- {
- return "oops. What did you enter for this to happen?";
- }
- return "";
- }
-
- public boolean isValid( Object Value )
- {
- try
- {
- if ( isVoid( Value ) )
- return false;
-
- com.sun.star.util.Date dateValue = (com.sun.star.util.Date)
- com.sun.star.uno.AnyConverter.toObject(
- com.sun.star.util.Date.class, Value);
- if ( isDedicatedInvalidDate( dateValue ) )
- return false;
-
- if ( !isNextMonthsDate( dateValue ) )
- return false;
- return true;
- }
- catch( java.lang.Exception e )
- {
- e.printStackTrace( System.err );
- }
- return false;
- }
-
- private boolean isDedicatedInvalidDate( com.sun.star.util.Date dateValue )
- {
- return ( dateValue.Day == 0 ) && ( dateValue.Month == 0 ) && ( dateValue.Year == 0 );
- }
-
- private boolean isNextMonthsDate( com.sun.star.util.Date dateValue )
- {
- int overallMonth = dateValue.Year * 12 + dateValue.Month - 1;
-
- int todaysMonth = new java.util.Date().getMonth();
- int todaysYear = new java.util.Date().getYear() + 1900;
- int todaysOverallMonth = todaysYear * 12 + todaysMonth;
-
- return overallMonth == todaysOverallMonth;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java
deleted file mode 100644
index 9b572bf0..00000000
--- a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.XCloseable;
-
-public abstract class DocumentBasedExample implements com.sun.star.lang.XEventListener
-{
- /// the intial remote context from the office
- protected XComponentContext m_xCtx;
- /// our current test document
- protected DocumentHelper m_document;
- protected FormLayer m_formLayer;
- protected DocumentType m_documentType;
-
- /** Creates a new instance of DocumentBasedExample */
- public DocumentBasedExample( DocumentType documentType )
- {
- bootstrapUNO();
- m_documentType = documentType;
- }
-
- /* ------------------------------------------------------------------ */
- private void bootstrapUNO()
- {
- try
- {
- /*
- final XComponentContext componentContext = com.sun.star.comp.helper.Bootstrap.
- createInitialComponentContext( null );
- final XMultiComponentFactory localServiceManager = componentContext.getServiceManager();
-
- final XUnoUrlResolver urlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(
- XUnoUrlResolver.class, localServiceManager.createInstanceWithContext(
- "com.sun.star.bridge.UnoUrlResolver", componentContext) );
-
- final String connectStr = "uno:pipe,name=<pipename>;urp;StarOffice.ComponentContext";
- final Object initialObject = urlResolver.resolve( connectStr );
-
- m_xCtx = (XComponentContext)UnoRuntime.queryInterface( XComponentContext.class,
- initialObject );
- */
-
- // get the remote office component context
- m_xCtx = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace( System.err );
- System.exit(1);
- }
- }
-
- /* ------------------------------------------------------------------ */
- /** main method for running the sample
- */
- public void run( String argv[] )
- {
- try
- {
- // collect whatever parameters were given
- collectParameters( argv );
-
- // prepare our sample document
- prepareDocument();
-
- // switch the document view's form layer to alive mode
- m_document.getCurrentView().toggleFormDesignMode();
- onFormsAlive();
-
- // grab the focus to the first control
- m_document.getCurrentView().grabControlFocus();
-
- // ----------------------------------------------
- // wait for the user to confirm that we can exit
- if ( waitForUserInput() )
- {
- // clean up
- cleanUp();
- }
-
- // if waitForUserInput returns false, the user closed the document manually - no need to do a clean up
- // then
- }
- catch(com.sun.star.uno.Exception e)
- {
- System.out.println(e);
- e.printStackTrace();
- }
- catch(java.lang.Exception e)
- {
- System.out.println(e);
- e.printStackTrace();
- }
-
- System.exit(0);
- }
-
- /* ------------------------------------------------------------------ */
- /** collect the RuntimeArguments
- */
- protected void collectParameters(String argv[])
- {
- // not interested in. Derived classes may want to use it.
- }
-
- /* ------------------------------------------------------------------ */
- /** prepares a new document to work with
- */
- protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- m_document = DocumentHelper.blankDocument(m_xCtx, m_documentType);
- m_document.getDocument( ).addEventListener( this );
- m_formLayer = new FormLayer( m_document );
- }
-
- /* ------------------------------------------------------------------ */
- /** called when the form layer has been switched to alive mode
- */
- protected void onFormsAlive()
- {
- }
-
- /* ------------------------------------------------------------------ */
- /** performs any cleanup before exiting the program
- */
- protected void cleanUp( ) throws java.lang.Exception
- {
- // do not listen at the document any longer
- m_document.getDocument().removeEventListener( this );
-
- // close the document
- closeDocument();
- }
-
- /* ------------------------------------------------------------------ */
- /** closes our document, if we have an open one
- */
- private void closeDocument()
- {
- try
- {
- // close our document
- if ( m_document != null )
- {
- XCloseable closeDoc = (XCloseable)
- UnoRuntime.queryInterface( XCloseable.class,
- m_document.getDocument() );
- if (closeDoc != null)
- closeDoc.close( true );
- else
- m_document.getDocument().dispose();
- }
- }
- catch ( com.sun.star.uno.Exception e )
- {
- e.printStackTrace( System.out );
- }
- }
-
- /* ------------------------------------------------------------------ */
- /* internal methods */
- /* ------------------------------------------------------------------ */
- /** waits for the user to press a key (on the console where she started
- the java program) or the document to be closed by the user.
-
- @return <TRUE/> if the user pressed a key on the console,
- <FALSE/> if she closed the document
- */
- protected boolean waitForUserInput() throws java.lang.Exception
- {
- synchronized (this)
- {
- WaitForInput aWait = new WaitForInput( this );
- aWait.start();
- wait();
-
- // if the waiter thread is done, the user pressed enter
- boolean bKeyPressed = aWait.isDone();
- if ( !bKeyPressed )
- aWait.interrupt();
-
- return bKeyPressed;
- }
- }
-
- /* ------------------------------------------------------------------ */
- /* XEventListener overridables */
- /* ------------------------------------------------------------------ */
- public void disposing( com.sun.star.lang.EventObject eventObject )
- {
- if ( m_document.getDocument().equals( eventObject.Source ) )
- {
- // notify ourself that we can stop waiting for user input
- synchronized (this)
- {
- notify();
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/DocumentHelper.java b/odk/examples/DevelopersGuide/Forms/DocumentHelper.java
deleted file mode 100644
index 6ec184e9..00000000
--- a/odk/examples/DevelopersGuide/Forms/DocumentHelper.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-/**************************************************************************/
-import com.sun.star.uno.*;
-import com.sun.star.lang.*;
-import com.sun.star.util.*;
-import com.sun.star.awt.*;
-import com.sun.star.drawing.*;
-import com.sun.star.frame.*;
-import com.sun.star.form.*;
-import com.sun.star.beans.*;
-import com.sun.star.container.*;
-import com.sun.star.container.*;
-
-/**************************************************************************/
-/** provides a small wrapper around a document
-*/
-public class DocumentHelper
-{
- /// the remote office context
- protected XComponentContext m_remoteContext;
- /// the remote service manager
- protected XMultiServiceFactory m_orb;
- protected XComponent m_documentComponent;
-
- /* ------------------------------------------------------------------ */
- public XComponent getDocument( )
- {
- return m_documentComponent;
- }
-
- /* ------------------------------------------------------------------ */
- public XComponentContext getContext( )
- {
- return m_remoteContext;
- }
-
- /* ------------------------------------------------------------------ */
- public XMultiServiceFactory getOrb( )
- {
- return m_orb;
- }
-
- /* ------------------------------------------------------------------ */
- public DocumentHelper( XComponentContext xContext, XComponent document )
- {
- m_remoteContext = xContext;
- m_orb = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, m_remoteContext.getServiceManager());
- m_documentComponent = document;
- }
-
- /* ------------------------------------------------------------------ */
- protected static XComponent implCreateBlankDocument( XComponentContext xCtx, String factoryURL ) throws com.sun.star.uno.Exception
- {
- XComponentLoader aLoader = (XComponentLoader)UnoRuntime.queryInterface(
- XComponentLoader.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Desktop", xCtx ));
-
- return UNO.queryComponent(
- aLoader.loadComponentFromURL( factoryURL, "_blank", 0, new PropertyValue[ 0 ] )
- );
- }
-
- /* ------------------------------------------------------------------ */
- public static DocumentHelper blankTextDocument( XComponentContext xCtx ) throws com.sun.star.uno.Exception
- {
- return blankDocument( xCtx, DocumentType.WRITER );
- }
-
- /* ------------------------------------------------------------------ */
- public static DocumentHelper blankDocument( XComponentContext xCtx, DocumentType eType ) throws com.sun.star.uno.Exception
- {
- XComponent document = implCreateBlankDocument( xCtx, getDocumentFactoryURL( eType ) );
- if ( eType == DocumentType.CALC )
- return new SpreadsheetDocument( xCtx, document );
-
- return new DocumentHelper( xCtx, document );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the current view of the document
- @return
- the view component, queried for the interface described by aInterfaceClass
- */
- public DocumentViewHelper getCurrentView( )
- {
- // get the model interface for the document
- XModel xDocModel = (XModel)UnoRuntime.queryInterface(XModel.class, m_documentComponent );
- // get the current controller for the document - as a controller is tied to a view,
- // this gives us the currently active view for the document.
- XController xController = xDocModel.getCurrentController();
-
- if ( classify() == DocumentType.CALC )
- return new SpreadsheetView( m_orb, this, xController );
-
- return new DocumentViewHelper( m_orb, this, xController );
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a new form which is a child of the given form components container
-
- @param xParentContainer
- The parent container for the new form
- @param sInitialName
- The initial name of the form. May be null, in this case the default (which
- is an implementation detail) applies.
- */
- protected XIndexContainer createSubForm( XIndexContainer xParentContainer, String sInitialName )
- throws com.sun.star.uno.Exception
- {
- // create a new form
- Object xNewForm = m_orb.createInstance( "com.sun.star.form.component.DataForm" );
-
- // insert
- xParentContainer.insertByIndex( xParentContainer.getCount(), xNewForm );
-
- // set the name if necessary
- if ( null != sInitialName )
- {
- XPropertySet xFormProps = UNO.queryPropertySet( xNewForm );
- xFormProps.setPropertyValue( "Name", sInitialName );
- }
-
- // outta here
- return (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, xNewForm );
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a new form which is a child of the given form components container
-
- @param aParentContainer
- The parent container for the new form
- @param sInitialName
- The initial name of the form. May be null, in this case the default (which
- is an implementation detail) applies.
- */
- public XIndexContainer createSubForm( Object aParentContainer, String sInitialName )
- throws com.sun.star.uno.Exception
- {
- XIndexContainer xParentContainer = (XIndexContainer)UnoRuntime.queryInterface(
- XIndexContainer.class, aParentContainer );
- return createSubForm( xParentContainer, sInitialName );
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a form which is a sibling of the given form
- @param aForm
- A sinbling of the to be created form.
-
- @param sInitialName
- The initial name of the form. May be null, in this case the default (which
- is an implementation detail) applies.
- */
- public XIndexContainer createSiblingForm( Object aForm, String sInitialName ) throws com.sun.star.uno.Exception
- {
- // get the parent
- XChild xAsChild = (XChild)UnoRuntime.queryInterface( XChild.class, aForm );
- XIndexContainer xContainer = (XIndexContainer)UnoRuntime.queryInterface(
- XIndexContainer.class, xAsChild.getParent() );;
- // append a new form to this parent container
- return createSubForm( xContainer, sInitialName );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the document model which a given form component belongs to
- */
- static public DocumentHelper getDocumentForComponent( Object aFormComponent, XComponentContext xCtx )
- {
- XChild xChild = (XChild)UnoRuntime.queryInterface( XChild.class, aFormComponent );
- XModel xModel = null;
- while ( ( null != xChild ) && ( null == xModel ) )
- {
- XInterface xParent = (XInterface)xChild.getParent();
- xModel = (XModel)UnoRuntime.queryInterface( XModel.class, xParent );
- xChild = (XChild)UnoRuntime.queryInterface( XChild.class, xParent );
- }
-
- return new DocumentHelper( xCtx, xModel );
- }
-
- /* ------------------------------------------------------------------ */
- /** returns a URL which can be used to create a document of a certain type
- */
- public static String getDocumentFactoryURL( DocumentType eType )
- {
- if ( eType == DocumentType.WRITER )
- return "private:factory/swriter";
- if ( eType == DocumentType.CALC )
- return "private:factory/scalc";
- if ( eType == DocumentType.DRAWING )
- return "private:factory/sdraw";
- return "private:factory/swriter";
- }
-
- /* ------------------------------------------------------------------ */
- /** classifies a document
- */
- public DocumentType classify( )
- {
- XServiceInfo xSI = (XServiceInfo)UnoRuntime.queryInterface(
- XServiceInfo.class, m_documentComponent );
-
- if ( xSI.supportsService( "com.sun.star.text.TextDocument" ) )
- return DocumentType.WRITER;
- else if ( xSI.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
- return DocumentType.CALC;
- else if ( xSI.supportsService( "com.sun.star.drawing.DrawingDocument" ) )
- return DocumentType.DRAWING;
-
- return DocumentType.UNKNOWN;
- }
- /* ------------------------------------------------------------------ */
- /** retrieves a com.sun.star.drawing.DrawPage of the document, denoted by index
- * @param index
- * the index of the draw page<br/>
- * @throws
- * com.sun.star.lang.IndexOutOfBoundsException
- * com.sun.star.lang.WrappedTargetException
- */
- protected XDrawPage getDrawPage( int index ) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException
- {
- XDrawPagesSupplier xSuppPages = (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, getDocument() );
- XDrawPages xPages = xSuppPages.getDrawPages();
-
- return (XDrawPage)UnoRuntime.queryInterface( XDrawPage.class, xPages.getByIndex( index ) );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the <type scope="com.sun.star.drawing">DrawPage</type> of the document
- */
- protected XDrawPage getMainDrawPage( ) throws com.sun.star.uno.Exception
- {
- XDrawPage xReturn;
-
- // in case of a Writer document, this is rather easy: simply ask the XDrawPageSupplier
- XDrawPageSupplier xSuppPage = (XDrawPageSupplier)UnoRuntime.queryInterface(
- XDrawPageSupplier.class, getDocument() );
- if ( null != xSuppPage )
- xReturn = xSuppPage.getDrawPage();
- else
- { // the model itself is no draw page supplier - okay, it may be a Writer or Calc document
- // (or any other multi-page document)
- XDrawPagesSupplier xSuppPages = (XDrawPagesSupplier)UnoRuntime.queryInterface(
- XDrawPagesSupplier.class, getDocument() );
- XDrawPages xPages = xSuppPages.getDrawPages();
-
- xReturn = (XDrawPage)UnoRuntime.queryInterface( XDrawPage.class, xPages.getByIndex( 0 ) );
-
- // Note that this is no really error-proof code: If the document model does not support the
- // XDrawPagesSupplier interface, or if the pages collection returned is empty, this will break.
- }
-
- return xReturn;
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the root of the hierarchy of form components
- */
- protected XNameContainer getFormComponentTreeRoot( ) throws com.sun.star.uno.Exception
- {
- XFormsSupplier xSuppForms = (XFormsSupplier)UnoRuntime.queryInterface(
- XFormsSupplier.class, getMainDrawPage( ) );
-
- XNameContainer xFormsCollection = null;
- if ( null != xSuppForms )
- {
- xFormsCollection = xSuppForms.getForms();
- }
- return xFormsCollection;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a component at the service factory provided by the document
- */
- public XInterface createInstance( String serviceSpecifier ) throws com.sun.star.uno.Exception
- {
- XMultiServiceFactory xORB = (XMultiServiceFactory)UnoRuntime.queryInterface( XMultiServiceFactory.class,
- m_documentComponent );
- return (XInterface)xORB.createInstance( serviceSpecifier );
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a component at the service factory provided by the document
- */
- public XInterface createInstanceWithArguments( String serviceSpecifier, Object[] arguments ) throws com.sun.star.uno.Exception
- {
- XMultiServiceFactory xORB = (XMultiServiceFactory)UnoRuntime.queryInterface( XMultiServiceFactory.class,
- m_documentComponent );
- return (XInterface) xORB.createInstanceWithArguments( serviceSpecifier, arguments );
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/Forms/DocumentType.java b/odk/examples/DevelopersGuide/Forms/DocumentType.java
deleted file mode 100644
index 6eea1e02..00000000
--- a/odk/examples/DevelopersGuide/Forms/DocumentType.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-import com.sun.star.uno.*;
-
-/** a helper "enumeration class" for classifying a document type
-*/
-public class DocumentType extends com.sun.star.uno.Enum
-{
- private DocumentType( int value )
- {
- super( value );
- }
-
- public static DocumentType getDefault()
- {
- return WRITER;
- }
-
- public static final DocumentType WRITER = new DocumentType(0);
- public static final DocumentType CALC = new DocumentType(1);
- public static final DocumentType DRAWING = new DocumentType(2);
- public static final DocumentType UNKNOWN = new DocumentType(-1);
-
- public static DocumentType fromInt(int value)
- {
- switch(value)
- {
- case 0: return WRITER;
- case 1: return CALC;
- case 2: return DRAWING;
- default: return UNKNOWN;
- }
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java b/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java
deleted file mode 100644
index d5e9d145..00000000
--- a/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-import com.sun.star.awt.XControl;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.awt.XWindow;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XIndexContainer;
-import com.sun.star.form.FormComponentType;
-import com.sun.star.form.XForm;
-import com.sun.star.form.XFormController;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.util.URL;
-import com.sun.star.util.XURLTransformer;
-import com.sun.star.view.XControlAccess;
-import com.sun.star.view.XFormLayerAccess;
-
-
-/**************************************************************************/
-/** provides a small wrapper around a document view
-*/
-class DocumentViewHelper
-{
- private XMultiServiceFactory m_orb;
- private XController m_controller;
- private DocumentHelper m_document;
-
- /* ------------------------------------------------------------------ */
- final protected XController getController()
- {
- return m_controller;
- }
-
- /* ------------------------------------------------------------------ */
- final protected DocumentHelper getDocument()
- {
- return m_document;
- }
-
- /* ------------------------------------------------------------------ */
- public DocumentViewHelper( XMultiServiceFactory orb, DocumentHelper document, XController controller )
- {
- m_orb = orb;
- m_document = document;
- m_controller = controller;
- }
-
- /* ------------------------------------------------------------------ */
- /** Quick access to a given interface of the view
- @param aInterfaceClass
- the class of the interface which shall be returned
- */
- public Object get( Class aInterfaceClass )
- {
- return UnoRuntime.queryInterface( aInterfaceClass, m_controller );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves a dispatcher for the given URL, obtained at the current view of the document
- @param aURL
- a one-element array. The first element must contain a valid
- <member scope="com.sun.star.util">URL::Complete</member> value. Upon return, the URL is correctly
- parsed.
- @return
- the dispatcher for the URL in question
- */
- public XDispatch getDispatcher( URL[] aURL ) throws java.lang.Exception
- {
- XDispatch xReturn = null;
-
- // go get the current view
- XController xController = (XController)get( XController.class );
- // go get the dispatch provider of it's frame
- XDispatchProvider xProvider = (XDispatchProvider)UnoRuntime.queryInterface(
- XDispatchProvider.class, xController.getFrame() );
- if ( null != xProvider )
- {
- // need an URLTransformer
- XURLTransformer xTransformer = (XURLTransformer)UnoRuntime.queryInterface(
- XURLTransformer.class, m_orb.createInstance( "com.sun.star.util.URLTransformer" ) );
- xTransformer.parseStrict( aURL );
-
- xReturn = xProvider.queryDispatch( aURL[0], new String( ), 0 );
- }
- return xReturn;
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves a dispatcher for the given URL, obtained at the current view of the document
- */
- public XDispatch getDispatcher( String sURL ) throws java.lang.Exception
- {
- URL[] aURL = new URL[] { new URL() };
- aURL[0].Complete = sURL;
- return getDispatcher( aURL );
- }
-
- /* ------------------------------------------------------------------ */
- /* retrieves the form controller belonging to a given logical form
- */
- public XFormController getFormController( Object _form )
- {
- XFormLayerAccess formLayer = (XFormLayerAccess)get( XFormLayerAccess.class );
- return formLayer.getFormController( (XForm)UnoRuntime.queryInterface( XForm.class, _form ) );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves a control within the current view of a document
- @param xModel
- specifies the control model whose control should be located
- @return
- the control tied to the model
- */
- public XControl getFormControl( XControlModel xModel ) throws com.sun.star.uno.Exception
- {
- // the current view of the document
- XControlAccess xCtrlAcc = (XControlAccess)get( XControlAccess.class );
- // delegate the task of looking for the control
- return xCtrlAcc.getControl( xModel );
- }
-
- /* ------------------------------------------------------------------ */
- public XControl getFormControl( Object aModel ) throws com.sun.star.uno.Exception
- {
- XControlModel xModel = (XControlModel)UnoRuntime.queryInterface( XControlModel.class, aModel );
- return getFormControl( xModel );
- }
-
- /* ------------------------------------------------------------------ */
- public Object getFormControl( Object aModel, Class aInterfaceClass ) throws com.sun.star.uno.Exception
- {
- XControlModel xModel = (XControlModel)UnoRuntime.queryInterface( XControlModel.class, aModel );
- return UnoRuntime.queryInterface( aInterfaceClass, getFormControl( xModel ) );
- }
-
- /* ------------------------------------------------------------------ */
- /** toggles the design mode of the form layer of active view of our sample document
- */
- protected void toggleFormDesignMode( ) throws java.lang.Exception
- {
- // get a dispatcher for the toggle URL
- URL[] aToggleURL = new URL[] { new URL() };
- aToggleURL[0].Complete = new String( ".uno:SwitchControlDesignMode" );
- XDispatch xDispatcher = getDispatcher( aToggleURL );
-
- // dispatch the URL - this will result in toggling the mode
- PropertyValue[] aDummyArgs = new PropertyValue[] { };
- xDispatcher.dispatch( aToggleURL[0], aDummyArgs );
- }
-
- /* ------------------------------------------------------------------ */
- /** sets the focus to a specific control
- @param xModel
- a control model. The focus is set to that control which is part of our view
- and associated with the given model.
- */
- public void grabControlFocus( Object xModel ) throws com.sun.star.uno.Exception
- {
- // look for the control from the current view which belongs to the model
- XControl xControl = getFormControl( xModel );
-
- // the focus can be set to an XWindow only
- XWindow xControlWindow = (XWindow)UnoRuntime.queryInterface( XWindow.class,
- xControl );
-
- // grab the focus
- xControlWindow.setFocus();
- }
-
- /* ------------------------------------------------------------------ */
- /** sets the focus to the first control
- */
- protected void grabControlFocus( ) throws java.lang.Exception
- {
- // the forms container of our document
- XIndexContainer xForms = UNO.queryIndexContainer( m_document.getFormComponentTreeRoot( ) );
- // the first form
- XIndexContainer xForm = UNO.queryIndexContainer( xForms.getByIndex( 0 ) );
-
- // the first control model which is no FixedText (FixedText's can't have the focus)
- for ( int i = 0; i<xForm.getCount(); ++i )
- {
- XPropertySet xControlProps = UNO.queryPropertySet( xForm.getByIndex( i ) );
- if ( FormComponentType.FIXEDTEXT != ((Short)xControlProps.getPropertyValue( "ClassId" )).shortValue() )
- {
- XControlModel xControlModel = (XControlModel)UnoRuntime.queryInterface(
- XControlModel.class, xControlProps );
- // set the focus to this control
- grabControlFocus( xControlModel );
- // outta here
- break;
- }
- }
-
- // Note that we simply took the first control model from the hierarchy. This does state nothing
- // about the location of the respective control in the view. A control model is tied to a control
- // shape, and the shapes are where the geometry information such as position and size is hung up.
- // So you could easily have a document where the first control model is bound to a shape which
- // has a greater ordinate than any other control model.
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/Forms/FLTools.java b/odk/examples/DevelopersGuide/Forms/FLTools.java
deleted file mode 100644
index c50eb991..00000000
--- a/odk/examples/DevelopersGuide/Forms/FLTools.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.lang.*;
-import com.sun.star.util.*;
-import com.sun.star.beans.*;
-import com.sun.star.container.*;
-import com.sun.star.awt.*;
-import com.sun.star.form.*;
-
-
-/** provides global helpers
-*/
-public class FLTools
-{
- /* ------------------------------------------------------------------ */
- static void dump_Object( Object aObject )
- {
- XServiceInfo xSI = UNO.queryServiceInfo( aObject );
- if ( null != xSI )
- System.out.println( "dumping object with name \"" + xSI.getImplementationName() + "\"" );
- else
- System.out.println( "object has no service info!" );
- }
-
- /* ------------------------------------------------------------------ */
- /** translates a string containing an URL into a complete
- <type scope="com.sun.star.util">URL</type> object.
- */
- static public URL parseURL( String sURL, XComponentContext xCtx ) throws java.lang.Exception
- {
- URL[] aURL = new URL[] { new URL() };
- aURL[0].Complete = sURL;
- // need an URLTransformer
- XURLTransformer xTransformer = (XURLTransformer)UnoRuntime.queryInterface(
- XURLTransformer.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.util.URLTransformer", xCtx ) );
- xTransformer.parseStrict( aURL );
-
- return aURL[0];
- }
-
- /* ------------------------------------------------------------------ */
- /** returns the name of the given form component
- */
- public static String getName( Object aFormComponent ) throws com.sun.star.uno.Exception
- {
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface( XNamed.class,
- aFormComponent );
- String sName = "";
- if ( null != xNamed )
- sName = xNamed.getName();
- return sName;
- }
-
- /* ------------------------------------------------------------------ */
- /** returns the label of the given form component
- */
- public static String getLabel( Object aFormComponent ) throws com.sun.star.uno.Exception
- {
- String sLabel = "";
-
- XPropertySet xProps = UNO.queryPropertySet( aFormComponent );
- XPropertySetInfo xPSI = ( null != xProps ) ? xProps.getPropertySetInfo() : null;
- if ( null == xPSI )
- { // no property set or no property set info
- // can't do anything except falling back to the name
- return getName( aFormComponent );
- }
-
- // first check if the component has a LabelControl
- if ( xPSI.hasPropertyByName( "LabelControl" ) )
- sLabel = getLabel( xProps.getPropertyValue( "LabelControl" ) );
-
- // no LabelControl or no label at the LabelControl
- if ( 0 == sLabel.length() )
- {
- // a "Label" property?
- if ( xPSI.hasPropertyByName( "Label" ) )
- sLabel = (String)xProps.getPropertyValue( "Label" );
-
- if ( 0 == sLabel.length() )
- { // no Label property or no label set
- // -> fallback to the component name
- sLabel = getName( aFormComponent );
- }
- }
-
- return sLabel;
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the index of a form component within it's parent
- */
- static public int getIndexInParent( Object aContainer, Object aElement ) throws com.sun.star.uno.Exception
- {
- int nIndex = -1;
-
- // norm the element
- XInterface xElement = (XInterface)UnoRuntime.queryInterface(
- XInterface.class, aElement );
-
- // get the container
- XIndexContainer xIndexCont = UNO.queryIndexContainer( aContainer );
- if ( null != xIndexCont )
- {
- // loop through all children
- int nCount = xIndexCont.getCount();
- for ( int i = 0; i < nCount; ++i )
- {
- // compare with the element
- XInterface xCurrent = (XInterface)UnoRuntime.queryInterface(
- XInterface.class, xIndexCont.getByIndex( 0 ) );
- if ( xCurrent.equals( xElement ) )
- { // found
- nIndex = i;
- break;
- }
- }
- }
-
- // outta here
- return nIndex;
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the parent of the given object
- */
- static Object getParent( Object aComponent, Class aInterfaceClass )
- {
- XChild xAsChild = (XChild)UnoRuntime.queryInterface( XChild.class, aComponent );
-
- return UnoRuntime.queryInterface( aInterfaceClass, xAsChild.getParent() );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the parent of the given object
- */
- static XPropertySet getParent( Object aComponent )
- {
- return (XPropertySet)getParent( aComponent, XPropertySet.class );
- }
-
- /* ------------------------------------------------------------------ */
- /** disposes the component given
- */
- static public void disposeComponent( Object xComp ) throws java.lang.RuntimeException
- {
- XComponent xComponent = (XComponent)UnoRuntime.queryInterface( XComponent.class,
- xComp );
- if ( null != xComponent )
- xComponent.dispose();
- }
-
- /* ------------------------------------------------------------------ */
- /** get's the XControlModel for a control
- */
- static public Object getModel( Object aControl, Class aInterfaceClass )
- {
- XControl xControl = (XControl)UnoRuntime.queryInterface(
- XControl.class, aControl );
- XControlModel xModel = null;
- if ( null != xControl )
- xModel = xControl.getModel();
-
- return UnoRuntime.queryInterface( aInterfaceClass, xModel );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the type of a form component.
- <p>Speaking strictly, the function recognizes more than form components. Especially,
- it survives a null argument. which means it can be safely applied to the a top-level
- forms container; and it is able to classify grid columns (which are no form components)
- as well.</p>
- */
- static public String classifyFormComponentType( XPropertySet xComponent ) throws com.sun.star.uno.Exception
- {
- String sType = "<unknown component>";
-
- XServiceInfo xSI = UNO.queryServiceInfo( xComponent );
-
- XPropertySetInfo xPSI = null;
- if ( null != xComponent )
- xPSI = xComponent.getPropertySetInfo();
-
- if ( ( null != xPSI ) && xPSI.hasPropertyByName( "ClassId" ) )
- {
- // get the ClassId property
- XPropertySet xCompProps = UNO.queryPropertySet( xComponent );
-
- Short nClassId = (Short)xCompProps.getPropertyValue( "ClassId" );
- switch ( nClassId.intValue() )
- {
- case FormComponentType.COMMANDBUTTON: sType = "Command button"; break;
- case FormComponentType.RADIOBUTTON : sType = "Radio button"; break;
- case FormComponentType.IMAGEBUTTON : sType = "Image button"; break;
- case FormComponentType.CHECKBOX : sType = "Check Box"; break;
- case FormComponentType.LISTBOX : sType = "List Box"; break;
- case FormComponentType.COMBOBOX : sType = "Combo Box"; break;
- case FormComponentType.GROUPBOX : sType = "Group Box"; break;
- case FormComponentType.FIXEDTEXT : sType = "Fixed Text"; break;
- case FormComponentType.GRIDCONTROL : sType = "Grid Control"; break;
- case FormComponentType.FILECONTROL : sType = "File Control"; break;
- case FormComponentType.HIDDENCONTROL: sType = "Hidden Control"; break;
- case FormComponentType.IMAGECONTROL : sType = "Image Control"; break;
- case FormComponentType.DATEFIELD : sType = "Date Field"; break;
- case FormComponentType.TIMEFIELD : sType = "Time Field"; break;
- case FormComponentType.NUMERICFIELD : sType = "Numeric Field"; break;
- case FormComponentType.CURRENCYFIELD: sType = "Currency Field"; break;
- case FormComponentType.PATTERNFIELD : sType = "Pattern Field"; break;
-
- case FormComponentType.TEXTFIELD :
- // there are two known services with this class id: the usual text field,
- // and the formatted field
- sType = "Text Field";
- if ( ( null != xSI ) && xSI.supportsService( "com.sun.star.form.component.FormattedField" ) )
- {
- sType = "Formatted Field";
- }
- break;
-
- default:
- break;
- }
- }
- else
- {
- if ( ( null != xSI ) && xSI.supportsService( "com.sun.star.form.component.DataForm" ) )
- {
- sType = "Form";
- }
- }
-
- return sType;
- }
-
-};
diff --git a/odk/examples/DevelopersGuide/Forms/FormLayer.java b/odk/examples/DevelopersGuide/Forms/FormLayer.java
deleted file mode 100644
index e143e9e1..00000000
--- a/odk/examples/DevelopersGuide/Forms/FormLayer.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertySetInfo;
-import com.sun.star.container.XIndexContainer;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.drawing.XControlShape;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.Point;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.text.TextContentAnchorType;
-import com.sun.star.drawing.XDrawPage;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class FormLayer
-{
- private DocumentHelper m_document;
- private int m_insertPage;
-
- /* ------------------------------------------------------------------ */
- /** Creates a new instance of FormLayer */
- public FormLayer( DocumentHelper _document )
- {
- m_document = _document;
- m_insertPage = -1;
- }
-
- /* ------------------------------------------------------------------ */
- /** sets the page which is to be used for subsequent insertions of controls/shapes
- */
- void setInsertPage( int page )
- {
- m_insertPage = page;
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the page which is to be used for subsequent insertions of controls/shapes
- */
- final int getInsertPage( )
- {
- return m_insertPage;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a control in the document
-
- <p>Note that <em>control<em> here is an incorrect terminology. What the method really does is
- it creates a control shape, together with a control model, and inserts them into the document model.
- This will result in every view to this document creating a control described by the model-shape pair.
- </p>
-
- @param sFormComponentService
- the service name of the form component to create, e.g. "TextField"
- @param nXPos
- the abscissa of the position of the newly inserted shape
- @param nXPos
- the ordinate of the position of the newly inserted shape
- @param nWidth
- the width of the newly inserted shape
- @param nHeight
- the height of the newly inserted shape
- @param xParentForm
- the form to use as parent for the newly create form component. May be null, in this case
- a default parent is chosen by the implementation
- @return
- the property access to the control's model
- */
- protected XPropertySet createControlAndShape( String sFormComponentService, int nXPos,
- int nYPos, int nWidth, int nHeight, XIndexContainer xParentForm ) throws java.lang.Exception
- {
- // let the document create a shape
- XMultiServiceFactory xDocAsFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, m_document.getDocument() );
- XControlShape xShape = (XControlShape)UnoRuntime.queryInterface( XControlShape.class,
- xDocAsFactory.createInstance( "com.sun.star.drawing.ControlShape" ) );
-
- // position and size of the shape
- xShape.setSize( new Size( nWidth * 100, nHeight * 100 ) );
- xShape.setPosition( new Point( nXPos * 100, nYPos * 100 ) );
-
- // adjust the anchor so that the control is tied to the page
- XPropertySet xShapeProps = UNO.queryPropertySet( xShape );
- TextContentAnchorType eAnchorType = TextContentAnchorType.AT_PARAGRAPH;
- xShapeProps.setPropertyValue( "AnchorType", eAnchorType );
-
- // create the form component (the model of a form control)
- String sQualifiedComponentName = "com.sun.star.form.component." + sFormComponentService;
- XControlModel xModel = (XControlModel)UnoRuntime.queryInterface( XControlModel.class,
- m_document.getOrb().createInstance( sQualifiedComponentName ) );
-
- // insert the model into the form component hierarchy, if the caller gave us a location
- if ( null != xParentForm )
- {
- xParentForm.insertByIndex( xParentForm.getCount(), xModel );
- }
-
- // knitt them
- xShape.setControl( xModel );
-
- // add the shape to the shapes collection of the document
- XDrawPage pageWhereToInsert = ( m_insertPage != -1 ) ? m_document.getDrawPage( m_insertPage ) : m_document.getMainDrawPage();
-
- XShapes xDocShapes = (XShapes)UnoRuntime.queryInterface( XShapes.class, pageWhereToInsert );
- xDocShapes.add( xShape );
-
- // some initializations which are the same for all controls
- XPropertySet xModelProps = UNO.queryPropertySet( xModel );
- try
- {
- XPropertySetInfo xPSI = xModelProps.getPropertySetInfo();
- if ( xPSI.hasPropertyByName( "Border" ) )
- {
- if ( ((Short)xModelProps.getPropertyValue( "Border" )).shortValue() == com.sun.star.awt.VisualEffect.LOOK3D )
- xModelProps.setPropertyValue( "Border", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
- }
- if ( xPSI.hasPropertyByName( "VisualEffect" ) )
- xModelProps.setPropertyValue( "VisualEffect", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
- if ( m_document.classify() != DocumentType.CALC )
- if ( xPSI.hasPropertyByName( "BorderColor" ) )
- xModelProps.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) );
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.err.println(e);
- e.printStackTrace( System.err );
- }
- return xModelProps;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a control in the document
-
- <p>Note that <em>control<em> here is an incorrect terminology. What the method really does is
- it creates a control shape, together with a control model, and inserts them into the document model.
- This will result in every view to this document creating a control described by the model-shape pair.
- </p>
-
- @param sFormComponentService
- the service name of the form component to create, e.g. "TextField"
- @param nXPos
- the abscissa of the position of the newly inserted shape
- @param nXPos
- the ordinate of the position of the newly inserted shape
- @param nWidth
- the width of the newly inserted shape
- @param nHeight
- the height of the newly inserted shape
- @return
- the property access to the control's model
- */
- protected XPropertySet createControlAndShape( String sFormComponentService, int nXPos,
- int nYPos, int nWidth, int nHeight ) throws java.lang.Exception
- {
- return createControlAndShape( sFormComponentService, nXPos, nYPos, nWidth, nHeight, null );
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a line of controls, consisting of a label and a field for data input.
-
- <p>In opposite to the second form of this method, here the height of the field,
- as well as the abscissa of the label, are under the control of the caller.</p>
-
- @param sControlType
- specifies the type of the data input control
- @param sFieldName
- specifies the field name the text field should be bound to
- @param sControlNamePostfix
- specifies a postfix to append to the logical control names
- @param nYPos
- specifies the Y position of the line to start at
- @param nHeight
- the height of the field
- @return
- the control model of the created data input field
- */
- protected XPropertySet insertControlLine( String sControlType, String sFieldName, String sControlNamePostfix, int nXPos, int nYPos, int nHeight )
- throws java.lang.Exception
- {
- // insert the label control
- XPropertySet xLabelModel = createControlAndShape( "FixedText", nXPos, nYPos, 25, 6 );
- xLabelModel.setPropertyValue( "Label", sFieldName );
-
- // insert the text field control
- XPropertySet xFieldModel = createControlAndShape( sControlType, nXPos + 26, nYPos, 40, nHeight );
- xFieldModel.setPropertyValue( "DataField", sFieldName );
- // knit it to it's label component
- xFieldModel.setPropertyValue( "LabelControl", xLabelModel );
-
- // some names, so later on we can find them
- xLabelModel.setPropertyValue( "Name", sFieldName + sControlNamePostfix + "_Label" );
- xFieldModel.setPropertyValue( "Name", sFieldName + sControlNamePostfix );
-
- return xFieldModel;
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a line of controls, consisting of a label and a field for data input.
-
- @param sControlType
- specifies the type of the data input control
- @param sFieldName
- specifies the field name the text field should be bound to
- @param nYPos
- specifies the Y position of the line to start at
- @return
- the control model of the created data input field
- */
- protected XPropertySet insertControlLine( String sControlType, String sFieldName, String sControlNamePostfix, int nYPos )
- throws java.lang.Exception
- {
- return insertControlLine( sControlType, sFieldName, sControlNamePostfix, 2, nYPos, 6 );
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the radio button model with the given name and the given ref value
- * @param form
- * the parent form of the radio button model to find
- * @param name
- * the name of the radio button
- * @param refValue
- * the reference value of the radio button
- */
- public XPropertySet getRadioModelByRefValue( XPropertySet form, String name, String refValue ) throws com.sun.star.uno.Exception, java.lang.Exception
- {
- XIndexAccess indexAccess = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class,
- form );
-
- for ( int i=0; i<indexAccess.getCount(); ++i )
- {
- XPropertySet control = UNO.queryPropertySet( indexAccess.getByIndex( i ) );
-
- if ( ((String)control.getPropertyValue( "Name" )).equals( name ) )
- if ( ((String)control.getPropertyValue( "RefValue" )).equals( refValue ) )
- return control;
- }
- return null;
- }
-
- /* ------------------------------------------------------------------ */
- /** retrieves the radio button model with the given name and the given tag
- * @param form
- * the parent form of the radio button model to find
- * @param name
- * the name of the radio button
- * @param refValue
- * the tag of the radio button
- */
- public XPropertySet getRadioModelByTag( XPropertySet form, String name, String tag ) throws com.sun.star.uno.Exception, java.lang.Exception
- {
- XIndexAccess indexAccess = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class,
- form );
-
- for ( int i=0; i<indexAccess.getCount(); ++i )
- {
- XPropertySet control = UNO.queryPropertySet( indexAccess.getByIndex( i ) );
-
- if ( ((String)control.getPropertyValue( "Name" )).equals( name ) )
- if ( ((String)control.getPropertyValue( "Tag" )).equals( tag ) )
- return control;
- }
- return null;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/GridFieldValidator.java b/odk/examples/DevelopersGuide/Forms/GridFieldValidator.java
deleted file mode 100644
index c50ae50f..00000000
--- a/odk/examples/DevelopersGuide/Forms/GridFieldValidator.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/**************************************************************************/
-import com.sun.star.uno.*;
-import com.sun.star.beans.*;
-import com.sun.star.form.*;
-import com.sun.star.lang.*;
-import com.sun.star.sdb.*;
-import com.sun.star.sdbc.*;
-import com.sun.star.sdbcx.*;
-import com.sun.star.container.*;
-import com.sun.star.awt.*;
-import com.sun.star.task.*;
-
-/**************************************************************************/
-/** helper class for validating a grid field before it is updated
-
- <p>Actually, the mechanism for validating the field is not restricted to
- grid control fields. Instead, it can be used for any bound controls.</p>
-*/
-class GridFieldValidator implements XUpdateListener
-{
- private DocumentHelper m_aDocument;
- private XComponentContext m_xCtx;
- private XPropertySet m_xWatchedColumn;
-
- private boolean m_bWatching;
-
- /* ------------------------------------------------------------------ */
- public GridFieldValidator( XComponentContext xCtx, XPropertySet xWatchedGridColumn )
- {
- // remember
- m_xCtx = xCtx;
- m_xWatchedColumn = xWatchedGridColumn;
- m_aDocument = DocumentHelper.getDocumentForComponent(xWatchedGridColumn,
- xCtx);
-
- m_bWatching = false;
- }
-
- /* ------------------------------------------------------------------ */
- public void enableColumnWatch( boolean bEnable )
- {
- if ( bEnable == m_bWatching )
- return;
-
- XUpdateBroadcaster xUpdate = (XUpdateBroadcaster)UnoRuntime.queryInterface(
- XUpdateBroadcaster.class, m_xWatchedColumn );
-
- if ( bEnable )
- xUpdate.addUpdateListener( this );
- else
- xUpdate.removeUpdateListener( this );
-
- m_bWatching = bEnable;
- }
-
- /* ------------------------------------------------------------------ */
- /** shows a message that we can't do several things due to an implementation error
- */
- private void showInvalidValueMessage( )
- {
- try
- {
- // build the message we want to show
- String sMessage = "The column \"";
- sMessage += FLTools.getLabel( m_xWatchedColumn );
- sMessage += "\" is not allowed to contain empty strings.";
-
- SQLContext aError = new SQLContext(
- new String( "Invalid Value Entered" ),
- null,
- new String( "S1000" ),
- 0,
- new Any( new Type(), null ),
- sMessage
- );
-
- // instantiate an interaction handler who can handle SQLExceptions
- XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface(
- XInteractionHandler.class,
- m_xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.task.InteractionHandler", m_xCtx ) );
-
- // create a new request and execute it
- InteractionRequest aRequest = new InteractionRequest( aError );
- xHandler.handle( aRequest );
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ------------------------------------------------------------------ */
- // XUpdateListener overridables
- /* ------------------------------------------------------------------ */
- public boolean approveUpdate( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- boolean bApproved = true;
- try
- {
- // the control model which fired the event
- XPropertySet xSourceProps = UNO.queryPropertySet( aEvent.Source );
-
- String sNewText = (String)xSourceProps.getPropertyValue( "Text" );
- if ( 0 == sNewText.length() )
- {
- // say that the value is invalid
- showInvalidValueMessage( );
- bApproved = false;
-
- // reset the control value
- // for this, we take the current value from the row set field the control
- // is bound to, and forward it to the control model
- XColumn xBoundColumn = UNO.queryColumn( xSourceProps.getPropertyValue( "BoundField" ) );
- if ( null != xBoundColumn )
- {
- xSourceProps.setPropertyValue( "Text", xBoundColumn.getString() );
- }
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- return bApproved;
- }
-
- /* ------------------------------------------------------------------ */
- public void updated( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- }
-
- /* ------------------------------------------------------------------ */
- // XEventListener overridables
- /* ------------------------------------------------------------------ */
- public void disposing( EventObject aEvent )
- {
- // not interested in
- }
-};
diff --git a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
deleted file mode 100644
index 9c5fbb72..00000000
--- a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.frame.XStorable;
-import com.sun.star.frame.XModel;
-import com.sun.star.sdb.XOfficeDatabaseDocument;
-import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbc.XCloseable;
-import com.sun.star.sdbc.XConnection;
-import com.sun.star.sdbc.XStatement;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.io.IOException;
-import com.sun.star.sdb.XDocumentDataSource;
-import com.sun.star.sdbc.XDataSource;
-import com.sun.star.uno.XComponentContext;
-import java.io.File;
-
-import com.sun.star.util.CloseVetoException;
-import java.io.File;
-
-/**
- *
- * @author fs93730
- */
-public class HsqlDatabase
-{
- XComponentContext m_context;
- // the URL of the temporary file used for the database document
- String m_databaseDocumentFile;
- // the database document
- XOfficeDatabaseDocument m_databaseDocument;
- // the data source belonging to the database document
- // the default connection
- XConnection m_connection;
-
- // --------------------------------------------------------------------------------------------------------
- public HsqlDatabase( XComponentContext _context ) throws Exception
- {
- m_context = _context;
- createDBDocument();
- }
-
- // --------------------------------------------------------------------------------------------------------
- public HsqlDatabase( XComponentContext _context, String _existingDocumentURL ) throws Exception
- {
- m_context = _context;
- createDBDocument( _existingDocumentURL );
- }
-
- // --------------------------------------------------------------------------------------------------------
- private void createDBDocument( String _docURL ) throws Exception
- {
- m_databaseDocumentFile = _docURL;
-
- XNameAccess dbContext = (XNameAccess)UnoRuntime.queryInterface( XNameAccess.class,
- m_context.getServiceManager().createInstanceWithContext( "com.sun.star.sdb.DatabaseContext", m_context ) );
- XDocumentDataSource dataSource = (XDocumentDataSource)UnoRuntime.queryInterface( XDocumentDataSource.class,
- dbContext.getByName( _docURL ) );
-
- m_databaseDocument = dataSource.getDatabaseDocument();
- }
-
- /** creates an empty database document in a temporary location
- */
- private void createDBDocument() throws Exception
- {
- File documentFile = File.createTempFile("testdb",".odb");
- documentFile.deleteOnExit();
- m_databaseDocumentFile = URLHelper.getFileURLFromSystemPath( documentFile );
-
- m_databaseDocument = (XOfficeDatabaseDocument)UnoRuntime.queryInterface(
- XOfficeDatabaseDocument.class, m_context.getServiceManager().createInstanceWithContext(
- "com.sun.star.sdb.OfficeDatabaseDocument", m_context ) );
-
- XPropertySet dsProperties = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_databaseDocument.getDataSource() );
- dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb");
-
- XStorable storable = (XStorable)UnoRuntime.queryInterface( XStorable.class, m_databaseDocument );
- storable.storeAsURL( m_databaseDocumentFile, new PropertyValue[]{} );
- }
-
- /** returns a connection to the database
- *
- * Multiple calls to this method return the same connection. The HsqlDatabase object keeps
- * the ownership of the connection, so you don't need to (and should not) dispose/close it.
- *
- */
- public XConnection defaultConnection() throws SQLException
- {
- if ( m_connection != null )
- return m_connection;
- m_connection = m_databaseDocument.getDataSource().getConnection(new String(),new String());
- return m_connection;
- }
-
- /** executes the given SQL statement via the defaultConnection
- */
- public void executeSQL( String statementString ) throws SQLException
- {
- XStatement statement = defaultConnection().createStatement();
- statement.execute( statementString );
- }
-
- /** stores the database document
- */
- public void store() throws IOException
- {
- if ( m_databaseDocument != null )
- {
- XStorable storeDoc = (XStorable)UnoRuntime.queryInterface( XStorable.class,
- m_databaseDocument );
- storeDoc.store();
- }
- }
-
- /** closes the database document
- *
- * Any CloseVetoExceptions fired by third parties are ignored, and any reference to the
- * database document is released.
- */
- public void close()
- {
- // close connection
- XCloseable closeConn = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,
- m_connection );
- if ( closeConn != null )
- {
- try
- {
- closeConn.close();
- }
- catch( SQLException e )
- {
- }
- }
- m_connection = null;
-
- // close document
- com.sun.star.util.XCloseable closeDoc = (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(
- com.sun.star.util.XCloseable.class, m_databaseDocument );
- if ( closeDoc != null )
- {
- try
- {
- closeDoc.close( true );
- }
- catch( CloseVetoException e )
- {
- }
- }
- m_databaseDocument = null;
- }
-
- /** closes the document, and deletes the underlying file
- */
- public void closeAndDelete()
- {
- close();
-
- if ( m_databaseDocumentFile != null )
- {
- try
- {
- File file = new File(m_databaseDocumentFile);
- file.delete();
- }
- catch(Exception e)
- {
- }
- m_databaseDocumentFile = null;
- }
- }
-
- /** returns the underlying database document
- */
- public XOfficeDatabaseDocument getDatabaseDocument()
- {
- return m_databaseDocument;
- }
-
- /** returns the associated data source
- */
- public XDataSource getDataSource()
- {
- return m_databaseDocument.getDataSource();
- }
-
- /** returns the model interface of the underlying database document
- */
- XModel getModel()
- {
- return (XModel)UnoRuntime.queryInterface( XModel.class, m_databaseDocument );
- }
-
- /** drops the table with a given name
-
- @param _name
- the name of the table to drop
- @param _ifExists
- TRUE if it should be dropped only when it exists.
- */
- public void dropTable( String _name, boolean _ifExists ) throws SQLException
- {
- String dropStatement = "DROP TABLE \"" + _name;
- if ( _ifExists )
- dropStatement += "\" IF EXISTS";
- executeSQL( dropStatement );
- }
-
- /** returns the URL of the ODB document represented by this instance
- */
- public String getDocumentURL()
- {
- return m_databaseDocumentFile;
- }
-
- /** creates a row set operating the database, with a given command/type
- */
- public RowSet createRowSet( int _commandType, String _command )
- {
- return new RowSet( m_context, getDocumentURL(), _commandType, _command );
- }
-
- protected void finalize() throws Throwable
- {
- closeAndDelete();
- super.finalize();
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/InteractionRequest.java b/odk/examples/DevelopersGuide/Forms/InteractionRequest.java
deleted file mode 100644
index 8547fdfc..00000000
--- a/odk/examples/DevelopersGuide/Forms/InteractionRequest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.task.*;
-import java.util.Vector;
-
-/**************************************************************************/
-/** helper class for implementing an interaction request.
-*/
-class InteractionRequest implements XInteractionRequest
-{
- private Object m_aRequest;
- private Vector m_aContinuations;
-
- /* ------------------------------------------------------------------ */
- public InteractionRequest( Object aRequest )
- {
- m_aRequest = aRequest;
- m_aContinuations = new Vector();
- }
-
- /* ------------------------------------------------------------------ */
- public void addContinuation( XInteractionContinuation xCont )
- {
- if ( null != xCont )
- m_aContinuations.add( xCont );
- }
-
- /* ------------------------------------------------------------------ */
- public Object getRequest( )
- {
- return m_aRequest;
- }
-
- /* ------------------------------------------------------------------ */
- public XInteractionContinuation[] getContinuations( )
- {
- XInteractionContinuation[] aContinuations = new XInteractionContinuation[ m_aContinuations.size() ];
- for ( int i=0; i<m_aContinuations.size(); ++i )
- aContinuations[ i ] = (XInteractionContinuation)m_aContinuations.elementAt( i );
- return aContinuations;
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/Forms/KeyGenerator.java b/odk/examples/DevelopersGuide/Forms/KeyGenerator.java
deleted file mode 100644
index 87a5d11b..00000000
--- a/odk/examples/DevelopersGuide/Forms/KeyGenerator.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.beans.*;
-import com.sun.star.form.*;
-import com.sun.star.lang.*;
-import com.sun.star.sdb.*;
-import com.sun.star.sdbc.*;
-import com.sun.star.sdbcx.*;
-import com.sun.star.container.*;
-import com.sun.star.awt.*;
-
-/**************************************************************************/
-/** base class for helpers dealing with unique column values
-*/
-class UniqueColumnValue
-{
- /* ------------------------------------------------------------------ */
- /** extracts the name of the table a form is based on.
-
- <p>This method works for forms based directly on tables, and for forms based on statements, which
- themself are based on one table.<br/>
- Everything else (especially forms based on queries) is not yet implemented.</p>
- */
- protected String extractTableName( XPropertySet xForm ) throws com.sun.star.uno.Exception
- {
- String sReturn;
-
- Integer aCommandType = (Integer)xForm.getPropertyValue( "CommandType" );
- String sCommand = (String)xForm.getPropertyValue( "Command" );
-
- if ( CommandType.COMMAND == aCommandType.intValue() )
- {
- // get the connection from the form
- XConnection xFormConn = (XConnection)UnoRuntime.queryInterface( XConnection.class,
- xForm.getPropertyValue( "ActiveConnection" ) );
- // and let it create a composer for us
- XSQLQueryComposerFactory xComposerFac =
- (XSQLQueryComposerFactory)UnoRuntime.queryInterface(
- XSQLQueryComposerFactory.class, xFormConn );
- XSQLQueryComposer xComposer = xComposerFac.createQueryComposer( );
-
- // let this composer analyze the command
- xComposer.setQuery( sCommand );
-
- // and ask it for the table(s)
- XTablesSupplier xSuppTables = (XTablesSupplier)UnoRuntime.queryInterface(
- XTablesSupplier.class, xComposer );
- XNameAccess xTables = xSuppTables.getTables();
-
- // simply take the first table name
- String[] aNames = xTables.getElementNames( );
- sCommand = aNames[0];
- }
-
- return sCommand;
- }
-
- /* ------------------------------------------------------------------ */
- /** generates a statement which can be used to create a unique (in all conscience) value
- for the column given.
- <p>Currently, the implementation uses a very simple approach - it just determines the maximum of currently
- existing values in the column. If your concrete data source supports a more sophisticated approach of generating
- unique values, you probably want to adjust the <code>SELECT</code> statement below accordingly.</p>
-
- @returns
- a String which can be used as statement to retrieve a unique value for the given column.
- The result set resulting from such a execution contains the value in it's first column.
- */
- protected String composeUniqueyKeyStatement( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception
- {
- String sStatement = new String( "SELECT MAX( " );
- sStatement += sFieldName;
- sStatement += new String( ") + 1 FROM " );
- // the table name is a property of the form
- sStatement += extractTableName( xForm );
-
- // note that the implementation is imperfect (besides the problem that MAX is not a really good solution
- // for a database with more that one client):
- // It does not quote the field and the table name. This needs to be done if the database is intolerant
- // against such things - the XDatabaseMetaData, obtained from the connection, would be needed then
- // Unfortunately, there is no UNO service doing this - it would need to be implemented manually.
-
- return sStatement;
- }
-
- /* ------------------------------------------------------------------ */
- /** generates a unique (in all conscience) key into the column given
- @param xForm
- the form which contains the column in question
- @param sFieldName
- the name of the column
- */
- protected int generatePrimaryKey( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception
- {
- // get the current connection of the form
- XConnection xConn = (XConnection)UnoRuntime.queryInterface(
- XConnection.class, xForm.getPropertyValue( "ActiveConnection" ) );
- // let it create a new statement
- XStatement xStatement = xConn.createStatement();
-
- // build the query string to determine a free value
- String sStatement = composeUniqueyKeyStatement( xForm, sFieldName );
-
- // execute the query
- XResultSet xResults = xStatement.executeQuery( sStatement );
-
- // move the result set to the first record
- xResults.next( );
-
- // get the value
- XRow xRow = (XRow)UnoRuntime.queryInterface( XRow.class, xResults );
- int nFreeValue = xRow.getInt( 1 );
-
- // dispose the temporary objects
- FLTools.disposeComponent( xStatement );
- // this should get rid of the result set, too
-
- return nFreeValue;
- }
-
- /* ------------------------------------------------------------------ */
- /** inserts a unique (in all conscience) key into the column given
- @param xForm
- the form which contains the column in question
- @param sFieldName
- the name of the column
- */
- public void insertPrimaryKey( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception
- {
- // check the privileges
- Integer aConcurrency = (Integer)xForm.getPropertyValue( "ResultSetConcurrency" );
- if ( ResultSetConcurrency.READ_ONLY != aConcurrency.intValue() )
- {
- // get the column object
- XColumnsSupplier xSuppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
- XColumnsSupplier.class, xForm );
- XNameAccess xCols = xSuppCols.getColumns();
- XColumnUpdate xCol = (XColumnUpdate)UnoRuntime.queryInterface(
- XColumnUpdate.class, xCols.getByName( sFieldName ) );
-
- xCol.updateInt( generatePrimaryKey( xForm, sFieldName ) );
- }
- }
-};
-
-/**************************************************************************/
-/** base class for helpers dealing with unique column values
-*/
-class KeyGeneratorForReset extends UniqueColumnValue implements XResetListener
-{
- /* ------------------------------------------------------------------ */
- private DocumentViewHelper m_aView;
- private String m_sFieldName;
-
- /* ------------------------------------------------------------------ */
- /** ctor
- @param aView
- the view which shall be used to focus controls
- @param sFieldName
- the name of the field for which keys should be generated
- */
- public KeyGeneratorForReset( String sFieldName, DocumentViewHelper aView )
- {
- m_sFieldName = sFieldName;
- m_aView = aView;
- }
-
- /* ------------------------------------------------------------------ */
- /** sets the focus to the first control which is no fixed text, and not the
- one we're defaulting
- */
- public void defaultNewRecordFocus( XPropertySet xForm ) throws com.sun.star.uno.Exception
- {
- XIndexAccess xFormAsContainer = (XIndexAccess)UnoRuntime.queryInterface(
- XIndexAccess.class, xForm );
- for ( int i = 0; i<xFormAsContainer.getCount(); ++i )
- {
- // the model
- XPropertySet xModel = UNO.queryPropertySet( xFormAsContainer.getByIndex( i ) );
-
- // check if it's a valid leaf (no sub form or such)
- XPropertySetInfo xPSI = xModel.getPropertySetInfo( );
- if ( ( null == xPSI ) || !xPSI.hasPropertyByName( "ClassId" ) )
- continue;
-
- // check if it's a fixed text
- Short nClassId = (Short)xModel.getPropertyValue( "ClassId" );
- if ( FormComponentType.FIXEDTEXT == nClassId.shortValue() )
- continue;
-
- // check if it is bound to the field we are responsible for
- if ( !xPSI.hasPropertyByName( "DataField" ) )
- continue;
-
- String sFieldDataSource = (String)xModel.getPropertyValue( "DataField" );
- if ( sFieldDataSource.equals( m_sFieldName ) )
- continue;
-
- // both conditions do not apply
- // -> set the focus into the respective control
- XControlModel xCM = UNO.queryControlModel( xModel );
- m_aView.grabControlFocus( xCM);
- break;
- }
- }
-
- /* ------------------------------------------------------------------ */
- // XResetListener overridables
- /* ------------------------------------------------------------------ */
- public boolean approveReset( com.sun.star.lang.EventObject rEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in vetoing this
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- public void resetted( com.sun.star.lang.EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // check if this reset occurred becase we're on a new record
- XPropertySet xFormProps = UNO.queryPropertySet( aEvent.Source );
- try
- {
- Boolean aIsNew = (Boolean)xFormProps.getPropertyValue( "IsNew" );
- if ( aIsNew.booleanValue() )
- { // yepp
-
- // we're going to modify the record, though after that, to the user, it should look
- // like it has not been modified
- // So we need to ensure that we do not change the IsModified property with whatever we do
- Object aModifiedFlag = xFormProps.getPropertyValue( "IsModified" );
-
- // now set the value
- insertPrimaryKey( xFormProps, m_sFieldName );
-
- // then restore the flag
- xFormProps.setPropertyValue( "IsModified", aModifiedFlag );
-
- // still one thing ... would be nice to have the focus in a control which is
- // the one which's value we just defaulted
- defaultNewRecordFocus( xFormProps );
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
- /* ------------------------------------------------------------------ */
- // XEventListener overridables
- /* ------------------------------------------------------------------ */
- public void disposing( EventObject aEvent )
- {
- // not interested in
- }
-};
-
-
-/**************************************************************************/
-/** base class for helpers dealing with unique column values
-*/
-class KeyGeneratorForUpdate extends UniqueColumnValue implements XRowSetApproveListener
-{
- /* ------------------------------------------------------------------ */
- private String m_sFieldName;
-
- /* ------------------------------------------------------------------ */
- public KeyGeneratorForUpdate( String sFieldName )
- {
- m_sFieldName = sFieldName;
- }
-
- /* ------------------------------------------------------------------ */
- // XRowSetApproveListener overridables
- /* ------------------------------------------------------------------ */
- public boolean approveCursorMove( com.sun.star.lang.EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in vetoing moves
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- public boolean approveRowChange( RowChangeEvent aEvent ) throws com.sun.star.uno.RuntimeException
- {
- if ( RowChangeAction.INSERT == aEvent.Action )
- {
- try
- {
- // the affected form
- XPropertySet xFormProps = UNO.queryPropertySet( aEvent.Source );
- // insert a new unique value
- insertPrimaryKey( xFormProps, m_sFieldName );
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
- return true;
- }
-
- /* ------------------------------------------------------------------ */
- public boolean approveRowSetChange( com.sun.star.lang.EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in vetoing executions of the row set
- return true;
- }
- /* ------------------------------------------------------------------ */
- // XEventListener overridables
- /* ------------------------------------------------------------------ */
- public void disposing( EventObject aEvent )
- {
- // not interested in
- }
-};
-
-/**************************************************************************/
-/** allows to generate unique keys for a field of a Form
-*/
-public class KeyGenerator
-{
- /* ------------------------------------------------------------------ */
- private KeyGeneratorForReset m_aResetKeyGenerator;
- private KeyGeneratorForUpdate m_aUpdateKeyGenerator;
- private boolean m_bResetListening;
- private boolean m_bUpdateListening;
-
- private DocumentHelper m_aDocument;
- private XPropertySet m_xForm;
-
- /* ------------------------------------------------------------------ */
- /** ctor
- @param xForm
- specified the form to operate on
- @param sFieldName
- specifies the field which's value should be manipulated
- */
- public KeyGenerator( XPropertySet xForm, String sFieldName,
- XComponentContext xCtx )
- {
- m_xForm = xForm;
-
- DocumentHelper aDocument = DocumentHelper.getDocumentForComponent( xForm, xCtx );
-
- m_aResetKeyGenerator = new KeyGeneratorForReset( sFieldName, aDocument.getCurrentView() );
- m_aUpdateKeyGenerator = new KeyGeneratorForUpdate( sFieldName );
-
- m_bResetListening = m_bUpdateListening = false;
- }
-
- /* ------------------------------------------------------------------ */
- /** stops any actions on the form
- */
- public void stopGenerator( )
- {
- XReset xFormReset = UNO.queryReset( m_xForm );
- xFormReset.removeResetListener( m_aResetKeyGenerator );
-
- XRowSetApproveBroadcaster xFormBroadcaster = (XRowSetApproveBroadcaster)UnoRuntime.queryInterface(
- XRowSetApproveBroadcaster.class, m_xForm );
- xFormBroadcaster.removeRowSetApproveListener( m_aUpdateKeyGenerator );
-
- m_bUpdateListening = m_bResetListening = false;
- }
-
- /* ------------------------------------------------------------------ */
- /** activates one of our two key generators
- */
- public void activateKeyGenerator( boolean bGenerateOnReset )
- {
- // for resets
- XReset xFormReset = UNO.queryReset( m_xForm );
- // for approving actions
- XRowSetApproveBroadcaster xFormBroadcaster = (XRowSetApproveBroadcaster)UnoRuntime.queryInterface(
- XRowSetApproveBroadcaster.class, m_xForm );
-
- if ( bGenerateOnReset )
- {
- if ( !m_bResetListening )
- xFormReset.addResetListener( m_aResetKeyGenerator );
- if ( m_bUpdateListening )
- xFormBroadcaster.removeRowSetApproveListener( m_aUpdateKeyGenerator );
-
- m_bUpdateListening = false;
- m_bResetListening = true;
- }
- else
- {
- if ( m_bResetListening )
- xFormReset.removeResetListener( m_aResetKeyGenerator );
- if ( !m_bUpdateListening )
- xFormBroadcaster.addRowSetApproveListener( m_aUpdateKeyGenerator );
-
- m_bResetListening = false;
- m_bUpdateListening = true;
- }
- }
-};
diff --git a/odk/examples/DevelopersGuide/Forms/ListSelectionValidator.java b/odk/examples/DevelopersGuide/Forms/ListSelectionValidator.java
deleted file mode 100644
index 845d6802..00000000
--- a/odk/examples/DevelopersGuide/Forms/ListSelectionValidator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class ListSelectionValidator extends ControlValidator
-{
- /** Creates a new instance of ListSelectionValidator */
- public ListSelectionValidator()
- {
- }
-
- public String explainInvalid( Object Value )
- {
- try
- {
- short[] selectionIndexes = (short[])Value;
- if ( selectionIndexes.length > 2 )
- return "please 2 entries, at most";
- }
- catch( java.lang.Exception e )
- {
- return "oops. What's this?";
- }
- return "";
- }
-
- public boolean isValid( Object Value )
- {
- try
- {
- short[] selectionIndexes = (short[])Value;
- if ( selectionIndexes.length > 2 )
- return false;
- return true;
- }
- catch( java.lang.Exception e )
- {
- }
- return false;
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/Forms/Makefile b/odk/examples/DevelopersGuide/Forms/Makefile
deleted file mode 100644
index 95867588..00000000
--- a/odk/examples/DevelopersGuide/Forms/Makefile
+++ /dev/null
@@ -1,197 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Forms example of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=FormsExamples
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-APP1_NAME=DataAwareness
-APP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME)
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP2_NAME=ValueBinding
-APP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP2_NAME)
-APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
-APP3_NAME=SpreadsheetValueBinding
-APP3_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP3_NAME)
-APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
-APP4_NAME=ControlValidation
-APP4_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP4_NAME)
-APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
-
-COMMON_CLASS_OUT = $(SAMPLE_CLASS_OUT)/common
-COMMON_JAVAFILES = \
- ButtonOperator.java \
- ComponentTreeTraversal.java \
- ControlLock.java \
- DocumentHelper.java \
- DocumentType.java \
- DocumentViewHelper.java \
- FLTools.java \
- FormLayer.java \
- GridFieldValidator.java \
- InteractionRequest.java \
- KeyGenerator.java \
- SalesFilter.java \
- UNO.java \
- SpreadsheetView.java \
- WaitForInput.java \
- DocumentBasedExample.java \
- TableCellTextBinding.java \
- SpreadsheetDocument.java \
- NumericValidator.java \
- TextValidator.java \
- BooleanValidator.java \
- ListSelectionValidator.java \
- DateValidator.java \
- TimeValidator.java \
- ControlValidator.java \
- SingleControlValidation.java \
- HsqlDatabase.java \
- RowSet.java \
- URLHelper.java
-
-COMMON_CLASSFILES = $(patsubst %.java,$(COMMON_CLASS_OUT)/%.class,$(COMMON_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMMON_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- FormsExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMMON_CLASSFILES) : $(COMMON_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMMON_CLASS_OUT) $^
-
-# rule for client/example application manifest file
-$(SAMPLE_GEN_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_CLASS_OUT)/$(APP1_NAME).class : $(APP1_NAME).java $(COMMON_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $<
-
-$(APP2_CLASS_OUT)/$(APP2_NAME).class : $(APP2_NAME).java $(COMMON_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP2_CLASS_OUT) $<
-
-$(APP3_CLASS_OUT)/$(APP3_NAME).class : $(APP3_NAME).java $(COMMON_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP3_CLASS_OUT) $<
-
-$(APP4_CLASS_OUT)/$(APP4_NAME).class : $(APP4_NAME).java $(COMMON_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP4_CLASS_OUT) $<
-
-$(APP1_JAR) : $(SAMPLE_GEN_OUT)/$(APP1_NAME).mf $(APP1_CLASS_OUT)/$(APP1_NAME).class $(COMMON_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ -C $(COMMON_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP2_JAR) : $(SAMPLE_GEN_OUT)/$(APP2_NAME).mf $(APP2_CLASS_OUT)/$(APP2_NAME).class $(COMMON_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP2_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ -C $(COMMON_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP3_JAR) : $(SAMPLE_GEN_OUT)/$(APP3_NAME).mf $(APP3_CLASS_OUT)/$(APP3_NAME).class $(COMMON_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP3_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ -C $(COMMON_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP4_JAR) : $(SAMPLE_GEN_OUT)/$(APP4_NAME).mf $(APP4_CLASS_OUT)/$(APP4_NAME).class $(COMMON_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP4_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ -C $(COMMON_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-FormsExample : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR)
- @echo --------------------------------------------------------------------------------
- @echo "$(QM)$(APP1_NAME)$(QM)" demonstrates various things around data aware controls.
- @echo "$(QM)$(APP2_NAME)$(QM)" demonstrates the use of value bindings for form controls.
- @echo "$(QM)$(APP3_NAME)$(QM)" demonstrates the usage of the com.sun.star.table.CellValueBinding service
- @echo "$(QM)$(APP4_NAME)$(QM)" demonstrates the form control validation API
-
- @echo Please use one of the following commands to run an example:
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo $(MAKE) $(APP4_NAME).run
- @echo -
- @echo Note: The data awareness example needs a running data source whith name
- @echo $(SQM) $(SQM)"$(QM)OO_SDK_Demo_DB$(QM)". Make sure that you have created such a data source,
- @echo -
- @echo The document "$(QM)ProgrammaticScriptAssignment.odt$(QM)" demonstrates
- @echo how you can programmatically create form controls, and associated
- @echo scripts with certain events.
- @echo -
- @echo $(MAKE) ProgrammaticScriptAssignment.odt.load
- @echo --------------------------------------------------------------------------------
-
-ProgrammaticScriptAssignment.odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
diff --git a/odk/examples/DevelopersGuide/Forms/NumericValidator.java b/odk/examples/DevelopersGuide/Forms/NumericValidator.java
deleted file mode 100644
index 350d776d..00000000
--- a/odk/examples/DevelopersGuide/Forms/NumericValidator.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.form.binding.*;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class NumericValidator extends ControlValidator
-{
-
- /** Creates a new instance of NumericValidator */
- public NumericValidator( )
- {
- }
-
- public String explainInvalid( Object Value )
- {
- try
- {
- double value = ((Double)Value).doubleValue();
- if ( Double.compare( Double.NaN, value ) == 0 )
- return "This is NotANumber";
- if ( !isProperRange( value ) )
- return "The value must be between 0 and 100";
- if ( !isProperDigitCount( value ) )
- return "The value must have at most one decimal digit";
- }
- catch( java.lang.Exception e )
- {
- return "This is no valid number";
- }
- return "";
- }
-
- public boolean isValid( Object Value )
- {
- try
- {
- double value = ((Double)Value).doubleValue();
- if ( Double.compare( Double.NaN, value ) == 0 )
- return false;
- if ( !isProperRange( value ) )
- return false;
- if ( !isProperDigitCount( value ) )
- return false;
- return true;
- }
- catch( java.lang.Exception e )
- {
- }
- return false;
- }
-
- private boolean isProperRange( double value)
- {
- return ( value >= 0 ) && ( value <= 100 );
- }
-
- private boolean isProperDigitCount( double value)
- {
- return ( java.lang.Math.floor( value * 10 ) == value * 10 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/ProgrammaticScriptAssignment.odt b/odk/examples/DevelopersGuide/Forms/ProgrammaticScriptAssignment.odt
deleted file mode 100644
index 40b952d9..00000000
--- a/odk/examples/DevelopersGuide/Forms/ProgrammaticScriptAssignment.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Forms/RowSet.java b/odk/examples/DevelopersGuide/Forms/RowSet.java
deleted file mode 100644
index f123ae6a..00000000
--- a/odk/examples/DevelopersGuide/Forms/RowSet.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.io.XInputStream;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbc.XArray;
-import com.sun.star.sdbc.XBlob;
-import com.sun.star.sdbc.XClob;
-import com.sun.star.sdbc.XRef;
-import com.sun.star.sdbc.XRow;
-import com.sun.star.sdbc.XRowSet;
-import com.sun.star.sdbc.XRowSetListener;
-import com.sun.star.sdbcx.XColumnsSupplier;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.Date;
-import com.sun.star.util.DateTime;
-import com.sun.star.util.Time;
-
-public class RowSet implements XRowSet, XRow
-{
- private XRowSet m_rowSet;
- private XRow m_row;
- private XPropertySet m_rowSetProps;
-
- public RowSet( XComponentContext _context, String _dataSource, int _commandType, String _command )
- {
- try
- {
- m_rowSetProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, _context.getServiceManager().createInstanceWithContext( "com.sun.star.sdb.RowSet", _context ) );
- m_rowSetProps.setPropertyValue( "DataSourceName", _dataSource );
- m_rowSetProps.setPropertyValue( "CommandType", new Integer( _commandType ) );
- m_rowSetProps.setPropertyValue( "Command", _command );
-
- m_rowSet = (XRowSet)UnoRuntime.queryInterface( XRowSet.class, m_rowSetProps );
- m_row = (XRow)UnoRuntime.queryInterface( XRow.class, m_rowSetProps );
- }
- catch ( Exception e )
- {
- e.printStackTrace(System.err);
- throw new java.lang.InstantiationError();
- }
- }
-
- // misc
- public int getColumnCount()
- {
- XColumnsSupplier suppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
- XColumnsSupplier.class, m_rowSet );
- XIndexAccess columns = (XIndexAccess)UnoRuntime.queryInterface(
- XIndexAccess.class, suppCols.getColumns() );
- return columns.getCount();
- }
-
- // XRowSet
- public void execute() throws SQLException
- {
- m_rowSet.execute();
- }
-
- public void addRowSetListener( XRowSetListener _listener )
- {
- m_rowSet.addRowSetListener( _listener );
- }
-
- public void removeRowSetListener( XRowSetListener _listener )
- {
- m_rowSet.removeRowSetListener( _listener );
- }
-
- public boolean next() throws SQLException
- {
- return m_rowSet.next();
- }
-
- public boolean isBeforeFirst() throws SQLException
- {
- return m_rowSet.isBeforeFirst();
- }
-
- public boolean isAfterLast() throws SQLException
- {
- return m_rowSet.isAfterLast();
- }
-
- public boolean isFirst() throws SQLException
- {
- return m_rowSet.isFirst();
- }
-
- public boolean isLast() throws SQLException
- {
- return m_rowSet.isLast();
- }
-
- public void beforeFirst() throws SQLException
- {
- m_rowSet.beforeFirst();
- }
-
- public void afterLast() throws SQLException
- {
- m_rowSet.afterLast();
- }
-
- public boolean first() throws SQLException
- {
- return m_rowSet.first();
- }
-
- public boolean last() throws SQLException
- {
- return m_rowSet.last();
- }
-
- public int getRow() throws SQLException
- {
- return m_rowSet.getRow();
- }
-
- public boolean absolute(int i) throws SQLException
- {
- return m_rowSet.absolute(i);
- }
-
- public boolean relative(int i) throws SQLException
- {
- return m_rowSet.relative(i);
- }
-
- public boolean previous() throws SQLException
- {
- return m_rowSet.previous();
- }
-
- public void refreshRow() throws SQLException
- {
- m_rowSet.refreshRow();
- }
-
- public boolean rowUpdated() throws SQLException
- {
- return m_rowSet.rowUpdated();
- }
-
- public boolean rowInserted() throws SQLException
- {
- return m_rowSet.rowInserted();
- }
-
- public boolean rowDeleted() throws SQLException
- {
- return m_rowSet.rowDeleted();
- }
-
- // XRow
- public Object getStatement() throws SQLException
- {
- return m_rowSet.getStatement();
- }
-
- public boolean wasNull() throws SQLException
- {
- return m_row.wasNull();
- }
-
- public String getString(int i) throws SQLException
- {
- return m_row.getString(i);
- }
-
- public boolean getBoolean(int i) throws SQLException
- {
- return m_row.getBoolean(i);
- }
-
- public byte getByte(int i) throws SQLException
- {
- return m_row.getByte(i);
- }
-
- public short getShort(int i) throws SQLException
- {
- return m_row.getShort(i);
- }
-
- public int getInt(int i) throws SQLException
- {
- return m_row.getInt(i);
- }
-
- public long getLong(int i) throws SQLException
- {
- return m_row.getLong(i);
- }
-
- public float getFloat(int i) throws SQLException
- {
- return m_row.getFloat(i);
- }
-
- public double getDouble(int i) throws SQLException
- {
- return m_row.getDouble(i);
- }
-
- public byte[] getBytes(int i) throws SQLException
- {
- return m_row.getBytes(i);
- }
-
- public Date getDate(int i) throws SQLException
- {
- return m_row.getDate(i);
- }
-
- public Time getTime(int i) throws SQLException
- {
- return m_row.getTime(i);
- }
-
- public DateTime getTimestamp(int i) throws SQLException
- {
- return m_row.getTimestamp(i);
- }
-
- public XInputStream getBinaryStream(int i) throws SQLException
- {
- return m_row.getBinaryStream(i);
- }
-
- public XInputStream getCharacterStream(int i) throws SQLException
- {
- return m_row.getCharacterStream(i);
- }
-
- public Object getObject(int i, XNameAccess xNameAccess) throws SQLException
- {
- return m_row.getObject(i, xNameAccess);
- }
-
- public XRef getRef(int i) throws SQLException
- {
- return m_row.getRef(i);
- }
-
- public XBlob getBlob(int i) throws SQLException
- {
- return m_row.getBlob(i);
- }
-
- public XClob getClob(int i) throws SQLException
- {
- return m_row.getClob(i);
- }
-
- public XArray getArray(int i) throws SQLException
- {
- return m_row.getArray(i);
- }
-};
diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
deleted file mode 100644
index c461d5ca..00000000
--- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java
+++ /dev/null
@@ -1,512 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.beans.*;
-import com.sun.star.form.*;
-import com.sun.star.lang.*;
-import com.sun.star.sdb.*;
-import com.sun.star.sdbc.*;
-import com.sun.star.sdbcx.*;
-import com.sun.star.container.*;
-import com.sun.star.awt.*;
-
-import java.util.Vector;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-
-/**************************************************************************/
-/** helper class for filtering the sales form
-*/
-class SalesFilter implements XActionListener, XPropertyChangeListener, XResetListener
-{
- private DocumentHelper m_aDocument;
- private XPropertySet m_xSalesForm;
-
- private XPropertySet m_xFilterList;
- private XPropertySet m_xManualFilter;
- private XPropertySet m_xApplyFilter;
-
- private boolean m_bSettingsDirty;
- private boolean m_bSettingDate;
- private boolean m_bAdjustingFilterList;
- private short m_nPreviousFilterIndex;
- private java.util.Vector m_aFilterDates;
-
- /* ------------------------------------------------------------------ */
- public SalesFilter( DocumentHelper aDocument, XPropertySet xSalesForm,
- XPropertySet xFilterListBox, XPropertySet xManualFilterEdit, XPropertySet xStartFilterButton )
- {
- m_aFilterDates = new java.util.Vector();
- m_bSettingsDirty = false;
- m_bSettingDate = false;
- m_bAdjustingFilterList = false;
- m_nPreviousFilterIndex = -1;
- initFilterDates();
-
- // -------------------------------------------------------------
- // remember the components
- m_aDocument = aDocument;
- m_xSalesForm = xSalesForm;
-
- m_xFilterList = xFilterListBox;
- m_xManualFilter = xManualFilterEdit;
- m_xApplyFilter = xStartFilterButton;
-
- try
- {
- // ----------------------------------------------------------
- // init control models
- m_xFilterList.setPropertyValue( "Dropdown", new Boolean( true ) );
- m_xFilterList.setPropertyValue( "LineCount", new Short( (short)11 ) );
- m_xFilterList.setPropertyValue( "StringItemList", new String[] { "ever (means no filter)", "this morning", "1 week ago", "1 month ago", "1 year ago", "<other>" } );
- m_xFilterList.setPropertyValue( "DefaultSelection", new Short[] { new Short( (short)0 ) } );
-
- m_xApplyFilter.setPropertyValue( "Label", "Apply Filter" );
-
- updateFilterControl();
- updateApplyButton();
-
- // ----------------------------------------------------------
- // add as listener to the events which require action
-
- // want to know about changed selection
- m_xFilterList.addPropertyChangeListener( "SelectedItems", this );
- m_xManualFilter.addPropertyChangeListener( "Date", this );
-
- // want to know about the date field beeing reset
- XReset xReset = UNO.queryReset( m_xManualFilter );
- xReset.addResetListener( this );
-
- // for the button, we can add to the control only, not to the model
- // - clicking a button is something which happens on the _control_.
- DocumentViewHelper aView = m_aDocument.getCurrentView();
- XButton xButton = (XButton)aView.getFormControl( m_xApplyFilter, XButton.class );
- xButton.addActionListener( this );
- }
- catch ( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ==================================================================
- = helper
- ================================================================== */
- /* ------------------------------------------------------------------ */
- protected void initFilterDates()
- {
- m_aFilterDates.clear();
- java.util.Date aNowAndHere = new java.util.Date();
- aNowAndHere.setHours( 0 );
- aNowAndHere.setMinutes( 0 );
- aNowAndHere.setSeconds( 0 );
-
- // for every list entry, we add a java.util.Date to m_aFilterDates indicating
- // since when the sales should be listed
-
- // ever
- m_aFilterDates.add( null );
-
- // this morning
- m_aFilterDates.add( aNowAndHere );
-
- // one week ago
- GregorianCalendar aCalendar = new GregorianCalendar( );
- aCalendar.setTime( aNowAndHere );
- aCalendar.add( Calendar.DATE, -7 );
- m_aFilterDates.add( aCalendar.getTime() );
-
- // one month ago
- aCalendar.setTime( aNowAndHere );
- aCalendar.add( Calendar.MONTH, -1 );
- m_aFilterDates.add( aCalendar.getTime() );
-
- // one year ago
- aCalendar.setTime( aNowAndHere );
- aCalendar.add( Calendar.YEAR, -1 );
- m_aFilterDates.add( aCalendar.getTime() );
-
- // the custom date
- m_aFilterDates.add( null );
- }
-
- /* ------------------------------------------------------------------ */
- /** translates a date from the AWT Toolkit format to a java.util.date, or
- vice versa.
- */
- protected Object translateDate( Object aDate ) throws java.lang.Exception
- {
- Object aReturn = null;
-
- GregorianCalendar aCalDate = new GregorianCalendar();
- if ( aDate.getClass().equals( Class.forName( "java.util.Date" ) ) )
- {
- aCalDate.setTime( (java.util.Date)aDate );
-
- int nDate = aCalDate.get( Calendar.YEAR );
- nDate = nDate * 100 + aCalDate.get( Calendar.MONTH ) + 1;
- nDate = nDate * 100 + aCalDate.get( Calendar.DAY_OF_MONTH );
-
- aReturn = new Integer( nDate );
- }
- else if ( aDate.getClass().equals( Class.forName( "java.lang.Integer" ) ) )
- {
- int nToolkitDate = ((Integer)aDate).intValue();
- aCalDate.set( Calendar.DAY_OF_MONTH, ( nToolkitDate % 100 ) );
- nToolkitDate /= 100;
- aCalDate.set( Calendar.MONTH, ( nToolkitDate % 100 ) - 1 );
- nToolkitDate /= 100;
- aCalDate.set( Calendar.YEAR, ( nToolkitDate % 10000 ) );
-
- // default the time
- aCalDate.set( Calendar.HOUR_OF_DAY, 0 );
- aCalDate.set( Calendar.MINUTE, 0 );
- aCalDate.set( Calendar.SECOND, 0 );
-
- aReturn = aCalDate.getTime();
- }
-
- return aReturn;
- }
-
- /* ------------------------------------------------------------------ */
- /** translates the given date into the ODBC date notation, which then can be used
- for setting a filter at a row set
- */
- protected String getOdbcDate( Object aDate ) throws java.lang.Exception
- {
- String sOdbcDate = "";
- if ( null != aDate )
- {
- if ( !aDate.getClass().equals( Class.forName( "java.util.Date" ) ) )
- aDate = translateDate( aDate );
-
- if ( aDate.getClass().equals( Class.forName( "java.util.Date" ) ) )
- {
- GregorianCalendar aCal = new GregorianCalendar();
- aCal.setTime( (java.util.Date)aDate );
-
- sOdbcDate += new String( "{D '" );
- sOdbcDate += (new Integer( aCal.get( Calendar.YEAR ) ) ).toString();
- sOdbcDate += "-";
-
- int nMonth = aCal.get( Calendar.MONTH ) + 1;
- if ( nMonth < 10 )
- sOdbcDate += "0";
- sOdbcDate += (new Integer( nMonth ) ).toString();
- sOdbcDate += "-";
-
- int nDay = aCal.get( Calendar.DAY_OF_MONTH );
- if ( nDay < 10 )
- sOdbcDate += "0";
- sOdbcDate += (new Integer( nDay ) ).toString();
- sOdbcDate += "'}";
- }
- }
- return sOdbcDate;
- }
-
- /* ------------------------------------------------------------------ */
- protected void updateApplyButton()
- {
- try
- {
- m_xApplyFilter.setPropertyValue( "Enabled", new Boolean( m_bSettingsDirty ) );
- }
- catch ( com.sun.star.uno.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ------------------------------------------------------------------ */
- /** creates a normalized calendar object from the given java.util.Date
- */
- protected GregorianCalendar getCalendarObject( java.util.Date aDate )
- {
- // the date part
- GregorianCalendar aReturn = null;
- if ( null != aDate )
- {
- aReturn = new GregorianCalendar( );
- aReturn.setTime( aDate );
-
- // normalize the time part
- aReturn.set( Calendar.HOUR_OF_DAY, 0 );
- aReturn.set( Calendar.MINUTE, 0 );
- aReturn.set( Calendar.SECOND, 0 );
- }
-
- return aReturn;
- }
-
- /* ------------------------------------------------------------------ */
- final protected short getCurrentSelectedFilter( ) throws com.sun.star.uno.Exception
- {
- short[] aSelected = (short[])m_xFilterList.getPropertyValue( "SelectedItems" );
- if ( 0 < aSelected.length )
- return aSelected[0];
- return -1;
- }
-
- /* ------------------------------------------------------------------ */
- /** checks if the given filter index referes to the "<other>" entry which
- allows the user to manually enter a date
- */
- final protected boolean isManualFilter( short nFilterIndex )
- {
- return ( 5 == nFilterIndex );
- }
-
- /* ------------------------------------------------------------------ */
- protected void updateFilterControl()
- {
- try
- {
- if ( isManualFilter( m_nPreviousFilterIndex ) )
- { // previously, the "custom" filter date was selected
- // -> remember the date entered
- Object aDate = translateDate( m_xManualFilter.getPropertyValue( "Date" ) );
- m_aFilterDates.set( m_nPreviousFilterIndex, aDate );
- }
-
- // check the current selection
- if ( !m_bAdjustingFilterList )
- {
- m_nPreviousFilterIndex = getCurrentSelectedFilter( );
-
- // custom filter?
- boolean bCustomFilter = isManualFilter( m_nPreviousFilterIndex );
- m_xManualFilter.setPropertyValue( "Enabled", new Boolean( bCustomFilter ) );
- if ( bCustomFilter )
- m_aDocument.getCurrentView().grabControlFocus( m_xManualFilter );
-
- m_bSettingDate = true;
- Object aSelectedDateLimit = m_aFilterDates.elementAt( m_nPreviousFilterIndex );
- if ( null != aSelectedDateLimit )
- {
- // translate this date into one the AWT Toolkit understands
- Integer aTKDate = (Integer)translateDate( aSelectedDateLimit );
- m_xManualFilter.setPropertyValue( "Date", aTKDate );
- }
- else
- m_xManualFilter.setPropertyValue( "Date", new Any( new Type(), null ) );
- m_bSettingDate = false;
- }
- }
- catch ( java.lang.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ------------------------------------------------------------------ */
- /** compares the date part of two calendars
- <p>For some strange reason I do not understand, GregorianCalendar.equals( GregorianCalendar )
- seems to always return false, as well as . Thus here is a method which compare two calendars,
- restricted to their date part</p>
- */
- protected boolean equalDate( Calendar aLHS, Calendar aRHS )
- {
- if ( ( null == aLHS ) != ( null == aRHS ) )
- // only one of them is null
- return false;
-
- if ( null == aLHS )
- // both are null
- return true;
-
- return ( aLHS.get( Calendar.YEAR ) == aRHS.get( Calendar.YEAR ) )
- && ( aLHS.get( Calendar.MONTH ) == aRHS.get( Calendar.MONTH ) )
- && ( aLHS.get( Calendar.DAY_OF_MONTH ) == aRHS.get( Calendar.DAY_OF_MONTH ) );
- }
-
- /* ------------------------------------------------------------------ */
- /** adds the current user filter to the list of date filters
- @return
- the index of the newly added date filter in the filter list
- */
- protected short addCurrentFilter( ) throws java.lang.Exception
- {
- // the current string items
- String[] aOldFilterItems = (String[])m_xFilterList.getPropertyValue( "StringItemList" );
-
- // translate this into a vector - much more comfort to work with a vector than with an array ....
- java.util.Vector aFilterItems = new java.util.Vector();
- for ( int i=0; i<aOldFilterItems.length; ++i )
- aFilterItems.add( aOldFilterItems[i] );
-
- // the currently entered user defined filter date
- Object aDate = translateDate( m_xManualFilter.getPropertyValue( "Date" ) );
- GregorianCalendar aDateCal = getCalendarObject( (java.util.Date)aDate );
- // check if this date is already present in the list of user defined dates
- for ( int i=0; i<m_aFilterDates.size(); ++i )
- {
- if ( !isManualFilter( (short)i ) ) // do not compare with the manual filter
- {
- GregorianCalendar aCheckCal = getCalendarObject( (java.util.Date)m_aFilterDates.elementAt( i ) );
- if ( equalDate( aDateCal, aCheckCal ) )
- return (short)i;
- }
- }
- System.out.println( );
-
- if ( aFilterItems.size() > 10 ) // (6 standard items + 5 user defined items)
- {
- // the first (and thus oldes) user defined item
- aFilterItems.removeElementAt( 6 );
- // keep our date vector synchron
- m_aFilterDates.removeElementAt( 6 );
- }
-
- // add the current user defined filter
- aFilterItems.add( aDate.toString() );
- m_aFilterDates.add( aDate );
-
- // write back the string item list
- m_bAdjustingFilterList = true;
- String[] aNewFilterItems = new String[ aFilterItems.size() ];
- for ( int i=0; i<aFilterItems.size(); ++i )
- aNewFilterItems[i] = (String)aFilterItems.elementAt( i );
- m_xFilterList.setPropertyValue( "StringItemList", aNewFilterItems );
- m_bAdjustingFilterList = false;
-
- return (short)(aNewFilterItems.length - 1 );
- }
-
- /* ------------------------------------------------------------------ */
- protected void executeCurrentFilter()
- {
- try
- {
- // we keep the date field consistent with whatever the user chooses in the
- // list box, so just ask the field
- Object aDate = translateDate( m_xManualFilter.getPropertyValue( "Date" ) );
- String sOdbcDate = getOdbcDate( aDate );
-
- // if this filter was a manually entered filter, we add it to the filter list
- // box to allow quick-select it later on.
- if ( isManualFilter( getCurrentSelectedFilter() ) )
- {
- short nNewUserDefinedFilterPos = addCurrentFilter();
- m_xFilterList.setPropertyValue( "SelectedItems", new short[] { nNewUserDefinedFilterPos } );
- }
-
- // set this as filter on the form
- String sCompleteFilter = "";
- if ( ( null != sOdbcDate ) && ( 0 != sOdbcDate.length() ) )
- {
- sCompleteFilter = "SALEDATE >= ";
- sCompleteFilter += sOdbcDate;
- }
- m_xSalesForm.setPropertyValue( "Filter", sCompleteFilter );
- m_xSalesForm.setPropertyValue( "ApplyFilter", new Boolean( true ) );
-
- // and reload the form
- XLoadable xLoad = (XLoadable)UnoRuntime.queryInterface(
- XLoadable.class, m_xSalesForm );
- xLoad.reload();
-
- m_aDocument.getCurrentView().grabControlFocus( m_xFilterList );
- }
- catch ( java.lang.Exception e )
- {
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
- /* ==================================================================
- = UNO callbacks
- ================================================================== */
- /* ------------------------------------------------------------------ */
- // XActionListener overridables
- /* ------------------------------------------------------------------ */
- public boolean approveReset( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- return false;
- // do not allow the date field to be reset - it would set it's content
- // to the current date
- // Note that another possible solution would be to wait for the resetted
- // event and correct the value there
- }
-
- /* ------------------------------------------------------------------ */
- public void resetted( EventObject aEvent ) throws com.sun.star.uno.RuntimeException
- {
- }
-
- /* ------------------------------------------------------------------ */
- // XActionListener overridables
- /* ------------------------------------------------------------------ */
- public void actionPerformed( ActionEvent aEvent ) throws com.sun.star.uno.RuntimeException
- {
- executeCurrentFilter();
-
- m_bSettingsDirty = false;
- updateApplyButton();
- }
-
- /* ------------------------------------------------------------------ */
- // XItemListener overridables
- /* ------------------------------------------------------------------ */
- public void propertyChange( PropertyChangeEvent aEvent ) throws com.sun.star.uno.RuntimeException
- {
- if ( aEvent.PropertyName.equals( "SelectedItems" ) )
- {
- updateFilterControl();
-
- m_bSettingsDirty = true;
- updateApplyButton();
- }
- else if ( aEvent.PropertyName.equals( "Date" ) && !m_bSettingDate )
- {
- m_bSettingsDirty = true;
- updateApplyButton();
- }
- }
-
- /* ------------------------------------------------------------------ */
- // XEventListener overridables
- /* ------------------------------------------------------------------ */
- public void disposing( EventObject aEvent )
- {
- // not interested in
- }
-
-};
diff --git a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
deleted file mode 100644
index 56bcd463..00000000
--- a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.util.*;
-import com.sun.star.lang.*;
-import com.sun.star.accessibility.*;
-import com.sun.star.container.*;
-import com.sun.star.beans.*;
-import com.sun.star.form.binding.*;
-import com.sun.star.form.validation.*;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class SingleControlValidation implements XFormComponentValidityListener
-{
- private DocumentHelper m_document; /// our current test document
- private FormLayer m_formLayer; /// quick access to the form layer
- private XMultiServiceFactory m_orb; /// our service factory
-
- private XPropertySet m_inputField;
- private XPropertySet m_inputLabel;
- private XPropertySet m_statusField;
- private XPropertySet m_explanationField;
- private XValidator m_validator;
-
- /* ------------------------------------------------------------------ */
- public SingleControlValidation( DocumentHelper document, int columnPos, int rowPos, String formComponentService, XValidator validator )
- {
- m_document = document;
- m_validator = validator;
- m_formLayer = new FormLayer( m_document );
- createControls( columnPos, rowPos, formComponentService, 1, 0 );
- }
-
- /* ------------------------------------------------------------------ */
- public SingleControlValidation( DocumentHelper document, int columnPos, int rowPos, String formComponentService, XValidator validator, int controlCount, int controlHeight )
- {
- m_document = document;
- m_validator = validator;
- m_formLayer = new FormLayer( m_document );
- createControls( columnPos, rowPos, formComponentService, controlCount, controlHeight );
- }
-
- /* ------------------------------------------------------------------ */
- public XPropertySet getInputField()
- {
- return m_inputField;
- }
-
- /* ------------------------------------------------------------------ */
- public void setExplanatoryText( String text )
- {
- try
- {
- m_inputLabel.setPropertyValue( "Label", text );
- }
- catch( com.sun.star.uno.Exception e )
- {
- e.printStackTrace( System.err );
- }
- }
-
- /* ------------------------------------------------------------------ */
- private void createControls( int columnPos, int rowPos, String formComponentService, int controlCount, int controlHeight )
- {
- try
- {
- m_inputLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, rowPos, 70, 12, null );
- m_inputLabel.setPropertyValue( "MultiLine", new Boolean( true ) );
-
- com.sun.star.awt.FontDescriptor font = (com.sun.star.awt.FontDescriptor)m_inputLabel.getPropertyValue( "FontDescriptor" );
- font.Weight = com.sun.star.awt.FontWeight.BOLD;
- m_inputLabel.setPropertyValue( "FontDescriptor", font );
-
- if ( controlHeight == 0 )
- controlHeight = 6;
-
- int controlPos = rowPos + 12;
- XPropertySet[] controls = new XPropertySet[ controlCount ];
- for ( int i = 0; i < controlCount; ++i, controlPos += controlHeight )
- {
- controls[ i ] = m_formLayer.createControlAndShape( formComponentService, columnPos, controlPos, 25, controlHeight, null );
- controls[ i ].setPropertyValue( "Name", formComponentService );
- controls[ i ].setPropertyValue( "Tag", String.valueOf( i ) );
-
- if ( controls[ i ].getPropertySetInfo().hasPropertyByName( "Border" ) )
- controls[ i ].setPropertyValue( "Border", new Short( (short)2 ) );
-
- XValidatableFormComponent xComp = (XValidatableFormComponent)UnoRuntime.queryInterface( XValidatableFormComponent.class,
- controls[ i ] );
- xComp.addFormComponentValidityListener( this );
- }
- m_inputField = controls[ 0 ];
-
- // ----------------------------------
- controlPos += 4;
- XPropertySet xLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
- xLabel.setPropertyValue( "Label", new String( "Status:" ) );
- controlPos += 4;
- m_statusField = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
- m_statusField.setPropertyValue( "Label", new String( "" ) );
-
- // ----------------------------------
- controlPos += 6;
- xLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
- xLabel.setPropertyValue( "Label", new String( "Explanation for invalidity:" ) );
- controlPos += 4;
- m_explanationField = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
- m_explanationField.setPropertyValue( "Label", new String( "" ) );
-
- XValidatable xValidatable = (XValidatable)UnoRuntime.queryInterface( XValidatable.class, m_inputField );
- xValidatable.setValidator( m_validator );
- }
- catch( java.lang.Exception e )
- {
- e.printStackTrace( System.out );
- }
- }
-
- /* ------------------------------------------------------------------ */
- /* XEventListener overridables */
- /* ------------------------------------------------------------------ */
- public void disposing( com.sun.star.lang.EventObject eventObject )
- {
- // not interested in
- }
-
- /* ------------------------------------------------------------------ */
- /* XFormComponentValidityListener overridables */
- /* ------------------------------------------------------------------ */
- public void componentValidityChanged( com.sun.star.lang.EventObject eventObject )
- {
- try
- {
- if ( m_inputField.equals( eventObject.Source ) )
- {
- XValidatableFormComponent xComp = (XValidatableFormComponent)UnoRuntime.queryInterface( XValidatableFormComponent.class,
- eventObject.Source );
- // the current value
- Object value = xComp.getCurrentValue();
-
- // the current validity flag
- boolean isValid = xComp.isValid();
-
- m_statusField.setPropertyValue("Label", isValid ? "valid" : "invalid" );
- m_statusField.setPropertyValue( "TextColor", new Integer( isValid ? 0x008000 : 0x800000 ) );
-
- String validityMessage = "";
- if ( !isValid )
- validityMessage = m_validator.explainInvalid( value );
- m_explanationField.setPropertyValue( "Label", validityMessage );
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- e.printStackTrace( System.out );
- }
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java
deleted file mode 100644
index 38f1c490..00000000
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetDocument.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XComponent;
-import com.sun.star.table.XCellRange;
-import com.sun.star.table.CellAddress;
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.beans.NamedValue;
-
-/**
- *
- * @author fs93730
- */
-public class SpreadsheetDocument extends DocumentHelper
-{
- /** Creates a new blank spreadsheet document */
- public SpreadsheetDocument( XComponentContext xCtx ) throws com.sun.star.uno.Exception
- {
- super( xCtx, implCreateBlankDocument( xCtx, "private:factory/scalc" ) );
- }
-
- public SpreadsheetDocument( XComponentContext xCtx, XComponent document ) throws com.sun.star.uno.Exception
- {
- super( xCtx, document );
- }
-
- public XCellRange getSheet( int index ) throws com.sun.star.uno.Exception
- {
- XSpreadsheetDocument spreadsheetDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface( XSpreadsheetDocument.class,
- m_documentComponent
- );
- XIndexAccess sheets = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class,
- spreadsheetDoc.getSheets()
- );
- return (XCellRange)UnoRuntime.queryInterface( XCellRange.class,
- sheets.getByIndex( index )
- );
- }
-
- /** creates a value binding for a given cell
- */
- public com.sun.star.form.binding.XValueBinding createCellBinding( short sheet, short column, short row )
- {
- return createCellBinding( sheet, column, row, false );
- }
-
- /** creates a value binding which can be used to exchange a list box selection <em>index</em> with a cell
- */
- public com.sun.star.form.binding.XValueBinding createListIndexBinding( short sheet, short column, short row )
- {
- return createCellBinding( sheet, column, row, true );
- }
-
- /** creates a value binding for a given cell, with or without support for integer value exchange
- */
- private com.sun.star.form.binding.XValueBinding createCellBinding( short sheet, short column, short row, boolean supportIntegerValues )
- {
- com.sun.star.form.binding.XValueBinding cellBinding = null;
- try
- {
- CellAddress address = new CellAddress( sheet, column, row );
- Object[] initParam = new Object[] { new NamedValue( "BoundCell", address ) };
- cellBinding = (com.sun.star.form.binding.XValueBinding)UnoRuntime.queryInterface(
- com.sun.star.form.binding.XValueBinding.class,
- createInstanceWithArguments(
- supportIntegerValues ? "com.sun.star.table.ListPositionCellBinding"
- : "com.sun.star.table.CellValueBinding",
- initParam
- )
- );
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.err.println( e );
- e.printStackTrace( System.err );
- }
- return cellBinding;
- }
-
- /** creates a source of list entries associated with a (one-column) cell range
- */
- public com.sun.star.form.binding.XListEntrySource createListEntrySource( short sheet, short column,
- short topRow, short bottomRow )
- {
- com.sun.star.form.binding.XListEntrySource entrySource = null;
- try
- {
- CellRangeAddress rangeAddress = new CellRangeAddress( sheet, column,
- topRow, column, bottomRow );
- Object[] initParam = new Object[] { new NamedValue( "CellRange", rangeAddress ) };
- entrySource = (com.sun.star.form.binding.XListEntrySource)UnoRuntime.queryInterface(
- com.sun.star.form.binding.XListEntrySource.class,
- createInstanceWithArguments(
- "com.sun.star.table.CellRangeListSource", initParam ) );
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.err.println( e );
- e.printStackTrace( System.err );
- }
- return entrySource;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
deleted file mode 100644
index 23215c80..00000000
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.table.XCellRange;
-import com.sun.star.table.XCell;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextRange;
-import com.sun.star.form.binding.XValueBinding;
-import com.sun.star.form.binding.XBindableValue;
-import com.sun.star.form.binding.XListEntrySource;
-import com.sun.star.form.binding.XListEntrySink;
-
-public class SpreadsheetValueBinding extends DocumentBasedExample
-{
- /** Creates a new instance of SpreadsheetValueBinding */
- public SpreadsheetValueBinding()
- {
- super( DocumentType.CALC );
- }
-
- /* ------------------------------------------------------------------ */
- protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- super.prepareDocument();
-
- SpreadsheetDocument document = (SpreadsheetDocument)m_document;
-
- final short sheet = (short)0;
- final short exchangeColumn = (short)1; // B
- final short exchangeRow = (short)1; // 2
- final Integer backColor = new Integer( 0x00E0E0E0 );
-
- // ----------------------------------------------------------------------
- // a numeric control
- XPropertySet numericControl = m_formLayer.insertControlLine( "NumericField",
- "enter a value", "", 30 );
- numericControl.setPropertyValue( "ValueMin", new Short( (short)1 ) );
- numericControl.setPropertyValue( "ValueMax", new Short( (short)5 ) );
- numericControl.setPropertyValue( "Value", new Short( (short)1 ) );
- numericControl.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- numericControl.setPropertyValue( "Spin", new Boolean( true ) );
-
- // bind the control model to cell B2
- implBind( numericControl, document.createCellBinding( sheet, exchangeColumn, exchangeRow ) );
-
- // ----------------------------------------------------------------------
- // insert a list box
- XPropertySet listBox = m_formLayer.insertControlLine( "ListBox",
- "select an entry", "", 2, 40, 20 );
- listBox.setPropertyValue( "Dropdown", new Boolean( false ) );
-
- // a list binding for cell range C1-C5
- final short listSourceSheet = (short)1;
- final short column = (short)0;
- final short topRow = (short)0;
- final short bottomRow = (short)4;
- XListEntrySource entrySource = document.createListEntrySource(
- listSourceSheet, column, topRow, bottomRow );
-
- // bind it to the list box
- XListEntrySink consumer = (XListEntrySink)UnoRuntime.queryInterface(
- XListEntrySink.class, listBox );
- consumer.setListEntrySource( entrySource );
-
- // and also put the list selection index into cell B2
- implBind( listBox, document.createListIndexBinding( sheet, exchangeColumn, exchangeRow ) );
-
- // ----------------------------------------------------------------------
- // fill the cells which we just bound the listbox to
- XCellRange exchangeSheet = document.getSheet( listSourceSheet );
- String[] listContent = new String[] { "first", "second", "third", "forth", "fivth" };
- for ( short row = topRow; row <= bottomRow; ++row )
- {
- XTextRange cellText = (XTextRange)UnoRuntime.queryInterface(
- XTextRange.class, exchangeSheet.getCellByPosition( column, row ) );
- cellText.setString( listContent[row] );
- }
-
- // some coloring
- XPropertySet exchangeCell = UNO.queryPropertySet(
- document.getSheet( sheet ).getCellByPosition( exchangeColumn, exchangeRow )
- );
- exchangeCell.setPropertyValue( "CellBackColor", backColor );
- numericControl.setPropertyValue( "BackgroundColor", backColor );
- listBox.setPropertyValue( "BackgroundColor", backColor );
- }
-
- /* ------------------------------------------------------------------ */
- private void implBind( XPropertySet controlModel, XValueBinding binding ) throws com.sun.star.form.binding.IncompatibleTypesException
- {
- XBindableValue bindable = (XBindableValue)UnoRuntime.queryInterface(
- XBindableValue.class, controlModel
- );
- bindable.setValueBinding( binding );
- }
-
- /* ------------------------------------------------------------------ */
- /** class entry point
- */
- public static void main(String argv[]) throws java.lang.Exception
- {
- SpreadsheetValueBinding aSample = new SpreadsheetValueBinding();
- aSample.run( argv );
- }
- }
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java
deleted file mode 100644
index c92af746..00000000
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetView.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-/*
- * SpreadsheetView.java
- *
- * Created on 2. Oktober 2003, 14:02
- */
-
-import com.sun.star.uno.*;
-import com.sun.star.lang.*;
-import com.sun.star.frame.*;
-import com.sun.star.sheet.*;
-import com.sun.star.container.*;
-
-/**
- *
- * @author fs93730
- */
-public class SpreadsheetView extends DocumentViewHelper
-{
-
- /** Creates a new instance of SpreadsheetView */
- public SpreadsheetView( XMultiServiceFactory orb, DocumentHelper document, XController controller )
- {
- super( orb, document, controller );
- }
-
- /** activates the sheet with the given index
- */
- void activateSheet( int sheetIndex )
- {
- try
- {
- // get the sheet to activate
- XSpreadsheetDocument doc = (XSpreadsheetDocument)UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, getDocument().getDocument() );
- XIndexAccess sheets = (XIndexAccess)UnoRuntime.queryInterface(
- XIndexAccess.class, doc.getSheets() );
-
- XSpreadsheet sheet = (XSpreadsheet)UnoRuntime.queryInterface(
- XSpreadsheet.class, sheets.getByIndex( sheetIndex ) );
-
- // activate
- XSpreadsheetView view = (XSpreadsheetView)UnoRuntime.queryInterface(
- XSpreadsheetView.class, getController() );
- view.setActiveSheet( sheet );
- }
- catch( com.sun.star.uno.Exception e )
- {
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java b/odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java
deleted file mode 100644
index e95e02a7..00000000
--- a/odk/examples/DevelopersGuide/Forms/TableCellTextBinding.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.table.XCell;
-import com.sun.star.util.XModifyListener;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.text.XTextRange;
-import com.sun.star.form.binding.IncompatibleTypesException;
-
-/** a value binding to be connected to a form control
-
- This binding synchronizes the text contained in a table cell (which you must
- pass upon construction) to the text in an XBindableValue.
-
- Well, in real it does not synchronize both directions. The ValueBinding
- service has not much room for own activity: It allows notification of changes
- in the own value, and it allows external instances to set the current value.
-
- Note that we implement this binding as a separate thread, which is (more or
- less permanently) polling for a new text at the cell. This is unfortunate, but
- sadly the Writer table cells do not support actively notifying changes in their
- content to other interested parties.
-*/
-public class TableCellTextBinding
- extends java.lang.Thread
- implements com.sun.star.form.binding.XValueBinding,
- com.sun.star.util.XModifyBroadcaster
-{
- private XTextRange m_cellText;
- private Object m_writeSignal;
- private String m_newCellText;
- private String m_lastKnownCellText;
- private boolean m_haveNewCellText;
- private java.util.List m_listeners;
-
- /** Creates a new instance of TableCellTextBinding */
- public TableCellTextBinding( XCell cell )
- {
- m_cellText = (XTextRange)UnoRuntime.queryInterface( XTextRange.class, cell );
-
- m_newCellText = new String();
- m_listeners = new java.util.LinkedList();
-
- start();
- }
-
- /** retrieves the list of data types which this binding can exchange
- */
- public com.sun.star.uno.Type[] getSupportedValueTypes()
- {
- try
- {
- // well, only strings here ...
- return new Type[] {
- getStringType()
- };
- }
- catch( java.lang.Exception e )
- {
- }
- return new Type[] { };
- }
-
- /** retrieves the current value
- */
- public Object getValue(com.sun.star.uno.Type type) throws com.sun.star.form.binding.IncompatibleTypesException
- {
- if ( !type.equals( getStringType() ) )
- throw new com.sun.star.form.binding.IncompatibleTypesException();
-
- return m_cellText.getString();
- }
-
- /** sets a new value
- */
- public void setValue(Object obj) throws com.sun.star.form.binding.IncompatibleTypesException
- {
- String text;
- try
- {
- text = (String)obj;
- }
- catch( java.lang.ClassCastException e )
- {
- throw new com.sun.star.form.binding.IncompatibleTypesException();
- }
- // remember the new text
- synchronized( m_newCellText )
- {
- m_newCellText = text;
- m_haveNewCellText = true;
- }
- // and wake up the thread which is waiting for it
- synchronized( m_writeSignal )
- {
- m_writeSignal.notify();
- }
- }
-
- /** determines whether a given value type is supported
- */
- public boolean supportsType(com.sun.star.uno.Type type)
- {
- return type.equals( getStringType() );
- }
-
- /** retrieves the UNO type for the string class
- */
- private static final Type getStringType()
- {
- return new com.sun.star.uno.Type( String.class );
- }
-
- /** runs the thread
- */
- public void run()
- {
- try
- {
- m_writeSignal = new Object();
- while ( true )
- {
- // go sleep a while
- synchronized( m_writeSignal )
- {
- m_writeSignal.wait( 200 );
- }
-
- // if there's new text in the control, propagate it to the cell
- synchronized ( m_newCellText )
- {
- if ( m_haveNewCellText )
- {
- m_cellText.setString( m_newCellText );
- m_lastKnownCellText = m_newCellText;
- }
- m_haveNewCellText = false;
- }
-
- // if there's new text in the cell, propagate it to the control
- String currentCellText = m_cellText.getString();
- if ( !currentCellText.equals( m_lastKnownCellText ) )
- {
- m_lastKnownCellText = currentCellText;
- // notify the modification
- synchronized( m_listeners )
- {
- com.sun.star.lang.EventObject eventSource = new com.sun.star.lang.EventObject( this );
-
- java.util.Iterator loop = m_listeners.iterator();
- while ( loop.hasNext() )
- {
- ((XModifyListener)loop.next()).modified( eventSource );
- }
- }
- }
- }
- }
- catch( java.lang.Exception e )
- {
- e.printStackTrace(System.err);
- }
- }
-
- public void addModifyListener(com.sun.star.util.XModifyListener xModifyListener)
- {
- synchronized( m_listeners )
- {
- m_listeners.add( xModifyListener );
- }
- }
-
- public void removeModifyListener(com.sun.star.util.XModifyListener xModifyListener)
- {
- synchronized( m_listeners )
- {
- m_listeners.remove( xModifyListener );
- }
- }
-
- public void disposing(com.sun.star.lang.EventObject eventObject)
- {
- // not interested in
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/TextValidator.java b/odk/examples/DevelopersGuide/Forms/TextValidator.java
deleted file mode 100644
index f304a1f6..00000000
--- a/odk/examples/DevelopersGuide/Forms/TextValidator.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.form.binding.*;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class TextValidator extends ControlValidator
-{
-
- /** Creates a new instance of NumericValidator */
- public TextValidator( )
- {
- }
-
- public String explainInvalid( Object Value )
- {
- try
- {
- String value = (String)Value;
- if ( containsZs( value ) )
- return "No Z's allowed here";
- if ( !isProperChunks( value ) )
- return "Need 3 * n characters";
- }
- catch( java.lang.Exception e )
- {
- return "ooops. Unknown error";
- }
- return "";
- }
-
- public boolean isValid( Object Value )
- {
- try
- {
- String value = (String)Value;
- if ( containsZs( value ) )
- return false;
- if ( !isProperChunks( value ) )
- return false;
- return true;
- }
- catch( java.lang.Exception e )
- {
- }
- return false;
- }
-
- private boolean isProperChunks( String value )
- {
- return ( value.length() % 3 ) == 0;
- }
-
- private boolean containsZs( String value )
- {
- if ( ( value.indexOf( 'Z' ) != -1 )
- || ( value.indexOf( 'z' ) != -1 )
- )
- return true;
- return false;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/TimeValidator.java b/odk/examples/DevelopersGuide/Forms/TimeValidator.java
deleted file mode 100644
index 45135392..00000000
--- a/odk/examples/DevelopersGuide/Forms/TimeValidator.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.form.binding.*;
-
-/**
- *
- * @author fs@openoffice.org
- */
-public class TimeValidator extends ControlValidator
-{
-
- /** Creates a new instance of NumericValidator */
- public TimeValidator( )
- {
- }
-
- public String explainInvalid( Object Value )
- {
- try
- {
- if ( isVoid( Value ) )
- return "empty input";
-
- com.sun.star.util.Time timeValue = (com.sun.star.util.Time)Value;
- if ( isInvalidTime( timeValue ) )
- return "this is no valid time";
- if ( !isFullHour( timeValue ) )
- return "time must denote a full hour";
- }
- catch( java.lang.Exception e )
- {
- return "this is no valid time";
- }
- return "";
- }
-
- public boolean isValid( Object Value )
- {
- try
- {
- if ( isVoid( Value ) )
- return false;
-
- com.sun.star.util.Time timeValue = (com.sun.star.util.Time)
- com.sun.star.uno.AnyConverter.toObject(
- com.sun.star.util.Time.class, Value);
- if ( isInvalidTime( timeValue ) )
- return false;
- if ( !isFullHour( timeValue ) )
- return false;
- return true;
- }
- catch( java.lang.Exception e )
- {
- e.printStackTrace( System.err );
- }
- return false;
- }
-
- private boolean isInvalidTime( com.sun.star.util.Time timeValue )
- {
- return ( timeValue.Hours == -1 ) && ( timeValue.Minutes == -1 ) && ( timeValue.Seconds == -1 ) && ( timeValue.HundredthSeconds == -1 );
- }
-
- private boolean isFullHour( com.sun.star.util.Time timeValue )
- {
- return ( timeValue.Minutes == 0 ) && ( timeValue.Seconds == 0 ) && ( timeValue.HundredthSeconds == 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/UNO.java b/odk/examples/DevelopersGuide/Forms/UNO.java
deleted file mode 100644
index 55152172..00000000
--- a/odk/examples/DevelopersGuide/Forms/UNO.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.*;
-import com.sun.star.beans.*;
-import com.sun.star.awt.*;
-import com.sun.star.container.*;
-import com.sun.star.form.*;
-import com.sun.star.lang.*;
-import com.sun.star.sdb.*;
-import com.sun.star.sdbcx.*;
-
-public class UNO
-{
- public static XPropertySet queryPropertySet( Object aObject )
- {
- return (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, aObject );
- }
- public static XControlModel queryControlModel( Object aObject )
- {
- return (XControlModel)UnoRuntime.queryInterface( XControlModel.class, aObject );
- }
- public static XIndexContainer queryIndexContainer( Object aObject )
- {
- return (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, aObject );
- }
- public static XReset queryReset( Object aObject )
- {
- return (XReset)UnoRuntime.queryInterface( XReset.class, aObject );
- }
- public static XServiceInfo queryServiceInfo( Object aObject )
- {
- return (XServiceInfo)UnoRuntime.queryInterface( XServiceInfo.class, aObject );
- }
- public static XColumn queryColumn( Object aObject )
- {
- return (XColumn)UnoRuntime.queryInterface( XColumn.class, aObject );
- }
-
- public static XComponent queryComponent( Object aObject )
- {
- return (XComponent)UnoRuntime.queryInterface( XComponent.class, aObject );
- }
-
- public static XTablesSupplier queryTablesSupplier( Object aObject )
- {
- return (XTablesSupplier)UnoRuntime.queryInterface( XTablesSupplier.class, aObject );
- }
-
-/* replace Foo with the identifier of your choice.
-
- Why does Java not have templates?
-
- public static XFoo queryFoo( Object aObject )
- {
- return (XFoo)UnoRuntime.queryInterface( XFoo.class, aObject );
- }
-*/
-};
diff --git a/odk/examples/DevelopersGuide/Forms/URLHelper.java b/odk/examples/DevelopersGuide/Forms/URLHelper.java
deleted file mode 100644
index 71140957..00000000
--- a/odk/examples/DevelopersGuide/Forms/URLHelper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- */
-
-import java.io.File;
-import java.net.MalformedURLException;
-
-public class URLHelper
-{
- /**
- * Because the office need URLs for loading/saving documents
- * we must convert used system pathes.
- * And java use another notation for file URLs ... correct it.
- *
- * @param aSystemPath
- * represent the file in system notation
- *
- * @return [String]
- * a file url which represent the given system path
- */
- @SuppressWarnings("deprecation")
- public static String getFileURLFromSystemPath( File aSystemPath )
- {
- String sFileURL = null;
- try
- {
- sFileURL = aSystemPath.toURI().toURL().toString();
- }
- catch( MalformedURLException exWrong )
- {
- sFileURL = null;
- }
-
- // problem of java: file URL's are coded with 1 slash instead of 2 or 3 ones!
- // => correct this problem first, otherwise office can't use these URL's
- if(
- (sFileURL != null ) &&
- (sFileURL.startsWith("file:/") == true ) &&
- (sFileURL.startsWith("file://") == false)
- )
- {
- StringBuffer sWorkBuffer = new StringBuffer(sFileURL);
- sWorkBuffer.insert(6,"//");
- sFileURL = sWorkBuffer.toString();
- }
-
- return sFileURL;
- }
-}
diff --git a/odk/examples/DevelopersGuide/Forms/ValueBinding.java b/odk/examples/DevelopersGuide/Forms/ValueBinding.java
deleted file mode 100644
index f577e64c..00000000
--- a/odk/examples/DevelopersGuide/Forms/ValueBinding.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.form.binding.XValueBinding;
-import com.sun.star.form.binding.XBindableValue;
-
-public class ValueBinding extends DocumentBasedExample
-{
- /** Creates a new instance of ValueBinding */
- public ValueBinding()
- {
- super( DocumentType.WRITER );
- }
-
- /* ------------------------------------------------------------------ */
- protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- super.prepareDocument();
-
- // insert a table with exactly one cell. The content of this table will be synced with
- // the content of a form control
- XTextDocument textDoc = (XTextDocument)UnoRuntime.queryInterface( XTextDocument.class, m_document.getDocument() );
- XText documentText = textDoc.getText();
- XTextCursor textCursor = documentText.createTextCursor();
- documentText.insertString( textCursor, "Below, there's a table cell, and a text field. ", false );
- documentText.insertString( textCursor, "Both are linked via an external value binding.\n", false );
- documentText.insertString( textCursor, "That means that anything you insert into the table cell is reflected in the ", false );
- documentText.insertString( textCursor, "text field, and vice versa.\n", false );
-
- XTextTable table = (XTextTable)UnoRuntime.queryInterface( XTextTable.class,
- m_document.createInstance( "com.sun.star.text.TextTable" )
- );
- table.initialize( 1, 1 );
- documentText.insertTextContent( textCursor, table, false );
-
- // insert our sample control
- XPropertySet textControl = m_formLayer.insertControlLine( "DatabaseTextField", "enter some text", "", 30 );
-
- // create a value binding for the first cell of the table
- XValueBinding cellBinding = new TableCellTextBinding( table.getCellByName( "A1" ) );
- // and bind it to the control
- XBindableValue bindable = (XBindableValue)UnoRuntime.queryInterface(
- XBindableValue.class, textControl
- );
- bindable.setValueBinding( cellBinding );
- }
-
- /* ------------------------------------------------------------------ */
- /** class entry point
- */
- public static void main(String argv[]) throws java.lang.Exception
- {
- ValueBinding aSample = new ValueBinding();
- aSample.run( argv );
- }
- }
diff --git a/odk/examples/DevelopersGuide/Forms/WaitForInput.java b/odk/examples/DevelopersGuide/Forms/WaitForInput.java
deleted file mode 100644
index e74dc39b..00000000
--- a/odk/examples/DevelopersGuide/Forms/WaitForInput.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-class WaitForInput extends java.lang.Thread
-{
- private Object m_aToNotify;
- private boolean m_bDone;
-
- public WaitForInput( Object aToNotify )
- {
- m_aToNotify = aToNotify;
- m_bDone = false;
- }
-
- public boolean isDone()
- {
- return m_bDone;
- }
-
- public void run()
- {
- try
- {
- System.out.println( "\npress 'enter' to exit demo" );
- System.in.read();
-
- m_bDone = true;
- // notify that the user pressed the key
- synchronized (m_aToNotify)
- {
- m_aToNotify.notify();
- }
- }
- catch( java.lang.Exception e )
- {
- // not really interested in
- System.err.println( e );
- }
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/Forms/makefile.mk b/odk/examples/DevelopersGuide/Forms/makefile.mk
deleted file mode 100644
index 5fd059fc..00000000
--- a/odk/examples/DevelopersGuide/Forms/makefile.mk
+++ /dev/null
@@ -1,97 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-FORMS_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/BooleanValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ButtonOperator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ComponentTreeTraversal.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ControlLock.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ControlValidation.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ControlValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/DataAwareness.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/DateValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/DocumentBasedExample.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/DocumentHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/DocumentType.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/DocumentViewHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/FLTools.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/FormLayer.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/GridFieldValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/InteractionRequest.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/KeyGenerator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ListSelectionValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/NumericValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ProgrammaticScriptAssignment.odt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/SalesFilter.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/SingleControlValidation.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/SpreadsheetDocument.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/SpreadsheetValueBinding.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/SpreadsheetView.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/TableCellTextBinding.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/TextValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/TimeValidator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/UNO.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/ValueBinding.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/URLHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/HsqlDatabase.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/RowSet.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Forms$/WaitForInput.java
-
-DIR_FILE_LIST= \
- $(FORMS_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_forms_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_forms.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/GUI/DialogDocument.java b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
deleted file mode 100644
index 0d6f29d2..00000000
--- a/odk/examples/DevelopersGuide/GUI/DialogDocument.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.PushButtonType;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.VclWindowPeerAttribute;
-import com.sun.star.awt.WindowAttribute;
-import com.sun.star.awt.WindowClass;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XView;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XFrame;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-public class DialogDocument extends UnoDialogSample {
-
- public DialogDocument(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
- super(_xContext, _xMCF);
- }
-
- public static void main(String args[]){
- DialogDocument oDialogDocument = null;
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- oDialogDocument = new DialogDocument(xContext, xMCF);
- oDialogDocument.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(400), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Document-Dialog", new Integer(300)});
- oDialogDocument.createWindowPeer();
- Object oFTHeaderModel = oDialogDocument.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTHeaderModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
- xFTHeaderModelMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "This code-sample demonstrates how to display an office document in a dialog window", "HeaderLabel", new Integer(6), new Integer(6), new Integer(300)});
- // add the model to the NameContainer of the dialog model
- oDialogDocument.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
- oDialogDocument.showDocumentinDialogWindow(oDialogDocument.m_xWindowPeer, new Rectangle(40, 50, 420, 550), "private:factory/swriter");
-
- oDialogDocument.insertButton(oDialogDocument, 126, 370, 50, "~Close dialog", (short) PushButtonType.OK_value);
- oDialogDocument.executeDialog();
- }catch( Exception ex ) {
- ex.printStackTrace(System.out);
- } finally{
- //make sure always to dispose the component and free the memory!
- if (oDialogDocument != null){
- if (oDialogDocument.m_xComponent != null) {
- oDialogDocument.m_xComponent.dispose();
- }
- }
- }
-
- System.exit( 0 );
- }
-
- public void showDocumentinDialogWindow(XWindowPeer _xParentWindowPeer, Rectangle _aRectangle, String _sUrl){
- try {
- // The Toolkit is the creator of all windows...
- Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, oToolkit);
-
- // set up a window description and create the window. A parent window is always necessary for this...
- com.sun.star.awt.WindowDescriptor aWindowDescriptor = new com.sun.star.awt.WindowDescriptor();
- // a simple window is enough for this purpose...
- aWindowDescriptor.Type = WindowClass.SIMPLE;
- aWindowDescriptor.WindowServiceName = "dockingwindow";
- // assign the parent window peer as described in the idl description...
- aWindowDescriptor.Parent = _xParentWindowPeer;
- aWindowDescriptor.ParentIndex = 1;
- aWindowDescriptor.Bounds = _aRectangle;
-
- // set the window attributes...
- // The attribute CLIPCHILDREN causes the parent to not repaint the areas of the children...
- aWindowDescriptor.WindowAttributes = VclWindowPeerAttribute.CLIPCHILDREN + WindowAttribute.BORDER + WindowAttribute.SHOW;
- XWindowPeer xWindowPeer = xToolkit.createWindow(aWindowDescriptor);
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xWindowPeer);
- XView xView = (XView) UnoRuntime.queryInterface(XView.class, xWindow);
-
- // create a frame and initialize it with the created window...
- Object oFrame = m_xMCF.createInstanceWithContext("com.sun.star.frame.Frame", m_xContext);
- // The frame should be of global scope because it's within the responsibility to dispose it after usage
- m_xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oFrame);
- m_xFrame.initialize(xWindow);
-
- // load the document and open it in preview mode
- XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, m_xFrame);
- PropertyValue[] aPropertyValues = new PropertyValue[2];
- PropertyValue aPropertyValue = new PropertyValue();
- aPropertyValue.Name = "Preview";
- aPropertyValue.Value = Boolean.TRUE;
- aPropertyValues[0] = aPropertyValue;
- aPropertyValue = new PropertyValue();
- aPropertyValue.Name = "ReadOnly";
- aPropertyValue.Value = Boolean.TRUE;
- aPropertyValues[1] = aPropertyValue;
- xComponentLoader.loadComponentFromURL(_sUrl, "_self", 0, aPropertyValues);
- } catch (com.sun.star.lang.IllegalArgumentException ex) {
- ex.printStackTrace();
- throw new java.lang.RuntimeException("cannot happen...");
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- throw new java.lang.RuntimeException("cannot happen...");
- }
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
deleted file mode 100644
index 0a875152..00000000
--- a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.PushButtonType;
-import com.sun.star.awt.XDialog;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.graphic.XGraphic;
-import com.sun.star.graphic.XGraphicProvider;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.ucb.XFileIdentifierConverter;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-public class ImageControlSample extends UnoDialogSample{
- /**
- * Creates a new instance of ImageControlSample
- */
- public ImageControlSample(XComponentContext _xContext, XMultiComponentFactory _xMCF){
- super(_xContext, _xMCF);
- super.createDialog(_xMCF);
- }
-
- // to start this script pass a parameter denoting the system path to a graphic to be displayed
- public static void main(String args[]) {
- ImageControlSample oImageControlSample = null;
- try {
- if (args.length == 0) {
- System.out.println("Please pass a parameter denoting the system path to your graphic!");
- return;
- }
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null ){
- System.out.println("Connected to a running office ...");
- }
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- oImageControlSample = new ImageControlSample(xContext, xMCF);
- oImageControlSample.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(100), Boolean.TRUE, "MyTestDialog", new Integer(102),new Integer(41), new Integer(0), new Short((short) 0), "OpenOffice", new Integer(230)});
- Object oFTHeaderModel = oImageControlSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTHeaderModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
- xFTHeaderModelMPSet.setPropertyValues(
- new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(16), "This code-sample demonstrates how to create an ImageControlSample within a dialog", Boolean.TRUE, "HeaderLabel", new Integer(6), new Integer(6), new Integer(210)});
- // add the model to the NameContainer of the dialog model
- oImageControlSample.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
- XPropertySet xICModelPropertySet = oImageControlSample.insertImageControl(xMCF, 68, 30, 32, 90);
- oImageControlSample.insertButton(oImageControlSample, 90, 75, 50, "~Close dialog", (short) PushButtonType.OK_value);
- oImageControlSample.createWindowPeer();
- // note: due to issue i76718 ("Setting graphic at a controlmodel required dialog peer") the graphic of the image control
- // may not be set before the peer of the dialog has been created.
- XGraphic xGraphic = oImageControlSample.getGraphic(oImageControlSample.m_xMCF, args[0]);
- xICModelPropertySet.setPropertyValue("Graphic", xGraphic);
- oImageControlSample.xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, oImageControlSample.m_xDialogControl);
- oImageControlSample.executeDialog();
- }catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- } finally{
- //make sure always to dispose the component and free the memory!
- if (oImageControlSample != null){
- if (oImageControlSample.m_xComponent != null){
- oImageControlSample.m_xComponent.dispose();
- }
- }
- }
- System.exit( 0 );
- }
-
-
- public XPropertySet insertImageControl(XMultiComponentFactory _xMCF, int _nPosX, int _nPosY, int _nHeight, int _nWidth){
- XPropertySet xICModelPropertySet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "ImageControl");
- // convert the system path to the image to a FileUrl
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oICModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlImageControlModel");
- XMultiPropertySet xICModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oICModel);
- xICModelPropertySet =(XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oICModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- // The image is not scaled
- xICModelMPSet.setPropertyValues(
- new String[] {"Border", "Height", "Name", "PositionX", "PositionY", "ScaleImage", "Width"},
- new Object[] { new Short((short) 1), new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.FALSE, new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oICModel);
- }catch (com.sun.star.uno.Exception ex){
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xICModelPropertySet;
- }
-
-
-// creates a UNO graphic object that can be used to be assigned
-// to the property "Graphic" of a controlmodel
- public XGraphic getGraphic(XMultiComponentFactory _xMCF, String _sImageSystemPath){
- XGraphic xGraphic = null;
- try{
- java.io.File oFile = new java.io.File(_sImageSystemPath);
- Object oFCProvider = _xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", this.m_xContext);
- XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
- String sImageUrl = xFileIdentifierConverter.getFileURLFromSystemPath(_sImageSystemPath, oFile.getAbsolutePath());
-
- // create a GraphicProvider at the global service manager...
- Object oGraphicProvider = m_xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", m_xContext);
- XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);
- // create the graphic object
- PropertyValue[] aPropertyValues = new PropertyValue[1];
- PropertyValue aPropertyValue = new PropertyValue();
- aPropertyValue.Name = "URL";
- aPropertyValue.Value = sImageUrl;
- aPropertyValues[0] = aPropertyValue;
- xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);
- return xGraphic;
- }catch (com.sun.star.uno.Exception ex){
- throw new java.lang.RuntimeException("cannot happen...");
- }}
-}
diff --git a/odk/examples/DevelopersGuide/GUI/Makefile b/odk/examples/DevelopersGuide/GUI/Makefile
deleted file mode 100644
index 4ec70489..00000000
--- a/odk/examples/DevelopersGuide/GUI/Makefile
+++ /dev/null
@@ -1,142 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the GUI examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=GUIExamples
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-
-APP1_NAME=DialogDocument
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP2_NAME=MessageBox
-APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
-APP3_NAME=UnoDialogSample
-APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
-APP4_NAME=UnoDialogSample2
-APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
-APP5_NAME=UnoMenu
-APP5_JAR=$(SAMPLE_CLASS_OUT)/$(APP5_NAME).jar
-APP6_NAME=UnoMenu2
-APP6_JAR=$(SAMPLE_CLASS_OUT)/$(APP6_NAME).jar
-APP7_NAME=ImageControlSample
-APP7_JAR=$(SAMPLE_CLASS_OUT)/$(APP7_NAME).jar
-
-APP_JAVAFILES = \
- RoadmapItemStateChangeListener.java \
- UnoDialogSample.java \
- UnoMenu.java
-
-APP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES))
-# $(SAMPLE_CLASS_OUT)/UnoDialogSample\&RoadmapItemStateChangeListener.class
-
-APP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES))
-#APP_CLASSNAMES = $(patsubst $(SAMPLE_CLASS_OUT)/%.class,%.class,$(APP_CLASSFILES))
-
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- GUIExamples
-
-
-include $(SETTINGS)/stdtarget.mk
-
-
-$(APP_CLASSFILES) : $(APP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES)
-
-$(SAMPLE_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $<
-
-$(SAMPLE_CLASS_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class $(APP_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(SAMPLE_CLASS_OUT)/$(APP1_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP1_NAME).class
-$(APP2_JAR) : $(SAMPLE_CLASS_OUT)/$(APP2_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP2_NAME).class
-$(APP3_JAR) : $(SAMPLE_CLASS_OUT)/$(APP3_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP3_NAME).class
-$(APP4_JAR) : $(SAMPLE_CLASS_OUT)/$(APP4_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP4_NAME).class
-$(APP5_JAR) : $(SAMPLE_CLASS_OUT)/$(APP5_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP5_NAME).class
-$(APP6_JAR) : $(SAMPLE_CLASS_OUT)/$(APP6_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP6_NAME).class
-$(APP7_JAR) : $(SAMPLE_CLASS_OUT)/$(APP7_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP7_NAME).class
-
-GUIExamples : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR) $(APP5_JAR) $(APP6_JAR) $(APP7_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo $(MAKE) $(APP4_NAME).run
- @echo $(MAKE) $(APP5_NAME).run
- @echo $(MAKE) $(APP6_NAME).run
- @echo $(MAKE) $(APP7_NAME).run
- @echo --------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-$(APP7_NAME).run: $(SAMPLE_CLASS_OUT)/$(APP7_NAME).jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< .$(PS)oologo.gif
-
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java
deleted file mode 100644
index 1fec55b8..00000000
--- a/odk/examples/DevelopersGuide/GUI/MessageBox.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.XMessageBoxFactory;
-import com.sun.star.awt.XVclWindowPeer;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XModel;
-import com.sun.star.util.XCloseable;
-import com.sun.star.frame.XFramesSupplier;
-import com.sun.star.lang.IllegalArgumentException;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-
-public class MessageBox {
-
- protected XComponentContext m_xContext = null;
- protected com.sun.star.lang.XMultiComponentFactory m_xMCF;
-
- /** Creates a new instance of MessageBox */
- public MessageBox(XComponentContext _xContext, XMultiComponentFactory _xMCF){
- m_xContext = _xContext;
- m_xMCF = _xMCF;
- }
-
- public static void main(String args[]) {
- XComponent xComp = null;
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
-
- MessageBox oMessageBox = new MessageBox(xContext, xMCF);
-
- //load default text document to get an active frame
- xComp = oMessageBox.createDefaultTextDocument();
-
- XWindowPeer xWindowPeer = oMessageBox.getWindowPeerOfFrame(xComp);
- if (xWindowPeer != null) {
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer) UnoRuntime.queryInterface(XVclWindowPeer.class, xWindowPeer);
- boolean bisHighContrast = oMessageBox.isHighContrastModeActivated(xVclWindowPeer);
- oMessageBox.showErrorMessageBox(xWindowPeer, "My Sampletitle", "HighContrastMode is enabled: " + bisHighContrast);
- } else{
- System.out.println("Could not retrieve current frame");
- }
-
- } catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- } finally {
- if (xComp != null) {
- try {
- XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(XCloseable.class, xComp);
- if (xClose != null) {
- xClose.close(false);
- } else {
- xComp.dispose();
- }
- } catch (com.sun.star.util.CloseVetoException e) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- }
- }
- }
-
- System.exit( 0 );
- }
-
- // helper method to get the window peer of a document or if no
- // document is specified it tries to get the avtive frame
- // which is potentially dangerous
- public XWindowPeer getWindowPeerOfFrame(XComponent xComp) {
- try {
- XFrame xFrame = null;
-
- if (xComp != null) {
- XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, xComp);
- xFrame = xModel.getCurrentController().getFrame();
-
- } else {
- // Note: This method is potentially dangerous and should only be used for debugging
- // purposes as it relies on the platform dependent window handler..
- Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
- XFramesSupplier xFramesSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, oDesktop);
- xFrame = xFramesSupplier.getActiveFrame();
- }
-
- if (xFrame != null){
- XWindow xWindow = xFrame.getContainerWindow();
- if (xWindow != null){
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xWindow);
- return xWindowPeer;
- }
- }
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- }
- return null;
- }
-
- XComponent createDefaultTextDocument() {
-
- XComponent xComp = null;
- try {
- Object oDesktop = m_xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", m_xContext);
-
- // get the component laoder from the desktop to create a new
- // text document
- com.sun.star.frame.XComponentLoader xCLoader =(com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,oDesktop);
-
- com.sun.star.beans.PropertyValue[] args = new com.sun.star.beans.PropertyValue [1];
- args[0] = new com.sun.star.beans.PropertyValue();
- args[0].Name = "Hidden";
- args[0].Value = new Boolean(true);
- String strDoc = "private:factory/swriter";
-
- xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, args);
-
- } catch(com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- }
- return xComp;
- }
-
- /** shows an error messagebox
- * @param _xParentWindowPeer the windowpeer of the parent window
- * @param _sTitle the title of the messagebox
- * @param _sMessage the message of the messagebox
- */
- public void showErrorMessageBox(XWindowPeer _xParentWindowPeer, String _sTitle, String _sMessage) {
- XComponent xComponent = null;
- try {
- Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
- XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class, oToolkit);
- // rectangle may be empty if position is in the center of the parent peer
- Rectangle aRectangle = new Rectangle();
- XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer, aRectangle, "errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
- if (xMessageBox != null){
- short nResult = xMessageBox.execute();
- }
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace(System.out);
- } finally{
- //make sure always to dispose the component and free the memory!
- if (xComponent != null){
- xComponent.dispose();
- }
- }
- }
-
-
- /** @param _xVclWindowPeer the windowpeer of a dialog control or the dialog itself
- * @return true if HighContrastMode is activated or false if HighContrastMode is deactivated
- */
- public boolean isHighContrastModeActivated(XVclWindowPeer _xVclWindowPeer) {
- boolean bIsActivated = false;
-
- try {
- if (_xVclWindowPeer != null){
- int nUIColor = AnyConverter.toInt(_xVclWindowPeer.getProperty("DisplayBackgroundColor"));
- int nRed = getRedColorShare(nUIColor);
- int nGreen = getGreenColorShare(nUIColor);
- int nBlue = getBlueColorShare(nUIColor);
- int nLuminance = (( nBlue*28 + nGreen*151 + nRed*77 ) / 256 );
- boolean bisactivated = (nLuminance <= 25);
- return bisactivated;
- } else{
- return false;
- }
- } catch (IllegalArgumentException e) {
- e.printStackTrace(System.out);
- }
- return bIsActivated;
- }
-
- public static int getRedColorShare(int _nColor) {
- int nRed = (int) _nColor/65536;
- int nRedModulo = _nColor % 65536;
- int nGreen = (int) (nRedModulo / 256);
- int nGreenModulo = (nRedModulo % 256);
- int nBlue = nGreenModulo;
- return nRed;
- }
-
- public static int getGreenColorShare(int _nColor) {
- int nRed = (int) _nColor/65536;
- int nRedModulo = _nColor % 65536;
- int nGreen = (int) (nRedModulo / 256);
- return nGreen;
- }
-
- public static int getBlueColorShare(int _nColor) {
- int nRed = (int) _nColor/65536;
- int nRedModulo = _nColor % 65536;
- int nGreen = (int) (nRedModulo / 256);
- int nGreenModulo = (nRedModulo % 256);
- int nBlue = nGreenModulo;
- return nBlue;
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
deleted file mode 100644
index 834517e4..00000000
--- a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.ItemEvent;
-import com.sun.star.awt.XItemListener;
-import com.sun.star.lang.EventObject;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.uno.UnoRuntime;
-
-
-public class RoadmapItemStateChangeListener implements XItemListener {
- protected com.sun.star.lang.XMultiServiceFactory m_xMSFDialogModel;
-
- public RoadmapItemStateChangeListener(com.sun.star.lang.XMultiServiceFactory xMSFDialogModel) {
- m_xMSFDialogModel = xMSFDialogModel;
- }
-
- public void itemStateChanged(com.sun.star.awt.ItemEvent itemEvent) {
- try {
- // get the new ID of the roadmap that is supposed to refer to the new step of the dialogmodel
- int nNewID = itemEvent.ItemId;
- XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
- int nOldStep = ((Integer) xDialogModelPropertySet.getPropertyValue("Step")).intValue();
- // in the following line "ID" and "Step" are mixed together.
- // In fact in this case they denot the same
- if (nNewID != nOldStep){
- xDialogModelPropertySet.setPropertyValue("Step", new Integer(nNewID));
- }
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace(System.out);
- }
- }
-
- public void disposing(EventObject eventObject) {
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/GUI/SystemDialog.java b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
deleted file mode 100644
index c20718df..00000000
--- a/odk/examples/DevelopersGuide/GUI/SystemDialog.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.ui.dialogs.XExecutableDialog;
-import com.sun.star.ui.dialogs.XFilePicker;
-import com.sun.star.ui.dialogs.XFilePickerControlAccess;
-import com.sun.star.ui.dialogs.XFilterManager;
-import com.sun.star.ui.dialogs.XFolderPicker;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-
-public class SystemDialog {
-
- protected XComponentContext m_xContext = null;
- protected com.sun.star.lang.XMultiComponentFactory m_xMCF;
-
- /** Creates a new instance of MessageBox */
- public SystemDialog(XComponentContext _xContext, XMultiComponentFactory _xMCF){
- m_xContext = _xContext;
- m_xMCF = _xMCF;
- }
-
- public static void main(String args[]){
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- SystemDialog oSystemDialog = new SystemDialog(xContext, xMCF);
- oSystemDialog.raiseSaveAsDialog();
- oSystemDialog.raiseFolderPicker(oSystemDialog.getWorkPath(), "My Title");
- }catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- }
-
- System.exit( 0 );
- }
-
-
- public String raiseSaveAsDialog() {
- String sStorePath = "";
- XComponent xComponent = null;
- try {
- // the filepicker is instantiated with the global Multicomponentfactory...
- Object oFilePicker = m_xMCF.createInstanceWithContext("com.sun.star.ui.dialogs.FilePicker", m_xContext);
- XFilePicker xFilePicker = (XFilePicker) UnoRuntime.queryInterface(XFilePicker.class, oFilePicker);
-
- // the defaultname is the initially proposed filename..
- xFilePicker.setDefaultName("MyExampleDocument");
-
- // set the initial displaydirectory. In this example the user template directory is used
- Object oPathSettings = m_xMCF.createInstanceWithContext("com.sun.star.util.PathSettings",m_xContext);
- XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
- String sTemplateUrl = (String) xPropertySet.getPropertyValue("Template_writable");
- xFilePicker.setDisplayDirectory(sTemplateUrl);
-
- // set the filters of the dialog. The filternames may be retrieved from
- // http://wiki.services.openoffice.org/wiki/Framework/Article/Filter
- XFilterManager xFilterManager = (XFilterManager) UnoRuntime.queryInterface(XFilterManager.class, xFilePicker);
- xFilterManager.appendFilter("OpenDocument Text Template", "writer8_template");
- xFilterManager.appendFilter("OpenDocument Text", "writer8");
-
- // choose the template that defines the capabilities of the filepicker dialog
- XInitialization xInitialize = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, xFilePicker);
- Short[] listAny = new Short[] { new Short(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION)};
- xInitialize.initialize(listAny);
-
- // add a control to the dialog to add the extension automatically to the filename...
- XFilePickerControlAccess xFilePickerControlAccess = (XFilePickerControlAccess) UnoRuntime.queryInterface(XFilePickerControlAccess.class, xFilePicker);
- xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, new Boolean(true));
-
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFilePicker);
-
- // execute the dialog...
- XExecutableDialog xExecutable = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, xFilePicker);
- short nResult = xExecutable.execute();
-
- // query the resulting path of the dialog...
- if (nResult == com.sun.star.ui.dialogs.ExecutableDialogResults.OK){
- String[] sPathList = xFilePicker.getFiles();
- if (sPathList.length > 0){
- sStorePath = sPathList[0];
- }
- }
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace();
- } finally{
- //make sure always to dispose the component and free the memory!
- if (xComponent != null){
- xComponent.dispose();
- }
- }
- return sStorePath;
- }
-
- public String getWorkPath(){
- String sWorkUrl = "";
- try{
- // retrieve the configured Work path...
- Object oPathSettings = m_xMCF.createInstanceWithContext("com.sun.star.util.PathSettings",m_xContext);
- XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
- sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace();
- }
- return sWorkUrl;
- }
-
- /** raises a folderpicker in which the user can browse and select a path
- * @param _sDisplayDirectory the path to the directory that is initially displayed
- * @param _sTitle the title of the folderpicker
- * @return the path to the folder that the user has selected. if the user has closed
- * the folderpicker by clicking the "Cancel" button
- * an empty string is returned
- * @see com.sun.star.ui.dialogs.FolderPicker
- */
- public String raiseFolderPicker(String _sDisplayDirectory, String _sTitle) {
- String sReturnFolder = "";
- XComponent xComponent = null;
- try {
- // instantiate the folder picker and retrieve the necessary interfaces...
- Object oFolderPicker = m_xMCF.createInstanceWithContext("com.sun.star.ui.dialogs.FolderPicker", m_xContext);
- XFolderPicker xFolderPicker = (XFolderPicker) UnoRuntime.queryInterface(XFolderPicker.class, oFolderPicker);
- XExecutableDialog xExecutable = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oFolderPicker);
- xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oFolderPicker);
- xFolderPicker.setDisplayDirectory(_sDisplayDirectory);
- // set the dialog title...
- xFolderPicker.setTitle(_sTitle);
- // show the dialog...
- short nResult = xExecutable.execute();
-
- // User has clicked "Select" button...
- if (nResult == com.sun.star.ui.dialogs.ExecutableDialogResults.OK){
- sReturnFolder = xFolderPicker.getDirectory();
- }
-
- }catch( Exception exception ) {
- exception.printStackTrace(System.out);
- } finally{
- //make sure always to dispose the component and free the memory!
- if (xComponent != null){
- xComponent.dispose();
- }
- }
- // return the selected path. If the user has clicked cancel an empty string is
- return sReturnFolder;
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
deleted file mode 100644
index 043fff2a..00000000
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ /dev/null
@@ -1,1482 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.ActionEvent;
-import com.sun.star.awt.AdjustmentEvent;
-import com.sun.star.awt.AdjustmentType;
-import com.sun.star.awt.FocusChangeReason;
-import com.sun.star.awt.FocusEvent;
-import com.sun.star.awt.ItemEvent;
-import com.sun.star.awt.KeyEvent;
-import com.sun.star.awt.MouseEvent;
-import com.sun.star.awt.PosSize;
-import com.sun.star.awt.PushButtonType;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.SpinEvent;
-import com.sun.star.awt.TextEvent;
-import com.sun.star.awt.XActionListener;
-import com.sun.star.awt.XAdjustmentListener;
-import com.sun.star.awt.XButton;
-import com.sun.star.awt.XCheckBox;
-import com.sun.star.awt.XComboBox;
-import com.sun.star.awt.XControl;
-import com.sun.star.awt.XControlContainer;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.awt.XDialog;
-import com.sun.star.awt.XFixedText;
-import com.sun.star.awt.XFocusListener;
-import com.sun.star.awt.XItemEventBroadcaster;
-import com.sun.star.awt.XItemListener;
-import com.sun.star.awt.XKeyListener;
-import com.sun.star.awt.XListBox;
-//import com.sun.star.awt.XMessageBoxFactory;
-import com.sun.star.awt.XMouseListener;
-import com.sun.star.awt.XPointer;
-import com.sun.star.awt.XReschedule;
-import com.sun.star.awt.XScrollBar;
-import com.sun.star.awt.XSpinField;
-import com.sun.star.awt.XSpinListener;
-import com.sun.star.awt.XTextComponent;
-import com.sun.star.awt.XTextListener;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XTopWindow;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XIndexContainer;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.ucb.XFileIdentifierConverter;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.XMacroExpander;
-import com.sun.star.util.XNumberFormats;
-import com.sun.star.util.XNumberFormatsSupplier;
-
-
-// Anregung von DV:
-// Position und Weite als Parameter uebergeben
-
-public class UnoDialogSample implements XTextListener, XSpinListener, XActionListener, XFocusListener, XMouseListener, XItemListener, XAdjustmentListener, XKeyListener {
- protected XComponentContext m_xContext = null;
- protected com.sun.star.lang.XMultiComponentFactory m_xMCF;
- protected XMultiServiceFactory m_xMSFDialogModel;
- protected XModel m_xModel;
- protected XNameContainer m_xDlgModelNameContainer;
- protected XControlContainer m_xDlgContainer;
-// protected XNameAccess m_xDlgModelNameAccess;
- protected XControl m_xDialogControl;
- protected XDialog xDialog;
- protected XReschedule mxReschedule;
- protected XWindowPeer m_xWindowPeer = null;
- protected XTopWindow m_xTopWindow = null;
- protected XFrame m_xFrame = null;
- protected XComponent m_xComponent = null;
-
-
- /**
- * Creates a new instance of UnoDialogSample
- */
- public UnoDialogSample(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
- m_xContext = _xContext;
- m_xMCF = _xMCF;
- createDialog(m_xMCF);
- }
-
-
- public static void main(String args[]) {
- UnoDialogSample oUnoDialogSample = null;
-
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- oUnoDialogSample = new UnoDialogSample(xContext, xMCF);
- oUnoDialogSample.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(380), Boolean.TRUE, "MyTestDialog", new Integer(102),new Integer(41), new Integer(0), new Short((short) 0), "OpenOffice", new Integer(380)});
- Object oFTHeaderModel = oUnoDialogSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTHeaderModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
- xFTHeaderModelMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "This code-sample demonstrates how to create various controls in a dialog", "HeaderLabel", new Integer(106), new Integer(6), new Integer(300)});
- // add the model to the NameContainer of the dialog model
- oUnoDialogSample.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
- oUnoDialogSample.insertFixedText(oUnoDialogSample, 106, 18, 100, 0, "My ~Label");
- oUnoDialogSample.insertCurrencyField(oUnoDialogSample, 106, 30, 60);
- oUnoDialogSample.insertProgressBar(106, 44, 100, 100);
- oUnoDialogSample.insertHorizontalFixedLine(106, 58, 100, "My FixedLine");
- oUnoDialogSample.insertEditField(oUnoDialogSample, oUnoDialogSample, 106, 72, 60);
- oUnoDialogSample.insertTimeField(106, 96, 50, 0, 170000, 1000);
- oUnoDialogSample.insertDateField(oUnoDialogSample, 166, 96, 50);
- oUnoDialogSample.insertGroupBox(102, 124, 70, 100);
- oUnoDialogSample.insertPatternField(106, 136, 50);
- oUnoDialogSample.insertNumericField(106, 152, 50, 0.0, 1000.0, 500.0, 100.0, (short) 1);
- oUnoDialogSample.insertCheckBox(oUnoDialogSample, 106, 168, 150);
- oUnoDialogSample.insertRadioButtonGroup((short) 50, 130, 200, 150);
- oUnoDialogSample.insertListBox(106, 230, 50, 0, new String[]{"First Item", "Second Item"});
- oUnoDialogSample.insertComboBox(106, 250, 50);
- oUnoDialogSample.insertFormattedField(oUnoDialogSample, 106, 270, 100);
- oUnoDialogSample.insertVerticalScrollBar(oUnoDialogSample, 230, 230, 52);
- oUnoDialogSample.insertFileControl(oUnoDialogSample, 106, 290, 200 );
- oUnoDialogSample.insertButton(oUnoDialogSample, 106, 320, 50, "~Close dialog", (short) PushButtonType.OK_value);
- oUnoDialogSample.createWindowPeer();
- oUnoDialogSample.addRoadmap(oUnoDialogSample.getRoadmapItemStateChangeListener());
- oUnoDialogSample.insertRoadmapItem(0, true, "Introduction", 1);
- oUnoDialogSample.insertRoadmapItem(1, true, "Documents", 2);
- oUnoDialogSample.xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, oUnoDialogSample.m_xDialogControl);
- oUnoDialogSample.executeDialog();
- }catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- } finally{
- //make sure always to dispose the component and free the memory!
- if (oUnoDialogSample != null){
- if (oUnoDialogSample.m_xComponent != null){
- oUnoDialogSample.m_xComponent.dispose();
- }
- }
- }
-
- System.exit( 0 );
- }
-
-
- /**
- * @param _sKeyName
- * @return
- */
- public XNameAccess getRegistryKeyContent(String _sKeyName){
- try {
- Object oConfigProvider;
- PropertyValue[] aNodePath = new PropertyValue[1];
- oConfigProvider = m_xMCF.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", this.m_xContext);
- aNodePath[0] = new PropertyValue();
- aNodePath[0].Name = "nodepath";
- aNodePath[0].Value = _sKeyName;
- XMultiServiceFactory xMSFConfig = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
- Object oNode = xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath);
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oNode);
- return xNameAccess;
- } catch (Exception exception) {
- exception.printStackTrace(System.out);
- return null;
- }
- }
-
-
- /**
- * @param _sRegistryPath the path a registryNode
- * @param _sImageName the name of the image
- */
- public String getImageUrl(String _sRegistryPath, String _sImageName) {
- String sImageUrl = "";
- try {
- // retrive the configuration node of the extension
- XNameAccess xNameAccess = getRegistryKeyContent(_sRegistryPath);
- if (xNameAccess != null){
- if (xNameAccess.hasByName(_sImageName)){
- // get the Image Url and process the Url by the macroexpander...
- sImageUrl = (String) xNameAccess.getByName(_sImageName);
- Object oMacroExpander = this.m_xContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander");
- XMacroExpander xMacroExpander = (XMacroExpander) UnoRuntime.queryInterface(XMacroExpander.class, oMacroExpander);
- sImageUrl = xMacroExpander.expandMacros(sImageUrl);
- sImageUrl = sImageUrl.substring(new String("vnd.sun.star.expand:").length(), sImageUrl.length());
- sImageUrl = sImageUrl.trim();
- sImageUrl += "/" + _sImageName;
- }
- }
- } catch (Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- */
- ex.printStackTrace(System.out);
- }
- return sImageUrl;
- }
-
- protected void createDialog(XMultiComponentFactory _xMCF) {
- try {
- Object oDialogModel = _xMCF.createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", m_xContext);
-
- // The XMultiServiceFactory of the dialogmodel is needed to instantiate the controls...
- m_xMSFDialogModel = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDialogModel);
-
- // The named container is used to insert the created controls into...
- m_xDlgModelNameContainer = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oDialogModel);
-
- // create the dialog...
- Object oUnoDialog = _xMCF.createInstanceWithContext("com.sun.star.awt.UnoControlDialog", m_xContext);
- m_xDialogControl = (XControl) UnoRuntime.queryInterface(XControl.class, oUnoDialog);
-
- // The scope of the control container is public...
- m_xDlgContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, oUnoDialog);
-
- m_xTopWindow = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, m_xDlgContainer);
-
- // link the dialog and its model...
- XControlModel xControlModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, oDialogModel);
- m_xDialogControl.setModel(xControlModel);
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace(System.out);
- }
- }
-
-
-
- public short executeDialogWithembeddedExampleSnippets() throws com.sun.star.script.BasicErrorException {
- if (m_xWindowPeer == null){
- createWindowPeer();
- }
- addRoadmap(getRoadmapItemStateChangeListener());
- insertRoadmapItem(0, true, "Introduction", 1);
- insertRoadmapItem(1, true, "Documents", 2);
- xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, m_xDialogControl);
- return xDialog.execute();
- }
-
-
- public short executeDialog() throws com.sun.star.script.BasicErrorException {
- if (m_xWindowPeer == null) {
- createWindowPeer();
- }
- xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, m_xDialogControl);
- m_xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, m_xDialogControl);
- return xDialog.execute();
- }
-
-
-
-
- public XItemListener getRoadmapItemStateChangeListener(){
- return new RoadmapItemStateChangeListener(m_xMSFDialogModel);
- }
-
-
- public void initialize(String[] PropertyNames, Object[] PropertyValues) throws com.sun.star.script.BasicErrorException{
- try{
- XMultiPropertySet xMultiPropertySet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, m_xDlgModelNameContainer);
- xMultiPropertySet.setPropertyValues(PropertyNames, PropertyValues);
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace(System.out);
- }}
-
-
-
- /**
- * create a peer for this
- * dialog, using the given
- * peer as a parent.
- * @param parentPeer
- * @return
- * @throws java.lang.Exception
- */
- public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) throws com.sun.star.script.BasicErrorException{
- try{
- if (_xWindowParentPeer == null){
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer);
- xWindow.setVisible(false);
- Object tk = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, tk);
- mxReschedule = (XReschedule) UnoRuntime.queryInterface(XReschedule.class, xToolkit);
- m_xDialogControl.createPeer(xToolkit, _xWindowParentPeer);
- m_xWindowPeer = m_xDialogControl.getPeer();
- return m_xWindowPeer;
- }
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace(System.out);
- }
- return null;
- }
-
-
- public void calculateDialogPosition(XWindow _xWindow) {
- Rectangle aFramePosSize = m_xModel.getCurrentController().getFrame().getComponentWindow().getPosSize();
- Rectangle CurPosSize = _xWindow.getPosSize();
- int WindowHeight = aFramePosSize.Height;
- int WindowWidth = aFramePosSize.Width;
- int DialogWidth = CurPosSize.Width;
- int DialogHeight = CurPosSize.Height;
- int iXPos = ((WindowWidth / 2) - (DialogWidth / 2));
- int iYPos = ((WindowHeight / 2) - (DialogHeight / 2));
- _xWindow.setPosSize(iXPos, iYPos, DialogWidth, DialogHeight, PosSize.POS);
- }
-
-
-
- /**
- * Creates a peer for this
- * dialog, using the active OO frame
- * as the parent window.
- * @return
- * @throws java.lang.Exception
- */
- public XWindowPeer createWindowPeer() throws com.sun.star.script.BasicErrorException{
- return createWindowPeer(null);
- }
-
- public void endExecute() {
- xDialog.endExecute();
- }
-
-
- public Object insertControlModel(String ServiceName, String sName, String[] sProperties, Object[] sValues) throws com.sun.star.script.BasicErrorException{
- try {
- Object oControlModel = m_xMSFDialogModel.createInstance(ServiceName);
- XMultiPropertySet xControlMultiPropertySet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oControlModel);
- xControlMultiPropertySet.setPropertyValues(sProperties, sValues);
- m_xDlgModelNameContainer.insertByName(sName, oControlModel);
- return oControlModel;
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace(System.out);
- return null;
- }
- }
-
-
- public XFixedText insertFixedText(XMouseListener _xMouseListener, int _nPosX, int _nPosY, int _nWidth, int _nStep, String _sLabel){
- XFixedText xFixedText = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "Label");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oFTModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
-
- xFTModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Step", "Width"},
- new Object[] { new Integer(8), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), new Integer(_nWidth)});
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oFTModel);
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- XPropertySet xFTPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFTModel);
- xFTPSet.setPropertyValue("Label", _sLabel);
-
- // reference the control by the Name
- XControl xFTControl = m_xDlgContainer.getControl(sName);
- xFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, xFTControl);
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xFTControl);
- xWindow.addMouseListener(_xMouseListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xFixedText;
- }
-
-
- public XTextComponent insertCurrencyField(XTextListener _xTextListener, int _nPositionX, int _nPositionY, int _nWidth){
- XTextComponent xTextComponent = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "CurrencyField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oCFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlCurrencyFieldModel");
- XMultiPropertySet xCFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oCFModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xCFModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPositionX), new Integer(_nPositionY), new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oCFModel);
- XPropertySet xCFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oCFModel);
-
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xCFModelPSet.setPropertyValue("PrependCurrencySymbol", Boolean.TRUE);
- xCFModelPSet.setPropertyValue("CurrencySymbol", "$");
- xCFModelPSet.setPropertyValue("Value", new Double(2.93));
-
- // add a textlistener that is notified on each change of the controlvalue...
- Object oCFControl = m_xDlgContainer.getControl(sName);
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, oCFControl);
- xTextComponent.addTextListener(_xTextListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xTextComponent;
- }
-
-
-
- public XPropertySet insertProgressBar(int _nPosX, int _nPosY, int _nWidth, int _nProgressMax){
- XPropertySet xPBModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "ProgressBar");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oPBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlProgressBarModel");
-
- XMultiPropertySet xPBModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oPBModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xPBModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oPBModel);
- xPBModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oPBModel);
-
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xPBModelPSet.setPropertyValue("ProgressValueMin", new Integer(0));
- xPBModelPSet.setPropertyValue("ProgressValueMax", new Integer(_nProgressMax));
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xPBModelPSet;
- }
-
-
-
- public void insertHorizontalFixedLine(int _nPosX, int _nPosY, int _nWidth, String _sLabel){
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "FixedLine");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oFLModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedLineModel");
- XMultiPropertySet xFLModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFLModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xFLModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), sName, new Integer(0), new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oFLModel);
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- XPropertySet xFLPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFLModel);
- xFLPSet.setPropertyValue("Label", _sLabel);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
-
- public void insertGroupBox(int _nPosX, int _nPosY, int _nHeight, int _nWidth){
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "FrameControl");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oGBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlGroupBoxModel");
- XMultiPropertySet xGBModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oGBModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xGBModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oGBModel);
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- XPropertySet xGBPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oGBModel);
- xGBPSet.setPropertyValue("Label", "~My GroupBox");
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
-
- public XTextComponent insertEditField(XTextListener _xTextListener, XFocusListener _xFocusListener, int _nPosX, int _nPosY, int _nWidth){
- XTextComponent xTextComponent = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "TextField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oTFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlEditModel");
- XMultiPropertySet xTFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oTFModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xTFModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Text", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), "MyText", new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oTFModel);
- XPropertySet xTFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oTFModel);
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xTFModelPSet.setPropertyValue("EchoChar", new Short((short) '*'));
- XControl xTFControl = m_xDlgContainer.getControl(sName);
-
- // add a textlistener that is notified on each change of the controlvalue...
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xTFControl);
- XWindow xTFWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xTFControl);
- xTFWindow.addFocusListener(_xFocusListener);
- xTextComponent.addTextListener(_xTextListener);
- xTFWindow.addKeyListener(this);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xTextComponent;
- }
-
- public XPropertySet insertTimeField(int _nPosX, int _nPosY, int _nWidth, int _nTime, int _nTimeMin, int _nTimeMax){
- XPropertySet xTFModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "TimeField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oTFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlTimeFieldModel");
- XMultiPropertySet xTFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oTFModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xTFModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oTFModel);
- xTFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oTFModel);
-
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xTFModelPSet.setPropertyValue("TimeFormat", new Short((short) 5));
- xTFModelPSet.setPropertyValue("TimeMin", new Integer(_nTimeMin));
- xTFModelPSet.setPropertyValue("TimeMax", new Integer(_nTimeMax));
- xTFModelPSet.setPropertyValue("Time", new Integer(_nTime));
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xTFModelPSet;
- }
-
-
-
- public XPropertySet insertDateField(XSpinListener _xSpinListener, int _nPosX, int _nPosY, int _nWidth){
- XPropertySet xDFModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "DateField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oDFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlDateFieldModel");
- XMultiPropertySet xDFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oDFModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xDFModelMPSet.setPropertyValues(
- new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oDFModel);
- xDFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oDFModel);
-
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xDFModelPSet.setPropertyValue("DateFormat", new Short((short) 7));
- xDFModelPSet.setPropertyValue("DateMin", new Integer(20070401));
- xDFModelPSet.setPropertyValue("DateMax", new Integer(20070501));
- xDFModelPSet.setPropertyValue("Date", new Integer(20000415));
- Object oDFControl = m_xDlgContainer.getControl(sName);
-
- // add a SpinListener that is notified on each change of the controlvalue...
- XSpinField xSpinField = (XSpinField) UnoRuntime.queryInterface(XSpinField.class, oDFControl);
- xSpinField.addSpinListener(_xSpinListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xDFModelPSet;
- }
-
-
- public XPropertySet insertPatternField(int _nPosX, int _nPosY, int _nWidth){
- XPropertySet xPFModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "PatternField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oPFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlPatternFieldModel");
- XMultiPropertySet xPFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oPFModel);
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xPFModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oPFModel);
- xPFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oPFModel);
-
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xPFModelPSet.setPropertyValue("LiteralMask", "__.05.2007");
- // Allow only numbers for the first two digits...
- xPFModelPSet.setPropertyValue("EditMask", "NNLLLLLLLL");
- // verify the user input immediately...
- xPFModelPSet.setPropertyValue("StrictFormat", Boolean.TRUE);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xPFModelPSet;
- }
-
-
- public XPropertySet insertNumericField( int _nPosX, int _nPosY, int _nWidth,
- double _fValueMin, double _fValueMax, double _fValue,
- double _fValueStep, short _nDecimalAccuracy){
- XPropertySet xNFModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "NumericField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oNFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlNumericFieldModel");
- XMultiPropertySet xNFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oNFModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xNFModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "StrictFormat", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oNFModel);
- xNFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oNFModel);
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xNFModelPSet.setPropertyValue("ValueMin", new Double(_fValueMin));
- xNFModelPSet.setPropertyValue("ValueMax", new Double(_fValueMax));
- xNFModelPSet.setPropertyValue("Value", new Double(_fValue));
- xNFModelPSet.setPropertyValue("ValueStep", new Double(_fValueStep));
- xNFModelPSet.setPropertyValue("ShowThousandsSeparator", Boolean.TRUE);
- xNFModelPSet.setPropertyValue("DecimalAccuracy", new Short(_nDecimalAccuracy));
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xNFModelPSet;
- }
-
-
-
- public XPropertySet insertVerticalScrollBar(XAdjustmentListener _xAdjustmentListener, int _nPosX, int _nPosY, int _nHeight){
- XPropertySet xSBModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "ScrollBar");
-
- Integer NOrientation = new Integer(com.sun.star.awt.ScrollBarOrientation.VERTICAL);
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oSBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlScrollBarModel");
- XMultiPropertySet xSBModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oSBModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xSBModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(_nHeight), sName, NOrientation, new Integer(_nPosX), new Integer(_nPosY), new Integer(8)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oSBModel);
-
- xSBModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oSBModel);
- // The following properties may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xSBModelPSet.setPropertyValue("ScrollValueMin", new Integer(0));
- xSBModelPSet.setPropertyValue("ScrollValueMax", new Integer(100));
- xSBModelPSet.setPropertyValue("ScrollValue", new Integer(5));
- xSBModelPSet.setPropertyValue("LineIncrement", new Integer(2));
- xSBModelPSet.setPropertyValue("BlockIncrement", new Integer(10));
-
- // Add an Adjustment that will listen to changes of the scrollbar...
- XControl xSBControl = m_xDlgContainer.getControl(sName);
- XScrollBar xScrollBar = (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, xSBControl);
- xScrollBar.addAdjustmentListener(_xAdjustmentListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xSBModelPSet;
- }
-
-
- /** makes a String unique by appending a numerical suffix
- * @param _xElementContainer the com.sun.star.container.XNameAccess container
- * that the new Element is going to be inserted to
- * @param _sElementName the StemName of the Element
- */
- public static String createUniqueName(XNameAccess _xElementContainer, String _sElementName) {
- boolean bElementexists = true;
- int i = 1;
- String sIncSuffix = "";
- String BaseName = _sElementName;
- while (bElementexists) {
- bElementexists = _xElementContainer.hasByName(_sElementName);
- if (bElementexists) {
- i += 1;
- _sElementName = BaseName + Integer.toString(i);
- }
- }
- return _sElementName;
- }
-
-
- public XCheckBox insertCheckBox(XItemListener _xItemListener, int _nPosX, int _nPosY, int _nWidth){
- XCheckBox xCheckBox = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "CheckBox");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oCBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlCheckBoxModel");
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- XMultiPropertySet xCBMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oCBModel);
- xCBMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width" } ,
- new Object[] {new Integer(8), "~Include page number", sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- XPropertySet xCBModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xCBMPSet);
- xCBModelPSet.setPropertyValue("TriState", Boolean.TRUE);
- xCBModelPSet.setPropertyValue("State", new Short((short) 1));
-
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oCBModel);
- XControl xCBControl = m_xDlgContainer.getControl(sName);
- xCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, xCBControl);
- // An ActionListener will be notified on the activation of the button...
- xCheckBox.addItemListener(_xItemListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xCheckBox;
- }
-
-
-
-
- public void insertRadioButtonGroup(short _nTabIndex, int _nPosX, int _nPosY, int _nWidth){
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "OptionButton");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oRBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlRadioButtonModel");
- XMultiPropertySet xRBMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oRBModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xRBMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "State", "TabIndex", "Width" } ,
- new Object[] {new Integer(8), "~First Option", sName, new Integer(_nPosX), new Integer(_nPosY), new Short((short) 1), new Short(_nTabIndex++),new Integer(_nWidth)});
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oRBModel);
-
- // create a unique name by means of an own implementation...
- sName = createUniqueName(m_xDlgModelNameContainer, "OptionButton");
-
- oRBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlRadioButtonModel");
- xRBMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oRBModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xRBMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "TabIndex", "Width" } ,
- new Object[] {new Integer(8), "~Second Option", sName, new Integer(130), new Integer(214), new Short(_nTabIndex), new Integer(150)});
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oRBModel);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
- public XListBox insertListBox(int _nPosX, int _nPosY, int _nWidth, int _nStep, String[] _sStringItemList){
- XListBox xListBox = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "ListBox");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oListBoxModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlListBoxModel");
- XMultiPropertySet xLBModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oListBoxModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xLBModelMPSet.setPropertyValues(
- new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "Step", "StringItemList", "Width" } ,
- new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), _sStringItemList, new Integer(_nWidth)});
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- XPropertySet xLBModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xLBModelMPSet);
- xLBModelPSet.setPropertyValue("MultiSelection", Boolean.TRUE);
- short[] nSelItems = new short[] {(short) 1, (short) 3};
- xLBModelPSet.setPropertyValue("SelectedItems", nSelItems);
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, xLBModelMPSet);
- XControl xControl = m_xDlgContainer.getControl(sName);
- // retrieve a ListBox that is more convenient to work with than the Model of the ListBox...
- xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControl);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xListBox;
- }
-
-
- public XComboBox insertComboBox(int _nPosX, int _nPosY, int _nWidth){
- XComboBox xComboBox = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "ComboBox");
-
- String[] sStringItemList = new String[]{"First Entry", "Second Entry", "Third Entry", "Fourth Entry"};
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oComboBoxModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlComboBoxModel");
- XMultiPropertySet xCbBModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oComboBoxModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xCbBModelMPSet.setPropertyValues(
- new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "StringItemList", "Width" } ,
- new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), sStringItemList, new Integer(_nWidth)});
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- XPropertySet xCbBModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xCbBModelMPSet);
- xCbBModelPSet.setPropertyValue("MaxTextLen", new Short((short) 10));
- xCbBModelPSet.setPropertyValue("ReadOnly", Boolean.FALSE);
-
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, xCbBModelMPSet);
- XControl xControl = m_xDlgContainer.getControl(sName);
-
- // retrieve a ListBox that is more convenient to work with than the Model of the ListBox...
- xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControl);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xComboBox;
- }
-
-
-
- public XPropertySet insertFormattedField(XSpinListener _xSpinListener, int _nPosX, int _nPosY, int _nWidth){
- XPropertySet xFFModelPSet = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "FormattedField");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oFFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFormattedFieldModel");
- XMultiPropertySet xFFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFFModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xFFModelMPSet.setPropertyValues(
- new String[] {"EffectiveValue", "Height", "Name", "PositionX", "PositionY", "StrictFormat", "Spin", "Width"},
- new Object[] { new Double(12348), new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)});
-
- xFFModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFFModel);
- // to define a numberformat you always need a locale...
- com.sun.star.lang.Locale aLocale = new com.sun.star.lang.Locale();
- aLocale.Country = "US";
- aLocale.Language = "en";
- // this Format is only compliant to the english locale!
- String sFormatString = "NNNNMMMM DD, YYYY";
-
- // a NumberFormatsSupplier has to be created first "in the open countryside"...
- Object oNumberFormatsSupplier = m_xMCF.createInstanceWithContext("com.sun.star.util.NumberFormatsSupplier", m_xContext);
- XNumberFormatsSupplier xNumberFormatsSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(XNumberFormatsSupplier.class, oNumberFormatsSupplier);
- XNumberFormats xNumberFormats = xNumberFormatsSupplier.getNumberFormats();
- // is the numberformat already defined?
- int nFormatKey = xNumberFormats.queryKey(sFormatString, aLocale, true);
- if (nFormatKey == -1){
- // if not then add it to the NumberFormatsSupplier
- nFormatKey = xNumberFormats.addNew(sFormatString, aLocale);
- }
-
- // The following property may also be set with XMultiPropertySet but we
- // use the XPropertySet interface merely for reasons of demonstration
- xFFModelPSet.setPropertyValue("FormatsSupplier", xNumberFormatsSupplier);
- xFFModelPSet.setPropertyValue("FormatKey", new Integer(nFormatKey));
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oFFModel);
-
- // finally we add a Spin-Listener to the control
- XControl xFFControl = m_xDlgContainer.getControl(sName);
- // add a SpinListener that is notified on each change of the controlvalue...
- XSpinField xSpinField = (XSpinField) UnoRuntime.queryInterface(XSpinField.class, xFFControl);
- xSpinField.addSpinListener(_xSpinListener);
-
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xFFModelPSet;
- }
-
- public void convertUnits(){
- // iXPixelFactor = (int) (100000/xDevice.getInfo().PixelPerMeterX);
- }
-
-
- public XTextComponent insertFileControl(XTextListener _xTextListener, int _nPosX, int _nPosY, int _nWidth){
- XTextComponent xTextComponent = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "FileControl");
-
- // retrieve the configured Work path...
- Object oPathSettings = m_xMCF.createInstanceWithContext("com.sun.star.util.PathSettings",m_xContext);
- XPropertySet xPropertySet = (XPropertySet) com.sun.star.uno.UnoRuntime.queryInterface(XPropertySet.class, oPathSettings);
- String sWorkUrl = (String) xPropertySet.getPropertyValue("Work");
-
- // convert the Url to a system path that is "human readable"...
- Object oFCProvider = m_xMCF.createInstanceWithContext("com.sun.star.ucb.FileContentProvider", m_xContext);
- XFileIdentifierConverter xFileIdentifierConverter = (XFileIdentifierConverter) UnoRuntime.queryInterface(XFileIdentifierConverter.class, oFCProvider);
- String sSystemWorkPath = xFileIdentifierConverter.getSystemPathFromFileURL(sWorkUrl);
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oFCModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFileControlModel");
-
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- XMultiPropertySet xFCModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFCModel);
- xFCModelMPSet.setPropertyValues(
- new String[] {"Height", "Name", "PositionX", "PositionY", "Text", "Width"},
- new Object[] { new Integer(14), sName, new Integer(_nPosX), new Integer(_nPosY), sSystemWorkPath, new Integer(_nWidth)});
-
- // The controlmodel is not really available until inserted to the Dialog container
- m_xDlgModelNameContainer.insertByName(sName, oFCModel);
- XPropertySet xFCModelPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFCModel);
-
- // add a textlistener that is notified on each change of the controlvalue...
- XControl xFCControl = m_xDlgContainer.getControl(sName);
- xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xFCControl);
- XWindow xFCWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xFCControl);
- xTextComponent.addTextListener(_xTextListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xTextComponent;
- }
-
-
- public XButton insertButton(XActionListener _xActionListener, int _nPosX, int _nPosY, int _nWidth, String _sLabel, short _nPushButtonType){
- XButton xButton = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "CommandButton");
-
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oButtonModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlButtonModel");
- XMultiPropertySet xButtonMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oButtonModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xButtonMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "Width" } ,
- new Object[] {new Integer(14), _sLabel, sName, new Integer(_nPosX), new Integer(_nPosY), new Short(_nPushButtonType), new Integer(_nWidth)});
-
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oButtonModel);
- XControl xButtonControl = m_xDlgContainer.getControl(sName);
- xButton = (XButton) UnoRuntime.queryInterface(XButton.class, xButtonControl);
- // An ActionListener will be notified on the activation of the button...
- xButton.addActionListener(_xActionListener);
- } catch (com.sun.star.uno.Exception ex) {
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- return xButton;
- }
-
- /** gets the WindowPeer of a frame
- * @param _XTextDocument the instance of a textdocument
- * @return the windowpeer of the frame
- */
- public XWindowPeer getWindowPeer(XTextDocument _xTextDocument){
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, _xTextDocument);
- XFrame xFrame = xModel.getCurrentController().getFrame();
- XWindow xWindow = xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, xWindow);
- return xWindowPeer;
- }
-
- public XFrame getCurrentFrame(){
- XFrame xRetFrame = null;
- try {
- Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
- XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
- xRetFrame = xDesktop.getCurrentFrame();
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- }
- return xRetFrame;
- }
-
-
- public void textChanged(TextEvent textEvent) {
- try {
- // get the control that has fired the event,
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, textEvent.Source);
- XControlModel xControlModel = xControl.getModel();
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
- String sName = (String) xPSet.getPropertyValue("Name");
- // just in case the listener has been added to several controls,
- // we make sure we refer to the right one
- if (sName.equals("TextField1")){
- String sText = (String) xPSet.getPropertyValue("Text");
- System.out.println(sText);
- // insert your code here to validate the text of the control...
- }
- }catch (com.sun.star.uno.Exception ex){
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
-
- public void up(SpinEvent spinEvent) {
- try {
- // get the control that has fired the event,
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, spinEvent.Source);
- XControlModel xControlModel = xControl.getModel();
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
- String sName = (String) xPSet.getPropertyValue("Name");
- // just in case the listener has been added to several controls,
- // we make sure we refer to the right one
- if (sName.equals("FormattedField1")){
- double fvalue = AnyConverter.toDouble(xPSet.getPropertyValue("EffectiveValue"));
- System.out.println("Controlvalue: " + fvalue);
- // insert your code here to validate the value of the control...
- }
- }catch (com.sun.star.uno.Exception ex){
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
- public void down(SpinEvent spinEvent) {
- }
-
- public void last(SpinEvent spinEvent) {
- }
-
- public void first(SpinEvent spinEvent) {
- }
-
- public void disposing(EventObject rEventObject) {
- }
-
-
- public void actionPerformed(ActionEvent rEvent) {
- try{
- // get the control that has fired the event,
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, rEvent.Source);
- XControlModel xControlModel = xControl.getModel();
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel);
- String sName = (String) xPSet.getPropertyValue("Name");
- // just in case the listener has been added to several controls,
- // we make sure we refer to the right one
- if (sName.equals("CommandButton1")) {
- //...
- }
- }catch (com.sun.star.uno.Exception ex){
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
- public void focusLost(FocusEvent _focusEvent) {
- short nFocusFlags = _focusEvent.FocusFlags;
- int nFocusChangeReason = nFocusFlags & FocusChangeReason.TAB;
- if (nFocusChangeReason == FocusChangeReason.TAB) {
- // get the window of the Window that has gained the Focus...
- // Note that the xWindow is just a representation of the controlwindow
- // but not of the control itself
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, _focusEvent.NextFocus);
- }
- }
-
-
- public void focusGained(FocusEvent focusEvent) {
- }
-
- public void mouseReleased(MouseEvent mouseEvent) {
- }
-
- public void mousePressed(MouseEvent mouseEvent) {
- }
-
- public void mouseExited(MouseEvent mouseEvent) {
- }
-
- public void mouseEntered(MouseEvent _mouseEvent) {
- try {
- // retrieve the control that the event has been invoked at...
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, _mouseEvent.Source);
- Object tk = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, tk);
- // create the peer of the control by passing the windowpeer of the parent
- // in this case the windowpeer of the control
- xControl.createPeer(xToolkit, m_xWindowPeer);
- // create a pointer object "in the open countryside" and set the type accordingly...
- Object oPointer = this.m_xMCF.createInstanceWithContext("com.sun.star.awt.Pointer", this.m_xContext);
- XPointer xPointer = (XPointer) UnoRuntime.queryInterface(XPointer.class, oPointer);
- xPointer.setType(com.sun.star.awt.SystemPointer.REFHAND);
- // finally set the created pointer at the windowpeer of the control
- xControl.getPeer().setPointer(xPointer);
- } catch (com.sun.star.uno.Exception ex) {
- throw new java.lang.RuntimeException("cannot happen...");
- }
- }
-
-
-
- public void itemStateChanged(ItemEvent itemEvent) {
- try{
- // retrieve the control that the event has been invoked at...
- XCheckBox xCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, itemEvent.Source);
- // retrieve the control that we want to disable or enable
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, m_xDlgContainer.getControl("CommandButton1"));
- XPropertySet xModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel());
- short nState = xCheckBox.getState();
- boolean bdoEnable = true;
- switch (nState){
- case 1: // checked
- bdoEnable = true;
- break;
- case 0: // not checked
- case 2: // don't know
- bdoEnable = false;
- break;
- }
- // Alternatively we could have done it also this way:
- // bdoEnable = (nState == 1);
- xModelPropertySet.setPropertyValue("Enabled", new Boolean(bdoEnable));
- }catch (com.sun.star.uno.Exception ex){
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.beans.PropertyVetoException
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-
- public void adjustmentValueChanged(AdjustmentEvent _adjustmentEvent) {
- switch (_adjustmentEvent.Type.getValue()){
- case AdjustmentType.ADJUST_ABS_value:
- System.out.println( "The event has been triggered by dragging the thumb..." );
- break;
- case AdjustmentType.ADJUST_LINE_value:
- System.out.println( "The event has been triggered by a single line move.." );
- break;
- case AdjustmentType.ADJUST_PAGE_value:
- System.out.println( "The event has been triggered by a block move..." );
- break;
- }
- System.out.println( "The value of the scrollbar is: " + _adjustmentEvent.Value);
- }
-
-
-
-// Globally available object variables of the roadmapmodel
- XPropertySet m_xRMPSet;
- XSingleServiceFactory m_xSSFRoadmap;
- XIndexContainer m_xRMIndexCont;
-
- public void addRoadmap(XItemListener _xItemListener) {
- XPropertySet xDialogModelPropertySet = null;
- try {
- // create a unique name by means of an own implementation...
- String sRoadmapName = createUniqueName(m_xDlgModelNameContainer, "Roadmap");
-
- xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
- // Similar to the office assistants the roadmap is adjusted to the height of the dialog
- // where a certain space is left at the bottom for the buttons...
- int nDialogHeight = ((Integer) xDialogModelPropertySet.getPropertyValue("Height")).intValue();
-
- // instantiate the roadmapmodel...
- Object oRoadmapModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlRoadmapModel");
-
- // define the properties of the roadmapmodel
- XMultiPropertySet xRMMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oRoadmapModel);
- xRMMPSet.setPropertyValues( new String[] {"Complete", "Height", "Name", "PositionX", "PositionY", "Text", "Width" },
- new Object[] {Boolean.FALSE, new Integer(nDialogHeight - 26), sRoadmapName, new Integer(0), new Integer(0), "Steps", new Integer(85)});
- m_xRMPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmapModel);
-
- // add the roadmapmodel to the dialog container..
- m_xDlgModelNameContainer.insertByName(sRoadmapName, oRoadmapModel);
-
- // the roadmapmodel is a SingleServiceFactory to instantiate the roadmapitems...
- m_xSSFRoadmap = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmapModel);
- m_xRMIndexCont = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, oRoadmapModel);
-
- // add the itemlistener to the control...
- XControl xRMControl = this.m_xDlgContainer.getControl(sRoadmapName);
- XItemEventBroadcaster xRMBroadcaster = (XItemEventBroadcaster) UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRMControl);
- xRMBroadcaster.addItemListener( getRoadmapItemStateChangeListener() );
- } catch (java.lang.Exception jexception) {
- jexception.printStackTrace(System.out);
- }
- }
-
- /**
- *To fully understand the example one has to be aware that the passed ???Index??? parameter
- * refers to the position of the roadmap item in the roadmapmodel container
- * whereas the variable ???_ID??? directyl references to a certain step of dialog.
- */
- public void insertRoadmapItem(int Index, boolean _bEnabled, String _sLabel, int _ID) {
- try {
- // a roadmap is a SingleServiceFactory that can only create roadmapitems that are the only possible
- // element types of the container
- Object oRoadmapItem = m_xSSFRoadmap.createInstance();
- XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem);
- xRMItemPSet.setPropertyValue("Label", _sLabel);
- // sometimes steps are supposed to be set disabled depending on the program logic...
- xRMItemPSet.setPropertyValue("Enabled", new Boolean(_bEnabled));
- // in this context the "ID" is meant to refer to a step of the dialog
- xRMItemPSet.setPropertyValue("ID", new Integer(_ID));
- m_xRMIndexCont.insertByIndex(Index, oRoadmapItem);
- } catch (com.sun.star.uno.Exception exception) {
- exception.printStackTrace(System.out);
- }
- }
-
-
- public void keyReleased(KeyEvent keyEvent) {
- int i = keyEvent.KeyChar;
- int n = keyEvent.KeyCode;
- int m = keyEvent.KeyFunc;
- }
-
- public void keyPressed(KeyEvent keyEvent) {
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
deleted file mode 100644
index 5e5959b3..00000000
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.awt.PushButtonType;
-import com.sun.star.awt.XControl;
-import com.sun.star.awt.XDialog;
-import com.sun.star.awt.XFixedText;
-import com.sun.star.awt.XListBox;
-import com.sun.star.awt.XWindow;
-import com.sun.star.beans.MethodConcept;
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XIntrospection;
-import com.sun.star.beans.XIntrospectionAccess;
-import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-public class UnoDialogSample2 extends UnoDialogSample {
- XIntrospectionAccess m_xIntrospectionAccess = null;
- Object m_oUnoObject = null;
- // define some constants used to set positions and sizes
- // of controls. For further information see
- // http://ui.openoffice.org/knowledge/DialogSpecificationandGuidelines.odt
- final static int nFixedTextHeight = 8;
- final static int nControlMargin = 6;
- final static int nDialogWidth = 250;
- final static int nDialogHeight = 140;
- // the default roadmap width == 80 MAPs
- final static int nRoadmapWidth = 80;
- final static int nButtonHeight = 14;
- final static int nButtonWidth = 50;
-
-
- public UnoDialogSample2(XComponentContext _xContext, XMultiComponentFactory _xMCF, Object _oUnoObject) {
- super(_xContext, _xMCF);
- try {
- m_oUnoObject = _oUnoObject;
- Object o = m_xMCF.createInstanceWithContext("com.sun.star.beans.Introspection", m_xContext);
- XIntrospection m_xIntrospection = ( XIntrospection ) UnoRuntime.queryInterface(XIntrospection.class, o );
- // the variable m_xIntrospectionAccess offers functionality to access all methods and properties
- // of a variable
- m_xIntrospectionAccess = m_xIntrospection.inspect(_oUnoObject);
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- }
- }
-
- public static void main(String args[]) {
- UnoDialogSample2 oUnoDialogSample2 = null;
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- PropertyValue[] aPropertyValues = new PropertyValue[]{};
- // create an arbitrary Uno-Object - in this case an empty writer document..
- Object oDesktop =xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xContext);
- XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, oDesktop);
- Object oUnoObject = xComponentLoader.loadComponentFromURL("private:factory/swriter", "_default", 0, aPropertyValues);
-
- // define some coordinates where to position the controls
- final int nButtonPosX = (int)((nDialogWidth/2) - (nButtonWidth/2));
- final int nButtonPosY = nDialogHeight - nButtonHeight - nControlMargin;
- final int nControlPosX = nRoadmapWidth + 2*nControlMargin;
- final int nControlWidth = nDialogWidth - 3*nControlMargin - nRoadmapWidth;
- final int nListBoxHeight = nDialogHeight - 4*nControlMargin - nButtonHeight;
- oUnoDialogSample2 = new UnoDialogSample2(xContext, xMCF, oUnoObject);
- oUnoDialogSample2.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(nDialogHeight), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Inspect a Uno-Object", new Integer(nDialogWidth)});
- String sIntroLabel = "This Dialog lists information about a given Uno-Object.\nIt offers a view to inspect all suppported servicenames, exported interfaces, methods and properties.";
- oUnoDialogSample2.insertMultiLineFixedText(nControlPosX, 27, nControlWidth, 4, 1, sIntroLabel);
- // get the data from the UNO object...
- String[] sSupportedServiceNames = oUnoDialogSample2.getSupportedServiceNames();
- String[] sInterfaceNames = oUnoDialogSample2.getExportedInterfaceNames();
- String[] sMethodNames = oUnoDialogSample2.getMethodNames();
- String[] sPropertyNames = oUnoDialogSample2.getPropertyNames();
- // add controls to the dialog...
- oUnoDialogSample2.insertListBox(nControlPosX, nControlMargin, nListBoxHeight, nControlWidth, 2, sSupportedServiceNames);
- oUnoDialogSample2.insertListBox(nControlPosX, nControlMargin, nListBoxHeight, nControlWidth, 3, sInterfaceNames);
- oUnoDialogSample2.insertListBox(nControlPosX, nControlMargin, nListBoxHeight, nControlWidth, 4, sMethodNames);
- oUnoDialogSample2.insertListBox(nControlPosX, nControlMargin, nListBoxHeight, nControlWidth, 5, sPropertyNames);
- oUnoDialogSample2.insertButton(oUnoDialogSample2, nButtonPosX, nButtonPosY, nButtonWidth, "~Close", (short) PushButtonType.OK_value);
- oUnoDialogSample2.insertHorizontalFixedLine(0, nButtonPosY - nControlMargin - 4, nDialogWidth, "");
- // create the windowpeer;
- // it must be kept in mind that it must be created after the insertion of the controls
- // (see http://qa.openoffice.org/issues/show_bug.cgi?id=75129)
- oUnoDialogSample2.createWindowPeer();
- // add the roadmap control. Note that the roadmap may not be created before the windowpeer of the dialog exists
- // (see http://qa.openoffice.org/issues/show_bug.cgi?id=67369)
- oUnoDialogSample2.addRoadmap(oUnoDialogSample2.getRoadmapItemStateChangeListener());
- oUnoDialogSample2.insertRoadmapItem(0, true, "Introduction", 1);
- oUnoDialogSample2.insertRoadmapItem(1, true, "Supported Services", 2);
- oUnoDialogSample2.insertRoadmapItem(2, true, "Interfaces", 3);
- oUnoDialogSample2.insertRoadmapItem(3, true, "Methods", 4);
- oUnoDialogSample2.insertRoadmapItem(4, true, "Properties", 5);
- oUnoDialogSample2.m_xRMPSet.setPropertyValue("CurrentItemID", new Short((short) 1));
- oUnoDialogSample2.m_xRMPSet.setPropertyValue("Complete", Boolean.TRUE);
- oUnoDialogSample2.xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, oUnoDialogSample2.m_xDialogControl);
- oUnoDialogSample2.xDialog.execute();
- }catch( Exception ex ) {
- ex.printStackTrace(System.out);
- }
- finally{
- //make sure always to dispose the component and free the memory!
- if (oUnoDialogSample2 != null){
- if (oUnoDialogSample2.m_xComponent != null){
- oUnoDialogSample2.m_xComponent.dispose();
- }
- }
- }
-
- System.exit( 0 );
- }
-
-
- public String[] getMethodNames() {
- String[] sMethodNames = new String[]{};
- try {
- XIdlMethod[] xIdlMethods = m_xIntrospectionAccess.getMethods(MethodConcept.ALL);
- sMethodNames = new String[xIdlMethods.length];
- for (int i = 0; i < xIdlMethods.length; i++){
- sMethodNames[i] = xIdlMethods[i].getName();
- }
- }
- catch( Exception e ) {
- System.err.println( e );
- }
- return sMethodNames;
- }
-
- // returns the names of all supported servicenames of a UNO object
- public String[] getSupportedServiceNames() {
- String[] sSupportedServiceNames = new String[]{};
- // If the Uno-Object supports "com.sun.star.lang.XServiceInfo"
- // this will give access to all supported servicenames
- XServiceInfo xServiceInfo = ( XServiceInfo ) UnoRuntime.queryInterface( XServiceInfo.class, m_oUnoObject);
- if ( xServiceInfo != null ) {
- sSupportedServiceNames = xServiceInfo.getSupportedServiceNames();
- }
- return sSupportedServiceNames;
- }
-
- // returns the names of all properties of a UNO object
- protected String[] getPropertyNames() {
- String[] sPropertyNames = new String[]{};
- try {
- Property[] aProperties = m_xIntrospectionAccess.getProperties(com.sun.star.beans.PropertyConcept.ATTRIBUTES + com.sun.star.beans.PropertyConcept.PROPERTYSET);
- sPropertyNames = new String[aProperties.length];
- for (int i = 0; i < aProperties.length; i++){
- sPropertyNames[i] = aProperties[i].Name;
- }
- }
- catch( Exception e ) {
- System.err.println( e );
- }
- return sPropertyNames;
- }
-
-
- // returns the names of all exported interfaces of a UNO object
- protected String[] getExportedInterfaceNames(){
- Type[] aTypes = new Type[]{};
- String[] sTypeNames = new String[]{};
- // The XTypeProvider interfaces offers access to all exported interfaces
- XTypeProvider xTypeProvider = ( XTypeProvider ) UnoRuntime.queryInterface( XTypeProvider.class, m_oUnoObject);
- if ( xTypeProvider != null ) {
- aTypes = xTypeProvider.getTypes();
- sTypeNames = new String[aTypes.length];
- for (int i = 0; i < aTypes.length - 1; i++){
- sTypeNames[i] = aTypes[i].getTypeName();
- }
- }
- return sTypeNames;
- }
-
-
-
- public XListBox insertListBox(int _nPosX, int _nPosY, int _nHeight, int _nWidth, int _nStep, String[] _sStringItemList) {
- XListBox xListBox = null;
- try{
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "ListBox");
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oListBoxModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlListBoxModel");
- XMultiPropertySet xLBModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oListBoxModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xLBModelMPSet.setPropertyValues(
- new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "ReadOnly", "Step", "StringItemList", "Width" } ,
- new Object[] {Boolean.FALSE, new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, new Integer(_nStep), _sStringItemList, new Integer(_nWidth)});
- m_xDlgModelNameContainer.insertByName(sName, xLBModelMPSet);
- }catch (com.sun.star.uno.Exception ex) {
- throw new java.lang.RuntimeException("cannot happen...");
- }
- return xListBox;
- }
-
-
- public void insertMultiLineFixedText(int _nPosX, int _nPosY, int _nWidth, int _nLineCount, int _nStep, String _sLabel) {
- try {
- // create a unique name by means of an own implementation...
- String sName = createUniqueName(m_xDlgModelNameContainer, "Label");
- int nHeight = _nLineCount * nFixedTextHeight;
- // create a controlmodel at the multiservicefactory of the dialog model...
- Object oFTModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xFTModelMPSet.setPropertyValues(
- new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "Width"},
- new Object[] { new Integer(nHeight), _sLabel, Boolean.TRUE, sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), new Integer(_nWidth)});
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oFTModel);
- }catch (com.sun.star.uno.Exception ex){
- /* perform individual exception handling here.
- * Possible exception types are:
- * com.sun.star.lang.IllegalArgumentException,
- * com.sun.star.lang.WrappedTargetException,
- * com.sun.star.container.ElementExistException,
- * com.sun.star.beans.PropertyVetoException,
- * com.sun.star.beans.UnknownPropertyException,
- * com.sun.star.uno.Exception
- */
- ex.printStackTrace(System.out);
- }
- }
-
-}// end of class
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu.java b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
deleted file mode 100644
index 0bd29dfd..00000000
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu.java
+++ /dev/null
@@ -1,167 +0,0 @@
-import com.sun.star.awt.MenuEvent;
-import com.sun.star.awt.MenuItemStyle;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.WindowAttribute;
-import com.sun.star.awt.WindowClass;
-import com.sun.star.awt.XMenuBar;
-import com.sun.star.awt.XMenuExtended;
-import com.sun.star.awt.XMenuListener;
-import com.sun.star.awt.XPopupMenu;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XTopWindow;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XFramesSupplier;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-public class UnoMenu extends UnoDialogSample implements XMenuListener {
-private XTopWindow mxTopWindow = null;
-
-public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
- super(_xContext, _xMCF);
-}
-
- public static void main(String args[]){
- UnoMenu oUnoMenu = null;
- XComponent xComponent = null;
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- oUnoMenu = new UnoMenu(xContext, xMCF);
- oUnoMenu.mxTopWindow = oUnoMenu.showTopWindow( new Rectangle(100, 100, 500, 500)); //oUnoDialogSample.m_xWindowPeer,
- oUnoMenu.addMenuBar(oUnoMenu.mxTopWindow, oUnoMenu);
- }catch( Exception ex ) {
- ex.printStackTrace(System.out);
- }
- }
-
-
- public XPopupMenu getPopupMenu(){
- XPopupMenu xPopupMenu = null;
- try{
- // create a popup menu
- Object oPopupMenu = m_xMCF.createInstanceWithContext("stardiv.Toolkit.VCLXPopupMenu", m_xContext);
- xPopupMenu = (XPopupMenu) UnoRuntime.queryInterface(XPopupMenu.class, oPopupMenu);
- XMenuExtended xMenuExtended = (XMenuExtended) UnoRuntime.queryInterface(XMenuExtended.class, xPopupMenu);
-
- xPopupMenu.insertItem((short) 0, "~First Entry", MenuItemStyle.AUTOCHECK, (short) 0);
- xPopupMenu.insertItem((short) 1, "First ~Radio Entry", (short) (MenuItemStyle.RADIOCHECK + MenuItemStyle.AUTOCHECK), (short) 1);
- xPopupMenu.insertItem((short) 2, "~Second Radio Entry", (short) (MenuItemStyle.RADIOCHECK + MenuItemStyle.AUTOCHECK), (short) 2);
- xPopupMenu.insertItem((short) 3, "~Third RadioEntry",(short) (MenuItemStyle.RADIOCHECK + MenuItemStyle.AUTOCHECK), (short) 3);
- xPopupMenu.insertSeparator((short)4);
- xPopupMenu.insertItem((short) 4, "F~ifth Entry", (short) (MenuItemStyle.CHECKABLE + MenuItemStyle.AUTOCHECK), (short) 5);
- xPopupMenu.insertItem((short) 5, "~Fourth Entry", (short) (MenuItemStyle.CHECKABLE + MenuItemStyle.AUTOCHECK), (short) 6);
- xPopupMenu.enableItem((short) 1, false);
- xPopupMenu.insertItem((short) 6, "~Sixth Entry", (short) 0, (short) 7);
- xPopupMenu.insertItem((short) 7, "~Close Dialog", (short) 0, (short) 8);
- xPopupMenu.checkItem((short) 2, true);
- xPopupMenu.addMenuListener(this);
- }catch( Exception e ) {
- throw new java.lang.RuntimeException("cannot happen...");
- }
- return xPopupMenu;
- }
-
-
- public void addMenuBar(XTopWindow _xTopWindow, XMenuListener _xMenuListener){
- try{
- // create a menubar at the global MultiComponentFactory...
- Object oMenuBar = m_xMCF.createInstanceWithContext("stardiv.Toolkit.VCLXMenuBar", m_xContext);
- // add the menu items...
- XMenuBar xMenuBar = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class, oMenuBar);
- xMenuBar.insertItem((short) 0, "~First MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 0);
- xMenuBar.insertItem((short) 1, "~Second MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 1);
- xMenuBar.setPopupMenu((short) 0, getPopupMenu());
- xMenuBar.addMenuListener(_xMenuListener);
- _xTopWindow.setMenuBar(xMenuBar);
- }catch( Exception e ) {
- throw new java.lang.RuntimeException("cannot happen...");
- }}
-
- protected void closeDialog(){
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, mxTopWindow);
- if (xComponent != null){
- xComponent.dispose();
- }
-
- // to ensure that the Java application terminates
- System.exit( 0 );
- }
-
- public XTopWindow showTopWindow( Rectangle _aRectangle){
- XTopWindow xTopWindow = null;
- try {
- // The Toolkit is the creator of all windows...
- Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
- XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, oToolkit);
-
- // set up a window description and create the window. A parent window is always necessary for this...
- com.sun.star.awt.WindowDescriptor aWindowDescriptor = new com.sun.star.awt.WindowDescriptor();
- // a TopWindow is contains a title bar and is able to inlude menus...
- aWindowDescriptor.Type = WindowClass.TOP;
- // specify the position and height of the window on the parent window
- aWindowDescriptor.Bounds = _aRectangle;
- // set the window attributes...
- aWindowDescriptor.WindowAttributes = WindowAttribute.SHOW + WindowAttribute.MOVEABLE + WindowAttribute.SIZEABLE + WindowAttribute.CLOSEABLE;
-
- // create the window...
- XWindowPeer xWindowPeer = xToolkit.createWindow(aWindowDescriptor);
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xWindowPeer);
-
- // create a frame and initialize it with the created window...
- Object oFrame = m_xMCF.createInstanceWithContext("com.sun.star.frame.Frame", m_xContext);
- m_xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oFrame);
-
- Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
- XFramesSupplier xFramesSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, oDesktop);
- m_xFrame.setCreator(xFramesSupplier);
- // get the XTopWindow interface..
- xTopWindow = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, xWindow);
- } catch (com.sun.star.lang.IllegalArgumentException ex) {
- ex.printStackTrace();
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- }
- return xTopWindow;
- }
-
- public void addMenuBar(XWindow _xWindow){
- XTopWindow xTopWindow = (XTopWindow) UnoRuntime.queryInterface(XTopWindow.class, _xWindow);
- addMenuBar(xTopWindow, this);
- }
-
- public void select(MenuEvent menuEvent){
- // find out which menu item has been triggered,
- // by getting the menu-id...
- switch (menuEvent.MenuId){
- case 0:
- // add your menu-item-specific code here:
- break;
- case 1:
- // add your menu-item-specific code here:
- break;
- case 7:
- closeDialog();
- default:
- //..
- }
- }
-
- public void highlight(MenuEvent menuEvent) {
- int i = 0;
- }
-
- public void deactivate(MenuEvent menuEvent) {
- int i = 0; }
-
- public void activate(MenuEvent menuEvent) {
- int i = 0;
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
deleted file mode 100644
index cc25d0d9..00000000
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
+++ /dev/null
@@ -1,95 +0,0 @@
-import com.sun.star.awt.MouseEvent;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.XControl;
-import com.sun.star.awt.XMouseListener;
-import com.sun.star.awt.XTopWindow;
-import com.sun.star.awt.XWindow;
-import com.sun.star.beans.XMultiPropertySet;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-public class UnoMenu2 extends UnoMenu implements XMouseListener{
-
-public UnoMenu2(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
- super(_xContext, _xMCF);
-}
-
- public static void main(String args[]){
- UnoMenu2 oUnoMenu2 = null;
- try {
- XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if(xContext != null )
- System.out.println("Connected to a running office ...");
- XMultiComponentFactory xMCF = xContext.getServiceManager();
- oUnoMenu2 = new UnoMenu2(xContext, xMCF);
- oUnoMenu2.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(140), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Menu-Dialog", new Integer(200)});
-
- Object oFTHeaderModel = oUnoMenu2.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTHeaderModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
- xFTHeaderModelMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "This code-sample demonstrates the creation of a popup-menu", "HeaderLabel", new Integer(6), new Integer(6), new Integer(200)});
- // add the model to the NameContainer of the dialog model
- oUnoMenu2.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
- oUnoMenu2.addLabelForPopupMenu();
- oUnoMenu2.executeDialog();
- }catch( Exception ex ) {
- ex.printStackTrace(System.out);
- }
- finally{
- //make sure always to dispose the component and free the memory!
- if (oUnoMenu2 != null) {
- if (oUnoMenu2.m_xComponent != null){
- oUnoMenu2.m_xComponent.dispose();
- }
- }
- System.exit( 0 );
- }}
-
-
- public void addLabelForPopupMenu(){
- try{
- String sName = "lblPopup";
- Object oFTModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
- XMultiPropertySet xFTModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFTModel);
- // Set the properties at the model - keep in mind to pass the property names in alphabetical order!
- xFTModelMPSet.setPropertyValues(
- new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "Right-click here", sName, new Integer(50), new Integer(50), new Integer(100)});
- // add the model to the NameContainer of the dialog model
- m_xDlgModelNameContainer.insertByName(sName, oFTModel);
- XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer.getControl(sName));
- xWindow.addMouseListener(this);
- }catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- }}
-
- protected void closeDialog(){
- xDialog.endExecute();
- }
-
- public void mouseReleased(MouseEvent mouseEvent) {
- }
-
- public void mousePressed(MouseEvent mouseEvent) {
- if (mouseEvent.PopupTrigger){
- Rectangle aRectangle = new Rectangle(mouseEvent.X, mouseEvent.Y, 0, 0);
- XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, mouseEvent.Source);
- getPopupMenu().execute( xControl.getPeer(), aRectangle, com.sun.star.awt.PopupMenuDirection.DEFAULT);
- }
- }
-
- public void mouseExited(MouseEvent mouseEvent) {
- }
-
- public void mouseEntered(MouseEvent mouseEvent) {
- }
-
- public void disposing(EventObject eventObject) {
- }
-}
diff --git a/odk/examples/DevelopersGuide/GUI/oologo.gif b/odk/examples/DevelopersGuide/GUI/oologo.gif
deleted file mode 100644
index eb5e679c..00000000
--- a/odk/examples/DevelopersGuide/GUI/oologo.gif
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/OfficeBean/Makefile b/odk/examples/DevelopersGuide/OfficeBean/Makefile
deleted file mode 100644
index 5aab7ead..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OOoBean of the Developers Guide
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-
-# Define non-platform/compiler specific settings
-OUT_COMP_CLASS = $(OUT_CLASS)/OOoBeanViewer
-
-# normally the idl file should be stored in a directory tree fitting the module structure,
-# for the example we know the module structure
-PACKAGE = com/sun/star/comp/beans
-
-JAVAFILES = \
- OOoBeanViewer.java \
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/$(PACKAGE)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(URE_CLASSES_DIR)/jurt.jar\
- $(PATH_SEPARATOR)$(URE_CLASSES_DIR)/ridl.jar\
- $(PATH_SEPARATOR)$(URE_CLASSES_DIR)/juh.jar\
- $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/unoil.jar\
- $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/officebean.jar\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- OOoBeanViewer
-
-include $(SETTINGS)/stdtarget.mk
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- javac $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-OOoBeanViewer: $(CLASSFILES)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) OOoBeanViewer.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(CLASSFILES)
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
-
-%.dbg: $(JAR1_JAR)
- jdb -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-
diff --git a/odk/examples/DevelopersGuide/OfficeBean/OOoBeanViewer.java b/odk/examples/DevelopersGuide/OfficeBean/OOoBeanViewer.java
deleted file mode 100644
index 886016f7..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/OOoBeanViewer.java
+++ /dev/null
@@ -1,407 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-package com.sun.star.comp.beans;
-
-import javax.swing.filechooser.*;
-import javax.swing.*;
-import java.io.*;
-
-/** A simple Applet that contains the SimpleBean.
- *
- * This applet is a sample implementation of the
- * OpenOffice.org bean.
- * When initally loaded the applet has two buttons
- * one for opening an existant file and one to open
- * a blank document of a given type supported by
- * OpenOffice.org eg. Writer, Calc, Impress, .....
- *
- */
-
-public class OOoBeanViewer extends java.applet.Applet
-{
-
- /**
- * Private variables declaration - GUI components
- */
- private java.awt.Panel rightPanel;
- private java.awt.Panel bottomPanel;
- private javax.swing.JButton closeButton;
- private javax.swing.JButton terminateButton;
- private javax.swing.JButton newDocumentButton;
- private javax.swing.JPopupMenu documentTypePopUp;
- private javax.swing.JCheckBox menuBarButton;
- private javax.swing.JCheckBox mainBarButton;
- private javax.swing.JCheckBox toolBarButton;
- private javax.swing.JCheckBox statusBarButton;
- private javax.swing.JButton storeDocumentButton;
- private javax.swing.JButton loadDocumentButton;
- private javax.swing.JButton syswinButton;
- private JTextField documentURLTextField;
- private JMenuItem item;
- private JFileChooser fileChooser;
- private byte buffer[];
-
- /**
- * Private variables declaration - SimpleBean variables
- */
- private OOoBean aBean;
-
- /**
- * Initialize the Appplet
- */
- public void init()
- {
- //The aBean needs to be initialized to add it to the applet
- aBean = new OOoBean();
-
- //Initialize GUI components
- rightPanel = new java.awt.Panel();
- bottomPanel = new java.awt.Panel();
- closeButton = new javax.swing.JButton("close");
- terminateButton = new javax.swing.JButton("terminate");
- newDocumentButton = new javax.swing.JButton("new document...");
- documentTypePopUp = new javax.swing.JPopupMenu();
- storeDocumentButton = new javax.swing.JButton("store to buffer");
- loadDocumentButton = new javax.swing.JButton("load from buffer");
- syswinButton = new javax.swing.JButton("release/aquire");
-
- menuBarButton = new javax.swing.JCheckBox("MenuBar");
- menuBarButton.setSelected( aBean.isMenuBarVisible() );
-
- mainBarButton = new javax.swing.JCheckBox("MainBar");
- mainBarButton.setSelected( aBean.isStandardBarVisible() );
-
- toolBarButton = new javax.swing.JCheckBox("ToolBar");
- toolBarButton.setSelected( aBean.isToolBarVisible() );
-
- statusBarButton = new javax.swing.JCheckBox("StatusBar");
- statusBarButton.setSelected( aBean.isStatusBarVisible() );
-
- documentURLTextField = new javax.swing.JTextField();
-
- //Set up the Popup Menu to create a blank document
- documentTypePopUp.setToolTipText("Create an empty document");
-
- item = documentTypePopUp.add("Text Document");
- item.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- createBlankDoc("private:factory/swriter",
- "New text document");
- }
- });
-
- item = documentTypePopUp.add("Presentation Document");
- item.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- createBlankDoc("private:factory/simpress",
- "New presentation document");
- }
- });
-
- item = documentTypePopUp.add("Drawing Document");
- item.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- createBlankDoc("private:factory/sdraw",
- "New drawing document");
- }
- });
-
- item = documentTypePopUp.add("Formula Document");
- item.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- createBlankDoc("private:factory/smath",
- "New formula document");
- }
- });
-
- item = documentTypePopUp.add("Spreadsheet Document");
- item.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- createBlankDoc("private:factory/scalc",
- "New spreadsheet document");
- }
- });
-
- syswinButton.addActionListener(
- new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- try
- {
- aBean.releaseSystemWindow();
- aBean.aquireSystemWindow();
- }
- catch ( com.sun.star.comp.beans.NoConnectionException aExc )
- {}
- catch ( com.sun.star.comp.beans.SystemWindowException aExc )
- {}
- }
- });
-
- storeDocumentButton.addActionListener(
- new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- try
- {
- buffer = aBean.storeToByteArray( null, null );
- }
- catch ( Throwable aExc )
- {
- System.err.println( "storeToBuffer failed: " + aExc );
- aExc.printStackTrace( System.err );
- }
- }
- });
-
- loadDocumentButton.addActionListener(
- new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- try
- {
- aBean.loadFromByteArray( buffer, null );
- }
- catch ( Throwable aExc )
- {
- System.err.println( "loadFromBuffer failed: " + aExc );
- aExc.printStackTrace( System.err );
- }
- }
- });
-
- closeButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- close();
- }
- });
-
- terminateButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- terminate();
- }
- });
-
- newDocumentButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- documentTypePopUp.show((java.awt.Component)evt.getSource(), 0,0);
- }
- });
-
- menuBarButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- aBean.setMenuBarVisible( !aBean.isMenuBarVisible() );
- }
- });
-
- mainBarButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- aBean.setStandardBarVisible( !aBean.isStandardBarVisible() );
- }
- });
-
- toolBarButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- aBean.setToolBarVisible( !aBean.isToolBarVisible() );
- }
- });
-
- statusBarButton.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- aBean.setStatusBarVisible( !aBean.isStatusBarVisible() );
- }
- });
-
- documentURLTextField.setEditable(false);
- documentURLTextField.setPreferredSize(new java.awt.Dimension(200, 30));
-
- rightPanel.setLayout( new java.awt.GridLayout(10,1) );
- rightPanel.add(closeButton);
- rightPanel.add(terminateButton);
- rightPanel.add(newDocumentButton);
- rightPanel.add(storeDocumentButton);
- rightPanel.add(loadDocumentButton);
- rightPanel.add(syswinButton);
- rightPanel.add(menuBarButton);
- rightPanel.add(mainBarButton);
- rightPanel.add(toolBarButton);
- rightPanel.add(statusBarButton);
-
- //bottomPanel.setLayout( new java.awt.GridLayout(1,1) );
- bottomPanel.setLayout( new java.awt.BorderLayout() );
- bottomPanel.add(documentURLTextField);
-
- setLayout(new java.awt.BorderLayout());
-
- add(aBean, java.awt.BorderLayout.CENTER);
- add(rightPanel, java.awt.BorderLayout.EAST);
- add(bottomPanel, java.awt.BorderLayout.SOUTH);
- }
-
- /**
- * Create a blank document of type <code>desc</code>
- *
- * @param url The private internal URL of the OpenOffice.org
- * document describing the document
- * @param desc A description of the document to be created
- */
- private void createBlankDoc(String url, String desc)
- {
- //Create a blank document
- try
- {
- documentURLTextField.setText(desc);
- //Get the office process to load the URL
- aBean.loadFromURL( url, null );
-
- aBean.aquireSystemWindow();
- }
- catch ( com.sun.star.comp.beans.SystemWindowException aExc )
- {
- System.err.println( "OOoBeanViewer.1:" );
- aExc.printStackTrace();
- }
- catch ( com.sun.star.comp.beans.NoConnectionException aExc )
- {
- System.err.println( "OOoBeanViewer.2:" );
- aExc.printStackTrace();
- }
- catch ( Exception aExc )
- {
- System.err.println( "OOoBeanViewer.3:" );
- aExc.printStackTrace();
- //return;
- }
- }
-
- /** closes the bean viewer, leaves OOo running.
- */
- private void close()
- {
- setVisible(false);
- aBean.stopOOoConnection();
- stop();
- System.exit(0);
- }
-
- /** closes the bean viewer and tries to terminate OOo.
- */
- private void terminate()
- {
- setVisible(false);
- com.sun.star.frame.XDesktop xDesktop = null;
- try {
- xDesktop = aBean.getOOoDesktop();
- }
- catch ( com.sun.star.comp.beans.NoConnectionException aExc ) {} // ignore
- aBean.stopOOoConnection();
- stop();
- if ( xDesktop != null )
- xDesktop.terminate();
- System.exit(0);
- }
-
- /**
- * An ExitListener listening for windowClosing events
- */
- private class ExitListener extends java.awt.event.WindowAdapter
- {
- /**
- * windowClosed
- *
- * @param e A WindowEvent for a closed Window event
- */
- public void windowClosed( java.awt.event.WindowEvent e)
- {
- close();
- }
-
- /**
- * windowClosing for a closing window event
- *
- * @param e A WindowEvent for a closing window event
- */
- public void windowClosing( java.awt.event.WindowEvent e)
- {
- ((java.awt.Window)e.getSource()).dispose();
- }
- }
-
- public static void main(String args[])
- {
- java.awt.Frame frame = new java.awt.Frame("OpenOffice.org Demo");
- OOoBeanViewer aViewer = new OOoBeanViewer();
-
- frame.setLayout(new java.awt.BorderLayout());
-
- frame.addWindowListener( aViewer.new ExitListener() );
-
- aViewer.init();
- aViewer.start();
-
- frame.add(aViewer);
- frame.setLocation( 200, 200 );
- frame.setSize( 800, 480 );
- frame.show();
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor16.jpg b/odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor16.jpg
deleted file mode 100644
index cd9c5a60..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor16.jpg
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor32.jpg b/odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor32.jpg
deleted file mode 100644
index ccab06b5..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconColor32.jpg
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono16.jpg b/odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono16.jpg
deleted file mode 100644
index cd9c5a60..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono16.jpg
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono32.jpg b/odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono32.jpg
deleted file mode 100644
index ccab06b5..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/OfficeIconMono32.jpg
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/OfficeBean/makefile.mk b/odk/examples/DevelopersGuide/OfficeBean/makefile.mk
deleted file mode 100644
index 4d56dbe7..00000000
--- a/odk/examples/DevelopersGuide/OfficeBean/makefile.mk
+++ /dev/null
@@ -1,68 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-OFFICEBEAN_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeBean$/OOoBeanViewer.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeBean$/OfficeIconColor16.jpg \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeBean$/OfficeIconColor32.jpg \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeBean$/OfficeIconMono16.jpg \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeBean$/OfficeIconMono32.jpg \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeBean$/Makefile
-
-DIR_FILE_LIST= \
- $(OFFICEBEAN_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_officebean_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_officebean.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
deleted file mode 100644
index 82127e70..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Clipboard.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.datatransfer.DataFlavor;
-import com.sun.star.datatransfer.UnsupportedFlavorException;
-import com.sun.star.datatransfer.XTransferable;
-import com.sun.star.datatransfer.clipboard.XClipboard;
-import com.sun.star.datatransfer.clipboard.XClipboardNotifier;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.AnyConverter;
-
-//-------------------------------------------------
-// Demonstrates the usage of the clipboard service
-//-------------------------------------------------
-
-public class Clipboard
-{
- public static void main(String[] args)
- {
- try
- {
- // get the remote office context. If necessary a new office
- // process is started
- XComponentContext xOfficeContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- // get the service manager from the office context
- XMultiComponentFactory xServiceManager =
- xOfficeContext.getServiceManager();
-
- // create a new test document
- Object oDesktop = xServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xOfficeContext);
-
- XComponentLoader xCompLoader =(XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, oDesktop);
-
- com.sun.star.lang.XComponent xComponent =
- xCompLoader.loadComponentFromURL("private:factory/swriter",
- "_blank", 0, new com.sun.star.beans.PropertyValue[0]);
- {
- XTextDocument xDoc =(XTextDocument)
- UnoRuntime.queryInterface(XTextDocument.class, xComponent);
- xDoc.getText().setString("In the first step, paste the current content of the clipboard in the document!\nThe text \"Hello world!\" shall be insert at the current cursor position below.\n\nIn the second step, please select some words and put it into the clipboard! ...\n\nCurrent clipboard content = ");
-
- // ensure that the document content is optimal visible
- com.sun.star.frame.XModel xModel =
- (com.sun.star.frame.XModel)UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class, xDoc);
- // get the frame for later usage
- com.sun.star.frame.XFrame xFrame =
- xModel.getCurrentController().getFrame();
-
- com.sun.star.view.XViewSettingsSupplier xViewSettings =
- (com.sun.star.view.XViewSettingsSupplier)UnoRuntime.queryInterface(
- com.sun.star.view.XViewSettingsSupplier.class,
- xModel.getCurrentController());
- xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
- }
- // test document will be closed later
-
- Object oClipboard = xServiceManager.createInstanceWithContext(
- "com.sun.star.datatransfer.clipboard.SystemClipboard",
- xOfficeContext);
-
- XClipboard xClipboard = (XClipboard)
- UnoRuntime.queryInterface(XClipboard.class, oClipboard);
-
- //---------------------------------------------------
- // registering as clipboard listener
- //---------------------------------------------------
-
- XClipboardNotifier xClipNotifier = (XClipboardNotifier)
- UnoRuntime.queryInterface(XClipboardNotifier.class, oClipboard);
-
- ClipboardListener aClipListener= new ClipboardListener();
-
- xClipNotifier.addClipboardListener(aClipListener);
-
- // Read ClipBoard
- readClipBoard(xClipboard);
-
- //---------------------------------------------------
- // becoming a clipboard owner
- //---------------------------------------------------
-
- System.out.println("Becoming a clipboard owner...");
- System.out.println("");
-
- ClipboardOwner aClipOwner = new ClipboardOwner();
- xClipboard.setContents(new TextTransferable("Hello World!"), aClipOwner);
- int iFirst = 0;
-
- while (aClipOwner.isClipboardOwner())
- {
- if (iFirst != 2) {
- if (iFirst == 1) {
- System.out.println("Change clipboard ownership by putting something into the clipboard!\n");
- System.out.print("Still clipboard owner...");
- } else {
- System.out.println("Still clipboard owner...");
- }
- ++iFirst;
- } else {
- System.out.print(".");
- }
- Thread.sleep(1000);
- }
-
- // Read ClipBoard again
- readClipBoard(xClipboard);
-
- //---------------------------------------------------
- // unregistering as clipboard listener
- //---------------------------------------------------
- xClipNotifier.removeClipboardListener(aClipListener);
-
- // close test document
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class,
- xComponent );
-
- if (xCloseable != null ) {
- xCloseable.close(false);
- } else
- {
- xComponent.dispose();
- }
-
- System.exit(0);
- }
- catch( Exception ex )
- {
- ex.printStackTrace();
- }
- }
-
- public static void readClipBoard(XClipboard xClipboard)
- throws java.lang.Exception
- {
- //---------------------------------------------------
- // get a list of formats currently on the clipboard
- //---------------------------------------------------
-
- XTransferable xTransferable = xClipboard.getContents();
-
- DataFlavor[] aDflvArr = xTransferable.getTransferDataFlavors();
-
- // print all available formats
-
- System.out.println("Reading the clipboard...");
- System.out.println("Available clipboard formats:");
-
- DataFlavor aUniFlv = null;
-
- for (int i=0;i<aDflvArr.length;i++)
- {
- System.out.println( "MimeType: " +
- aDflvArr[i].MimeType +
- " HumanPresentableName: " +
- aDflvArr[i].HumanPresentableName );
-
- // if there is the format unicode text on the clipboard save the
- // corresponding DataFlavor so that we can later output the string
-
- if ( aDflvArr[i].MimeType.equals("text/plain;charset=utf-16") )
- {
- aUniFlv = aDflvArr[i];
- }
- }
-
- System.out.println("");
-
- try
- {
- if (aUniFlv != null)
- {
- System.out.print("Unicode text on the clipboard ...\nYour selected text \"");
- Object aData = xTransferable.getTransferData(aUniFlv);
- System.out.println(AnyConverter.toString(aData)
- + "\" is now in the clipboard.\n");
- }
- }
- catch( UnsupportedFlavorException ex )
- {
- System.err.println( "Requested format is not available on the clipboard!" );
- ex.printStackTrace();
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java
deleted file mode 100644
index b858ddcf..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardListener.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.EventObject;
-import com.sun.star.datatransfer.clipboard.ClipboardEvent;
-import com.sun.star.datatransfer.clipboard.XClipboardListener;
-
-//-----------------------------
-// A simple clipboard listener
-//-----------------------------
-
-public class ClipboardListener implements XClipboardListener
-{
- public void disposing(EventObject event)
- {
- }
-
- public void changedContents(ClipboardEvent event)
- {
- System.out.println("");
- System.out.println("Clipboard content has changed!");
- System.out.println("");
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java
deleted file mode 100644
index 46137bbb..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/ClipboardOwner.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.datatransfer.XTransferable;
-import com.sun.star.datatransfer.clipboard.XClipboard;
-import com.sun.star.datatransfer.clipboard.XClipboardOwner;
-
-//--------------------------
-// A simple clipboard owner
-//--------------------------
-
-public class ClipboardOwner implements XClipboardOwner
-{
- public void lostOwnership( XClipboard xClipboard, XTransferable xTransferable )
- {
- System.out.println("");
- System.out.println( "Lost clipboard ownership..." );
- System.out.println("");
-
- isowner = false;
- }
-
- public boolean isClipboardOwner()
- {
- return isowner;
- }
-
- private boolean isowner = true;
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Makefile b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Makefile
deleted file mode 100644
index 6c7b7c54..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevClipboard example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevClipboardExample
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=Clipboard
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-APP1_JAVAFILES = \
- Clipboard.java \
- ClipboardListener.java \
- ClipboardOwner.java \
- TextTransferable.java
-
-APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP1_JAVAFILES))
-APP1_CLASSNAMES = $(patsubst %.java,%.class,$(APP1_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(APP1_CLASSFILES) : $(APP1_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $^
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(APP1_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP1_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java b/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java
deleted file mode 100644
index 768745f6..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Clipboard/TextTransferable.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.datatransfer.DataFlavor;
-import com.sun.star.datatransfer.UnsupportedFlavorException;
-import com.sun.star.datatransfer.XTransferable;
-import com.sun.star.uno.Type;
-
-//---------------------------------------
-// A simple transferable containing only
-// one format, unicode text
-//---------------------------------------
-
-public class TextTransferable implements XTransferable
-{
- public TextTransferable(String aText)
- {
- text = aText;
- }
-
- // XTransferable methods
-
- public Object getTransferData(DataFlavor aFlavor) throws UnsupportedFlavorException
- {
- if ( !aFlavor.MimeType.equalsIgnoreCase( UNICODE_CONTENT_TYPE ) )
- throw new UnsupportedFlavorException();
-
- return text;
- }
-
- public DataFlavor[] getTransferDataFlavors()
- {
- DataFlavor[] adf = new DataFlavor[1];
-
- DataFlavor uniflv = new DataFlavor(
- UNICODE_CONTENT_TYPE,
- "Unicode Text",
- new Type(String.class) );
-
- adf[0] = uniflv;
-
- return adf;
- }
-
- public boolean isDataFlavorSupported(DataFlavor aFlavor)
- {
- return aFlavor.MimeType.equalsIgnoreCase(UNICODE_CONTENT_TYPE);
- }
-
-// members
-
- private final String text;
- private final String UNICODE_CONTENT_TYPE = "text/plain;charset=utf-16";
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java b/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
deleted file mode 100644
index a5d81e30..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.ui.ActionTriggerSeparatorType;
-import com.sun.star.ui.ContextMenuInterceptorAction;
-import com.sun.star.ui.XContextMenuInterceptor;
-import com.sun.star.uno.UnoRuntime;
-
-public class ContextMenuInterceptor implements XContextMenuInterceptor {
-
- /**
- *Description of the Method
- *
- *@param args Description of Parameter
- *@since
- */
- public static void main(String args[])
- {
- try {
- OfficeConnect aConnect = OfficeConnect.createConnection();
-
- com.sun.star.frame.XDesktop xDesktop =
- (com.sun.star.frame.XDesktop)aConnect.createRemoteInstance(
- com.sun.star.frame.XDesktop.class,"com.sun.star.frame.Desktop");
-
- // create a new test document
- com.sun.star.frame.XComponentLoader xCompLoader =
- (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- com.sun.star.lang.XComponent xComponent =
- xCompLoader.loadComponentFromURL("private:factory/swriter",
- "_blank", 0, new com.sun.star.beans.PropertyValue[0]);
-
- // intialize the test document
- com.sun.star.frame.XFrame xFrame = null;
- {
- com.sun.star.text.XTextDocument xDoc =(com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
- xComponent);
-
- String infoMsg = new String("All context menus of the created document frame contains now a 'Help' entry with the submenus 'Content', 'Help Agent' and 'Tips'.\n\nPress 'Return' in the shell to remove the context menu interceptor and finish the example!");
- xDoc.getText().setString(infoMsg);
-
- // ensure that the document content is optimal visible
- com.sun.star.frame.XModel xModel =
- (com.sun.star.frame.XModel)UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class, xDoc);
- // get the frame for later usage
- xFrame = xModel.getCurrentController().getFrame();
-
- com.sun.star.view.XViewSettingsSupplier xViewSettings =
- (com.sun.star.view.XViewSettingsSupplier)UnoRuntime.queryInterface(
- com.sun.star.view.XViewSettingsSupplier.class, xModel.getCurrentController());
- xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
- }
- // test document will be closed later
-
- // reuse the frame
- com.sun.star.frame.XController xController = xFrame.getController();
- if ( xController != null ) {
- com.sun.star.ui.XContextMenuInterception xContextMenuInterception =
- (com.sun.star.ui.XContextMenuInterception)UnoRuntime.queryInterface(
- com.sun.star.ui.XContextMenuInterception.class, xController );
- if( xContextMenuInterception != null ) {
- ContextMenuInterceptor aContextMenuInterceptor = new ContextMenuInterceptor();
- com.sun.star.ui.XContextMenuInterceptor xContextMenuInterceptor =
- (com.sun.star.ui.XContextMenuInterceptor)UnoRuntime.queryInterface(
- com.sun.star.ui.XContextMenuInterceptor.class, aContextMenuInterceptor );
- xContextMenuInterception.registerContextMenuInterceptor( xContextMenuInterceptor );
-
- System.out.println( "\n ... all context menus of the created document frame contains now a 'Help' entry with the\n submenus 'Content', 'Help Agent' and 'Tips'.\n\nPress 'Return' to remove the context menu interceptor and finish the example!");
-
- java.io.BufferedReader reader
- = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
- reader.read();
-
- xContextMenuInterception.releaseContextMenuInterceptor(
- xContextMenuInterceptor );
- System.out.println( " ... context menu interceptor removed!" );
- }
- }
-
- // close test document
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class,
- xComponent );
-
- if (xCloseable != null ) {
- xCloseable.close(false);
- } else
- {
- xComponent.dispose();
- }
- }
- catch ( com.sun.star.uno.RuntimeException ex ) {
- // something strange has happend!
- System.out.println( " Sample caught exception! " + ex );
- System.exit(1);
- }
- catch ( java.lang.Exception ex ) {
- // catch java exceptions and do something useful
- System.out.println( " Sample caught exception! " + ex );
- System.exit(1);
- }
-
- System.out.println(" ... exit!\n");
- System.exit( 0 );
- }
-
- /**
- *Description of the Method
- *
- *@param args Description of Parameter
- *@since
- */
- public ContextMenuInterceptorAction notifyContextMenuExecute(
- com.sun.star.ui.ContextMenuExecuteEvent aEvent ) throws RuntimeException {
-
- try {
-
- // Retrieve context menu container and query for service factory to
- // create sub menus, menu entries and separators
- com.sun.star.container.XIndexContainer xContextMenu = aEvent.ActionTriggerContainer;
- com.sun.star.lang.XMultiServiceFactory xMenuElementFactory =
- (com.sun.star.lang.XMultiServiceFactory)UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xContextMenu );
- if ( xMenuElementFactory != null ) {
- // create root menu entry and sub menu
- com.sun.star.beans.XPropertySet xRootMenuEntry =
- (XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class,
- xMenuElementFactory.createInstance( "com.sun.star.ui.ActionTrigger" ));
-
- // create a line separator for our new help sub menu
- com.sun.star.beans.XPropertySet xSeparator =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class,
- xMenuElementFactory.createInstance( "com.sun.star.ui.ActionTriggerSeparator" ));
-
- Short aSeparatorType = new Short( ActionTriggerSeparatorType.LINE );
- xSeparator.setPropertyValue( "SeparatorType", (Object)aSeparatorType );
-
- // query sub menu for index container to get access
- com.sun.star.container.XIndexContainer xSubMenuContainer =
- (com.sun.star.container.XIndexContainer)UnoRuntime.queryInterface(
- com.sun.star.container.XIndexContainer.class,
- xMenuElementFactory.createInstance(
- "com.sun.star.ui.ActionTriggerContainer" ));
-
- // intialize root menu entry
- xRootMenuEntry.setPropertyValue( "Text", new String( "Help" ));
- xRootMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5410" ));
- xRootMenuEntry.setPropertyValue( "HelpURL", new String( "5410" ));
- xRootMenuEntry.setPropertyValue( "SubContainer", (Object)xSubMenuContainer );
-
- // create menu entries for the new sub menu
-
- // intialize help/content menu entry
- XPropertySet xMenuEntry = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xMenuElementFactory.createInstance(
- "com.sun.star.ui.ActionTrigger" ));
-
- xMenuEntry.setPropertyValue( "Text", new String( "Content" ));
- xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5401" ));
- xMenuEntry.setPropertyValue( "HelpURL", new String( "5401" ));
-
- // insert menu entry to sub menu
- xSubMenuContainer.insertByIndex( 0, (Object)xMenuEntry );
-
- // intialize help/help agent
- xMenuEntry = (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class,
- xMenuElementFactory.createInstance(
- "com.sun.star.ui.ActionTrigger" ));
- xMenuEntry.setPropertyValue( "Text", new String( "Help Agent" ));
- xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5962" ));
- xMenuEntry.setPropertyValue( "HelpURL", new String( "5962" ));
-
- // insert menu entry to sub menu
- xSubMenuContainer.insertByIndex( 1, (Object)xMenuEntry );
-
- // intialize help/tips
- xMenuEntry = (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class,
- xMenuElementFactory.createInstance(
- "com.sun.star.ui.ActionTrigger" ));
- xMenuEntry.setPropertyValue( "Text", new String( "Tips" ));
- xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5404" ));
- xMenuEntry.setPropertyValue( "HelpURL", new String( "5404" ));
-
- // insert menu entry to sub menu
- xSubMenuContainer.insertByIndex( 2, (Object)xMenuEntry );
-
- // add separator into the given context menu
- xContextMenu.insertByIndex( 0, (Object)xSeparator );
-
- // add new sub menu into the given context menu
- xContextMenu.insertByIndex( 0, (Object)xRootMenuEntry );
-
- // The controller should execute the modified context menu and stop notifying other
- // interceptors.
- return com.sun.star.ui.ContextMenuInterceptorAction.EXECUTE_MODIFIED;
- }
- }
- catch ( com.sun.star.beans.UnknownPropertyException ex ) {
- // do something useful
- // we used a unknown property
- }
- catch ( com.sun.star.lang.IndexOutOfBoundsException ex ) {
- // do something useful
- // we used an invalid index for accessing a container
- }
- catch ( com.sun.star.uno.Exception ex ) {
- // something strange has happend!
- }
- catch ( java.lang.Exception ex ) {
- // catch java exceptions and something useful
- }
-
- return com.sun.star.ui.ContextMenuInterceptorAction.IGNORED;
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
deleted file mode 100644
index 3aa79314..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.awt.*;
-import javax.swing.*;
-import java.lang.String;
-import java.awt.event.*;
-import java.awt.*;
-
-// __________ Implementation __________
-
-/**
- * Makes it possible to change some states of currently loaded
- * document (e.g. enable/disable menubar, toolbar, objectbar)
- *
- * @author Andreas Schl&uuml;ns
- * @created 20.06.2002 09:28
- */
-public class CustomizeView extends JPanel
- implements IShutdownListener
-{
- // ____________________
- // const
-
- /**
- * These const URL's describe feature for toggling some properties of loaded document.
- * Dispatch it with the corresponding parameter to the frame.
- */
- private static final String FEATUREURL_MENUBAR = "slot:6661" ;
- private static final String FEATUREURL_TOOLBAR = "slot:5909" ;
- private static final String FEATUREURL_OBJECTBAR = "slot:5905" ;
-
- private static final String FEATUREPROP_MENUBAR = "MenuBarVisible" ;
- private static final String FEATUREPROP_TOOLBAR = "ToolBarVisible" ;
- private static final String FEATUREPROP_OBJECTBAR = "ObjectBarVisible" ;
-
- private static final String ACTION_MENUBAR = "toogle_menu" ;
- private static final String ACTION_TOOLBAR = "toogle_toolbar" ;
- private static final String ACTION_OBJECTBAR = "toogle_objectbar" ;
-
- private static final String MENUBAR_ON = "menubar on" ;
- private static final String TOOLBAR_ON = "toolbar on" ;
- private static final String OBJECTBAR_ON = "objectbar on" ;
-
- private static final String MENUBAR_OFF = "menubar off" ;
- private static final String TOOLBAR_OFF = "toolbar off" ;
- private static final String OBJECTBAR_OFF = "objectbar off" ;
-
- // ____________________
- // member
-
- /**
- * @member m_cbMenuBar reference to checkbox for toggling menubar
- * @member m_cbToolBar reference to checkbox for toggling toolbar
- * @member m_cbObjectBar reference to checkbox for toggling objectbar
- *
- * @member m_aMenuBarListener listener for status events of the menu bar
- * @member m_aToolBarListener listener for status events of the tool bar
- * @member m_aObjectBarListener listener for status events of the object bar
- */
- private JCheckBox m_cbMenuBar ;
- private JCheckBox m_cbToolBar ;
- private JCheckBox m_cbObjectBar ;
-
- private StatusListener m_aMenuBarListener ;
- private StatusListener m_aToolBarListener ;
- private StatusListener m_aObjectBarListener;
-
- // ____________________
-
- /**
- * ctor
- * Create view controls on startup and initialize it.
- * We don't start listening here. see setFrame()!
- */
- CustomizeView()
- {
- this.setLayout(new GridLayout(3,0));
-
- m_cbMenuBar = new JCheckBox(MENUBAR_OFF , false);
- m_cbToolBar = new JCheckBox(TOOLBAR_OFF , false);
- m_cbObjectBar = new JCheckBox(OBJECTBAR_OFF, false);
-
- m_cbMenuBar.setEnabled (false);
- m_cbToolBar.setEnabled (false);
- m_cbObjectBar.setEnabled(false);
-
- m_cbMenuBar.setActionCommand (ACTION_MENUBAR );
- m_cbToolBar.setActionCommand (ACTION_TOOLBAR );
- m_cbObjectBar.setActionCommand(ACTION_OBJECTBAR);
-
- this.add(m_cbMenuBar );
- this.add(m_cbToolBar );
- this.add(m_cbObjectBar);
- }
-
- // ____________________
-
- /**
- * set new frame for this view
- * We start listening for frame action/status and click events instandly.
- * If an event occure we use it to synchronize our controls
- * with states of a (my be) new document view of this frame.
- *
- * @param xFrame
- * the reference to the frame, which provides the
- * possibility to get the required status informations
- *
- * Attention: We don't accept new frames here.
- * We get one after startup and work with him.
- * That's it!
- */
- public void setFrame(com.sun.star.frame.XFrame xFrame)
- {
- if (xFrame==null)
- return;
-
- // be listener for click events
- // They will toogle the UI controls.
- ClickListener aMenuBarHandler = new ClickListener(FEATUREURL_MENUBAR ,FEATUREPROP_MENUBAR ,xFrame);
- ClickListener aToolBarHandler = new ClickListener(FEATUREURL_TOOLBAR ,FEATUREPROP_TOOLBAR ,xFrame);
- ClickListener aObjectBarHandler = new ClickListener(FEATUREURL_OBJECTBAR,FEATUREPROP_OBJECTBAR,xFrame);
-
- m_cbMenuBar.addActionListener (aMenuBarHandler );
- m_cbToolBar.addActionListener (aToolBarHandler );
- m_cbObjectBar.addActionListener(aObjectBarHandler);
-
- // be frame action listener
- // The callback will update listener connections
- // for status updates automaticly!
- m_aMenuBarListener = new StatusListener(m_cbMenuBar ,MENUBAR_ON ,MENUBAR_OFF ,xFrame, FEATUREURL_MENUBAR );
- m_aToolBarListener = new StatusListener(m_cbToolBar ,TOOLBAR_ON ,TOOLBAR_OFF ,xFrame, FEATUREURL_TOOLBAR );
- m_aObjectBarListener = new StatusListener(m_cbObjectBar,OBJECTBAR_ON,OBJECTBAR_OFF,xFrame, FEATUREURL_OBJECTBAR);
-
- m_aMenuBarListener.startListening();
- m_aToolBarListener.startListening();
- m_aObjectBarListener.startListening();
- }
-
- // ____________________
-
- /**
- * react for click events of the used check boxes
- * We use our internal set dispatch objects to
- * call it. This calls toogle the menu/object- or toolbar.
- * Note: Because we are listener status events too - hopefully
- * we get a notification, if toogling was successfully or not.
- * We use this information to update our check boxes again.
- * But such update doesn't force (hopefully) an action event. Otherwhise
- * we can produce a never ending recursion!
- *
- * @param aEvent
- * describes the used check box and his current state
- * we can use to dispatch the right URL to the office
- */
- class ClickListener implements ActionListener,
- com.sun.star.lang.XEventListener
- {
- /// URL, to toogle the requested UI item
- String m_sURL;
- /// name of the property which must be used in combination with the URL
- String m_sProp;
- /// we must use this frame to dispatch a request
- com.sun.star.frame.XFrame m_xFrame;
-
- //_____________________
-
- /**
- * ctor
- * It initialize an instance of this clas only.
- */
- ClickListener( String sURL ,
- String sProp ,
- com.sun.star.frame.XFrame xFrame )
- {
- m_sURL = sURL ;
- m_sProp = sProp ;
- m_xFrame = xFrame;
- }
-
- //_____________________
-
- /**
- * callback for action events
- * Such events occure if somehwere click the
- * JCheckBox control on which we are registered.
- * Such events doesn't occure if we set it programmaticly
- * (e.g. if we get status events to -> see class StatusListener too)
- *
- * @param aEvent
- * describes the check box and his state
- * we can use to toogle the requested office
- * ressource.
- */
- public void actionPerformed(ActionEvent aEvent)
- {
- synchronized(this)
- {
- if (m_xFrame==null)
- return;
- }
-
- // define parameters for following dispatch
- boolean bState = ((JCheckBox)aEvent.getSource()).isSelected();
-
- // prepare the dispatch
- com.sun.star.util.URL aURL = FunctionHelper.parseURL(m_sURL);
- if (aURL==null)
- return;
-
- com.sun.star.beans.PropertyValue[] lProperties = new com.sun.star.beans.PropertyValue[1];
- lProperties[0] = new com.sun.star.beans.PropertyValue();
- lProperties[0].Name = m_sProp;
- lProperties[0].Value = new Boolean(bState);
-
- // execute (dispatch) it into the frame
- if (m_xFrame==null)
- return;
- FunctionHelper.execute(m_xFrame,aURL,lProperties,null);
- }
-
- // ____________________
-
- /**
- * callback for disposing events
- * Internaly we save a reference to an office frame.
- * Of course he can die and inform us then. We should react
- * and forget his reference.
- *
- * @param aEvent
- * describes the source which fire this event
- * Must be our internal saved frame. Otherwhise
- * somewhere know us without a registration ...
- */
- public void disposing(com.sun.star.lang.EventObject aEvent)
- {
- synchronized(this)
- {
- m_xFrame = null;
- }
- }
- }
-
- // ____________________
-
- /**
- * If this java application shutdown - we must cancel all current existing
- * listener connections. Otherwhise the office will run into some
- * DisposedExceptions if it tries to use these forgotten listener references.
- * And of course it can die doing that.
- * We are registered at a central object to be informed if the VM will exit.
- * So we can react.
- */
- public void shutdown()
- {
- m_aMenuBarListener.shutdown();
- m_aToolBarListener.shutdown();
- m_aObjectBarListener.shutdown();
-
- m_aMenuBarListener = null;
- m_aToolBarListener = null;
- m_aObjectBarListener = null;
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
deleted file mode 100644
index b63c83e5..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.lang.String;
-
-// __________ Implementation __________
-
-/**
- * TODO
- *
- * @author Andreas Schl&uuml;ns
- * @created 08.02.2002 14:05
- */
-public class Desk
-{
- // ____________________
-
- /**
- * main
- * Establish connection to a remote office and starts the demo application.
- * User can overwrite some of neccessary start options by using command line parameters.
- *
- * syntax: Desk [mode={inplace|outplace}] [file=<filename>]
- *
- * @param args command line arguments
- * mode describe using mode of document view {inplace/outplace}
- * default=inplace
- * file name of first file which should be open
- * default="private:factory/swriter" to open empty writer document
- */
- public static void main(String[] lArguments)
- {
- // Analyze command line parameters.
- String sMode = new String("inplace");
- String sFile = new String("private:factory/swriter");
-
- for(int i=0; i<lArguments.length; ++i)
- {
- lArguments[i] = lArguments[i].toLowerCase();
- if(lArguments[i].startsWith("mode=")==true)
- sMode = lArguments[i].substring(5);
- else
- if(lArguments[i].startsWith("file=")==true)
- sFile = lArguments[i].substring(5);
- }
-
- ViewContainer.mbInplace = (sMode.compareTo("inplace")==0);
-
- // Connect to remote office.
- OfficeConnect.createConnection();
-
- // Create first document view.
- // This one will register himself at the global
- // ViewContainer. Further views will be open
- // automaticly started from this first one.
- DocumentView aView = new DocumentView();
- aView.setVisible(true);
- aView.createFrame();
- aView.load(sFile);
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java
deleted file mode 100644
index 0e9aeeac..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.lang.*;
-import java.net.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import java.awt.AWTEvent;
-import java.awt.event.WindowEvent;
-
-// __________ Implementation __________
-
-/**
- * This implement a java frame wich contains
- * an office document, shows some status informations
- * about that, provides simple functionality on it
- * (e.g. toggle menubar, save document) and
- * react for different situations independent
- * (e.g. closing the document from outside).
- * Every instance of this class will be a member
- * inside the global "ViewContainer" of this java
- * demo application which holds all opened views alive.
- *
- * @author Andreas Schl&uuml;ns
- * @created 06.03.2002 09:38
- */
-public class DocumentView extends JFrame
- implements com.sun.star.lang.XEventListener, // react for Frame::disposing()
- IShutdownListener // react for System.exit()
-{
- // ____________________
-
- /**
- * const
- * These command strings are used to identify a received action
- * of buttons on which we listen for action events.
- */
- public static final String COMMAND_OPEN = "open" ;
- public static final String COMMAND_SAVE = "save" ;
- public static final String COMMAND_EXPORT = "export" ;
- public static final String COMMAND_EXIT = "exit" ;
-
- // ____________________
-
- /**
- * @member mxFrame office frame which contains the document of this view
- *
- * @member maStatusView special panel wich show available status informations of currently loaded document
- * @member maDocumentView use JNI mechanism to plug an office window into our own java UI container (used for inplace mode only!)
- * @member maCustomizeView special panel makes it possible to toggle menubar/toolbar or objectbar of loaded document
- * @member maInterceptor interceptor thread which intercept "new" menu of office frame to open new frames inside this java application
- *
- * @member msName unique name of this view (returned by the global ViewContainer during registration)
- *
- * @member mbOpen button to open documents
- * @member mbSave button to save currently loaded document
- * @member mbExport button to save currently loaded document in HTML format (if it is possible!)
- * @member mbExit button to exit this demo
- *
- * @member maInterception we try to intercept the file->new menu to open new document inside this java application
- */
- private com.sun.star.frame.XFrame mxFrame ;
-
- private StatusView maStatusView ;
- private NativeView maDocumentView ;
- private CustomizeView maCustomizeView ;
- private Interceptor maInterceptor ;
-
- private String msName ;
-
- private JButton mbtOpen ;
- private JButton mbtSave ;
- private JButton mbtExport ;
- private JButton mbtExit ;
-
- private boolean mbDead ;
-
- // ____________________
-
- /**
- * ctor
- * Create view controls on startup and initialize it with default values.
- */
- DocumentView()
- {
- this.setSize( new Dimension(800,600) );
-
- JPanel paMainPanel = (JPanel)this.getContentPane();
-
- // create and add command buttons to a panel
- // it will be a sub panel of later layouted UI
- mbtOpen = new JButton("Open ..." );
- mbtSave = new JButton("Save" );
- mbtExport = new JButton("Save as HTML ...");
- mbtExit = new JButton("Exit" );
-
- mbtOpen.setEnabled (true );
- mbtSave.setEnabled (false);
- mbtExport.setEnabled(false);
- mbtExit.setEnabled (true );
-
- mbtOpen.setActionCommand (COMMAND_OPEN );
- mbtSave.setActionCommand (COMMAND_SAVE );
- mbtExport.setActionCommand(COMMAND_EXPORT);
- mbtExit.setActionCommand (COMMAND_EXIT );
-
- Reactor aListener = new Reactor();
- mbtOpen.addActionListener (aListener);
- mbtSave.addActionListener (aListener);
- mbtExport.addActionListener(aListener);
- mbtExit.addActionListener (aListener);
-
- JPanel paCommands = new JPanel( new GridLayout(4,0) );
- paCommands.add(mbtOpen);
- paCommands.add(mbtSave);
- paCommands.add(mbtExport);
- paCommands.add(mbtExit);
-
- // create view to show status informations of opened file
- maStatusView = new StatusView();
-
- // create view for toggle different bar's of document
- maCustomizeView = new CustomizeView();
-
- paCommands.setBorder ( new TitledBorder(BorderFactory.createEtchedBorder(),"Commands") );
- maStatusView.setBorder ( new TitledBorder(BorderFactory.createEtchedBorder(),"Status Informations") );
- maCustomizeView.setBorder( new TitledBorder(BorderFactory.createEtchedBorder(),"Customize Document View") );
-
- // layout the whole UI
- JPanel paTest = new JPanel(new GridLayout(3,0));
- paTest.add(paCommands );
- paTest.add(maStatusView );
- paTest.add(maCustomizeView);
- JScrollPane paScroll = new JScrollPane();
- paScroll.getViewport().add(paTest,null);
-
- if(ViewContainer.mbInplace==true)
- {
- // create view to show opened documents
- // This special view is neccessary for inplace mode only!
- maDocumentView = new NativeView();
-
- JSplitPane paSplit = new JSplitPane();
- paSplit.setOneTouchExpandable( true );
-
- paSplit.setLeftComponent (maDocumentView);
- paSplit.setRightComponent(paScroll );
-
- paMainPanel.add(paSplit);
- }
- else
- {
- paMainPanel.add(paScroll);
- }
-
- // Register this new view on our global view container.
- msName = FunctionHelper.getUniqueFrameName();
- this.setTitle(msName);
- ViewContainer.getGlobalContainer().addView(this);
- ViewContainer.getGlobalContainer().addListener(this);
- // be listener for closing the application
- this.enableEvents(AWTEvent.WINDOW_EVENT_MASK);
- }
-
- // ____________________
-
- /**
- * Create the view frame for showing the office documents on demand.
- * Dependend from given command line parameter we create
- * an office XFrame and initialize it with a window. This
- * window can be a pure toolkit window (means toolkit of office!)
- * or a plugged java canvas - office window combination.
- */
- public void createFrame()
- {
- // create view frame (as a XFrame!) here
- // Look for right view mode setted by user command line parameter.
- // First try to get a new unambigous frame name from our global ViewContainer.
- if(ViewContainer.mbInplace==true)
- {
- // inplace document view can't be initialized without a visible parent window hierarchy!
- // So make shure that we are visible in every case!
- this.setVisible(true);
- mxFrame = FunctionHelper.createViewFrame(msName,maDocumentView);
- }
- else
- mxFrame = FunctionHelper.createViewFrame(msName,null);
-
- if(mxFrame!=null)
- {
- // start interception
- maInterceptor = new Interceptor(mxFrame);
- maInterceptor.startListening();
-
- // start listening for status events and actualization
- // of our status view
- // (of course for our CustomizeView too)
- maStatusView.setFrame (mxFrame);
- maCustomizeView.setFrame(mxFrame);
-
- // be listener for closing the remote target view frame
- com.sun.star.lang.XComponent xBroadcaster = (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class,
- mxFrame);
-
- if(xBroadcaster!=null)
- xBroadcaster.addEventListener(this);
- }
- }
-
- // ____________________
-
- /**
- * Different ways to load any URL from outside (may be by the command line)
- * into this document view or to save it.
- */
- public void load(String sURL)
- {
- load(sURL,new com.sun.star.beans.PropertyValue[0]);
- }
-
- // ____________________
-
- public void load(String sURL, com.sun.star.beans.PropertyValue[] lArguments)
- {
- com.sun.star.lang.XComponent xDocument = FunctionHelper.loadDocument(mxFrame,sURL,lArguments);
- if(xDocument!=null)
- {
- mbtSave.setEnabled (true);
- mbtExport.setEnabled(true);
- }
- else
- {
- mbtSave.setEnabled (false);
- mbtExport.setEnabled(false);
- }
- }
-
- // ____________________
-
- public void save()
- {
- com.sun.star.frame.XController xController = mxFrame.getController();
- if (xController==null)
- return;
- com.sun.star.frame.XModel xDocument = xController.getModel();
- if (xDocument==null)
- return;
- FunctionHelper.saveDocument(xDocument);
- }
-
- // ____________________
-
- public void exportHTML(String sURL)
- {
- com.sun.star.frame.XController xController = mxFrame.getController();
- if (xController==null)
- return;
- com.sun.star.frame.XModel xDocument = xController.getModel();
- if (xDocument==null)
- return;
- FunctionHelper.saveAsHTML(xDocument,sURL);
- }
-
- // ____________________
-
- /**
- * Overridden so we can react for window closing of this view.
- */
- protected void processWindowEvent(WindowEvent aEvent)
- {
- if (aEvent.getID()!=WindowEvent.WINDOW_CLOSING)
- {
- super.processWindowEvent(aEvent);
- }
- else
- if (FunctionHelper.closeFrame(mxFrame))
- {
- mxFrame = null;
- shutdown();
- super.processWindowEvent(aEvent);
- }
- }
-
- // ____________________
-
- /**
- * Here we can react for System.exit() normaly.
- * But we use it for disposing() or windowClosing() too.
- */
- public void shutdown()
- {
- if (mbDead)
- return;
- mbDead=true;
-
- // force these sub view to release her remote
- // refrences too!
- maStatusView.shutdown();
- maCustomizeView.shutdown();
-
- maStatusView = null;
- maCustomizeView = null;
-
- // disable all interceptions
- maInterceptor.shutdown();
- maInterceptor = null;
-
- // close the frame and his document
- // Relaesing of our listener connections for disposing()
- // will be forced automaticly then. Because the frame
- // will call us back ...
- if (mxFrame!=null)
- FunctionHelper.closeFrame(mxFrame);
-
- // deregister this view in the global container
- // Normaly we should die afterwards by garbage collection ...
- // In cease this was the last view - it force a system.exit().
- // But then we are no longer a member of the global container
- // of possible shutdown listener ... and this method should be
- // called again.
- ViewContainer.getGlobalContainer().removeView(this);
- }
-
- // ____________________
-
- /**
- * callback from our internal saved frame
- * which wish to die. Its not neccessary to remove listener connections
- * here. Because the broadcaster do it automaticly.
- * We have to release all references to him only.
- *
- * @param aSource
- * describe the broadcaster of this event
- * Must be our internal saved frame.
- */
- public void disposing(com.sun.star.lang.EventObject aSource)
- {
- mxFrame = null;
- }
-
- // ____________________
-
- /**
- * This inner class is used to react for events of our own UI controls.
- * So we can start different actions then.
- */
- private class Reactor implements ActionListener
- {
- // ____________________
-
- /**
- * This method react for pressed buttons or selected check boxes.
- */
- public void actionPerformed(ActionEvent aEvent)
- {
- String sCommand = aEvent.getActionCommand();
- //-----------------------------
- // open any file from disk
- if( sCommand.compareTo(COMMAND_OPEN) == 0 )
- {
- String sURL = FunctionHelper.askUserForFileURL(DocumentView.this,true);
- if(sURL!=null)
- DocumentView.this.load(sURL);
- }
- else
- //-----------------------------
- // save current document
- if( sCommand.compareTo(COMMAND_SAVE) == 0 )
- {
- DocumentView.this.save();
- }
- else
- //-----------------------------
- // export current document to html
- if( sCommand.compareTo(COMMAND_EXPORT) == 0 )
- {
- String sURL = FunctionHelper.askUserForFileURL(DocumentView.this,false);
- if(sURL!=null)
- DocumentView.this.exportHTML(sURL);
- }
- else
- //-----------------------------
- // exit application
- if( sCommand.compareTo(COMMAND_EXIT) == 0 )
- {
- // This will force deleting of this and
- // all other currently opened views automaticly!
- System.exit(0);
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
deleted file mode 100644
index 29b11256..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
+++ /dev/null
@@ -1,1060 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.AnyConverter;
-
-import java.lang.*;
-import java.awt.*;
-import javax.swing.*;
-import java.io.*;
-import java.net.*;
-
-// __________ Implementation __________
-
-/**
- * Is a collection of basic features.
- * This helper shows different functionality of framework api
- * in an example manner. You can use the follow ones:
- * (1) parse URL's
- * (2) create frames (inside/outside a java application)
- * (3) dispatches (with[out] notifications)
- * (4) loading/saving documents
- * (5) convert documents to HTML (if possible)
- * (6) close documents (and her frames) correctly
- *
- * There exist some other helper functionality too, which
- * doesn't use or demonstrate the office api:
- * (a) getting file names by using a file chosser
- *
- * @author Andreas Schl&uuml;ns
- * @created 28.02.2002 15:31
- */
-public class FunctionHelper
-{
- // ____________________
-
- /**
- * This convert an URL (formated as a string) to a struct com.sun.star.util.URL.
- * It use a special service to do that: the URLTransformer.
- * Because some API calls need it and it's not allowed to set "Complete"
- * part of the util struct only. The URL must be parsed.
- *
- * @param sURL
- * URL for parsing in string notation
- *
- * @return [com.sun.star.util.URL]
- * URL in UNO struct notation
- */
- public static com.sun.star.util.URL parseURL(String sURL)
- {
- com.sun.star.util.URL aURL = null;
-
- if (sURL==null || sURL.equals(""))
- {
- System.out.println("wrong using of URL parser");
- return null;
- }
-
- try
- {
- com.sun.star.uno.XComponentContext xOfficeCtx =
- OfficeConnect.getOfficeContext();
-
- // Create special service for parsing of given URL.
- com.sun.star.util.XURLTransformer xParser =
- (com.sun.star.util.XURLTransformer)UnoRuntime.queryInterface(
- com.sun.star.util.XURLTransformer.class,
- xOfficeCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.util.URLTransformer", xOfficeCtx));
-
- // Because it's an in/out parameter we must use an array of URL objects.
- com.sun.star.util.URL[] aParseURL = new com.sun.star.util.URL[1];
- aParseURL[0] = new com.sun.star.util.URL();
- aParseURL[0].Complete = sURL;
-
- // Parse the URL
- xParser.parseStrict(aParseURL);
-
- aURL = aParseURL[0];
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Any UNO method of this scope can throw this exception.
- // Reset the return value only.
- aURL = null;
- }
- catch(com.sun.star.uno.Exception exUno)
- {
- // "createInstance()" method of used service manager can throw it.
- // Then it wasn't possible to get the URL transformer.
- // Return default instead of realy parsed URL.
- aURL = null;
- }
-
- return aURL;
- }
-
- // ____________________
-
- /**
- * create a new empty target frame
- * Attention: Currently we must use special service com.sun.star.frame.Task instead of Frame.
- * Because desktop environment accept this special frame type only as direct children.
- * Note - This service will be deprecated and must be replaces by com.sun.star.frame.Frame in
- * further versions. To feature prove we use both service names. If for new versions
- * the deprecated one not exist we get an empty frame, we can try to use the new service.
- *
- * @param xSMGR
- * we nee the remote service manager to create this task/frame service
- *
- * @return [com.sun.star.frame.XFrame]
- * the new created frame reference in case of success or null otherwhise
- */
- private static com.sun.star.frame.XFrame impl_createEmptyFrame(
- com.sun.star.uno.XComponentContext xCtx )
- {
- com.sun.star.frame.XFrame xFrame = null;
-
- try{
- xFrame = (com.sun.star.frame.XFrame)UnoRuntime.queryInterface(
- com.sun.star.frame.XFrame.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Task", xCtx));
- } catch(com.sun.star.uno.Exception ex1) {}
-
- if (xFrame==null)
- {
- try{
- xFrame = (com.sun.star.frame.XFrame)UnoRuntime.queryInterface(
- com.sun.star.frame.XFrame.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Frame", xCtx));
- } catch(com.sun.star.uno.Exception ex2) {}
- }
-
- return xFrame;
- }
-
- // ____________________
-
- /**
- * create a new window which can be used as container window of an office frame
- * We know two modes for creation:
- * - the office window will be a child of one of our java windows
- * - the office will be a normal system window outside this java application
- * This behaviour will be regulated by the second parameter of this operation.
- * If a parentview is given the first mode will be activated - otherwhise
- * the second one.
- *
- * Note: First mode (creation of a child window) can be reached by two different
- * ways.
- * - pack the required window handle of our java window inside an UNO object
- * to transport it to the remote office toolkit and get a child office
- * window.
- * This is the old way. It's better to use the second one - but to be
- * future prove this old one should be tried too.
- * - it's possible to pass the native window handle directly to the toolkit.
- * A special interface method was enabled to accept that.
- *
- * The right way to create an office window should be then:
- * - try to use second creation mode (directly using of the window handle)
- * - if it failed ... use the old way by packing the handle inside an object
- *
- * @param xSMGR
- * we need a service manager to be able to create remote office
- * services
- *
- * @param aParentView
- * the java window as parent for the office window if an inplace office
- * is required. If it is set to null the created office window will be
- * a normal system window outside of our java application.
- *
- * @return [com.sun.star.awt.XWindow]
- * The new created office window which can be used to set it as
- * a ContainerWindow on an empty office frame.
- */
- private static com.sun.star.awt.XWindow impl_createWindow(
- com.sun.star.uno.XComponentContext xCtx, NativeView aParentView )
- {
- com.sun.star.awt.XWindow xWindow = null;
- com.sun.star.awt.XWindowPeer xPeer = null;
- com.sun.star.awt.XToolkit xToolkit = null;
-
- // get access to toolkit of remote office to create the container window of
- // new target frame
- try{
- xToolkit = (com.sun.star.awt.XToolkit)UnoRuntime.queryInterface(
- com.sun.star.awt.XToolkit.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.awt.Toolkit", xCtx));
- }
- catch(com.sun.star.uno.Exception ex)
- {
- return null;
- }
-
- // mode 1) create an external system window
- if (aParentView==null)
- {
- // Describe the properties of the container window.
- com.sun.star.awt.WindowDescriptor aDescriptor =
- new com.sun.star.awt.WindowDescriptor();
- aDescriptor.Type = com.sun.star.awt.WindowClass.TOP;
- aDescriptor.WindowServiceName = "window";
- aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = null;
- aDescriptor.Bounds = new com.sun.star.awt.Rectangle(0,0,0,0);
- aDescriptor.WindowAttributes = com.sun.star.awt.WindowAttribute.BORDER |
- com.sun.star.awt.WindowAttribute.MOVEABLE |
- com.sun.star.awt.WindowAttribute.SIZEABLE |
- com.sun.star.awt.WindowAttribute.CLOSEABLE;
-
- try{
- xPeer = xToolkit.createWindow( aDescriptor );
- } catch(com.sun.star.lang.IllegalArgumentException exIllegal) {}
- }
- // mode 2) create an internal office window as child of our given java
- // parent window
- else
- {
- // try new version of creation first: directly using of the window
- // handle. The old implementation of the corresponding toolkit method
- // requires a process ID. If this id isn't the right one a null object
- // is returned. But normaly nobody outside the office knows this id.
- // New version of this method ignore the id parameter and creation will
- // work.
- // Note: You must be shure if your window handle can be realy used by
- // the remote office. Means if this java client and the remote office
- // use the same display!
- com.sun.star.awt.XSystemChildFactory xChildFactory =
- (com.sun.star.awt.XSystemChildFactory)UnoRuntime.queryInterface(
- com.sun.star.awt.XSystemChildFactory.class, xToolkit);
-
- try
- {
- Integer nHandle = aParentView.getHWND();
- short nSystem = (short)aParentView.getNativeWindowSystemType();
- byte[] lProcID = new byte[0];
-
- xPeer = xChildFactory.createSystemChild((Object)nHandle,
- lProcID, nSystem);
-
- if (xPeer==null)
- {
- // mode 3) OK - new version doesn't work. It requires the
- // process id which we doesn't have.
- // So we must use the old way to get the right window peer.
- // Pack the handle inside a wrapper object.
- JavaWindowPeerFake aWrapper = new
- JavaWindowPeerFake(aParentView);
-
- com.sun.star.awt.XWindowPeer xParentPeer =
- (com.sun.star.awt.XWindowPeer)UnoRuntime.queryInterface(
- com.sun.star.awt.XWindowPeer.class, aWrapper);
-
- com.sun.star.awt.WindowDescriptor aDescriptor =
- new com.sun.star.awt.WindowDescriptor();
- aDescriptor.Type = com.sun.star.awt.WindowClass.TOP;
- aDescriptor.WindowServiceName = "workwindow";
- aDescriptor.ParentIndex = 1;
- aDescriptor.Parent = xParentPeer;
- aDescriptor.Bounds = new com.sun.star.awt.Rectangle(0,0,0,0);
- if (nSystem == com.sun.star.lang.SystemDependent.SYSTEM_WIN32)
- aDescriptor.WindowAttributes =
- com.sun.star.awt.WindowAttribute.SHOW;
- else
- aDescriptor.WindowAttributes =
- com.sun.star.awt.WindowAttribute.SYSTEMDEPENDENT;
-
- try{
- xPeer = xToolkit.createWindow( aDescriptor );
- } catch(com.sun.star.lang.IllegalArgumentException exIllegal) {}
- }
- }
- catch(java.lang.RuntimeException exJRun)
- {
- // This exception is thrown by the native JNI code if it try to get
- // the systemw window handle. A possible reason can be an invisible
- // java window. In this case it should be enough to set return
- // values to null. All other ressources (which was created before)
- // will be freed automaticly if scope wil be leaved.
- System.out.println("May be the NativeView object wasn't realy visible at calling time of getNativeWindow()?");
- xPeer = null;
- xWindow = null;
- }
- }
-
- // It doesn't matter which way was used to get the window peer.
- // Cast it to the right return interface and return it.
- xWindow = (com.sun.star.awt.XWindow)UnoRuntime.queryInterface(
- com.sun.star.awt.XWindow.class,
- xPeer);
-
- return xWindow;
- }
-
- // ____________________
-
- /**
- * This method create a new empty child frame on desktop instance of remote office.
- * It use a special JNI functionality to pass the office XWindow over a java window.
- * This java window can be inserted into another java window container for complex layouting.
- * If this parent java window isn't used, a top level system window will be created.
- * The the resulting office frame isn't plugged into this java application.
- *
- * @param sName
- * name to set it on the new created frame
- *
- * @param aParentView
- * java window which should be used as parent window of new created office frame window
- * May be set to null.
- *
- * @return [com.sun.star.frame.XFrame]
- * reference to the new created frame for success or null if it failed
- */
- public static com.sun.star.frame.XFrame createViewFrame(String sName, NativeView aParentView)
- {
- com.sun.star.frame.XFrame xFrame = null;
-
- try
- {
- com.sun.star.uno.XComponentContext xCtx =
- OfficeConnect.getOfficeContext();
-
- // create an empty office frame first
- xFrame = impl_createEmptyFrame(xCtx);
-
- // create an office window then
- // Depending from the given parameter aParentView it will be a child or a top level
- // system window. (see impl method for further informations)
- // But before we call this helper - prepare the possible parent window: show it.
- // JNI calls to get system window handle of java window can't work without that!
- if (aParentView!=null)
- aParentView.setVisible(true);
- com.sun.star.awt.XWindow xWindow = impl_createWindow(xCtx, aParentView);
-
- // pass the window the frame as his new container window.
- // It's neccessary to do it first - before you call anything else there.
- // Otherwhise the frame throws some exceptions for "uninitialized state".
- xFrame.initialize( xWindow );
-
- // Insert the new frame in desktop hierarchy.
- // Use XFrames interface to do so. It provides access to the child frame container of that instance.
- com.sun.star.frame.XFramesSupplier xTreeRoot = (com.sun.star.frame.XFramesSupplier)UnoRuntime.queryInterface(
- com.sun.star.frame.XFramesSupplier.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Desktop", xCtx));
- com.sun.star.frame.XFrames xChildContainer = xTreeRoot.getFrames();
- xChildContainer.append(xFrame);
-
- // Make some further initializations on frame and window.
- xWindow.setVisible(true);
- xFrame.setName(sName);
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Any UNO method of this scope can throw this exception.
- // So the frame can be already created and he must be freed
- // correctly. May be he was inserted into the desktop tree too ...
- if(xFrame!=null)
- {
- // Try to dispose the frame. He should deregister himself at the desktop object
- // and free all internal used ressources (e.g. the container window) automaticly.
- // It's possible to do that here - because frame has no component inside yet.
- // So nobody can disagree with that.
- // After the dispose() call forget all references to this frame and let him die.
- // If a new exception will occure ... no generell solution exist then.
- // Nobody can guarantee if next call will work or not.
- com.sun.star.lang.XComponent xComponent = (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class,
- xFrame);
- xComponent.dispose();
- xComponent = null;
- xFrame = null;
- }
- }
- catch(com.sun.star.uno.Exception exUno)
- {
- // "createInstance()" method of used service manager can throw it.
- // If it occurred during creation of desktop service the frame already was created.
- // Free it by decresing his refcount. Changes on the desktop tree couldn't exist.
- // Without the desktop service that wasn't possible. So no further rollbacks must follow.
- if(xFrame!=null)
- {
- com.sun.star.lang.XComponent xComponent = (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class,
- xFrame);
- xComponent.dispose();
- xComponent = null;
- xFrame = null;
- }
- }
-
- return xFrame;
- }
-
- // ____________________
-
- /**
- * Dispatch an URL to given frame.
- * Caller can register himself for following status events for dispatched
- * URL too. But nobody guarantee that such notifications will occure.
- * (see dispatchWithNotification() if you interest on that)
- * The returned dispatch object should be hold alive by caller
- * till he deosn't need it any longer. Otherwise the dispatcher can(!)
- * die by decreasing his refcount.
- *
- * @param xFrame frame wich should be the target of this dispatch
- * @param aURL full parsed and converted office URL for dispatch
- * @param lProperties optional arguments for dispatch
- * @param xListener optional listener which is registered automaticly for status events
- * (Note: Deregistration is part of this listener himself!)
- *
- * @return [XDispatch] It's the used dispatch object and can be used for deregistration of an optional listener.
- * Otherwhise caller can ignore it.
- */
- public static com.sun.star.frame.XDispatch execute(com.sun.star.frame.XFrame xFrame ,
- com.sun.star.util.URL aURL ,
- com.sun.star.beans.PropertyValue[] lProperties,
- com.sun.star.frame.XStatusListener xListener )
- {
- com.sun.star.frame.XDispatch xDispatcher = null;
-
- try
- {
- // Query the frame for right interface which provides access to all available dispatch objects.
- com.sun.star.frame.XDispatchProvider xProvider = (com.sun.star.frame.XDispatchProvider)UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProvider.class,
- xFrame);
-
- // Ask himn for right dispatch object for given URL.
- // Force given frame as target for following dispatch by using "".
- // It means the same like "_self".
- xDispatcher = xProvider.queryDispatch(aURL,"",0);
-
- // Dispatch the URL into the frame.
- if(xDispatcher!=null)
- {
- if(xListener!=null)
- xDispatcher.addStatusListener(xListener,aURL);
-
- xDispatcher.dispatch(aURL,lProperties);
- }
- }
- catch(com.sun.star.uno.RuntimeException exUno)
- {
- // Any UNO method of this scope can throw this exception.
- // But there will be nothing to do then - because
- // we haven't changed anything inside the remote objects
- // except method "addStatusListener().
- // But in this case the source of this exception has to
- // rollback all his operations. There is no chance to
- // make anything right then.
- // Reset the return value to a default - that's it.
- exUno.printStackTrace();
- xDispatcher = null;
- }
-
- return xDispatcher;
- }
-
- // ____________________
-
- /**
- * Dispatch an URL to given frame.
- * Caller can register himself for following result events for dispatched
- * URL too. Notifications are guaranteed (instead of dispatch())
- * Returning of the dispatch object isn't neccessary.
- * Nobody must hold it alive longer the dispatch needs.
- *
- * @param xFrame frame wich should be the target of this dispatch
- * @param aURL full parsed and converted office URL for dispatch
- * @param lProperties optional arguments for dispatch
- * @param xListener optional listener which is registered automaticly for status events
- * (Note: Deregistration is not supported. Dispatcher does it automaticly.)
- */
- public static void executeWithNotification(com.sun.star.frame.XFrame xFrame ,
- com.sun.star.util.URL aURL ,
- com.sun.star.beans.PropertyValue[] lProperties,
- com.sun.star.frame.XDispatchResultListener xListener )
- {
- try
- {
- // Query the frame for right interface which provides access to all available dispatch objects.
- com.sun.star.frame.XDispatchProvider xProvider = (com.sun.star.frame.XDispatchProvider)UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProvider.class,
- xFrame);
-
- // Ask himn for right dispatch object for given URL.
- // Force THIS frame as target for following dispatch.
- // Attention: The interface XNotifyingDispatch is an optional one!
- com.sun.star.frame.XDispatch xDispatcher = xProvider.queryDispatch(aURL,"",0);
- com.sun.star.frame.XNotifyingDispatch xNotifyingDispatcher = (com.sun.star.frame.XNotifyingDispatch)UnoRuntime.queryInterface(
- com.sun.star.frame.XNotifyingDispatch.class,
- xDispatcher);
-
- // Dispatch the URL.
- if(xNotifyingDispatcher!=null)
- xNotifyingDispatcher.dispatchWithNotification(aURL,lProperties,xListener);
- }
- catch(com.sun.star.uno.RuntimeException exUno)
- {
- // Any UNO method of this scope can throw this exception.
- // But there is nothing we can do then.
- exUno.printStackTrace();
- }
- }
-
- // ____________________
-
- /**
- * Load document specified by an URL into given frame synchronously.
- * The result of this operation will be the loaded document for success
- * or null if loading failed.
- *
- * @param xFrame frame wich should be the target of this load call
- * @param sURL unparsed URL for loading
- * @param lProperties optional arguments
- *
- * @return [XComponent] the loaded document for success or null if it's failed
- */
- public static com.sun.star.lang.XComponent loadDocument(
- com.sun.star.frame.XFrame xFrame, String sURL,
- com.sun.star.beans.PropertyValue[] lProperties)
- {
- com.sun.star.lang.XComponent xDocument = null;
- String sOldName = null;
-
- try
- {
- com.sun.star.uno.XComponentContext xCtx =
- OfficeConnect.getOfficeContext();
-
- // First prepare frame for loading
- // We must adress it inside the frame tree without any complications.
- // So we set an unambigous (we hope it) name and use it later.
- // Don't forget to reset original name after that.
- sOldName = xFrame.getName();
- String sTarget = "odk_officedev_desk";
- xFrame.setName(sTarget);
-
- // Get access to the global component loader of the office
- // for synchronous loading the document.
- com.sun.star.frame.XComponentLoader xLoader =
- (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Desktop", xCtx));
-
- // Load the document into the target frame by using his name and
- // special search flags.
- xDocument = xLoader.loadComponentFromURL(
- sURL,
- sTarget,
- com.sun.star.frame.FrameSearchFlag.CHILDREN,
- lProperties);
-
- // dont forget to restore old frame name ...
- xFrame.setName(sOldName);
- }
- catch(com.sun.star.io.IOException exIO)
- {
- // Can be thrown by "loadComponentFromURL()" call.
- // The only thing we should do then is to reset changed frame name!
- exIO.printStackTrace();
- xDocument = null;
- if(sOldName!=null)
- xFrame.setName(sOldName);
- }
- catch(com.sun.star.lang.IllegalArgumentException exIllegal)
- {
- // Can be thrown by "loadComponentFromURL()" call.
- // The only thing we should do then is to reset changed frame name!
- exIllegal.printStackTrace();
- xDocument = null;
- if(sOldName!=null)
- xFrame.setName(sOldName);
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Any UNO method of this scope can throw this exception.
- // The only thing we can try(!) is to reset changed frame name.
- exRuntime.printStackTrace();
- xDocument = null;
- if(sOldName!=null)
- xFrame.setName(sOldName);
- }
- catch(com.sun.star.uno.Exception exUno)
- {
- // "createInstance()" method of used service manager can throw it.
- // The only thing we should do then is to reset changed frame name!
- exUno.printStackTrace();
- xDocument = null;
- if(sOldName!=null)
- xFrame.setName(sOldName);
- }
-
- return xDocument;
- }
-
- // ____________________
-
- /**
- * Save currently loaded document of given frame.
- *
- * @param xDocument document for saving changes
- */
- public static void saveDocument(com.sun.star.lang.XComponent xDocument)
- {
- try
- {
- // Check for supported model functionality.
- // Normaly the application documents (text, spreadsheet ...) do so
- // but some other ones (e.g. db components) doesn't do that.
- // They can't be save then.
- com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class,
- xDocument);
- if(xModel!=null)
- {
- // Check for modifications => break save process if there is nothing to do.
- com.sun.star.util.XModifiable xModified = (com.sun.star.util.XModifiable)UnoRuntime.queryInterface(
- com.sun.star.util.XModifiable.class,
- xModel);
- if(xModified.isModified()==true)
- {
- com.sun.star.frame.XStorable xStore = (com.sun.star.frame.XStorable)UnoRuntime.queryInterface(
- com.sun.star.frame.XStorable.class,
- xModel);
-
- xStore.store();
- }
- }
- }
- catch(com.sun.star.io.IOException exIO)
- {
- // Can be thrown by "store()" call.
- // But there is nothing we can do then.
- exIO.printStackTrace();
- }
- catch(com.sun.star.uno.RuntimeException exUno)
- {
- // Any UNO method of this scope can throw this exception.
- // But there is nothing we can do then.
- exUno.printStackTrace();
- }
- }
-
- // ____________________
-
- /**
- * It try to export given document in HTML format.
- * Current document will be converted to HTML and moved to new place on disk.
- * A "new" file will be created by given URL (may be overwritten
- * if it already exist). Right filter will be used automaticly if factory of
- * this document support it. If no valid filter can be found for export,
- * nothing will be done here.
- *
- * @param xDocument document which should be exported
- * @param sURL target URL for converted document
- */
- public static void saveAsHTML(com.sun.star.lang.XComponent xDocument,
- String sURL )
- {
- try
- {
- // First detect factory of this document.
- // Ask for the supported service name of this document.
- // If information is available it can be used to find out wich
- // filter exist for HTML export. Normaly this filter should be searched
- // inside the filter configuration but this little demo doesn't do so.
- // (see service com.sun.star.document.FilterFactory for further
- // informations too)
- // Well known filter names are used directly. They must exist in current
- // office installation. Otherwise this code will fail. But to prevent
- // this code against missing filters it check for existing state of it.
- com.sun.star.lang.XServiceInfo xInfo = (com.sun.star.lang.XServiceInfo)
- UnoRuntime.queryInterface(com.sun.star.lang.XServiceInfo.class,
- xDocument);
-
- if(xInfo!=null)
- {
- // Find out possible filter name.
- String sFilter = null;
- if(xInfo.supportsService("com.sun.star.text.TextDocument")==true)
- sFilter = new String("HTML (StarWriter)");
- else
- if(xInfo.supportsService("com.sun.star.text.WebDocument")==true)
- sFilter = new String("HTML");
- else
- if(xInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")==true)
- sFilter = new String("HTML (StarCalc)");
-
- // Check for existing state of this filter.
- if(sFilter!=null)
- {
- com.sun.star.uno.XComponentContext xCtx =
- OfficeConnect.getOfficeContext();
-
- com.sun.star.container.XNameAccess xFilterContainer =
- (com.sun.star.container.XNameAccess)
- UnoRuntime.queryInterface(
- com.sun.star.container.XNameAccess.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.document.FilterFactory", xCtx));
-
- if(xFilterContainer.hasByName(sFilter)==false)
- sFilter=null;
- }
-
- // Use this filter for export.
- if(sFilter!=null)
- {
- // Export can be forced by saving the document and using a
- // special filter name which can write needed format. Build
- // neccessary argument list now.
- // Use special flag "Overwrite" too, to prevent operation
- // against possible exceptions, if file already exist.
- com.sun.star.beans.PropertyValue[] lProperties =
- new com.sun.star.beans.PropertyValue[2];
- lProperties[0] = new com.sun.star.beans.PropertyValue();
- lProperties[0].Name = "FilterName";
- lProperties[0].Value = sFilter;
- lProperties[1] = new com.sun.star.beans.PropertyValue();
- lProperties[1].Name = "Overwrite";
- lProperties[1].Value = Boolean.TRUE;
-
- com.sun.star.frame.XStorable xStore =
- (com.sun.star.frame.XStorable)UnoRuntime.queryInterface(
- com.sun.star.frame.XStorable.class, xDocument);
-
- xStore.storeAsURL(sURL,lProperties);
- }
- }
- }
- catch(com.sun.star.io.IOException exIO)
- {
- // Can be thrown by "store()" call.
- // Do nothing then. Saving failed - that's it.
- exIO.printStackTrace();
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Can be thrown by any uno call.
- // Do nothing here. Saving failed - that's it.
- exRuntime.printStackTrace();
- }
- catch(com.sun.star.uno.Exception exUno)
- {
- // Can be thrown by "createInstance()" call of service manager.
- // Do nothing here. Saving failed - that's it.
- exUno.printStackTrace();
- }
- }
-
- // ____________________
-
- /**
- * Try to close the document without any saving of modifications.
- * We can try it only! Controller and/or model of this document
- * can disagree with that. But mostly they doesn't do so.
- *
- * @param xDocument document which should be clcosed
- */
- public static void closeDocument(com.sun.star.lang.XComponent xDocument)
- {
- try
- {
- // Check supported functionality of the document (model or controller).
- com.sun.star.frame.XModel xModel =
- (com.sun.star.frame.XModel)UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class, xDocument);
-
- if(xModel!=null)
- {
- // It's a full featured office document.
- // Reset the modify state of it and close it.
- // Note: Model can disgree by throwing a veto exception.
- com.sun.star.util.XModifiable xModify =
- (com.sun.star.util.XModifiable)UnoRuntime.queryInterface(
- com.sun.star.util.XModifiable.class, xModel);
-
- xModify.setModified(false);
- xDocument.dispose();
- }
- else
- {
- // It's a document which supports a controller .. or may by a pure
- // window only. If it's at least a controller - we can try to
- // suspend him. But - he can disagree with that!
- com.sun.star.frame.XController xController =
- (com.sun.star.frame.XController)UnoRuntime.queryInterface(
- com.sun.star.frame.XController.class, xDocument);
-
- if(xController!=null)
- {
- if(xController.suspend(true)==true)
- {
- // Note: Don't dispose the controller - destroy the frame
- // to make it right!
- com.sun.star.frame.XFrame xFrame = xController.getFrame();
- xFrame.dispose();
- }
- }
- }
- }
- catch(com.sun.star.beans.PropertyVetoException exVeto)
- {
- // Can be thrown by "setModified()" call on model.
- // He disagree with our request.
- // But there is nothing to do then. Following "dispose()" call wasn't
- // never called (because we catch it before). Closing failed -that's it.
- exVeto.printStackTrace();
- }
- catch(com.sun.star.lang.DisposedException exDisposed)
- {
- // If an UNO object was already disposed before - he throw this special
- // runtime exception. Of course every UNO call must be look for that -
- // but it's a question of error handling.
- // For demonstration this exception is handled here.
- exDisposed.printStackTrace();
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Every uno call can throw that.
- // Do nothing - closing failed - that's it.
- exRuntime.printStackTrace();
- }
- }
-
- // ____________________
-
- /**
- * Try to close the frame instead of the document.
- * It shows the possible interface to do so.
- *
- * @param xFrame
- * frame which should be clcosed
- *
- * @return <TRUE/> in case frame could be closed
- * <FALSE/> otherwise
- */
- public static boolean closeFrame(com.sun.star.frame.XFrame xFrame)
- {
- boolean bClosed = false;
-
- try
- {
- // first try the new way: use new interface XCloseable
- // It replace the deprecated XTask::close() and should be preferred ...
- // if it can be queried.
- com.sun.star.util.XCloseable xCloseable =
- (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(
- com.sun.star.util.XCloseable.class, xFrame);
- if (xCloseable!=null)
- {
- // We deliver the owner ship of this frame not to the (possible)
- // source which throw a CloseVetoException. We whishto have it
- // under our own control.
- try
- {
- xCloseable.close(false);
- bClosed = true;
- }
- catch( com.sun.star.util.CloseVetoException exVeto )
- {
- bClosed = false;
- }
- }
- else
- {
- // OK: the new way isn't possible. Try the old one.
- com.sun.star.frame.XTask xTask = (com.sun.star.frame.XTask)
- UnoRuntime.queryInterface(com.sun.star.frame.XTask.class,
- xFrame);
- if (xTask!=null)
- {
- // return value doesn't interest here. Because
- // we forget this task ...
- bClosed = xTask.close();
- }
- }
- }
- catch (com.sun.star.lang.DisposedException exDisposed)
- {
- // Of course - this task can be already dead - means disposed.
- // But for us it's not important. Because we tried to close it too.
- // And "already disposed" or "closed" should be the same ...
- bClosed = true;
- }
-
- return bClosed;
- }
-
- // ____________________
-
- /**
- * Try to find an unique frame name, which isn't currently used inside
- * remote office instance. Because we create top level frames
- * only, it's enough to check the names of existing child frames on the
- * desktop only.
- *
- * @return [String]
- * should represent an unique frame name, which currently isn't
- * used inside the remote office frame tree
- * (Couldn't guaranteed for a real multithreaded environment.
- * But we try it ...)
- */
- private static final String BASEFRAMENAME = "Desk View ";
-
- public static String getUniqueFrameName()
- {
- String sName = null;
-
- com.sun.star.uno.XComponentContext xCtx = OfficeConnect.getOfficeContext();
-
- try
- {
- com.sun.star.frame.XFramesSupplier xSupplier =
- (com.sun.star.frame.XFramesSupplier)UnoRuntime.queryInterface(
- com.sun.star.frame.XFramesSupplier.class,
- xCtx.getServiceManager().createInstanceWithContext(
- "com.sun.star.frame.Desktop", xCtx));
-
- com.sun.star.container.XIndexAccess xContainer =
- (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XIndexAccess.class,
- xSupplier.getFrames());
-
- int nCount = xContainer.getCount();
- for (int i=0; i<nCount; ++i )
- {
- com.sun.star.frame.XFrame xFrame = (com.sun.star.frame.XFrame)AnyConverter.toObject(new com.sun.star.uno.Type(com.sun.star.frame.XFrame.class), xContainer.getByIndex(i));
- sName = new String(BASEFRAMENAME+mnViewCount);
- while(sName.compareTo(xFrame.getName())==0)
- {
- ++mnViewCount;
- sName = new String(BASEFRAMENAME+mnViewCount);
- }
- }
- }
- catch(com.sun.star.uno.Exception exCreateFailed)
- {
- sName = new String(BASEFRAMENAME);
- }
-
- if (sName==null)
- {
- System.out.println("invalid name!");
- sName = new String(BASEFRAMENAME);
- }
-
- return sName;
- }
-
- // ____________________
-
- /**
- * helper to get a file URL selected by user
- * This method doesn't show any API concepts ...
- * but is neccessary rof this demo application.
- *
- * @param aParent parent window of this dialog
- * @param bOpen If it is set to true =>
- * dialog is opend in "file open" mode -
- * otherwise in "file save" mode.
- */
- public static String askUserForFileURL(Component aParent,boolean bOpen)
- {
- String sFileURL = null;
- int nDecision = JFileChooser.CANCEL_OPTION;
- JFileChooser aChooser = null;
-
- // set last visited directory on new file chosser
- // (if this information is available)
- if( maLastDir==null )
- aChooser = new JFileChooser();
- else
- aChooser = new JFileChooser(maLastDir);
-
- // decide between file open/save dialog
- if( bOpen==true )
- nDecision = aChooser.showOpenDialog(aParent);
- else
- nDecision = aChooser.showSaveDialog(aParent);
-
- // react for "OK" result only
- if(nDecision == JFileChooser.APPROVE_OPTION)
- {
- // save current directory as last visited one
- maLastDir = aChooser.getCurrentDirectory();
- // get file URL from the dialog
- try
- {
- sFileURL = aChooser.getSelectedFile().toURI().toURL().toExternalForm();
- }
- catch( MalformedURLException ex )
- {
- ex.printStackTrace();
- sFileURL = null;
- }
- // problem of java: file URL's are coded with 1 slash instead of 3 ones!
- // => correct this problem first, otherwise office can't use these URL's
- if(
- ( sFileURL !=null ) &&
- ( sFileURL.startsWith("file:/") ==true ) &&
- ( sFileURL.startsWith("file://")==false )
- )
- {
- StringBuffer sWorkBuffer = new StringBuffer(sFileURL);
- sWorkBuffer.insert(6,"//");
- sFileURL = sWorkBuffer.toString();
- }
- }
-
- return sFileURL;
- }
-
- // ____________________
-
- /**
- * @member maLastDir save the last visited directory of used file open/save dialog
- * @member mnViewCount we try to set unique names on every frame we create (that's why we must count it)
- */
- private static File maLastDir = null;
- private static int mnViewCount = 0 ;
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java
deleted file mode 100644
index 45b02022..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IOnewayLink.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.Vector;
-
-// __________ Implementation __________
-
-/**
- * We need a generic interface to forward any oneway uno interface method
- * by using threads to the original object. Reason:
- * It's not allowed to call synchronoues back to the office if a java object
- * was called in a oneway declared interface method. Then it must be
- * executed asynchronoues. To do so - a thread can be created which use this
- * interface. It get the object, which whis to be called back and the type and
- * parameter of the original request.
- *
- * @author Andreas Schl&uuml;ns
- * @created 17.07.2002 08:09
- */
-public interface IOnewayLink
-{
- // _______________________________
-
- /**
- * @param nRequest
- * The two user of this callback can define an unique number,
- * which identify the type of original interface method. So the called
- * interface object can decide, which action will be neccessary.
- *
- * @param lParams
- * If the original method used parameters, they will be coded here in
- * a generic way. Only the called interface object know (it depends
- * from the original request - see nRequest too), how this list must
- * be interpreted.
- * Note: Atomic types (e.g. int, long) will be transported as objects
- * too (Integer, Long)!
- */
- public abstract void execOneway( int nRequest, Vector lParams );
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IShutdownListener.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IShutdownListener.java
deleted file mode 100644
index f80358f0..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/IShutdownListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Implementation __________
-
-/**
- * Listener interface to get information about application shutdown
- * if java virtual machine dies.
- *
- * @author Andreas Schl&uuml;ns
- * @created 03.05.2002 13:51
- */
-public interface IShutdownListener
-{
- public abstract void shutdown();
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Install.txt b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Install.txt
deleted file mode 100644
index fc7c95af..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Install.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-(1) goto "./nativelib/<platform>" directory and build it
-(2) build this directory
-(3) expand your class path to include all jar files of an office installation
- (means all files in path "<officeinst>/program/classes")
-(4) goto "api/<platform>/class"
-(5) copy from an existing java installation the runtime library "jawt" (e.g. jawt.dll for windows)
- into this directory
-(6) copy "api/<platform>/bin/nativelib.dll" (for windows) to "api/<platform>/class"
-(7) start an office : "soffice -accept=socket,host=localhost,port=2083;urp;"
-(8) goto "api/<platform>/class" and start java applet: "java -jar desktop.jar"
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java
deleted file mode 100644
index 36f01ffd..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java
+++ /dev/null
@@ -1,672 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.lang.*;
-import javax.swing.*;
-import java.util.Vector;
-
-// __________ Implementation __________
-
-/**
- * This class can be used to intercept dispatched URL's
- * on any frame used in this demo application.
- * It intercept all URL's wich try to create a new empty frame.
- * (e.g. "private:factory/swriter")
- * Nobody can guarantee that this interception will be realy used -
- * because another interceptor (registered at a later time then this one!)
- * will be called before this one.
- * Implementation is executed inside a new thread to prevent application
- * against possible deadlocks. This deadlocks can occure if
- * synchronous/asynchronous ... normal ones and oneway calls are mixed.
- * Notifications of listener will be oneway mostly - her reactions can
- * be synchronous then. => deadlocks are possible
- *
- * @author Andreas Schl&uuml;ns
- * @created 06.03.2002 09:38
- */
-public class Interceptor implements com.sun.star.frame.XFrameActionListener,
- com.sun.star.frame.XDispatchProviderInterceptor,
- com.sun.star.frame.XDispatchProvider,
- com.sun.star.frame.XDispatch,
- com.sun.star.frame.XInterceptorInfo,
- IShutdownListener,
- IOnewayLink
-{
- // ____________________
-
- /**
- * const
- * All these URL's are intercepted by this implementation.
- */
- private static final String[] INTERCEPTED_URLS = { "private:factory/*" ,
- ".uno:SaveAs" ,
- "slot:5300" ,
- ".uno:Quit" };
-
- // ____________________
-
- /**
- * @member m_xMaster use this interceptor if he doesn't handle queried dispatch request
- * @member m_xSlave we can forward all unhandled requests to this slave interceptor
- * @member m_xFrame intercepted frame
- * @member m_bDead there exist more then one way to finish an object of this class - we must know it sometimes
- */
- private com.sun.star.frame.XDispatchProvider m_xMaster ;
- private com.sun.star.frame.XDispatchProvider m_xSlave ;
- private com.sun.star.frame.XFrame m_xFrame ;
- private boolean m_bIsActionListener ;
- private boolean m_bIsRegistered ;
- private boolean m_bDead ;
-
- // ____________________
-
- /**
- * ctor
- * Initialize the new interceptor. Given frame reference can be used to
- * register this interceptor on it automaticly later.
- *
- * @seealso startListening()
- *
- * @param xFrame
- * this interceptor will register himself at this frame to intercept dispatched URLs
- */
- Interceptor(/*IN*/ com.sun.star.frame.XFrame xFrame)
- {
- m_xFrame = xFrame ;
- m_xSlave = null ;
- m_xMaster = null ;
- m_bIsRegistered = false ;
- m_bIsActionListener = false ;
- m_bDead = false ;
- }
-
- //_____________________
-
- /**
- * start working as frame action listener realy.
- * We will be frame action listener here. In case
- * we get a frame action which indicates, that we should
- * update our interception. Because such using of an interecptor
- * isn't guaranteed - in case a newer one was registered ...
- */
- public void startListening()
- {
- com.sun.star.frame.XFrame xFrame = null;
- synchronized(this)
- {
- if (m_bDead)
- return;
- if (m_xFrame==null)
- return;
- if (m_bIsActionListener==true)
- return;
- xFrame = m_xFrame;
- }
- m_xFrame.addFrameActionListener(this);
- synchronized(this)
- {
- m_bIsActionListener=true;
- }
- }
-
- //_____________________
-
- /**
- * In case we got an oneway listener callback - we had to use the office
- * asynchronous then. This method is the callback from the started thread
- * (started inside the original oneway method). We found all parameters of
- * the original request packed inside a vector. Here we unpack it and
- * call the right internal helper method, which implements the right
- * funtionality.
- *
- * @seealso frameAction()
- * @seealso dispatch()
- *
- * @param nRequest
- * indicates, which was the original request (identifies the
- * original called method)
- *
- * @param lParams
- * the vector with all packed parameters of the original request
- */
- public void execOneway(/*IN*/ int nRequest,/*IN*/ Vector lParams )
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
-
- // was it frameAction()?
- if (nRequest==OnewayExecutor.REQUEST_FRAMEACTION)
- {
- com.sun.star.frame.FrameActionEvent[] lOutAction = new com.sun.star.frame.FrameActionEvent[1];
- Vector[] lInParams = new Vector[1];
- lInParams[0] = lParams;
-
- OnewayExecutor.codeFrameAction( OnewayExecutor.DECODE_PARAMS ,
- lInParams ,
- lOutAction );
- impl_frameAction(lOutAction[0]);
- }
- else
- // was it dispatch()?
- if (nRequest==OnewayExecutor.REQUEST_DISPATCH)
- {
- com.sun.star.util.URL[] lOutURL = new com.sun.star.util.URL[1];
- com.sun.star.beans.PropertyValue[][] lOutProps = new com.sun.star.beans.PropertyValue[1][];
- Vector[] lInParams = new Vector[1];
- lInParams[0] = lParams;
-
- OnewayExecutor.codeDispatch( OnewayExecutor.DECODE_PARAMS ,
- lInParams ,
- lOutURL ,
- lOutProps );
- impl_dispatch(lOutURL[0],lOutProps[0]);
- }
- }
-
- // ____________________
-
- /**
- * call back for frame action events
- * We use it to update our interception. Because if a new component was loaded into
- * the frame or another interceptor was registered, we should refresh our connection
- * to the frame. Otherwhise we can't guarantee full functionality here.
- *
- * Note: Don't react synchronous in an asynchronous listener callback. So use a thread
- * here to update anything.
- *
- * @seealso impl_frameAction()
- *
- * @param aEvent
- * describes the action
- */
- public /*ONEWAY*/ void frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
-
- boolean bHandle = false;
- switch(aEvent.Action.getValue())
- {
- case com.sun.star.frame.FrameAction.COMPONENT_ATTACHED_value : bHandle=true; break;
- case com.sun.star.frame.FrameAction.COMPONENT_DETACHING_value : bHandle=true; break;
- case com.sun.star.frame.FrameAction.COMPONENT_REATTACHED_value : bHandle=true; break;
- // Don't react for CONTEXT_CHANGED here. Ok it indicates, that may another interceptor
- // was registered at the frame ... but if we register ourself there - we get a context
- // changed too :-( Best way to produce a never ending recursion ...
- // May be that somewhere find a safe mechanism to detect own produced frame action events
- // and ignore it.
- case com.sun.star.frame.FrameAction.CONTEXT_CHANGED_value :
- System.out.println("Time to update interception ... but may it will start a recursion. So I let it :-(");
- bHandle=false;
- break;
- }
-
- // ignore some events
- if (! bHandle)
- return;
-
- // pack the event and start thread - which call us back later
- Vector[] lOutParams = new Vector[1];
- com.sun.star.frame.FrameActionEvent[] lInAction = new com.sun.star.frame.FrameActionEvent[1];
- lInAction[0] = aEvent;
-
- OnewayExecutor.codeFrameAction( OnewayExecutor.ENCODE_PARAMS ,
- lOutParams ,
- lInAction );
- OnewayExecutor aExecutor = new OnewayExecutor( (IOnewayLink)this ,
- OnewayExecutor.REQUEST_FRAMEACTION ,
- lOutParams[0] );
- aExecutor.start();
- }
-
- // ____________________
-
- /**
- * Indicates using of us as an interceptor.
- * Now we have to react for the requests, we are registered.
- * That means: load new empty documents - triggered by the new menu of the office.
- * Because it's oneway - use thread for loading!
- *
- * @seealso impl_dispatch()
- *
- * @param aURL
- * describes the document, which should be loaded
- *
- * @param lArguments
- * optional parameters for loading
- */
- public /*ONEWAY*/ void dispatch(/*IN*/ com.sun.star.util.URL aURL,/*IN*/ com.sun.star.beans.PropertyValue[] lArguments)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
-
- Vector[] lOutParams = new Vector[1];
- com.sun.star.util.URL[] lInURL = new com.sun.star.util.URL[1];
- com.sun.star.beans.PropertyValue[][] lInArguments = new com.sun.star.beans.PropertyValue[1][];
- lInURL[0] = aURL ;
- lInArguments[0] = lArguments;
-
- OnewayExecutor.codeDispatch( OnewayExecutor.ENCODE_PARAMS ,
- lOutParams ,
- lInURL ,
- lInArguments );
- OnewayExecutor aExecutor = new OnewayExecutor( (IOnewayLink)this ,
- OnewayExecutor.REQUEST_DISPATCH ,
- lOutParams[0] );
- aExecutor.start();
- }
-
-
- //_____________________
-
- /**
- * Internal call back for frame action events, triggered by the used
- * OnewayExecutor thread we started in frameAction().
- * We use it to update our interception on the internal saved frame.
- *
- * @param aEvent
- * describes the action
- */
- public void impl_frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
-
- // deregistration will be done everytime ...
- // But may it's not neccessary to establish a new registration!
- // Don't look for ignoring actions - it was done already inside original frameAction() call!
- boolean bRegister = false;
-
- // analyze the event and decide which reaction is usefull
- switch(aEvent.Action.getValue())
- {
- case com.sun.star.frame.FrameAction.COMPONENT_ATTACHED_value : bRegister = true ; break;
- case com.sun.star.frame.FrameAction.COMPONENT_REATTACHED_value : bRegister = true ; break;
- case com.sun.star.frame.FrameAction.COMPONENT_DETACHING_value : bRegister = false; break;
- }
-
- com.sun.star.frame.XFrame xFrame = null ;
- boolean bIsRegistered = false;
- synchronized(this)
- {
- bIsRegistered = m_bIsRegistered;
- m_bIsRegistered = false;
- xFrame = m_xFrame;
- }
-
- com.sun.star.frame.XDispatchProviderInterception xRegistration = (com.sun.star.frame.XDispatchProviderInterception)UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProviderInterception.class,
- xFrame);
-
- if(xRegistration==null)
- return;
-
- if (bIsRegistered)
- xRegistration.releaseDispatchProviderInterceptor(this);
-
- if (! bRegister)
- return;
-
- xRegistration.registerDispatchProviderInterceptor(this);
- synchronized(this)
- {
- m_bIsRegistered = true;
- }
- }
-
- // ____________________
-
- /**
- * Implementation of interface XDispatchProviderInterceptor
- * These functions are used to build a list of interceptor objects
- * connected in both ways.
- * Searching for a right interceptor is made by forwarding any request
- * from toppest master to lowest slave of this hierarchy.
- * If an interceptor whish to handle the request he can break that
- * and return himself as a dispatcher.
- */
- public com.sun.star.frame.XDispatchProvider getSlaveDispatchProvider()
- {
- synchronized(this)
- {
- return m_xSlave;
- }
- }
-
- // ____________________
-
- public void setSlaveDispatchProvider(com.sun.star.frame.XDispatchProvider xSlave)
- {
- synchronized(this)
- {
- m_xSlave = xSlave;
- }
- }
-
- // ____________________
-
- public com.sun.star.frame.XDispatchProvider getMasterDispatchProvider()
- {
- synchronized(this)
- {
- return m_xMaster;
- }
- }
-
- // ____________________
-
- public void setMasterDispatchProvider(com.sun.star.frame.XDispatchProvider xMaster)
- {
- synchronized(this)
- {
- m_xMaster = xMaster;
- }
- }
-
- // ____________________
-
- /**
- * Implementation of interface XDispatchProvider
- * These functions are called from our master if he willn't handle the outstanding request.
- * Given parameter should be checked if they are right for us. If it's true, the returned
- * dispatcher should be this implementation himself; otherwise call should be forwarded
- * to the slave.
- *
- * @param aURL
- * describes the request, which should be handled
- *
- * @param sTarget
- * specifies the target frame for this request
- *
- * @param nSearchFlags
- * optional search flags, if sTarget isn't a special one
- *
- * @return [XDispatch]
- * a dispatch object, which can handle the given URL
- * May be NULL!
- */
- public com.sun.star.frame.XDispatch queryDispatch(/*IN*/ com.sun.star.util.URL aURL,/*IN*/ String sTarget,/*IN*/ int nSearchFlags)
- {
- synchronized(this)
- {
- if (m_bDead)
- return null;
- }
-
- // intercept loading empty documents into new created frames
- if(
- (sTarget.compareTo ("_blank" ) == 0 ) &&
- (aURL.Complete.startsWith("private:factory") == true)
- )
- {
- System.out.println("intercept private:factory");
- return this;
- }
-
- // intercept opening the SaveAs dialog
- if (aURL.Complete.startsWith(".uno:SaveAs") == true)
- {
- System.out.println("intercept SaveAs by returning null!");
- return null;
- }
-
- // intercept "File->Exit" inside the menu
- if (
- (aURL.Complete.startsWith("slot:5300") == true) ||
- (aURL.Complete.startsWith(".uno:Quit") == true)
- )
- {
- System.out.println("intercept File->Exit");
- return this;
- }
-
- synchronized(this)
- {
- if (m_xSlave!=null)
- return m_xSlave.queryDispatch(aURL, sTarget, nSearchFlags);
- }
-
- return null;
- }
-
- // ____________________
-
- public com.sun.star.frame.XDispatch[] queryDispatches(/*IN*/ com.sun.star.frame.DispatchDescriptor[] lDescriptor)
- {
- synchronized(this)
- {
- if (m_bDead)
- return null;
- }
- // Resolve any request seperatly by using own "dispatch()" method.
- // Note: Don't pack return list if "null" objects occure!
- int nCount = lDescriptor.length;
- com.sun.star.frame.XDispatch[] lDispatcher = new com.sun.star.frame.XDispatch[nCount];
- for(int i=0; i<nCount; ++i)
- {
- lDispatcher[i] = queryDispatch(lDescriptor[i].FeatureURL ,
- lDescriptor[i].FrameName ,
- lDescriptor[i].SearchFlags);
- }
- return lDispatcher;
- }
-
- // ____________________
-
- /**
- * This method is called if this interceptor "wins the request".
- * We intercepted creation of new frames and loading of empty documents.
- * Do it now.
- *
- * @param aURL
- * describes the document
- *
- * @param lArguments
- * optional arguments for loading
- */
- public void impl_dispatch(/*IN*/ com.sun.star.util.URL aURL,/*IN*/ com.sun.star.beans.PropertyValue[] lArguments)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
-
- if (
- (aURL.Complete.startsWith("slot:5300") == true) ||
- (aURL.Complete.startsWith(".uno:Quit") == true)
- )
- {
- System.exit(0);
- }
- else
- if (aURL.Complete.startsWith("private:factory") == true)
- {
- // Create view frame for showing loaded documents on demand.
- // The visible state is neccessary for JNI functionality to get the HWND and plug office
- // inside a java window hierarchy!
- DocumentView aNewView = new DocumentView();
- aNewView.setVisible(true);
- aNewView.createFrame();
- aNewView.load(aURL.Complete,lArguments);
- }
- }
-
- // ____________________
-
- /**
- * Notification of status listener isn't guaranteed (instead of listener on XNotifyingDispatch interface).
- * So this interceptor doesn't support that realy ...
- */
- public /*ONEWAY*/ void addStatusListener(/*IN*/ com.sun.star.frame.XStatusListener xListener,/*IN*/ com.sun.star.util.URL aURL)
- {
-/* if (aURL.Complete.startsWith(".uno:SaveAs")==true)
- {
- com.sun.star.frame.FeatureStateEvent aEvent = new com.sun.star.frame.FeatureStateEvent(
- this,
- aURL,
- "",
- false,
- false,
- null);
- if (xListener!=null)
- {
- System.out.println("interceptor disable SavAs by listener notify");
- xListener.statusChanged(aEvent);
- }
- }*/
- }
-
- // ____________________
-
- public /*ONEWAY*/ void removeStatusListener(/*IN*/ com.sun.star.frame.XStatusListener xListener,/*IN*/ com.sun.star.util.URL aURL)
- {
- }
-
- // ____________________
-
- /**
- * Implements (optional!) optimization for interceptor mechanism.
- * Any interceptor which provides this special interface is called automaticly
- * at registration time on this method. Returned URL's will be used to
- * call this interceptor directly without calling his masters before, IF(!)
- * following rules will be true:
- * (1) every master supports this optional interface too
- * (2) nobody of these masters whish to intercept same URL then this one
- * This interceptor whish to intercept creation of new documents.
- */
- public String[] getInterceptedURLs()
- {
- return INTERCEPTED_URLS;
- }
-
- // ____________________
-
- /**
- * This class listen on the intercepted frame to free all used ressources on closing.
- * We forget the reference to the frame only here. Deregistration
- * isn't neccessary here - because this frame dies and wish to forgoten.
- *
- * @param aSource
- * must be our internal saved frame, on which we listen for frame action events
- */
- public /*ONEAY*/ void disposing(/*IN*/ com.sun.star.lang.EventObject aSource)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- if (m_xFrame!=null && UnoRuntime.areSame(aSource.Source,m_xFrame))
- {
- m_bIsActionListener = false;
- m_xFrame = null ;
- }
- }
- shutdown();
- }
-
- // ____________________
-
- /**
- * If this java application shutdown - we must cancel all current existing
- * listener connections. Otherwhise the office will run into some
- * DisposedExceptions if it tries to use these forgotten listener references.
- * And of course it can die doing that.
- * We are registered at a central object to be informed if the VM will exit.
- * So we can react.
- */
- public void shutdown()
- {
- com.sun.star.frame.XFrame xFrame = null ;
- boolean bIsRegistered = false;
- boolean bIsActionListener = false;
- synchronized(this)
- {
- // don't react a second time here!
- if (m_bDead)
- return;
- m_bDead = true;
-
- bIsRegistered = m_bIsRegistered;
- m_bIsRegistered = false;
-
- bIsActionListener = m_bIsActionListener;
- m_bIsActionListener = false;
-
- xFrame = m_xFrame;
- m_xFrame = null;
- }
-
- // it's a good idead to cancel listening for frame action events
- // before(!) we deregister us as an interceptor.
- // Because registration and deregistratio nof interceptor objects
- // will force sending of frame action events ...!
- if (bIsActionListener)
- xFrame.removeFrameActionListener(this);
-
- if (bIsRegistered)
- {
- com.sun.star.frame.XDispatchProviderInterception xRegistration = (com.sun.star.frame.XDispatchProviderInterception)UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProviderInterception.class,
- xFrame);
-
- if(xRegistration!=null)
- xRegistration.releaseDispatchProviderInterceptor(this);
- }
-
- xFrame = null;
-
- synchronized(this)
- {
- m_xMaster = null;
- m_xSlave = null;
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java
deleted file mode 100644
index 1e05e12d..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.*;
-
-
-/** <p>Class to pass the system window handle to the OpenOffice.org toolkit.</p>
- */
-class JavaWindowPeerFake implements com.sun.star.awt.XSystemDependentWindowPeer,
- com.sun.star.awt.XWindowPeer
-{
- NativeView maView;
-
- public JavaWindowPeerFake(NativeView aNative)
- {
- maView = aNative;
- }
-
- // ____________________
- /**
- * Implementation of XSystemDependentWindowPeer (that's all we really need).
- * This method is called back from the Office toolkit to retrieve the system data.
- */
- public java.lang.Object getWindowHandle(byte[] aProcessId, short aSystem)
- throws com.sun.star.uno.RuntimeException
- {
- Object aReturn = null;
- if(aSystem==maView.maSystem)
- aReturn = (Object)maView.maHandle;
- return aReturn;
- }
-
- /** not really neaded.
- */
- public com.sun.star.awt.XToolkit getToolkit()
- throws com.sun.star.uno.RuntimeException
- {
- return null;
- }
-
- public void setPointer(com.sun.star.awt.XPointer xPointer)
- throws com.sun.star.uno.RuntimeException
- {
- }
-
- public void setBackground(int nColor)
- throws com.sun.star.uno.RuntimeException
- {
- }
-
- public void invalidate(short nFlags)
- throws com.sun.star.uno.RuntimeException
- {
- }
-
- public void invalidateRect(com.sun.star.awt.Rectangle aRect,short nFlags)
- throws com.sun.star.uno.RuntimeException
- {
- }
-
- public void dispose()
- throws com.sun.star.uno.RuntimeException
- {
- }
-
- public void addEventListener(com.sun.star.lang.XEventListener xListener)
- throws com.sun.star.uno.RuntimeException
- {
- }
-
- public void removeEventListener(com.sun.star.lang.XEventListener xListener)
- throws com.sun.star.uno.RuntimeException
- {
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile
deleted file mode 100644
index bbabb215..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile
+++ /dev/null
@@ -1,128 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevDestopEnvironment example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevDesktopEnv
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=DesktopExample
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-APP1_JAVAFILES = \
- CustomizeView.java \
- Desk.java \
- DocumentView.java \
- FunctionHelper.java \
- Interceptor.java \
- IOnewayLink.java \
- IShutdownListener.java \
- JavaWindowPeerFake.java \
- NativeView.java \
- OfficeConnect.java \
- OnewayExecutor.java \
- StatusListener.java \
- StatusView.java \
- ViewContainer.java
-
-APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP1_JAVAFILES))
-APP1_CLASSNAMES = $(patsubst %.java,%.class,$(APP1_JAVAFILES)) \
- CustomizeView$(QUOTE)$$ClickListener.class \
- DocumentView$(QUOTE)$$1.class \
- DocumentView$(QUOTE)$$Reactor.class
-
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-ifeq "$(OS)" "WIN"
-SUBDIR= nativelib/windows
-else
-SUBDIR= nativelib/unix
-endif
-
-# Targets
-.PHONY: ALL
-ALL : $(SUBDIR) \
- $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-.PHONY : $(SUBDIR)
-$(SUBDIR) :
- $(MAKE) -C $@
-
-$(APP1_CLASSFILES) : $(APP1_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $(APP1_JAVAFILES)
-
-$(OUT_APP_CLASS)/$(APP1_NAME).mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: Desk>> $@
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(APP1_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP1_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) DesktopExample.run
- @echo ------
- @echo If you want to run the $(JAR1_JAR) file please set your
- @echo CLASSPATH = $(SDK_CLASSPATH)
- @echo Start the example with jar -jar $(JAR1_JAR)
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- $(MAKE) -C $(SUBDIR) clean
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java
deleted file mode 100644
index e727270b..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/NativeView.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import java.awt.*;
-import java.lang.*;
-import java.awt.event.*;
-
-// __________ Implementation __________
-
-/**
- * Class to pass the system window handle to the OpenOffice.org toolkit.
- * It use special JNI methods to get the system handle of used java window.
- *
- * Attention!
- * Use JNI functions on already visible canvas objects only!
- * Otherwise they can make some trouble.
- *
- * @author Andreas Schl&uuml;ns
- * @created 22.02.2002 08:47
- */
-
-public class NativeView extends java.awt.Canvas
-{
- // ____________________
-
- /**
- * ctor
- * Does nothing realy.
- * We can use our JNI mechanism for an already visible
- * canvas only. So we overload the method for showing ("setVisible()")
- * and make our intialization there. BUt we try to show an empty clean
- * window till there.
- */
- public NativeView()
- {
- maHandle = null;
- maSystem = 0;
- this.setBackground(Color.white);
- }
-
- // ____________________
-
- /**
- * Overload this method to make neccessary initializations here.
- * (e.g. get the window handle and neccessary system informations)
- *
- * Why here?
- * Because the handle seams to be available for already visible windows
- * only. So it's the best place to get it. Special helper method
- * can be called more then ones - but call native code one times only
- * and safe the handle and the system type on our members maHandle/maSystem!
- */
- public void setVisible(boolean bState)
- {
- getHWND();
- }
-
- // ____________________
-
- /**
- * to guarantee right resize handling inside a swing container
- * (e.g. JSplitPane) we must provide some informations about our
- * prefered/minimum and maximum size.
- */
- public Dimension getPreferredSize()
- {
- return new Dimension(500,300);
- }
-
- public Dimension getMaximumSize()
- {
- return new Dimension(1024,768);
- }
-
- public Dimension getMinimumSize()
- {
- return new Dimension(100,100);
- }
-
- // ____________________
-
- /**
- * overload paint routine to show provide against
- * repaint errors if no office view is realy plugged
- * into this canvas.
- * If handle is present - we shouldn't paint anything further.
- * May the remote window is already plugged. In such case we
- * shouldn't paint it over.
- */
- public void paint(Graphics aGraphic)
- {
- if(maHandle==null)
- {
- Dimension aSize = getSize();
- aGraphic.clearRect(0,0,aSize.width,aSize.height);
- }
- }
-
- // ____________________
-
- /**
- * JNI interface of this class
- * These two methods are implemented by using JNI mechanismen.
- * The will be used to get the platform dependent window handle
- * of a java awt canvas. This handle can be used to create an office
- * window as direct child of it. So it's possible to plug Office
- * windows in a java UI container.
- *
- * Note:
- * Native code for windows register special function pointer to handle
- * window messages ... But if it doesn't check for an already registered
- * instance of this handler it will do it twice and produce a stack overflow
- * because such method call herself in a never ending loop ...
- * So we try to use the JNI code one times only and safe already getted
- * informations inside this class.
- */
- public native int getNativeWindowSystemType();
- private native long getNativeWindow(); // private! => use getHWND() with cache mechanism!
-
- public Integer getHWND()
- {
- if(maHandle==null)
- {
- maHandle = new Integer((int)getNativeWindow());
- maSystem = getNativeWindowSystemType();
- }
- return maHandle;
- }
-
- // ____________________
-
- /**
- * for using of the JNI methods it's neccessary to load
- * system library which exports it.
- */
- static
- {
- System.loadLibrary("nativeview");
- }
-
- // ____________________
-
- /**
- * @member maHandle system window handle
- * @member maSystem info about currently used platform
- */
- public Integer maHandle ;
- public int maSystem ;
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java
deleted file mode 100644
index f4bc5554..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OfficeConnect.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Any;
-
-import java.lang.String;
-
-
-// __________ Implementation __________
-
-/**
- * support ONE singleton uno connection to an running office installation!
- * Can be used to open/use/close connection to uno environment of an office. If
- * necessary a new office instance is started.
- * ctor isn't available from outside. You should call static function
- * "getConnection()" to open or use internal set connection which is created one
- * times only.
- *
- * @author Andreas Schl&uuml;ns
- * @created 7. Februar 2002
- * @modified 05.02.2002 12:10
- */
-public class OfficeConnect
-{
- // ____________________
-
- /**
- * At first call we create static connection object and open connection to an
- * office - anew offic einstance is started if necessary
- * Then - and for all further requests we return these static connection member.
- */
- public static synchronized void createConnection()
- {
- if (maConnection == null)
- maConnection = new OfficeConnect();
- }
-
- // ____________________
-
- /**
- * close connection to remote office if it exist
- */
- public static synchronized void disconnect()
- {
- if(maConnection!=null)
- {
- mxServiceManager=null;
- mxOfficeContext=null;
- maConnection=null;
- }
- }
-
- // ____________________
-
- /**
- * ctor
- * We try to open the connection in our ctor ... transparently for user.
- * After it was successfully you will find an internal set member
- * m_xRemoteContext wich means remote component context of the connected office.
- * The context can be used to get the remote service manager from the office.
- * We made it private to support singleton pattern of these implementation.
- * see getConnection() for further informations
- */
- private OfficeConnect()
- {
- try
- {
- // get the remote office context. If necessary a new office
- // process is started
- mxOfficeContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- mxServiceManager = mxOfficeContext.getServiceManager();
- }
- catch (java.lang.Exception ex)
- {
- System.err.println("connection failed" + ex);
- ex.printStackTrace(System.out);
- System.exit(1);
-
- }
- }
-
- // ____________________
-
- /**
- * create uno components inside remote office process
- * After connection of these proccess to a running office we have access to
- * remote service manager of it.
- * So we can use it to create all existing services. Use this method to create
- * components by name and get her interface. Casting of it to right target
- * interface is part of your implementation.
- *
- * @param aType describe class type of created service
- * Returned object can be casted directly to this one.
- * Uno query was done by this method automaticly.
- * @param sServiceSpecifier name of service which should be created
- * @return the new created service object
- */
- public static synchronized Object createRemoteInstance(
- Class aType, String sServiceSpecifier)
- {
- Object aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(aType,
- mxServiceManager.createInstanceWithContext(
- sServiceSpecifier, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type "
- + sServiceSpecifier + ": " + ex);
- System.exit(0);
- }
- return aResult;
- }
-
- // ____________________
-
- /**
- * same as "createRemoteInstance()" but supports additional parameter for
- * initializing created object
- *
- * @param lArguments optional arguments
- * They are used to initialize new created service.
- * @param aType Description of Parameter
- * @param sServiceSpecifier Description of Parameter
- * @return the new create service object
- */
- public static synchronized Object createRemoteInstanceWithArguments(
- Class aType, String sServiceSpecifier, Any[] lArguments)
- {
- Object aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(aType,
- mxServiceManager.createInstanceWithArgumentsAndContext(
- sServiceSpecifier, lArguments, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type "
- + sServiceSpecifier + ": " + ex);
- System.exit(0);
- }
- return aResult;
- }
-
- // ____________________
-
- /**
- * returns remote component context of the connected office
- */
- public static synchronized com.sun.star.uno.XComponentContext getOfficeContext()
- {
- return mxOfficeContext;
- }
-
- // ____________________
-
- /**
- * member
- */
- // singleton connection instance
- private static OfficeConnect maConnection;
-
- // reference to the office component context
- private static com.sun.star.uno.XComponentContext mxOfficeContext;
- // reference to remote service manager of singleton connection object
- private static com.sun.star.lang.XMultiComponentFactory mxServiceManager;
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java
deleted file mode 100644
index c98045d9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.Vector;
-
-// __________ Implementation __________
-
-/**
- * It's not allowed to call synchronoues back inside an oneway interface call.
- * (see IOnewayLink too). So we start a thread (implemented by this class), which
- * gets all neccessary parameters from the original called object and
- * call it back later inside his run() method. So the execution of such oneway call
- * will be asynchronous. It works in a generic way and can be used or any type
- * of oneway request. Because the source and the target of this call-link knows,
- * which method was used and which parameters must be handled.
- *
- * @author Andreas Schl&uuml;ns
- * @created 17.07.2002 08:18
- */
-class OnewayExecutor extends Thread
-{
- // _______________________________
-
- /**
- * const
- * We define some request for some well known oneway interface
- * calls here too. So they mustn't be declared more then ones.
- * Of course it's not necessary to use it ... but why not :-)
- */
-
- public static final int REQUEST_FRAMEACTION = 1 ;
- public static final int REQUEST_STATUSCHANGED = 2 ;
- public static final int REQUEST_ADDSTATUSLISTENER = 3 ;
- public static final int REQUEST_REMOVESTATUSLISTENER = 4 ;
- public static final int REQUEST_DISPATCH = 5 ;
-
- public static final boolean ENCODE_PARAMS = true ;
- public static final boolean DECODE_PARAMS = false ;
-
- // _______________________________
-
- /**
- * @member m_rLink the object, which wish to be called back by this thread
- * @member m_nRequest describes the type of the original request (means the
- * called oneyway method)
- * @member m_lParams list of parameters of the original request
- */
- private IOnewayLink m_rLink ;
- private int m_nRequest ;
- private Vector m_lParams ;
-
- // _______________________________
-
- /**
- * ctor
- * It's initialize this thread with all neccessary parameters.
- * It gets the object, which wish to be called back and the type
- * and parameters of the original request.
- *
- * @param nRequest
- * The two user of this callback can define an unique number,
- * which identify the type of original interface method.
- * So the called interface object can decide, which action will be
- * neccessary.
- *
- * @param lParams
- * If the original method used parameters, they will be coded here in
- * a generic way. Only the called interface object know (it depends
- * from the original request - see nRequest too), how this list must
- * be interpreted.
- * Note: Atomic types (e.g. int, long) will be transported as objects
- * too (Integer, Long)!
- */
- public OnewayExecutor( IOnewayLink rLink ,
- int nRequest ,
- Vector lParams )
- {
- m_rLink = rLink ;
- m_nRequest = nRequest;
- m_lParams = lParams ;
-
- if (m_rLink==null)
- System.out.println("ctor ... m_rLink == null");
- if (m_lParams==null)
- System.out.println("ctor ... m_lParams == null");
- }
-
- // _______________________________
-
- /**
- * implements the thread function
- * Here we call the internal set link object back and
- * give him all neccessary parameters.
- * After that we die by ouerself ...
- */
- public void run()
- {
- if (m_rLink==null)
- System.out.println("run ... m_rLink == null");
- if (m_lParams==null)
- System.out.println("run ... m_lParams == null");
-
- if (m_rLink!=null)
- m_rLink.execOneway( m_nRequest, m_lParams );
- }
-
- // _______________________________
-
- /**
- * static helper!
- * To make convertion of the generic parameter list to the original
- * one easier - you can use this helper methods. They know how suchlist
- * must be coded. It's not a must to use it - but you can ...
- */
- public static void codeFrameAction(
- boolean bEncode, Vector[] lParams,
- com.sun.star.frame.FrameActionEvent[] aAction)
- {
- if (bEncode)
- {
- lParams[0] = new Vector(1);
- lParams[0].add( (Object)(aAction[0]) );
- }
- else
- {
- aAction[0] = (com.sun.star.frame.FrameActionEvent)
- (lParams[0].elementAt(0));
- }
- }
-
- // _______________________________
-
- public static void codeStatusChanged(
- boolean bEncode, Vector[] lParams,
- com.sun.star.frame.FeatureStateEvent[] aStatus)
- {
- if (bEncode)
- {
- lParams[0] = new Vector(1);
- lParams[0].add( (Object)aStatus[0] );
- }
- else
- {
- aStatus[0] = (com.sun.star.frame.FeatureStateEvent)
- (lParams[0].elementAt(0));
- }
- }
-
- // _______________________________
-
- public static void codeAddOrRemoveStatusListener(
- boolean bEncode, Vector[] lParams,
- com.sun.star.frame.XStatusListener[] xListener,
- com.sun.star.util.URL[] aURL)
- {
- if (bEncode)
- {
- lParams[0] = new Vector(2);
- lParams[0].add( (Object)xListener[0] );
- lParams[0].add( (Object)aURL[0] );
- }
- else
- {
- xListener[0] = (com.sun.star.frame.XStatusListener)
- (lParams[0].elementAt(0));
- aURL[0] = (com.sun.star.util.URL)(lParams[0].elementAt(1));
- }
- }
-
- // _______________________________
-
- public static void codeDispatch(
- boolean bEncode, Vector[] lParams,
- com.sun.star.util.URL[] aURL,
- com.sun.star.beans.PropertyValue[][] lArgs)
- {
- if (bEncode)
- {
- int nLength = lArgs.length+1;
- int nPos = 0;
- lParams[0] = new Vector(nLength);
-
- lParams[0].add( (Object)aURL[0] );
- --nLength;
-
- while (nLength>0)
- {
- lParams[0].add( (Object)lArgs[0][nPos] );
- --nLength;
- ++nPos ;
- }
- }
- else
- {
- int nLength = lParams[0].size()-1;
- int nPos = 0;
-
- lArgs[0] = new com.sun.star.beans.PropertyValue[nLength];
- aURL[0] = (com.sun.star.util.URL)(lParams[0].elementAt(0));
-
- while (nPos<nLength)
- {
- lArgs[0][nPos] = (com.sun.star.beans.PropertyValue)
- (lParams[0].elementAt(nPos+1));
- ++nPos;
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java
deleted file mode 100644
index 25db43df..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.lang.String;
-import java.awt.Component;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import java.util.Vector;
-
-// __________ Implementation __________
-
-/**
- * reacts for status events we listen for
- * We listen for status events to update our UI.
- * To know which event must be used for which UI control
- * we use a special class to do that. Otherwhise we have
- * to guess it ...
- *
- * Further we are frame action listener too.
- * So we can update our status listener connections and
- * internal holded dispatch object automaticly.
- *
- * Another reason for such extra class for listening:
- * Most listener callbacks are asynchronoues [oneay] requests.
- * And it's not allowed to call back synchronously there.
- * So we must start threads for updating something internaly.
- *
- * @author Andreas Schl&uuml;ns
- * @created 15.07.2002 12:36
- */
-class StatusListener implements com.sun.star.frame.XStatusListener,
- com.sun.star.frame.XFrameActionListener,
- IShutdownListener,
- IOnewayLink
-{
- //_____________________
-
- /**
- * @member m_rControl reference to the UI control, which should be updated
- * @member m_sTrueText this text will be shown at the used UI control as description for an enabled status
- * @member m_sFalseText this text will be shown at the used UI control as description for an disabled status
- * @member m_xDispatch if we listen for status events, we must hold the dispatch object alive!
- * @member m_xFrame reference to the frame, which can provide new dispatch objects if it's neccessary to update it
- * @member m_aURL and of course we must be registered for a special URL
- * @member m_bIsActionListener indicates if we are currently registered as a listener for frame action events or not
- * @member m_bIsStatusListener indicates if we are currently registered as a listener for status events or not
- * @member m_bDead there exist more then one way to finish an object of this class - we must know it sometimes
- */
- private Component m_rControl ;
- private String m_sTrueText ;
- private String m_sFalseText ;
- private com.sun.star.frame.XDispatch m_xDispatch ;
- private com.sun.star.frame.XFrame m_xFrame ;
- private com.sun.star.util.URL m_aURL ;
- private boolean m_bIsActionListener;
- private boolean m_bIsStatusListener;
- private boolean m_bDead ;
-
- //_____________________
-
- /**
- * ctor
- * It initialize an instance of this class only.
- * We sett all neccessary informations on our internal member - that's it
- */
- StatusListener( /*IN*/ Component rControl ,
- /*IN*/ String sTrueText ,
- /*IN*/ String sFalseText ,
- /*IN*/ com.sun.star.frame.XFrame xFrame ,
- /*IN*/ String sURL )
- {
- m_rControl = rControl ;
- m_sTrueText = sTrueText ;
- m_sFalseText = sFalseText ;
- m_xFrame = xFrame ;
- m_bIsStatusListener = false ;
- m_bIsActionListener = false ;
- m_bDead = false ;
- // to be perform - we parse the given URL one times only
- // and use it till we die ...
- m_aURL = FunctionHelper.parseURL(sURL);
- }
-
- //_____________________
-
- /**
- * start working as frame action listener realy.
- * In case we get such frame action, it indicates that we should
- * update our internal saved dispatch object on which we listen
- * for status events. So we can do it automaticly. The outside code
- * mustn't check such things. We can work with one frame,
- * till it die. It doesn't matter if he will be used for different
- * load/save or any other requests. We will be up to date everytime.
- */
- public void startListening()
- {
- com.sun.star.frame.XFrame xFrame = null;
- synchronized(this)
- {
- if (m_bDead)
- return;
- if (m_xFrame==null)
- return;
- if (m_bIsActionListener==true)
- return;
- xFrame = m_xFrame;
- }
- xFrame.addFrameActionListener(this);
- synchronized(this)
- {
- m_bIsActionListener=true;
- }
- }
-
- //_____________________
-
- /**
- * In case we got an oneway listener callback - we had to use the office
- * asynchronous then. This method is the callback from the started thread
- * (started inside the original oneway method). We found all parameters of
- * the original request packed inside a vector. Here we unpack it and
- * call the right internal helper method, which implements the right
- * funtionality.
- *
- * @seealso frameAction()
- * @seealso statusChanged()
- *
- * @param nRequest
- * indicates, which was the original request (identifies the
- * original called method)
- *
- * @param lParams
- * the vector with all packed parameters of the original request
- */
- public void execOneway(/*IN*/ int nRequest,/*IN*/ Vector lParams )
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
- // was it frameAction()?
- if (nRequest==OnewayExecutor.REQUEST_FRAMEACTION)
- {
- com.sun.star.frame.FrameActionEvent[] lOutAction = new com.sun.star.frame.FrameActionEvent[1];
- Vector[] lInParams = new Vector[1];
- lInParams[0] = lParams;
-
- OnewayExecutor.codeFrameAction( OnewayExecutor.DECODE_PARAMS ,
- lInParams ,
- lOutAction );
- impl_frameAction(lOutAction[0]);
- }
- }
-
- //_____________________
-
- /**
- * This is the callback method for such frame action events, we listen for.
- * Because it's a oneway method we start a thread as reaction. This thread call
- * us back and we can do neccessary things there.
- * But we shouldn't start such action - if it's not realy neccessary.
- * So we check before, if we are intereested on this event realy.
- *
- * @see impl_frameAction()
- *
- * @param aEvent
- * describes the action, which triggered this event
- */
- public /*ONEWAY*/ void frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
- boolean bHandle = false;
- switch(aEvent.Action.getValue())
- {
- case com.sun.star.frame.FrameAction.COMPONENT_ATTACHED_value : bHandle=true; break;
- case com.sun.star.frame.FrameAction.COMPONENT_DETACHING_value : bHandle=true; break;
- case com.sun.star.frame.FrameAction.COMPONENT_REATTACHED_value : bHandle=true; break;
- case com.sun.star.frame.FrameAction.CONTEXT_CHANGED_value : bHandle=true; break;
- }
-
- if (! bHandle)
- return;
-
- Vector[] lOutParams = new Vector[1];
- com.sun.star.frame.FrameActionEvent[] lInAction = new com.sun.star.frame.FrameActionEvent[1];
- lInAction[0] = aEvent;
-
- OnewayExecutor.codeFrameAction( OnewayExecutor.ENCODE_PARAMS ,
- lOutParams ,
- lInAction );
- OnewayExecutor aExecutor = new OnewayExecutor( (IOnewayLink)this ,
- OnewayExecutor.REQUEST_FRAMEACTION ,
- lOutParams[0] );
- aExecutor.start();
- }
-
- //_____________________
-
- /**
- * This is the callback method for the status we listen for an wish to show it
- * on our UI control. Of yourse it's a oneway method ... but we doesn't call back
- * to the office synchronously here. We update our UI only. So we don't leave this
- * java process. In such case it's not neccessary to use threads to decouple it.
- * Do it here and now ...
- *
- * @param aEvent
- * describes the status, we can use to update our UI control
- */
- public /*ONEWAY*/ void statusChanged(/*IN*/ com.sun.star.frame.FeatureStateEvent aEvent)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
-
- // enable/dsiable th control.
- // Means: If the feature isn't available currently - we can't show an status realy here.
- // Then we should colorize it gray ...
- m_rControl.setEnabled(aEvent.IsEnabled);
-
- // Only if status is enabled we can look for his value!
- if (aEvent.IsEnabled)
- {
- // look for the right type ofthe UI control
- // Following actions depend on it.
-
- //.............................................................
- // it's a check box
- if (m_rControl instanceof JCheckBox)
- {
- JCheckBox aBox = (JCheckBox)m_rControl;
-
- // State must be a boolean value too. Otherwhise must
- // ignore this event.
- if ( ! (aEvent.State instanceof Boolean ) )
- return;
-
- boolean bState = ((Boolean)(aEvent.State)).booleanValue();
- aBox.setSelected(bState);
- if (bState)
- aBox.setText(m_sTrueText);
- else
- aBox.setText(m_sFalseText);
- }
- else
- //.............................................................
- // it's a label
- if (m_rControl instanceof JLabel)
- {
- JLabel aLabel = (JLabel)m_rControl;
-
- // Detect type of state value
- // and set it on internal well known UI control
- // But do it only, if value realy change.
- if(aEvent.State instanceof String)
- {
- String sState = (String)aEvent.State;
- aLabel.setText(sState);
- }
- else
- if(aEvent.State instanceof Boolean)
- {
- boolean bState = ((Boolean)aEvent.State).booleanValue();
- if (bState)
- aLabel.setText(m_sTrueText);
- else
- aLabel.setText(m_sFalseText);
- }
- else
- if(aEvent.State instanceof Float)
- {
- String sState = ((Float)aEvent.State).toString();
- aLabel.setText(sState);
- }
- }
- }
- }
- }
-
- //_____________________
-
- /**
- * Internal call back for frame action events, triggered by the used
- * OnewayExecutor thread we started in frameAction().
- * We use it to update internal saved dispatch object and the corresponding
- * listener connection for status events.
- *
- * @param aEvent
- * describes the action
- */
- public void impl_frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- }
- // Don't look for ignoring actions - it was done already inside original frameAction() call!
- // deregistration as status listener will be done here everytime - but registration only, if neccessary!
- boolean bRegister = false;
- switch(aEvent.Action.getValue())
- {
- case com.sun.star.frame.FrameAction.COMPONENT_ATTACHED_value : bRegister=true ; break;
- case com.sun.star.frame.FrameAction.COMPONENT_DETACHING_value : bRegister=false; break;
- case com.sun.star.frame.FrameAction.COMPONENT_REATTACHED_value : bRegister=true ; break;
- case com.sun.star.frame.FrameAction.CONTEXT_CHANGED_value : bRegister=true ; break;
- }
-
- boolean bIsStatusListener = false;
- com.sun.star.frame.XFrame xFrame = null ;
- com.sun.star.frame.XDispatch xDispatch = null ;
- com.sun.star.util.URL aURL = null ;
- synchronized(this)
- {
- bIsStatusListener = m_bIsStatusListener;
- m_bIsStatusListener = false;
-
- xDispatch = m_xDispatch;
- m_xDispatch = null;
-
- aURL = m_aURL;
- xFrame = m_xFrame;
- }
-
- if (bIsStatusListener)
- xDispatch.removeStatusListener(this,aURL);
- xDispatch = null;
-
- if (! bRegister)
- return;
-
- com.sun.star.frame.XDispatchProvider xProvider = (com.sun.star.frame.XDispatchProvider)UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProvider.class,
- xFrame);
-
- if (xProvider==null)
- return;
-
- xDispatch = xProvider.queryDispatch(aURL,"",0);
-
- if (xDispatch==null)
- return;
-
- xDispatch.addStatusListener(this,aURL);
- synchronized(this)
- {
- m_xDispatch = xDispatch;
- m_bIsStatusListener = true;
- }
- }
-
- // ____________________
-
- /**
- * callback for disposing events
- * Our dispatch or frame object inform us about his following dead ...
- * So we must forget his reference. But it's not neccessary to
- * remove listener connections here. Because the broadcaster
- * forget us automaticly. The only thing we have to do: release
- * his reference and let him die!
- *
- * @param aEvent
- * describes the source which fire this event
- * Must be our internal saved dispatch or frame. Otherwhise
- * somewhere know us without a registration ...
- */
- public /*ONEWAY*/ void disposing(/*IN*/ com.sun.star.lang.EventObject aEvent)
- {
- synchronized(this)
- {
- if (m_bDead)
- return;
- if (m_xFrame!=null && UnoRuntime.areSame(aEvent.Source,m_xFrame))
- {
- m_bIsActionListener = false;
- m_xFrame = null ;
- }
- else
- if (m_xDispatch!=null && UnoRuntime.areSame(aEvent.Source,m_xDispatch))
- {
- m_bIsStatusListener = false;
- m_xDispatch = null ;
- m_aURL = null ;
- }
- }
- shutdown();
- }
-
- // ____________________
-
- /**
- * If this java application shutdown - we must cancel all current existing
- * listener connections. Otherwhise the office will run into some
- * DisposedExceptions if it tries to use these forgotten listener references.
- * And of course it can die doing that.
- * We are registered at a central object to be informed if the VM will exit.
- * So we can react.
- */
- public void shutdown()
- {
- boolean bIsActionListener = false;
- boolean bIsStatusListener = false;
- com.sun.star.frame.XFrame xFrame = null ;
- com.sun.star.frame.XDispatch xDispatch = null ;
- com.sun.star.util.URL aURL = null ;
- synchronized(this)
- {
- // don't react a second time here!
- if (m_bDead)
- return;
- m_bDead = true;
-
- bIsActionListener = m_bIsActionListener;
- m_bIsActionListener = false;
-
- bIsStatusListener = m_bIsStatusListener;
- m_bIsStatusListener = false;
-
- xFrame = m_xFrame;
- m_xFrame = null;
-
- xDispatch = m_xDispatch;
- m_xDispatch = null;
-
- aURL = m_aURL;
- m_aURL = null;
- }
-
- if (bIsStatusListener)
- xDispatch.removeStatusListener(this,aURL);
- xDispatch = null ;
- aURL = null ;
-
- if (bIsActionListener)
- xFrame.removeFrameActionListener(this);
- xFrame = null ;
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java
deleted file mode 100644
index 18e4c1e3..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.awt.*;
-import javax.swing.*;
-import java.lang.String;
-
-// __________ Implementation __________
-
-/**
- * Implement a view to show status informations
- * of currently loaded document of a document view.
- * It use seperate listener threads to get this informations
- * and actualize it automaticly if frame broadcast changes of
- * his contained document.
- * Threads are neccessary to prevent this view against deadlocks.
- * These deadlocks can occure if a listener will be notified
- * by the office in an "oneway" method and try to call back
- * to the office by using a synchronous method.
- * UNO must guarantee order of all these calls ... and if
- * the source of arrived event holds a mutex and our synchronous
- * call needs this mutex too => a deadlock occure.
- * Why? UNO had created a new thread for our synchronous call
- * inside the office process and so exist different threads
- * for this constallation.
- *
- * @author Andreas Schl&uuml;ns
- * @created 20.06.2002 15:08
- */
-public class StatusView extends JPanel
- implements IShutdownListener
-{
- // ____________________
-
- /**
- * const
- * These URL's describe available feature states.
- */
- public static final String FEATUREURL_FONT = "slot:10007";
- public static final String FEATUREURL_SIZE = "slot:10015";
- public static final String FEATUREURL_BOLD = "slot:10009";
- public static final String FEATUREURL_ITALIC = "slot:10008";
- public static final String FEATUREURL_UNDERLINE = "slot:10014";
-
- // ____________________
-
- /**
- * const
- * These values are used to show current state of showed feature.
- */
- public static final String FONT_OFF = "unknown" ;
- public static final String SIZE_OFF = "0.0" ;
- public static final String BOLD_OFF = "-" ;
- public static final String ITALIC_OFF = "-" ;
- public static final String UNDERLINE_OFF = "-" ;
-
- public static final String FONT_ON = "" ;
- public static final String SIZE_ON = "" ;
- public static final String BOLD_ON = "X" ;
- public static final String ITALIC_ON = "X" ;
- public static final String UNDERLINE_ON = "X" ;
-
- // ____________________
-
- /**
- * @member mlaFontValue shows status of font name
- * @member mlaSizeValue shows status of font size
- * @member mlaBoldValue shows status of font style bold
- * @member mlaUnderlineValue shows status of font style underline
- * @member mlaItalicValue shows status of font style italic
- *
- * @member maFontListener threadsafe(!) helper to listen for status event which describe font name
- * @member maSizeListener threadsafe(!) helper to listen for status event which describe font size
- * @member maBoldListener threadsafe(!) helper to listen for status event which describe font style bold
- * @member maUnderlineListener threadsafe(!) helper to listen for status event which describe font style underline
- * @member maItalicListener threadsafe(!) helper to listen for status event which describe font style italic
- */
- private JLabel m_laFontValue ;
- private JLabel m_laSizeValue ;
- private JLabel m_laBoldValue ;
- private JLabel m_laUnderlineValue ;
- private JLabel m_laItalicValue ;
-
- private StatusListener m_aFontListener ;
- private StatusListener m_aSizeListener ;
- private StatusListener m_aBoldListener ;
- private StatusListener m_aUnderlineListener ;
- private StatusListener m_aItalicListener ;
-
- // ____________________
-
- /**
- * ctor
- * Create view controls on startup and initialize it with default values.
- * Filling of view items can be done by special set-methods.
- * We don't start listening here! see setFrame() for that ...
- */
- StatusView()
- {
- this.setLayout(new GridBagLayout());
-
- GridBagConstraints aConstraint = new GridBagConstraints();
- aConstraint.anchor = GridBagConstraints.NORTHWEST;
- aConstraint.insets = new Insets(2,2,2,2);
- aConstraint.gridy = 0;
- aConstraint.gridx = 0;
-
- JLabel laFont = new JLabel("Font" );
- JLabel laSize = new JLabel("Size" );
- JLabel laBold = new JLabel("Bold" );
- JLabel laUnderline = new JLabel("Underline");
- JLabel laItalic = new JLabel("Italic" );
-
- m_laFontValue = new JLabel();
- m_laSizeValue = new JLabel();
- m_laBoldValue = new JLabel();
- m_laUnderlineValue = new JLabel();
- m_laItalicValue = new JLabel();
-
- aConstraint.gridx = 0;
- this.add( laFont, aConstraint );
- aConstraint.gridx = 1;
- this.add( m_laFontValue, aConstraint );
-
- ++aConstraint.gridy;
-
- aConstraint.gridx = 0;
- this.add( laSize, aConstraint );
- aConstraint.gridx = 1;
- this.add( m_laSizeValue, aConstraint );
-
- ++aConstraint.gridy;
-
- aConstraint.gridx = 0;
- this.add( laSize, aConstraint );
- aConstraint.gridx = 1;
- this.add( m_laSizeValue, aConstraint );
-
- ++aConstraint.gridy;
-
- aConstraint.gridx = 0;
- this.add( laBold, aConstraint );
- aConstraint.gridx = 1;
- this.add( m_laBoldValue, aConstraint );
-
- ++aConstraint.gridy;
-
- aConstraint.gridx = 0;
- this.add( laUnderline, aConstraint );
- aConstraint.gridx = 1;
- this.add( m_laUnderlineValue, aConstraint );
-
- ++aConstraint.gridy;
-
- aConstraint.gridx = 0;
- this.add( laItalic, aConstraint );
- aConstraint.gridx = 1;
- this.add( m_laItalicValue, aConstraint );
-
- m_laFontValue.setEnabled (false);
- m_laSizeValue.setEnabled (false);
- m_laBoldValue.setEnabled (false);
- m_laItalicValue.setEnabled (false);
- m_laUnderlineValue.setEnabled(false);
-
- m_laFontValue.setText (FONT_OFF );
- m_laSizeValue.setText (SIZE_OFF );
- m_laBoldValue.setText (BOLD_OFF );
- m_laItalicValue.setText (ITALIC_OFF );
- m_laUnderlineValue.setText(UNDERLINE_OFF);
- }
-
- // ____________________
-
- /**
- * Set new frame for this view and start listening for events imedatly.
- * We create one status listener for every control we whish to update.
- * And because the environment of the frame can be changed - these
- * listener refresh himself internaly for frame action events too.
- * So we register it as such frame action listener only here.
- * Rest is done automaticly ...
- *
- * @param xFrame
- * will be used as source of possible status events
- */
- public void setFrame(com.sun.star.frame.XFrame xFrame)
- {
- if (xFrame==null)
- return;
-
- // create some listener on given frame for available status events
- // Created listener instances will register herself on this frame and
- // show her received informations automaticly on setted UI controls.
- m_aFontListener = new StatusListener(m_laFontValue ,FONT_ON ,FONT_OFF ,xFrame, FEATUREURL_FONT );
- m_aSizeListener = new StatusListener(m_laSizeValue ,SIZE_ON ,SIZE_OFF ,xFrame, FEATUREURL_SIZE );
- m_aBoldListener = new StatusListener(m_laBoldValue ,BOLD_ON ,BOLD_OFF ,xFrame, FEATUREURL_BOLD );
- m_aItalicListener = new StatusListener(m_laItalicValue ,ITALIC_ON ,ITALIC_OFF ,xFrame, FEATUREURL_ITALIC );
- m_aUnderlineListener = new StatusListener(m_laUnderlineValue,UNDERLINE_ON,UNDERLINE_OFF,xFrame, FEATUREURL_UNDERLINE);
-
- m_aFontListener.startListening();
- m_aSizeListener.startListening();
- m_aBoldListener.startListening();
- m_aItalicListener.startListening();
- m_aUnderlineListener.startListening();
- }
-
- // ____________________
-
- /**
- * If this java application shutdown - we must cancel all current existing
- * listener connections. Otherwhise the office will run into some
- * DisposedExceptions if it tries to use these forgotten listener references.
- * And of course it can die doing that.
- * We are registered at a central object to be informed if the VM will exit.
- * So we can react.
- */
- public void shutdown()
- {
- m_aFontListener.shutdown();
- m_aSizeListener.shutdown();
- m_aBoldListener.shutdown();
- m_aItalicListener.shutdown();
- m_aUnderlineListener.shutdown();
-
- m_aFontListener = null;
- m_aSizeListener = null;
- m_aBoldListener = null;
- m_aItalicListener = null;
- m_aUnderlineListener = null;
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java
deleted file mode 100644
index 02f68a05..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.lang.*;
-import java.util.*;
-
-// __________ Implementation __________
-
-/**
- * It's implement a static container which hold
- * all opened documents and her views alive.
- * It's possible to register/deregister such views,
- * to get information about these and it provides
- * some global functionality - like termination of
- * this demo application.
- *
- * @author Andreas Schl&uuml;ns
- * @created 01.03.2002 08:42
- */
-public class ViewContainer extends Thread
-{
- // ____________________
-
- /**
- * provides a singleton view container
- * Neccessary for terminate(9 functionality to be able
- * to call Runtime.runFinilization().
- *
- * @return a reference to the singleton ViewContainer instance
- */
- public static synchronized ViewContainer getGlobalContainer()
- {
- if (maSingleton==null)
- maSingleton=new ViewContainer();
- return maSingleton;
- }
-
- // ____________________
-
- /**
- * ctor
- * It's private - because nobody should create any instance
- * expect the only global one, which wil be created by ourself!
- */
- private ViewContainer()
- {
- mlViews = new Vector();
- mlListener = new Vector();
- mbShutdownActive = false ;
- Runtime.getRuntime().addShutdownHook(this);
- }
-
- // ____________________
-
- /**
- * This register a new view inside this global container
- * (if it doesnt already exist).
- *
- * @param aView view which whish to be registered inside this container
- */
- public void addView(Object aView)
- {
- synchronized(mlViews)
- {
- if(mlViews.contains(aView)==false)
- mlViews.add(aView);
- }
- }
-
- // ____________________
-
- /**
- * This deregister a view from this global container.
- * Normaly it should be the last reference to the view
- * and her finalize() method should be called.
- * If last view will be closed here - we terminate these
- * java application too. Because there is no further
- * visible frame anymore.
- *
- * @param aView
- * view object which wish to be deregistered
- */
- public void removeView(Object aView)
- {
- int nViewCount = 0;
- synchronized(mlViews)
- {
- if(mlViews.contains(aView)==true)
- mlViews.remove(aView);
-
- nViewCount = mlViews.size();
-
- if (nViewCount<1)
- mlViews = null;
- }
- // If this view is a registered shutdown listener on this view container
- // too, we must call his interface and forget him as possible listener.
- // It's neccessary to guarantee his dead ...
- boolean bShutdownView = false;
- synchronized(mlListener)
- {
- bShutdownView = mlListener.contains(aView);
- if (bShutdownView==true)
- mlListener.remove(aView);
- }
- if (bShutdownView==true)
- ((IShutdownListener)aView).shutdown();
-
- // We use a system.exit() to finish the whole application.
- // And further we have registered THIS instance as a possible shutdown
- // hook at the runtime class. So our run() method will be called.
- // Teh our view container should be empty - but
- // our listener container can include some references.
- // These objects wich to be informed then and release e.g. some
- // remote references.
- if (nViewCount<1)
- {
- boolean bNeccessary = false;
- synchronized(this)
- {
- bNeccessary = ! mbShutdownActive;
- }
- if (bNeccessary==true)
- {
- System.out.println("call exit(0)!");
- System.exit(0);
- }
- }
- }
-
- // ____________________
-
- /**
- * add/remove listener for possibe shutdown events
- */
- public void addListener( IShutdownListener rListener )
- {
- synchronized(mlListener)
- {
- if ( ! mlListener.contains(rListener) )
- mlListener.add(rListener);
- }
- }
-
- // ____________________
-
- public void removeListener( IShutdownListener rListener )
- {
- synchronized(mlListener)
- {
- if ( mlListener.contains(rListener) )
- mlListener.remove(rListener);
- }
- }
-
- // ____________________
-
- /**
- * Is called from current runtime system of the java machine
- * on shutdown. We inform all current registered listener and
- * views. They should deinitialize her internal things then.
- */
- public void run()
- {
- synchronized(this)
- {
- if (mbShutdownActive)
- return;
- mbShutdownActive=true;
- }
-
- while( true )
- {
- IShutdownListener aListener = null;
- synchronized(mlListener)
- {
- try{
- aListener = (IShutdownListener)mlListener.firstElement();
- } catch(java.util.NoSuchElementException exEmpty) {}
- }
- if (aListener==null)
- break;
-
- aListener.shutdown();
- // May this listener has dergeistered himself.
- // But if not we must do it for him. Our own
- // method "removeListener()" ignore requests for
- // already gone listener objects.
- removeListener(aListener);
- }
-
- if (mlViews!=null)
- {
- synchronized(mlViews)
- {
- mlViews.clear();
- mlViews = null;
- }
- }
-
- if (mlListener!=null)
- {
- synchronized(mlListener)
- {
- mlListener.clear();
- mlListener = null;
- }
- }
- }
-
- // ____________________
-
- /**
- * @const BASICNAME it's used to create uinque names for all regieterd views
- */
- private static final String BASICNAME = "Document View ";
-
- // ____________________
-
- /**
- * @member mbInplace indicates using of inplace office frames instead of outplace ones
- * @member maSingleton singleton instance of this view container
- * @member mlViews list of all currently registered document views
- * @member mlListener list of all currently registered shutdown listener
- * @member mbShutdownActive if this shutdown hook already was started it's not a good idea to
- * call System.exit() again for other conditions.
- * We supress it by using this variable!
- */
- public static boolean mbInplace = false ;
- private static ViewContainer maSingleton = null ;
- private Vector mlViews ;
- private Vector mlListener ;
- private boolean mbShutdownActive ;
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
deleted file mode 100644
index d2d4e934..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevDesktopEnvironment native library of the Developers Guide.
-
-PRJ=../../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SHL_NAME=nativeview
-SHL_LIBRARY=$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT)
-
-OUT_SHL_SLO=$(OUT_SLO)/nativeview
-
-CFILES = nativeview.c
-
-SLOFILES = $(patsubst %.c,$(OUT_SHL_SLO)/%.$(OBJ_EXT),$(CFILES))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(SHL_LIBRARY)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(LIBRARY_LINK_FLAGS) $(LINK_LIBS) $(LINK_JAVA_LIBS) -o $@ $< \
- -ljawt $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STDC++LIB)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_SHL_SLO))
- -$(DEL) $(subst /,$(PS),$(SHAREDLIB_OUT))$(PS)*$(SHL_NAME)*.*
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c
deleted file mode 100644
index 68be1382..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
-
-#include "jawt.h"
-#include "jawt_md.h"
-#include "nativeview.h"
-
-#define MY_ASSERT(X,S) if (!X) { fprintf(stderr,S); return 0L;}
-
-#define SYSTEM_WIN32 1
-#define SYSTEM_WIN16 2
-#define SYSTEM_JAVA 3
-#define SYSTEM_OS2 4
-#define SYSTEM_MAC 5
-#define SYSTEM_XWINDOW 6
-
-/*****************************************************************************/
-/*
- * Class: NativeView
- * Method: getNativeWindowSystemType
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType
- (JNIEnv * env, jobject obj_this)
-{
- return (SYSTEM_XWINDOW);
-}
-
-/*****************************************************************************/
-/*
- * Class: NativeView
- * Method: getNativeWindow
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow
- (JNIEnv * env, jobject obj_this)
-{
- jboolean result ;
- jint lock ;
- JAWT awt ;
- JAWT_DrawingSurface* ds ;
- JAWT_DrawingSurfaceInfo* dsi ;
- JAWT_X11DrawingSurfaceInfo* dsi_x11 ;
- Drawable drawable;
-
- /* Get the AWT */
- awt.version = JAWT_VERSION_1_3;
- result = JAWT_GetAWT(env, &awt);
- MY_ASSERT(result != JNI_FALSE,"wrong jawt version");
-
- /* Get the drawing surface */
- if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL)
- return 0L;
-
- /* Lock the drawing surface */
- lock = ds->Lock(ds);
- MY_ASSERT((lock & JAWT_LOCK_ERROR)==0,"can't lock the drawing surface");
-
- /* Get the drawing surface info */
- dsi = ds->GetDrawingSurfaceInfo(ds);
-
- /* Get the platform-specific drawing info */
- dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
- drawable = dsi_x11->drawable;
-
- /* Free the drawing surface info */
- ds->FreeDrawingSurfaceInfo(dsi);
- /* Unlock the drawing surface */
- ds->Unlock(ds);
- /* Free the drawing surface */
- awt.FreeDrawingSurface(ds);
-
- return ((jlong)drawable);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h
deleted file mode 100644
index 51642e94..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_openoffice_OpenOffice */
-
-#ifndef _Included_NativeView
-#define _Included_NativeView
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_openoffice_OpenOffice
- * Method: getNativeWindowSystemType
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType
- (JNIEnv *, jobject);
-
-/*
- * Class: org_openoffice_OpenOffice
- * Method: getNativeWindow
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile
deleted file mode 100644
index 7052c2f9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevDesktopEnvironment native library of the Developers Guide.
-
-PRJ=../../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SHL_NAME=nativeview
-SHL_LIBRARY=$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT)
-
-OUT_SHL_SLO=$(OUT_SLO)/nativeview
-OUT_SHL_MISC=$(OUT_MISC)/nativeview
-
-CFILES = nativeview.c
-
-SLOFILES = $(patsubst %.c,$(OUT_SHL_SLO)/%.$(OBJ_EXT),$(CFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(SHL_LIBRARY)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) $(SHL_NAME).def
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_SHL_MISC))
- $(LINK) $(LIBRARY_LINK_FLAGS) /DEF:$(SHL_NAME).def /OUT:$@ \
- /MAP:$(OUT_SHL_MISC)/$(SHL_NAME).map $(LINK_JAVA_LIBS) \
- $(SLOFILES) jawt.lib msvcrt.lib kernel32.lib user32.lib
- $(LINK_MANIFEST)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_SHL_SLO))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_SHL_MISC))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT))$(PS)*$(SHL_NAME)*.*)
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c
deleted file mode 100644
index 28da7c11..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <windows.h>
-
-#include "jawt.h"
-#include "jawt_md.h"
-#include "NativeView.h"
-
-#define MY_ASSERT(X,S) if (!X) { fprintf(stderr,"%s\n",S); return 0L;}
-
-#define SYSTEM_WIN32 1
-#define SYSTEM_WIN16 2
-#define SYSTEM_JAVA 3
-#define SYSTEM_OS2 4
-#define SYSTEM_MAC 5
-#define SYSTEM_XWINDOW 6
-
-// property name to register own window procedure on hwnd
-#define OLD_PROC_KEY "oldwindowproc"
-// signature of this window procedure
-static LRESULT APIENTRY NativeViewWndProc( HWND , UINT , WPARAM , LPARAM );
-
-/*****************************************************************************
- *
- * Class : NativeView
- * Method : getNativeWindowSystemType
- * Signature : ()I
- * Description: returns an identifier for the current operating system
- */
-JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType
- (JNIEnv * env, jobject obj_this)
-{
- return (SYSTEM_WIN32);
-}
-
-/*****************************************************************************
- *
- * Class : NativeView
- * Method : getNativeWindow
- * Signature : ()J
- * Description: returns the native systemw window handle of this object
- */
-JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow
- (JNIEnv * env, jobject obj_this)
-{
- jboolean result ;
- jint lock ;
- JAWT awt ;
- JAWT_DrawingSurface* ds ;
- JAWT_DrawingSurfaceInfo* dsi ;
- JAWT_Win32DrawingSurfaceInfo* dsi_win ;
- HDC hdc ;
- HWND hWnd ;
- LONG hFuncPtr;
-
- /* Get the AWT */
- awt.version = JAWT_VERSION_1_3;
- result = JAWT_GetAWT(env, &awt);
- MY_ASSERT(result!=JNI_FALSE,"wrong jawt version");
-
- /* Get the drawing surface */
- if ((ds = awt.GetDrawingSurface(env, obj_this)) == NULL)
- return 0L;
-
- /* Lock the drawing surface */
- lock = ds->Lock(ds);
- MY_ASSERT((lock & JAWT_LOCK_ERROR)==0,"can't lock the drawing surface");
-
- /* Get the drawing surface info */
- dsi = ds->GetDrawingSurfaceInfo(ds);
-
- /* Get the platform-specific drawing info */
- dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
- hdc = dsi_win->hdc;
- hWnd = dsi_win->hwnd;
-
- /* Free the drawing surface info */
- ds->FreeDrawingSurfaceInfo(dsi);
- /* Unlock the drawing surface */
- ds->Unlock(ds);
- /* Free the drawing surface */
- awt.FreeDrawingSurface(ds);
-
- /* Register own window procedure
- Do it one times only! Otherwhise
- multiple instances will be registered
- and calls on such construct produce
- a stack overflow.
- */
- if (GetProp( hWnd, OLD_PROC_KEY )==0)
- {
- hFuncPtr = SetWindowLong( hWnd, GWL_WNDPROC, (DWORD)NativeViewWndProc );
- SetProp( hWnd, OLD_PROC_KEY, (HANDLE)hFuncPtr );
- }
-
- return ((jlong)hWnd);
-}
-
-/*****************************************************************************
- *
- * Class : -
- * Method : NativeViewWndProc
- * Signature : -
- * Description: registered window handler to intercept window messages between
- * java and office process
- */
-static LRESULT APIENTRY NativeViewWndProc(
- HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- HANDLE hFuncPtr;
-
- /* resize new created child window to fill out the java window complete */
- if (uMsg==WM_PARENTNOTIFY)
- {
- if (wParam == WM_CREATE)
- {
- RECT rect;
- HWND hChild = (HWND) lParam;
-
- GetClientRect(hWnd, &rect);
-
- SetWindowPos(hChild,
- NULL,
- rect.left,
- rect.top,
- rect.right - rect.left,
- rect.bottom - rect.top,
- SWP_NOZORDER);
- }
- }
- /* handle normal resize events */
- else if(uMsg==WM_SIZE)
- {
- WORD newHeight = HIWORD(lParam);
- WORD newWidth = LOWORD(lParam);
- HWND hChild = GetWindow(hWnd, GW_CHILD);
-
- if (hChild != NULL)
- SetWindowPos(hChild, NULL, 0, 0, newWidth, newHeight, SWP_NOZORDER);
- }
-
- /* forward request to original handler which is intercepted by this window procedure */
- hFuncPtr = GetProp(hWnd, OLD_PROC_KEY);
- MY_ASSERT(hFuncPtr,"lost original window proc handler");
- return CallWindowProc( hFuncPtr, hWnd, uMsg, wParam, lParam);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def
deleted file mode 100644
index f9ba2a78..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def
+++ /dev/null
@@ -1,3 +0,0 @@
-EXPORTS
-Java_NativeView_getNativeWindowSystemType
-Java_NativeView_getNativeWindow
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h
deleted file mode 100644
index 51642e94..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_openoffice_OpenOffice */
-
-#ifndef _Included_NativeView
-#define _Included_NativeView
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_openoffice_OpenOffice
- * Method: getNativeWindowSystemType
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType
- (JNIEnv *, jobject);
-
-/*
- * Class: org_openoffice_OpenOffice
- * Method: getNativeWindow
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
deleted file mode 100644
index 5398c817..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.util.XURLTransformer;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.text.XTextDocument;
-
-/*
- *
- * @author Carsten Driesner
- * Provides example code how to enable/disable
- * commands.
- */
-public class DisableCommandsTest extends java.lang.Object {
-
- /*
- * A list of command names
- */
- final static private String[] aCommandURLTestSet =
- {
- new String( "Open" ),
- new String( "About" ),
- new String( "SelectAll" ),
- new String( "Quit" ),
- };
-
- private static XComponentContext xRemoteContext = null;
- private static XMultiComponentFactory xRemoteServiceManager = null;
- private static XURLTransformer xTransformer = null;
- private static XMultiServiceFactory xConfigProvider = null;
-
- /*
- * @param args the command line arguments
- */
- public static void main(String[] args) {
-
- try {
- // get the remote office context. If necessary a new office
- // process is started
- xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xRemoteServiceManager = xRemoteContext.getServiceManager();
-
- Object transformer = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.util.URLTransformer", xRemoteContext );
- xTransformer = (com.sun.star.util.XURLTransformer)
- UnoRuntime.queryInterface(com.sun.star.util.XURLTransformer.class,
- transformer );
-
- Object configProvider = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.configuration.ConfigurationProvider",
- xRemoteContext );
- xConfigProvider = (com.sun.star.lang.XMultiServiceFactory)
- UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, configProvider );
-
- // create a new test document
- Object oDesktop = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xRemoteContext);
-
- XComponentLoader xCompLoader =(XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, oDesktop);
-
- com.sun.star.lang.XComponent xComponent =
- xCompLoader.loadComponentFromURL("private:factory/swriter",
- "_blank", 0, new com.sun.star.beans.PropertyValue[0]);
- {
- XTextDocument xDoc =(XTextDocument)
- UnoRuntime.queryInterface(XTextDocument.class, xComponent);
- xDoc.getText().setString("You can now check the disabled commands. The "
- +"following commands are disabled:\n\n"
- +" Open...\n Exit\n Select All\n "
- +"About StarOffice|OpenOffice\n\nPress "
- + "\"return\" in the shell where you have "
- + "started the example to enable the "
- + "commands!\n\nCheck the commands again and "
- + "press once more \"return\" to finish the "
- + "example and close the document.");
-
- // ensure that the document content is optimal visible
- com.sun.star.frame.XModel xModel =
- (com.sun.star.frame.XModel)UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class, xDoc);
- // get the frame for later usage
- com.sun.star.frame.XFrame xFrame =
- xModel.getCurrentController().getFrame();
-
- com.sun.star.view.XViewSettingsSupplier xViewSettings =
- (com.sun.star.view.XViewSettingsSupplier)UnoRuntime.queryInterface(
- com.sun.star.view.XViewSettingsSupplier.class,
- xModel.getCurrentController());
- xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
- }
- // test document will be closed later
-
- // First we need a defined starting point. So we have to remove
- // all commands from the disabled set!
- enableCommands();
-
- // Check if the commands are usable
- testCommands( false );
-
- // Disable the commands
- disableCommands();
-
- // Now the commands shouldn't be usable anymore
- testCommands( true );
-
- // you can now check the test document and see which commands are
- // disabled
- System.out.println("\nYou can now check the disabled commands.\n"
- +"Please press 'return' to enable the commands!");
- waitForUserInput();
-
- // Remove disable commands to make Office usable again
- enableCommands();
-
- // you can check the test document again and see that the commands
- // are enabled now
- System.out.println("Check again the now enabled commands.\n"
- +"Please press 'return' to finish the example and "
- +"close the document!");
- waitForUserInput();
-
- // close test document
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class,
- xComponent );
-
- if (xCloseable != null ) {
- xCloseable.close(false);
- } else
- {
- xComponent.dispose();
- }
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-
- /**
- * Wait for user input -> until the user press 'return'
- */
- private static void waitForUserInput() throws java.io.IOException {
-
- java.io.BufferedReader reader
- = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
-
- reader.read();
- }
-
- /**
- * Test the commands that we enabled/disabled
- */
- private static void testCommands( boolean bDisabledCmds )
- throws com.sun.star.uno.Exception
- {
- // We need the desktop to get access to the current frame
- Object desktop = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xRemoteContext );
- com.sun.star.frame.XDesktop xDesktop = (com.sun.star.frame.XDesktop)
- UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class, desktop );
- com.sun.star.frame.XFrame xFrame = xDesktop.getCurrentFrame();
- com.sun.star.frame.XDispatchProvider xDispatchProvider = null;
- if ( xFrame != null )
- {
- // We have a frame. Now we need access to the dispatch provider.
- xDispatchProvider =
- (com.sun.star.frame.XDispatchProvider)UnoRuntime.queryInterface(
- com.sun.star.frame.XDispatchProvider.class, xFrame );
- if ( xDispatchProvider != null )
- {
- // As we have the dispatch provider we can now check if we get
- // a dispatch object or not.
- for ( int n = 0; n < aCommandURLTestSet.length; n++ )
- {
- // Prepare the URL
- com.sun.star.util.URL[] aURL = new com.sun.star.util.URL[1];
- aURL[0] = new com.sun.star.util.URL();
- com.sun.star.frame.XDispatch xDispatch = null;
-
- aURL[0].Complete = ".uno:" + aCommandURLTestSet[n];
- xTransformer.parseSmart( aURL, ".uno:" );
-
- // Try to get a dispatch object for our URL
- xDispatch = xDispatchProvider.queryDispatch( aURL[0], "", 0 );
-
- if ( xDispatch != null )
- {
- if ( bDisabledCmds )
- System.out.println(
- "Something is wrong, I got dispatch object for "
- + aURL[0].Complete );
- else
- System.out.println( "Ok, dispatch object for "
- + aURL[0].Complete );
- }
- else
- {
- if ( !bDisabledCmds )
- System.out.println("Something is wrong, I cannot get dispatch object for " + aURL[0].Complete );
- else
- System.out.println( "Ok, no dispatch object for "
- + aURL[0].Complete );
- }
- resetURL( aURL[0] );
- }
- }
- else
- System.out.println( "Couldn't get XDispatchProvider from Frame!" );
- }
- else
- System.out.println( "Couldn't get current Frame from Desktop!" );
- }
-
- /**
- * Ensure that there are no disabled commands in the user layer. The
- * implementation removes all commands from the disabled set!
- */
- private static void enableCommands() {
- // Set the root path for our configuration access
- com.sun.star.beans.PropertyValue[] lParams =
- new com.sun.star.beans.PropertyValue[1];
-
- lParams[0] = new com.sun.star.beans.PropertyValue();
- lParams[0].Name = new String("nodepath");
- lParams[0].Value = "/org.openoffice.Office.Commands/Execute/Disabled";
-
- try {
- // Create configuration update access to have write access to the
- // configuration
- Object xAccess = xConfigProvider.createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationUpdateAccess",
- lParams );
-
- com.sun.star.container.XNameAccess xNameAccess =
- (com.sun.star.container.XNameAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XNameAccess.class, xAccess );
-
- if ( xNameAccess != null ) {
- // We need the XNameContainer interface to remove the nodes by name
- com.sun.star.container.XNameContainer xNameContainer =
- (com.sun.star.container.XNameContainer)
- UnoRuntime.queryInterface(
- com.sun.star.container.XNameContainer.class, xAccess );
-
- // Retrieves the names of all Disabled nodes
- String[] aCommandsSeq = xNameAccess.getElementNames();
- for ( int n = 0; n < aCommandsSeq.length; n++ ) {
- try {
- // remove the node
- xNameContainer.removeByName( aCommandsSeq[n] );
- }
- catch ( com.sun.star.lang.WrappedTargetException e ) {
- }
- catch ( com.sun.star.container.NoSuchElementException e ) {
- }
- }
- }
-
- // Commit our changes
- com.sun.star.util.XChangesBatch xFlush =
- (com.sun.star.util.XChangesBatch)UnoRuntime.queryInterface(
- com.sun.star.util.XChangesBatch.class, xAccess);
-
- xFlush.commitChanges();
- }
- catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Exception detected!" );
- System.out.println( e );
- }
- }
-
- /**
- * Disable all commands defined in the aCommandURLTestSet array
- */
- private static void disableCommands() {
- // Set the root path for our configuration access
- com.sun.star.beans.PropertyValue[] lParams =
- new com.sun.star.beans.PropertyValue[1];
-
- lParams[0] = new com.sun.star.beans.PropertyValue();
- lParams[0].Name = new String("nodepath");
- lParams[0].Value = "/org.openoffice.Office.Commands/Execute/Disabled";
-
- try {
- // Create configuration update access to have write access to the
- // configuration
- Object xAccess = xConfigProvider.createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationUpdateAccess",
- lParams );
-
- com.sun.star.lang.XSingleServiceFactory xSetElementFactory =
- (com.sun.star.lang.XSingleServiceFactory)UnoRuntime.queryInterface(
- com.sun.star.lang.XSingleServiceFactory.class, xAccess );
-
- com.sun.star.container.XNameContainer xNameContainer =
- (com.sun.star.container.XNameContainer)UnoRuntime.queryInterface(
- com.sun.star.container.XNameContainer.class, xAccess );
-
- if ( xSetElementFactory != null && xNameContainer != null ) {
- Object[] aArgs = new Object[0];
-
- for ( int i = 0; i < aCommandURLTestSet.length; i++ ) {
- // Create the nodes with the XSingleServiceFactory of the
- // configuration
- Object xNewElement =
- xSetElementFactory.createInstanceWithArguments( aArgs );
-
- if ( xNewElement != null ) {
- // We have a new node. To set the properties of the node
- // we need the XPropertySet interface.
- com.sun.star.beans.XPropertySet xPropertySet =
- (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class,
- xNewElement );
-
- if ( xPropertySet != null ) {
- // Create a unique node name.
- String aCmdNodeName = new String( "Command-" );
- aCmdNodeName += i;
-
- // Insert the node into the Disabled set
- xPropertySet.setPropertyValue( "Command",
- aCommandURLTestSet[i] );
- xNameContainer.insertByName( aCmdNodeName,
- xNewElement );
- }
- }
- }
-
- // Commit our changes
- com.sun.star.util.XChangesBatch xFlush =
- (com.sun.star.util.XChangesBatch)UnoRuntime.queryInterface(
- com.sun.star.util.XChangesBatch.class, xAccess);
- xFlush.commitChanges();
- }
- }
- catch ( com.sun.star.uno.Exception e )
- {
- System.err.println( "Exception detected!" + e);
- e.printStackTrace();
- }
- }
-
- /**
- * reset URL so it can be reused
- *
- * @param aURL
- * the URL that should be reseted
- */
- private static void resetURL( com.sun.star.util.URL aURL )
- {
- aURL.Protocol = "";
- aURL.User = "";
- aURL.Password = "";
- aURL.Server = "";
- aURL.Port = 0;
- aURL.Path = "";
- aURL.Name = "";
- aURL.Arguments = "";
- aURL.Mark = "";
- aURL.Main = "";
- aURL.Complete = "";
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/Makefile
deleted file mode 100644
index 436871f4..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevDisableCommandsTest example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevDisableCommandsTest
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=DisableCommandsTest
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
deleted file mode 100644
index 85027d0d..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-package OfficeDev.samples.Filter;
-
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.beans.PropertyValue;
-
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.container.XNamed;
-import com.sun.star.document.XImporter;
-import com.sun.star.document.XExporter;
-import com.sun.star.document.XFilter;
-
-
-import com.sun.star.lang.IllegalArgumentException;
-
-/*-************************************************************************
- @title implements a filter to import pure ascii text files
- @description This filter can use an existing In/OutputStream of given
- MediaDescriptor or use an existing URL instead of that
- to open the file directly. But for second case the local
- file system will be used only. There is no support for remote.
-
- During import/export special functionality can be used to
- e.g. to change some characters inside the file content
- or replace some strings (no using of regular expressions!).
- User can decide at runtime which functionality realy should
- be used by selecting it in an extra filter property dialog.
-
- So we show how a filter works fro iport/export, use or create
- streams and how a filter can offer properties for filtering
- which can be edit by the user.
- ************************************************************************-*/
-
-public class AsciiReplaceFilter
-{
-
-
-
- public static class _AsciiReplaceFilter extends WeakBase
- implements XInitialization ,
- XServiceInfo ,
- XNamed ,
- XImporter ,
- XExporter ,
- XFilter
- {
- //______________________________
- // const
-
- // the supported service names, the first one being the service name of the component itself
- public static final String[] m_serviceNames = { "com.sun.star.comp.ansifilter.AsciiReplaceFilter" , "com.sun.star.document.ImportFilter", "com.sun.star.document.ExportFilter" };
-
- // filterprocess states
- public static final int FILTERPROC_RUNS = 0;
- public static final int FILTERPROC_BREAK = 1;
- public static final int FILTERPROC_STOPPED = 2;
-
- //______________________________
- // member
-
-
- /// The initial component context, that gives access to the service manager, supported singletons, ...
- private XComponentContext m_Ctx;
- /// The service manager, that gives access to all registered services and which is passed to the FilterOptions class for instantiating a ucb service
- private XMultiComponentFactory m_xMCF;
- /// we must provide our name
- private String m_sInternalName;
- /// saved document reference for import or export (depends on other member m_bImport!)
- private com.sun.star.text.XTextDocument m_xDocument;
- /// because we implement an import AND an export filter, we must know which one is required
- private boolean m_bImport;
- // we need a flag to cancel any running filter operation
- private int m_nFilterProcState;
-
- //______________________________
- // native interface
- /**
- * special debug helper to get an idea how expensive
- * the implemented filter operations are realy.
- * May be usefully for own purposes.
- *
- * To see the output inside an office environment
- * use "soffice ...params... >output.txt"
- */
- private long m_nStart;
- private long m_nLast ;
-
- private void measure( String sText )
- {
- long nNow = System.currentTimeMillis();
- System.err.println(sText+"\t"+(nNow-m_nStart)+"\t"+(nNow-m_nLast));
- m_nLast = nNow;
- }
-
- //______________________________
- // native interface
- /**
- * The constructor to initialize every instance
- *
- * @param xCompContext
- * the component context of the office
- */
- //ctor
- public _AsciiReplaceFilter(XComponentContext Context )
- {
- measure("ctor started");
- try
- {
- m_Ctx = Context ;
- m_xMCF = m_Ctx.getServiceManager() ;
- }
- catch( Exception e )
- {
- e.printStackTrace();
- }
-
- // these are safe, thus no errorhandling needed:
- m_sInternalName = new String() ;
- m_xDocument = null ;
- m_bImport = true ;
- m_nFilterProcState = FILTERPROC_STOPPED ;
-
- m_nLast = System.currentTimeMillis();
- m_nStart = m_nLast;
- }
-
- //______________________________
- // interface XInitialization
- /**
- * used for initializing after creation
- * If an instance of this service is created by UNO we will be called
- * automaticly after that to get optional parameters of this creation call.
- * E.g.: The service com.sun.star.document.FilterFactory use such mechanism
- * to pass our own configuration data to this instance.
- *
- * @param lArguments
- * This array of arbitrary objects represent our own filter configuration
- * and may optional given parameters of the createWithArguments() call.
- *
- * @throws Exception
- * Every exception will not be handled, but will be
- * passed to the caller.
- */
- public void initialize( Object[] lArguments ) throws com.sun.star.uno.Exception
- {
- measure("initialize {");
-
- if (lArguments.length<1)
- return;
-
- // lArguments[0] = own configuration data
- com.sun.star.beans.PropertyValue[] lConfig = (com.sun.star.beans.PropertyValue[])lArguments[0];
-
- /*
- // lArguments[1..n] = optional arguments of create request
- for (int n=1; n<lArguments.length; ++n)
- {
- }
- */
-
- // analyze own configuration data for our own internal filter name!
- // Important for generic filter services, which are registered more then once.
- // They can use this information to find out, which specialization of it
- // is required.
- for (int i=0; i<lConfig.length; ++i)
- {
- if (lConfig[i].Name.equals("Name"))
- {
- synchronized(this)
- {
- try
- {
- m_sInternalName = AnyConverter.toString(lConfig[i].Value);
- }
- catch(com.sun.star.lang.IllegalArgumentException exConvert) {}
- }
- }
- }
-
- measure("} initialize");
- }
-
- //______________________________
- // interface XNamed
- /**
- * For external user of us we must provide our internal filter name
- * (which is registered inside configuration package TypeDetection).
- * User will be able then to ask there for furthe information about us.
- * Otherwhise we must implement a full featured XPropertySet ...
- *
- * @return our internal filter name of configuration
- */
- public String getName()
- {
- synchronized(this)
- {
- return m_sInternalName;
- }
- }
-
- /**
- * It's not allowed for us - neither very easy to change our internal
- * name during runtime of an office. Because every filter name must
- * be unambigous ...
- * So we doesn't implement this method here.
- */
- public void setName( String sName )
- {
- }
-
- //______________________________
- // interface XImporter
- /**
- * This interface is used to tell us: "you will be used for importing a document".
- * We must save the given model reference to use it inside our own filter request.
- *
- * @param xDocument
- * the document model for importing
- *
- * @throw IllegalArgumentException
- * if given document isn't the right one or seams to be corrupt
- */
- public void setTargetDocument( com.sun.star.lang.XComponent xDocument ) throws com.sun.star.lang.IllegalArgumentException
- {
- measure("setTargetDocument {");
-
- if (xDocument==null)
- throw new com.sun.star.lang.IllegalArgumentException("null reference detected");
-
- com.sun.star.lang.XServiceInfo xInfo = (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
- com.sun.star.lang.XServiceInfo.class, xDocument);
- if ( ! xInfo.supportsService("com.sun.star.text.TextDocument") )
- throw new com.sun.star.lang.IllegalArgumentException( "wrong document type" );
-
- // safe it as target document for import
- // Don't forget to mark this filter used for importing too
- synchronized(this)
- {
- m_xDocument = (com.sun.star.text.XTextDocument)UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xDocument);
- m_bImport = true;
- }
-
- measure("} setTargetDocument");
- }
-
- //______________________________
- // interface XExporter
- /**
- * This interface is used to tell us: "you will be used for exporting a document".
- * We must save the given model reference to use it inside our own filter request.
- *
- * @param xDocument
- * the document model for exporting
- *
- * @throw IllegalArgumentException
- * if given document isn't the right one or seams to be corrupt
- */
- public void setSourceDocument( com.sun.star.lang.XComponent xDocument ) throws com.sun.star.lang.IllegalArgumentException
- {
- measure("setSourceDocument {");
-
- if (xDocument==null)
- throw new com.sun.star.lang.IllegalArgumentException( "null reference given" );
-
- com.sun.star.lang.XServiceInfo xInfo = (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
- com.sun.star.lang.XServiceInfo.class, xDocument);
- if ( ! xInfo.supportsService("com.sun.star.text.TextDocument") )
- throw new com.sun.star.lang.IllegalArgumentException( "wrong document type" );
-
- // safe it as source document for export
- // Don't forget to mark this filter used for exporting too
- synchronized(this)
- {
- m_xDocument = (com.sun.star.text.XTextDocument)UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xDocument);
- m_bImport = false;
- }
-
- measure("} setSourceDocument");
- }
-
-
- //______________________________
- // interface XFilter
- /**
- * Implements the real filter method. We detect if it must be an import or an export.
- * Depends on that we use an existing stream (given inside the MediaDescriptor)
- * or open it by using an URL (must be a part of the descriptor too).
- *
- * @param lDescriptor
- * the MediaDescriptor which describes the document
- *
- * @return a bool value which describes if method was successfully or not.
- */
-
- public boolean filter( com.sun.star.beans.PropertyValue[] lDescriptor )
- {
- measure("filter {");
-
- // first get state of filter operation (import/export)
- // and try to create or get corresponding streams
- // Means: analyze given MediaDescriptor
- // By the way: use synchronized section to get some copies of other
- // internal states too.
- FilterOptions aOptions = null ;
- boolean bImport = false;
- com.sun.star.text.XTextDocument xText = null ;
- synchronized(this)
- {
- aOptions = new FilterOptions(m_xMCF, m_Ctx, m_bImport, lDescriptor);
- bImport = m_bImport;
- xText = m_xDocument;
- }
-
- measure("options analyzed");
-
- if (aOptions.isValid()==false)
- return false;
-
- // start real filtering
- boolean bState = false;
- if (bImport)
- bState = implts_import( xText, aOptions );
- else
- bState = implts_export( xText, aOptions );
-
- measure("} filter");
-
- return bState;
- }
-
- /**
- * Makes the filter process breakable. To do so the outside code may use threads.
- * We use a internal "condition" variable wich is queried by the real filter method on
- * every loop they do. So it's more a polling mechanism.
- */
- public void cancel()
- {
- measure("cancel {");
-
- synchronized(this)
- {
- if (m_nFilterProcState==FILTERPROC_RUNS)
- m_nFilterProcState=FILTERPROC_BREAK;
- }
-
- while (true)
- {
- synchronized(this)
- {
- if (m_nFilterProcState==FILTERPROC_STOPPED)
- break;
- }
- }
-
- measure("} cancel");
- }
-
- //______________________________
- // private helper
- /**
- * This helper function imports a simple ascii text file into
- * a text model. We copy every letter to the document.
- * But if some optional filter options are given
- * we make some changes: replace chars or complete strings.
- *
- * Note: It's not alloed for a filter to seek inside the stream.
- * Because the outside frameloader has to set the stream position
- * right and a filter must read till EOF occures only.
- *
- * @param xTarget
- * the target text model to put the data in
- *
- * @param aOptions
- * capsulate all other neccessary informations for this filter request
- * (streams, replace values ...)
- *
- * @return a bool value which describes if method was successfully or not.
- */
- private boolean implts_import( com.sun.star.text.XTextDocument xTarget ,
- FilterOptions aOptions )
- {
- measure("implts_import {");
-
- com.sun.star.text.XSimpleText xText = (com.sun.star.text.XSimpleText)UnoRuntime.queryInterface(
- com.sun.star.text.XSimpleText.class,
- xTarget.getText());
-
- measure("cast XSimpleText");
-
- boolean bBreaked = false;
-
- try
- {
- StringBuffer sBuffer = new StringBuffer(100000);
- byte[][] lData = new byte[1][];
- int nRead = aOptions.m_xInput.readBytes( lData, 4096 );
-
- measure("read first bytes");
-
- while (nRead>0 && !bBreaked)
- {
- // copy data from stream to temp. buffer
- sBuffer.append( new String(lData[0]) );
- measure("buffer append ["+nRead+"]");
-
- nRead = aOptions.m_xInput.readBytes( lData, 2048 );
- measure("read next bytes");
-
- // check for cancelled filter proc on every loop!
- synchronized(this)
- {
- if (m_nFilterProcState==FILTERPROC_BREAK)
- {
- m_nFilterProcState = FILTERPROC_STOPPED;
- return false;
- }
- }
- measure("break check");
- }
-
- // Make some replacements inside the buffer.
- String sText = implts_replace( sBuffer, aOptions );
- measure("replace");
-
- // copy current buffer to the document model.
- // Create a new paragraph for every line inside original file.
- // May not all data could be readed - but that doesn't matter here.
- // Reason: somewhere cancelled this function.
- // But check for optioanl replace request before ...
- int nStart = 0;
- int nEnd = -1;
- int nLength = sText.length();
-
- com.sun.star.text.XTextRange xCursor = (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class,
- xText.createTextCursor());
-
- while (true)
- {
- nEnd = sText.indexOf('\n',nStart);
-
- if (nEnd==-1 && nStart<nLength)
- nEnd = nLength;
-
- if (nEnd==-1)
- break;
-
- String sLine = sText.substring(nStart,nEnd);
- nStart = nEnd+1;
-
- xText.insertString(xCursor,sLine,false);
- xText.insertControlCharacter(xCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,false);
-
- // check for cancelled filter proc on every loop!
- synchronized(this)
- {
- if (m_nFilterProcState==FILTERPROC_BREAK)
- {
- m_nFilterProcState = FILTERPROC_STOPPED;
- return false;
- }
- }
- measure("break check");
- }
-
- measure("set on model");
-
- // with refreshing the document we are on the safe-side, otherwise the first time the filter is used the document is not fully shown (flaw!).
- com.sun.star.util.XRefreshable xRefresh = (com.sun.star.util.XRefreshable)UnoRuntime.queryInterface(
- com.sun.star.util.XRefreshable.class,
- xTarget);
- xRefresh.refresh();
-
- // If we created used stream - we must close it too.
- if (aOptions.m_bStreamOwner==true)
- {
- aOptions.m_xInput.closeInput();
- measure("stream close");
- }
- }
- catch(com.sun.star.lang.IllegalArgumentException exArgument ) { bBreaked = true; }
- catch(com.sun.star.io.BufferSizeExceededException exExceed ) { bBreaked = true; }
- catch(com.sun.star.io.NotConnectedException exConnect ) { bBreaked = true; }
- catch(com.sun.star.io.IOException exIO ) { bBreaked = true; }
-
-
-
- measure("} implts_import");
-
- return !bBreaked;
- }
-
- /**
- * This helper function exports a simple ansi text file from
- * a text model. We copy every letter from the document.
- * There are no checks.
- *
- * Note: It's not alloed for a filter to seek inside the stream.
- * Because the outside frameloader has to set the stream position
- * right and a filter must read till EOF occures only.
- *
- * @param xSource
- * the source text model to get the data from
- *
- * @param aOptions
- * capsulate all other neccessary informations for this filter request
- * (streams, replace values ...)
- *
- * @return a bool value which describes if method was successfully or not.
- */
- private boolean implts_export( com.sun.star.text.XTextDocument xSource ,
- FilterOptions aOptions)
- {
- measure("implts_export {");
-
- com.sun.star.text.XTextRange xText = (com.sun.star.text.XSimpleText)UnoRuntime.queryInterface(
- com.sun.star.text.XSimpleText.class,
- xSource.getText());
-
- measure("cast XTextRange");
-
- boolean bBreaked = false;
-
- try
- {
- StringBuffer sBuffer = new StringBuffer(xText.getString());
- String sText = implts_replace(sBuffer,aOptions);
-
- measure("get text from model");
-
- // Normaly this function isn't realy cancelable
- // But we following operation can be very expensive. So
- // this place is the last one to stop it.
- synchronized(this)
- {
- if (m_nFilterProcState==FILTERPROC_BREAK)
- {
- m_nFilterProcState = FILTERPROC_STOPPED;
- return false;
- }
- }
-
- aOptions.m_xOutput.writeBytes(sText.getBytes());
- aOptions.m_xOutput.flush();
-
- measure("written to file");
-
- // If we created used stream - we must close it too.
- if (aOptions.m_bStreamOwner==true)
- {
- aOptions.m_xOutput.closeOutput();
- measure("stream close");
- }
- }
- catch(com.sun.star.io.BufferSizeExceededException exExceed ) { bBreaked = true; }
- catch(com.sun.star.io.NotConnectedException exConnect ) { bBreaked = true; }
- catch(com.sun.star.io.IOException exIO ) { bBreaked = true; }
-
- measure("} implts_export");
-
- return !bBreaked;
- }
-
- /**
- * helper function to convert the used StringBuffer into a Strig value.
- * And we use this chance to have a look on optional filter options
- * which can invite replacing of strings.
- */
- private String implts_replace( StringBuffer rBuffer, FilterOptions aOptions )
- {
- // replace complete strings first
- // Because its easiear on a buffer then on a string
- if ( ! aOptions.m_sOld.equals(aOptions.m_sNew) )
- {
- int nStart = rBuffer.indexOf(aOptions.m_sOld);
- int nLength = aOptions.m_sNew.length();
- int nEnd = nStart+nLength;
- while (nStart!=-1)
- {
- rBuffer.replace(nStart,nEnd,aOptions.m_sNew);
- nStart = rBuffer.indexOf(aOptions.m_sOld,nEnd);
- nEnd = nStart+nLength;
- }
- }
-
- // convert buffer into return format [string]
- // and convert to lower or upper case if required.
- String sResult = rBuffer.toString();
- if (aOptions.m_bCaseChange==true)
- {
- if (aOptions.m_bLower==true)
- sResult = sResult.toLowerCase();
- else
- sResult = sResult.toUpperCase();
- }
-
- return sResult;
- }
-
-
- //______________________________
- // interface XServiceInfo
- /**
- * This method returns an array of all supported service names.
- *
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames()
- {
- return m_serviceNames;
- }
-
- /**
- * This method returns true, if the given service will be
- * supported by this component.
- *
- * @param sService
- * the requested service name
- *
- * @return True, if the given service name will be supported;
- * False otherwhise.
- */
- public boolean supportsService( String sService )
- {
- return (
- sService.equals( m_serviceNames[0] ) ||
- sService.equals( m_serviceNames[1] ) ||
- sService.equals( m_serviceNames[2] )
- );
- }
-
- /**
- * Return the real class name of the component
- *
- * @return Class name of the component.
- */
- public String getImplementationName()
- {
- return _AsciiReplaceFilter.class.getName();
- }
-
-
- }
- // end of inner class, the wrapper class just has the two methods required for registering the component
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- *
- * @param sImplName
- * The implementation name of the component.
- *
- * @return Returns a <code>XSingleComponentFactory</code> for
- * creating the component.
- *
- * @see com.sun.star.comp.loader.JavaLoader
- */
-
- public static XSingleComponentFactory __getComponentFactory(String sImplName)
- {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplName.equals( _AsciiReplaceFilter.class.getName() ) )
- xFactory = com.sun.star.lib.uno.helper.Factory.createComponentFactory(_AsciiReplaceFilter.class,
- _AsciiReplaceFilter.m_serviceNames);
- return xFactory;
- }
-
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- *
- * @param xRegistryKey
- * Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return returns true if the operation succeeded
- *
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey xRegistryKey )
-// {
-// return Factory.writeRegistryServiceInfo(
-// _AsciiReplaceFilter.class.getName(),
-// _AsciiReplaceFilter.m_serviceNames,
-// xRegistryKey );
-// }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java
deleted file mode 100644
index 3c72f8f6..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-package OfficeDev.samples.Filter;
-
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XOutputStream;
-import com.sun.star.ucb.XSimpleFileAccess;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.uno.Exception;
-import com.sun.star.ucb.CommandAbortedException;
-import com.sun.star.lang.IllegalArgumentException;
-
-/*-************************************************************************
- @title helper to analyze neccessary option properties of our filter
- @description Our filter needs some neccessary properties for working:
- - a stream for input or output
- - or an URL for creating such streams
- - informations about required action on filtering
-
- @attention This class mustn't be threadsafe - because instances of it
- are used temp. only - not as members. So no concurrent access
- should occure.
- Another reason: It wuold be very difficult to safe every
- access on our internal member. To do so - we must implement
- special methods instead of allowing pure member access.
- ************************************************************************-*/
-
-public class FilterOptions
-{
- //_____________________________________
- // public member to provide these options to our outside filter class
- public com.sun.star.io.XInputStream m_xInput ;
- public com.sun.star.io.XOutputStream m_xOutput ;
- public boolean m_bStreamOwner ;
- public String m_sURL ;
- public String m_sOld ;
- public String m_sNew ;
- public boolean m_bCaseChange ;
- public boolean m_bLower ;
-
- //_____________________________________
- // private members for internal things
- private XMultiComponentFactory m_xMCF ;
- private XComponentContext m_Ctx ;
-
- //_____________________________________
- // interface
- /**
- * creates a new instance of this class
- * It use the given MediaDescriptor to find right
- * properties for initialization of the internal members.
- * To do so it use another interface method analyze()
- * which can be used after creation of an object instance
- * to set a new descriptor here.
- *
- * @param xSMGR
- * we need it to create special help service top open
- * streams in case they are not already a part of given
- * MediaDescriptor
- *
- * @param bImport
- * we must know which stream member should be valid initialized
- *
- * @param lDescriptor
- * the initial MediaDescriptor to set internal member from it
- */
- public FilterOptions( XMultiComponentFactory xMCF ,
- XComponentContext Context ,
- boolean bImport ,
- com.sun.star.beans.PropertyValue[] lDescriptor )
- {
- m_xMCF = xMCF;
- m_Ctx = Context;
- analyze(bImport, lDescriptor);
- }
-
- /**
- * analyze given MediaDescriptor to find values for our internal member
- * It reset all members to defaults before - to prevent us against
- * mixed descriptor values!
- *
- * @param bImport
- * we must know which stream member should be valid initialized
- *
- * @param lDescriptor
- * the new MediaDescriptor to set internal member from it
- */
- public void analyze( boolean bImport ,
- com.sun.star.beans.PropertyValue[] lDescriptor )
- {
- m_xInput = null ;
- m_xOutput = null ;
- m_bStreamOwner = false ;
- m_sURL = null ;
- m_sOld = new String();
- m_sNew = new String();
- m_bCaseChange = false ;
- m_bLower = false ;
-
- for ( int i=0; i<lDescriptor.length; ++i )
- {
- try
- {
- if (lDescriptor[i].Name.equals("FileName"))
- m_sURL = AnyConverter.toString(lDescriptor[i].Value);
- else
- if (lDescriptor[i].Name.equals("InputStream"))
- m_xInput = (com.sun.star.io.XInputStream)AnyConverter.toObject(new com.sun.star.uno.Type(com.sun.star.io.XInputStream.class), lDescriptor[i].Value);
- else
- if (lDescriptor[i].Name.equals("OutputStream"))
- m_xOutput = (com.sun.star.io.XOutputStream)AnyConverter.toObject(new com.sun.star.uno.Type(com.sun.star.io.XOutputStream.class), lDescriptor[i].Value);
- else
- if (lDescriptor[i].Name.equals("FilterData"))
- {
- com.sun.star.beans.PropertyValue[] lFilterProps = (com.sun.star.beans.PropertyValue[])AnyConverter.toArray(lDescriptor[i].Value);
- int nCount = lFilterProps.length;
- for (int p=0; p<nCount; ++p)
- {
- if (lFilterProps[p].Name.equals("OldString"))
- m_sOld = AnyConverter.toString(lFilterProps[p].Value);
- else
- if (lFilterProps[p].Name.equals("NewString"))
- m_sNew = AnyConverter.toString(lFilterProps[p].Value);
- else
- if (lFilterProps[p].Name.equals("LowerCase"))
- {
- m_bLower = AnyConverter.toBoolean(lFilterProps[p].Value);
- m_bCaseChange = true; // Set it after m_bLower - because an exception can occure and we must use default values then!
- }
- }
- }
- }
- catch(com.sun.star.lang.IllegalArgumentException exConvert)
- {
- // ONE argument has the wrong type
- // But I think we mustn't react here - because we setted
- // default values for every neccessary item we need.
- // In case this exception occures - this default exist
- // and we can live with it.
- }
- }
-
- // Decide if it's neccessary AND possible to open streams.
- // Outside user can check for valid FilterOptions by using
- // corresponding method isValid(). So it's not neccessary to
- // handle this error here in any case.
- if (m_xInput==null && m_xOutput==null && m_sURL!=null)
- impl_openStreams(bImport);
- }
-
- /**
- * with this method it's possible for the outside filter to decide
- * if he can use this FilterOptions realy or not.
- * That means especialy if neccessary streams are available or not.
- */
- public boolean isValid()
- {
- return(m_xInput!=null || m_xOutput!=null);
- }
-
- //_____________________________________
- // helper
- /**
- * In case we couldn't found any valid stream inside the given MediaDescriptor,
- * we must create it. Then we use a special helper service in combination
- * with an existing URL to open a stream for reading or writing. It depends
- * from given parameter bImport.
- *
- * Note: This method doesn't check for a valid URL. It must be done before.
- *
- * @param bImport
- * inidcates which stream member must be valid as result of this call
- */
- private void impl_openStreams( boolean bImport )
- {
- try{
- com.sun.star.ucb.XSimpleFileAccess xHelper = (com.sun.star.ucb.XSimpleFileAccess)UnoRuntime.queryInterface(
- com.sun.star.ucb.XSimpleFileAccess.class,
- m_xMCF.createInstanceWithContext("com.sun.star.ucb.SimpleFileAccess", m_Ctx));
- if (xHelper!=null)
- {
- if (bImport==true)
- m_xInput = xHelper.openFileRead(m_sURL);
- else
- m_xOutput = xHelper.openFileWrite(m_sURL);
- }
-
- m_bStreamOwner = (m_xInput!=null || m_xOutput!=null);
- }
- catch(com.sun.star.ucb.CommandAbortedException exAborted) {}
- catch(com.sun.star.uno.Exception exUno ) {}
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/Makefile
deleted file mode 100644
index d0ce8099..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/Makefile
+++ /dev/null
@@ -1,140 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevFilter example of the Developers Guide.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=OfficeDevAsciiFilterExample
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=SampleFilter
-COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME = $(COMP_NAME).uno.jar
-COMP_JAR = $(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE = $(SAMPLE_GEN_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(SAMPLE_GEN_OUT)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-# often the java files are structured in a hierarchy similar to the package,
-# for the example we know the package
-PACKAGE = OfficeDev/samples/Filter
-
-COMP_JAVAFILES = \
- FilterOptions.java \
- AsciiReplaceFilter.java
-
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/$(PACKAGE)/%.class,$(COMP_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(subst /,.,$(PACKAGE)).AsciiReplaceFilter> $@
-
-$(COMP_CLASSFILES) : $(COMP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $(COMP_JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP_CLASS_OUT) .
-
-# rule for component package manifest
-$(SAMPLE_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)TypeDetection.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_JAR) TypeDetection.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ TypeDetection.xcu
- $(SDK_ZIP) -u $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(SAMPLE_NAME) : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)$(COMP_NAME)$(QM)" Java component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use the "$(QM)ASCII Replace$(QM)" filter in your office installation, see the
- @echo example description.
- @echo --------------------------------------------------------------------------------
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/SampleFilter.components b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/SampleFilter.components
deleted file mode 100644
index f288f7e9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/SampleFilter.components
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="SampleFilter.uno.jar">
- <implementation name="OfficeDev.samples.Filter.AsciiReplaceFilter$_AsciiReplaceFilter">
- <service name="com.sun.star.comp.ansifilter.AsciiReplaceFilter"/>
- <service name="com.sun.star.document.ImportFilter"/>
- <service name="com.sun.star.document.ExportFilter"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/TypeDetection.xcu b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/TypeDetection.xcu
deleted file mode 100644
index a0335839..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/TypeDetection.xcu
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="TypeDetection" oor:package="org.openoffice.Office">
- <node oor:name="Types">
- <node oor:name="ascii" oor:op="replace">
- <prop oor:name="Data" oor:type="xs:string">
- <value>0,text/plain,,,txt,0</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">ASCII</value>
- </prop>
- </node>
- </node>
- <node oor:name="Filters">
- <node oor:name="Ascii_Replace" oor:op="replace">
- <prop oor:name="Data" oor:type="xs:string">
- <value>0,ascii,com.sun.star.text.TextDocument,com.sun.star.comp.ansifilter.AsciiReplaceFilter,268959747,,0,,</value>
- </prop>
- <prop oor:name="Installed" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="en-US">ASCII Replace</value>
- <value xml:lang="de">ASCII Konvertierung</value>
- </prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/FlatXmlTypeDetection.xcu b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/FlatXmlTypeDetection.xcu
deleted file mode 100644
index 67f8006d..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/FlatXmlTypeDetection.xcu
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Types">
- <node oor:name="Types">
- <node oor:name="devguide_FlatXMLType_Cpp_calc" oor:op="replace">
- <prop oor:name="UIOrder"><value>0</value></prop>
- <prop oor:name="DetectService"><value>devguide.officedev.samples.filter.FlatXmlDetect</value></prop>
- <prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>fods</value></prop>
- <prop oor:name="MediaType"/>
- <prop oor:name="Preferred"><value>false</value></prop>
- <prop oor:name="PreferredFilter"><value>devguide_FlatXMLFilter_Cpp_calc</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">DevGuide FlatXML Calc</value>
- </prop>
- <prop oor:name="ClipboardFormat"><value>doctype:office:document</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLType_Cpp_draw" oor:op="replace">
- <prop oor:name="UIOrder"><value>0</value></prop>
- <prop oor:name="DetectService"><value>devguide.officedev.samples.filter.FlatXmlDetect</value></prop>
- <prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>fodg</value></prop>
- <prop oor:name="MediaType"/>
- <prop oor:name="Preferred"><value>false</value></prop>
- <prop oor:name="PreferredFilter"><value>devguide_FlatXMLFilter_Cpp_draw</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">DevGuide FlatXML Draw</value>
- </prop>
- <prop oor:name="ClipboardFormat"><value>doctype:office:document</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLType_Cpp_impress" oor:op="replace">
- <prop oor:name="UIOrder"><value>0</value></prop>
- <prop oor:name="DetectService"><value>devguide.officedev.samples.filter.FlatXmlDetect</value></prop>
- <prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>fodp</value></prop>
- <prop oor:name="MediaType"/>
- <prop oor:name="Preferred"><value>false</value></prop>
- <prop oor:name="PreferredFilter"><value>devguide_FlatXMLFilter_Cpp_impress</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">DevGuide FlatXML Impress</value>
- </prop>
- <prop oor:name="ClipboardFormat"><value>doctype:office:document</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLType_Cpp_writer" oor:op="replace">
- <prop oor:name="UIOrder"><value>0</value></prop>
- <prop oor:name="DetectService"><value>devguide.officedev.samples.filter.FlatXmlDetect</value></prop>
- <prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>fodt</value></prop>
- <prop oor:name="MediaType"/>
- <prop oor:name="Preferred"><value>false</value></prop>
- <prop oor:name="PreferredFilter"><value>devguide_FlatXMLFilter_Cpp_writer</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">DevGuide FlatXML Writer</value>
- </prop>
- <prop oor:name="ClipboardFormat"><value>doctype:office:document</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLType_Cpp_master" oor:op="replace">
- <prop oor:name="UIOrder"><value>0</value></prop>
- <prop oor:name="DetectService"><value>devguide.officedev.samples.filter.FlatXmlDetect</value></prop>
- <prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>fodm</value></prop>
- <prop oor:name="MediaType"/>
- <prop oor:name="Preferred"><value>false</value></prop>
- <prop oor:name="PreferredFilter"><value>devguide_FlatXMLFilter_Cpp_master</value></prop>
- <prop oor:name="UIName">
- <value xml:lang="en-US">DevGuide FlatXML Master</value>
- </prop>
- <prop oor:name="ClipboardFormat"><value>doctype:office:document</value></prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
deleted file mode 100644
index d9f70b2c..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
+++ /dev/null
@@ -1,164 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the filterdetection component for the FlatXmlFilter of the Developers Guide.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=FlatXmlTypeDetection
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-OUT_COMP_INC = $(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-COMP_RDB_NAME = $(COMP_NAME).uno.rdb
-COMP_RDB = $(OUT_COMP_GEN)/$(COMP_RDB_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
-#COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
-
-REGISTERFLAG = $(OUT_MISC)/devguide_$(COMP_NAME)_register_component.flag
-
-CXXFILES = filterdetect.cxx \
- fdcomp.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- XMLFilterDetect
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-#$(COMP_MAPFILE) : $(SLOFILES)
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-#ifeq "$(OS)" "MACOSX"
-# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-#endif
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-# rule for component package manifest
-$(OUT_COMP_GEN)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)FlatXmlTypeDetection.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP_COMPONENTS) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)devguide.officedev.samples.filter.FlatXmlDetect$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)com.sun.star.document.ExtendedTypeDetection$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) FlatXmlTypeDetection.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(SDK_ZIP) $@ FlatXmlTypeDetection.xcu
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
- cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-XMLFilterDetect : $(REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The FlatXMLFilterDetection component is installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You will use this component implicitly in your office installation when you have
- @echo installed a FlatXMLFilter component C++ or Java.
- @echo --------------------------------------------------------------------------------
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
deleted file mode 100644
index acbdf194..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-
-#include <osl/mutex.hxx>
-#include <osl/thread.h>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
-#include "filterdetect.hxx"
-
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
- void * pRet = 0;
-
- OUString implName = OUString::createFromAscii( pImplName );
- if ( pServiceManager && implName.equals(FilterDetect_getImplementationName()) )
- {
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- FilterDetect_createInstance, FilterDetect_getSupportedServiceNames() ) );
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
- return pRet;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
deleted file mode 100644
index 12195ae0..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include "filterdetect.hxx"
-#include <osl/diagnose.h>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/InputSource.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
-#include <com/sun/star/xml/XImportFilter.hpp>
-#include <com/sun/star/xml/XExportFilter.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
-#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-#include <com/sun/star/style/XStyleLoader.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/document/XExtendedFilterDetection.hpp>
-#include <com/sun/star/beans/PropertyState.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::document;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::io;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::xml::sax;
-using namespace com::sun::star::xml;
-using namespace com::sun::star::task;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::container;
-using namespace com::sun::star::ucb;
-
-using ::rtl::OUString;
-using ::rtl::OString;
-
-
-OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
- throw( RuntimeException )
-{
- // type name to return
- OUString sOriginalTypeName;
- OUString sTypeName;
- OUString sURL;
- // stream of the document to be detected
- Reference< XInputStream > xInStream;
- for ( sal_Int32 i = 0 ; i < aArguments.getLength(); i++)
- {
- OUString aName = aArguments[i].Name;
- if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName" ) ) )
- aArguments[i].Value >>= sOriginalTypeName;
- if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ) )
- aArguments[i].Value >>= sURL;
- if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream" ) ) )
- aArguments[i].Value >>= xInStream;
- }
-
- if (!xInStream.is())
- {
- // open the stream if it was not suplied by the framework
- Reference< XSimpleFileAccess > xSFI(mxMSF->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY);
- if (sURL.getLength() > 0 && xSFI.is())
- {
- try
- {
- xInStream = xSFI->openFileRead( sURL);
- }
- catch( Exception& )
- {
- return sTypeName;
- }
- } else {
- // failed to access UCB
- return sTypeName;
- }
- }
-
- // flatxml starts with an office:document element. this element
- // conatains a clas="..." attribut by which we can deduct the
- // type of document that is to be loaded
- //
- // WARNING:
- // parsing the plain text of the document is an easy way to do this
- // but not the purest solution, since namespaces and other xml details
- // may lead to another syntactic expression of the same document.
- // this example works for the way the office serializes it's XML stream
- // but might need extension for other data sources...
- static OString aDocToken("office:document");
- // static OString aClassToken("office:class=\"");
- static OString aMimeTypeToken("office:mimetype=\"");
-
- sal_Int32 nHeadSize = 4096;
- Sequence< sal_Int8 > aHeadData(nHeadSize);
-
- // rewind seekable stream
- Reference< XSeekable > xSeek(xInStream, UNO_QUERY);
- if (xSeek.is())
- xSeek->seek(0);
-
- long bytestRead = xInStream->readBytes(aHeadData, nHeadSize);
-
- OString aHead = OString((const sal_Char *)aHeadData.getConstArray(), bytestRead).toAsciiLowerCase();
-
- // check for document element of flatxml format
- if (aHead.indexOf(aDocToken) >= 0)
- {
- // read document class
- sal_Int32 n = aHead.indexOf(aMimeTypeToken);
- if (n >= 0)
- {
- n += aMimeTypeToken.getLength();
- OString aMimeType = aHead.copy(n, aHead.indexOf('\"', n) - n);
- // return type for class found
- if (aMimeType.equals("application/x-vnd.oasis.opendocument.text") ||
- aMimeType.equals("application/vnd.oasis.opendocument.text"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_writer"));
- else if (aMimeType.equals("application/x-vnd.oasis.opendocument.text-master") ||
- aMimeType.equals("application/vnd.oasis.opendocument.text-master"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_master"));
- else if (aMimeType.equals("application/x-vnd.oasis.openoffice.text-global") ||
- aMimeType.equals("application/vnd.oasis.openoffice.text-global"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_master"));
- else if (aMimeType.equals("application/x-vnd.oasis.opendocument.spreadsheet") ||
- aMimeType.equals("application/vnd.oasis.opendocument.spreadsheet"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_calc"));
- else if (aMimeType.equals("application/x-vnd.oasis.opendocument.drawing") ||
- aMimeType.equals("application/vnd.oasis.opendocument.drawing"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_draw"));
- else if (aMimeType.equals("application/x-vnd.oasis.opendocument.presentation") ||
- aMimeType.equals("application/vnd.oasis.opendocument.presentation"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_impress"));
- else if (aMimeType.equals("application/x-vnd.oasis.opendocument.presentation") ||
- aMimeType.equals("application/vnd.oasis.opendocument.presentation"))
- sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_impress"));
- }
- }
- return sTypeName;
-}
-
-
-// XInitialization
-void SAL_CALL FilterDetect::initialize( const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException)
-{
- Sequence < PropertyValue > aAnySeq;
- sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
- {
- const PropertyValue * pValue = aAnySeq.getConstArray();
- nLength = aAnySeq.getLength();
- for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
- if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "Type" ) ) )
- {
- pValue[i].Value >>= msFilterName;
- }
- else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "UserData" ) ) )
- {
- pValue[i].Value >>= msUserData;
- }
- else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "TemplateName" ) ) )
- {
- pValue[i].Value>>=msTemplateName;
- }
- }
- }
-}
-
-OUString FilterDetect_getImplementationName ()
- throw (RuntimeException)
-{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "devguide.officedev.samples.filter.FlatXmlDetect" ) );
-}
-
-#define SERVICE_NAME1 "com.sun.star.document.ExtendedTypeDetection"
-
-sal_Bool SAL_CALL FilterDetect_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) );
-}
-
-Sequence< OUString > SAL_CALL FilterDetect_getSupportedServiceNames( )
- throw (RuntimeException)
-{
- Sequence < OUString > aRet(2);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
- return aRet;
-}
-#undef SERVICE_NAME1
-#undef SERVICE_NAME2
-
-Reference< XInterface > SAL_CALL FilterDetect_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*) new FilterDetect( rSMgr );
-}
-
-// XServiceInfo
-OUString SAL_CALL FilterDetect::getImplementationName( )
- throw (RuntimeException)
-{
- return FilterDetect_getImplementationName();
-}
-
-sal_Bool SAL_CALL FilterDetect::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
-{
- return FilterDetect_supportsService( rServiceName );
-}
-
-Sequence< OUString > SAL_CALL FilterDetect::getSupportedServiceNames( )
- throw (RuntimeException)
-{
- return FilterDetect_getSupportedServiceNames();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx
deleted file mode 100644
index e3da3d5c..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _FILTERDETECT_HXX
-#define _FILTERDETECT_HXX
-
-
-#include <com/sun/star/document/XFilter.hpp>
-#include <com/sun/star/document/XExporter.hpp>
-#include <com/sun/star/document/XExtendedFilterDetection.hpp>
-#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/implbase5.hxx>
-
-#include <cppuhelper/implbase3.hxx>
-
-enum FilterType
-{
- FILTER_IMPORT,
- FILTER_EXPORT
-};
-
-/* This component will be instantiated for both import or export. Whether it calls
- * setSourceDocument or setTargetDocument determines which Impl function the filter
- * member calls */
-class FilterDetect : public cppu::WeakImplHelper3 <com::sun::star::document::XExtendedFilterDetection,
- com::sun::star::lang::XInitialization,
- com::sun::star::lang::XServiceInfo>
-{
-protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
- ::rtl::OUString msFilterName;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > msUserData;
- ::rtl::OUString msTemplateName;
-
- sal_Bool SAL_CALL exportImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
-
- sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
-
-public:
- FilterDetect( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ) {}
-
- virtual ~FilterDetect() {}
-
- //XExtendedFilterDetection
- virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lDescriptor )
- throw( com::sun::star::uno::RuntimeException );
-
- // XInitialization
-
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
-};
-
-
-::rtl::OUString FilterDetect_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
-
-sal_Bool SAL_CALL FilterDetect_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL FilterDetect_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL FilterDetect_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
deleted file mode 100644
index 0b85b00b..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++ /dev/null
@@ -1,345 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/implbase.hxx>
-
-#include <com/sun/star/lang/XComponent.hpp>
-
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Type.hxx>
-
-#include <com/sun/star/beans/PropertyValue.hpp>
-
-#include <com/sun/star/xml/sax/XParser.hpp>
-#include <com/sun/star/xml/sax/InputSource.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/SAXException.hpp>
-#include <com/sun/star/xml/XImportFilter.hpp>
-#include <com/sun/star/xml/XExportFilter.hpp>
-
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::osl;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::xml;
-using namespace ::com::sun::star::xml::sax;
-
-namespace XFlatXml {
-
-class XFlatXml : public WeakImplHelper3< XImportFilter, XExportFilter, XDocumentHandler>
-{
-private:
- // the UNO ServiceFactory
- Reference< XMultiServiceFactory > m_rServiceFactory;
-
- // DocumentHandler interface of the css::xml::sax::Writer service
- Reference < XExtendedDocumentHandler > m_rDocumentHandler;
-
- // controls pretty-printing
- sal_Bool m_bPrettyPrint;
-
-public:
-
- // ctor...
- XFlatXml( const Reference< XMultiServiceFactory > &r )
- : m_rServiceFactory(r)
- , m_bPrettyPrint(sal_True)
- {}
-
- // XImportFilter
- virtual sal_Bool SAL_CALL importer(
- const Sequence<PropertyValue>& aSourceData,
- const Reference<XDocumentHandler>& xHandler,
- const Sequence<OUString>& msUserData)
- throw(RuntimeException);
-
- // XExportFilter
- virtual sal_Bool SAL_CALL exporter(
- const Sequence<PropertyValue>& aSourceData,
- const Sequence<OUString>& msUserData)
- throw(RuntimeException);
-
- // XDocumentHandler
- virtual void SAL_CALL startDocument()
- throw (SAXException,RuntimeException);
- virtual void SAL_CALL endDocument()
- throw (SAXException, RuntimeException);
- virtual void SAL_CALL startElement(const OUString& str, const Reference<XAttributeList>& attriblist)
- throw (SAXException,RuntimeException);
- virtual void SAL_CALL endElement(const OUString& str)
- throw (SAXException, RuntimeException);
- virtual void SAL_CALL characters(const OUString& str)
- throw (SAXException, RuntimeException);
- virtual void SAL_CALL ignorableWhitespace(const OUString& str)
- throw (SAXException, RuntimeException);
- virtual void SAL_CALL processingInstruction(const OUString& str, const OUString& str2)
- throw (com::sun::star::xml::sax::SAXException,RuntimeException);
- virtual void SAL_CALL setDocumentLocator(const Reference<XLocator>& doclocator)
- throw (SAXException,RuntimeException);
-};
-
-sal_Bool XFlatXml::importer(
- const Sequence<PropertyValue>& aSourceData,
- const Reference<XDocumentHandler>& xHandler,
- const Sequence<OUString>& msUserData)
- throw (RuntimeException)
-{
- // get information from media descriptor
- // the imput stream that represents the imported file
- // is most important here since we need to supply it to
- // the sax parser that drives the supplied document handler
- sal_Int32 nLength = aSourceData.getLength();
- OUString aName, aFileName, aURL;
- Reference< XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InputStream")))
- aSourceData[i].Value >>= xInputStream;
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")))
- aSourceData[i].Value >>= aFileName;
- else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")))
- aSourceData[i].Value >>= aURL;
- }
-
- // we need an input stream
- OSL_ASSERT(xInputStream.is());
- if (!xInputStream.is()) return sal_False;
-
- // rewind seekable stream
- Reference< XSeekable > xSeek(xInputStream, UNO_QUERY);
- if (xSeek.is())
- xSeek->seek(0);
-
-
- // create SAX parser that will read the document file
- // and provide events to xHandler passed to this call
- Reference < XParser > xSaxParser( m_rServiceFactory->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))), UNO_QUERY );
- OSL_ASSERT(xSaxParser.is());
- if(!xSaxParser.is())return sal_False;
-
- // let the parser try to send the sax event to the document handler
- try
- {
- InputSource aInput;
- aInput.sSystemId = aURL;
- aInput.sPublicId = aURL;
- aInput.aInputStream = xInputStream;
- xSaxParser->setDocumentHandler(xHandler);
- xSaxParser->parseStream(aInput);
- }
- catch( Exception &exc)
- {
- // something went wrong
- OSL_FAIL(exc.Message);
- return sal_False;
- }
-
- // done
- return sal_True;
-}
-
-sal_Bool XFlatXml::exporter(
- const Sequence<PropertyValue>& aSourceData,
- const Sequence<OUString>& msUserData)
- throw (RuntimeException)
-{
-
- // read source data
- // we are especialy interested in the output stream
- // since that is where our xml-writer will push the data
- // from it's data-source interface
- OUString aName, sURL;
- Reference<XOutputStream> rOutputStream;
- sal_Int32 nLength = aSourceData.getLength();
- for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OutputStream")))
- aSourceData[i].Value >>= rOutputStream;
- else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ))
- aSourceData[i].Value >>= sURL;
- }
-
- if (!m_rDocumentHandler.is()) {
- // get the document writer
- m_rDocumentHandler = Reference<XExtendedDocumentHandler>(
- m_rServiceFactory->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"))),
- UNO_QUERY);
- OSL_ASSERT(m_rDocumentHandler.is());
- if (!m_rDocumentHandler.is()) return sal_False;
- }
- // get data source interface ...
- Reference< XActiveDataSource > rDataSource(m_rDocumentHandler, UNO_QUERY);
- OSL_ASSERT(rDataSource.is());
- if (!rDataSource.is()) return sal_False;
- OSL_ASSERT(rOutputStream.is());
- if (!rOutputStream.is()) return sal_False;
- // ... and set output stream
- rDataSource->setOutputStream(rOutputStream);
-
- return sal_True;
-}
-
-// for the DocumentHandler implementation, we just proxy the the
-// events to the XML writer that we created upon the output stream
-// that was provided by the XMLFilterAdapter
-void XFlatXml::startDocument() throw (SAXException,RuntimeException){
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->startDocument();
-}
-
-void XFlatXml::endDocument() throw (SAXException,RuntimeException){
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->endDocument();
-}
-
-void XFlatXml::startElement(const OUString& str, const Reference<XAttributeList>& attriblist)
- throw (SAXException, RuntimeException)
-{
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->startElement(str, attriblist);
-}
-
-void XFlatXml::endElement(const OUString& str)
- throw (SAXException, RuntimeException)
-{
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->endElement(str);
-}
-
-void XFlatXml::characters(const OUString& str)
- throw (SAXException, RuntimeException)
-{
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->characters(str);
-}
-
-void XFlatXml::ignorableWhitespace(const OUString& str)
- throw (SAXException, RuntimeException)
-{
- OSL_ASSERT(m_rDocumentHandler.is());
- if (!m_bPrettyPrint) return;
- m_rDocumentHandler->ignorableWhitespace(str);
-}
-
-void XFlatXml::processingInstruction(const OUString& str, const OUString& str2)
- throw (SAXException, RuntimeException)
-{
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->processingInstruction(str, str2);
-}
-
-void XFlatXml::setDocumentLocator(const Reference<XLocator>& doclocator)
- throw (SAXException, RuntimeException)
-{
- OSL_ASSERT(m_rDocumentHandler.is());
- m_rDocumentHandler->setDocumentLocator(doclocator);
-}
-
-// --------------------------------------
-// Component management
-// --------------------------------------
-Reference< XInterface > SAL_CALL CreateInstance( const Reference< XMultiServiceFactory > &r)
-{
- return Reference< XInterface >(( OWeakObject *)new XFlatXml(r));
-}
-
-Sequence< OUString > getSupportedServiceNames()
-{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(
- "devguide.officedev.samples.filter.FlatXmlCpp"));
- pNames = &seqNames;
- }
- }
- return *pNames;
-}
-
-}
-
-using namespace XFlatXml;
-#define IMPLEMENTATION_NAME "devguide.officedev.samples.filter.FlatXmlCpp"
-
-
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
- void * pRet = 0;
-
- if (pServiceManager && rtl_str_compare( pImplName, IMPLEMENTATION_NAME ) == 0)
- {
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- CreateInstance, getSupportedServiceNames() ) );
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
- return pRet;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.uno.xml b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.uno.xml
deleted file mode 100644
index a7965afc..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.uno.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name> FlatXml </module-name>
- <component-description>
- <author> Aidan Butler </author>
- <name>devguide.officedev.samples.filter.FlatXmlCpp</name>
-
-<description>
- This component is a sample implementation, which describes how a filter may be written that uses the XmlFilterAdaptor component. This filter opens and saves Flat Xml files.
- </description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
- <status value="final"/>
- <supported-service>devguide.officedev.samples.filter.FlatXmlCpp</supported-service>
- <type>com.sun.star.lang.XSingleServiceFactory</type>
- <type>com.sun.star.uno.XNamingService</type>
- <type>com.sun.star.uno.XComponentContext</type>
- <type>com.sun.star.uno.XWeak</type>
- <type>com.sun.star.lang.XMain</type>
- <type>com.sun.star.uno.XAggregation</type>
- <type>com.sun.star.lang.XMultiServiceFactory</type>
- <type>com.sun.star.lang.XSingleComponentFactory</type>
- <type>com.sun.star.lang.XTypeProvider</type>
- <type>com.sun.star.frame.XComponentLoader</type>
- <type>com.sun.star.registry.XSimpleRegistry</type>
- <type>com.sun.star.loader.XImplementationLoader</type>
- <type>com.sun.star.registry.XImplementationRegistration</type>
- <type>com.sun.star.lang.XComponent</type>
- <type>com.sun.star.bridge.XBridgeFactory</type>
- <type>com.sun.star.bridge.XUnoUrlResolver</type>
- <type>com.sun.star.connection.XAcceptor</type>
- <type>com.sun.star.connection.XConnector</type>
- <type>com.sun.star.container.XHierarchicalNameAccess</type>
- <type>com.sun.star.lang.XServiceInfo</type>
- <type>com.sun.star.xml.sax.XDocumentHandler</type>
- <type>com.sun.star.xml.sax.XExtendedDocumentHandler</type>
- <type>com.sun.star.text.XTextDocument</type>
- <type>com.sun.star.xml.XImportFilter</type>
- <type>com.sun.star.xml.XExportFilter</type>
- <type>com.sun.star.io.XInputStream</type>
- <type>com.sun.star.io.XOutputStream</type>
- <type>com.sun.star.io.XActiveDataSource</type>
- <type>com.sun.star.io.XSeekable</type>
- <type>com.sun.star.frame.XConfigManager</type>
- <type>com.sun.star.xml.sax.XParser</type>
- <type>com.sun.star.ucb.XSimpleFileAccess</type>
- <type>com.sun.star.beans.XPropertySet</type>
- </component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper$(UDK_MAJOR)$(COM) </runtime-module-dependency>
- <runtime-module-dependency> salhelper$(UDK_MAJOR)$(COM) </runtime-module-dependency>
- <runtime-module-dependency> cppu$(UDK_MAJOR) </runtime-module-dependency>
- <runtime-module-dependency> reg$(UDK_MAJOR) </runtime-module-dependency>
- <runtime-module-dependency> store$(UDK_MAJOR) </runtime-module-dependency>
- <runtime-module-dependency> sal$(UDK_MAJOR) </runtime-module-dependency>
-</module-description>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.xcu b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.xcu
deleted file mode 100644
index 8244bbd3..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.xcu
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Filter">
- <node oor:name="Filters">
- <node oor:name="devguide_FlatXMLFilter_Cpp_calc" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_calc</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlCpp, ,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Calc</value>
- <value xml:lang="en-US">DevGuide FlatXML Calc</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Cpp_draw" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_draw</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlCpp, ,com.sun.star.comp.DrawingLayer.XMLOasisImporter,com.sun.star.comp.DrawingLayer.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Draw</value>
- <value xml:lang="en-US">DevGuide FlatXML Draw</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Cpp_impress" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_impress</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlCpp, ,com.sun.star.comp.Impress.XMLOasisImporter,com.sun.star.comp.Impress.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Impress</value>
- <value xml:lang="en-US">DevGuide FlatXML Impress</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Cpp_writer" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_writer</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlCpp, ,com.sun.star.comp.Writer.XMLOasisImporter,com.sun.star.comp.Writer.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Writer</value>
- <value xml:lang="en-US">DevGuide FlatXML Writer</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Cpp_master" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_master</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.text.GlobalDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlCpp, ,com.sun.star.comp.Writer.XMLOasisImporter,com.sun.star.comp.Writer.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Matser</value>
- <value xml:lang="en-US">DevGuide FlatXML Master</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
deleted file mode 100644
index 1a968082..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
+++ /dev/null
@@ -1,162 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the C++ FlatXmlFilter component example of the Developers Guide.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=FlatXmlFilter_cpp
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-OUT_COMP_INC = $(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
-#COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
-COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
-
-COMP_REGISTERFLAG = $(OUT_MISC)/devguide_$(COMP_NAME)_register_component.flag
-
-CXXFILES = FlatXml.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- FlatXmlFilterCppExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-#$(COMP_MAPFILE) : $(SLOFILES)
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-#ifeq "$(OS)" "MACOSX"
-# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-#endif
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-# rule for component package manifest
-$(OUT_COMP_GEN)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)FlatXmlFilter_cpp.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP_COMPONENTS) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)devguide.officedev.samples.filter.FlatXmlCpp$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)devguide.officedev.samples.filter.FlatXmlCpp$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) FlatXmlFilter_cpp.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(SDK_ZIP) $@ FlatXmlFilter_cpp.xcu
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
- cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-FlatXmlFilterCppExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The C++ FlatXmlFilter component is installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use the filters "$(QM)DevGuide FlatXML ...$(QM)" inside your office installation
- @echo after you have installed the "$(QM)FlatXmlTypeDetection.uno.pkg"$(QM) as well.
- @echo --------------------------------------------------------------------------------
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
deleted file mode 100644
index 5dcad729..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.io.*;
-import java.util.*;
-import com.sun.star.uno.*;
-import com.sun.star.lang.*;
-import com.sun.star.beans.*;
-
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.registry.XRegistryKey;
-
-import com.sun.star.xml.*;
-import com.sun.star.xml.sax.*;
-
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XOutputStream;
-import com.sun.star.io.XActiveDataSource;
-
-
-
-public class FlatXml implements XImportFilter, XExportFilter, XServiceName,
- XServiceInfo, XDocumentHandler, XTypeProvider
-{
-
- /*
- * private data members
- */
- private XMultiServiceFactory m_xServiceFactory;
- private XExtendedDocumentHandler m_xHandler;
- private boolean m_bPrettyPrint = true;
-
- static private final String __serviceName = "devguide.officedev.samples.filter.FlatXmlJava";
- static private final String __implName = "FlatXml";
- static private final String[] __supportedServiceNames = {
- "devguide.officedev.samples.filter.FlatXmlJava"
- };
-
- public FlatXml(XMultiServiceFactory f) {
- m_xServiceFactory = f;
- }
-
- // --- XTypeProvider ---
- public byte[] getImplementationId() {
- return Integer.toString(this.hashCode()).getBytes();
- }
-
- // --- XServiceName ---
- public String getServiceName() {
- return( __serviceName );
- }
-
- // --- XServiceInfo ---
- public boolean supportsService(String sName) {
- for (int i = 0; i < __supportedServiceNames.length; i++) {
- if (__supportedServiceNames[i].equals(sName)) return true;
- }
- return false;
- }
- public String getImplementationName() {
- return( this.getClass().getName() );
- }
- public String[] getSupportedServiceNames() {
- return( __supportedServiceNames );
- }
-
- public com.sun.star.uno.Type[] getTypes() {
- Type[] typeReturn = {};
- try {
- typeReturn = new Type[] {
- new Type( XTypeProvider.class ),
- new Type( XExportFilter.class ),
- new Type( XImportFilter.class ),
- new Type( XServiceName.class ),
- new Type( XServiceInfo.class )
- };
- } catch( java.lang.Exception exception ) {
- return null;
- }
- return( typeReturn );
- }
-
- public boolean importer(PropertyValue[] aSourceData, XDocumentHandler xDocHandler, String[] msUserData)
- throws com.sun.star.uno.RuntimeException, com.sun.star.lang.IllegalArgumentException
- {
- String sName = null;
- String sFileName = null;
- String sURL = null;
- com.sun.star.io.XInputStream xin = null;
-
- try {
-
- for (int i = 0 ; i < aSourceData.length; i++)
- {
- sName = aSourceData[i].Name;
- if (sName.equals("InputStream"))
- xin = (XInputStream)AnyConverter.toObject(XInputStream.class, aSourceData[i].Value);
- if (sName.equals("URL"))
- sURL=(String)AnyConverter.toObject(String.class, aSourceData[i].Value);
- if (sName.equals("FileName"))
- sFileName=(String)AnyConverter.toObject(String.class, aSourceData[i].Value);
- }
-
- Object tmpObj=m_xServiceFactory.createInstance("com.sun.star.xml.sax.Parser");
- if (tmpObj == null) return false;
-
- XParser xParser = (XParser)UnoRuntime.queryInterface(XParser.class , tmpObj);
- if (xParser == null) return false;
-
- InputSource aInput = new InputSource();
- aInput.sSystemId = sURL;
- aInput.aInputStream =xin;
- xParser.setDocumentHandler ( xDocHandler );
- xParser.parseStream ( aInput );
- } catch (com.sun.star.uno.Exception e){
- e.printStackTrace();
- return false;
- }
-
- // done...
- return true;
- }
-
- public boolean exporter(PropertyValue[] aSourceData, String[] msUserData)
- throws com.sun.star.uno.RuntimeException, com.sun.star.lang.IllegalArgumentException
- {
- try {
- String sURL = null;
- String sName = null;
- XOutputStream xos = null;
-
- // get interesting values from sourceData
- for (int i = 0 ; i < aSourceData.length; i++)
- {
- sName = aSourceData[i].Name;
- if (sName.equals("OutputStream"))
- xos = (XOutputStream)AnyConverter.toObject(XOutputStream.class, aSourceData[i].Value);
- if (sName.equals("URL"))
- sURL=(String)AnyConverter.toObject(String.class, aSourceData[i].Value);
- }
-
- // prepare the XML writer
- Object tmpObj = null;
- if (m_xHandler == null)
- {
- tmpObj = m_xServiceFactory.createInstance("com.sun.star.xml.sax.Writer");
- if (tmpObj != null)
- m_xHandler = (XExtendedDocumentHandler)UnoRuntime.queryInterface(XExtendedDocumentHandler.class, tmpObj);
- }
- if (m_xHandler == null)
- return false;
-
- // Connect the provided output stream to the writer
- XActiveDataSource xADSource = (XActiveDataSource)UnoRuntime.queryInterface(
- XActiveDataSource.class, m_xHandler);
-
- if (xADSource != null && xos != null)
- xADSource.setOutputStream(xos);
- else
- return false;
- } catch (com.sun.star.uno.Exception e){
- return false;
- }
-
- // done ...
- return true;
- }
-
- public void startDocument ()
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.startDocument();
- }
-
- public void endDocument()
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.endDocument();
- }
-
- public void startElement (String str, com.sun.star.xml.sax.XAttributeList xattribs)
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.startElement(str, xattribs);
- }
-
- public void endElement(String str)
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.endElement(str);
- }
-
- public void characters(String str)
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.characters(str);
- }
-
- public void ignorableWhitespace(String str)
- throws com.sun.star.xml.sax.SAXException
- {
- if (!m_bPrettyPrint) return;
- else m_xHandler.ignorableWhitespace(str);
- }
-
- public void processingInstruction(String aTarget, String aData)
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.processingInstruction(aTarget, aData);
- }
-
- public void setDocumentLocator(XLocator xLocator)
- throws com.sun.star.xml.sax.SAXException
- {
- m_xHandler.setDocumentLocator(xLocator);
- }
-
- // ------------------------------------------------------------
- // component management
-
- public static XSingleServiceFactory __getServiceFactory(String implName,
- XMultiServiceFactory multiFactory, XRegistryKey regKey)
- {
- XSingleServiceFactory xSingleServiceFactory = null;
- if (implName.equals(__implName) ) {
- try {
- xSingleServiceFactory = FactoryHelper.getServiceFactory(
- Class.forName(implName), __serviceName, multiFactory, regKey);
- } catch (java.lang.ClassNotFoundException e) {
- return null;
- }
- }
- return xSingleServiceFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
-// {
-// return FactoryHelper.writeRegistryServiceInfo(__implName,
-// __serviceName, regKey);
-// }
-
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.components b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.components
deleted file mode 100644
index 87359c3e..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="FlatXmlFilter_java.uno.jar">
- <implementation name="FlatXml">
- <service name="devguide.officedev.samples.filter.FlatXmlJava"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.xcu b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.xcu
deleted file mode 100644
index 16a04144..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.xcu
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Filter">
- <node oor:name="Filters">
- <node oor:name="devguide_FlatXMLFilter_Java_calc" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_calc</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlJava, ,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Calc</value>
- <value xml:lang="en-US">DevGuide FlatXML Calc</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Java_draw" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_draw</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlJava, ,com.sun.star.comp.DrawingLayer.XMLOasisImporter,com.sun.star.comp.DrawingLayer.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Draw</value>
- <value xml:lang="en-US">DevGuide FlatXML Draw</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Java_impress" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_impress</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlJava, ,com.sun.star.comp.Impress.XMLOasisImporter,com.sun.star.comp.Impress.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Impress</value>
- <value xml:lang="en-US">DevGuide FlatXML Impress</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Java_writer" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_writer</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlJava, ,com.sun.star.comp.Writer.XMLOasisImporter,com.sun.star.comp.Writer.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Writer</value>
- <value xml:lang="en-US">DevGuide FlatXML Writer</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- <node oor:name="devguide_FlatXMLFilter_Java_master" oor:op="replace">
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>devguide_FlatXMLType_Cpp_master</value></prop>
- <prop oor:name="DocumentService"><value>com.sun.star.text.GlobalDocument</value></prop>
- <prop oor:name="UIComponent"/>
- <prop oor:name="UserData"><value oor:separator=",">devguide.officedev.samples.filter.FlatXmlJava, ,com.sun.star.comp.Writer.XMLOasisImporter,com.sun.star.comp.Writer.XMLOasisExporter</value></prop>
- <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="UIName">
- <!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
- <value xml:lang="x-no-translate"></value>
- <value xml:lang="de">DevGuide FlatXML Master</value>
- <value xml:lang="en-US">DevGuide FlatXML Master</value>
- </prop>
- <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/Makefile
deleted file mode 100644
index a619e9d9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/Makefile
+++ /dev/null
@@ -1,143 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java FlatXMLFilter component example of the Developers Guide.
-
-PRJ=../../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=FlatXmlFilter_java
-OUT_COMP_CLASS = $(OUT_CLASS)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME = $(COMP_NAME).uno.jar
-COMP_JAR = $(OUT_COMP_CLASS)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-JAVAFILES = \
- FlatXml.java \
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-
-#$(COMP_NAME)_CLASSFILES = FlatXml.class FlatXml$(dlr)_FlatXml.class
-
-$(COMP_NAME)_CLASSFILES = *.class
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- FlatXmlFilterJavaExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: FlatXml> $@
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)FlatXmlFilter_java.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_JAR) FlatXmlFilter_java.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ FlatXmlFilter_java.xcu
- $(SDK_ZIP) -u $@ $(COMP_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-FlatXmlFilterJavaExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The Java FlatXmlFilter component is installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use the filters "$(QM)DevGuide FlatXML ...$(QM)" inside your office installation
- @echo after you have installed the "$(QM)FlatXmlTypeDetection.uno.pkg"$(QM) as well.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-%.local: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@) local
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
deleted file mode 100644
index b4c2cd1e..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// used interfaces
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.linguistic2.XLinguServiceManager;
-import com.sun.star.linguistic2.XSpellChecker;
-import com.sun.star.linguistic2.XHyphenator;
-import com.sun.star.linguistic2.XThesaurus;
-import com.sun.star.linguistic2.XSpellAlternatives;
-import com.sun.star.linguistic2.XHyphenatedWord;
-import com.sun.star.linguistic2.XPossibleHyphens;
-import com.sun.star.linguistic2.XMeaning;
-import com.sun.star.linguistic2.XSearchableDictionaryList;
-import com.sun.star.linguistic2.XLinguServiceEventListener;
-import com.sun.star.linguistic2.LinguServiceEvent;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.Locale;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Any;
-import com.sun.star.lang.XComponent;
-
-public class LinguisticExamples
-{
- // The remote office ocntext
- protected XComponentContext mxRemoteContext = null;
- // The MultiServiceFactory interface of the Office
- protected XMultiComponentFactory mxRemoteServiceManager = null;
-
- // The LinguServiceManager interface
- protected XLinguServiceManager mxLinguSvcMgr = null;
-
- // The SpellChecker interface
- protected XSpellChecker mxSpell = null;
-
- // The Hyphenator interface
- protected XHyphenator mxHyph = null;
-
- // The Thesaurus interface
- protected XThesaurus mxThes = null;
-
- // The DictionaryList interface
- protected XSearchableDictionaryList mxDicList = null;
-
- // The LinguProperties interface
- protected XPropertySet mxLinguProps = null;
-
-
- public static void main(String args[])
- {
- // Create an instance of the class and call it's begin method
- try {
- LinguisticExamples aExample = new LinguisticExamples();
- aExample.Connect();
- aExample.Run();
- } catch (Exception e) {
- System.err.println("failed to run examples");
- e.printStackTrace();
- }
- }
-
-
- public void Connect()
- throws java.lang.Exception
- {
- // get the remote office context. If necessary a new office
- // process is started
- mxRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- mxRemoteServiceManager = mxRemoteContext.getServiceManager();
- }
-
-
- /** Get the LinguServiceManager to be used. For example to access spell
- checker, thesaurus and hyphenator, also the component may choose to
- register itself as listener to it in order to get notified of relevant
- events. */
- public boolean GetLinguSvcMgr()
- throws com.sun.star.uno.Exception
- {
- if (mxRemoteContext != null && mxRemoteServiceManager != null) {
- Object aObj = mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.linguistic2.LinguServiceManager", mxRemoteContext );
- mxLinguSvcMgr = (XLinguServiceManager)
- UnoRuntime.queryInterface(XLinguServiceManager.class, aObj);
- }
- return mxLinguSvcMgr != null;
- }
-
-
- /** Get the SpellChecker to be used.
- */
- public boolean GetSpell()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- if (mxLinguSvcMgr != null)
- mxSpell = mxLinguSvcMgr.getSpellChecker();
- return mxSpell != null;
- }
-
- /** Get the Hyphenator to be used.
- */
- public boolean GetHyph()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- if (mxLinguSvcMgr != null)
- mxHyph = mxLinguSvcMgr.getHyphenator();
- return mxHyph != null;
- }
-
- /** Get the Thesaurus to be used.
- */
- public boolean GetThes()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- if (mxLinguSvcMgr != null)
- mxThes = mxLinguSvcMgr.getThesaurus();
- return mxThes != null;
- }
-
-
- public void Run()
- throws Exception
- {
- GetLinguSvcMgr();
-
-
- // list of property values to used in function calls below.
- // Only properties with values different from the (default) values
- // in the LinguProperties property set need to be supllied.
- // Thus we may stay with an empty list in order to use the ones
- // form the property set.
- PropertyValue[] aEmptyProps = new PropertyValue[0];
-
- // use american english as language
- Locale aLocale = new Locale("en","US","");
-
-
-
- // another list of property values to used in function calls below.
- // Only properties with values different from the (default) values
- // in the LinguProperties property set need to be supllied.
- PropertyValue[] aProps = new PropertyValue[1];
- aProps[0] = new PropertyValue();
- aProps[0].Name = "IsGermanPreReform";
- aProps[0].Value = new Boolean( true );
-
-
- GetSpell();
- if (mxSpell != null)
- {
- // test with correct word
- String aWord = "horseback";
- boolean bIsCorrect = mxSpell.isValid( aWord, aLocale, aEmptyProps );
- System.out.println( aWord + ": " + bIsCorrect );
-
- // test with incorrect word
- aWord = "course";
- bIsCorrect = mxSpell.isValid( aWord, aLocale , aEmptyProps );
- System.out.println( aWord + ": " + bIsCorrect );
-
-
- aWord = "house";
- XSpellAlternatives xAlt = mxSpell.spell( aWord, aLocale, aEmptyProps );
- if (xAlt == null)
- System.out.println( aWord + " is correct." );
- else
- {
- System.out.println( aWord + " is not correct. A list of proposals follows." );
- String[] aAlternatives = xAlt.getAlternatives();
- if (aAlternatives.length == 0)
- System.out.println( "no proposal found." );
- else
- {
- for (int i = 0; i < aAlternatives.length; ++i)
- System.out.println( aAlternatives[i] );
- }
- }
- }
-
-
- GetHyph();
- if (mxHyph != null)
- {
- // maximum number of characters to remain before the hyphen
- // character in the resulting word of the hyphenation
- short nMaxLeading = 6;
-
- XHyphenatedWord xHyphWord = mxHyph.hyphenate( "waterfall",
- aLocale, nMaxLeading ,
- aEmptyProps );
- if (xHyphWord == null)
- System.out.println( "no valid hyphenation position found" );
- else
- {
- System.out.println( "valid hyphenation pos found at "
- + xHyphWord.getHyphenationPos()
- + " in " + xHyphWord.getWord() );
- System.out.println( "hyphenation char will be after char "
- + xHyphWord.getHyphenPos()
- + " in " + xHyphWord.getHyphenatedWord() );
- }
-
-
- //! Note: 'aProps' needs to have set 'IsGermanPreReform' to true!
- xHyphWord = mxHyph.queryAlternativeSpelling( "Schiffahrt",
- new Locale("de","DE",""), (short)4, aProps );
- if (xHyphWord == null)
- System.out.println( "no alternative spelling found at specified position." );
- else
- {
- if (xHyphWord.isAlternativeSpelling())
- System.out.println( "alternative spelling detectetd!" );
- System.out.println( "valid hyphenation pos found at "
- + xHyphWord.getHyphenationPos()
- + " in " + xHyphWord.getWord() );
- System.out.println( "hyphenation char will be after char "
- + xHyphWord.getHyphenPos()
- + " in " + xHyphWord.getHyphenatedWord() );
- }
-
-
- XPossibleHyphens xPossHyph = mxHyph.createPossibleHyphens("waterfall",
- aLocale,
- aEmptyProps );
- if (xPossHyph == null)
- System.out.println( "no hyphenation positions found." );
- else
- System.out.println( xPossHyph.getPossibleHyphens() );
- }
-
-
- GetThes();
- if (mxThes != null)
- {
- XMeaning[] xMeanings = mxThes.queryMeanings("house", aLocale,
- aEmptyProps );
- if (xMeanings == null)
- System.out.println( "nothing found." );
- else
- {
- for (int i = 0; i < xMeanings.length; ++i)
- {
- System.out.println( "Meaning: " + xMeanings[i].getMeaning() );
- String[] aSynonyms = xMeanings[i].querySynonyms();
- for (int k = 0; k < aSynonyms.length; ++k)
- System.out.println( " Synonym: " + aSynonyms[k] );
- }
- }
- }
-
-
-
- XLinguServiceEventListener aClient = new Client();
-
- // get access to LinguProperties property set
- Object aObj = mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.linguistic2.LinguProperties", mxRemoteContext);
- XPropertySet aLinguProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class,aObj);
-
- // set a spellchecker and hyphenator property value to a defined state
- try {
- aLinguProps.setPropertyValue("IsGermanPreReform", new Boolean(true));
- } catch (Exception e) {
- }
-
- // now add the client as listener to the service manager to
- // get informed when spellchecking or hyphenation may produce
- // different results then before.
- mxLinguSvcMgr.addLinguServiceManagerListener(aClient);
-
- // change that property value in order to trigger a property change
- // event that eventually results in the listeners
- // 'processLinguServiceEvent' function being called
- try {
- aLinguProps.setPropertyValue("IsGermanPreReform", new Boolean(false));
- } catch (Exception e) {
- }
-
- //! keep the listener and the program alive until the event will
- //! be launched.
- //! There is a voluntary delay before launching the event!
- // Of course this code would usually not be in a *real* client
- // its
- synchronized(this) {
- try {
- this.wait(4000);
- } catch(Exception e) {
-
- }
- }
-
- //! remove listener before programm termination.
- //! should not be omitted.
- mxLinguSvcMgr.removeLinguServiceManagerListener(aClient);
-
-
- System.exit(0);
- }
-
- /** simple sample implementation of a clients XLinguServiceEventListener
- * interface implementation
- */
- public class Client
- implements XLinguServiceEventListener
- {
- public void disposing ( EventObject aEventObj )
- {
- //! any references to the EventObjects source have to be
- //! released here now!
-
- System.out.println("object listened to will be disposed");
- }
-
- public void processLinguServiceEvent( LinguServiceEvent aServiceEvent )
- {
- //! do here whatever you think needs to be done depending
- //! on the event recieved (e.g. trigger background spellchecking
- //! or hyphenation again.)
-
- System.out.println("Listener called");
- }
- };
-
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile
deleted file mode 100644
index 83491a84..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile
+++ /dev/null
@@ -1,232 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevLinguistic examples of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevLinguisticExample
-OUT_COMP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-COMP1_NAME=SampleHyphenator
-COMP1_PACKAGE = $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT)
-COMP1_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)")
-COMP1_JAR_NAME = $(COMP1_NAME).uno.jar
-COMP1_JAR = $(OUT_COMP_CLASS)/$(COMP1_JAR_NAME)
-COMP1_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP1_NAME).uno.Manifest
-COMP1_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP1_NAME)/META-INF/manifest.xml
-COMP1_COMPONENTS=$(COMP1_NAME).components
-
-COMP2_NAME=SampleSpellChecker
-COMP2_PACKAGE = $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT)
-COMP2_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)")
-COMP2_JAR_NAME = $(COMP2_NAME).uno.jar
-COMP2_JAR = $(OUT_COMP_CLASS)/$(COMP2_JAR_NAME)
-COMP2_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP2_NAME).uno.Manifest
-COMP2_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP2_NAME)/META-INF/manifest.xml
-COMP2_COMPONENTS=$(COMP2_NAME).components
-
-COMP3_NAME=SampleThesaurus
-COMP3_PACKAGE = $(OUT_BIN)/$(COMP3_NAME).$(UNOOXT_EXT)
-COMP3_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP3_NAME).$(UNOOXT_EXT)")
-COMP3_JAR_NAME = $(COMP3_NAME).uno.jar
-COMP3_JAR = $(OUT_COMP_CLASS)/$(COMP3_JAR_NAME)
-COMP3_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP3_NAME).uno.Manifest
-COMP3_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP3_NAME)/META-INF/manifest.xml
-COMP3_COMPONENTS=$(COMP2_NAME).components
-
-APP1_NAME=LinguisticExamples
-APP1_JAR=$(OUT_COMP_CLASS)/$(APP1_NAME).jar
-
-REGISTERFLAG = $(OUT_MISC)/devguide_officedevlinguistic_register_component.flag
-
-JAVAFILES = \
- OneInstanceFactory.java \
- PropChgHelper.java \
- PropChgHelper_Hyph.java \
- PropChgHelper_Spell.java \
- XHyphenatedWord_impl.java \
- XMeaning_impl.java \
- XPossibleHyphens_impl.java \
- XSpellAlternatives_impl.java \
- SampleHyphenator.java \
- SampleSpellChecker.java \
- SampleThesaurus.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-$(COMP1_NAME)_CLASSFILES = XHyphenatedWord_impl.class \
- XPossibleHyphens_impl.class \
- PropChgHelper.class \
- PropChgHelper_Hyph.class \
- OneInstanceFactory.class \
- $(COMP1_NAME).class
-
-$(COMP2_NAME)_CLASSFILES = XSpellAlternatives_impl.class \
- PropChgHelper_Spell.class \
- PropChgHelper.class \
- OneInstanceFactory.class \
- $(COMP2_NAME).class
-
-$(COMP3_NAME)_CLASSFILES = XMeaning_impl.class \
- OneInstanceFactory.class \
- $(COMP3_NAME).class
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(basename $(basename $(@F)))> $@
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-# NOTE: because of gnu make problems with full qualified paths, the pattern
-# rules for the component jars and the packages doesn't work proper and we
-# defined explicit rules
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).components$(QM)"/$(CSEP) >> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-$(COMP1_PACKAGE) : $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP1_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP2_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP3_JAR) : $(COMP3_MANIFESTFILE) $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-$(COMP3_PACKAGE) : $(COMP3_JAR) $(COMP3_UNOPKG_MANIFEST) $(COMP3_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP3_COMPONENTS)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(REGISTERFLAG) : $(COMP1_PACKAGE) $(COMP2_PACKAGE) $(COMP3_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(DEPLOYTOOL) $(COMP1_PACKAGE_URL)
- $(DEPLOYTOOL) $(COMP2_PACKAGE_URL)
- $(DEPLOYTOOL) $(COMP3_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(OUT_COMP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $<
-
-$(OUT_COMP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(APP1_NAME).class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(basename $(@F)).class $(basename $(@F))$(QUOTE)$$Client.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-
-$(EXAMPLE_NAME) : $(REGISTERFLAG) $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------
- @echo Before you can run the examples the components "$(QM)$(COMP1_NAME)$(QM)",
- @echo "$(QM)$(COMP2_NAME)$(QM)" and "$(QM)$(COMP3_NAME)$(QM)" must be deployed.
- @echo The components will be automatically deployed if SDK_AUTO_DEPLOYMENT = YES.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP3_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java
deleted file mode 100644
index 03e2a665..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.UnoRuntime;
-
-import java.lang.reflect.Constructor;
-
-//
-// purpose of this class is to provide a service factory that instantiates
-// the services only once (as long as this factory itself exists)
-// and returns only reference to that instance.
-//
-
-public class OneInstanceFactory implements
- XSingleServiceFactory,
- XServiceInfo
-{
- Class aMyClass;
- String aSvcImplName;
- String[] aSupportedSvcNames;
- XInterface xInstantiatedService;
- XMultiServiceFactory xMultiFactory;
-
- public OneInstanceFactory(
- Class aMyClass,
- String aSvcImplName,
- String[] aSupportedSvcNames,
- XMultiServiceFactory xMultiFactory )
- {
- this.aMyClass = aMyClass;
- this.aSvcImplName = aSvcImplName;
- this.aSupportedSvcNames = aSupportedSvcNames;
- this.xMultiFactory = xMultiFactory;
- xInstantiatedService = null;
- }
-
- //**********************
- // XSingleServiceFactory
- //**********************
- public Object createInstance()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- if (xInstantiatedService == null)
- {
- //!! the here used services all have exact one constructor!!
- Constructor [] aCtor = aMyClass.getConstructors();
- try {
- xInstantiatedService = (XInterface) aCtor[0].newInstance( (Object[])null );
- }
- catch( Exception e ) {
- }
-
- //!! workaround for services not always being created
- //!! via 'createInstanceWithArguments'
- XInitialization xIni = (XInitialization) UnoRuntime.queryInterface(
- XInitialization.class, createInstance());
- if (xIni != null)
- {
- Object[] aArguments = new Object[]{ null, null };
- if (xMultiFactory != null)
- {
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class , xMultiFactory.createInstance(
- "com.sun.star.linguistic2.LinguProperties" ) );
- aArguments[0] = xPropSet;
- }
- xIni.initialize( aArguments );
- }
- }
- return xInstantiatedService;
- }
-
- public Object createInstanceWithArguments( Object[] aArguments )
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- if (xInstantiatedService == null)
- {
- XInitialization xIni = (XInitialization) UnoRuntime.queryInterface(
- XInitialization.class, createInstance());
- if (xIni != null)
- xIni.initialize( aArguments );
- }
- return xInstantiatedService;
- }
-
-
- //*************
- // XServiceInfo
- //*************
- public boolean supportsService( String aServiceName )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bFound = false;
- int nCnt = aSupportedSvcNames.length;
- for (int i = 0; i < nCnt && !bFound; ++i)
- {
- if (aServiceName.equals( aSupportedSvcNames[i] ))
- bFound = true;
- }
- return bFound;
- }
-
- public String getImplementationName()
- throws com.sun.star.uno.RuntimeException
- {
- return aSvcImplName;
- }
-
- public String[] getSupportedServiceNames()
- throws com.sun.star.uno.RuntimeException
- {
- return aSupportedSvcNames;
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java
deleted file mode 100644
index ec647148..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.linguistic2.XLinguServiceEventListener;
-import com.sun.star.linguistic2.LinguServiceEvent;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertyChangeListener;
-import com.sun.star.beans.PropertyChangeEvent;
-import com.sun.star.lang.EventObject;
-import com.sun.star.uno.XInterface;
-
-import java.util.ArrayList;
-
-public class PropChgHelper implements
- XPropertyChangeListener,
- XLinguServiceEventBroadcaster
-{
- XInterface xEvtSource;
- String[] aPropNames;
- XPropertySet xPropSet;
- ArrayList aLngSvcEvtListeners;
-
- public PropChgHelper(
- XInterface xEvtSource,
- String[] aPropNames )
- {
- this.xEvtSource = xEvtSource;
- this.aPropNames = aPropNames;
- xPropSet = null;
- aLngSvcEvtListeners = new ArrayList();
- }
-
- public XInterface GetEvtSource()
- {
- return xEvtSource;
- }
-
- public XPropertySet GetPropSet()
- {
- return xPropSet;
- }
-
- public String[] GetPropNames()
- {
- return aPropNames;
- }
-
- public void LaunchEvent( LinguServiceEvent aEvt )
- {
- int nCnt = aLngSvcEvtListeners.size();
- for (int i = 0; i < nCnt; ++i)
- {
- XLinguServiceEventListener xLstnr =
- (XLinguServiceEventListener) aLngSvcEvtListeners.get(i);
- if (xLstnr != null)
- xLstnr.processLinguServiceEvent( aEvt );
- }
- }
-
- public void AddAsListenerTo( XPropertySet xPropertySet )
- {
- // do not listen any longer to the old property set (if any)
- RemoveAsListener();
-
- // set new property set to be used and register as listener to it
- xPropSet = xPropertySet;
- if (xPropSet != null)
- {
- int nLen = aPropNames.length;
- for (int i = 0; i < nLen; ++i)
- {
- if (aPropNames[i].length() != 0)
- {
- try {
- xPropSet.addPropertyChangeListener(
- aPropNames[i], (XPropertyChangeListener) this );
- }
- catch( Exception e ) {
- }
- }
- }
- }
- }
-
- public void RemoveAsListener()
- {
- if (xPropSet != null)
- {
- int nLen = aPropNames.length;
- for (int i = 0; i < nLen; ++i)
- {
- if (aPropNames[i].length() != 0)
- {
- try {
- xPropSet.removePropertyChangeListener(
- aPropNames[i], (XPropertyChangeListener) this );
- }
- catch( Exception e ) {
- }
- }
- }
-
- xPropSet = null;
- }
- }
-
- // __________ interface methods __________
-
- //***************
- // XEventListener
- //***************
- public void disposing( EventObject aSource )
- throws com.sun.star.uno.RuntimeException
- {
- if (aSource.Source == xPropSet)
- {
- RemoveAsListener();
- }
- }
-
- //************************
- // XPropertyChangeListener
- //************************
- public void propertyChange( PropertyChangeEvent aEvt )
- throws com.sun.star.uno.RuntimeException
- {
- // will be overloaded in derived classes
- }
-
- //******************************
- // XLinguServiceEventBroadcaster
- //******************************
- public boolean addLinguServiceEventListener(
- XLinguServiceEventListener xListener )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (xListener != null)
- {
- bRes = aLngSvcEvtListeners.add( xListener );
- }
- return bRes;
- }
-
- public boolean removeLinguServiceEventListener(
- XLinguServiceEventListener xListener )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (xListener != null)
- {
- int nIdx = aLngSvcEvtListeners.indexOf( xListener );
- if (nIdx != -1)
- {
- aLngSvcEvtListeners.remove( nIdx );
- bRes = true;
- }
- }
- return bRes;
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java
deleted file mode 100644
index 0b639503..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Hyph.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.linguistic2.XLinguServiceEventListener;
-import com.sun.star.linguistic2.LinguServiceEvent;
-import com.sun.star.linguistic2.LinguServiceEventFlags;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertyChangeListener;
-import com.sun.star.beans.PropertyChangeEvent;
-import com.sun.star.lang.EventObject;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-
-import java.util.ArrayList;
-
-public class PropChgHelper_Hyph extends PropChgHelper
-{
- public PropChgHelper_Hyph(
- XInterface xEvtSource,
- String[] aPropNames )
- {
- super( xEvtSource, aPropNames );
- }
-
- //************************
- // XPropertyChangeListener
- //************************
- public void propertyChange( PropertyChangeEvent aEvt )
- throws com.sun.star.uno.RuntimeException
- {
- {
- short nLngSvcFlags = 0;
- if (aEvt.PropertyName.equals( "IsIgnoreControlCharacters" ))
- {
- // nothing to be done
- }
- else if (aEvt.PropertyName.equals( "IsUseDictionaryList" ) ||
- aEvt.PropertyName.equals( "IsGermanPreReform" ) ||
- aEvt.PropertyName.equals( "HyphMinLeading" ) ||
- aEvt.PropertyName.equals( "HyphMinTrailing" ) ||
- aEvt.PropertyName.equals( "HyphMinWordLength" ))
- {
- nLngSvcFlags = LinguServiceEventFlags.HYPHENATE_AGAIN;
- }
-
- if (nLngSvcFlags != 0)
- {
- LinguServiceEvent aEvent = new LinguServiceEvent( GetEvtSource(), nLngSvcFlags );
- LaunchEvent( aEvent );
- }
- }
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java
deleted file mode 100644
index 9a4f07a3..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper_Spell.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.linguistic2.XLinguServiceEventListener;
-import com.sun.star.linguistic2.LinguServiceEvent;
-import com.sun.star.linguistic2.LinguServiceEventFlags;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertyChangeListener;
-import com.sun.star.beans.PropertyChangeEvent;
-import com.sun.star.lang.EventObject;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-
-import java.util.ArrayList;
-
-public class PropChgHelper_Spell extends PropChgHelper
-{
- public PropChgHelper_Spell(
- XInterface xEvtSource,
- String[] aPropNames )
- {
- super( xEvtSource, aPropNames );
- }
-
- //************************
- // XPropertyChangeListener
- //************************
- public void propertyChange( PropertyChangeEvent aEvt )
- throws com.sun.star.uno.RuntimeException
- {
- {
- short nLngSvcFlags = 0;
- boolean bSCWA = false; // SPELL_CORRECT_WORDS_AGAIN ?
- boolean bSWWA = false; // SPELL_WRONG_WORDS_AGAIN ?
-
- boolean bVal = ((Boolean) aEvt.NewValue).booleanValue();
-
- if (aEvt.PropertyName.equals( "IsIgnoreControlCharacters" ))
- {
- // nothing to be done
- }
- else if (aEvt.PropertyName.equals( "IsGermanPreReform" ))
- {
- bSCWA = bSWWA = true;
- }
- else if (aEvt.PropertyName.equals( "IsUseDictionaryList" ))
- {
- bSCWA = bSWWA = true;
- }
- else if (aEvt.PropertyName.equals( "IsSpellUpperCase" ))
- {
- bSCWA = false == bVal; // FALSE->TRUE change?
- bSWWA = !bSCWA; // TRUE->FALSE change?
- }
- else if (aEvt.PropertyName.equals( "IsSpellWithDigits" ))
- {
- bSCWA = false == bVal; // FALSE->TRUE change?
- bSWWA = !bSCWA; // TRUE->FALSE change?
- }
- else if (aEvt.PropertyName.equals( "IsSpellCapitalization" ))
- {
- bSCWA = false == bVal; // FALSE->TRUE change?
- bSWWA = !bSCWA; // TRUE->FALSE change?
- }
-
- if (bSCWA)
- nLngSvcFlags |= LinguServiceEventFlags.SPELL_CORRECT_WORDS_AGAIN;
- if (bSWWA)
- nLngSvcFlags |= LinguServiceEventFlags.SPELL_WRONG_WORDS_AGAIN;
- if (nLngSvcFlags != 0)
- {
- LinguServiceEvent aEvent = new LinguServiceEvent( GetEvtSource(), nLngSvcFlags );
- LaunchEvent( aEvent );
- }
- }
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components
deleted file mode 100644
index bf083b38..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="SampleHyphenator.uno.jar">
- <implementation name="SampleHyphenator">
- <service name="com.sun.star.linguistic2.Hyphenator"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
deleted file mode 100644
index f42854a7..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
+++ /dev/null
@@ -1,552 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// uno
-import com.sun.star.lib.uno.helper.ComponentBase;
-import com.sun.star.uno.UnoRuntime;
-
-// factories
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-// supported Interfaces
-import com.sun.star.linguistic2.XHyphenator;
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XServiceDisplayName;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.lang.IllegalArgumentException;
-
-//used Interfaces
-import com.sun.star.linguistic2.XLinguServiceEventListener;
-import com.sun.star.linguistic2.XHyphenatedWord;
-import com.sun.star.linguistic2.XPossibleHyphens;
-import com.sun.star.lang.Locale;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.EventObject;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Type;
-
-import java.util.ArrayList;
-
-public class SampleHyphenator extends ComponentBase implements
- XHyphenator,
- XLinguServiceEventBroadcaster,
- XInitialization,
- XServiceDisplayName,
- XServiceInfo
-{
- PropChgHelper_Hyph aPropChgHelper;
- ArrayList aEvtListeners;
- boolean bDisposing;
-
- public SampleHyphenator()
- {
- // names of relevant properties to be used
- String[] aProps = new String[]
- {
- "IsIgnoreControlCharacters",
- "IsUseDictionaryList",
- "IsGermanPreReform",
- "HyphMinLeading",
- "HyphMinTrailing",
- "HyphMinWordLength"
- };
- aPropChgHelper = new PropChgHelper_Hyph( (XHyphenator) this, aProps );
- aEvtListeners = new ArrayList();;
- bDisposing = false;
- }
-
- private boolean IsEqual( Locale aLoc1, Locale aLoc2 )
- {
- return aLoc1.Language.equals( aLoc2.Language ) &&
- aLoc1.Country .equals( aLoc2.Country ) &&
- aLoc1.Variant .equals( aLoc2.Variant );
- }
-
- private boolean GetValueToUse(
- String aPropName,
- boolean bDefaultVal,
- PropertyValue[] aProps )
- {
- boolean bRes = bDefaultVal;
-
- try
- {
- // use temporary value if supplied
- for (int i = 0; i < aProps.length; ++i)
- {
- if (aPropName.equals( aProps[i].Name ))
- {
- Object aObj = aProps[i].Value;
- if (AnyConverter.isBoolean( aObj ))
- {
- bRes = AnyConverter.toBoolean( aObj );
- return bRes;
- }
- }
- }
-
- // otherwise use value from property set (if available)
- XPropertySet xPropSet = aPropChgHelper.GetPropSet();
- if (xPropSet != null) // should always be the case
- {
- Object aObj = xPropSet.getPropertyValue( aPropName );
- if (AnyConverter.isBoolean( aObj ))
- bRes = AnyConverter.toBoolean( aObj );
- }
- }
- catch (Exception e) {
- bRes = bDefaultVal;
- }
-
- return bRes;
- }
-
- private short GetValueToUse(
- String aPropName,
- short nDefaultVal,
- PropertyValue[] aProps )
- {
- short nRes = nDefaultVal;
-
- try
- {
- // use temporary value if supplied
- for (int i = 0; i < aProps.length; ++i)
- {
- if (aPropName.equals( aProps[i].Name ))
- {
- Object aObj = aProps[i].Value;
- if (AnyConverter.isShort( aObj ))
- {
- nRes = AnyConverter.toShort( aObj );
- return nRes;
- }
- }
- }
-
- // otherwise use value from property set (if available)
- XPropertySet xPropSet = aPropChgHelper.GetPropSet();
- if (xPropSet != null) // should always be the case
- {
- Object aObj = xPropSet.getPropertyValue( aPropName );
- if (AnyConverter.isShort( aObj ))
- nRes = AnyConverter.toShort( aObj );
- }
- }
- catch (Exception e) {
- nRes = nDefaultVal;
- }
-
- return nRes;
- }
-
- // __________ interface methods __________
-
-
- //*****************
- //XSupportedLocales
- //*****************
- public Locale[] getLocales()
- throws com.sun.star.uno.RuntimeException
- {
- Locale aLocales[] =
- {
- new Locale( "de", "DE", "" ),
- new Locale( "en", "US", "" )
- };
-
- return aLocales;
- }
-
- public boolean hasLocale( Locale aLocale )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if ( IsEqual( aLocale, new Locale( "de", "DE", "" ) ) ||
- IsEqual( aLocale, new Locale( "en", "US", "" ) ))
- bRes = true;
- return bRes;
- }
-
- //***********
- //XHyphenator
- //***********
- public XHyphenatedWord hyphenate(
- String aWord, Locale aLocale,
- short nMaxLeading, PropertyValue[] aProperties )
- throws com.sun.star.uno.RuntimeException,
- IllegalArgumentException
- {
- if (IsEqual( aLocale, new Locale() ) || aWord.length() == 0)
- return null;
-
- // linguistic is currently not allowed to throw exceptions
- // thus we return null fwhich means 'word cannot be hyphenated'
- if (!hasLocale( aLocale ))
- return null;
-
- // get values of relevant properties that may be used.
- //! The values for 'IsIgnoreControlCharacters' and 'IsUseDictionaryList'
- //! are handled by the dispatcher! Thus there is no need to access
- //! them here.
- boolean bIsIgnoreControlCharacters = GetValueToUse( "IsIgnoreControlCharacters", true, aProperties );
- boolean bIsUseDictionaryList = GetValueToUse( "IsUseDictionaryList", true, aProperties );
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
- short nHyphMinLeading = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
- short nHyphMinTrailing = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
- short nHyphMinWordLen = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );
-
- XHyphenatedWord xRes = null;
-
- if (aWord.length() >= nHyphMinWordLen)
- {
- String aHyphenatedWord = aWord;
- short nHyphenationPos = -1;
- short nHyphenPos = -1;
-
- //!! This code needs to be replaced by code calling the actual
- //!! implementation of your hyphenator
- if (IsEqual( aLocale, new Locale( "de", "DE", "" ) ) )
- {
- if (bIsGermanPreReform && aWord.equals( "Schiffahrt" ))
- {
- // Note: there is only one position where the word
- // can be hyphenated...
-
- aHyphenatedWord = "Schifffahrt";
- nHyphenationPos = 4;
- nHyphenPos = 5;
- }
- else if (!bIsGermanPreReform && aWord.equals( "Schifffahrt" ))
- {
- nHyphenationPos = nHyphenPos = 5;
- }
- }
- else if (IsEqual( aLocale, new Locale( "en", "US", "" ) ) )
- {
- int nLast = aWord.length() - 1 - nHyphMinTrailing;
-
- if ( aWord.equals( "waterfall" ) )
- {
- if (4 <= nLast)
- nHyphenationPos = nHyphenPos = 4;
- else
- nHyphenationPos = nHyphenPos = 1;
- }
- else if ( aWord.equals( "driving" ) )
- {
- nHyphenationPos = nHyphenPos = 3;
- }
- }
-
- // check if hyphenation pos is valid,
- // a value of -1 indicates that hyphenation is not possible
- if ( nHyphenationPos != -1 &&
- !(nHyphenationPos < nHyphMinLeading) &&
- !(nHyphenationPos >= aWord.length() - nHyphMinTrailing))
- {
- xRes = new XHyphenatedWord_impl(aWord, aLocale,
- nHyphenationPos, aHyphenatedWord, nHyphenPos);
- }
- }
- return xRes;
- }
-
- public XHyphenatedWord queryAlternativeSpelling(
- String aWord, Locale aLocale,
- short nIndex, PropertyValue[] aProperties )
- throws com.sun.star.uno.RuntimeException,
- IllegalArgumentException
- {
- if (IsEqual( aLocale, new Locale() ) || aWord.length() == 0)
- return null;
-
- // linguistic is currently not allowed to throw exceptions
- // thus we return null which means 'word cannot be hyphenated'
- if (!hasLocale( aLocale ))
- return null;
-
- // get values of relevant properties that may be used.
- //! The values for 'IsIgnoreControlCharacters' and 'IsUseDictionaryList'
- //! are handled by the dispatcher! Thus there is no need to access
- //! them here.
- boolean bIsIgnoreControlCharacters = GetValueToUse( "IsIgnoreControlCharacters", true, aProperties );
- boolean bIsUseDictionaryList = GetValueToUse( "IsUseDictionaryList", true, aProperties );
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
- short nHyphMinLeading = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
- short nHyphMinTrailing = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
- short nHyphMinWordLen = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );
-
- XHyphenatedWord xRes = null;
-
- //!! This code needs to be replaced by code calling the actual
- //!! implementation of your hyphenator
- if ( IsEqual( aLocale, new Locale( "de", "DE", "" ) ) )
- {
- // there is an alternative spelling only when the
- // word is hyphenated between the "ff" and old german spelling
- // is set.
- if (aWord.equals( "Schiffahrt" ) &&
- bIsGermanPreReform && nIndex == 4)
- {
- xRes = new XHyphenatedWord_impl(aWord, aLocale,
- (short)4, "Schifffahrt", (short)5 );
- }
- }
- else if ( IsEqual( aLocale, new Locale( "en", "US", "" ) ) )
- {
- // There are no alternative spellings in the English language
- }
-
- return xRes;
- }
-
- public XPossibleHyphens createPossibleHyphens(
- String aWord, Locale aLocale,
- PropertyValue[] aProperties )
- throws com.sun.star.uno.RuntimeException,
- IllegalArgumentException
- {
- if (IsEqual( aLocale, new Locale() ) || aWord.length() == 0)
- return null;
-
- // linguistic is currently not allowed to throw exceptions
- // thus we return null which means 'word cannot be hyphenated'
- if (!hasLocale( aLocale ))
- return null;
-
- // get values of relevant properties that may be used.
- //! The values for 'IsIgnoreControlCharacters' and 'IsUseDictionaryList'
- //! are handled by the dispatcher! Thus there is no need to access
- //! them here.
- boolean bIsIgnoreControlCharacters = GetValueToUse( "IsIgnoreControlCharacters", true, aProperties );
- boolean bIsUseDictionaryList = GetValueToUse( "IsUseDictionaryList", true, aProperties );
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
- short nHyphMinLeading = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
- short nHyphMinTrailing = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
- short nHyphMinWordLen = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );
-
- XPossibleHyphens xRes = null;
-
- //!! This code needs to be replaced by code calling the actual
- //!! implementation of your hyphenator
- if ( IsEqual( aLocale, new Locale( "de", "DE", "" ) ) )
- {
- if (bIsGermanPreReform && aWord.equals( "Schiffahrt" ))
- {
- short aPos[] = new short[] { (short) 4 };
- xRes = new XPossibleHyphens_impl(aWord, aLocale,
- "Schiff=fahrt", aPos);
- }
- else if (!bIsGermanPreReform && aWord.equals( "Schifffahrt" ))
- {
- short aPos[] = new short[] { (short) 5 };
- xRes = new XPossibleHyphens_impl(aWord, aLocale,
- "Schiff=fahrt", aPos);
- }
- }
- else if ( IsEqual( aLocale, new Locale( "en", "US", "" ) ) )
- {
- if ( aWord.equals( "waterfall" ) )
- {
- short aPos[] = new short[]
- { (short) 1, (short) 4 };
- xRes = new XPossibleHyphens_impl(aWord, aLocale,
- "wa=ter=fall", aPos);
- }
- else if ( aWord.equals( "driving" ) )
- {
- short aPos[] = new short[]
- { (short) 3 };
- xRes = new XPossibleHyphens_impl(aWord, aLocale,
- "driv=ing", aPos);
- }
- }
-
- return xRes;
- }
-
- //*****************************
- //XLinguServiceEventBroadcaster
- //*****************************
- public boolean addLinguServiceEventListener (
- XLinguServiceEventListener xLstnr )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (!bDisposing && xLstnr != null)
- bRes = aPropChgHelper.addLinguServiceEventListener( xLstnr );
- return bRes;
- }
-
- public boolean removeLinguServiceEventListener(
- XLinguServiceEventListener xLstnr )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (!bDisposing && xLstnr != null)
- bRes = aPropChgHelper.removeLinguServiceEventListener( xLstnr );
- return bRes;
- }
-
- //********************
- // XServiceDisplayName
- //********************
- public String getServiceDisplayName( Locale aLocale )
- throws com.sun.star.uno.RuntimeException
- {
- return "Java Samples";
- }
-
- //****************
- // XInitialization
- //****************
- public void initialize( Object[] aArguments )
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- int nLen = aArguments.length;
- if (2 == nLen)
- {
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, aArguments[0]);
- // start listening to property changes
- aPropChgHelper.AddAsListenerTo( xPropSet );
- }
- }
-
-
- //*************
- // XServiceInfo
- //*************
- public boolean supportsService( String aServiceName )
- throws com.sun.star.uno.RuntimeException
- {
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- boolean bResult = false;
-
- for( i = 0; !bResult && i < nLength; ++i )
- bResult = aServiceName.equals( aServices[ i ] );
-
- return bResult;
- }
-
- public String getImplementationName()
- throws com.sun.star.uno.RuntimeException
- {
- return _aSvcImplName;
- }
-
- public String[] getSupportedServiceNames()
- throws com.sun.star.uno.RuntimeException
- {
- return getSupportedServiceNames_Static();
- }
-
- // __________ static things __________
-
- public static String _aSvcImplName = SampleHyphenator.class.getName();
-
- public static String[] getSupportedServiceNames_Static()
- {
- String[] aResult = { "com.sun.star.linguistic2.Hyphenator" };
- return aResult;
- }
-
-
- /**
- * Returns a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleServiceFactory</code> for creating the component
- * @param implName the name of the implementation for which a service is desired
- * @param multiFactory the service manager to be used if needed
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(
- String aImplName,
- XMultiServiceFactory xMultiFactory,
- com.sun.star.registry.XRegistryKey xRegKey )
- {
- XSingleServiceFactory xSingleServiceFactory = null;
- if( aImplName.equals( _aSvcImplName ) )
- {
- xSingleServiceFactory = new OneInstanceFactory(
- SampleHyphenator.class, _aSvcImplName,
- getSupportedServiceNames_Static(),
- xMultiFactory );
- }
- return xSingleServiceFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param xRegKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey xRegKey )
-// {
-// boolean bResult = true;
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _aSvcImplName, aServices[i], xRegKey );
-// }
-// return bResult;
-// }
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components
deleted file mode 100644
index bb489918..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="SampleSpellChecker.uno.jar">
- <implementation name="SampleSpellChecker">
- <service name="com.sun.star.linguistic2.SpellChecker"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
deleted file mode 100644
index c2c5be8c..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// uno
-import com.sun.star.lib.uno.helper.ComponentBase;
-import com.sun.star.uno.UnoRuntime;
-
-// factories
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-// supported Interfaces
-import com.sun.star.linguistic2.XSpellChecker;
-import com.sun.star.linguistic2.XLinguServiceEventBroadcaster;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XServiceDisplayName;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.lang.IllegalArgumentException;
-
-//used Interfaces
-import com.sun.star.linguistic2.XLinguServiceEventListener;
-import com.sun.star.linguistic2.XSpellAlternatives;
-import com.sun.star.linguistic2.SpellFailure;
-import com.sun.star.lang.Locale;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.EventObject;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.Type;
-
-import java.util.ArrayList;
-
-public class SampleSpellChecker extends ComponentBase implements
- XSpellChecker,
- XLinguServiceEventBroadcaster,
- XInitialization,
- XServiceDisplayName,
- XServiceInfo
-{
- PropChgHelper_Spell aPropChgHelper;
- ArrayList aEvtListeners;
- boolean bDisposing;
-
- public SampleSpellChecker()
- {
- // names of relevant properties to be used
- String[] aProps = new String[]
- {
- "IsIgnoreControlCharacters",
- "IsUseDictionaryList",
- "IsGermanPreReform",
- "IsSpellUpperCase",
- "IsSpellWithDigits",
- "IsSpellCapitalization"
- };
- aPropChgHelper = new PropChgHelper_Spell( (XSpellChecker) this, aProps );
- aEvtListeners = new ArrayList();
- bDisposing = false;
- }
-
- private boolean IsEqual( Locale aLoc1, Locale aLoc2 )
- {
- return aLoc1.Language.equals( aLoc2.Language ) &&
- aLoc1.Country .equals( aLoc2.Country ) &&
- aLoc1.Variant .equals( aLoc2.Variant );
- }
-
- private boolean GetValueToUse(
- String aPropName,
- boolean bDefaultVal,
- PropertyValue[] aProps )
- {
- boolean bRes = bDefaultVal;
-
- try
- {
- // use temporary value if supplied
- for (int i = 0; i < aProps.length; ++i)
- {
- if (aPropName.equals( aProps[i].Name ))
- {
- Object aObj = aProps[i].Value;
- if (AnyConverter.isBoolean( aObj ))
- {
- bRes = AnyConverter.toBoolean( aObj );
- return bRes;
- }
- }
- }
-
- // otherwise use value from property set (if available)
- XPropertySet xPropSet = aPropChgHelper.GetPropSet();
- if (xPropSet != null) // should always be the case
- {
- Object aObj = xPropSet.getPropertyValue( aPropName );
- if (AnyConverter.isBoolean( aObj ))
- bRes = AnyConverter.toBoolean( aObj );
- }
- }
- catch (Exception e) {
- bRes = bDefaultVal;
- }
-
- return bRes;
- }
-
- private boolean IsUpper( String aWord, Locale aLocale )
- {
- java.util.Locale aLang = new java.util.Locale(
- aLocale.Language, aLocale.Country, aLocale.Variant );
- return aWord.equals( aWord.toUpperCase( aLang ) );
- }
-
- private boolean HasDigits( String aWord )
- {
- int nLen = aWord.length();
- for (int i = 0; i < nLen; ++i)
- {
- if (Character.isDigit( aWord.charAt(i) ))
- return true;
- }
- return false;
- }
-
- private short GetSpellFailure(
- String aWord,
- Locale aLocale,
- PropertyValue[] aProperties )
- {
- short nRes = -1;
-
- //!! This code needs to be replaced by code calling the actual
- //!! implementation of your spellchecker
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
- if (IsEqual( aLocale, new Locale( "de", "DE", "" ) ))
- {
- if (bIsGermanPreReform && aWord.equals( "Schifffahrt" ))
- nRes = SpellFailure.SPELLING_ERROR;
- else if (!bIsGermanPreReform && aWord.equals( "Schiffahrt" ))
- nRes = SpellFailure.SPELLING_ERROR;
- }
- else if (IsEqual( aLocale, new Locale( "en", "US", "" ) ))
- {
- // words with 'u', 'U' and 'arizona' are defined to be incorrect
- boolean bIsValid = !(aWord.indexOf( "u" ) != -1 || aWord.indexOf( "U" ) != -1)
- && !aWord.equals( "arizona" );
-
- if (!bIsValid)
- {
- // default value (no other SpellFailure type is applicable)
- nRes = SpellFailure.SPELLING_ERROR;
-
- if (aWord.equals( "arizona" ))
- nRes = SpellFailure.CAPTION_ERROR;
- else if (aWord.equals( "house" ))
- nRes = SpellFailure.SPELLING_ERROR;
- else if (aWord.equals( "course" ))
- nRes = SpellFailure.IS_NEGATIVE_WORD;
- }
- }
-
- return nRes;
- }
-
- private XSpellAlternatives GetProposals(
- String aWord,
- Locale aLocale,
- PropertyValue[] aProperties )
- {
- short nType = SpellFailure.SPELLING_ERROR;
- String[] aProposals = null;
-
- // get values of relevant properties that may be used.
- //! The values for 'IsIgnoreControlCharacters' and 'IsUseDictionaryList'
- //! are handled by the dispatcher! Thus there is no need to access
- //! them here.
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
- boolean bIsSpellWithDigits = GetValueToUse( "IsSpellWithDigits", false, aProperties );
- boolean bIsSpellUpperCase = GetValueToUse( "IsSpellUpperCase", false, aProperties );
- boolean bIsSpellCapitalization = GetValueToUse( "IsSpellCapitalization", true, aProperties );
-
- //!! This code needs to be replaced by code calling the actual
- //!! implementation of your spellchecker
- if (IsEqual( aLocale, new Locale( "de", "DE", "" ) ))
- {
- if (bIsGermanPreReform && aWord.equals( "Schifffahrt" ))
- {
- nType = SpellFailure.SPELLING_ERROR;
- aProposals = new String[]{ "Schiffahrt" };
- }
- else if (!bIsGermanPreReform && aWord.equals( "Schiffahrt" ))
- {
- nType = SpellFailure.SPELLING_ERROR;
- aProposals = new String[]{ "Schifffahrt" };
- }
- }
- else if (IsEqual( aLocale, new Locale( "en", "US", "" ) ))
- {
- if (aWord.equals( "arizona" ))
- {
- nType = SpellFailure.CAPTION_ERROR;
- aProposals = new String[]{ "Arizona" };
- }
- else if (aWord.equals( "house" ))
- {
- nType = SpellFailure.SPELLING_ERROR;
- aProposals = new String[]{ "horse", "home" };
- }
- else if (aWord.equals( "course" ))
- {
- nType = SpellFailure.IS_NEGATIVE_WORD;
- aProposals = new String[]{ "line", "plan", "approach" };
- }
- }
-
- // always return a result if word is incorrect,
- // proposals may be empty though.
- return new XSpellAlternatives_impl( aWord, aLocale,
- nType, aProposals );
- }
-
- // __________ interface methods __________
-
-
- //*****************
- //XSupportedLocales
- //*****************
- public Locale[] getLocales()
- throws com.sun.star.uno.RuntimeException
- {
- Locale aLocales[] =
- {
- new Locale( "de", "DE", "" ),
- new Locale( "en", "US", "" )
- };
-
- return aLocales;
- }
-
- public boolean hasLocale( Locale aLocale )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if ( IsEqual( aLocale, new Locale( "de", "DE", "" ) ) ||
- IsEqual( aLocale, new Locale( "en", "US", "" ) ))
- bRes = true;
- return bRes;
- }
-
-
- //*************
- //XSpellChecker
- //*************
- public boolean isValid(
- String aWord, Locale aLocale,
- PropertyValue[] aProperties )
- throws com.sun.star.uno.RuntimeException,
- IllegalArgumentException
- {
- if (IsEqual( aLocale, new Locale() ) || aWord.length() == 0)
- return true;
-
- // linguistic is currently not allowed to throw exceptions
- // thus we return null which means 'word cannot be spelled'
- if (!hasLocale( aLocale ))
- return true;
-
- // get values of relevant properties that may be used.
- //! The values for 'IsIgnoreControlCharacters' and 'IsUseDictionaryList'
- //! are handled by the dispatcher! Thus there is no need to access
- //! them here.
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
- boolean bIsSpellWithDigits = GetValueToUse( "IsSpellWithDigits", false, aProperties );
- boolean bIsSpellUpperCase = GetValueToUse( "IsSpellUpperCase", false, aProperties );
- boolean bIsSpellCapitalization = GetValueToUse( "IsSpellCapitalization", true, aProperties );
-
- short nFailure = GetSpellFailure( aWord, aLocale, aProperties );
- if (nFailure != -1)
- {
- // postprocess result for errors that should be ignored
- if ( (!bIsSpellUpperCase && IsUpper( aWord, aLocale ))
- || (!bIsSpellWithDigits && HasDigits( aWord ))
- || (!bIsSpellCapitalization
- && nFailure == SpellFailure.CAPTION_ERROR)
- )
- nFailure = -1;
- }
-
- return nFailure == -1;
- }
-
-
- public XSpellAlternatives spell(
- String aWord, Locale aLocale,
- PropertyValue[] aProperties )
- throws com.sun.star.uno.RuntimeException,
- IllegalArgumentException
- {
- if (IsEqual( aLocale, new Locale() ) || aWord.length() == 0)
- return null;
-
- // linguistic is currently not allowed to throw exceptions
- // thus we return null fwhich means 'word cannot be spelled'
- if (!hasLocale( aLocale ))
- return null;
-
- XSpellAlternatives xRes = null;
- if (!isValid( aWord, aLocale, aProperties ))
- {
- xRes = GetProposals( aWord, aLocale, aProperties );
- }
- return xRes;
- }
-
-
- //*****************************
- //XLinguServiceEventBroadcaster
- //*****************************
- public boolean addLinguServiceEventListener (
- XLinguServiceEventListener xLstnr )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (!bDisposing && xLstnr != null)
- bRes = aPropChgHelper.addLinguServiceEventListener( xLstnr );
- return bRes;
- }
-
- public boolean removeLinguServiceEventListener(
- XLinguServiceEventListener xLstnr )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (!bDisposing && xLstnr != null)
- bRes = aPropChgHelper.removeLinguServiceEventListener( xLstnr );
- return bRes;
- }
-
- //********************
- // XServiceDisplayName
- //********************
- public String getServiceDisplayName( Locale aLocale )
- throws com.sun.star.uno.RuntimeException
- {
- return "Java Samples";
- }
-
- //****************
- // XInitialization
- //****************
- public void initialize( Object[] aArguments )
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- int nLen = aArguments.length;
- if (2 == nLen)
- {
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, aArguments[0]);
- // start listening to property changes
- aPropChgHelper.AddAsListenerTo( xPropSet );
- }
- }
-
- //*************
- // XServiceInfo
- //*************
- public boolean supportsService( String aServiceName )
- throws com.sun.star.uno.RuntimeException
- {
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- boolean bResult = false;
-
- for( i = 0; !bResult && i < nLength; ++i )
- bResult = aServiceName.equals( aServices[ i ] );
-
- return bResult;
- }
-
- public String getImplementationName()
- throws com.sun.star.uno.RuntimeException
- {
- return _aSvcImplName;
- }
-
- public String[] getSupportedServiceNames()
- throws com.sun.star.uno.RuntimeException
- {
- return getSupportedServiceNames_Static();
- }
-
- // __________ static things __________
-
- public static String _aSvcImplName = SampleSpellChecker.class.getName();
-
- public static String[] getSupportedServiceNames_Static()
- {
- String[] aResult = { "com.sun.star.linguistic2.SpellChecker" };
- return aResult;
- }
-
-
- /**
- * Returns a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleServiceFactory</code> for creating the component
- * @param implName the name of the implementation for which a service is desired
- * @param multiFactory the service manager to be used if needed
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(
- String aImplName,
- XMultiServiceFactory xMultiFactory,
- com.sun.star.registry.XRegistryKey xRegKey )
- {
- XSingleServiceFactory xSingleServiceFactory = null;
- if( aImplName.equals( _aSvcImplName ) )
- {
- xSingleServiceFactory = new OneInstanceFactory(
- SampleSpellChecker.class, _aSvcImplName,
- getSupportedServiceNames_Static(),
- xMultiFactory );
- }
- return xSingleServiceFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param xRegKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey xRegKey )
-// {
-// boolean bResult = true;
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _aSvcImplName, aServices[i], xRegKey );
-// }
-// return bResult;
-// }
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components
deleted file mode 100644
index 025f4245..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="SampleThesaurus.uno.jar">
- <implementation name="SampleThesaurus">
- <service name="com.sun.star.linguistic2.Thesaurus"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
deleted file mode 100644
index e7ae3b23..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// uno
-import com.sun.star.lib.uno.helper.ComponentBase;
-import com.sun.star.uno.UnoRuntime;
-
-// factories
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-// supported Interfaces
-import com.sun.star.linguistic2.XThesaurus;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XServiceDisplayName;
-
-// Exceptions
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.lang.IllegalArgumentException;
-
-//used Interfaces
-import com.sun.star.linguistic2.XMeaning;
-import com.sun.star.lang.Locale;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.EventObject;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.Type;
-
-import java.util.ArrayList;
-
-public class SampleThesaurus extends ComponentBase implements
- XThesaurus,
- XInitialization,
- XServiceDisplayName,
- XServiceInfo
-{
- PropChgHelper aPropChgHelper;
- ArrayList aEvtListeners;
- boolean bDisposing;
-
- public SampleThesaurus()
- {
- // names of relevant properties to be used
- String[] aProps = new String[]
- {
- "IsIgnoreControlCharacters",
- "IsUseDictionaryList",
- "IsGermanPreReform",
- };
-
- // this service has no listeners thus we may use the base class,
- // which is here basically used only to keep track of the
- // property set (and it's lifetime) since it gets used in the
- // 'GetValueToUse' function
- aPropChgHelper = new PropChgHelper( (XThesaurus) this, aProps );
-
- aEvtListeners = new ArrayList();
- bDisposing = false;
- }
-
- private boolean IsEqual( Locale aLoc1, Locale aLoc2 )
- {
- return aLoc1.Language.equals( aLoc2.Language ) &&
- aLoc1.Country .equals( aLoc2.Country ) &&
- aLoc1.Variant .equals( aLoc2.Variant );
- }
-
- private boolean GetValueToUse(
- String aPropName,
- boolean bDefaultVal,
- PropertyValue[] aProps )
- {
- boolean bRes = bDefaultVal;
-
- try
- {
- // use temporary value if supplied
- for (int i = 0; i < aProps.length; ++i)
- {
- if (aPropName.equals( aProps[i].Name ))
- {
- Object aObj = aProps[i].Value;
- if (AnyConverter.isBoolean( aObj ))
- {
- bRes = AnyConverter.toBoolean( aObj );
- return bRes;
- }
- }
- }
-
- // otherwise use value from property set (if available)
- XPropertySet xPropSet = aPropChgHelper.GetPropSet();
- if (xPropSet != null) // should always be the case
- {
- Object aObj = xPropSet.getPropertyValue( aPropName );
- if (AnyConverter.isBoolean( aObj ))
- bRes = AnyConverter.toBoolean( aObj );
- }
- }
- catch (Exception e) {
- bRes = bDefaultVal;
- }
-
- return bRes;
- }
-
- // __________ interface methods __________
-
-
- //*****************
- //XSupportedLocales
- //*****************
- public Locale[] getLocales()
- throws com.sun.star.uno.RuntimeException
- {
- Locale aLocales[] =
- {
- new Locale( "en", "US", "" )
- };
-
- return aLocales;
- }
-
- public boolean hasLocale( Locale aLocale )
- throws com.sun.star.uno.RuntimeException
- {
- boolean bRes = false;
- if (IsEqual( aLocale, new Locale( "en", "US", "" ) ))
- bRes = true;
- return bRes;
- }
-
- //**********
- //XThesaurus
- //**********
- public XMeaning[] queryMeanings(
- String aTerm, Locale aLocale,
- PropertyValue[] aProperties )
- throws com.sun.star.lang.IllegalArgumentException,
- com.sun.star.uno.RuntimeException
- {
- if (IsEqual( aLocale, new Locale() ) || aTerm.length() == 0)
- return null;
-
- // linguistic is currently not allowed to throw exceptions
- // thus we return null fwhich means 'word cannot be looked up'
- if (!hasLocale( aLocale ))
- return null;
-
- // get values of relevant properties that may be used.
- //! The values for 'IsIgnoreControlCharacters' and 'IsUseDictionaryList'
- //! are handled by the dispatcher! Thus there is no need to access
- //! them here.
- boolean bIsGermanPreReform = GetValueToUse( "IsGermanPreReform", false, aProperties );
-
- XMeaning[] aRes = null;
-
- //!! This code needs to be replaced by code calling the actual
- //!! implementation of your thesaurus
- if (aTerm.equals( "house" ) &&
- IsEqual( aLocale, new Locale( "en", "US", "" ) ) )
- {
- aRes = new XMeaning[]
- {
- new XMeaning_impl( "a building where one lives",
- new String[]{ "home", "place", "dwelling" } ),
- new XMeaning_impl( "a group of people sharing common ancestry",
- new String[]{ "family", "clan", "kindred" } ),
- new XMeaning_impl( "to provide with lodging",
- new String[]{ "room", "board", "put up" } )
- };
- }
-
- return aRes;
- }
-
-
- //********************
- // XServiceDisplayName
- //********************
- public String getServiceDisplayName( Locale aLocale )
- throws com.sun.star.uno.RuntimeException
- {
- return "Java Samples";
- }
-
- //****************
- // XInitialization
- //****************
- public void initialize( Object[] aArguments )
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException
- {
- int nLen = aArguments.length;
- if (2 == nLen)
- {
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, aArguments[0]);
- // start listening to property changes
- aPropChgHelper.AddAsListenerTo( xPropSet );
- }
- }
-
- //*************
- // XServiceInfo
- //*************
- public boolean supportsService( String aServiceName )
- throws com.sun.star.uno.RuntimeException
- {
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- boolean bResult = false;
-
- for( i = 0; !bResult && i < nLength; ++i )
- bResult = aServiceName.equals( aServices[ i ] );
-
- return bResult;
- }
-
- public String getImplementationName()
- throws com.sun.star.uno.RuntimeException
- {
- return _aSvcImplName;
- }
-
- public String[] getSupportedServiceNames()
- throws com.sun.star.uno.RuntimeException
- {
- return getSupportedServiceNames_Static();
- }
-
- // __________ static things __________
-
- public static String _aSvcImplName = SampleThesaurus.class.getName();
-
- public static String[] getSupportedServiceNames_Static()
- {
- String[] aResult = { "com.sun.star.linguistic2.Thesaurus" };
- return aResult;
- }
-
-
- /**
- * Returns a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleServiceFactory</code> for creating the component
- * @param implName the name of the implementation for which a service is desired
- * @param multiFactory the service manager to be used if needed
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(
- String aImplName,
- XMultiServiceFactory xMultiFactory,
- com.sun.star.registry.XRegistryKey xRegKey )
- {
- XSingleServiceFactory xSingleServiceFactory = null;
- if( aImplName.equals( _aSvcImplName ) )
- {
- xSingleServiceFactory = new OneInstanceFactory(
- SampleThesaurus.class, _aSvcImplName,
- getSupportedServiceNames_Static(),
- xMultiFactory );
- }
- return xSingleServiceFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param xRegKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey xRegKey )
-// {
-// boolean bResult = true;
-// String[] aServices = getSupportedServiceNames_Static();
-// int i, nLength = aServices.length;
-// for( i = 0; i < nLength; ++i )
-// {
-// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _aSvcImplName, aServices[i], xRegKey );
-// }
-// return bResult;
-// }
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java
deleted file mode 100644
index 08fd7ab6..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.Locale;
-
-public class XHyphenatedWord_impl implements
- com.sun.star.linguistic2.XHyphenatedWord
-{
- String aWord;
- String aHyphenatedWord;
- short nHyphenPos;
- short nHyphenationPos;
- Locale aLang;
- boolean bIsAltSpelling;
-
- public XHyphenatedWord_impl(
- String aWord,
- Locale aLang,
- short nHyphenationPos,
- String aHyphenatedWord,
- short nHyphenPos )
- {
- this.aWord = aWord;
- this.aLang = aLang;
- this.nHyphenationPos = nHyphenationPos;
- this.aHyphenatedWord = aHyphenatedWord;
- this.nHyphenPos = nHyphenPos;
- this.bIsAltSpelling = (aWord != aHyphenatedWord);
-
- //!! none of these cases should ever occur!
- //!! values provided only for safety
- if (this.aWord == null)
- this.aWord = new String();
- if (this.aLang == null)
- this.aLang = new Locale();
- if (this.aHyphenatedWord == null)
- this.aHyphenatedWord = new String();
- }
-
-
- // XHyphenatedWord
- public String getWord() throws com.sun.star.uno.RuntimeException
- {
- return aWord;
- }
- public Locale getLocale() throws com.sun.star.uno.RuntimeException
- {
- return aLang;
- }
- public short getHyphenationPos() throws com.sun.star.uno.RuntimeException
- {
- return nHyphenationPos;
- }
- public String getHyphenatedWord() throws com.sun.star.uno.RuntimeException
- {
- return aHyphenatedWord;
- }
- public short getHyphenPos() throws com.sun.star.uno.RuntimeException
- {
- return nHyphenPos;
- }
- public boolean isAlternativeSpelling() throws com.sun.star.uno.RuntimeException
- {
- return bIsAltSpelling;
- }
-};
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java
deleted file mode 100644
index 29adf8f9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XMeaning_impl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.Locale;
-
-public class XMeaning_impl implements
- com.sun.star.linguistic2.XMeaning
-{
- String aMeaning;
- String[] aSynonyms;
-
- public XMeaning_impl ( String aMeaning, String[] aSynonyms )
- {
- this.aMeaning = aMeaning;
- this.aSynonyms = aSynonyms;
-
- //!! none of these cases should ever occur!
- //!! values provided only for safety
- if (this.aMeaning == null)
- this.aMeaning = new String();
-
- // a meaning without synonyms may be OK though.
- // still for safety an empty existing array has to be provided.
- if (this.aSynonyms == null)
- this.aSynonyms = new String[]{};
- }
-
- // XMeaning
- public String getMeaning() throws com.sun.star.uno.RuntimeException
- {
- return aMeaning;
- }
- public String[] querySynonyms() throws com.sun.star.uno.RuntimeException
- {
- return aSynonyms;
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XPossibleHyphens_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XPossibleHyphens_impl.java
deleted file mode 100644
index 3756dddd..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XPossibleHyphens_impl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.Locale;
-
-public class XPossibleHyphens_impl implements
- com.sun.star.linguistic2.XPossibleHyphens
-{
- String aWord;
- String aHyphWord;
- short[] aOrigHyphenPos;
- Locale aLang;
-
- public XPossibleHyphens_impl(
- String aWord,
- Locale aLang,
- String aHyphWord,
- short[] aOrigHyphenPos)
- {
- this.aWord = aWord;
- this.aLang = aLang;
- this.aHyphWord = aHyphWord;
- this.aOrigHyphenPos = aOrigHyphenPos;
-
- //!! none of these cases should ever occur!
- //!! values provided only for safety
- if (this.aWord == null)
- this.aWord = new String();
- if (this.aLang == null)
- this.aLang = new Locale();
- if (this.aHyphWord == null)
- this.aHyphWord = new String();
-
- // having no hyphenation positions is OK though.
- // still for safety an empty existing array has to be provided.
- if (this.aOrigHyphenPos == null)
- this.aOrigHyphenPos = new short[]{};
- }
-
- // XPossibleHyphens
- public String getWord() throws com.sun.star.uno.RuntimeException
- {
- return aWord;
- }
-
- public Locale getLocale() throws com.sun.star.uno.RuntimeException
- {
- return aLang;
- }
- public String getPossibleHyphens() throws com.sun.star.uno.RuntimeException
- {
- return aHyphWord;
- }
- public short[] getHyphenationPositions() throws com.sun.star.uno.RuntimeException
- {
- return aOrigHyphenPos;
- }
-};
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java
deleted file mode 100644
index 15e6c17c..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.Locale;
-
-
-public class XSpellAlternatives_impl implements
- com.sun.star.linguistic2.XSpellAlternatives
-{
- String aWord;
- Locale aLanguage;
- String[] aAlt; // list of alternatives, may be empty.
- short nType; // type of failure
-
- public XSpellAlternatives_impl(
- String aWord,
- Locale aLanguage,
- short nFailureType,
- String[] aAlt )
- {
- this.aWord = aWord;
- this.aLanguage = aLanguage;
- this.aAlt = aAlt;
- this.nType = nFailureType;
-
- //!! none of these cases should ever occur!
- //!! values provided only for safety
- if (this.aWord == null)
- this.aWord = new String();
- if (this.aLanguage == null)
- this.aLanguage = new Locale();
-
- // having no alternatives is OK though.
- // still for safety an empty existing array has to be provided.
- if (this.aAlt == null)
- this.aAlt = new String[]{};
- }
-
- // XSpellAlternatives
- public String getWord() throws com.sun.star.uno.RuntimeException
- {
- return aWord;
- }
- public Locale getLocale() throws com.sun.star.uno.RuntimeException
- {
- return aLanguage;
- }
- public short getFailureType() throws com.sun.star.uno.RuntimeException
- {
- return nType;
- }
- public short getAlternativesCount() throws com.sun.star.uno.RuntimeException
- {
- return (short) aAlt.length;
- }
- public String[] getAlternatives() throws com.sun.star.uno.RuntimeException
- {
- return aAlt;
- }
-};
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Makefile b/odk/examples/DevelopersGuide/OfficeDev/Makefile
deleted file mode 100644
index 17b4eafc..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Makefile
+++ /dev/null
@@ -1,106 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDev examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevExamples
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=ContextMenuInterceptor
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-APP2_NAME=Number_Formats
-APP2_JAR=$(OUT_APP_CLASS)/$(APP2_NAME).jar
-
-APP1_JAVAFILES = \
- MenuElement.java \
- OfficeConnect.java \
- ContextMenuInterceptor.java \
-
-APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP1_JAVAFILES))
-APP1_CLASSNAMES = $(patsubst %.java,%.class,$(APP1_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(APP1_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP1_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(basename $(@F)).class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-
-$(EXAMPLE_NAME) : $(APP1_JAR) $(APP2_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java b/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
deleted file mode 100644
index bf6c6ce4..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/MenuElement.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.UnoRuntime;
-
-// A helper class to determine the menu element type
-public class MenuElement
-{
- static public boolean IsMenuEntry( com.sun.star.beans.XPropertySet xMenuElement ) {
- com.sun.star.lang.XServiceInfo xServiceInfo =
- (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
- com.sun.star.lang.XServiceInfo.class, xMenuElement );
-
- return xServiceInfo.supportsService( "com.sun.star.ui.ActionTrigger" );
- }
-
- static public boolean IsMenuSeparator( com.sun.star.beans.XPropertySet xMenuElement ) {
- com.sun.star.lang.XServiceInfo xServiceInfo =
- (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
- com.sun.star.lang.XServiceInfo.class, xMenuElement );
-
- return xServiceInfo.supportsService( "com.sun.star.ui.ActionTriggerSeparator" );
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java
deleted file mode 100644
index 9ea9174e..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.table.XCell;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-// __________ Implementation __________
-
-/** Create a spreadsheet document and provide access to a sheet framework that
- is then used to modify some number formats.
- @author Eike Rathke
- */
-public class Number_Formats
-{
- // __________ public members and methods __________
-
-
- // ____________________
-
- public static void main( String args[] )
- {
- try
- {
- Number_Formats aSample = new Number_Formats( args );
- aSample.doFunction();
- }
- catch( Exception ex )
- {
- System.err.println( "Sample caught exception! " + ex );
- ex.printStackTrace();
- System.exit(1);
- }
-
- System.out.println( "Sample done." );
- System.exit(0);
- }
-
- // ____________________
-
- public void doFunction() throws RuntimeException, Exception
- {
- // Assume:
- // com.sun.star.sheet.XSpreadsheetDocument maSpreadsheetDoc;
- // com.sun.star.sheet.XSpreadsheet maSheet;
-
- // Query the number formats supplier of the spreadsheet document
- com.sun.star.util.XNumberFormatsSupplier xNumberFormatsSupplier =
- (com.sun.star.util.XNumberFormatsSupplier)
- UnoRuntime.queryInterface(
- com.sun.star.util.XNumberFormatsSupplier.class, maSpreadsheetDoc );
-
- // Get the number formats from the supplier
- com.sun.star.util.XNumberFormats xNumberFormats =
- xNumberFormatsSupplier.getNumberFormats();
-
- // Query the XNumberFormatTypes interface
- com.sun.star.util.XNumberFormatTypes xNumberFormatTypes =
- (com.sun.star.util.XNumberFormatTypes)
- UnoRuntime.queryInterface(
- com.sun.star.util.XNumberFormatTypes.class, xNumberFormats );
-
- // Get the number format index key of the default currency format,
- // note the empty locale for default locale
- com.sun.star.lang.Locale aLocale = new com.sun.star.lang.Locale();
- int nCurrencyKey = xNumberFormatTypes.getStandardFormat(
- com.sun.star.util.NumberFormat.CURRENCY, aLocale );
-
- // Get cell range B3:B11
- com.sun.star.table.XCellRange xCellRange =
- maSheet.getCellRangeByPosition( 1, 2, 1, 10 );
-
- // Query the property set of the cell range
- com.sun.star.beans.XPropertySet xCellProp =
- (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xCellRange );
-
- // Set number format to default currency
- xCellProp.setPropertyValue( "NumberFormat", new Integer(nCurrencyKey) );
-
- // Get cell B3
- com.sun.star.table.XCell xCell = maSheet.getCellByPosition( 1, 2 );
-
- // Query the property set of the cell
- xCellProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xCell );
-
- // Get the number format index key of the cell's properties
- int nIndexKey = ((Integer) xCellProp.getPropertyValue( "NumberFormat" )).intValue();
- if ( nIndexKey != nCurrencyKey )
- System.out.println( "Number format doesn't match!" );
-
- // Get the properties of the number format
- com.sun.star.beans.XPropertySet xProp = xNumberFormats.getByKey( nIndexKey );
-
- // Get the format code string of the number format's properties
- String aFormatCode = (String) xProp.getPropertyValue( "FormatString" );
- System.out.println( "FormatString: `" + aFormatCode + "'" );
-
- // Create an arbitrary format code
- aFormatCode = "\"wonderful \"" + aFormatCode;
-
- // Test if it's already present
- nIndexKey = xNumberFormats.queryKey( aFormatCode, aLocale, false );
-
- // If not, add to number formats collection
- if ( nIndexKey == -1 )
- {
- try
- {
- nIndexKey = xNumberFormats.addNew( aFormatCode, aLocale );
- }
- catch( com.sun.star.util.MalformedNumberFormatException ex )
- {
- System.err.println( "Bad number format code: " + ex );
- ex.printStackTrace();
- nIndexKey = -1;
- }
- }
-
- // Set the new format at the cell
- if ( nIndexKey != -1 )
- xCellProp.setPropertyValue( "NumberFormat", new Integer(nIndexKey) );
-
-
- // Set column containing the example values to optimal width to show
- // the new format of cell B3
- com.sun.star.table.XColumnRowRange xColRowRange =
- (com.sun.star.table.XColumnRowRange)
- UnoRuntime.queryInterface(com.sun.star.table.XColumnRowRange.class,
- maSheet);
-
- com.sun.star.container.XIndexAccess xIndexAccess =
- (com.sun.star.container.XIndexAccess)
- UnoRuntime.queryInterface(com.sun.star.container.XIndexAccess.class,
- xColRowRange.getColumns());
-
- com.sun.star.beans.XPropertySet xColPropSet =
- (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
- xIndexAccess.getByIndex(1));
-
- xColPropSet.setPropertyValue( "OptimalWidth", new Boolean(true) );
- }
-
- // ____________________
-
- public Number_Formats( String[] args ) throws java.lang.Exception
- {
- // get the remote office context. If necessary a new office
- // process is started
- maOfficeContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- maServiceManager = maOfficeContext.getServiceManager();
-
- // create a new spreadsheet document
- XComponentLoader aLoader = (XComponentLoader) UnoRuntime.queryInterface(
- XComponentLoader.class, maServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", maOfficeContext) );
-
- maSpreadsheetDoc = (XSpreadsheetDocument) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class,
- aLoader.loadComponentFromURL( "private:factory/scalc",
- "_blank",
- 0,
- new PropertyValue[ 0 ] ) );
-
- if ( !initSpreadsheet() )
- System.exit( 0 );
- }
-
-
- // __________ private members and methods __________
- private final String msDataSheetName = "Data";
-
- private XComponentContext maOfficeContext;
- private XMultiComponentFactory maServiceManager;
- private XSpreadsheetDocument maSpreadsheetDoc;
- private XSpreadsheet maSheet; // the first sheet
-
-
- // ____________________
-
- /** init the first sheet
- */
- private boolean initSpreadsheet()
- {
- boolean bOk = true;
- XSpreadsheets aSheets = maSpreadsheetDoc.getSheets();
- try
- {
- XIndexAccess aSheetsIA = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, aSheets );
- maSheet = (XSpreadsheet) UnoRuntime.queryInterface(XSpreadsheet.class, aSheetsIA.getByIndex( 0 ));
-
- // enter some values in B3:B11
- for( int iCounter=1; iCounter < 10; iCounter++ )
- {
- XCell aCell = maSheet.getCellByPosition( 1, 1 + iCounter );
- aCell.setValue( (double) iCounter );
- }
- }
- catch( Exception ex )
- {
- System.err.println( "Couldn't initialize Spreadsheet Document: " + ex );
- ex.printStackTrace();
- bOk = false;
- }
- return bOk;
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
deleted file mode 100644
index 6d4745b9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// __________ Imports __________
-
-// structs, const, ...
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.bridge.XUnoUrlResolver;
-
-// exceptions
-import com.sun.star.container.NoSuchElementException;
-
-// interfaces
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.Exception;
-
-import com.sun.star.uno.UnoRuntime;
-
-// others
-import java.lang.String;
-
-// __________ Implementation __________
-
-/**
- * support ONE singleton uno connection to an running office installation!
- * Can be used to open/use/close connection to uno environment of an already running office.
- * ctor isn't available from outside. You should call static function "getConnection()"
- * to open or use internal set connection which is created one times only.
- *
- * @author Andreas Schl&uuml;ns
- * @created 7. Februar 2002
- * @modified 05.02.2002 12:10
- */
-public class OfficeConnect
-{
- // ____________________
-
- /**
- * At first call we create static connection object and get the remote office
- * context and the remote office service manager. A new office process is
- * started if necessary.
- * Then - and for all further requests we return these static connection member.
- */
- public static synchronized OfficeConnect createConnection()
- throws java.lang.Exception
- {
- if (maConnection == null)
- {
- maConnection = new OfficeConnect();
- }
- return maConnection;
- }
-
- // ____________________
-
- public static synchronized OfficeConnect getConnection()
- {
- return maConnection;
- }
-
- // ____________________
-
- /**
- * ctor
- * We try to open the connection in our ctor ... transparently for the user.
- * We made it private to support singleton pattern of these implementation.
- * see getConnection() for further informations
- */
- private OfficeConnect() throws java.lang.Exception
- {
- // get the remote office context. If necessary a new office
- // process is started
- mxOfficeContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- mxServiceManager = mxOfficeContext.getServiceManager();
- }
-
- // ____________________
-
- /**
- * create uno components inside remote office process
- * After connection of these proccess to a running office we have access to remote service manager of it.
- * So we can use it to create all existing services. Use this method to create components by name and
- * get her interface. Casting of it to right target interface is part of your implementation.
- *
- * @param aType describe class type of created service
- * Returned object can be casted directly to this one.
- * Uno query was done by this method automaticly.
- * @param sServiceSpecifier name of service which should be created
- * @return Description of the Returned Value
- */
- public Object createRemoteInstance(Class aType, String sServiceSpecifier)
- {
- Object aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(
- aType, mxServiceManager.createInstanceWithContext(
- sServiceSpecifier, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type " + sServiceSpecifier + ": " + ex);
- ex.printStackTrace();
- System.exit(0);
- }
- return aResult;
- }
-
- // ____________________
-
- /**
- * same as "createRemoteInstance()" but supports additional parameter for initializing created object
- *
- * @param lArguments optional arguments
- * They are used to initialize new created service.
- * @param aType Description of Parameter
- * @param sServiceSpecifier Description of Parameter
- * @return Description of the Returned Value
- */
- public Object createRemoteInstanceWithArguments(Class aType, String sServiceSpecifier, Any[] lArguments)
- {
- Object aResult = null;
- try
- {
- aResult = UnoRuntime.queryInterface(
- aType, mxServiceManager.createInstanceWithArgumentsAndContext(
- sServiceSpecifier, lArguments, mxOfficeContext));
- }
- catch (com.sun.star.uno.Exception ex)
- {
- System.err.println("Couldn't create Service of type " + sServiceSpecifier + ": " + ex);
- ex.printStackTrace();
- System.exit(0);
- }
- return aResult;
- }
-
- // ____________________
-
- /**
- * member
- */
- // singleton connection instance
- private static OfficeConnect maConnection;
-
- // reference to remote office context
- private com.sun.star.uno.XComponentContext mxOfficeContext;
- // reference to remote service manager
- private com.sun.star.lang.XMultiComponentFactory mxServiceManager;
-}
-
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/Makefile b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/Makefile
deleted file mode 100644
index 663468b7..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevPathSettingsTest example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevPathSettingsTest
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=PathSettingsTest
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-SDK_CLASSPATH=$(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
deleted file mode 100644
index 44d0a2c9..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.UnknownPropertyException;
-
-/*
- *
- * @author Carsten Driesner
- * Provides example code how to access and use the
- * path pathsettings servce.
- */
-public class PathSettingsTest extends java.lang.Object {
-
- /*
- * List of pre-defined path variables supported by
- * the path settings service.
- */
- private static String[] predefinedPathProperties = {
- "Addin",
- "AutoCorrect",
- "AutoText",
- "Backup",
- "Basic",
- "Bitmap",
- "Config",
- "Dictionary",
- "Favorite",
- "Filter",
- "Gallery",
- "Graphic",
- "Help",
- "Linguistic",
- "Module",
- "Palette",
- "Plugin",
- "Storage",
- "Temp",
- "Template",
- "UIConfig",
- "UserConfig",
- "UserDictionary",
- "Work"
- };
-
- /*
- * @param args the command line arguments
- */
- public static void main(String[] args) {
-
- XComponentContext xRemoteContext = null;
- XMultiComponentFactory xRemoteServiceManager = null;
- XPropertySet xPathSettingsService = null;
-
- try {
- // get the remote office context. If necessary a new office
- // process is started
- xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xRemoteServiceManager = xRemoteContext.getServiceManager();
-
- Object pathSubst = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.comp.framework.PathSettings", xRemoteContext );
- xPathSettingsService = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, pathSubst);
-
- /* Work with path settings */
- workWithPathSettings( xPathSettingsService );
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-
- /*
- * Retrieve and set path properties from path settings service
- * @param xPathSettingsService the path settings service
- */
- public static void workWithPathSettings( XPropertySet xPathSettingsService )
- {
- if ( xPathSettingsService != null ) {
- for ( int i=0; i<predefinedPathProperties.length; i++ ) {
- try {
- /* Retrieve values for path properties from path settings
- * service*/
- Object aValue = xPathSettingsService.getPropertyValue(
- predefinedPathProperties[i] );
-
- // getPropertyValue returns an Object, you have to cast
- // it to type that you need
- String aPath = (String)aValue;
- System.out.println( "Property="+ predefinedPathProperties[i]
- + " Path=" + aPath );
- }
- catch ( com.sun.star.beans.UnknownPropertyException e) {
- System.err.println( "UnknownPropertyException has been thrown accessing "+predefinedPathProperties[i]);
- }
- catch ( com.sun.star.lang.WrappedTargetException e ) {
- System.err.println( "WrappedTargetException has been thrown accessing "+predefinedPathProperties[i]);
- }
- }
-
- // Try to modfiy the work path property. After running this example
- // you should see the new value of "My Documents" in the path options
- // tab page, accessible via "Tools - Options - [Star|Open]Office -
- // Paths".
- // If you want to revert the changes, you can also do it with the
- // path tab page.
- try {
- xPathSettingsService.setPropertyValue( "Work", "$(temp)" );
- String aValue = (String)xPathSettingsService.getPropertyValue( "Work" );
- System.out.println( "\nNote: The example changes your current "
- +"setting of the work path!\nThe work path "
- +"should be now=" + aValue );
- }
- catch ( com.sun.star.beans.UnknownPropertyException e) {
- System.err.println( "UnknownPropertyException has been thrown accessing PathSettings service");
- }
- catch ( com.sun.star.lang.WrappedTargetException e ) {
- System.err.println( "WrappedTargetException has been thrown accessing PathSettings service");
- }
- catch ( com.sun.star.beans.PropertyVetoException e ) {
- System.err.println( "PropertyVetoException has been thrown accessing PathSettings service");
- }
- catch ( com.sun.star.lang.IllegalArgumentException e ) {
- System.err.println( "IllegalArgumentException has been thrown accessing PathSettings service");
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/Makefile b/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/Makefile
deleted file mode 100644
index 19dabe19..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevPathSettingsTest example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevPathSubstitutionTest
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=PathSubstitutionTest
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-SDK_CLASSPATH=$(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
deleted file mode 100644
index 5aad6fa0..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.PropertyValue;
-
-import com.sun.star.util.XStringSubstitution;
-
-/*
- * @author Carsten Driesner
- */
-public class PathSubstitutionTest extends java.lang.Object {
-
- /*
- * List of pre-defined path variables supported by
- * the path substitution service.
- */
- private static String[] predefinedPathVariables = {
- "$(home)","$(inst)","$(prog)","$(temp)","$(user)",
- "$(work)","$(path)","$(lang)","$(langid)","$(vlang)"
- };
-
- /*
- * @param args the command line arguments
- */
- public static void main(String[] args) {
-
- XComponentContext xRemoteContext = null;
- XMultiComponentFactory xRemoteServiceManager = null;
- XStringSubstitution xPathSubstService = null;
-
- try {
- // get the remote office context. If necessary a new office
- // process is started
- xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xRemoteServiceManager = xRemoteContext.getServiceManager();
-
- Object pathSubst = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.comp.framework.PathSubstitution", xRemoteContext );
- xPathSubstService = (XStringSubstitution)UnoRuntime.queryInterface(
- XStringSubstitution.class, pathSubst);
-
- /* Work with path variables */
- workWithPathVariables( xPathSubstService );
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-
- public static void workWithPathVariables( XStringSubstitution xPathSubstService )
- {
- if ( xPathSubstService != null ) {
- for ( int i=0; i<predefinedPathVariables.length; i++ ) {
- try {
- /* Retrieve values for pre-defined path variables */
- String aValue = xPathSubstService.getSubstituteVariableValue(
- predefinedPathVariables[i] );
- System.out.println( "Variable: "+ predefinedPathVariables[i] +
- " value=" + aValue );
- }
- catch ( com.sun.star.container.NoSuchElementException e) {
- System.err.println( "NoSuchElementException has been thrown accessing "+predefinedPathVariables[i]);
- }
- }
-
- // Check the resubstitution function
- try {
- String aPath = xPathSubstService.getSubstituteVariableValue(
- predefinedPathVariables[0] ); // Use $(home) as starting point
- aPath += "/test"; // extend the path
- System.out.println( "Path="+aPath );
- String aResubstPath = xPathSubstService.reSubstituteVariables( aPath );
- System.out.println( "Resubstituted path="+aResubstPath );
- }
- catch ( com.sun.star.container.NoSuchElementException e ) {
- System.err.println( "NoSuchElementException has been thrown accessing "+predefinedPathVariables[0]);
- }
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/Makefile b/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/Makefile
deleted file mode 100644
index babc895e..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/Makefile
+++ /dev/null
@@ -1,97 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OfficeDevClipboard example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=OfficeDevTerminationTest
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=TerminationTest
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-APP1_JAVAFILES = \
- TerminateListener.java \
- TerminationTest.java
-
-APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP1_JAVAFILES))
-APP1_CLASSNAMES = $(patsubst %.java,%.class,$(APP1_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(APP1_CLASSFILES) : $(APP1_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $^
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(APP1_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(APP1_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminateListener.java b/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminateListener.java
deleted file mode 100644
index b04e95c5..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminateListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.frame.TerminationVetoException;
-import com.sun.star.frame.XTerminateListener;
-
-/**
- *
- * @author dschulten
- */
-public class TerminateListener implements XTerminateListener {
-
- public void notifyTermination(com.sun.star.lang.EventObject eventObject) {
- System.out.println("about to terminate...");
- }
-
- public void queryTermination(com.sun.star.lang.EventObject eventObject)
- throws TerminationVetoException {
-
- // test if we can terminate now
- if (TerminationTest.isAtWork() == true) {
- System.out.println("Terminate while we are at work? You can't mean it serious ;-)!");
- throw new TerminationVetoException();
- }
- }
-
- public void disposing(com.sun.star.lang.EventObject eventObject) {
- }
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java b/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java
deleted file mode 100644
index 0df7b6b2..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.frame.XDesktop;
-
-/**
- *
- * @author dschulten
- */
-public class TerminationTest extends java.lang.Object {
-
- private static boolean atWork = false;
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
-
- XComponentContext xRemoteContext = null;
- XMultiComponentFactory xRemoteServiceManager = null;
- XDesktop xDesktop = null;
-
- try {
- // get the remote office context. If necessary a new office
- // process is started
- xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- xRemoteServiceManager = xRemoteContext.getServiceManager();
-
- Object desktop = xRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xRemoteContext);
- xDesktop = (XDesktop)UnoRuntime.queryInterface(XDesktop.class, desktop);
-
- TerminateListener terminateListener = new TerminateListener();
- xDesktop.addTerminateListener(terminateListener);
-
- atWork = true;
- // try to terminate while we are at work
- boolean terminated = xDesktop.terminate();
- System.out.println("The Office " +
- (terminated == true ?
- "has been terminated" :
- "is still running, we are at work"));
-
- // no longer at work
- atWork = false;
- // once more: try to terminate
- terminated = xDesktop.terminate();
- System.out.println("The Office " +
- (terminated == true ?
- "has been terminated" :
- "is still running. Someone else prevents termination, " +
- "e.g. the quickstarter"));
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
-
-
- }
- public static boolean isAtWork() {
- return atWork;
- }
-
-}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/makefile.mk b/odk/examples/DevelopersGuide/OfficeDev/makefile.mk
deleted file mode 100644
index f2ffe0cd..00000000
--- a/odk/examples/DevelopersGuide/OfficeDev/makefile.mk
+++ /dev/null
@@ -1,180 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-
-OFFICEDEV_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/ContextMenuInterceptor.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/MenuElement.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/Number_Formats.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/OfficeConnect.java
-
-DESTCLIPBOARD=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/Clipboard
-CLIPBOARD_FILES=\
- $(DESTCLIPBOARD)$/Clipboard.java \
- $(DESTCLIPBOARD)$/ClipboardListener.java \
- $(DESTCLIPBOARD)$/ClipboardOwner.java \
- $(DESTCLIPBOARD)$/Makefile \
- $(DESTCLIPBOARD)$/TextTransferable.java
-
-DESTDESKTOPENV=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/DesktopEnvironment
-DESKTOPENV_FILES=\
- $(DESTDESKTOPENV)$/nativelib$/unix$/exports.dxp \
- $(DESTDESKTOPENV)$/nativelib$/unix$/Makefile \
- $(DESTDESKTOPENV)$/nativelib$/unix$/nativeview.c \
- $(DESTDESKTOPENV)$/nativelib$/unix$/nativeview.h \
- $(DESTDESKTOPENV)$/nativelib$/windows$/exports.dxp \
- $(DESTDESKTOPENV)$/nativelib$/windows$/Makefile \
- $(DESTDESKTOPENV)$/nativelib$/windows$/nativeview.c \
- $(DESTDESKTOPENV)$/nativelib$/windows$/nativeview.h \
- $(DESTDESKTOPENV)$/CustomizeView.java \
- $(DESTDESKTOPENV)$/Desk.java \
- $(DESTDESKTOPENV)$/DocumentView.java \
- $(DESTDESKTOPENV)$/FunctionHelper.java \
- $(DESTDESKTOPENV)$/Install.txt \
- $(DESTDESKTOPENV)$/Interceptor.java \
- $(DESTDESKTOPENV)$/IOnewayLink.java \
- $(DESTDESKTOPENV)$/IShutdownListener.java \
- $(DESTDESKTOPENV)$/JavaWindowPeerFake.java \
- $(DESTDESKTOPENV)$/Makefile \
- $(DESTDESKTOPENV)$/NativeView.java \
- $(DESTDESKTOPENV)$/OfficeConnect.java \
- $(DESTDESKTOPENV)$/OnewayExecutor.java \
- $(DESTDESKTOPENV)$/StatusListener.java \
- $(DESTDESKTOPENV)$/StatusView.java \
- $(DESTDESKTOPENV)$/ViewContainer.java
-
-DESTASCIIFILTER=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/FilterDevelopment$/AsciiFilter
-ASCIIFILTER_FILES=\
- $(DESTASCIIFILTER)$/AsciiReplaceFilter.java \
- $(DESTASCIIFILTER)$/FilterOptions.java \
- $(DESTASCIIFILTER)$/Makefile \
- $(DESTASCIIFILTER)$/TypeDetection.xcu
-
-DESTFILTERDETECTION=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/FilterDevelopment$/FlatXmlFilterDetection
-FILTERDETECTION_FILES=\
- $(DESTFILTERDETECTION)$/fdcomp.cxx \
- $(DESTFILTERDETECTION)$/filterdetect.cxx \
- $(DESTFILTERDETECTION)$/filterdetect.hxx \
- $(DESTFILTERDETECTION)$/FlatXmlTypeDetection.uno.xml \
- $(DESTFILTERDETECTION)$/FlatXmlTypeDetection.xcu \
- $(DESTFILTERDETECTION)$/Makefile
-
-DESTFLATXMLCPP=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/FilterDevelopment$/FlatXmlFilter_cpp
-FLATXMLCPP_FILES=\
- $(DESTFLATXMLCPP)$/FlatXml.cxx \
- $(DESTFLATXMLCPP)$/FlatXmlFilter_cpp.uno.xml \
- $(DESTFLATXMLCPP)$/Makefile \
- $(DESTFLATXMLCPP)$/FlatXmlFilter_cpp.xcu
-
-DESTFLATXMLJAVA=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/FilterDevelopment$/FlatXmlFilter_java
-FLATXMLJAVA_FILES=\
- $(DESTFLATXMLJAVA)$/Makefile \
- $(DESTFLATXMLJAVA)$/FlatXmlFilter_java.xcu \
- $(DESTFLATXMLJAVA)$/FlatXml.java
-
-DESTLINGUISTIC=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/Linguistic
-LINGUISTIC_FILES=\
- $(DESTLINGUISTIC)$/LinguisticExamples.java \
- $(DESTLINGUISTIC)$/Makefile \
- $(DESTLINGUISTIC)$/OneInstanceFactory.java \
- $(DESTLINGUISTIC)$/PropChgHelper.java \
- $(DESTLINGUISTIC)$/PropChgHelper_Hyph.java \
- $(DESTLINGUISTIC)$/PropChgHelper_Spell.java \
- $(DESTLINGUISTIC)$/SampleHyphenator.java \
- $(DESTLINGUISTIC)$/SampleSpellChecker.java \
- $(DESTLINGUISTIC)$/SampleThesaurus.java \
- $(DESTLINGUISTIC)$/XHyphenatedWord_impl.java \
- $(DESTLINGUISTIC)$/XMeaning_impl.java \
- $(DESTLINGUISTIC)$/XPossibleHyphens_impl.java \
- $(DESTLINGUISTIC)$/XSpellAlternatives_impl.java
-
-DESTPATHSETTINGS=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/PathSettings
-PATHSETTINGS_FILES=\
- $(DESTPATHSETTINGS)$/Makefile \
- $(DESTPATHSETTINGS)$/PathSettingsTest.java
-
-DESTPATHSUBSTITUTION=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/PathSubstitution
-PATHSUBSTITUTION_FILES=\
- $(DESTPATHSUBSTITUTION)$/Makefile \
- $(DESTPATHSUBSTITUTION)$/PathSubstitutionTest.java
-
-DESTTERMINATIONTEST=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/TerminationTest
-TERMINATION_FILES=\
- $(DESTTERMINATIONTEST)$/Makefile \
- $(DESTTERMINATIONTEST)$/TerminateListener.java \
- $(DESTTERMINATIONTEST)$/TerminationTest.java
-
-DESTDISABLECOMMANDS=$(DESTDIRDEVGUIDEEXAMPLES)$/OfficeDev$/DisableCommands
-DISABLECOMMANDS_FILES=\
- $(DESTDISABLECOMMANDS)$/Makefile \
- $(DESTDISABLECOMMANDS)$/DisableCommandsTest.java
-
-DIR_FILE_LIST= \
- $(OFFICEDEV_FILES) \
- $(CLIPBOARD_FILES) \
- $(DESKTOPENV_FILES) \
- $(ASCIIFILTER_FILES) \
- $(FILTERDETECTION_FILES) \
- $(FLATXMLCPP_FILES) \
- $(FLATXMLJAVA_FILES) \
- $(LINGUISTIC_FILES) \
- $(PATHSETTINGS_FILES) \
- $(PATHSUBSTITUTION_FILES) \
- $(TERMINATION_FILES) \
- $(DISABLECOMMANDS_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_officedev_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_officedev.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
deleted file mode 100644
index 23c86e57..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
+++ /dev/null
@@ -1,118 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the ProfUNO cpp binding example of the Developers Guide
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=ProfUnoCppBinding
-SAMPLE_INC_OUT = $(OUT_INC)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-SAMPLE_OBJ_OUT=$(OUT_OBJ)/$(SAMPLE_NAME)
-
-APP1_NAME=office_connect
-APP1_BINARY=$(OUT_BIN)/$(APP1_NAME)$(EXE_EXT)
-
-APP2_NAME=string_samples
-APP2_BINARY=$(OUT_BIN)/$(APP2_NAME)$(EXE_EXT)
-
-ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(OFFICE_TYPES)
-
-CXXFILES = \
- office_connect.cxx \
- string_samples.cxx
-
-# Targets
-.PHONY: ALL
-ALL : \
- ProUNOCppBindingExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_OBJ_OUT)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(SAMPLE_INC_OUT) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(OUT_BIN)/%$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/%.$(OBJ_EXT)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
-ifeq "$(OS)" "WIN"
- $(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(SAMPLE_GEN_OUT)/$(subst $(EXE_EXT),.map,$(@F)) \
- $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-else
- $(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS_BIN) $@
-endif
-endif
-
-$(OUT_BIN)/office_connect$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/office_connect.$(OBJ_EXT)
-
-$(OUT_BIN)/string_samples$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/string_samples.$(OBJ_EXT)
-
-ProUNOCppBindingExample : $(APP1_BINARY) $(APP2_BINARY)
- @echo --------------------------------------------------------------------------------
- @echo Note: For the "$(QM)$(APP1_NAME)$(QM)" example you need a running office listening
- @echo $(SQM) $(SQM)on port 2083. The example use the defaultBootstrap_InitialComponentContext method and provides
- @echo $(SQM) $(SQM)the additional office types via the UNO environment variable -env:URE_MORE_TYPES=...
- @echo $(SQM) $(SQM)Before you can run this example you have to start your office in listening mode.
- @echo -
- @echo $(SQM) $(SQM)soffice "$(QM)-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager$(QM)"
- @echo -----
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_BIN)/%$(EXE_EXT)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
-
-$(API1_NAME).run: $(API1_BINARY)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(ENV_OFFICE_TYPES)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_INC_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_OBJ_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/$(APP1_NAME)*))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/$(APP2_NAME)*))
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx
deleted file mode 100644
index 336aa4e5..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-
-#include <sal/main.h>
-
-#include <cppuhelper/bootstrap.hxx>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::bridge;
-using namespace cppu;
-
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-
-SAL_IMPLEMENT_MAIN()
-{
- // create the initial component context
- Reference< XComponentContext > rComponentContext =
- defaultBootstrap_InitialComponentContext();
-
- // retrieve the servicemanager from the context
- Reference< XMultiComponentFactory > rServiceManager =
- rComponentContext->getServiceManager();
-
- // instantiate a sample service with the servicemanager.
- Reference< XInterface > rInstance =
- rServiceManager->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")),
- rComponentContext );
-
- // Query for the XUnoUrlResolver interface
- Reference< XUnoUrlResolver > rResolver( rInstance, UNO_QUERY );
-
- if( ! rResolver.is() )
- {
- printf( "Error: Couldn't instantiate com.sun.star.bridge.UnoUrlResolver service\n" );
- return 1;
- }
- try
- {
- // resolve the uno-url
- rInstance = rResolver->resolve( OUString(RTL_CONSTASCII_USTRINGPARAM(
- "uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager" )) );
-
- if( ! rInstance.is() )
- {
- printf( "StarOffice.ServiceManager is not exported from remote counterpart\n" );
- return 1;
- }
-
- // query for the simpler XMultiServiceFactory interface, sufficient for scripting
- Reference< XMultiServiceFactory > rOfficeServiceManager (rInstance, UNO_QUERY);
-
- if( ! rInstance.is() )
- {
- printf( "XMultiServiceFactory interface is not exported for StarOffice.ServiceManager\n" );
- return 1;
- }
-
- printf( "Connected sucessfully to the office\n" );
- }
- catch( Exception &e )
- {
- OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
- printf( "Error: %s\n", o.pData->buffer );
- return 1;
- }
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx
deleted file mode 100644
index 47689edb..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-
-#include <sal/main.h>
-
-#include <rtl/ustrbuf.hxx>
-#include <rtl/string.hxx>
-
-using rtl::OUString;
-using rtl::OUStringBuffer;
-using rtl::OString;
-
-SAL_IMPLEMENT_MAIN()
-{
- // string concatination
-
- sal_Int32 n = 42;
- double pi = 3.14159;
-
- // give it an initial size, should be a good guess.
- // stringbuffer extends if necessary
- OUStringBuffer buf( 128 );
-
- // append an ascii string
- buf.appendAscii( "pi ( here " );
-
- // numbers can be simply appended
- buf.append( pi );
-
- // lets the compiler count the stringlength, so this is more efficient than
- // the above appendAscii call, where length of the string must be calculated at
- // runtime
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" ) multiplied with " ) );
- buf.append( n );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" gives ") );
- buf.append( (double)( n * pi ) );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) );
-
- // now transfer the buffer into the string.
- // afterwards buffer is empty and may be reused again !
- OUString string = buf.makeStringAndClear();
-
- // I could of course also used the OStringBuffer directly
- OString oString = rtl::OUStringToOString( string , RTL_TEXTENCODING_ASCII_US );
-
- // just to print something
- printf( "%s\n" ,oString.getStr() );
-
- return 0;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
deleted file mode 100644
index 93242817..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.awt.*;
-import java.awt.event.*;
-
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.io.IOException;
-import com.sun.star.connection.XConnector;
-import com.sun.star.connection.XConnection;
-
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.bridge.XBridgeFactory;
-import com.sun.star.bridge.XBridge;
-
-
-public class ConnectionAwareClient extends java.awt.Frame
- implements ActionListener , com.sun.star.lang.XEventListener
-{
- private Button _btnWriter,_btnCalc;
- private Label _txtLabel;
- private String _url;
-
- private XComponentContext _ctx;
-
- private com.sun.star.frame.XComponentLoader _officeComponentLoader;
-
- public ConnectionAwareClient( XComponentContext ctx , String url )
- {
- _url = url;
- _ctx = ctx;
-
- Panel p1 = new Panel();
- _btnWriter = new Button("New writer");
- _btnCalc = new Button("New calc");
- _txtLabel = new Label( "disconnected" );
-
- _btnWriter.addActionListener(this);
- _btnCalc.addActionListener(this);
- p1.add( _btnWriter );
- p1.add( _btnCalc );
- p1.add( _txtLabel );
-
- addWindowListener(
- new WindowAdapter()
- {
- public void windowClosing(WindowEvent event)
- {
- System.exit(0);
- }
- }
- );
-
- add( p1 );
- }
-
- public void disposing( com.sun.star.lang.EventObject event )
- {
- // remote bridge has gone down, because the office crashed or was terminated.
- _officeComponentLoader = null;
- _txtLabel.setText( "disconnected" );
- }
-
- public void actionPerformed( ActionEvent event )
- {
- try
- {
- String sUrl;
- if( event.getSource() == _btnWriter )
- {
- sUrl = "private:factory/swriter";
- }
- else
- {
- sUrl = "private:factory/scalc";
- }
- getComponentLoader().loadComponentFromURL(
- sUrl, "_blank", 0,new com.sun.star.beans.PropertyValue[0] );
- _txtLabel.setText( "connected" );
- }
- catch ( com.sun.star.connection.NoConnectException exc )
- {
- _txtLabel.setText( exc.getMessage() );
- }
- catch ( com.sun.star.uno.Exception exc )
- {
- _txtLabel.setText( exc.getMessage() );
- exc.printStackTrace();
- throw new java.lang.RuntimeException( exc.getMessage() );
- }
- }
-
- /** separtates the uno-url into 3 different parts.
- */
- protected static String[] parseUnoUrl( String url )
- {
- String [] aRet = new String [3];
-
- if( ! url.startsWith( "uno:" ) )
- {
- return null;
- }
-
- int semicolon = url.indexOf( ';' );
- if( semicolon == -1 )
- return null;
-
- aRet[0] = url.substring( 4 , semicolon );
- int nextSemicolon = url.indexOf( ';' , semicolon+1);
-
- if( semicolon == -1 )
- return null;
- aRet[1] = url.substring( semicolon+1, nextSemicolon );
-
- aRet[2] = url.substring( nextSemicolon+1);
- return aRet;
- }
-
-
-
- protected com.sun.star.frame.XComponentLoader getComponentLoader()
- throws com.sun.star.uno.Exception
- {
- XComponentLoader officeComponentLoader = _officeComponentLoader;
-
- if( officeComponentLoader == null )
- {
- // instantiate connector service
- Object x = _ctx.getServiceManager().createInstanceWithContext(
- "com.sun.star.connection.Connector", _ctx );
-
- XConnector xConnector = (XConnector )
- UnoRuntime.queryInterface(XConnector.class, x);
-
- String a[] = parseUnoUrl( _url );
- if( null == a )
- {
- throw new com.sun.star.uno.Exception( "Couldn't parse uno-url "+ _url );
- }
-
- // connect using the connection string part of the uno-url only.
- XConnection connection = xConnector.connect( a[0] );
-
- x = _ctx.getServiceManager().createInstanceWithContext(
- "com.sun.star.bridge.BridgeFactory", _ctx );
-
- XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
- XBridgeFactory.class , x );
-
- // create a nameless bridge with no instance provider
- // using the middle part of the uno-url
- XBridge bridge = xBridgeFactory.createBridge( "" , a[1] , connection , null );
-
- // query for the XComponent interface and add this as event listener
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(
- XComponent.class, bridge );
- xComponent.addEventListener( this );
-
- // get the remote instance
- x = bridge.getInstance( a[2] );
-
- // Did the remote server export this object ?
- if( null == x )
- {
- throw new com.sun.star.uno.Exception(
- "Server didn't provide an instance for" + a[2], null );
- }
-
- // Query the initial object for its main factory interface
- XMultiComponentFactory xOfficeMultiComponentFactory = ( XMultiComponentFactory )
- UnoRuntime.queryInterface( XMultiComponentFactory.class, x );
-
- // retrieve the component context (it's not yet exported from the office)
- // Query for the XPropertySet interface.
- XPropertySet xProperySet = ( XPropertySet )
- UnoRuntime.queryInterface( XPropertySet.class, xOfficeMultiComponentFactory );
-
- // Get the default context from the office server.
- Object oDefaultContext =
- xProperySet.getPropertyValue( "DefaultContext" );
-
- // Query for the interface XComponentContext.
- XComponentContext xOfficeComponentContext =
- ( XComponentContext ) UnoRuntime.queryInterface(
- XComponentContext.class, oDefaultContext );
-
-
- // now create the desktop service
- // NOTE: use the office component context here !
- Object oDesktop = xOfficeMultiComponentFactory.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xOfficeComponentContext );
-
- officeComponentLoader = ( XComponentLoader )
- UnoRuntime.queryInterface( XComponentLoader.class, oDesktop );
-
- if( officeComponentLoader == null )
- {
- throw new com.sun.star.uno.Exception(
- "Couldn't instantiate com.sun.star.frame.Desktop" , null );
- }
- _officeComponentLoader = officeComponentLoader;
- }
- return officeComponentLoader;
- }
-
- public static void main( String [] args ) throws java.lang.Exception
- {
- if( args.length != 1 )
- {
- System.out.println( "usage: ConnectionAwareClient uno-url" );
- return;
- }
- XComponentContext ctx =
- com.sun.star.comp.helper.Bootstrap.createInitialComponentContext( null );
-
- ConnectionAwareClient connAware = new ConnectionAwareClient( ctx, args[0]);
- connAware.pack();
- connAware.setVisible( true );
- }
-}
-
diff --git a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/Makefile b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/Makefile
deleted file mode 100644
index deaade0b..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the ProfUNO interprocess example of the Developers Guide.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=ProfUNOInterprocessExamples
-OUT_APP_CLASS=$(OUT_CLASS)/$(EXAMPLE_NAME)
-
-JAVAFILES = \
- ConnectionAwareClient.java \
- UrlResolver.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(EXAMPLE_NAME) : $(CLASSFILES)
- @echo --------------------------------------------------------------------------------
- @echo Note: For these examples you need a running office listening on port 2083.
- @echo $(SQM) $(SQM)Before you run these examples you have to start your office with
- @echo -
- @echo $(SQM) $(SQM)soffice "$(QM)-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager$(QM)"
- @echo -----
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) ConnectionAwareClient.run
- @echo $(MAKE) UrlResolver.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@) "uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/UrlResolver.java b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/UrlResolver.java
deleted file mode 100644
index 33b4b995..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/UrlResolver.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-
-
-class UrlResolver
-{
- public static void main( String [] args ) throws java.lang.Exception
- {
- if( args.length != 1 )
- {
- System.out.println( "usage: UrlResolver uno-url\n" +
- " uno-url The uno-url identifying the object to\n" +
- " be imported, for instance\n" +
- " uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager" +
- " (use \" on unix shells to avoid ;-problems" );
- System.exit( 1 );
- }
-
- // create default local component context
- XComponentContext xLocalContext =
- com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(null);
-
- // initial serviceManager
- XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
-
- // create a urlresolver
- Object urlResolver = xLocalServiceManager.createInstanceWithContext(
- "com.sun.star.bridge.UnoUrlResolver", xLocalContext );
-
- // query for the XUnoUrlResolver interface
- XUnoUrlResolver xUrlResolver =
- (XUnoUrlResolver) UnoRuntime.queryInterface( XUnoUrlResolver.class, urlResolver );
-
- try
- {
- // Import the object
- Object rInitialObject = xUrlResolver.resolve( args[0] );
-
- // XComponentContext
- if( null != rInitialObject )
- {
- System.out.println( "initial object successfully retrieved" );
- }
- else
- {
- System.out.println( "given initial-object name unknown at server side" );
- }
- }
- catch( com.sun.star.connection.NoConnectException e )
- {
- System.out.println( "Couldn't connect to remote server" );
- System.out.println( e.getMessage() );
- }
- catch( com.sun.star.connection.ConnectionSetupException e )
- {
- System.out.println( "Couldn't access necessary local resource to establish the interprocess connection" );
- System.out.println( e.getMessage() );
- }
- catch( com.sun.star.lang.IllegalArgumentException e )
- {
- System.out.println( "uno-url is syntactical illegal ( " + args[0] + " )" );
- System.out.println( e.getMessage() );
- }
- catch( com.sun.star.uno.RuntimeException e )
- {
- System.out.println( "RuntimeException" );
- System.out.println( e.getMessage() );
- }
- finally {
- System.exit(0);
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile
deleted file mode 100644
index 504f229c..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile
+++ /dev/null
@@ -1,113 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the ProfUNO lifetime example of the Developers Guide
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=ProfUnoLifetime
-OUT_COMP_CLASS=$(OUT_CLASS)/$(COMPONENT_NAME)
-OUT_COMP_INC=$(OUT_INC)/$(COMPONENT_NAME)
-OUT_COMP_GEN=$(OUT_MISC)/$(COMPONENT_NAME)
-OUT_COMP_OBJ=$(OUT_OBJ)/$(COMPONENT_NAME)
-
-JAVAFILES = \
- MyUnoObject.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/JavaComp/%.class,$(JAVAFILES))
-
-CXXFILES = object_lifetime.cxx
-
-OBJFILES = $(patsubst %.cxx,$(OUT_COMP_OBJ)/%.$(OBJ_EXT),$(CXXFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- ProUNOLifetimeExamples
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $<
-
-$(OUT_COMP_OBJ)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(OUT_BIN)/$(COMPONENT_NAME)$(EXE_EXT) : $(OBJFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
-ifeq "$(OS)" "WIN"
- $(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_COMP_GEN)/$(subst $(EXE_EXT),.map,$(@F)) \
- $(OBJFILES) $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-else
- $(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $(OBJFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS_BIN) $@
-endif
-endif
-
-ProUNOLifetimeExamples : $(OUT_BIN)/$(COMPONENT_NAME)$(EXE_EXT) $(OUT_COMP_CLASS)/MyUnoObject.class
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) MyUnoObject.run
- @echo $(MAKE) ProfUnoLifetime.runexe
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-%.runexe: $(OUT_BIN)/%$(EXE_EXT)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_OBJ))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/$(COMPONENT_NAME)$(EXE_EXT)))
diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
deleted file mode 100644
index 33da8cd6..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/MyUnoObject.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-class MyUnoObject implements com.sun.star.uno.XInterface
-{
- public MyUnoObject() {}
-
- protected void finalize() throws Throwable {
- super.finalize();
- System.out.println( "finalizer called" );
- }
-
- public static void main( String args[] ) throws java.lang.InterruptedException
- {
- com.sun.star.uno.XInterface a = new MyUnoObject();
- a = null;
-
- // ask the garbage collector politely
- System.gc();
- synchronized( Thread.currentThread() )
- {
- // wait a second
- Thread.currentThread().wait( 1000 );
- }
- System.out.println( "leaving" );
-
- // It is java VM dependend, whether the finalizer was called or not
- }
-}
diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx
deleted file mode 100644
index 63056a92..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-
-#include <cppuhelper/weak.hxx>
-
-class MyOWeakObject : public ::cppu::OWeakObject
-{
-public:
- MyOWeakObject() { fprintf( stdout, "constructed\n" ); }
- ~MyOWeakObject() { fprintf( stdout, "destructed\n" ); }
-};
-
-
-void simple_object_creation_and_destruction()
-{
- // create the UNO object
- com::sun::star::uno::XInterface * p = new MyOWeakObject();
-
- // acquire it, refcount becomes one
- p->acquire();
-
- fprintf( stdout, "before release\n" );
-
- // release it, refcount drops to zero
- p->release();
-
- fprintf( stdout, "after release\n" );
-}
-
-
-int main( char * argv[] )
-{
- simple_object_creation_and_destruction();
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile
deleted file mode 100644
index 33f4c2df..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the SimpleBootstrap_cpp example of the SDK.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-APP_NAME=SimpleBootstrap_cpp
-
-OUT_APP_INC = $(OUT_INC)/$(APP_NAME)
-OUT_APP_GEN = $(OUT_MISC)/$(APP_NAME)
-OUT_APP_OBJ=$(OUT_OBJ)/$(APP_NAME)
-
-CXXFILES = SimpleBootstrap_cpp.cxx
-
-OBJFILES = $(patsubst %.cxx,$(OUT_SLO_COMP)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- SimpleBootstrapCppExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_OBJ)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_APP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(OUT_BIN)/_$(APP_NAME)$(EXE_EXT) : $(OUT_APP_OBJ)/$(APP_NAME).$(OBJ_EXT)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_APP_GEN))
-ifeq "$(OS)" "WIN"
- $(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_APP_GEN)/$(basename $(@F)).map \
- $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-else
- $(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS_BIN) $@
-endif
-endif
-
-$(OUT_BIN)/$(APP_NAME)$(EXE_EXT) : $(OUT_BIN)/_$(APP_NAME)$(EXE_EXT)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$(BIN_DIR)/unoapploader$(EXE_EXT)) $(subst /,$(PS),$@)
-# workaround for touch problem under Windows with full qualified paths
- make -t $@
-
-SimpleBootstrapCppExample : $(OUT_BIN)/$(APP_NAME)$(EXE_EXT)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) SimpleBootstrap_cpp.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_BIN)/SimpleBootstrap_cpp$(EXE_EXT)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_OBJ))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/*SimpleBootstrap*))
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx
deleted file mode 100644
index 99f9da64..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-
-#include <sal/main.h>
-#include <cppuhelper/bootstrap.hxx>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::frame;
-
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
- try
- {
- // get the remote office component context
- Reference< XComponentContext > xContext( ::cppu::bootstrap() );
- if ( !xContext.is() )
- {
- fprintf(stderr, "no component context!\n");
- return 1;
- }
-
- // get the remote office service manager
- Reference< XMultiComponentFactory > xServiceManager(
- xContext->getServiceManager() );
- if ( !xServiceManager.is() )
- {
- fprintf(stderr, "no service manager!\n");
- return 1;
- }
-
- // get an instance of the remote office desktop UNO service
- // and query the XComponentLoader interface
- Reference < XComponentLoader > xComponentLoader(
- xServiceManager->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ),
- xContext ), UNO_QUERY_THROW );
-
- // open a spreadsheet document
- Reference< XComponent > xComponent( xComponentLoader->loadComponentFromURL(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "private:factory/scalc" ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" ) ), 0,
- Sequence < ::com::sun::star::beans::PropertyValue >() ) );
- if ( !xComponent.is() )
- {
- fprintf(stderr, "opening spreadsheet document failed!\n");
- return 1;
- }
- }
- catch ( ::cppu::BootstrapException & e )
- {
- fprintf(stderr, "caught BootstrapException: %s\n",
- OUStringToOString( e.getMessage(), RTL_TEXTENCODING_ASCII_US ).getStr());
- return 1;
- }
- catch ( Exception & e )
- {
- fprintf(stderr, "caught UNO exception: %s\n",
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
- return 1;
- }
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/Makefile b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/Makefile
deleted file mode 100644
index fd89206c..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/Makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the SimpleBootstrap_java example.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=SimpleBootstrap_java
-OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME)
-
-COMPONENT_JAR_NAME = $(COMPONENT_NAME).jar
-COMPONENT_JAR = $(OUT_CLASS)/$(COMPONENT_JAR_NAME)
-
-JAVAFILES = \
- SimpleBootstrap_java.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- SimpleBootstrapJavaExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-$(OUT_CLASS)/%.jar : manifest.mf $(CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) .
- $(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-SimpleBootstrapJavaExample : $(COMPONENT_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) SimpleBootstrap_java.run
- @echo --------------------------------------------------------------------------------
-
-# Setting the optional system property "com.sun.star.lib.loader.unopath" to the office
-# program path ensures that the conmfigured SDK office is used. If the system property
-# is not specified, the default office installation is used.
-%.run: $(COMPONENT_JAR)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $(COMPONENT_JAR)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_JAR)))
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java
deleted file mode 100644
index f348e073..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
-
-public class SimpleBootstrap_java {
-
- public static void main(String[] args) {
-
- try {
- // get the remote office component context
- XComponentContext xContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- XMultiComponentFactory xServiceManager =
- xContext.getServiceManager();
-
- // get an instance of the remote office desktop UNO service
- Object desktop = xServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext );
-
- // query the XComponentLoader interface from the desktop
- XComponentLoader xComponentLoader =
- (XComponentLoader)UnoRuntime.queryInterface(
- XComponentLoader.class, desktop );
-
- // load a spreadsheet document
- String loadURL = "private:factory/scalc";
- PropertyValue[] loadProps = new PropertyValue[0];
- xComponentLoader.loadComponentFromURL(
- loadURL, "_blank", 0, loadProps);
- }
- catch (java.lang.Exception e){
- e.printStackTrace();
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/manifest.mf b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/manifest.mf
deleted file mode 100644
index e1326fa0..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_java/manifest.mf
+++ /dev/null
@@ -1,4 +0,0 @@
-Main-Class: com.sun.star.lib.loader.Loader
-
-Name: com/sun/star/lib/loader/Loader.class
-Application-Class: SimpleBootstrap_java
diff --git a/odk/examples/DevelopersGuide/ProfUNO/makefile.mk b/odk/examples/DevelopersGuide/ProfUNO/makefile.mk
deleted file mode 100644
index fbacdfc6..00000000
--- a/odk/examples/DevelopersGuide/ProfUNO/makefile.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-CPPBINDING_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/CppBinding$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/CppBinding$/office_connect.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/CppBinding$/office_connect.ini \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/CppBinding$/office_connectrc \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/CppBinding$/string_samples.cxx
-
-INTERPROCESSCONN_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/InterprocessConn$/ConnectionAwareClient.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/InterprocessConn$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/InterprocessConn$/UrlResolver.java
-
-LIFETIME_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/Lifetime$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/Lifetime$/MyUnoObject.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/Lifetime$/object_lifetime.cxx
-
-SIMPLEBOOTSTRAP_JAVA_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/SimpleBootstrap_java$/SimpleBootstrap_java.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/SimpleBootstrap_java$/manifest.mf \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/SimpleBootstrap_java$/Makefile
-
-SIMPLEBOOTSTRAP_CPP_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/SimpleBootstrap_cpp$/SimpleBootstrap_cpp.cxx \
- $(DESTDIRDEVGUIDEEXAMPLES)$/ProfUNO$/SimpleBootstrap_cpp$/Makefile
-
-DIR_FILE_LIST= \
- $(CPPBINDING_FILES) \
- $(INTERPROCESSCONN_FILES) \
- $(LIFETIME_FILES) \
- $(SIMPLEBOOTSTRAP_JAVA_FILES) \
- $(SIMPLEBOOTSTRAP_CPP_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_profuno_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_profuno.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
-$(DESTDIREXAMPLES)$/%$/office_connectrc : $(PRJ)$/examples$/%$/office_connectrc
- -$(MKDIRHIER) $(@:d)
- @@-rm -f $@
- $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
-
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml
deleted file mode 100644
index e7bf06b4..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.framework-script" manifest:full-path="SayHello"/>
-</manifest:manifest>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile
deleted file mode 100644
index 9017df49..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile
+++ /dev/null
@@ -1,129 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OOoBean of the Developers Guide
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=SayHello
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/ScriptingFramework/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/ScriptingFramework
-
-SCRIPT_NAME=SayHello
-SCRIPT_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(SCRIPT_NAME)
-SCRIPT_GEN_OUT=$(SAMPLE_GEN_OUT)/$(SCRIPT_NAME)
-SCRIPT_JAR_NAME=$(SCRIPT_NAME).jar
-SCRIPT_JAR=$(SAMPLE_CLASS_OUT)/$(SCRIPT_JAR_NAME)
-SCRIPT_PACKAGE = $(OUT_BIN)/$(SCRIPT_NAME).$(UNOOXT_EXT)
-SCRIPT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(SCRIPT_NAME).$(UNOOXT_EXT)")
-SCRIPT_REGISTERFLAG=$(SCRIPT_GEN_OUT)$(PS)devguide_scriptingframework_$(SCRIPT_NAME)_register_scriptpkg.flag
-
-JAVAFILES = \
- SayHello/SayHello.java
-
-CLASSFILES = $(patsubst %.java,$(SCRIPT_CLASS_OUT)/%.class,$(subst $(SAMPLE_NAME)/,,$(JAVAFILES)))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-# Targets
-.PHONY: ALL
-ALL : \
- SayHelloExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SCRIPT_CLASS_OUT) $(JAVAFILES)
-
-$(SCRIPT_JAR) : $(CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvf $@ $(CLASSNAMES) -C $(SCRIPT_CLASS_OUT) .
-
-# rule for component package file
-$(SCRIPT_PACKAGE) : $(SCRIPT_JAR) META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)/..) && $(SDK_ZIP) -u ../../bin/$(@F) $(SAMPLE_NAME)/$(SCRIPT_JAR_NAME)
-
-$(SCRIPT_REGISTERFLAG) : $(SCRIPT_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(SCRIPT_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-
-SayHelloExample : $(SCRIPT_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)$(SCRIPT_NAME)$(QM)" scripting package was installed in your office installation
- @echo if SDK_AUTO_DEPLOYMENT = YES. If you want to run the script, start the Office
- @echo and use the Tools/Macros/Run Macro menu item.
- @echo You can also load the document "$(QM)$(SCRIPT_NAME).odt$(QM)" and press the button to run the
- @echo script.
- @echo -
- @echo $(MAKE) $(SCRIPT_NAME).odt.load
- @echo --------------------------------------------------------------------------------
-
-$(SCRIPT_NAME).odt.load : $(SCRIPT_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-%.run: $(CLASSFILES)
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
-
-%.dbg: $(JAR1_JAR)
- jdb -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SCRIPT_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SCRIPT_PACKAGE_URL)))
-
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odt b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odt
deleted file mode 100644
index e1833191..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java
deleted file mode 100644
index 4913ad09..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java
+++ /dev/null
@@ -1,46 +0,0 @@
-import com.sun.star.script.provider.XScriptContext;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.lang.XComponent;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextRange;
-import com.sun.star.text.XText;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.awt.ActionEvent;
-
-public class SayHello
-{
- public static void start(XScriptContext ctxt, ActionEvent e)
- throws Exception
- {
- SayHello.start(ctxt);
- }
-
- public static void start(XScriptContext ctxt)
- throws Exception
- {
- // getting the text document object
- XTextDocument xTextDocument = createDocument(ctxt);
-
- XText xText = xTextDocument.getText();
- XTextRange xTextRange = xText.getEnd();
- xTextRange.setString("Hello");
- }
-
- private static XTextDocument createDocument(XScriptContext ctxt)
- throws Exception
- {
- XComponentLoader loader = (XComponentLoader)
- UnoRuntime.queryInterface(
- XComponentLoader.class, ctxt.getDesktop());
-
- XComponent comp = loader.loadComponentFromURL(
- "private:factory/swriter", "_blank", 4, new PropertyValue[0]);
-
- XTextDocument doc = (XTextDocument)
- UnoRuntime.queryInterface( XTextDocument.class, comp);
-
- return doc;
- }
-}
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml
deleted file mode 100644
index 3f317a34..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<parcel language="Java" xmlns:parcel="scripting.dtd">
- <script language="Java">
- <locale lang="en">
- <displayname value="SayHello"/>
- <description>
- Prints Hello in a Writer document
- </description>
- </locale>
- <functionname value="SayHello.start"/>
- <logicalname value="SayHello.start"/>
- <languagedepprops>
- <prop name="classpath" value="SayHello.jar"/>
- </languagedepprops>
- </script>
-</parcel>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml
deleted file mode 100755
index ffd3e445..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<project default="build">
-
- <!-- =================== Global Properties ============================= -->
- <property environment="env"/>
- <property name="macroname" value="SayHello"/>
- <property name="unopkgfile" value="${basedir}/${macroname}.uno.pkg"/>
-
- <!-- ==================== intialise properties ========================= -->
- <target name="checksdk">
- <condition property="UsingSDK">
- <available file="${env.OFFICE_PROGRAM_PATH}"/>
- </condition>
- </target>
-
- <target name="initsdk" if="UsingSDK">
- <property name="opp" value="${env.OFFICE_PROGRAM_PATH}"/>
- </target>
-
- <target name="initnosdk" unless="UsingSDK">
- <fail unless="opp" message="Path to Office install not set"/>
- </target>
-
- <!-- ==================== classpath setting ============================ -->
- <target name="init" depends="checksdk,initsdk,initnosdk">
- <path id="scriptclasspath">
- <pathelement location="${opp}/classes/unoil.jar"/>
- <pathelement location="${opp}/classes/ridl.jar"/>
- <pathelement location="${opp}/classes/jurt.jar"/>
- <pathelement location="${opp}/classes/juh.jar"/>
- <pathelement location="${opp}/classes/ScriptFramework.jar"/>
- </path>
- </target>
-
- <!-- ====================== Clean Generated Files ===================== -->
- <target name="clean">
- <delete>
- <fileset dir=".">
- <include name="**/*.class"/>
- <include name="**/*.jar"/>
- <include name="**/*.uno.pkg"/>
- </fileset>
- </delete>
- </target>
-
- <!-- ===================== Compile the script ========================= -->
- <target name="compile" depends="init">
- <javac srcdir="${macroname}" destdir="${macroname}"
- includes="**/*.java" classpathref="scriptclasspath"
- debug="on" optimize="on" deprecation="on"/>
- </target>
-
- <!-- ====================== Build UNO Package ========================= -->
- <target name="build" depends="compile">
- <delete file="${unopkgfile}"/>
-
- <jar jarfile="${macroname}/${macroname}.jar"
- basedir="${macroname}" includes="*.class,*.gif">
- </jar>
-
- <zip zipfile="${unopkgfile}">
- <fileset dir="${basedir}">
- <include name="**/*.jar"/>
- <include name="**/parcel-descriptor.xml"/>
- <include name="**/manifest.xml"/>
- </fileset>
- </zip>
- </target>
-
- <!-- ====================== Deploy Generated Files ==================== -->
- <target name="deploy" depends="build">
- <exec executable="${opp}/unopkg">
- <arg line="add"/>
- <arg line="--force"/>
- <arg path="${unopkgfile}"/>
- </exec>
- </target>
-
- <!-- ========================= All In One Build ======================= -->
- <target name="all" depends="clean,build,deploy"/>
-
-</project>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml
deleted file mode 100644
index 0b86e92a..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.framework-script" manifest:full-path="ScriptSelector"/>
-</manifest:manifest>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile
deleted file mode 100644
index 1088fe5d..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile
+++ /dev/null
@@ -1,131 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OOoBean of the Developers Guide
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=ScriptSelector
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/ScriptingFramework/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/ScriptingFramework
-
-SCRIPT_NAME=ScriptSelector
-SCRIPT_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(SCRIPT_NAME)
-SCRIPT_GEN_OUT=$(SAMPLE_GEN_OUT)/$(SCRIPT_NAME)
-SCRIPT_JAR_NAME=$(SCRIPT_NAME).jar
-SCRIPT_JAR=$(SAMPLE_CLASS_OUT)/$(SCRIPT_JAR_NAME)
-SCRIPT_PACKAGE = $(OUT_BIN)/$(SCRIPT_NAME).$(UNOOXT_EXT)
-SCRIPT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(SCRIPT_NAME).$(UNOOXT_EXT)")
-SCRIPT_REGISTERFLAG=$(SCRIPT_GEN_OUT)$(PS)devguide_scriptingframework_$(SCRIPT_NAME)_register.flag
-
-JAVAFILES = \
- ScriptSelector/ScriptSelector.java
-
-CLASSFILES = $(patsubst %.java,$(SCRIPT_CLASS_OUT)/%.class,$(subst $(SAMPLE_NAME)/,,$(JAVAFILES)))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-# Targets
-.PHONY: ALL
-ALL : ScriptSelectorExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SCRIPT_CLASS_OUT) $(JAVAFILES)
-
-$(SCRIPT_JAR) : $(CLASSFILES) $(SCRIPT_NAME)/container.gif $(SCRIPT_NAME)/script.gif $(SCRIPT_NAME)/soffice.gif
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$(SCRIPT_NAME)/container.gif) $(subst /,$(PS),$(SCRIPT_CLASS_OUT))
- $(COPY) $(subst /,$(PS),$(SCRIPT_NAME)/script.gif) $(subst /,$(PS),$(SCRIPT_CLASS_OUT))
- $(COPY) $(subst /,$(PS),$(SCRIPT_NAME)/soffice.gif) $(subst /,$(PS),$(SCRIPT_CLASS_OUT))
- $(SDK_JAR) cvf $@ -C $(SCRIPT_CLASS_OUT) .
-
-# rule for component package file
-$(SCRIPT_PACKAGE) : $(SCRIPT_JAR) META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)/..) && $(SDK_ZIP) -u ../../bin/$(@F) $(SAMPLE_NAME)/$(SCRIPT_JAR_NAME)
-
-$(SCRIPT_REGISTERFLAG) : $(SCRIPT_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(SCRIPT_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-
-ScriptSelectorExample : $(SCRIPT_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)$(SCRIPT_NAME)$(QM)" scripting package was installed in your office installation
- @echo if SDK_AUTO_DEPLOYMENT = YES. If you want to run the script, start the Office
- @echo and use the Tools/Macros/Run Macro menu item.
- @echo You can also load the document "$(QM)$(SCRIPT_NAME).odt$(QM)" and press the button to run
- @echo the script.
- @echo -
- @echo $(MAKE) $(SCRIPT_NAME).odt.load
- @echo --------------------------------------------------------------------------------
-
-$(SCRIPT_NAME).odt.load : $(SCRIPT_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-%.run: $(CLASSFILES)
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
-
-%.dbg: $(JAR1_JAR)
- jdb -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SCRIPT_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SCRIPT_PACKAGE_URL)))
-
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odt b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odt
deleted file mode 100644
index 323bb6ed..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
deleted file mode 100644
index cc448ff2..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
+++ /dev/null
@@ -1,397 +0,0 @@
-import javax.swing.*;
-import javax.swing.tree.*;
-import javax.swing.table.*;
-import javax.swing.event.*;
-import javax.swing.border.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.beans.*;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.XComponentContext;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.FrameSearchFlag;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XDispatchHelper;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.util.XURLTransformer;
-import com.sun.star.beans.*;
-import com.sun.star.script.XInvocation;
-
-import com.sun.star.lib.uno.helper.PropertySet;
-
-import com.sun.star.script.browse.XBrowseNode;
-import com.sun.star.script.browse.BrowseNodeTypes;
-import com.sun.star.script.browse.XBrowseNodeFactory;
-import com.sun.star.script.browse.BrowseNodeFactoryViewTypes;
-import com.sun.star.script.provider.XScriptContext;
-import com.sun.star.script.provider.XScript;
-import com.sun.star.script.provider.XScriptProvider;
-import com.sun.star.script.provider.XScriptProviderFactory;
-
-public class ScriptSelector {
-
- private static final int BIG_GAP = 10;
- private static final int MED_GAP = 5;
-
- private static final String MSP_FACTORY =
- "/singletons/com.sun.star.script.provider." +
- "theMasterScriptProviderFactory";
-
- private static final String BROWSE_FACTORY =
- "/singletons/com.sun.star.script.browse.theBrowseNodeFactory";
-
- private ScriptSelectorPanel selectorPanel;
-
- public ScriptSelector()
- {
- }
-
- public void show(final XScriptContext ctxt)
- {
- try {
- XBrowseNode root = getRootNode(ctxt);
-
- Object obj = ctxt.getComponentContext().getValueByName(MSP_FACTORY);
-
- XScriptProviderFactory fac = (XScriptProviderFactory)
- UnoRuntime.queryInterface(XScriptProviderFactory.class, obj);
-
- final XScriptProvider msp =
- fac.createScriptProvider(new Any(new Type(), null));
-
- final JFrame client = new JFrame("Script");
-
- selectorPanel = new ScriptSelectorPanel(root);
-
- final JButton runButton, closeButton;
-
- runButton = new JButton("Run");
- runButton.setEnabled(false);
-
- closeButton = new JButton("Close");
-
- JPanel northButtons =
- new JPanel(new GridLayout(2, 1, MED_GAP, MED_GAP));
-
- northButtons.add(runButton);
- northButtons.add(closeButton);
-
- JPanel southButtons =
- new JPanel(new GridLayout(3, 1, MED_GAP, MED_GAP));
-
- selectorPanel.tree.addTreeSelectionListener(
- new TreeSelectionListener() {
- public void valueChanged(TreeSelectionEvent e) {
- XBrowseNode xbn = selectorPanel.getSelection();
- XPropertySet props = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, xbn);
-
- if (xbn != null &&
- xbn.getType() == BrowseNodeTypes.SCRIPT)
- {
- runButton.setEnabled(true);
- }
- else
- {
- runButton.setEnabled(false);
- }
- }
- }
- );
-
- ActionListener listener = new ActionListener() {
- public void actionPerformed(ActionEvent event) {
- if (event.getSource() == runButton) {
- String uri = selectorPanel.textField.getText();
-
- try {
- XScript script = msp.getScript(uri);
-
- Object[][] out = new Object[1][0];
- out[0] = new Object[0];
-
- short[][] num = new short[1][0];
- num[0] = new short[0];
-
- script.invoke(new Object[0], num, out);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- else if (event.getSource() == closeButton) {
- client.dispose();
- }
- }
- };
-
- runButton.addActionListener(listener);
- closeButton.addActionListener(listener);
-
- JPanel buttonPanel = new JPanel(new BorderLayout());
- buttonPanel.add(northButtons, BorderLayout.NORTH);
- buttonPanel.add(southButtons, BorderLayout.SOUTH);
-
- JPanel mainPanel = new JPanel(new BorderLayout(MED_GAP, MED_GAP));
- mainPanel.setBorder(
- new EmptyBorder(BIG_GAP, BIG_GAP, BIG_GAP, BIG_GAP));
- mainPanel.add(selectorPanel, BorderLayout.CENTER);
- mainPanel.add(buttonPanel, BorderLayout.EAST);
-
- client.getContentPane().add(mainPanel);
- client.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- client.setSize(500, 350);
-
- // set the x and y locations so that the frame is in the
- // centre of the screen
- Dimension d = client.getToolkit().getScreenSize();
-
- int x = (int)((d.getWidth() - client.getWidth()) / 2);
- int y = (int)((d.getHeight() - client.getHeight()) / 2);
-
- client.setLocation(x, y);
-
- client.show();
- }
- catch (com.sun.star.uno.RuntimeException rue) {
- rue.printStackTrace();
- }
- catch (java.lang.Exception e) {
- e.printStackTrace();
- }
- }
-
- public void show(final XScriptContext ctxt,
- final com.sun.star.awt.MouseEvent e)
- {
- show(ctxt);
- }
-
- public void show(final XScriptContext ctxt,
- final com.sun.star.awt.ActionEvent e)
- {
- show(ctxt);
- }
-
- private void checkEnabled(XPropertySet props, String name,
- JButton button)
- {
- boolean enable = false;
-
- try
- {
- if (props != null)
- {
- Object o = props.getPropertyValue(name);
- enable = AnyConverter.toBoolean(
- props.getPropertyValue(name));
- }
- }
- catch (com.sun.star.lang.IllegalArgumentException iae)
- {
- // leave enable set to false
- }
- catch (com.sun.star.beans.UnknownPropertyException upe)
- {
- // leave enable set to false
- }
- catch (com.sun.star.lang.WrappedTargetException wte)
- {
- // leave enable set to false
- }
-
- button.setEnabled(enable);
- }
-
- private XBrowseNode getRootNode(XScriptContext ctxt) {
-
- XBrowseNode result = null;
-
- XComponentContext xcc = ctxt.getComponentContext();
- XBrowseNodeFactory xBrowseFac = (XBrowseNodeFactory)
- UnoRuntime.queryInterface(
- XBrowseNodeFactory.class, xcc.getValueByName(BROWSE_FACTORY));
-
- result = (XBrowseNode)UnoRuntime.queryInterface(
- XBrowseNode.class, xBrowseFac.createView(
- BrowseNodeFactoryViewTypes.MACROSELECTOR ) );
-
- return result;
- }
-}
-
-class ScriptSelectorPanel extends JPanel {
-
- private XBrowseNode myrootnode = null;
- public JTextField textField;
- public JTree tree;
- public DefaultTreeModel treeModel;
-
- public ScriptSelectorPanel(XBrowseNode root)
- {
- this.myrootnode = root;
- initUI();
- }
-
- public XBrowseNode getSelection() {
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)
- tree.getLastSelectedPathComponent();
-
- if (node == null) {
- return null;
- }
-
- return (XBrowseNode)node.getUserObject();
- }
-
- private void initUI() {
- setLayout(new BorderLayout());
-
- DefaultMutableTreeNode top =
- new DefaultMutableTreeNode(myrootnode) {
- public String toString() {
- return ((XBrowseNode)getUserObject()).getName();
- }
- };
- initNodes(myrootnode, top);
- treeModel = new DefaultTreeModel(top);
- tree = new JTree(treeModel);
-
- tree.setCellRenderer(new ScriptTreeRenderer());
-
- tree.getSelectionModel().setSelectionMode
- (TreeSelectionModel.SINGLE_TREE_SELECTION);
-
- tree.addTreeSelectionListener(new TreeSelectionListener() {
- public void valueChanged(TreeSelectionEvent e) {
- XBrowseNode xbn = getSelection();
- XPropertySet props = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xbn);
-
- if (xbn == null) {
- textField.setText("");
- return;
- }
-
- String str = xbn.getName();
- if (xbn.getType() == BrowseNodeTypes.SCRIPT && props != null)
- {
- try {
- str = AnyConverter.toString(
- props.getPropertyValue("URI"));
- }
- catch (Exception ignore) {
- // default will be used
- }
- }
- textField.setText(str);
- }
- });
-
- JScrollPane scroller = new JScrollPane(tree);
- add(scroller, BorderLayout.CENTER);
-
- textField = new JTextField();
- add(textField, BorderLayout.SOUTH);
- }
-
- public void removeNode(DefaultMutableTreeNode node) {
- MutableTreeNode parent = (MutableTreeNode)(node.getParent());
- if (parent != null) {
- treeModel.removeNodeFromParent(node);
- }
- }
-
- public void addNode(DefaultMutableTreeNode parent, XBrowseNode xbn) {
- DefaultMutableTreeNode newNode =
- new DefaultMutableTreeNode(xbn) {
- public String toString() {
- return ((XBrowseNode)getUserObject()).getName();
- }
- };
-
- treeModel.insertNodeInto(newNode, parent, parent.getChildCount());
- tree.scrollPathToVisible(new TreePath(newNode.getPath()));
- }
-
- private void initNodes(XBrowseNode parent, DefaultMutableTreeNode top) {
- if ( parent == null || parent.hasChildNodes() == false )
- {
- return;
- }
-
- XBrowseNode[] children = parent.getChildNodes();
-
- try {
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- if ( children[i] == null )
- {
- continue;
- }
- DefaultMutableTreeNode newNode =
- new DefaultMutableTreeNode(children[i]) {
- public String toString() {
- return ((XBrowseNode)getUserObject()).getName();
- }
- };
- top.add(newNode);
- initNodes(children[i], newNode);
- }
- }
- }
- catch (java.lang.Exception e) {
- e.printStackTrace();
- }
- }
-}
-
-class ScriptTreeRenderer extends DefaultTreeCellRenderer {
-
- private ImageIcon sofficeIcon;
- private ImageIcon scriptIcon;
- private ImageIcon containerIcon;
-
- public ScriptTreeRenderer() {
- sofficeIcon = new ImageIcon(getClass().getResource("soffice.gif"));
- scriptIcon = new ImageIcon(getClass().getResource("script.gif"));
- containerIcon = new ImageIcon(getClass().getResource("container.gif"));
- }
-
- public Component getTreeCellRendererComponent(
- JTree tree,
- Object value,
- boolean sel,
- boolean expanded,
- boolean leaf,
- int row,
- boolean hasFocus) {
-
- super.getTreeCellRendererComponent(
- tree, value, sel,
- expanded, leaf, row,
- hasFocus);
-
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
- XBrowseNode xbn = (XBrowseNode)node.getUserObject();
- if (xbn.getType() == BrowseNodeTypes.SCRIPT) {
- setIcon(scriptIcon);
- }
- else if(xbn.getType() == BrowseNodeTypes.CONTAINER) {
- setIcon(containerIcon);
- }
- else if(xbn.getType() == BrowseNodeTypes.ROOT) {
- setIcon(sofficeIcon);
- }
-
- return this;
- }
-}
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gif b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gif
deleted file mode 100644
index 3a345f9b..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gif
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml
deleted file mode 100644
index 758fc3f6..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<parcel language="Java" xmlns:parcel="scripting.dtd">
- <script language="Java">
- <locale lang="en">
- <displayname value="Script Selector"/>
- <description>
- Example Script Selector shows how XBrowseNode API works
- </description>
- </locale>
- <functionname value="ScriptSelector.show"/>
- <logicalname value="ScriptSelector.show"/>
- <languagedepprops>
- <prop name="classpath" value="ScriptSelector.jar"/>
- </languagedepprops>
- </script>
-</parcel>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gif b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gif
deleted file mode 100644
index d3b3768c..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gif
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gif b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gif
deleted file mode 100644
index 88124d87..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gif
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml
deleted file mode 100755
index 6179e527..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<project default="build">
-
- <!-- =================== Global Properties ============================= -->
- <property environment="env"/>
- <property name="macroname" value="ScriptSelector"/>
- <property name="unopkgfile" value="${basedir}/${macroname}.uno.pkg"/>
-
- <!-- ==================== intialise properties ========================= -->
- <target name="checksdk">
- <condition property="UsingSDK">
- <available file="${env.OFFICE_PROGRAM_PATH}"/>
- </condition>
- </target>
-
- <target name="initsdk" if="UsingSDK">
- <property name="opp" value="${env.OFFICE_PROGRAM_PATH}"/>
- </target>
-
- <target name="initnosdk" unless="UsingSDK">
- <fail unless="opp" message="Path to Office install not set"/>
- </target>
-
- <!-- ==================== classpath setting ============================ -->
- <target name="init" depends="checksdk,initsdk,initnosdk">
- <path id="scriptclasspath">
- <pathelement location="${opp}/classes/unoil.jar"/>
- <pathelement location="${opp}/classes/ridl.jar"/>
- <pathelement location="${opp}/classes/jurt.jar"/>
- <pathelement location="${opp}/classes/juh.jar"/>
- <pathelement location="${opp}/classes/ScriptFramework.jar"/>
- </path>
- </target>
-
- <!-- ====================== Clean Generated Files ===================== -->
- <target name="clean">
- <delete>
- <fileset dir=".">
- <include name="**/*.class"/>
- <include name="**/*.jar"/>
- <include name="**/*.uno.pkg"/>
- </fileset>
- </delete>
- </target>
-
- <!-- ===================== Compile the script ========================= -->
- <target name="compile" depends="init">
- <javac srcdir="${macroname}" destdir="${macroname}"
- includes="**/*.java" classpathref="scriptclasspath"
- debug="on" optimize="on" deprecation="on"/>
- </target>
-
- <!-- ====================== Build UNO Package ========================= -->
- <target name="build" depends="compile">
- <delete file="${unopkgfile}"/>
-
- <jar jarfile="${macroname}/${macroname}.jar"
- basedir="${macroname}" includes="*.class,*.gif">
- </jar>
-
- <zip zipfile="${unopkgfile}">
- <fileset dir="${basedir}">
- <include name="**/*.jar"/>
- <include name="**/parcel-descriptor.xml"/>
- <include name="**/manifest.xml"/>
- </fileset>
- </zip>
- </target>
-
- <!-- ====================== Deploy Generated Files ==================== -->
- <target name="deploy" depends="build">
- <exec executable="${opp}/unopkg">
- <arg line="add"/>
- <arg line="--force"/>
- <arg path="${unopkgfile}"/>
- </exec>
- </target>
-
- <!-- ========================= All In One Build ======================= -->
- <target name="all" depends="clean,build,deploy"/>
-
-</project>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk b/odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk
deleted file mode 100644
index 615a8c13..00000000
--- a/odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-DESTSF=$(DESTDIRDEVGUIDEEXAMPLES)$/ScriptingFramework
-SF_FILES=\
- $(DESTSF)$/SayHello$/SayHello$/parcel-descriptor.xml \
- $(DESTSF)$/SayHello$/SayHello$/SayHello.java \
- $(DESTSF)$/SayHello$/Makefile \
- $(DESTSF)$/SayHello$/SayHello.odt \
- $(DESTSF)$/SayHello$/build.xml \
- $(DESTSF)$/SayHello$/META-INF$/manifest.xml \
- $(DESTSF)$/ScriptSelector$/ScriptSelector.odt \
- $(DESTSF)$/ScriptSelector$/Makefile \
- $(DESTSF)$/ScriptSelector$/build.xml \
- $(DESTSF)$/ScriptSelector$/META-INF$/manifest.xml \
- $(DESTSF)$/ScriptSelector$/ScriptSelector$/container.gif \
- $(DESTSF)$/ScriptSelector$/ScriptSelector$/script.gif \
- $(DESTSF)$/ScriptSelector$/ScriptSelector$/soffice.gif \
- $(DESTSF)$/ScriptSelector$/ScriptSelector$/ScriptSelector.java \
- $(DESTSF)$/ScriptSelector$/ScriptSelector$/parcel-descriptor.xml
-
-DIR_FILE_LIST= \
- $(SF_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_sf_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_sf.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
-
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/DataPilotReadme.txt b/odk/examples/DevelopersGuide/Spreadsheet/DataPilotReadme.txt
deleted file mode 100644
index 39aecb28..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/DataPilotReadme.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-ExampleDataPilotSource
-======================
-
-This example shows how you can implement an external DataPilot
-component.
-
-Simple usage scenario:
-======================
-1. build and deploay the component
-2. open a new spreadsheet document
-3. select for example cell B:2
-4. start the DataPilot dialog
- Data->DataPilot->Start...
-5. select "External source/interface -> Ok
-6. select the example DataPilot
- Use the the drop down list and select the service
- "ExampleDataPilotSource" -> Ok
-7. Place some number fields in the field areas
- For example:
- - select the "ones" field and drop it in the "Row Fields" area
- - repeat this step with the "tens" and "hundreds" field
- - select the "thousands" field and drop it in the "Column Fields"
- area.
- -> press Ok
-8. you see a matrix with rows and colums for the selected fields
- and a value area with a sum up of all fields valid for this
- coordinate. For example cell F:21=1221 (ones=B:21=1, tens=c:21=2
- hundreds=D:21=2 and thousands=F:3=1)
-
-
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components
deleted file mode 100644
index 6212c72d..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="ExampleAddIn.uno.jar">
- <implementation name="ExampleAddIn$_ExampleAddIn">
- <service name="com.sun.star.sheet.AddIn"/>
- <service name="org.openoffice.sheet.addin.ExampleAddIn"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
deleted file mode 100644
index 13278751..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
-{
- private String aName;
- private int nValue;
- private java.util.Vector aListeners = new java.util.Vector();
-
- public ExampleAddInResult( String aNewName )
- {
- aName = aNewName;
- }
-
- private com.sun.star.sheet.ResultEvent getResult()
- {
- com.sun.star.sheet.ResultEvent aEvent =
- new com.sun.star.sheet.ResultEvent();
- aEvent.Value = aName + " " + String.valueOf( nValue );
- aEvent.Source = this;
- return aEvent;
- }
-
- public void addResultListener(com.sun.star.sheet.XResultListener aListener)
- {
- aListeners.addElement( aListener );
-
- // immediately notify of initial value
- aListener.modified( getResult() );
- }
-
- public void removeResultListener(com.sun.star.sheet.XResultListener aListener)
- {
- aListeners.removeElement( aListener );
- }
-
- public void incrementValue()
- {
- ++nValue;
- com.sun.star.sheet.ResultEvent aEvent = getResult();
-
- java.util.Enumeration aEnum = aListeners.elements();
- while (aEnum.hasMoreElements())
- ((com.sun.star.sheet.XResultListener)aEnum.nextElement()).modified(
- aEvent);
- }
-}
-
-class ExampleAddInThread extends Thread
-{
- private java.util.Hashtable aCounters;
-
- public ExampleAddInThread( java.util.Hashtable aResults )
- {
- aCounters = aResults;
- }
-
- public void run()
- {
- while ( true )
- {
- try
- {
- sleep(1000);
- }
- catch( InterruptedException exception )
- {
- }
-
- // increment all counters
- java.util.Enumeration aEnum = aCounters.elements();
- while (aEnum.hasMoreElements())
- ((ExampleAddInResult)aEnum.nextElement()).incrementValue();
- }
- }
-}
-
-public class ExampleAddIn
-{
- static public class _ExampleAddIn extends com.sun.star.lib.uno.helper.WeakBase
- implements org.openoffice.sheet.addin.XExampleAddIn,
- com.sun.star.sheet.XAddIn,
- com.sun.star.lang.XServiceName,
- com.sun.star.lang.XServiceInfo
- {
- static private final String aExampleService = "org.openoffice.sheet.addin.ExampleAddIn";
- static private final String aAddInService = "com.sun.star.sheet.AddIn";
- static private final String aImplName = _ExampleAddIn.class.getName();
-
- private static final short FUNCTION_INVALID = -1;
- private static final short FUNCTION_INCREMENT = 0;
- private static final short FUNCTION_COUNTER = 1;
-
- private static final String[] aFunctionNames =
- {
- "getIncremented",
- "getCounter"
- };
- private static final String[] aDisplayFunctionNames =
- {
- "Increment",
- "Counter"
- };
- private static final String[] aDescriptions =
- {
- "Increments a value",
- "Returns a counter"
- };
- private static final String[] aFirstArgumentNames =
- {
- "Value",
- "Name"
- };
- private static final String[] aFirstArgumentDescriptions =
- {
- "The value that is incremented",
- "The name of the counter"
- };
-
- private com.sun.star.lang.Locale aFuncLocale;
- private java.util.Hashtable aResults;
-
- public _ExampleAddIn( com.sun.star.lang.XMultiServiceFactory xFactory )
- {
- }
-
- private int getFunctionID( String aProgrammaticFunctionName )
- {
- for ( int i = 0; i < aFunctionNames.length; i++ )
- if ( aProgrammaticFunctionName.equals(aFunctionNames[i]) )
- return i;
- return FUNCTION_INVALID;
- }
-
- // XExampleAddIn
-
- public int getIncremented( int nValue )
- {
- return nValue + 1;
- }
-
- public com.sun.star.sheet.XVolatileResult getCounter(String aName)
- {
- if ( aResults == null )
- {
- // create the table of results, and start a thread to increment
- // all counters
- aResults = new java.util.Hashtable();
- ExampleAddInThread aThread = new ExampleAddInThread( aResults );
- aThread.start();
- }
-
- ExampleAddInResult aResult = (ExampleAddInResult) aResults.get(aName);
- if ( aResult == null )
- {
- aResult = new ExampleAddInResult(aName);
- aResults.put( aName, aResult );
- }
- return aResult;
- }
-
- // XAddIn
-
- public String getProgrammaticFuntionName(String aDisplayName)
- {
- for ( int i = 0; i < aFunctionNames.length; i++ )
- if ( aDisplayName.equals(aDisplayFunctionNames[i]) )
- return aFunctionNames[i];
- return "";
- }
-
- public String getDisplayFunctionName(String aProgrammaticName)
- {
- int nFunction = getFunctionID( aProgrammaticName );
- return ( nFunction == FUNCTION_INVALID ) ? "" :
- aDisplayFunctionNames[nFunction];
- }
-
- public String getFunctionDescription(String aProgrammaticName)
- {
- int nFunction = getFunctionID( aProgrammaticName );
- return ( nFunction == FUNCTION_INVALID ) ? "" :
- aDescriptions[nFunction];
- }
-
- public String getDisplayArgumentName(String aProgrammaticFunctionName,
- int nArgument)
- {
- // both functions in this example only have a first argument
- int nFunction = getFunctionID( aProgrammaticFunctionName );
- return ( nFunction == FUNCTION_INVALID || nArgument != 0) ? "" :
- aFirstArgumentNames[nFunction];
- }
-
- public String getArgumentDescription(String aProgrammaticFunctionName,
- int nArgument )
- {
- // both functions in this example only have a first argument
- int nFunction = getFunctionID( aProgrammaticFunctionName );
- return ( nFunction == FUNCTION_INVALID || nArgument != 0) ? "" :
- aFirstArgumentDescriptions[nFunction];
- }
-
- public String getProgrammaticCategoryName(String aProgrammaticFunctionName)
- {
- return( "Add-In" );
- }
-
- public String getDisplayCategoryName(String aProgrammaticFunctionName)
- {
- return( "Add-In" );
- }
-
- // XLocalizable
-
- public void setLocale( com.sun.star.lang.Locale aLocale )
- {
- // the locale is stored and used for getLocale, but otherwise
- // ignored in this example
- aFuncLocale = aLocale;
- }
-
- public com.sun.star.lang.Locale getLocale()
- {
- return aFuncLocale;
- }
-
- // XServiceName
-
- public String getServiceName()
- {
- return aExampleService;
- }
-
- // XServiceInfo
-
- public String getImplementationName()
- {
- return aImplName;
- }
-
- public String[] getSupportedServiceNames()
- {
- String [] aSupportedServices = new String[ 2 ];
- aSupportedServices[ 0 ] = aExampleService;
- aSupportedServices[ 1 ] = aAddInService;
- return aSupportedServices;
- }
-
- public boolean supportsService( String aService )
- {
- return (aService.equals( aExampleService ) ||
- aService.equals( aAddInService ) );
- }
-
- }
-
-
- public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(
- String implName,
- com.sun.star.lang.XMultiServiceFactory multiFactory,
- com.sun.star.registry.XRegistryKey regKey)
- {
- com.sun.star.lang.XSingleServiceFactory xSingleServiceFactory = null;
- if ( implName.equals(_ExampleAddIn.aImplName) )
- xSingleServiceFactory =
- com.sun.star.comp.loader.FactoryHelper.getServiceFactory(
- _ExampleAddIn.class, _ExampleAddIn.aExampleService,
- multiFactory, regKey);
- return xSingleServiceFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey regKey)
-// {
-// // register for both the base AddIn and the own service
-// return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _ExampleAddIn.aImplName, _ExampleAddIn.aExampleService, regKey)
-// && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _ExampleAddIn.aImplName, _ExampleAddIn.aAddInService, regKey);
-// }
-}
-
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.ods b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.ods
deleted file mode 100644
index b86f2491..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.ods
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components
deleted file mode 100644
index f0881c1f..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="ExampleDataPilotSource.uno.jar">
- <implementation name="ExampleDataPilotSource$_ExampleDataPilotSource">
- <service name="com.sun.star.sheet.DataPilotSource"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
deleted file mode 100644
index b78e878e..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
+++ /dev/null
@@ -1,992 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// Example DataPilot source component
-
-// helper class to hold the settings
-
-class ExampleSettings
-{
- static public final int nDimensionCount = 6;
- static public final int nValueDimension = 4;
- static public final int nDataDimension = 5;
- static public final String [] aDimensionNames = {
- "ones", "tens", "hundreds", "thousands", "value", "" };
-
- static public final String getMemberName( int nMember )
- {
- return String.valueOf( nMember );
- }
-
- public int nMemberCount = 3;
- public java.util.List aColDimensions = new java.util.ArrayList();
- public java.util.List aRowDimensions = new java.util.ArrayList();
-}
-
-// XPropertySetInfo implementation for getPropertySetInfo
-
-class ExamplePropertySetInfo implements com.sun.star.beans.XPropertySetInfo
-{
- private com.sun.star.beans.Property[] aProperties;
-
- public ExamplePropertySetInfo( com.sun.star.beans.Property[] aProps )
- {
- aProperties = aProps;
- }
-
- public com.sun.star.beans.Property[] getProperties()
- {
- return aProperties;
- }
-
- public com.sun.star.beans.Property getPropertyByName( String aName )
- throws com.sun.star.beans.UnknownPropertyException
- {
- for ( int i=0; i<aProperties.length; i++ )
- if ( aProperties[i].Name.equals( aName ) )
- return aProperties[i];
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public boolean hasPropertyByName( String aName )
- {
- for ( int i=0; i<aProperties.length; i++ )
- if ( aProperties[i].Name.equals( aName ) )
- return true;
- return false;
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceMember
-
-class ExampleMember implements com.sun.star.container.XNamed,
- com.sun.star.beans.XPropertySet
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private int nMember;
-
- public ExampleMember( ExampleSettings aSet, int nDim, int nMbr )
- {
- aSettings = aSet;
- nDimension = nDim;
- nMember = nMbr;
- }
-
- // XNamed
-
- public String getName()
- {
- return ExampleSettings.getMemberName( nMember );
- }
-
- public void setName( String aName )
- {
- // ignored
- }
-
- // XPropertySet
-
- public com.sun.star.beans.XPropertySetInfo getPropertySetInfo()
- {
- return new ExamplePropertySetInfo( new com.sun.star.beans.Property[] {
- new com.sun.star.beans.Property( "IsVisible", -1,
- new com.sun.star.uno.Type( Boolean.class ), (short) 0),
- new com.sun.star.beans.Property( "ShowDetails", -1,
- new com.sun.star.uno.Type( Boolean.class ), (short) 0) });
- }
-
- public void setPropertyValue( String aPropertyName, Object aValue )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "IsVisible" ) ||
- aPropertyName.equals( "ShowDetails" ) )
- {
- // ignored
- }
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public Object getPropertyValue( String aPropertyName )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "IsVisible" ) ||
- aPropertyName.equals( "ShowDetails" ) )
- {
- return new Boolean( true ); // always true
- }
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public void addPropertyChangeListener(
- String aPropertyName, com.sun.star.beans.XPropertyChangeListener xListener)
- {
- }
- public void removePropertyChangeListener(
- String aPropertyName, com.sun.star.beans.XPropertyChangeListener aListener)
- {
- }
- public void addVetoableChangeListener(
- String PropertyName, com.sun.star.beans.XVetoableChangeListener aListener)
- {
- }
- public void removeVetoableChangeListener(
- String PropertyName, com.sun.star.beans.XVetoableChangeListener aListener)
- {
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceMembers
-
-class ExampleMembers implements com.sun.star.container.XNameAccess
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private ExampleMember[] aMembers;
-
- public ExampleMembers( ExampleSettings aSet, int nDim )
- {
- aSettings = aSet;
- nDimension = nDim;
- aMembers = new ExampleMember[ aSettings.nMemberCount ];
- }
-
- // XNameAccess
-
- public com.sun.star.uno.Type getElementType()
- {
- return new com.sun.star.uno.Type( com.sun.star.container.XNamed.class );
- }
-
- public boolean hasElements()
- {
- return true; // always has elements
- }
-
- public Object getByName( String aName )
- throws com.sun.star.container.NoSuchElementException
- {
- int nCount = aSettings.nMemberCount;
- for ( int i=0; i<nCount; i++ )
- if ( aName.equals( ExampleSettings.getMemberName( i ) ) )
- {
- if ( aMembers[i] == null )
- aMembers[i] = new ExampleMember( aSettings, nDimension, i );
- return aMembers[i];
- }
- throw new com.sun.star.container.NoSuchElementException();
- }
-
- public String[] getElementNames()
- {
- int nCount = aSettings.nMemberCount;
- String [] aNames = new String[ nCount ];
- for ( int i=0; i<nCount; i++ )
- aNames[i] = ExampleSettings.getMemberName( i );
- return aNames;
- }
-
- public boolean hasByName( String aName )
- {
- int nCount = aSettings.nMemberCount;
- for ( int i=0; i<nCount; i++ )
- if ( aName.equals( ExampleSettings.getMemberName( i ) ) )
- return true;
- return false;
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceLevel
-
-class ExampleLevel implements
- com.sun.star.container.XNamed,
- com.sun.star.sheet.XMembersSupplier,
- com.sun.star.sheet.XDataPilotMemberResults,
- com.sun.star.beans.XPropertySet
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private ExampleMembers aMembers;
-
- public ExampleLevel( ExampleSettings aSet, int nDim )
- {
- aSettings = aSet;
- nDimension = nDim;
- }
-
- // XNamed
-
- public String getName()
- {
- return ExampleSettings.aDimensionNames[ nDimension ];
- }
-
- public void setName( String aName )
- {
- // ignored
- }
-
- // XMembersSupplier
-
- public com.sun.star.container.XNameAccess getMembers()
- {
- if ( aMembers == null )
- aMembers = new ExampleMembers( aSettings, nDimension );
- return aMembers;
- }
-
- // XDataPilotMemberResults
-
- public com.sun.star.sheet.MemberResult[] getResults()
- {
- int nDimensions = 0;
- int nPosition = aSettings.aColDimensions.indexOf( new Integer(nDimension));
- if ( nPosition >= 0 )
- nDimensions = aSettings.aColDimensions.size();
- else
- {
- nPosition = aSettings.aRowDimensions.indexOf( new Integer(nDimension));
- if ( nPosition >= 0 )
- nDimensions = aSettings.aRowDimensions.size();
- }
-
- if ( nPosition < 0 )
- return new com.sun.star.sheet.MemberResult[0];
-
- int nMembers = aSettings.nMemberCount;
- int nRepeat = 1;
- int nFill = 1;
- for ( int i=0; i<nDimensions; i++ )
- {
- if ( i < nPosition )
- nRepeat *= nMembers;
- else if ( i > nPosition )
- nFill *= nMembers;
- }
- int nSize = nRepeat * nMembers * nFill;
-
- com.sun.star.sheet.MemberResult[] aResults =
- new com.sun.star.sheet.MemberResult[nSize];
- int nResultPos = 0;
- for (int nOuter=0; nOuter<nRepeat; nOuter++)
- {
- for (int nMember=0; nMember<nMembers; nMember++)
- {
- aResults[nResultPos] = new com.sun.star.sheet.MemberResult();
- aResults[nResultPos].Name = ExampleSettings.getMemberName(nMember);
- aResults[nResultPos].Caption = aResults[nResultPos].Name;
- aResults[nResultPos].Flags =
- com.sun.star.sheet.MemberResultFlags.HASMEMBER;
- ++nResultPos;
-
- for (int nInner=1; nInner<nFill; nInner++)
- {
- aResults[nResultPos] = new com.sun.star.sheet.MemberResult();
- aResults[nResultPos].Flags =
- com.sun.star.sheet.MemberResultFlags.CONTINUE;
- ++nResultPos;
- }
- }
- }
- return aResults;
- }
-
- // XPropertySet
-
- public com.sun.star.beans.XPropertySetInfo getPropertySetInfo()
- {
- return new ExamplePropertySetInfo( new com.sun.star.beans.Property[] {
- new com.sun.star.beans.Property( "SubTotals", -1,
- new com.sun.star.uno.Type(
- com.sun.star.sheet.GeneralFunction[].class ),
- (short) 0 ),
- new com.sun.star.beans.Property( "ShowEmpty", -1,
- new com.sun.star.uno.Type( Boolean.class ),
- (short) 0 ) } );
- }
-
- public void setPropertyValue( String aPropertyName, Object aValue )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "SubTotals" ) ||
- aPropertyName.equals( "ShowEmpty" ) )
- {
- // ignored
- }
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public Object getPropertyValue( String aPropertyName )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "SubTotals" ) )
- return new com.sun.star.sheet.GeneralFunction[0];
- else if ( aPropertyName.equals( "ShowEmpty" ) )
- return new Boolean( true );
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public void addPropertyChangeListener(
- String aPropertyName, com.sun.star.beans.XPropertyChangeListener xListener)
- {
- }
- public void removePropertyChangeListener(
- String aPropertyName, com.sun.star.beans.XPropertyChangeListener aListener)
- {
- }
- public void addVetoableChangeListener(
- String PropertyName, com.sun.star.beans.XVetoableChangeListener aListener)
- {
- }
- public void removeVetoableChangeListener(
- String PropertyName, com.sun.star.beans.XVetoableChangeListener aListener)
- {
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceLevels
-
-class ExampleLevels implements com.sun.star.container.XNameAccess
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private ExampleLevel aLevel;
-
- public ExampleLevels( ExampleSettings aSet, int nDim )
- {
- aSettings = aSet;
- nDimension = nDim;
- }
-
- // XNameAccess
-
- public com.sun.star.uno.Type getElementType()
- {
- return new com.sun.star.uno.Type( com.sun.star.container.XNamed.class );
- }
-
- public boolean hasElements()
- {
- return true; // always has elements
- }
-
- public Object getByName( String aName )
- throws com.sun.star.container.NoSuchElementException
- {
- // there's only one level with the same name as the dimension / hierarchy
- if ( aName.equals( ExampleSettings.aDimensionNames[nDimension] ) )
- {
- if ( aLevel == null )
- aLevel = new ExampleLevel( aSettings, nDimension );
- return aLevel;
- }
- throw new com.sun.star.container.NoSuchElementException();
- }
-
- public String[] getElementNames()
- {
- String [] aNames = new String[ 1 ];
- aNames[0] = ExampleSettings.aDimensionNames[nDimension];
- return aNames;
- }
-
- public boolean hasByName( String aName )
- {
- return aName.equals( ExampleSettings.aDimensionNames[nDimension] );
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceHierarchy
-
-class ExampleHierarchy implements com.sun.star.container.XNamed,
- com.sun.star.sheet.XLevelsSupplier
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private ExampleLevels aLevels;
-
- public ExampleHierarchy( ExampleSettings aSet, int nDim )
- {
- aSettings = aSet;
- nDimension = nDim;
- }
-
- // XNamed
-
- public String getName()
- {
- return ExampleSettings.aDimensionNames[ nDimension ];
- }
-
- public void setName( String aName )
- {
- // ignored
- }
-
- // XLevelsSupplier
-
- public com.sun.star.container.XNameAccess getLevels()
- {
- if ( aLevels == null )
- aLevels = new ExampleLevels( aSettings, nDimension );
- return aLevels;
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceHierarchies
-
-class ExampleHierarchies implements com.sun.star.container.XNameAccess
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private ExampleHierarchy aHierarchy;
-
- public ExampleHierarchies( ExampleSettings aSet, int nDim )
- {
- aSettings = aSet;
- nDimension = nDim;
- }
-
- // XNameAccess
-
- public com.sun.star.uno.Type getElementType()
- {
- return new com.sun.star.uno.Type( com.sun.star.container.XNamed.class );
- }
-
- public boolean hasElements()
- {
- return true; // always has elements
- }
-
- public Object getByName( String aName )
- throws com.sun.star.container.NoSuchElementException
- {
- // there's only one hierarchy with the same name as the dimension
- if ( aName.equals( ExampleSettings.aDimensionNames[nDimension] ) )
- {
- if ( aHierarchy == null )
- aHierarchy = new ExampleHierarchy( aSettings, nDimension );
- return aHierarchy;
- }
- throw new com.sun.star.container.NoSuchElementException();
- }
-
- public String[] getElementNames()
- {
- String [] aNames = new String[ 1 ];
- aNames[0] = ExampleSettings.aDimensionNames[nDimension];
- return aNames;
- }
-
- public boolean hasByName( String aName )
- {
- return aName.equals( ExampleSettings.aDimensionNames[nDimension] );
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceDimension
-
-class ExampleDimension implements
- com.sun.star.container.XNamed,
- com.sun.star.sheet.XHierarchiesSupplier,
- com.sun.star.util.XCloneable,
- com.sun.star.beans.XPropertySet
-{
- private ExampleSettings aSettings;
- private int nDimension;
- private ExampleHierarchies aHierarchies;
- private com.sun.star.sheet.DataPilotFieldOrientation eOrientation;
-
- public ExampleDimension( ExampleSettings aSet, int nDim )
- {
- aSettings = aSet;
- nDimension = nDim;
- eOrientation = ( nDim == ExampleSettings.nValueDimension ) ?
- com.sun.star.sheet.DataPilotFieldOrientation.DATA :
- com.sun.star.sheet.DataPilotFieldOrientation.HIDDEN;
- }
-
- // XNamed
-
- public String getName()
- {
- return ExampleSettings.aDimensionNames[ nDimension ];
- }
-
- public void setName( String aName )
- {
- // ignored
- }
-
- // XHierarchiesSupplier
-
- public com.sun.star.container.XNameAccess getHierarchies()
- {
- if ( aHierarchies == null )
- aHierarchies = new ExampleHierarchies( aSettings, nDimension );
- return aHierarchies;
- }
-
- // XCloneable
-
- public com.sun.star.util.XCloneable createClone()
- {
- return null; // not supported
- }
-
- // XPropertySet
-
- public com.sun.star.beans.XPropertySetInfo getPropertySetInfo()
- {
- return new ExamplePropertySetInfo( new com.sun.star.beans.Property[] {
- new com.sun.star.beans.Property( "Original", -1,
- new com.sun.star.uno.Type( com.sun.star.container.XNamed.class),
- (short) com.sun.star.beans.PropertyAttribute.READONLY ),
- new com.sun.star.beans.Property( "IsDataLayoutDimension", -1,
- new com.sun.star.uno.Type( Boolean.class),
- (short) com.sun.star.beans.PropertyAttribute.READONLY ),
- new com.sun.star.beans.Property( "Orientation", -1,
- new com.sun.star.uno.Type(
- com.sun.star.sheet.DataPilotFieldOrientation.class), (short) 0),
- new com.sun.star.beans.Property( "Position", -1,
- new com.sun.star.uno.Type( Integer.class ), (short) 0),
- new com.sun.star.beans.Property( "Function", -1,
- new com.sun.star.uno.Type(com.sun.star.sheet.GeneralFunction.class),
- (short) 0 ),
- new com.sun.star.beans.Property( "UsedHierarchy", -1,
- new com.sun.star.uno.Type( Integer.class ), (short) 0 ),
- new com.sun.star.beans.Property( "Filter", -1,
- new com.sun.star.uno.Type(
- com.sun.star.sheet.TableFilterField[].class), (short) 0) });
- }
-
- public void setPropertyValue( String aPropertyName, Object aValue )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "Orientation" ) )
- {
- com.sun.star.sheet.DataPilotFieldOrientation eNewOrient =
- (com.sun.star.sheet.DataPilotFieldOrientation) aValue;
- if ( nDimension != ExampleSettings.nValueDimension &&
- nDimension != ExampleSettings.nDataDimension &&
- eNewOrient != com.sun.star.sheet.DataPilotFieldOrientation.DATA )
- {
- // remove from list for old orientation and add for new one
- Integer aDimInt = new Integer(nDimension);
- if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN )
- aSettings.aColDimensions.remove( aDimInt );
- else if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.ROW )
- aSettings.aRowDimensions.remove( aDimInt );
- if ( eNewOrient == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN )
- aSettings.aColDimensions.add( aDimInt );
- else if ( eNewOrient == com.sun.star.sheet.DataPilotFieldOrientation.ROW )
- aSettings.aRowDimensions.add( aDimInt );
-
- // change orientation
- eOrientation = eNewOrient;
- }
- }
- else if ( aPropertyName.equals( "Position" ) )
- {
- int nNewPos = ((Integer) aValue).intValue();
- Integer aDimInt = new Integer(nDimension);
- if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN )
- {
- aSettings.aColDimensions.remove( aDimInt );
- aSettings.aColDimensions.add( nNewPos, aDimInt );
- }
- else if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.ROW )
- {
- aSettings.aRowDimensions.remove( aDimInt );
- aSettings.aRowDimensions.add( nNewPos, aDimInt );
- }
- }
- else if ( aPropertyName.equals( "Function" ) || aPropertyName.equals( "UsedHierarchy" ) ||
- aPropertyName.equals( "Filter" ) )
- {
- // ignored
- }
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public Object getPropertyValue( String aPropertyName )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "Original" ) )
- return null;
- else if ( aPropertyName.equals( "IsDataLayoutDimension" ) )
- return new Boolean( nDimension == ExampleSettings.nDataDimension );
- else if ( aPropertyName.equals( "Orientation" ) )
- return eOrientation;
- else if ( aPropertyName.equals( "Position" ) )
- {
- int nPosition;
- if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.COLUMN )
- nPosition = aSettings.aColDimensions.indexOf( new Integer(nDimension) );
- else if ( eOrientation == com.sun.star.sheet.DataPilotFieldOrientation.ROW )
- nPosition = aSettings.aRowDimensions.indexOf( new Integer(nDimension) );
- else
- nPosition = nDimension;
- return new Integer( nPosition );
- }
- else if ( aPropertyName.equals( "Function" ) )
- return com.sun.star.sheet.GeneralFunction.SUM;
- else if ( aPropertyName.equals( "UsedHierarchy" ) )
- return new Integer(0);
- else if ( aPropertyName.equals( "Filter" ) )
- return new com.sun.star.sheet.TableFilterField[0];
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public void addPropertyChangeListener(
- String aPropertyName, com.sun.star.beans.XPropertyChangeListener xListener)
- {
- }
- public void removePropertyChangeListener(
- String aPropertyName, com.sun.star.beans.XPropertyChangeListener aListener)
- {
- }
- public void addVetoableChangeListener(
- String PropertyName, com.sun.star.beans.XVetoableChangeListener aListener)
- {
- }
- public void removeVetoableChangeListener(
- String PropertyName, com.sun.star.beans.XVetoableChangeListener aListener)
- {
- }
-}
-
-// implementation of com.sun.star.sheet.DataPilotSourceDimensions
-
-class ExampleDimensions implements com.sun.star.container.XNameAccess
-{
- private ExampleSettings aSettings;
- private ExampleDimension[] aDimensions;
-
- public ExampleDimensions( ExampleSettings aSet )
- {
- aSettings = aSet;
- }
-
- // XNameAccess
-
- public com.sun.star.uno.Type getElementType()
- {
- return new com.sun.star.uno.Type( com.sun.star.container.XNamed.class );
- }
-
- public boolean hasElements()
- {
- return true; // always has elements
- }
-
- public Object getByName( String aName )
- throws com.sun.star.container.NoSuchElementException
- {
- for (int i=0; i<ExampleSettings.nDimensionCount; i++)
- if ( aName.equals( ExampleSettings.aDimensionNames[i] ) )
- {
- if ( aDimensions == null )
- aDimensions = new ExampleDimension[ ExampleSettings.nDimensionCount ];
- if ( aDimensions[i] == null )
- aDimensions[i] = new ExampleDimension( aSettings, i );
- return aDimensions[i];
- }
- throw new com.sun.star.container.NoSuchElementException();
- }
-
- public String[] getElementNames()
- {
- String [] aNames = new String[ ExampleSettings.nDimensionCount ];
- for (int i=0; i<ExampleSettings.nDimensionCount; i++)
- aNames[ i ] = ExampleSettings.aDimensionNames[i];
- return aNames;
- }
-
- public boolean hasByName( String aName )
- {
- for (int i=0; i<ExampleSettings.nDimensionCount; i++)
- if ( aName.equals( ExampleSettings.aDimensionNames[i] ) )
- return true;
- return false;
- }
-}
-
-// outer class for service implementation
-
-public class ExampleDataPilotSource
-{
- // implementation of com.sun.star.sheet.DataPilotSource
-
- static public class _ExampleDataPilotSource implements
- com.sun.star.sheet.XDimensionsSupplier,
- com.sun.star.sheet.XDataPilotResults,
- com.sun.star.util.XRefreshable,
- com.sun.star.beans.XPropertySet,
- com.sun.star.lang.XInitialization,
- com.sun.star.lang.XServiceInfo
- {
- static private final String aServiceName = "com.sun.star.sheet.DataPilotSource";
- static private final String aImplName = _ExampleDataPilotSource.class.getName();
-
- private ExampleSettings aSettings = new ExampleSettings();
- private ExampleDimensions aDimensions;
-
- public _ExampleDataPilotSource( com.sun.star.lang.XMultiServiceFactory xFactory )
- {
- }
-
- // XInitialization
-
- public void initialize( Object[] aArguments )
- {
- // If the first argument (Source) is a number between 2 and 10,
- // use it as member count, otherwise keep the default value.
- try
- {
- if ( aArguments.length >= 1 )
- {
- String aSource = com.sun.star.uno.AnyConverter.toString(aArguments[0]);
- if ( aSource != null && aSource.length() > 0)
- {
- int nValue = Integer.parseInt( aSource );
- if ( nValue >= 2 && nValue <= 10 )
- aSettings.nMemberCount = nValue;
- }
- }
- }
- catch ( NumberFormatException e )
- {
- System.out.println( "Error: caught exception in " +
- "ExampleDataPilotSource.initialize!\nException Message = "
- + e.getMessage());
- e.printStackTrace();
- }
- catch ( com.sun.star.lang.IllegalArgumentException e )
- {
- System.out.println( "Error: caught exception in " +
- "ExampleDataPilotSource.initialize!\nException Message = "
- + e.getMessage());
- e.printStackTrace();
- }
- }
-
- // XDataPilotResults
-
- public com.sun.star.sheet.DataResult[][] getResults()
- {
- int[] nDigits = new int[ExampleSettings.nDimensionCount];
- int nValue = 1;
- for (int i=0; i<ExampleSettings.nDimensionCount; i++)
- {
- nDigits[i] = nValue;
- nValue *= 10;
- }
-
- int nMemberCount = aSettings.nMemberCount;
- int nRowDimCount = aSettings.aRowDimensions.size();
- int nColDimCount = aSettings.aColDimensions.size();
-
- int nRows = 1;
- for (int i=0; i<nRowDimCount; i++)
- nRows *= nMemberCount;
- int nColumns = 1;
- for (int i=0; i<nColDimCount; i++)
- nColumns *= nMemberCount;
-
- com.sun.star.sheet.DataResult[][] aResults = new com.sun.star.sheet.DataResult[nRows][];
- for (int nRow=0; nRow<nRows; nRow++)
- {
- int nRowVal = nRow;
- int nRowResult = 0;
- for (int nRowDim=0; nRowDim<nRowDimCount; nRowDim++)
- {
- int nDim = ((Integer)aSettings.aRowDimensions.get(nRowDimCount-nRowDim-1)).intValue();
- nRowResult += ( nRowVal % nMemberCount ) * nDigits[nDim];
- nRowVal /= nMemberCount;
- }
-
- aResults[nRow] = new com.sun.star.sheet.DataResult[nColumns];
- for (int nCol=0; nCol<nColumns; nCol++)
- {
- int nColVal = nCol;
- int nResult = nRowResult;
- for (int nColDim=0; nColDim<nColDimCount; nColDim++)
- {
- int nDim = ((Integer)aSettings.aColDimensions.get(nColDimCount-nColDim-1)).intValue();
- nResult += ( nColVal % nMemberCount ) * nDigits[nDim];
- nColVal /= nMemberCount;
- }
-
- aResults[nRow][nCol] = new com.sun.star.sheet.DataResult();
- aResults[nRow][nCol].Flags = com.sun.star.sheet.DataResultFlags.HASDATA;
- aResults[nRow][nCol].Value = nResult;
- }
- }
- return aResults;
- }
-
- // XDimensionsSupplier
-
- public com.sun.star.container.XNameAccess getDimensions()
- {
- if ( aDimensions == null )
- aDimensions = new ExampleDimensions( aSettings );
- return aDimensions;
- }
-
- // XPropertySet
-
- public com.sun.star.beans.XPropertySetInfo getPropertySetInfo()
- {
- return new ExamplePropertySetInfo( new com.sun.star.beans.Property[] {
- new com.sun.star.beans.Property( "ColumnGrand", -1,
- new com.sun.star.uno.Type( Boolean.class ), (short) 0),
- new com.sun.star.beans.Property( "RowGrand", -1,
- new com.sun.star.uno.Type( Boolean.class ), (short) 0) });
- }
-
- public void setPropertyValue( String aPropertyName, Object aValue )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "ColumnGrand" ) ||
- aPropertyName.equals( "RowGrand" ) )
- {
- // ignored
- }
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public Object getPropertyValue( String aPropertyName )
- throws com.sun.star.beans.UnknownPropertyException
- {
- if ( aPropertyName.equals( "ColumnGrand" ) ||
- aPropertyName.equals( "RowGrand" ) )
- {
- return new Boolean( false ); // always false
- }
- else
- throw new com.sun.star.beans.UnknownPropertyException();
- }
-
- public void addPropertyChangeListener(
- String aPropertyName,
- com.sun.star.beans.XPropertyChangeListener xListener )
- {
- }
- public void removePropertyChangeListener(
- String aPropertyName,
- com.sun.star.beans.XPropertyChangeListener aListener )
- {
- }
- public void addVetoableChangeListener(
- String PropertyName,
- com.sun.star.beans.XVetoableChangeListener aListener )
- {
- }
- public void removeVetoableChangeListener(
- String PropertyName,
- com.sun.star.beans.XVetoableChangeListener aListener )
- {
- }
-
- // XRefreshable
-
- public void refresh()
- {
- }
- public void addRefreshListener( com.sun.star.util.XRefreshListener l )
- {
- }
- public void removeRefreshListener( com.sun.star.util.XRefreshListener l )
- {
- }
-
- // XServiceInfo
-
- public String getImplementationName()
- {
- return aImplName;
- }
-
- public String[] getSupportedServiceNames()
- {
- String [] aSupportedServices = new String[ 1 ];
- aSupportedServices[ 0 ] = aServiceName;
- return aSupportedServices;
- }
-
- public boolean supportsService( String aService )
- {
- return aService.equals( aServiceName );
- }
- }
-
- public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(
- String implName,
- com.sun.star.lang.XMultiServiceFactory multiFactory,
- com.sun.star.registry.XRegistryKey regKey)
- {
- com.sun.star.lang.XSingleServiceFactory xSingleServiceFactory = null;
-
- if ( implName.equals(_ExampleDataPilotSource.aImplName) )
- xSingleServiceFactory =
- com.sun.star.comp.loader.FactoryHelper.getServiceFactory(
- _ExampleDataPilotSource.class,
- _ExampleDataPilotSource.aServiceName, multiFactory, regKey);
-
- return xSingleServiceFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(
-// com.sun.star.registry.XRegistryKey regKey)
-// {
-// return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
-// _ExampleDataPilotSource.aImplName,
-// _ExampleDataPilotSource.aServiceName, regKey);
-// }
-}
-
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java
deleted file mode 100644
index 3307e18a..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.RuntimeException;
-
-
-// __________ implementation ____________________________________
-
-/** Create a spreadsheet document and provide access to table contents.
- */
-public class GeneralTableSample extends SpreadsheetDocHelper
-{
-
-// ________________________________________________________________
-
- public static void main( String args[] )
- {
- try
- {
- GeneralTableSample aSample = new GeneralTableSample( args );
- aSample.doSampleFunction();
- }
- catch (Exception ex)
- {
- System.out.println( "Error: Sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- System.exit( 1 );
- }
-
- System.out.println( "Sample done." );
- System.exit( 0 );
- }
-
-// ________________________________________________________________
-
- /// This sample function modifies cells and cell ranges.
- public void doSampleFunction() throws RuntimeException, Exception
- {
- // for common usage
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
- com.sun.star.beans.XPropertySet xPropSet = null;
- com.sun.star.table.XCell xCell = null;
- com.sun.star.table.XCellRange xCellRange = null;
-
- // *** Access and modify a VALUE CELL ***
- System.out.println( "*** Sample for service table.Cell ***" );
-
- xCell = xSheet.getCellByPosition( 0, 0 );
- // Set cell value.
- xCell.setValue( 1234 );
-
- // Get cell value.
- double nDblValue = xCell.getValue() * 2;
- xSheet.getCellByPosition( 0, 1 ).setValue( nDblValue );
-
- // *** Create a FORMULA CELL and query error type ***
- xCell = xSheet.getCellByPosition( 0, 2 );
- // Set formula string.
- xCell.setFormula( "=1/0" );
-
- // Get error type.
- boolean bValid = (xCell.getError() == 0);
- // Get formula string.
- String aText = "The formula " + xCell.getFormula() + " is ";
- aText += bValid ? "valid." : "erroneous.";
-
- // *** Insert a TEXT CELL using the XText interface ***
- xCell = xSheet.getCellByPosition( 0, 3 );
- com.sun.star.text.XText xCellText = (com.sun.star.text.XText)
- UnoRuntime.queryInterface( com.sun.star.text.XText.class, xCell );
- com.sun.star.text.XTextCursor xTextCursor = xCellText.createTextCursor();
- xCellText.insertString( xTextCursor, aText, false );
-
- // *** Change cell properties ***
- int nValue = bValid ? 0x00FF00 : 0xFF4040;
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( nValue ) );
-
-
- // *** Accessing a CELL RANGE ***
- System.out.println( "*** Sample for service table.CellRange ***" );
-
- // Accessing a cell range over its position.
- xCellRange = xSheet.getCellRangeByPosition( 2, 0, 3, 1 );
-
- // Change properties of the range.
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x8080FF ) );
-
- // Accessing a cell range over its name.
- xCellRange = xSheet.getCellRangeByName( "C4:D5" );
-
- // Change properties of the range.
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( 0xFFFF80 ) );
-
-
- // *** Using the CELL CURSOR to add some data below of the filled area ***
- System.out.println( "*** Sample for service table.CellCursor ***" );
-
- // Create a cursor using the XSpreadsheet method createCursorByRange()
- xCellRange = xSheet.getCellRangeByName( "A1" );
- com.sun.star.sheet.XSheetCellRange xSheetCellRange = (com.sun.star.sheet.XSheetCellRange)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetCellRange.class, xCellRange );
-
- com.sun.star.sheet.XSheetCellCursor xSheetCellCursor =
- xSheet.createCursorByRange( xSheetCellRange );
- com.sun.star.table.XCellCursor xCursor = (com.sun.star.table.XCellCursor)
- UnoRuntime.queryInterface( com.sun.star.table.XCellCursor.class, xSheetCellCursor );
-
- // Move to the last filled cell.
- xCursor.gotoEnd();
- // Move one row down.
- xCursor.gotoOffset( 0, 1 );
- xCursor.getCellByPosition( 0, 0 ).setFormula( "Beyond of the last filled cell." );
-
-
- // *** Modifying COLUMNS and ROWS ***
- System.out.println( "*** Sample for services table.TableRows and table.TableColumns ***" );
-
- com.sun.star.table.XColumnRowRange xCRRange = (com.sun.star.table.XColumnRowRange)
- UnoRuntime.queryInterface( com.sun.star.table.XColumnRowRange.class, xSheet );
- com.sun.star.table.XTableColumns xColumns = xCRRange.getColumns();
- com.sun.star.table.XTableRows xRows = xCRRange.getRows();
-
- // Get column C by index (interface XIndexAccess).
- Object aColumnObj = xColumns.getByIndex( 2 );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aColumnObj );
- xPropSet.setPropertyValue( "Width", new Integer( 5000 ) );
-
- // Get the name of the column.
- com.sun.star.container.XNamed xNamed = (com.sun.star.container.XNamed)
- UnoRuntime.queryInterface( com.sun.star.container.XNamed.class, aColumnObj );
- aText = "The name of this column is " + xNamed.getName() + ".";
- xSheet.getCellByPosition( 2, 2 ).setFormula( aText );
-
- // Get column D by name (interface XNameAccess).
- com.sun.star.container.XNameAccess xColumnsName = (com.sun.star.container.XNameAccess)
- UnoRuntime.queryInterface( com.sun.star.container.XNameAccess.class, xColumns );
-
- aColumnObj = xColumnsName.getByName( "D" );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aColumnObj );
- xPropSet.setPropertyValue( "IsVisible", new Boolean( false ) );
-
- // Get row 7 by index (interface XIndexAccess)
- Object aRowObj = xRows.getByIndex( 6 );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aRowObj );
- xPropSet.setPropertyValue( "Height", new Integer( 5000 ) );
-
- xSheet.getCellByPosition( 2, 6 ).setFormula( "What a big cell." );
-
- // Create a cell series with the values 1 ... 7.
- for (int nRow = 8; nRow < 15; ++nRow)
- xSheet.getCellByPosition( 0, nRow ).setValue( nRow - 7 );
- // Insert a row between 1 and 2
- xRows.insertByIndex( 9, 1 );
- // Delete the rows with the values 3 and 4.
- xRows.removeByIndex( 11, 2 );
-
- // *** Inserting CHARTS ***
- System.out.println( "*** Sample for service table.TableCharts ***" );
-
- com.sun.star.table.XTableChartsSupplier xChartsSupp =
- (com.sun.star.table.XTableChartsSupplier) UnoRuntime.queryInterface(
- com.sun.star.table.XTableChartsSupplier.class, xSheet );
- com.sun.star.table.XTableCharts xCharts = xChartsSupp.getCharts();
-
- // The chart will base on the last cell series, initializing all values.
- String aName = "newChart";
- com.sun.star.awt.Rectangle aRect = new com.sun.star.awt.Rectangle();
- aRect.X = 10000;
- aRect.Y = 3000;
- aRect.Width = aRect.Height = 5000;
- com.sun.star.table.CellRangeAddress[] aRanges = new com.sun.star.table.CellRangeAddress[1];
- aRanges[0] = createCellRangeAddress( xSheet, "A9:A14" );
-
- // Create the chart.
- xCharts.addNewByName( aName, aRect, aRanges, false, false );
-
- // Get the chart by name.
- Object aChartObj = xCharts.getByName( aName );
- com.sun.star.table.XTableChart xChart = (com.sun.star.table.XTableChart)
- UnoRuntime.queryInterface( com.sun.star.table.XTableChart.class, aChartObj );
-
- // Query the state of row and column headers.
- aText = "Chart has column headers: ";
- aText += xChart.getHasColumnHeaders() ? "yes" : "no";
- xSheet.getCellByPosition( 2, 8 ).setFormula( aText );
- aText = "Chart has row headers: ";
- aText += xChart.getHasRowHeaders() ? "yes" : "no";
- xSheet.getCellByPosition( 2, 9 ).setFormula( aText );
- }
-
-// ________________________________________________________________
-
- public GeneralTableSample( String[] args )
- {
- super( args );
- }
-
-// ________________________________________________________________
-}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/Makefile b/odk/examples/DevelopersGuide/Spreadsheet/Makefile
deleted file mode 100644
index 84fdd943..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/Makefile
+++ /dev/null
@@ -1,310 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the SpreadSheet examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=DevGuideSpreadsheetExamples
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-# Example add-in component
-COMP1_NAME=ExampleAddIn
-COMP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP1_NAME)
-COMP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP1_NAME)
-COMP1_RDB_NAME=$(COMP1_NAME).uno.rdb
-COMP1_RDB=$(COMP1_GEN_OUT)/$(COMP1_RDB_NAME)
-COMP1_PACKAGE=$(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT)
-COMP1_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)")
-COMP1_JAR_NAME=$(COMP1_NAME).uno.jar
-COMP1_JAR=$(SAMPLE_CLASS_OUT)/$(COMP1_JAR_NAME)
-COMP1_MANIFESTFILE=$(COMP1_GEN_OUT)/$(COMP1_NAME).uno.Manifest
-COMP1_UNOPKG_MANIFEST=$(COMP1_GEN_OUT)/$(COMP1_NAME)/META-INF/manifest.xml
-COMP1_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag
-COMP1_COMPONENTS=$(COMP1_NAME).components
-
-# Example DataPilot component
-COMP2_NAME=ExampleDataPilotSource
-COMP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP2_NAME)
-COMP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP2_NAME)
-COMP2_PACKAGE=$(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT)
-COMP2_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)")
-COMP2_JAR_NAME=$(COMP2_NAME).uno.jar
-COMP2_JAR=$(SAMPLE_CLASS_OUT)/$(COMP2_JAR_NAME)
-COMP2_MANIFESTFILE=$(COMP2_GEN_OUT)/$(COMP2_NAME).uno.Manifest
-COMP2_UNOPKG_MANIFEST=$(COMP2_GEN_OUT)/$(COMP2_NAME)/META-INF/manifest.xml
-COMP2_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag
-COMP2_COMPONENTS=$(COMP2_NAME).components
-
-#REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(SAMPLE_NAME)_register_component.flag
-
-APP1_NAME=GeneralTableSample
-APP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME)
-APP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME)
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-
-APP2_NAME=SpreadsheetSample
-APP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP2_NAME)
-APP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP2_NAME)
-APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
-
-APP3_NAME=ViewSample
-APP3_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP3_NAME)
-APP3_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP3_NAME)
-APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
-
-
-COMP1_IDLFILES = XExampleAddIn.idl
-
-# normally the idl file should be stored in a directory tree fitting the
-# module structure, for the example we know the module structure
-PACKAGE = org/openoffice/sheet/addin
-
-COMP1_JAVAFILES = \
- ExampleAddIn.java
-
-COMP2_JAVAFILES = \
- ExampleDataPilotSource.java
-
-APP_JAVAFILES = \
- SpreadsheetDocHelper.java
-
-APP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES))
-APP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES))
-
-COMP1_GENCLASSFILES = $(patsubst %.idl,$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class,$(COMP1_IDLFILES))
-COMP1_GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(COMP1_IDLFILES)))
-COMP1_GENURDFILES = $(patsubst %.idl,$(COMP1_GEN_OUT)/%.urd,$(COMP1_IDLFILES))
-
-COMP1_CLASSFILES = $(patsubst %.java,$(COMP1_CLASS_OUT)/%.class,$(COMP1_JAVAFILES))
-
-COMP2_CLASSFILES = $(patsubst %.java,$(COMP2_CLASS_OUT)/%.class,$(COMP2_JAVAFILES))
-
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP1_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP2_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP1_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP2_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP3_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@
- @echo RegistrationClassName: $(basename $(basename $(@F)))>> $@
-
-# IDLs only for component 1 relevant
-$(COMP1_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -I. -I$(IDL_DIR) -O$(COMP1_GEN_OUT) $^
-
-$(COMP1_RDB) : $(COMP1_GENURDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $<
-
-$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class : $(COMP1_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(COMP1_GENTYPELIST) -O$(COMP1_CLASS_OUT) $(COMP1_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-$(COMP1_CLASSFILES) : $(COMP1_JAVAFILES) $(COMP1_GENCLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP1_CLASS_OUT) $(COMP1_JAVAFILES)
-
-$(COMP2_CLASSFILES) : $(COMP2_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP2_CLASS_OUT) $^
-
-$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(COMP1_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP1_CLASS_OUT) .
-
-$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(COMP2_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP2_CLASS_OUT) .
-
-$(COMP1_UNOPKG_MANIFEST) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP1_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP2_UNOPKG_MANIFEST) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP2_COMPONENTS)$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS)
- echo "####" $(@)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP1_COMPONENTS)
- cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP1_JAR_NAME)
- cd $(subst /,$(PS),$(COMP1_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP2_COMPONENTS)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(COMP2_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml
-
-$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)")
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag : $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)")
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(APP_CLASSFILES) : $(APP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES)
-
-$(APP1_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $<
-
-$(APP2_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP2_CLASS_OUT) $<
-
-$(APP3_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP3_CLASS_OUT) $<
-
-$(SAMPLE_GEN_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $(basename $(@F))>> $@
-
-$(APP1_JAR) : $(APP1_GEN_OUT)/$(APP1_NAME).mf $(APP1_CLASS_OUT)/$(APP1_NAME).class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES)
-
-$(APP2_JAR) : $(APP2_GEN_OUT)/$(APP2_NAME).mf $(APP2_CLASS_OUT)/$(APP2_NAME).class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP2_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES)
-
-$(APP3_JAR) : $(APP3_GEN_OUT)/$(APP3_NAME).mf $(APP3_CLASS_OUT)/$(APP3_NAME).class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +$(SDK_JAR) cvfm $@ $< -C $(APP3_CLASS_OUT) .
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES)
-
-$(SAMPLE_NAME) : $(COMP1_REGISTERFLAG) $(COMP2_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo --------
- @echo The "$(QM)$(COMP1_NAME)$(QM)" and "$(QM)$(COMP2_NAME)$(QM)" component are installed if
- @echo SDK_AUTO_DEPLOYMENT = YES. You can use this components inside your office
- @echo installation, see the example descriptions. You can also load the "$(QM)ExampleAddIn.ods$(QM)"
- @echo document to see how the add-in functions can be used. For more details about the
- @echo "$(QM)$(COMP2_NAME)$(QM)" component see the "$(QM)DataPilotReadme.txt"$(QM).
- @echo -
- @echo $(MAKE) ExampleAddIn.ods.load
- @echo --------------------------------------------------------------------------------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-ExampleAddIn.ods.load : $(COMP1_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java
deleted file mode 100644
index 734a6af8..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.comp.servicemanager.ServiceManager;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.RuntimeException;
-
-// __________ implementation ____________________________________
-
-/** This is a helper class for the spreadsheet and table samples.
- It connects to a running office and creates a spreadsheet document.
- Additionally it contains various helper functions.
- */
-public class SpreadsheetDocHelper
-{
-
-// __ private members ___________________________________________
-
- private final String msDataSheetName = "Data";
-
- private com.sun.star.uno.XComponentContext mxRemoteContext;
- private com.sun.star.lang.XMultiComponentFactory mxRemoteServiceManager;
-// private com.sun.star.lang.XMultiServiceFactory mxMSFactory;
- private com.sun.star.sheet.XSpreadsheetDocument mxDocument;
-
-// ________________________________________________________________
-
- public SpreadsheetDocHelper( String[] args )
- {
- // Connect to a running office and get the service manager
- connect();
-
- // Create a new spreadsheet document
- try
- {
- mxDocument = initDocument();
- }
- catch (Exception ex)
- {
- System.err.println( "Couldn't create document: " + ex );
- System.err.println( "Error: Couldn't create Document\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- System.exit( 1 );
- }
- }
-
-// __ helper methods ____________________________________________
-
- /** Returns the service manager of the connected office.
- @return XMultiComponentFactory interface of the service manager. */
- public com.sun.star.lang.XMultiComponentFactory getServiceManager()
- {
- return mxRemoteServiceManager;
- }
-
- /** Returns the component context of the connected office
- @return XComponentContext interface of the context. */
- public com.sun.star.uno.XComponentContext getContext()
- {
- return mxRemoteContext;
- }
-
- /** Returns the whole spreadsheet document.
- @return XSpreadsheetDocument interface of the document. */
- public com.sun.star.sheet.XSpreadsheetDocument getDocument()
- {
- return mxDocument;
- }
-
- /** Returns the spreadsheet with the specified index (0-based).
- @param nIndex The index of the sheet.
- @return XSpreadsheet interface of the sheet. */
- public com.sun.star.sheet.XSpreadsheet getSpreadsheet( int nIndex )
- {
- // Collection of sheets
- com.sun.star.sheet.XSpreadsheets xSheets = mxDocument.getSheets();
- com.sun.star.sheet.XSpreadsheet xSheet = null;
- try
- {
- com.sun.star.container.XIndexAccess xSheetsIA =
- (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XIndexAccess.class, xSheets );
- xSheet = (com.sun.star.sheet.XSpreadsheet) UnoRuntime.queryInterface(
- com.sun.star.sheet.XSpreadsheet.class, xSheetsIA.getByIndex(nIndex));
- }
- catch (Exception ex)
- {
- System.err.println( "Error: caught exception in getSpreadsheet()!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
- return xSheet;
- }
-
- /** Inserts a new empty spreadsheet with the specified name.
- @param aName The name of the new sheet.
- @param nIndex The insertion index.
- @return The XSpreadsheet interface of the new sheet. */
- public com.sun.star.sheet.XSpreadsheet insertSpreadsheet(
- String aName, short nIndex )
- {
- // Collection of sheets
- com.sun.star.sheet.XSpreadsheets xSheets = mxDocument.getSheets();
- com.sun.star.sheet.XSpreadsheet xSheet = null;
- try
- {
- xSheets.insertNewByName( aName, nIndex );
- xSheet = (com.sun.star.sheet.XSpreadsheet)
- UnoRuntime.queryInterface(com.sun.star.sheet.XSpreadsheet.class,
- xSheets.getByName( aName ));
- }
- catch (Exception ex)
- {
- System.err.println( "Error: caught exception in insertSpreadsheet()!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
- return xSheet;
- }
-
-// ________________________________________________________________
-// Methods to fill values into cells.
-
- /** Writes a double value into a spreadsheet.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCellName The address of the cell (or a named range).
- @param fValue The value to write into the cell. */
- public void setValue(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aCellName,
- double fValue ) throws RuntimeException, Exception
- {
- xSheet.getCellRangeByName( aCellName ).getCellByPosition( 0, 0 ).setValue( fValue );
- }
-
- /** Writes a formula into a spreadsheet.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCellName The address of the cell (or a named range).
- @param aFormula The formula to write into the cell. */
- public void setFormula(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aCellName,
- String aFormula ) throws RuntimeException, Exception
- {
- xSheet.getCellRangeByName( aCellName ).getCellByPosition( 0, 0 ).setFormula( aFormula );
- }
-
- /** Writes a date with standard date format into a spreadsheet.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCellName The address of the cell (or a named range).
- @param nDay The day of the date.
- @param nMonth The month of the date.
- @param nYear The year of the date. */
- public void setDate(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aCellName,
- int nDay, int nMonth, int nYear ) throws RuntimeException, Exception
- {
- // Set the date value.
- com.sun.star.table.XCell xCell = xSheet.getCellRangeByName( aCellName ).getCellByPosition( 0, 0 );
- String aDateStr = nMonth + "/" + nDay + "/" + nYear;
- xCell.setFormula( aDateStr );
-
- // Set standard date format.
- com.sun.star.util.XNumberFormatsSupplier xFormatsSupplier =
- (com.sun.star.util.XNumberFormatsSupplier) UnoRuntime.queryInterface(
- com.sun.star.util.XNumberFormatsSupplier.class, getDocument() );
- com.sun.star.util.XNumberFormatTypes xFormatTypes =
- (com.sun.star.util.XNumberFormatTypes) UnoRuntime.queryInterface(
- com.sun.star.util.XNumberFormatTypes.class, xFormatsSupplier.getNumberFormats() );
- int nFormat = xFormatTypes.getStandardFormat(
- com.sun.star.util.NumberFormat.DATE, new com.sun.star.lang.Locale() );
-
- com.sun.star.beans.XPropertySet xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell );
- xPropSet.setPropertyValue( "NumberFormat", new Integer( nFormat ) );
- }
-
- /** Draws a colored border around the range and writes the headline in the
- first cell.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aRange The address of the cell range (or a named range).
- @param aHeadline The headline text. */
- public void prepareRange(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aRange, String aHeadline ) throws RuntimeException, Exception
- {
- com.sun.star.beans.XPropertySet xPropSet = null;
- com.sun.star.table.XCellRange xCellRange = null;
-
- // draw border
- xCellRange = xSheet.getCellRangeByName( aRange );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- com.sun.star.table.BorderLine aLine = new com.sun.star.table.BorderLine();
- aLine.Color = 0x99CCFF;
- aLine.InnerLineWidth = aLine.LineDistance = 0;
- aLine.OuterLineWidth = 100;
- com.sun.star.table.TableBorder aBorder = new com.sun.star.table.TableBorder();
- aBorder.TopLine = aBorder.BottomLine = aBorder.LeftLine = aBorder.RightLine = aLine;
- aBorder.IsTopLineValid = aBorder.IsBottomLineValid = true;
- aBorder.IsLeftLineValid = aBorder.IsRightLineValid = true;
- xPropSet.setPropertyValue( "TableBorder", aBorder );
-
- // draw headline
- com.sun.star.sheet.XCellRangeAddressable xAddr = (com.sun.star.sheet.XCellRangeAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeAddressable.class, xCellRange );
- com.sun.star.table.CellRangeAddress aAddr = xAddr.getRangeAddress();
-
- xCellRange = xSheet.getCellRangeByPosition(
- aAddr.StartColumn, aAddr.StartRow, aAddr.EndColumn, aAddr.StartRow );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) );
- // write headline
- com.sun.star.table.XCell xCell = xCellRange.getCellByPosition( 0, 0 );
- xCell.setFormula( aHeadline );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell );
- xPropSet.setPropertyValue( "CharColor", new Integer( 0x003399 ) );
- xPropSet.setPropertyValue( "CharWeight", new Float( com.sun.star.awt.FontWeight.BOLD ) );
- }
-
-// ________________________________________________________________
-// Methods to create cell addresses and range addresses.
-
- /** Creates a com.sun.star.table.CellAddress and initializes it
- with the given range.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aCell The address of the cell (or a named cell). */
- public com.sun.star.table.CellAddress createCellAddress(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aCell ) throws RuntimeException, Exception
- {
- com.sun.star.sheet.XCellAddressable xAddr = (com.sun.star.sheet.XCellAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellAddressable.class,
- xSheet.getCellRangeByName( aCell ).getCellByPosition( 0, 0 ) );
- return xAddr.getCellAddress();
- }
-
- /** Creates a com.sun.star.table.CellRangeAddress and initializes
- it with the given range.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aRange The address of the cell range (or a named range). */
- public com.sun.star.table.CellRangeAddress createCellRangeAddress(
- com.sun.star.sheet.XSpreadsheet xSheet, String aRange )
- {
- com.sun.star.sheet.XCellRangeAddressable xAddr = (com.sun.star.sheet.XCellRangeAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeAddressable.class,
- xSheet.getCellRangeByName( aRange ) );
- return xAddr.getRangeAddress();
- }
-
-// ________________________________________________________________
-// Methods to convert cell addresses and range addresses to strings.
-
- /** Returns the text address of the cell.
- @param nColumn The column index.
- @param nRow The row index.
- @return A string containing the cell address. */
- public String getCellAddressString( int nColumn, int nRow )
- {
- String aStr = "";
- if (nColumn > 25)
- aStr += (char) ('A' + nColumn / 26 - 1);
- aStr += (char) ('A' + nColumn % 26);
- aStr += (nRow + 1);
- return aStr;
- }
-
- /** Returns the text address of the cell range.
- @param aCellRange The cell range address.
- @return A string containing the cell range address. */
- public String getCellRangeAddressString(
- com.sun.star.table.CellRangeAddress aCellRange )
- {
- return
- getCellAddressString( aCellRange.StartColumn, aCellRange.StartRow )
- + ":"
- + getCellAddressString( aCellRange.EndColumn, aCellRange.EndRow );
- }
-
- /** Returns the text address of the cell range.
- @param xCellRange The XSheetCellRange interface of the cell range.
- @param bWithSheet true = Include sheet name.
- @return A string containing the cell range address. */
- public String getCellRangeAddressString(
- com.sun.star.sheet.XSheetCellRange xCellRange,
- boolean bWithSheet )
- {
- String aStr = "";
- if (bWithSheet)
- {
- com.sun.star.sheet.XSpreadsheet xSheet = xCellRange.getSpreadsheet();
- com.sun.star.container.XNamed xNamed = (com.sun.star.container.XNamed)
- UnoRuntime.queryInterface( com.sun.star.container.XNamed.class, xSheet );
- aStr += xNamed.getName() + ".";
- }
- com.sun.star.sheet.XCellRangeAddressable xAddr = (com.sun.star.sheet.XCellRangeAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeAddressable.class, xCellRange );
- aStr += getCellRangeAddressString( xAddr.getRangeAddress() );
- return aStr;
- }
-
- /** Returns a list of addresses of all cell ranges contained in the collection.
- @param xRangesIA The XIndexAccess interface of the collection.
- @return A string containing the cell range address list. */
- public String getCellRangeListString(
- com.sun.star.container.XIndexAccess xRangesIA ) throws RuntimeException, Exception
- {
- String aStr = "";
- int nCount = xRangesIA.getCount();
- for (int nIndex = 0; nIndex < nCount; ++nIndex)
- {
- if (nIndex > 0)
- aStr += " ";
- Object aRangeObj = xRangesIA.getByIndex( nIndex );
- com.sun.star.sheet.XSheetCellRange xCellRange = (com.sun.star.sheet.XSheetCellRange)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetCellRange.class, aRangeObj );
- aStr += getCellRangeAddressString( xCellRange, false );
- }
- return aStr;
- }
-
-// ________________________________________________________________
-
- // Connect to a running office that is accepting connections.
- private void connect()
- {
- if (mxRemoteContext == null && mxRemoteServiceManager == null) {
- try {
- // First step: get the remote office component context
- mxRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- mxRemoteServiceManager = mxRemoteContext.getServiceManager();
- }
- catch( Exception e) {
- System.err.println("ERROR: can't get a component context from a running office ...");
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-
- /** Creates an empty spreadsheet document.
- @return The XSpreadsheetDocument interface of the document. */
- private com.sun.star.sheet.XSpreadsheetDocument initDocument()
- throws RuntimeException, Exception
- {
- XComponentLoader aLoader = (XComponentLoader)
- UnoRuntime.queryInterface(
- XComponentLoader.class,
- mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", mxRemoteContext));
-
- XComponent xComponent = aLoader.loadComponentFromURL(
- "private:factory/scalc", "_blank", 0,
- new com.sun.star.beans.PropertyValue[0] );
-
- return (com.sun.star.sheet.XSpreadsheetDocument)UnoRuntime.queryInterface(
- com.sun.star.sheet.XSpreadsheetDocument.class, xComponent );
- }
-
-// ________________________________________________________________
-}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java
deleted file mode 100644
index 7fc2ab28..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java
+++ /dev/null
@@ -1,1417 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.uno.AnyConverter;
-
-// __________ implementation ____________________________________
-
-/** Create and modify a spreadsheet document.
- */
-public class SpreadsheetSample extends SpreadsheetDocHelper
-{
-
-// ________________________________________________________________
-
- public static void main( String args[] )
- {
- try
- {
- SpreadsheetSample aSample = new SpreadsheetSample( args );
- aSample.doSampleFunction();
- }
- catch (Exception ex)
- {
- System.out.println( "Error: Sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- System.exit( 1 );
- }
- System.out.println( "\nSamples done." );
- System.exit( 0 );
- }
-
-// ________________________________________________________________
-
- public SpreadsheetSample( String[] args )
- {
- super( args );
- }
-
-// ________________________________________________________________
-
- /** This sample function performs all changes on the document. */
- public void doSampleFunction()
- {
- try
- {
- doCellSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Cell sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doCellRangeSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Cell range sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doCellRangesSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Cell range container sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doCellCursorSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Cell cursor sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doFormattingSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Formatting sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doDocumentSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Document sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doDatabaseSamples();
- }
- catch( Exception ex )
- {
- System.out.println( "\nError: Database sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doDataPilotSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Dota pilot sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doNamedRangesSamples();
- }
- catch( Exception ex )
- {
- System.out.println( "\nError: Named ranges sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doFunctionAccessSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Function access sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
-
- try
- {
- doApplicationSettingsSamples();
- }
- catch (Exception ex)
- {
- System.out.println( "\nError: Application settings sample caught exception!\nException Message = "
- + ex.getMessage());
- ex.printStackTrace();
- }
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the service com.sun.star.sheet.SheetCell. */
- private void doCellSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for service sheet.SheetCell ***\n" );
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
- com.sun.star.table.XCell xCell = null;
- com.sun.star.beans.XPropertySet xPropSet = null;
- String aText;
- prepareRange( xSheet, "A1:C7", "Cells and Cell Ranges" );
-
- // --- Get cell B3 by position - (column, row) ---
- xCell = xSheet.getCellByPosition( 1, 2 );
-
-
- // --- Insert two text paragraphs into the cell. ---
- com.sun.star.text.XText xText = (com.sun.star.text.XText)
- UnoRuntime.queryInterface( com.sun.star.text.XText.class, xCell );
- com.sun.star.text.XTextCursor xTextCursor = xText.createTextCursor();
-
- xText.insertString( xTextCursor, "Text in first line.", false );
- xText.insertControlCharacter( xTextCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false );
- xText.insertString( xTextCursor, "And a ", false );
-
- // create a hyperlink
- com.sun.star.lang.XMultiServiceFactory xServiceMan = (com.sun.star.lang.XMultiServiceFactory)
- UnoRuntime.queryInterface( com.sun.star.lang.XMultiServiceFactory.class, getDocument() );
- Object aHyperlinkObj = xServiceMan.createInstance( "com.sun.star.text.TextField.URL" );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aHyperlinkObj );
- xPropSet.setPropertyValue( "URL", "http://www.example.org" );
- xPropSet.setPropertyValue( "Representation", "hyperlink" );
- // ... and insert
- com.sun.star.text.XTextContent xContent = (com.sun.star.text.XTextContent)
- UnoRuntime.queryInterface( com.sun.star.text.XTextContent.class, aHyperlinkObj );
- xText.insertTextContent( xTextCursor, xContent, false );
-
-
- // --- Query the separate paragraphs. ---
- com.sun.star.container.XEnumerationAccess xParaEA =
- (com.sun.star.container.XEnumerationAccess) UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xCell );
- com.sun.star.container.XEnumeration xParaEnum = xParaEA.createEnumeration();
- // Go through the paragraphs
- while( xParaEnum.hasMoreElements() )
- {
- Object aPortionObj = xParaEnum.nextElement();
- com.sun.star.container.XEnumerationAccess xPortionEA =
- (com.sun.star.container.XEnumerationAccess) UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, aPortionObj );
- com.sun.star.container.XEnumeration xPortionEnum = xPortionEA.createEnumeration();
- aText = "";
- // Go through all text portions of a paragraph and construct string.
- Object nextElement;
- while( xPortionEnum.hasMoreElements() )
- {
- com.sun.star.text.XTextRange xRange = (com.sun.star.text.XTextRange)
- UnoRuntime.queryInterface(com.sun.star.text.XTextRange.class,
- xPortionEnum.nextElement());
- aText += xRange.getString();
- }
- System.out.println( "Paragraph text: " + aText );
- }
-
-
- // --- Change cell properties. ---
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell );
- // from styles.CharacterProperties
- xPropSet.setPropertyValue( "CharColor", new Integer( 0x003399 ) );
- xPropSet.setPropertyValue( "CharHeight", new Float( 20.0 ) );
- // from styles.ParagraphProperties
- xPropSet.setPropertyValue( "ParaLeftMargin", new Integer( 500 ) );
- // from table.CellProperties
- xPropSet.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) );
-
-
- // --- Get cell address. ---
- com.sun.star.sheet.XCellAddressable xCellAddr = (com.sun.star.sheet.XCellAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellAddressable.class, xCell );
- com.sun.star.table.CellAddress aAddress = xCellAddr.getCellAddress();
- aText = "Address of this cell: Column=" + aAddress.Column;
- aText += "; Row=" + aAddress.Row;
- aText += "; Sheet=" + aAddress.Sheet;
- System.out.println( aText );
-
-
- // --- Insert an annotation ---
- com.sun.star.sheet.XSheetAnnotationsSupplier xAnnotationsSupp =
- (com.sun.star.sheet.XSheetAnnotationsSupplier) UnoRuntime.queryInterface(
- com.sun.star.sheet.XSheetAnnotationsSupplier.class, xSheet );
- com.sun.star.sheet.XSheetAnnotations xAnnotations = xAnnotationsSupp.getAnnotations();
- xAnnotations.insertNew( aAddress, "This is an annotation" );
-
- com.sun.star.sheet.XSheetAnnotationAnchor xAnnotAnchor = (com.sun.star.sheet.XSheetAnnotationAnchor)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetAnnotationAnchor.class, xCell );
- com.sun.star.sheet.XSheetAnnotation xAnnotation = xAnnotAnchor.getAnnotation();
- xAnnotation.setIsVisible( true );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the service com.sun.star.sheet.SheetCellRange. */
- private void doCellRangeSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for service sheet.SheetCellRange ***\n" );
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
- com.sun.star.table.XCellRange xCellRange = null;
- com.sun.star.beans.XPropertySet xPropSet = null;
- com.sun.star.table.CellRangeAddress aRangeAddress = null;
- String aText;
-
- // Preparation
- setFormula( xSheet, "B5", "First cell" );
- setFormula( xSheet, "B6", "Second cell" );
- // Get cell range B5:B6 by position - (column, row, column, row)
- xCellRange = xSheet.getCellRangeByPosition( 1, 4, 1, 5 );
-
-
- // --- Change cell range properties. ---
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- // from com.sun.star.styles.CharacterProperties
- xPropSet.setPropertyValue( "CharColor", new Integer( 0x003399 ) );
- xPropSet.setPropertyValue( "CharHeight", new Float( 20.0 ) );
- // from com.sun.star.styles.ParagraphProperties
- xPropSet.setPropertyValue( "ParaLeftMargin", new Integer( 500 ) );
- // from com.sun.star.table.CellProperties
- xPropSet.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) );
-
-
- // --- Replace text in all cells. ---
- com.sun.star.util.XReplaceable xReplace = (com.sun.star.util.XReplaceable)
- UnoRuntime.queryInterface( com.sun.star.util.XReplaceable.class, xCellRange );
- com.sun.star.util.XReplaceDescriptor xReplaceDesc = xReplace.createReplaceDescriptor();
- xReplaceDesc.setSearchString( "cell" );
- xReplaceDesc.setReplaceString( "text" );
- // property SearchWords searches for whole cells!
- xReplaceDesc.setPropertyValue( "SearchWords", new Boolean( false ) );
- int nCount = xReplace.replaceAll( xReplaceDesc );
- System.out.println( "Search text replaced " + nCount + " times." );
-
-
- // --- Merge cells. ---
- xCellRange = xSheet.getCellRangeByName( "F3:G6" );
- prepareRange( xSheet, "E1:H7", "XMergeable" );
- com.sun.star.util.XMergeable xMerge = (com.sun.star.util.XMergeable)
- UnoRuntime.queryInterface( com.sun.star.util.XMergeable.class, xCellRange );
- xMerge.merge( true );
-
-
- // --- Change indentation. ---
-/* does not work (bug in XIndent implementation)
- prepareRange( xSheet, "I20:I23", "XIndent" );
- setValue( xSheet, "I21", 1 );
- setValue( xSheet, "I22", 1 );
- setValue( xSheet, "I23", 1 );
-
- xCellRange = xSheet.getCellRangeByName( "I21:I22" );
- com.sun.star.util.XIndent xIndent = (com.sun.star.util.XIndent)
- UnoRuntime.queryInterface( com.sun.star.util.XIndent.class, xCellRange );
- xIndent.incrementIndent();
-
- xCellRange = xSheet.getCellRangeByName( "I22:I23" );
- xIndent = (com.sun.star.util.XIndent)
- UnoRuntime.queryInterface( com.sun.star.util.XIndent.class, xCellRange );
- xIndent.incrementIndent();
-*/
-
-
- // --- Column properties. ---
- xCellRange = xSheet.getCellRangeByName( "B1" );
- com.sun.star.table.XColumnRowRange xColRowRange = (com.sun.star.table.XColumnRowRange)
- UnoRuntime.queryInterface( com.sun.star.table.XColumnRowRange.class, xCellRange );
- com.sun.star.table.XTableColumns xColumns = xColRowRange.getColumns();
-
- Object aColumnObj = xColumns.getByIndex( 0 );
- xPropSet = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, aColumnObj );
- xPropSet.setPropertyValue( "Width", new Integer( 6000 ) );
-
- com.sun.star.container.XNamed xNamed = (com.sun.star.container.XNamed)
- UnoRuntime.queryInterface( com.sun.star.container.XNamed.class, aColumnObj );
- System.out.println( "The name of the wide column is " + xNamed.getName() + "." );
-
-
- // --- Cell range data ---
- prepareRange( xSheet, "A9:C30", "XCellRangeData" );
-
- xCellRange = xSheet.getCellRangeByName( "A10:C30" );
- com.sun.star.sheet.XCellRangeData xData = (com.sun.star.sheet.XCellRangeData)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeData.class, xCellRange );
- Object[][] aValues =
- {
- { "Name", "Fruit", "Quantity" },
- { "Alice", "Apples", new Double( 3.0 ) },
- { "Alice", "Oranges", new Double( 7.0 ) },
- { "Bob", "Apples", new Double( 3.0 ) },
- { "Alice", "Apples", new Double( 9.0 ) },
- { "Bob", "Apples", new Double( 5.0 ) },
- { "Bob", "Oranges", new Double( 6.0 ) },
- { "Alice", "Oranges", new Double( 3.0 ) },
- { "Alice", "Apples", new Double( 8.0 ) },
- { "Alice", "Oranges", new Double( 1.0 ) },
- { "Bob", "Oranges", new Double( 2.0 ) },
- { "Bob", "Oranges", new Double( 7.0 ) },
- { "Bob", "Apples", new Double( 1.0 ) },
- { "Alice", "Apples", new Double( 8.0 ) },
- { "Alice", "Oranges", new Double( 8.0 ) },
- { "Alice", "Apples", new Double( 7.0 ) },
- { "Bob", "Apples", new Double( 1.0 ) },
- { "Bob", "Oranges", new Double( 9.0 ) },
- { "Bob", "Oranges", new Double( 3.0 ) },
- { "Alice", "Oranges", new Double( 4.0 ) },
- { "Alice", "Apples", new Double( 9.0 ) }
- };
- xData.setDataArray( aValues );
-
-
- // --- Get cell range address. ---
- com.sun.star.sheet.XCellRangeAddressable xRangeAddr = (com.sun.star.sheet.XCellRangeAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeAddressable.class, xCellRange );
- aRangeAddress = xRangeAddr.getRangeAddress();
- System.out.println( "Address of this range: Sheet=" + aRangeAddress.Sheet );
- System.out.println( "Start column=" + aRangeAddress.StartColumn + "; Start row=" + aRangeAddress.StartRow );
- System.out.println( "End column =" + aRangeAddress.EndColumn + "; End row =" + aRangeAddress.EndRow );
-
-
- // --- Sheet operation. ---
- // uses the range filled with XCellRangeData
- com.sun.star.sheet.XSheetOperation xSheetOp = (com.sun.star.sheet.XSheetOperation)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetOperation.class, xData );
- double fResult = xSheetOp.computeFunction( com.sun.star.sheet.GeneralFunction.AVERAGE );
- System.out.println( "Average value of the data table A10:C30: " + fResult );
-
-
- // --- Fill series ---
- // Prepare the example
- setValue( xSheet, "E10", 1 );
- setValue( xSheet, "E11", 4 );
- setDate( xSheet, "E12", 30, 1, 2002 );
- setFormula( xSheet, "I13", "Text 10" );
- setFormula( xSheet, "E14", "Jan" );
- setValue( xSheet, "K14", 10 );
- setValue( xSheet, "E16", 1 );
- setValue( xSheet, "F16", 2 );
- setDate( xSheet, "E17", 28, 2, 2002 );
- setDate( xSheet, "F17", 28, 1, 2002 );
- setValue( xSheet, "E18", 6 );
- setValue( xSheet, "F18", 4 );
-
- com.sun.star.sheet.XCellSeries xSeries = null;
- // Fill 2 rows linear with end value -> 2nd series is not filled completely
- xSeries = getCellSeries( xSheet, "E10:I11" );
- xSeries.fillSeries( com.sun.star.sheet.FillDirection.TO_RIGHT, com.sun.star.sheet.FillMode.LINEAR,
- com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, 2, 9 );
- // Add months to a date
- xSeries = getCellSeries( xSheet, "E12:I12" );
- xSeries.fillSeries( com.sun.star.sheet.FillDirection.TO_RIGHT, com.sun.star.sheet.FillMode.DATE,
- com.sun.star.sheet.FillDateMode.FILL_DATE_MONTH, 1, 0x7FFFFFFF );
- // Fill right to left with a text containing a value
- xSeries = getCellSeries( xSheet, "E13:I13" );
- xSeries.fillSeries( com.sun.star.sheet.FillDirection.TO_LEFT, com.sun.star.sheet.FillMode.LINEAR,
- com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, 10, 0x7FFFFFFF );
- // Fill with an user defined list
- xSeries = getCellSeries( xSheet, "E14:I14" );
- xSeries.fillSeries( com.sun.star.sheet.FillDirection.TO_RIGHT, com.sun.star.sheet.FillMode.AUTO,
- com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, 1, 0x7FFFFFFF );
- // Fill bottom to top with a geometric series
- xSeries = getCellSeries( xSheet, "K10:K14" );
- xSeries.fillSeries( com.sun.star.sheet.FillDirection.TO_TOP, com.sun.star.sheet.FillMode.GROWTH,
- com.sun.star.sheet.FillDateMode.FILL_DATE_DAY, 2, 0x7FFFFFFF );
- // Auto fill
- xSeries = getCellSeries( xSheet, "E16:K18" );
- xSeries.fillAuto( com.sun.star.sheet.FillDirection.TO_RIGHT, 2 );
- // Fill series copies cell formats -> draw border here
- prepareRange( xSheet, "E9:K18", "XCellSeries" );
-
-
- // --- Array formulas ---
- xCellRange = xSheet.getCellRangeByName( "E21:G23" );
- prepareRange( xSheet, "E20:G23", "XArrayFormulaRange" );
- com.sun.star.sheet.XArrayFormulaRange xArrayFormula = (com.sun.star.sheet.XArrayFormulaRange)
- UnoRuntime.queryInterface( com.sun.star.sheet.XArrayFormulaRange.class, xCellRange );
- // Insert a 3x3 unit matrix.
- xArrayFormula.setArrayFormula( "=A10:C12" );
- System.out.println( "Array formula is: " + xArrayFormula.getArrayFormula() );
-
-
- // --- Multiple operations ---
- setFormula( xSheet, "E26", "=E27^F26" );
- setValue( xSheet, "E27", 1 );
- setValue( xSheet, "F26", 1 );
- getCellSeries( xSheet, "E27:E31" ).fillAuto( com.sun.star.sheet.FillDirection.TO_BOTTOM, 1 );
- getCellSeries( xSheet, "F26:J26" ).fillAuto( com.sun.star.sheet.FillDirection.TO_RIGHT, 1 );
- setFormula( xSheet, "F33", "=SIN(E33)" );
- setFormula( xSheet, "G33", "=COS(E33)" );
- setFormula( xSheet, "H33", "=TAN(E33)" );
- setValue( xSheet, "E34", 0 );
- setValue( xSheet, "E35", 0.2 );
- getCellSeries( xSheet, "E34:E38" ).fillAuto( com.sun.star.sheet.FillDirection.TO_BOTTOM, 2 );
- prepareRange( xSheet, "E25:J38", "XMultipleOperation" );
-
- com.sun.star.table.CellRangeAddress aFormulaRange = createCellRangeAddress( xSheet, "E26" );
- com.sun.star.table.CellAddress aColCell = createCellAddress( xSheet, "E27" );
- com.sun.star.table.CellAddress aRowCell = createCellAddress( xSheet, "F26" );
-
- xCellRange = xSheet.getCellRangeByName( "E26:J31" );
- com.sun.star.sheet.XMultipleOperation xMultOp = (com.sun.star.sheet.XMultipleOperation)
- UnoRuntime.queryInterface( com.sun.star.sheet.XMultipleOperation.class, xCellRange );
- xMultOp.setTableOperation(
- aFormulaRange, com.sun.star.sheet.TableOperationMode.BOTH, aColCell, aRowCell );
-
- aFormulaRange = createCellRangeAddress( xSheet, "F33:H33" );
- aColCell = createCellAddress( xSheet, "E33" );
- // Row cell not needed
-
- xCellRange = xSheet.getCellRangeByName( "E34:H38" );
- xMultOp = (com.sun.star.sheet.XMultipleOperation)
- UnoRuntime.queryInterface( com.sun.star.sheet.XMultipleOperation.class, xCellRange );
- xMultOp.setTableOperation(
- aFormulaRange, com.sun.star.sheet.TableOperationMode.COLUMN, aColCell, aRowCell );
-
-
- // --- Cell Ranges Query ---
- xCellRange = xSheet.getCellRangeByName( "A10:C30" );
- com.sun.star.sheet.XCellRangesQuery xRangesQuery = (com.sun.star.sheet.XCellRangesQuery)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangesQuery.class, xCellRange );
- com.sun.star.sheet.XSheetCellRanges xCellRanges =
- xRangesQuery.queryContentCells( (short)com.sun.star.sheet.CellFlags.STRING );
- System.out.println(
- "Cells in A10:C30 containing text: "
- + xCellRanges.getRangeAddressesAsString() );
- }
-
- /** Returns the XCellSeries interface of a cell range.
- @param xSheet The spreadsheet containing the cell range.
- @param aRange The address of the cell range.
- @return The XCellSeries interface. */
- private com.sun.star.sheet.XCellSeries getCellSeries(
- com.sun.star.sheet.XSpreadsheet xSheet, String aRange )
- {
- return (com.sun.star.sheet.XCellSeries) UnoRuntime.queryInterface(
- com.sun.star.sheet.XCellSeries.class, xSheet.getCellRangeByName( aRange ) );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding cell range collections. */
- private void doCellRangesSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for cell range collections ***\n" );
-
- // Create a new cell range container
- com.sun.star.lang.XMultiServiceFactory xDocFactory =
- (com.sun.star.lang.XMultiServiceFactory) UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, getDocument() );
- com.sun.star.sheet.XSheetCellRangeContainer xRangeCont =
- (com.sun.star.sheet.XSheetCellRangeContainer) UnoRuntime.queryInterface(
- com.sun.star.sheet.XSheetCellRangeContainer.class,
- xDocFactory.createInstance( "com.sun.star.sheet.SheetCellRanges" ) );
-
-
- // --- Insert ranges ---
- insertRange( xRangeCont, 0, 0, 0, 0, 0, false ); // A1:A1
- insertRange( xRangeCont, 0, 0, 1, 0, 2, true ); // A2:A3
- insertRange( xRangeCont, 0, 1, 0, 1, 2, false ); // B1:B3
-
-
- // --- Query the list of filled cells ---
- System.out.print( "All filled cells: " );
- com.sun.star.container.XEnumerationAccess xCellsEA = xRangeCont.getCells();
- com.sun.star.container.XEnumeration xEnum = xCellsEA.createEnumeration();
- while( xEnum.hasMoreElements() )
- {
- Object aCellObj = xEnum.nextElement();
- com.sun.star.sheet.XCellAddressable xAddr = (com.sun.star.sheet.XCellAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellAddressable.class, aCellObj );
- com.sun.star.table.CellAddress aAddr = xAddr.getCellAddress();
- System.out.print( getCellAddressString( aAddr.Column, aAddr.Row ) + " " );
- }
- System.out.println();
- }
-
- /** Inserts a cell range address into a cell range container and prints
- a message.
- @param xContainer The com.sun.star.sheet.XSheetCellRangeContainer interface of the container.
- @param nSheet Index of sheet of the range.
- @param nStartCol Index of first column of the range.
- @param nStartRow Index of first row of the range.
- @param nEndCol Index of last column of the range.
- @param nEndRow Index of last row of the range.
- @param bMerge Determines whether the new range should be merged with the existing ranges. */
- private void insertRange(
- com.sun.star.sheet.XSheetCellRangeContainer xContainer,
- int nSheet, int nStartCol, int nStartRow, int nEndCol, int nEndRow,
- boolean bMerge ) throws RuntimeException, Exception
- {
- com.sun.star.table.CellRangeAddress aAddress = new com.sun.star.table.CellRangeAddress();
- aAddress.Sheet = (short)nSheet;
- aAddress.StartColumn = nStartCol;
- aAddress.StartRow = nStartRow;
- aAddress.EndColumn = nEndCol;
- aAddress.EndRow = nEndRow;
- xContainer.addRangeAddress( aAddress, bMerge );
- System.out.println(
- "Inserting " + getCellRangeAddressString( aAddress )
- + " " + (bMerge ? " with" : "without") + " merge,"
- + " resulting list: " + xContainer.getRangeAddressesAsString() );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding cell cursors. */
- private void doCellCursorSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for cell cursor ***\n" );
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
-
-
- // --- Find the array formula using a cell cursor ---
- com.sun.star.table.XCellRange xRange = xSheet.getCellRangeByName( "F22" );
- com.sun.star.sheet.XSheetCellRange xCellRange = (com.sun.star.sheet.XSheetCellRange)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetCellRange.class, xRange );
- com.sun.star.sheet.XSheetCellCursor xCursor = xSheet.createCursorByRange( xCellRange );
-
- xCursor.collapseToCurrentArray();
- com.sun.star.sheet.XArrayFormulaRange xArray = (com.sun.star.sheet.XArrayFormulaRange)
- UnoRuntime.queryInterface( com.sun.star.sheet.XArrayFormulaRange.class, xCursor );
- System.out.println(
- "Array formula in " + getCellRangeAddressString( xCursor, false )
- + " contains formula " + xArray.getArrayFormula() );
-
-
- // --- Find the used area ---
- com.sun.star.sheet.XUsedAreaCursor xUsedCursor = (com.sun.star.sheet.XUsedAreaCursor)
- UnoRuntime.queryInterface( com.sun.star.sheet.XUsedAreaCursor.class, xCursor );
- xUsedCursor.gotoStartOfUsedArea( false );
- xUsedCursor.gotoEndOfUsedArea( true );
- // xUsedCursor and xCursor are interfaces of the same object -
- // so modifying xUsedCursor takes effect on xCursor:
- System.out.println( "The used area is: " + getCellRangeAddressString( xCursor, true ) );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the formatting of cells and ranges. */
- private void doFormattingSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Formatting samples ***\n" );
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 1 );
- com.sun.star.table.XCellRange xCellRange;
- com.sun.star.beans.XPropertySet xPropSet = null;
- com.sun.star.container.XIndexAccess xRangeIA = null;
- com.sun.star.lang.XMultiServiceFactory xDocServiceManager;
-
-
- // --- Cell styles ---
- // get the cell style container
- com.sun.star.style.XStyleFamiliesSupplier xFamiliesSupplier = (com.sun.star.style.XStyleFamiliesSupplier)
- UnoRuntime.queryInterface( com.sun.star.style.XStyleFamiliesSupplier.class, getDocument() );
- com.sun.star.container.XNameAccess xFamiliesNA = xFamiliesSupplier.getStyleFamilies();
- Object aCellStylesObj = xFamiliesNA.getByName( "CellStyles" );
- com.sun.star.container.XNameContainer xCellStylesNA = (com.sun.star.container.XNameContainer)
- UnoRuntime.queryInterface( com.sun.star.container.XNameContainer.class, aCellStylesObj );
-
- // create a new cell style
- xDocServiceManager = (com.sun.star.lang.XMultiServiceFactory)
- UnoRuntime.queryInterface( com.sun.star.lang.XMultiServiceFactory.class, getDocument() );
- Object aCellStyle = xDocServiceManager.createInstance( "com.sun.star.style.CellStyle" );
- String aStyleName = "MyNewCellStyle";
- xCellStylesNA.insertByName( aStyleName, aCellStyle );
-
- // modify properties of the new style
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aCellStyle );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x888888 ) );
- xPropSet.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
-
-
-
- // --- Query equal-formatted cell ranges ---
- // prepare example, use the new cell style
- xCellRange = xSheet.getCellRangeByName( "D2:F2" );
- xPropSet = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xCellRange );
- xPropSet.setPropertyValue( "CellStyle", aStyleName );
-
- xCellRange = xSheet.getCellRangeByName( "A3:G3" );
- xPropSet = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xCellRange );
- xPropSet.setPropertyValue( "CellStyle", aStyleName );
-
- // All ranges in one container
- xCellRange = xSheet.getCellRangeByName( "A1:G3" );
- System.out.println( "Service CellFormatRanges:" );
- com.sun.star.sheet.XCellFormatRangesSupplier xFormatSupp =
- (com.sun.star.sheet.XCellFormatRangesSupplier) UnoRuntime.queryInterface(
- com.sun.star.sheet.XCellFormatRangesSupplier.class, xCellRange );
- xRangeIA = xFormatSupp.getCellFormatRanges();
- System.out.println( getCellRangeListString( xRangeIA ) );
-
- // Ranges sorted in SheetCellRanges containers
- System.out.println( "\nService UniqueCellFormatRanges:" );
- com.sun.star.sheet.XUniqueCellFormatRangesSupplier xUniqueFormatSupp =
- (com.sun.star.sheet.XUniqueCellFormatRangesSupplier) UnoRuntime.queryInterface(
- com.sun.star.sheet.XUniqueCellFormatRangesSupplier.class, xCellRange );
- com.sun.star.container.XIndexAccess xRangesIA = xUniqueFormatSupp.getUniqueCellFormatRanges();
- int nCount = xRangesIA.getCount();
- for (int nIndex = 0; nIndex < nCount; ++nIndex)
- {
- Object aRangesObj = xRangesIA.getByIndex( nIndex );
- xRangeIA = (com.sun.star.container.XIndexAccess) UnoRuntime.queryInterface(
- com.sun.star.container.XIndexAccess.class, aRangesObj );
- System.out.println(
- "Container " + (nIndex + 1) + ": " + getCellRangeListString( xRangeIA ) );
- }
-
-
- // --- Table auto formats ---
- // get the global collection of table auto formats, use global service
- // manager
- com.sun.star.lang.XMultiComponentFactory xServiceManager = getServiceManager();
-
- Object aAutoFormatsObj = xServiceManager.createInstanceWithContext(
- "com.sun.star.sheet.TableAutoFormats", getContext());
- com.sun.star.container.XNameContainer xAutoFormatsNA =
- (com.sun.star.container.XNameContainer)UnoRuntime.queryInterface(
- com.sun.star.container.XNameContainer.class, aAutoFormatsObj );
-
- // create a new table auto format and insert into the container
- String aAutoFormatName = "Temp_Example";
- boolean bExistsAlready = xAutoFormatsNA.hasByName( aAutoFormatName );
- Object aAutoFormatObj = null;
- if (bExistsAlready)
- // auto format already exists -> use it
- aAutoFormatObj = xAutoFormatsNA.getByName( aAutoFormatName );
- else
- {
- // create a new auto format (with document service manager!)
-// xDocServiceManager = (com.sun.star.lang.XMultiServiceFactory)
-// UnoRuntime.queryInterface( com.sun.star.lang.XMultiServiceFactory.class, getDocument() );
- aAutoFormatObj = xDocServiceManager.createInstance(
- "com.sun.star.sheet.TableAutoFormat" );
- xAutoFormatsNA.insertByName( aAutoFormatName, aAutoFormatObj );
- }
- // index access to the auto format fields
- com.sun.star.container.XIndexAccess xAutoFormatIA =
- (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XIndexAccess.class, aAutoFormatObj );
-
- // set properties of all auto format fields
- for (int nRow = 0; nRow < 4; ++nRow)
- {
- int nRowColor = 0;
- switch (nRow)
- {
- case 0: nRowColor = 0x999999; break;
- case 1: nRowColor = 0xFFFFCC; break;
- case 2: nRowColor = 0xEEEEEE; break;
- case 3: nRowColor = 0x999999; break;
- }
-
- for (int nColumn = 0; nColumn < 4; ++nColumn)
- {
- int nColor = nRowColor;
- if ((nColumn == 0) || (nColumn == 3))
- nColor -= 0x333300;
-
- // get the auto format field and apply properties
- Object aFieldObj = xAutoFormatIA.getByIndex( 4 * nRow + nColumn );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, aFieldObj );
- xPropSet.setPropertyValue( "CellBackColor", new Integer( nColor ) );
- }
- }
-
- // set the auto format to the spreadsheet
- xCellRange = xSheet.getCellRangeByName( "A5:H25" );
- com.sun.star.table.XAutoFormattable xAutoForm = (com.sun.star.table.XAutoFormattable)
- UnoRuntime.queryInterface( com.sun.star.table.XAutoFormattable.class, xCellRange );
- xAutoForm.autoFormat( aAutoFormatName );
-
- // remove the auto format
- if (!bExistsAlready)
- xAutoFormatsNA.removeByName( aAutoFormatName );
-
-
- // --- Conditional formats ---
- xSheet = getSpreadsheet( 0 );
- prepareRange( xSheet, "K20:K23", "Cond. Format" );
- setValue( xSheet, "K21", 1 );
- setValue( xSheet, "K22", 2 );
- setValue( xSheet, "K23", 3 );
-
- // get the conditional format object of the cell range
- xCellRange = xSheet.getCellRangeByName( "K21:K23" );
- xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- com.sun.star.sheet.XSheetConditionalEntries xEntries =
- (com.sun.star.sheet.XSheetConditionalEntries) UnoRuntime.queryInterface(
- com.sun.star.sheet.XSheetConditionalEntries.class,
- xPropSet.getPropertyValue( "ConditionalFormat" ));
-
- // create a condition and apply it to the range
- com.sun.star.beans.PropertyValue[] aCondition = new com.sun.star.beans.PropertyValue[3];
- aCondition[0] = new com.sun.star.beans.PropertyValue();
- aCondition[0].Name = "Operator";
- aCondition[0].Value = com.sun.star.sheet.ConditionOperator.GREATER;
- aCondition[1] = new com.sun.star.beans.PropertyValue();
- aCondition[1].Name = "Formula1";
- aCondition[1].Value = "1";
- aCondition[2] = new com.sun.star.beans.PropertyValue();
- aCondition[2].Name = "StyleName";
- aCondition[2].Value = aStyleName;
- xEntries.addNew( aCondition );
- xPropSet.setPropertyValue( "ConditionalFormat", xEntries );
- }
-
-// ________________________________________________________________
-
- /** All samples regarding the spreadsheet document. */
- private void doDocumentSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for spreadsheet document ***\n" );
-
-
- // --- Insert a new spreadsheet ---
- com.sun.star.sheet.XSpreadsheet xSheet = insertSpreadsheet( "A new sheet", (short)0x7FFF );
-
-
- // --- Copy a cell range ---
- prepareRange( xSheet, "A1:B3", "Copy from" );
- prepareRange( xSheet, "D1:E3", "To" );
- setValue( xSheet, "A2", 123 );
- setValue( xSheet, "B2", 345 );
- setFormula( xSheet, "A3", "=SUM(A2:B2)" );
- setFormula( xSheet, "B3", "=FORMULA(A3)" );
-
- com.sun.star.sheet.XCellRangeMovement xMovement = (com.sun.star.sheet.XCellRangeMovement)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeMovement.class, xSheet );
- com.sun.star.table.CellRangeAddress aSourceRange = createCellRangeAddress( xSheet, "A2:B3" );
- com.sun.star.table.CellAddress aDestCell = createCellAddress( xSheet, "D2" );
- xMovement.copyRange( aDestCell, aSourceRange );
-
-
- // --- Print automatic column page breaks ---
- com.sun.star.sheet.XSheetPageBreak xPageBreak = (com.sun.star.sheet.XSheetPageBreak)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetPageBreak.class, xSheet );
- com.sun.star.sheet.TablePageBreakData[] aPageBreakArray = xPageBreak.getColumnPageBreaks();
-
- System.out.print( "Automatic column page breaks:" );
- for (int nIndex = 0; nIndex < aPageBreakArray.length; ++nIndex)
- if (!aPageBreakArray[nIndex].ManualBreak)
- System.out.print( " " + aPageBreakArray[nIndex].Position );
- System.out.println();
-
-
- // --- Document properties ---
- com.sun.star.beans.XPropertySet xPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, getDocument() );
-
- AnyConverter aAnyConv = new AnyConverter();
- String aText = "Value of property IsIterationEnabled: ";
- aText += aAnyConv.toBoolean(xPropSet.getPropertyValue( "IsIterationEnabled" ));
- System.out.println( aText );
- aText = "Value of property IterationCount: ";
- aText += aAnyConv.toInt(xPropSet.getPropertyValue( "IterationCount" ));
- System.out.println( aText );
- aText = "Value of property NullDate: ";
- com.sun.star.util.Date aDate = (com.sun.star.util.Date)
- aAnyConv.toObject(com.sun.star.util.Date.class, xPropSet.getPropertyValue( "NullDate" ));
- aText += aDate.Year + "-" + aDate.Month + "-" + aDate.Day;
- System.out.println( aText );
-
-
- // --- Data validation ---
- prepareRange( xSheet, "A5:C7", "Validation" );
- setFormula( xSheet, "A6", "Insert values between 0.0 and 5.0 below:" );
-
- com.sun.star.table.XCellRange xCellRange = xSheet.getCellRangeByName( "A7:C7" );
- com.sun.star.beans.XPropertySet xCellPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange );
- // validation properties
- com.sun.star.beans.XPropertySet xValidPropSet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
- xCellPropSet.getPropertyValue( "Validation" ));
- xValidPropSet.setPropertyValue( "Type", com.sun.star.sheet.ValidationType.DECIMAL );
- xValidPropSet.setPropertyValue( "ShowErrorMessage", new Boolean( true ) );
- xValidPropSet.setPropertyValue( "ErrorMessage", "This is an invalid value!" );
- xValidPropSet.setPropertyValue( "ErrorAlertStyle", com.sun.star.sheet.ValidationAlertStyle.STOP );
- // condition
- com.sun.star.sheet.XSheetCondition xCondition = (com.sun.star.sheet.XSheetCondition)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetCondition.class, xValidPropSet );
- xCondition.setOperator( com.sun.star.sheet.ConditionOperator.BETWEEN );
- xCondition.setFormula1( "0.0" );
- xCondition.setFormula2( "5.0" );
- // apply on cell range
- xCellPropSet.setPropertyValue( "Validation", xValidPropSet );
-
- // --- Scenarios ---
- Object[][] aValues = new Object[2][2];
-
- aValues[0][0] = new Double( 11 );
- aValues[0][1] = new Double( 12 );
- aValues[1][0] = "Test13";
- aValues[1][1] = "Test14";
- insertScenario( xSheet, "B10:C11", aValues, "First Scenario", "The first scenario." );
-
- aValues[0][0] = "Test21";
- aValues[0][1] = "Test22";
- aValues[1][0] = new Double( 23 );
- aValues[1][1] = new Double( 24 );
- insertScenario( xSheet, "B10:C11", aValues, "Second Scenario", "The visible scenario." );
-
- aValues[0][0] = new Double( 31 );
- aValues[0][1] = new Double( 32 );
- aValues[1][0] = "Test33";
- aValues[1][1] = "Test34";
- insertScenario( xSheet, "B10:C11", aValues, "Third Scenario", "The last scenario." );
-
- // show second scenario
- showScenario( xSheet, "Second Scenario" );
- }
-
- /** Inserts a scenario containing one cell range into a sheet and
- applies the value array.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aRange The range address for the scenario.
- @param aValueArray The array of cell contents.
- @param aScenarioName The name of the new scenario.
- @param aScenarioComment The user comment for the scenario. */
- private void insertScenario(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aRange,
- Object[][] aValueArray,
- String aScenarioName,
- String aScenarioComment ) throws RuntimeException, Exception
- {
- // get the cell range with the given address
- com.sun.star.table.XCellRange xCellRange = xSheet.getCellRangeByName( aRange );
-
- // create the range address sequence
- com.sun.star.sheet.XCellRangeAddressable xAddr = (com.sun.star.sheet.XCellRangeAddressable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeAddressable.class, xCellRange );
- com.sun.star.table.CellRangeAddress[] aRangesSeq = new com.sun.star.table.CellRangeAddress[1];
- aRangesSeq[0] = xAddr.getRangeAddress();
-
- // create the scenario
- com.sun.star.sheet.XScenariosSupplier xScenSupp = (com.sun.star.sheet.XScenariosSupplier)
- UnoRuntime.queryInterface( com.sun.star.sheet.XScenariosSupplier.class, xSheet );
- com.sun.star.sheet.XScenarios xScenarios = xScenSupp.getScenarios();
- xScenarios.addNewByName( aScenarioName, aRangesSeq, aScenarioComment );
-
- // insert the values into the range
- com.sun.star.sheet.XCellRangeData xData = (com.sun.star.sheet.XCellRangeData)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeData.class, xCellRange );
- xData.setDataArray( aValueArray );
- }
-
- /** Activates a scenario.
- @param xSheet The XSpreadsheet interface of the spreadsheet.
- @param aScenarioName The name of the scenario. */
- private void showScenario(
- com.sun.star.sheet.XSpreadsheet xSheet,
- String aScenarioName ) throws RuntimeException, Exception
- {
- // get the scenario set
- com.sun.star.sheet.XScenariosSupplier xScenSupp = (com.sun.star.sheet.XScenariosSupplier)
- UnoRuntime.queryInterface( com.sun.star.sheet.XScenariosSupplier.class, xSheet );
- com.sun.star.sheet.XScenarios xScenarios = xScenSupp.getScenarios();
-
- // get the scenario and activate it
- Object aScenarioObj = xScenarios.getByName( aScenarioName );
- com.sun.star.sheet.XScenario xScenario = (com.sun.star.sheet.XScenario)
- UnoRuntime.queryInterface( com.sun.star.sheet.XScenario.class, aScenarioObj );
- xScenario.apply();
- }
-
-// ________________________________________________________________
-
- private void doNamedRangesSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for named ranges ***\n" );
- com.sun.star.sheet.XSpreadsheetDocument xDocument = getDocument();
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
-
-
- // --- Named ranges ---
- prepareRange( xSheet, "G42:H45", "Named ranges" );
- xSheet.getCellByPosition( 6, 42 ).setValue( 1 );
- xSheet.getCellByPosition( 6, 43 ).setValue( 2 );
- xSheet.getCellByPosition( 7, 42 ).setValue( 3 );
- xSheet.getCellByPosition( 7, 43 ).setValue( 4 );
-
- // insert a named range
- com.sun.star.beans.XPropertySet xDocProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xDocument );
- Object aRangesObj = xDocProp.getPropertyValue( "NamedRanges" );
- com.sun.star.sheet.XNamedRanges xNamedRanges = (com.sun.star.sheet.XNamedRanges)
- UnoRuntime.queryInterface( com.sun.star.sheet.XNamedRanges.class, aRangesObj );
- com.sun.star.table.CellAddress aRefPos = new com.sun.star.table.CellAddress();
- aRefPos.Sheet = 0;
- aRefPos.Column = 6;
- aRefPos.Row = 44;
- xNamedRanges.addNewByName( "ExampleName", "SUM(G43:G44)", aRefPos, 0 );
-
- // use the named range in formulas
- xSheet.getCellByPosition( 6, 44 ).setFormula( "=ExampleName" );
- xSheet.getCellByPosition( 7, 44 ).setFormula( "=ExampleName" );
-
-
- // --- Label ranges ---
- prepareRange( xSheet, "G47:I50", "Label ranges" );
- com.sun.star.table.XCellRange xRange = xSheet.getCellRangeByPosition( 6, 47, 7, 49 );
- com.sun.star.sheet.XCellRangeData xData = ( com.sun.star.sheet.XCellRangeData )
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeData.class, xRange );
- Object[][] aValues =
- {
- { "Apples", "Oranges" },
- { new Double( 5 ), new Double( 7 ) },
- { new Double( 6 ), new Double( 8 ) }
- };
- xData.setDataArray( aValues );
-
- // insert a column label range
- Object aLabelsObj = xDocProp.getPropertyValue( "ColumnLabelRanges" );
- com.sun.star.sheet.XLabelRanges xLabelRanges = (com.sun.star.sheet.XLabelRanges)
- UnoRuntime.queryInterface( com.sun.star.sheet.XLabelRanges.class, aLabelsObj );
- com.sun.star.table.CellRangeAddress aLabelArea = new com.sun.star.table.CellRangeAddress();
- aLabelArea.Sheet = 0;
- aLabelArea.StartColumn = 6;
- aLabelArea.StartRow = 47;
- aLabelArea.EndColumn = 7;
- aLabelArea.EndRow = 47;
- com.sun.star.table.CellRangeAddress aDataArea = new com.sun.star.table.CellRangeAddress();
- aDataArea.Sheet = 0;
- aDataArea.StartColumn = 6;
- aDataArea.StartRow = 48;
- aDataArea.EndColumn = 7;
- aDataArea.EndRow = 49;
- xLabelRanges.addNew( aLabelArea, aDataArea );
-
- // use the label range in formulas
- xSheet.getCellByPosition( 8, 48 ).setFormula( "=Apples+Oranges" );
- xSheet.getCellByPosition( 8, 49 ).setFormula( "=Apples+Oranges" );
- }
-
-// ________________________________________________________________
-
- /** Helper for doDatabaseSamples: get name of first database. */
- private String getFirstDatabaseName()
- {
- String aDatabase = null;
- try
- {
- com.sun.star.lang.XMultiComponentFactory xServiceManager = getServiceManager();
- com.sun.star.container.XNameAccess xContext =
- (com.sun.star.container.XNameAccess) UnoRuntime.queryInterface(
- com.sun.star.container.XNameAccess.class,
- xServiceManager.createInstanceWithContext(
- "com.sun.star.sdb.DatabaseContext", getContext()) );
- String[] aNames = xContext.getElementNames();
- if ( aNames.length > 0 )
- aDatabase = aNames[0];
- }
- catch ( Exception e )
- {
- System.out.println( "\nError: caught exception in getFirstDatabaseName()!\n" +
- "Exception Message = "
- + e.getMessage());
- e.printStackTrace();
- }
- return aDatabase;
- }
-
- /** Helper for doDatabaseSamples: get name of first table in a database. */
- private String getFirstTableName( String aDatabase )
- {
- if ( aDatabase == null )
- return null;
-
- String aTable = null;
- try
- {
- com.sun.star.lang.XMultiComponentFactory xServiceManager = getServiceManager();
- com.sun.star.container.XNameAccess xContext = (com.sun.star.container.XNameAccess)
- UnoRuntime.queryInterface( com.sun.star.container.XNameAccess.class,
- xServiceManager.createInstanceWithContext(
- "com.sun.star.sdb.DatabaseContext", getContext()) );
- com.sun.star.sdb.XCompletedConnection xSource =
- (com.sun.star.sdb.XCompletedConnection)UnoRuntime.queryInterface(
- com.sun.star.sdb.XCompletedConnection.class,
- xContext.getByName( aDatabase ) );
- com.sun.star.task.XInteractionHandler xHandler =
- (com.sun.star.task.XInteractionHandler)UnoRuntime.queryInterface(
- com.sun.star.task.XInteractionHandler.class,
- xServiceManager.createInstanceWithContext(
- "com.sun.star.task.InteractionHandler", getContext()) );
- com.sun.star.sdbcx.XTablesSupplier xSupplier =
- (com.sun.star.sdbcx.XTablesSupplier)UnoRuntime.queryInterface(
- com.sun.star.sdbcx.XTablesSupplier.class,
- xSource.connectWithCompletion( xHandler ) );
- com.sun.star.container.XNameAccess xTables = xSupplier.getTables();
- String[] aNames = xTables.getElementNames();
- if ( aNames.length > 0 )
- aTable = aNames[0];
- }
- catch ( Exception e )
- {
- System.out.println( "\nError: caught exception in getFirstTableName()!\n" +
- "Exception Message = "
- + e.getMessage());
- e.printStackTrace();
- }
- return aTable;
- }
-
- private void doDatabaseSamples() throws Exception
- {
- System.out.println( "\n*** Samples for database operations ***\n" );
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 2 );
-
-
- // --- put some example data into the sheet ---
- com.sun.star.table.XCellRange xRange = xSheet.getCellRangeByName( "B3:D24" );
- com.sun.star.sheet.XCellRangeData xData = ( com.sun.star.sheet.XCellRangeData )
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeData.class, xRange );
- Object[][] aValues =
- {
- { "Name", "Year", "Sales" },
- { "Alice", new Double( 2001 ), new Double( 4.0 ) },
- { "Carol", new Double( 1997 ), new Double( 3.0 ) },
- { "Carol", new Double( 1998 ), new Double( 8.0 ) },
- { "Bob", new Double( 1997 ), new Double( 8.0 ) },
- { "Alice", new Double( 2002 ), new Double( 9.0 ) },
- { "Alice", new Double( 1999 ), new Double( 7.0 ) },
- { "Alice", new Double( 1996 ), new Double( 3.0 ) },
- { "Bob", new Double( 2000 ), new Double( 1.0 ) },
- { "Carol", new Double( 1999 ), new Double( 5.0 ) },
- { "Bob", new Double( 2002 ), new Double( 1.0 ) },
- { "Carol", new Double( 2001 ), new Double( 5.0 ) },
- { "Carol", new Double( 2000 ), new Double( 1.0 ) },
- { "Carol", new Double( 1996 ), new Double( 8.0 ) },
- { "Bob", new Double( 1996 ), new Double( 7.0 ) },
- { "Alice", new Double( 1997 ), new Double( 3.0 ) },
- { "Alice", new Double( 2000 ), new Double( 9.0 ) },
- { "Bob", new Double( 1998 ), new Double( 1.0 ) },
- { "Bob", new Double( 1999 ), new Double( 6.0 ) },
- { "Carol", new Double( 2002 ), new Double( 8.0 ) },
- { "Alice", new Double( 1998 ), new Double( 5.0 ) },
- { "Bob", new Double( 2001 ), new Double( 6.0 ) }
- };
- xData.setDataArray( aValues );
-
-
- // --- filter for second column >= 1998 ---
- com.sun.star.sheet.XSheetFilterable xFilter = ( com.sun.star.sheet.XSheetFilterable )
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetFilterable.class, xRange );
- com.sun.star.sheet.XSheetFilterDescriptor xFilterDesc =
- xFilter.createFilterDescriptor( true );
- com.sun.star.sheet.TableFilterField[] aFilterFields =
- new com.sun.star.sheet.TableFilterField[1];
- aFilterFields[0] = new com.sun.star.sheet.TableFilterField();
- aFilterFields[0].Field = 1;
- aFilterFields[0].IsNumeric = true;
- aFilterFields[0].Operator = com.sun.star.sheet.FilterOperator.GREATER_EQUAL;
- aFilterFields[0].NumericValue = 1998;
- xFilterDesc.setFilterFields( aFilterFields );
- com.sun.star.beans.XPropertySet xFilterProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xFilterDesc );
- xFilterProp.setPropertyValue( "ContainsHeader", new Boolean( true ) );
- xFilter.filter( xFilterDesc );
-
-
- // --- do the same filter as above, using criteria from a cell range ---
- com.sun.star.table.XCellRange xCritRange = xSheet.getCellRangeByName( "B27:B28" );
- com.sun.star.sheet.XCellRangeData xCritData = ( com.sun.star.sheet.XCellRangeData )
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeData.class, xCritRange );
- Object[][] aCritValues =
- {
- { "Year" },
- { ">= 1998" }
- };
- xCritData.setDataArray( aCritValues );
- com.sun.star.sheet.XSheetFilterableEx xCriteria = ( com.sun.star.sheet.XSheetFilterableEx )
- UnoRuntime.queryInterface( com.sun.star.sheet.XSheetFilterableEx.class, xCritRange );
- xFilterDesc = xCriteria.createFilterDescriptorByObject( xFilter );
- if ( xFilterDesc != null )
- xFilter.filter( xFilterDesc );
-
-
- // --- sort by second column, ascending ---
- com.sun.star.table.TableSortField[] aSortFields = new com.sun.star.table.TableSortField[1];
- aSortFields[0] = new com.sun.star.table.TableSortField();
- aSortFields[0].Field = 1;
- aSortFields[0].IsAscending = false;
- aSortFields[0].IsCaseSensitive = false;
-
-
- com.sun.star.beans.PropertyValue[] aSortDesc = new com.sun.star.beans.PropertyValue[2];
- aSortDesc[0] = new com.sun.star.beans.PropertyValue();
- aSortDesc[0].Name = "SortFields";
- aSortDesc[0].Value = aSortFields;
- aSortDesc[1] = new com.sun.star.beans.PropertyValue();
- aSortDesc[1].Name = "ContainsHeader";
- aSortDesc[1].Value = new Boolean( true );
-
- com.sun.star.util.XSortable xSort = ( com.sun.star.util.XSortable )
- UnoRuntime.queryInterface( com.sun.star.util.XSortable.class, xRange );
- xSort.sort( aSortDesc );
-
-
- // --- insert subtotals ---
- com.sun.star.sheet.XSubTotalCalculatable xSub = ( com.sun.star.sheet.XSubTotalCalculatable )
- UnoRuntime.queryInterface( com.sun.star.sheet.XSubTotalCalculatable.class, xRange );
- com.sun.star.sheet.XSubTotalDescriptor xSubDesc = xSub.createSubTotalDescriptor( true );
- com.sun.star.sheet.SubTotalColumn[] aColumns = new com.sun.star.sheet.SubTotalColumn[1];
- // calculate sum of third column
- aColumns[0] = new com.sun.star.sheet.SubTotalColumn();
- aColumns[0].Column = 2;
- aColumns[0].Function = com.sun.star.sheet.GeneralFunction.SUM;
- // group by first column
- xSubDesc.addNew( aColumns, 0 );
- xSub.applySubTotals( xSubDesc, true );
-
- String aDatabase = getFirstDatabaseName();
- String aTableName = getFirstTableName( aDatabase );
- if ( aDatabase != null && aTableName != null )
- {
- // --- import from database ---
- com.sun.star.beans.PropertyValue[] aImportDesc = new com.sun.star.beans.PropertyValue[3];
- aImportDesc[0] = new com.sun.star.beans.PropertyValue();
- aImportDesc[0].Name = "DatabaseName";
- aImportDesc[0].Value = aDatabase;
- aImportDesc[1] = new com.sun.star.beans.PropertyValue();
- aImportDesc[1].Name = "SourceType";
- aImportDesc[1].Value = com.sun.star.sheet.DataImportMode.TABLE;
- aImportDesc[2] = new com.sun.star.beans.PropertyValue();
- aImportDesc[2].Name = "SourceObject";
- aImportDesc[2].Value = aTableName;
-
- com.sun.star.table.XCellRange xImportRange = xSheet.getCellRangeByName( "B35:B35" );
- com.sun.star.util.XImportable xImport = ( com.sun.star.util.XImportable )
- UnoRuntime.queryInterface( com.sun.star.util.XImportable.class, xImportRange );
- xImport.doImport( aImportDesc );
-
-
- // --- use the temporary database range to find the imported data's size ---
- com.sun.star.beans.XPropertySet xDocProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, getDocument() );
- Object aRangesObj = xDocProp.getPropertyValue( "DatabaseRanges" );
- com.sun.star.container.XNameAccess xRanges =
- (com.sun.star.container.XNameAccess) UnoRuntime.queryInterface(
- com.sun.star.container.XNameAccess.class, aRangesObj );
- String[] aNames = xRanges.getElementNames();
- AnyConverter aAnyConv = new AnyConverter();
- for ( int i=0; i<aNames.length; i++ )
- {
- Object aRangeObj = xRanges.getByName( aNames[i] );
- com.sun.star.beans.XPropertySet xRangeProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aRangeObj );
- boolean bUser = aAnyConv.toBoolean(xRangeProp.getPropertyValue( "IsUserDefined" ));
- if ( !bUser )
- {
- // this is the temporary database range - get the cell range and format it
- com.sun.star.sheet.XCellRangeReferrer xRef = ( com.sun.star.sheet.XCellRangeReferrer )
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeReferrer.class, aRangeObj );
- com.sun.star.table.XCellRange xResultRange = xRef.getReferredCells();
- com.sun.star.beans.XPropertySet xResultProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xResultRange );
- xResultProp.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
- xResultProp.setPropertyValue( "CellBackColor", new Integer( 0xFFFFCC ) );
- }
- }
- }
- else
- System.out.println("can't get database");
- }
-
-// ________________________________________________________________
-
- private void doDataPilotSamples() throws Exception
- {
- System.out.println( "\n*** Samples for Data Pilot ***\n" );
- com.sun.star.sheet.XSpreadsheet xSheet = getSpreadsheet( 0 );
-
-
- // --- Create a new DataPilot table ---
- prepareRange( xSheet, "A38:C38", "Data Pilot" );
- com.sun.star.sheet.XDataPilotTablesSupplier xDPSupp = (com.sun.star.sheet.XDataPilotTablesSupplier)
- UnoRuntime.queryInterface( com.sun.star.sheet.XDataPilotTablesSupplier.class, xSheet );
- com.sun.star.sheet.XDataPilotTables xDPTables = xDPSupp.getDataPilotTables();
- com.sun.star.sheet.XDataPilotDescriptor xDPDesc = xDPTables.createDataPilotDescriptor();
- // set source range (use data range from CellRange test)
- com.sun.star.table.CellRangeAddress aSourceAddress = createCellRangeAddress( xSheet, "A10:C30" );
- xDPDesc.setSourceRange( aSourceAddress );
- // settings for fields
- com.sun.star.container.XIndexAccess xFields = xDPDesc.getDataPilotFields();
- Object aFieldObj;
- com.sun.star.beans.XPropertySet xFieldProp;
- // use first column as column field
- aFieldObj = xFields.getByIndex(0);
- xFieldProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aFieldObj );
- xFieldProp.setPropertyValue( "Orientation", com.sun.star.sheet.DataPilotFieldOrientation.COLUMN );
- // use second column as row field
- aFieldObj = xFields.getByIndex(1);
- xFieldProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aFieldObj );
- xFieldProp.setPropertyValue( "Orientation", com.sun.star.sheet.DataPilotFieldOrientation.ROW );
- // use third column as data field, calculating the sum
- aFieldObj = xFields.getByIndex(2);
- xFieldProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aFieldObj );
- xFieldProp.setPropertyValue( "Orientation", com.sun.star.sheet.DataPilotFieldOrientation.DATA );
- xFieldProp.setPropertyValue( "Function", com.sun.star.sheet.GeneralFunction.SUM );
- // select output position
- com.sun.star.table.CellAddress aDestAddress = createCellAddress( xSheet, "A40" );
- xDPTables.insertNewByName( "DataPilotExample", aDestAddress, xDPDesc );
-
-
- // --- Modify the DataPilot table ---
- Object aDPTableObj = xDPTables.getByName( "DataPilotExample" );
- xDPDesc = (com.sun.star.sheet.XDataPilotDescriptor)
- UnoRuntime.queryInterface( com.sun.star.sheet.XDataPilotDescriptor.class, aDPTableObj );
- xFields = xDPDesc.getDataPilotFields();
- // add a second data field from the third column, calculating the average
- aFieldObj = xFields.getByIndex(2);
- xFieldProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aFieldObj );
- xFieldProp.setPropertyValue( "Orientation", com.sun.star.sheet.DataPilotFieldOrientation.DATA );
- xFieldProp.setPropertyValue( "Function", com.sun.star.sheet.GeneralFunction.AVERAGE );
- }
-
-// ________________________________________________________________
-
- private void doFunctionAccessSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for function handling ***\n" );
- com.sun.star.lang.XMultiComponentFactory xServiceManager = getServiceManager();
-
-
- // --- Calculate a function ---
- Object aFuncInst = xServiceManager.createInstanceWithContext(
- "com.sun.star.sheet.FunctionAccess", getContext());
- com.sun.star.sheet.XFunctionAccess xFuncAcc =
- (com.sun.star.sheet.XFunctionAccess)UnoRuntime.queryInterface(
- com.sun.star.sheet.XFunctionAccess.class, aFuncInst );
- // put the data in a two-dimensional array
- double[][] aData = { { 1.0, 2.0, 3.0 } };
- // construct the array of function arguments
- Object[] aArgs = new Object[2];
- aArgs[0] = aData;
- aArgs[1] = new Double( 2.0 );
- Object aResult = xFuncAcc.callFunction( "ZTEST", aArgs );
- System.out.println("ZTEST result for data {1,2,3} and value 2 is "
- + ((Double)aResult).doubleValue() );
-
-
- // --- Get the list of recently used functions ---
- Object aRecInst = xServiceManager.createInstanceWithContext(
- "com.sun.star.sheet.RecentFunctions", getContext());
- com.sun.star.sheet.XRecentFunctions xRecFunc =
- (com.sun.star.sheet.XRecentFunctions)UnoRuntime.queryInterface(
- com.sun.star.sheet.XRecentFunctions.class, aRecInst );
- int[] nRecentIds = xRecFunc.getRecentFunctionIds();
-
-
- // --- Get the names for these functions ---
- Object aDescInst = xServiceManager.createInstanceWithContext(
- "com.sun.star.sheet.FunctionDescriptions", getContext());
- com.sun.star.sheet.XFunctionDescriptions xFuncDesc =
- (com.sun.star.sheet.XFunctionDescriptions)UnoRuntime.queryInterface(
- com.sun.star.sheet.XFunctionDescriptions.class, aDescInst );
- System.out.print("Recently used functions: ");
- for (int nFunction=0; nFunction<nRecentIds.length; nFunction++)
- {
- com.sun.star.beans.PropertyValue[] aProperties =
- xFuncDesc.getById( nRecentIds[nFunction] );
- for (int nProp=0; nProp<aProperties.length; nProp++)
- if ( aProperties[nProp].Name.equals( "Name" ) )
- System.out.print( aProperties[nProp].Value + " " );
- }
- System.out.println();
- }
-
-// ________________________________________________________________
-
- private void doApplicationSettingsSamples() throws RuntimeException, Exception
- {
- System.out.println( "\n*** Samples for application settings ***\n" );
- com.sun.star.lang.XMultiComponentFactory xServiceManager = getServiceManager();
-
-
- // --- Get the user defined sort lists ---
- Object aSettings = xServiceManager.createInstanceWithContext(
- "com.sun.star.sheet.GlobalSheetSettings", getContext());
- com.sun.star.beans.XPropertySet xPropSet =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, aSettings );
- AnyConverter aAnyConv = new AnyConverter();
- String[] aEntries = (String[])
- aAnyConv.toObject(String[].class,
- xPropSet.getPropertyValue( "UserLists" ));
- System.out.println("User defined sort lists:");
- for ( int i=0; i<aEntries.length; i++ )
- System.out.println( aEntries[i] );
- }
-
-// ________________________________________________________________
-
-}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java
deleted file mode 100644
index 36a3029b..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-// __________ implementation ____________________________________
-
-/** Create and modify a spreadsheet view.
- */
-public class ViewSample extends SpreadsheetDocHelper
-{
-
-// ________________________________________________________________
-
- public static void main( String args[] )
- {
- try
- {
- ViewSample aSample = new ViewSample( args );
- aSample.doSampleFunction();
- }
- catch (Exception ex)
- {
- System.out.println( "Sample caught exception! " + ex );
- System.exit( 1 );
- }
- System.out.println( "\nSamples done." );
- System.exit( 0 );
- }
-
-// ________________________________________________________________
-
- public ViewSample( String[] args )
- {
- super( args );
- }
-
-// ________________________________________________________________
-
- /** This sample function performs all changes on the view. */
- public void doSampleFunction() throws Exception
- {
- com.sun.star.sheet.XSpreadsheetDocument xDoc = getDocument();
- com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)
- UnoRuntime.queryInterface( com.sun.star.frame.XModel.class, xDoc);
- com.sun.star.frame.XController xController = xModel.getCurrentController();
-
- // --- Spreadsheet view ---
- // freeze the first column and first two rows
- com.sun.star.sheet.XViewFreezable xFreeze = (com.sun.star.sheet.XViewFreezable)
- UnoRuntime.queryInterface( com.sun.star.sheet.XViewFreezable.class, xController );
- if ( null != xFreeze )
- System.out.println( "got xFreeze" );
- xFreeze.freezeAtPosition( 1, 2 );
-
- // --- View pane ---
- // get the cell range shown in the second pane and assign a cell background to them
- com.sun.star.container.XIndexAccess xIndex = (com.sun.star.container.XIndexAccess)
- UnoRuntime.queryInterface( com.sun.star.container.XIndexAccess.class, xController );
- Object aPane = xIndex.getByIndex(1);
- com.sun.star.sheet.XCellRangeReferrer xRefer = (com.sun.star.sheet.XCellRangeReferrer)
- UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeReferrer.class, aPane );
- com.sun.star.table.XCellRange xRange = xRefer.getReferredCells();
- com.sun.star.beans.XPropertySet xRangeProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xRange );
- xRangeProp.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
- xRangeProp.setPropertyValue( "CellBackColor", new Integer( 0xFFFFCC ) );
-
- // --- View settings ---
- // change the view to display green grid lines
- com.sun.star.beans.XPropertySet xProp = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xController );
- xProp.setPropertyValue( "ShowGrid", new Boolean(true) );
- xProp.setPropertyValue( "GridColor", new Integer(0x00CC00) );
-
- // --- Range selection ---
- // let the user select a range and use it as the view's selection
- com.sun.star.sheet.XRangeSelection xRngSel = (com.sun.star.sheet.XRangeSelection)
- UnoRuntime.queryInterface( com.sun.star.sheet.XRangeSelection.class, xController );
- ExampleRangeListener aListener = new ExampleRangeListener();
- xRngSel.addRangeSelectionListener( aListener );
- com.sun.star.beans.PropertyValue[] aArguments = new com.sun.star.beans.PropertyValue[2];
- aArguments[0] = new com.sun.star.beans.PropertyValue();
- aArguments[0].Name = "Title";
- aArguments[0].Value = "Please select a cell range (e.g. C4:E6)";
- aArguments[1] = new com.sun.star.beans.PropertyValue();
- aArguments[1].Name = "CloseOnMouseRelease";
- aArguments[1].Value = new Boolean(true);
- xRngSel.startRangeSelection( aArguments );
- synchronized (aListener)
- {
- aListener.wait(); // wait until the selection is done
- }
- xRngSel.removeRangeSelectionListener( aListener );
- if ( aListener.aResult != null && aListener.aResult.length() != 0 )
- {
- com.sun.star.view.XSelectionSupplier xSel = (com.sun.star.view.XSelectionSupplier)
- UnoRuntime.queryInterface( com.sun.star.view.XSelectionSupplier.class, xController );
- com.sun.star.sheet.XSpreadsheetView xView = (com.sun.star.sheet.XSpreadsheetView)
- UnoRuntime.queryInterface( com.sun.star.sheet.XSpreadsheetView.class, xController );
- com.sun.star.sheet.XSpreadsheet xSheet = xView.getActiveSheet();
- com.sun.star.table.XCellRange xResultRange = xSheet.getCellRangeByName( aListener.aResult );
- xSel.select( xResultRange );
- }
- }
-
-// ________________________________________________________________
-
- // listener to react on finished selection
-
- private class ExampleRangeListener implements com.sun.star.sheet.XRangeSelectionListener
- {
- public String aResult;
-
- public void done( com.sun.star.sheet.RangeSelectionEvent aEvent )
- {
- aResult = aEvent.RangeDescriptor;
- synchronized (this)
- {
- notify();
- }
- }
-
- public void aborted( com.sun.star.sheet.RangeSelectionEvent aEvent )
- {
- synchronized (this)
- {
- notify();
- }
- }
-
- public void disposing( com.sun.star.lang.EventObject aObj )
- {
- }
- }
-
-// ________________________________________________________________
-
-}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/XExampleAddIn.idl b/odk/examples/DevelopersGuide/Spreadsheet/XExampleAddIn.idl
deleted file mode 100644
index 6f6a48f3..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/XExampleAddIn.idl
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _ORG_OPENOFFICE_SHEET_ADDIN_XEXAMPLEADDIN_IDL_
-#define _ORG_OPENOFFICE_SHEET_ADDIN_XEXAMPLEADDIN_IDL_
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/sheet/XVolatileResult.idl>
-
-module org {
- module openoffice {
- module sheet {
- module addin {
- /// The interface that the example addin implements
- interface XExampleAddIn : com::sun::star::uno::XInterface
- {
- /// Sample function that just increments a value.
- long getIncremented( [in] long nValue );
-
- /// Sample function that returns a volatile result.
- com::sun::star::sheet::XVolatileResult getCounter( [in] string aName );
- };
- };
- };
- };
-};
-
-#endif
-
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/makefile.mk b/odk/examples/DevelopersGuide/Spreadsheet/makefile.mk
deleted file mode 100644
index e853066e..00000000
--- a/odk/examples/DevelopersGuide/Spreadsheet/makefile.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-SPREADSHEET_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/ExampleAddIn.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/ExampleAddIn.ods \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/ExampleDataPilotSource.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/GeneralTableSample.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/SpreadsheetDocHelper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/SpreadsheetSample.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/ViewSample.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/XExampleAddIn.idl \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Spreadsheet$/DataPilotReadme.txt
-
-DIR_FILE_LIST= \
- $(SPREADSHEET_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_spreadsheet_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_spreadsheet.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/Text/Makefile b/odk/examples/DevelopersGuide/Text/Makefile
deleted file mode 100644
index 3f192809..00000000
--- a/odk/examples/DevelopersGuide/Text/Makefile
+++ /dev/null
@@ -1,96 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Text example of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=TextExample
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-APP1_NAME=TextDocuments
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_CLASS_OUT)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $<
-
-$(SAMPLE_CLASS_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(SAMPLE_CLASS_OUT)/$(APP1_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP1_NAME).class
-
-$(SAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/savetest)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< "$(SAMPLE_GEN_OUT)/savetest"
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
diff --git a/odk/examples/DevelopersGuide/Text/PrintDemo.odt b/odk/examples/DevelopersGuide/Text/PrintDemo.odt
deleted file mode 100644
index 1b02d883..00000000
--- a/odk/examples/DevelopersGuide/Text/PrintDemo.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java
deleted file mode 100644
index d226be41..00000000
--- a/odk/examples/DevelopersGuide/Text/TextDocuments.java
+++ /dev/null
@@ -1,1792 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.Point;
-import com.sun.star.awt.Size;
-import com.sun.star.awt.FontWeight;
-
-import com.sun.star.beans.PropertyState;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.beans.XPropertyState;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-
-import com.sun.star.comp.servicemanager.ServiceManager;
-
-import com.sun.star.connection.XConnector;
-import com.sun.star.connection.XConnection;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNameContainer;
-import com.sun.star.container.XNamed;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.container.XIndexReplace;
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
-
-import com.sun.star.drawing.XShape;
-import com.sun.star.drawing.XShapeGrouper;
-import com.sun.star.drawing.XShapes;
-import com.sun.star.drawing.XDrawPageSupplier;
-
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XController;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-
-import com.sun.star.style.NumberingType;
-import com.sun.star.style.XStyle;
-import com.sun.star.style.XStyleFamiliesSupplier;
-
-import com.sun.star.table.XCell;
-
-import com.sun.star.text.ControlCharacter;
-import com.sun.star.text.ReferenceFieldSource;
-import com.sun.star.text.ReferenceFieldPart;
-import com.sun.star.text.TextColumn;
-import com.sun.star.text.TextContentAnchorType;
-import com.sun.star.text.XAutoTextContainer;
-import com.sun.star.text.XAutoTextGroup;
-import com.sun.star.text.XAutoTextEntry;
-import com.sun.star.text.XDependentTextField;
-import com.sun.star.text.XDocumentIndex;
-import com.sun.star.text.XFootnote;
-import com.sun.star.text.XFootnotesSupplier;
-import com.sun.star.text.XParagraphCursor;
-import com.sun.star.text.XReferenceMarksSupplier;
-import com.sun.star.text.XRelativeTextContentInsert;
-import com.sun.star.text.XSentenceCursor;
-import com.sun.star.text.XSimpleText;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextColumns;
-import com.sun.star.text.XTextContent;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextField;
-import com.sun.star.text.XTextFrame;
-import com.sun.star.text.XTextRange;
-import com.sun.star.text.XTextSection;
-import com.sun.star.text.XTextTable;
-import com.sun.star.text.XTextTableCursor;
-import com.sun.star.text.XTextTablesSupplier;
-import com.sun.star.text.XTextFieldsSupplier;
-import com.sun.star.text.XBookmarksSupplier;
-import com.sun.star.text.XTextViewCursorSupplier;
-import com.sun.star.text.XTextViewCursor;
-import com.sun.star.text.XPageCursor;
-
-import com.sun.star.text.XWordCursor;
-
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
-
-import com.sun.star.util.XRefreshable;
-
-import com.sun.star.frame.XStorable;
-import com.sun.star.view.XPrintable;
-
-import java.lang.Math;
-import java.util.Random;
-import java.util.Hashtable;
-
-/*
- * TextDocuments.java
- *
- * Created on 11. April 2002, 08:47
- */
-
-/**
- *
- * @author Martin Gallwey, Dietrich Schulten
- */
-public class TextDocuments {
- // adjust these constant to your local printer!
- private static String sOutputDir;
-
- private String aPrinterName = "\\\\so-print\\xml3sof";
-
- private XComponentContext mxRemoteContext = null;
- private XMultiComponentFactory mxRemoteServiceManager = null;
- private XTextDocument mxDoc = null;
- private XMultiServiceFactory mxDocFactory = null;
- private XMultiServiceFactory mxFactory = null;
- private XPropertySet mxDocProps = null;
- private XText mxDocText = null;
- private XTextCursor mxDocCursor = null;
- private XTextContent mxFishSection = null;
- private Random maRandom = null;
-
- /** Creates a new instance of TextDocuments */
- public TextDocuments() {
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- TextDocuments textDocuments1 = new TextDocuments();
- try {
- // output directory for store test;
- sOutputDir = args[0];
-
- textDocuments1.runDemo();
- }
- catch (java.lang.Exception e){
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- finally {
- System.exit(0);
- }
- }
-
- protected void runDemo() throws java.lang.Exception {
- storePrintExample(); // depends on printer name
- templateExample();
- viewCursorExample(); // makes changes to the current document,
- // use with care
- editingExample();
- }
-
- /** Sample for use of templates
- * This sample uses the file TextTemplateWithUserFields.odt from the Samples
- * folder. The file contains a number of User text fields (Variables - User)
- * and a bookmark which we use to fill in various values
- */
- protected void templateExample() throws java.lang.Exception {
- // create a small hashtable that simulates a rowset
- Hashtable recipient = new Hashtable();
- recipient.put("Company", "Manatee Books");
- recipient.put("Contact", "Rod Martin");
- recipient.put("ZIP", "34567");
- recipient.put("City", "Fort Lauderdale");
- recipient.put("State", "Florida");
-
- // load template with User fields and bookmark
- java.io.File sourceFile = new java.io.File("TextTemplateWithUserFields.odt");
- StringBuffer sTemplateFileUrl = new StringBuffer("file:///");
- sTemplateFileUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- XComponent xTemplateComponent =
- newDocComponentFromTemplate( sTemplateFileUrl.toString() );
-
- // get XTextFieldsSupplier, XBookmarksSupplier interfaces
- XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier)
- UnoRuntime.queryInterface(XTextFieldsSupplier.class,
- xTemplateComponent);
- XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier)
- UnoRuntime.queryInterface(XBookmarksSupplier.class, xTemplateComponent);
-
- // access the TextFields and the TextFieldMasters collections
- XNameAccess xNamedFieldMasters = xTextFieldsSupplier.getTextFieldMasters();
- XEnumerationAccess xEnumeratedFields = xTextFieldsSupplier.getTextFields();
-
- // iterate over hashtable and insert values into field masters
- java.util.Enumeration keys = recipient.keys();
- while(keys.hasMoreElements()) {
- // get column name
- String key = (String)keys.nextElement();
-
- // access corresponding field master
- Object fieldMaster = xNamedFieldMasters.getByName(
- "com.sun.star.text.fieldmaster.User." + key);
-
- // query the XPropertySet interface, we need to set the Content property
- XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, fieldMaster);
-
- // insert the column value into field master
- xPropertySet.setPropertyValue("Content", recipient.get(key));
- }
- // afterwards we must refresh the textfields collection
- XRefreshable xRefreshable = (XRefreshable)UnoRuntime.queryInterface(
- XRefreshable.class, xEnumeratedFields);
- xRefreshable.refresh();
-
- // accessing the Bookmarks collection of the document
- XNameAccess xNamedBookmarks = xBookmarksSupplier.getBookmarks();
-
- // find the bookmark named "Subscription"
- Object bookmark = xNamedBookmarks.getByName("Subscription");
- // we need its XTextRange which is available from getAnchor(),
- // so query for XTextContent
- XTextContent xBookmarkContent = (XTextContent)UnoRuntime.queryInterface(
- XTextContent.class, bookmark);
- // get the anchor of the bookmark (its XTextRange)
- XTextRange xBookmarkRange = xBookmarkContent.getAnchor();
- // set string at the bookmark position
- xBookmarkRange.setString("subscription for the Manatee Journal");
-
- }
-
- /** Sample for document changes, starting at the current view cursor position
- * The sample changes the paragraph style and the character style at the
- * current view cursor selection Open the sample file ViewCursorExampleFile,
- * select some text and run the example.
- * The current paragraph will be set to Quotations paragraph style.
- * The selected text will be set to Quotation character style.
- */
- private void viewCursorExample() throws java.lang.Exception {
- // get the remote service manager
- mxRemoteServiceManager = this.getRemoteServiceManager();
- // get the Desktop service
- Object desktop = mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", mxRemoteContext);
- // query its XDesktop interface, we need the current component
- XDesktop xDesktop = (XDesktop)UnoRuntime.queryInterface(
- XDesktop.class, desktop);
- // retrieve the current component and access the controller
- XComponent xCurrentComponent = xDesktop.getCurrentComponent();
- XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
- xCurrentComponent);
- XController xController = xModel.getCurrentController();
- // the controller gives us the TextViewCursor
- XTextViewCursorSupplier xViewCursorSupplier =
- (XTextViewCursorSupplier)UnoRuntime.queryInterface(
- XTextViewCursorSupplier.class, xController);
- XTextViewCursor xViewCursor = xViewCursorSupplier.getViewCursor();
-
- // query its XPropertySet interface, we want to set character and paragraph
- // properties
- XPropertySet xCursorPropertySet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xViewCursor);
- // set the appropriate properties for character and paragraph style
- xCursorPropertySet.setPropertyValue("CharStyleName", "Quotation");
- xCursorPropertySet.setPropertyValue("ParaStyleName", "Quotations");
- // print the current page number
- XPageCursor xPageCursor = (XPageCursor)UnoRuntime.queryInterface(
- XPageCursor.class, xViewCursor);
- System.out.println("The current page number is " + xPageCursor.getPage());
- // the model cursor is much more powerful, so
- // we create a model cursor at the current view cursor position with the
- // following steps:
- // get the Text service from the TextViewCursor, it is an XTextRange:
- XText xDocumentText = xViewCursor.getText();
- // create a model cursor from the viewcursor
- XTextCursor xModelCursor = xDocumentText.createTextCursorByRange(
- xViewCursor.getStart());
- // now we could query XWordCursor, XSentenceCursor and XParagraphCursor
- // or XDocumentInsertable, XSortable or XContentEnumerationAccess
- // and work with the properties of com.sun.star.text.TextCursor
- // in this case we just go to the end of the paragraph and add some text.
- XParagraphCursor xParagraphCursor = (XParagraphCursor)
- UnoRuntime.queryInterface(XParagraphCursor.class, xModelCursor);
- // goto the end of the paragraph
- xParagraphCursor.gotoEndOfParagraph(false);
- xParagraphCursor.setString(" ***** Fin de semana! ******");
- }
-
-
- /** Sample for the various editing facilities described in the
- * developer's manual
- */
- private void editingExample () throws java.lang.Exception {
- // create empty swriter document
- XComponent xEmptyWriterComponent = newDocComponent("swriter");
- // query its XTextDocument interface to get the text
- mxDoc = (XTextDocument)UnoRuntime.queryInterface(
- XTextDocument.class, xEmptyWriterComponent);
-
- // get a reference to the body text of the document
- mxDocText = mxDoc.getText();
-
- // Get a reference to the document's property set. This contains document
- // information like the current word count
- mxDocProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, mxDoc );
-
- // Simple text insertion example
- BodyTextExample ();
- // Example using text ranges to insert strings at the beginning or end
- // of a text range
- TextRangeExample ();
- // Create a document cursor and remember it, it will be used in most
- // of the following examples
- mxDocCursor = mxDocText.createTextCursor();
- // Demonstrate some of the different cursor types (word, sentence)
- TextCursorExample ();
-
- // Access the text document's multi service factory, which we will need
- // for most of the following examples
- mxDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(
- XMultiServiceFactory.class, mxDoc );
-
- // Examples of text fields, dependant text fields and field masters
- TextFieldExample ();
-
- // Example of using an XEnumerationAccess to iterate over paragraphs and
- // set properties of each paragraph as we do so
- ParagraphExample ();
-
- // Example of creating and manipulating a text frame
- TextFrameExample ();
-
- // Example of creating and manipulating a text table, text table rows
- // and text table cells get a new random generator
- maRandom = new Random();
- TextTableExample ();
-
- // Example of creating, inserting and manipulating text sections, as
- // well as an example of how to refresh the document
- TextSectionExample ();
-
- // Example of creating a text section over a block of text and formatting
- // the text section into columns, as well as how to insert an empty
- // paragraph using the XRelativeTextContentInsert
- TextColumnsExample ();
-
- // Example of creating the NumberingRules service and adjusting
- // NumberingTypes and NumberingLevels
- NumberingExample ();
-
- // Example of how to use the XStyleFamiliesSupplier interface of the
- // document and how to create, insert and apply styles
- StylesExample ();
- IndexExample ();
-
- // Example of how to create and manipulate reference marks and GetReference
- // text fields
- ReferenceExample ();
-
- // Example of how to create and insert Footnotes and how to use the
- // XFootnotesSupplier interface of the document
- FootnoteExample ();
-
- // This method demonstrates how to create shapes from the document factory
- // and how to access the draw page of the document using the
- // XDrawPageSupplier interface
- DrawPageExample ();
-
- mxFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, mxRemoteServiceManager);
- // This example demonstrates the use of the AutoTextContainer,
- // AutoTextGroup and AutoTextEntry services and shows how to create,
- // insert and modify auto text blocks
- AutoTextExample ();
- }
-
- protected void storePrintExample() throws java.lang.Exception {
- // get the remote service manager
- mxRemoteServiceManager = this.getRemoteServiceManager();
- // retrieve the Desktop object, we need its XComponentLoader
- Object desktop = mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", mxRemoteContext);
- XComponentLoader xComponentLoader = (XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, desktop);
- PropertyValue[] loadProps = new PropertyValue[0];
-
- java.io.File sourceFile = new java.io.File("PrintDemo.odt");
- StringBuffer sLoadFileUrl = new StringBuffer("file:///");
- sLoadFileUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- XComponent xDoc = xComponentLoader.loadComponentFromURL(
- sLoadFileUrl.toString(), "_blank", 0, loadProps);
-
- if ( xDoc != null ) {
- sourceFile = new java.io.File(sOutputDir);
- StringBuffer sStoreFileUrl = new StringBuffer();
- sStoreFileUrl.append(sourceFile.toURI().toURL().toString());
- sStoreFileUrl.append("somepopularfileformat.doc");
-
- storeDocComponent(xDoc, sStoreFileUrl.toString() );
- printDocComponent(xDoc);
- }
- }
-
- private XMultiComponentFactory getRemoteServiceManager()
- throws java.lang.Exception
- {
- if (mxRemoteContext == null && mxRemoteServiceManager == null) {
- // get the remote office context. If necessary a new office
- // process is started
- mxRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- mxRemoteServiceManager = mxRemoteContext.getServiceManager();
- }
- return mxRemoteServiceManager;
- }
-
- protected XComponent newDocComponent(String docType)
- throws java.lang.Exception
- {
- String loadUrl = "private:factory/" + docType;
- mxRemoteServiceManager = this.getRemoteServiceManager();
- Object desktop = mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", mxRemoteContext);
- XComponentLoader xComponentLoader = (XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, desktop);
- PropertyValue[] loadProps = new PropertyValue[0];
- return xComponentLoader.loadComponentFromURL(loadUrl, "_blank",
- 0, loadProps);
- }
-
- /** Load a document as template
- */
- protected XComponent newDocComponentFromTemplate(String loadUrl)
- throws java.lang.Exception
- {
- // get the remote service manager
- mxRemoteServiceManager = this.getRemoteServiceManager();
- // retrieve the Desktop object, we need its XComponentLoader
- Object desktop = mxRemoteServiceManager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", mxRemoteContext);
- XComponentLoader xComponentLoader = (XComponentLoader)
- UnoRuntime.queryInterface(XComponentLoader.class, desktop);
-
- // define load properties according to com.sun.star.document.MediaDescriptor
- // the boolean property AsTemplate tells the office to create a new document
- // from the given file
- PropertyValue[] loadProps = new PropertyValue[1];
- loadProps[0] = new PropertyValue();
- loadProps[0].Name = "AsTemplate";
- loadProps[0].Value = new Boolean(true);
- // load
- return xComponentLoader.loadComponentFromURL(loadUrl, "_blank",
- 0, loadProps);
- }
-
- /** Load a document with arguments (text purposes)
- */
- protected void storeDocComponent(XComponent xDoc, String storeUrl)
- throws java.lang.Exception
- {
-
- XStorable xStorable = (XStorable)UnoRuntime.queryInterface(
- XStorable.class, xDoc);
- PropertyValue[] storeProps = new PropertyValue[1];
- storeProps[0] = new PropertyValue();
- storeProps[0].Name = "FilterName";
- storeProps[0].Value = "MS Word 97";
-
- System.out.println("... store \"PrintDemo.odt\" to \"" + storeUrl + "\".");
- xStorable.storeAsURL(storeUrl, storeProps);
- }
-
- protected void printDocComponent(XComponent xDoc) throws java.lang.Exception {
- XPrintable xPrintable = (XPrintable)UnoRuntime.queryInterface(
- XPrintable.class, xDoc);
- PropertyValue[] printerDesc = new PropertyValue[1];
- printerDesc[0] = new PropertyValue();
- printerDesc[0].Name = "Name";
- printerDesc[0].Value = aPrinterName;
-
- xPrintable.setPrinter(printerDesc);
-
- PropertyValue[] printOpts = new PropertyValue[1];
- printOpts[0] = new PropertyValue();
- printOpts[0].Name = "Pages";
- printOpts[0].Value = "1";
-
- xPrintable.print(printOpts);
- }
-
- // Setting the whole text of a document as one string
- protected void BodyTextExample ()
- {
- // Body Text and TextDocument example
- try
- {
- // demonstrate simple text insertion
- mxDocText.setString ( "This is the new body text of the document."
- + "\n\nThis is on the second line.\n\n" );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- // Adding a string at the end or the beginning of text
- protected void TextRangeExample ()
- {
- try
- {
- // Get a text range refering to the beginning of the text document
- XTextRange xStart = mxDocText.getStart();
- // use setString to insert text at the beginning
- xStart.setString ( "This is text inserted at the beginning.\n\n" );
- // Get a text range refering to the end of the text document
- XTextRange xEnd = mxDocText.getEnd();
- // use setString to insert text at the end
- xEnd.setString ( "This is text inserted at the end.\n\n" );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** moving a text cursor, selecting text and overwriting it
- */
- protected void TextCursorExample ()
- {
- try
- {
- // First, get the XSentenceCursor interface of our text cursor
- XSentenceCursor xSentenceCursor = (XSentenceCursor)
- UnoRuntime.queryInterface(XSentenceCursor.class, mxDocCursor );
- // Goto the next cursor, without selecting it
- xSentenceCursor.gotoNextSentence( false );
- // Get the XWordCursor interface of our text cursor
- XWordCursor xWordCursor = (XWordCursor) UnoRuntime.queryInterface(
- XWordCursor.class, mxDocCursor );
- // Skip the first four words of this sentence and select the fifth
- xWordCursor.gotoNextWord( false );
- xWordCursor.gotoNextWord( false );
- xWordCursor.gotoNextWord( false );
- xWordCursor.gotoNextWord( false );
- xWordCursor.gotoNextWord( true );
- // Use the XSimpleText interface to insert a word at the current cursor
- // location, over-writing the current selection (the fifth word
- // selected above)
- mxDocText.insertString ( xWordCursor, "old ", true );
-
- // Access the property set of the cursor, and set the currently
- // selected text (which is the string we just inserted) to be bold
- XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, mxDocCursor );
- xCursorProps.setPropertyValue ( "CharWeight",
- new Float(com.sun.star.awt.FontWeight.BOLD) );
-
- // replace the '.' at the end of the sentence with a new string
- xSentenceCursor.gotoEndOfSentence( false );
- xWordCursor.gotoPreviousWord( true );
- mxDocText.insertString (xWordCursor,
- ", which has been changed with text cursors!",
- true);
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method inserts both a date field and a user field containing the
- * number '42'
- */
- protected void TextFieldExample ()
- {
- try
- {
- // Use the text document's factory to create a DateTime text field,
- // and access it's XTextField interface
- XTextField xDateField = (XTextField) UnoRuntime.queryInterface (
- XTextField.class, mxDocFactory.createInstance (
- "com.sun.star.text.TextField.DateTime" ) );
-
- // Insert it at the end of the document
- mxDocText.insertTextContent ( mxDocText.getEnd(), xDateField, false );
-
- // Use the text document's factory to create a user text field,
- // and access it's XDependentTextField interface
- XDependentTextField xUserField =
- (XDependentTextField) UnoRuntime.queryInterface (
- XDependentTextField.class, mxDocFactory.createInstance (
- "com.sun.star.text.TextField.User" ) );
-
- // Create a fieldmaster for our newly created User Text field, and
- // access it's XPropertySet interface
- XPropertySet xMasterPropSet = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, mxDocFactory.createInstance (
- "com.sun.star.text.fieldmaster.User" ) );
-
- // Set the name and value of the FieldMaster
- xMasterPropSet.setPropertyValue ( "Name", "UserEmperor" );
- xMasterPropSet.setPropertyValue ( "Value", new Integer ( 42 ) );
-
- // Attach the field master to the user field
- xUserField.attachTextFieldMaster ( xMasterPropSet );
-
- // Move the cursor to the end of the document
- mxDocCursor.gotoEnd( false );
- // insert a paragraph break using the XSimpleText interface
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
-
- // Insert the user field at the end of the document
- mxDocText.insertTextContent ( mxDocText.getEnd(), xUserField, false );
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to iterate over paragraphs
- */
- protected void ParagraphExample ()
- {
- try
- {
- // The service 'com.sun.star.text.Text' supports the XEnumerationAccess
- // interface to provide an enumeration of the paragraphs contained by
- // the text the service refers to.
-
- // Here, we access this interface
- XEnumerationAccess xParaAccess = (XEnumerationAccess)
- UnoRuntime.queryInterface(XEnumerationAccess.class, mxDocText );
- // Call the XEnumerationAccess's only method to access the actual
- // Enumeration
- XEnumeration xParaEnum = xParaAccess.createEnumeration();
-
- // While there are paragraphs, do things to them
- while ( xParaEnum.hasMoreElements() )
- {
- // Get a reference to the next paragraphs XServiceInfo interface.
- // TextTables are also part of this enumeration access, so we ask
- // the element if it is a TextTable, if it doesn't support the
- // com.sun.star.text.TextTable service, then it is safe to assume
- // that it really is a paragraph
- XServiceInfo xInfo = (XServiceInfo) UnoRuntime.queryInterface(
- XServiceInfo.class, xParaEnum.nextElement() );
- if ( !xInfo.supportsService ( "com.sun.star.text.TextTable" ) )
- {
- // Access the paragraph's property set...the properties in this
- // property set are listed in:
- // com.sun.star.style.ParagraphProperties
- XPropertySet xSet = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xInfo );
- // Set the justification to be center justified
- xSet.setPropertyValue ( "ParaAdjust",
- com.sun.star.style.ParagraphAdjust.CENTER );
- }
- }
- }
- catch ( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /** This method returns a random double which isn't too high or too low
- */
- protected double getRandomDouble ()
- {
- return ( ( maRandom.nextInt() % 1000 ) * maRandom.nextDouble () );
- }
-
- /** This method sets the text colour of the cell refered to by sCellName to
- white and inserts the string sText in it
- */
- protected static void insertIntoCell(String sCellName, String sText,
- XTextTable xTable)
- {
- // Access the XText interface of the cell referred to by sCellName
- XText xCellText = (XText) UnoRuntime.queryInterface(
- XText.class, xTable.getCellByName ( sCellName ) );
-
- // create a text cursor from the cells XText interface
- XTextCursor xCellCursor = xCellText.createTextCursor();
- // Get the property set of the cell's TextCursor
- XPropertySet xCellCursorProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCellCursor );
-
- try
- {
- // Set the colour of the text to white
- xCellCursorProps.setPropertyValue( "CharColor", new Integer(16777215));
- }
- catch ( Exception e)
- {
- e.printStackTrace();
- }
- // Set the text in the cell to sText
- xCellText.setString( sText );
- }
-
- /** This method shows how to create and insert a text table, as well as insert
- text and formulae into the cells of the table
- */
- protected void TextTableExample ()
- {
- try
- {
- // Create a new table from the document's factory
- XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
- XTextTable.class, mxDocFactory .createInstance(
- "com.sun.star.text.TextTable" ) );
-
- // Specify that we want the table to have 4 rows and 4 columns
- xTable.initialize( 4, 4 );
-
- // Insert the table into the document
- mxDocText.insertTextContent( mxDocCursor, xTable, false);
- // Get an XIndexAccess of the table rows
- XIndexAccess xRows = xTable.getRows();
-
- // Access the property set of the first row (properties listed in
- // service description: com.sun.star.text.TextTableRow)
- XPropertySet xRow = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xRows.getByIndex ( 0 ) );
- // If BackTransparant is false, then the background color is visible
- xRow.setPropertyValue( "BackTransparent", new Boolean(false));
- // Specify the color of the background to be dark blue
- xRow.setPropertyValue( "BackColor", new Integer(6710932));
-
- // Access the property set of the whole table
- XPropertySet xTableProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xTable );
- // We want visible background colors
- xTableProps.setPropertyValue( "BackTransparent", new Boolean(false));
- // Set the background colour to light blue
- xTableProps.setPropertyValue( "BackColor", new Integer(13421823));
-
- // set the text (and text colour) of all the cells in the first row
- // of the table
- insertIntoCell( "A1", "First Column", xTable );
- insertIntoCell( "B1", "Second Column", xTable );
- insertIntoCell( "C1", "Third Column", xTable );
- insertIntoCell( "D1", "Results", xTable );
-
- // Insert random numbers into the first this three cells of each
- // remaining row
- xTable.getCellByName( "A2" ).setValue( getRandomDouble() );
- xTable.getCellByName( "B2" ).setValue( getRandomDouble() );
- xTable.getCellByName( "C2" ).setValue( getRandomDouble() );
-
- xTable.getCellByName( "A3" ).setValue( getRandomDouble() );
- xTable.getCellByName( "B3" ).setValue( getRandomDouble() );
- xTable.getCellByName( "C3" ).setValue( getRandomDouble() );
-
- xTable.getCellByName( "A4" ).setValue( getRandomDouble() );
- xTable.getCellByName( "B4" ).setValue( getRandomDouble() );
- xTable.getCellByName( "C4" ).setValue( getRandomDouble() );
-
- // Set the last cell in each row to be a formula that calculates
- // the sum of the first three cells
- xTable.getCellByName( "D2" ).setFormula( "sum <A2:C2>" );
- xTable.getCellByName( "D3" ).setFormula( "sum <A3:C3>" );
- xTable.getCellByName( "D4" ).setFormula( "sum <A4:C4>" );
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- /** This method shows how to create and manipulate text frames
- */
- protected void TextFrameExample ()
- {
- try
- {
- // Use the document's factory to create a new text frame and
- // immediately access it's XTextFrame interface
- XTextFrame xFrame = (XTextFrame) UnoRuntime.queryInterface (
- XTextFrame.class, mxDocFactory.createInstance (
- "com.sun.star.text.TextFrame" ) );
-
- // Access the XShape interface of the TextFrame
- XShape xShape = (XShape)UnoRuntime.queryInterface(XShape.class, xFrame);
- // Access the XPropertySet interface of the TextFrame
- XPropertySet xFrameProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xFrame );
-
- // Set the size of the new Text Frame using the XShape's 'setSize'
- // method
- Size aSize = new Size();
- aSize.Height = 400;
- aSize.Width = 15000;
- xShape.setSize(aSize);
- // Set the AnchorType to
- // com.sun.star.text.TextContentAnchorType.AS_CHARACTER
- xFrameProps.setPropertyValue( "AnchorType",
- TextContentAnchorType.AS_CHARACTER );
- // Go to the end of the text document
- mxDocCursor.gotoEnd( false );
- // Insert a new paragraph
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- // Then insert the new frame
- mxDocText.insertTextContent(mxDocCursor, xFrame, false);
-
- // Access the XText interface of the text contained within the frame
- XText xFrameText = xFrame.getText();
- // Create a TextCursor over the frame's contents
- XTextCursor xFrameCursor = xFrameText.createTextCursor();
- // Insert some text into the frame
- xFrameText.insertString(
- xFrameCursor, "The first line in the newly created text frame.",
- false );
- xFrameText.insertString(
- xFrameCursor, "\nThe second line in the new text frame.", false );
- // Insert a paragraph break into the document (not the frame)
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This example demonstrates the use of the AutoTextContainer, AutoTextGroup
- and AutoTextEntry services and shows how to create, insert and modify
- auto text blocks
- */
- protected void AutoTextExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- // Insert two paragraphs
- mxDocText.insertControlCharacter ( mxDocCursor,
- ControlCharacter.PARAGRAPH_BREAK, false );
- mxDocText.insertControlCharacter ( mxDocCursor,
- ControlCharacter.PARAGRAPH_BREAK, false );
- // Position the cursor in the second paragraph
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface(XParagraphCursor.class, mxDocCursor );
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Get an XNameAccess interface to all auto text groups from the
- // document factory
- XNameAccess xContainer = (XNameAccess) UnoRuntime.queryInterface(
- XNameAccess.class, mxFactory.createInstance (
- "com.sun.star.text.AutoTextContainer" ) );
-
- // Create a new table at the document factory
- XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
- XTextTable.class, mxDocFactory .createInstance(
- "com.sun.star.text.TextTable" ) );
-
- // Store the names of all auto text groups in an array of strings
- String[] aGroupNames = xContainer.getElementNames();
-
- // Make sure we have at least one group name
- if ( aGroupNames.length > 0 )
- {
- // initialise the table to have a row for every autotext group
- // in a single column + one additional row for a header
- xTable.initialize( aGroupNames.length+1,1);
-
- // Access the XPropertySet of the table
- XPropertySet xTableProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xTable );
-
- // We want a visible background
- xTableProps.setPropertyValue( "BackTransparent",
- new Boolean(false));
-
- // We want the background to be light blue
- xTableProps.setPropertyValue( "BackColor", new Integer(13421823));
-
- // Inser the table into the document
- mxDocText.insertTextContent( mxDocCursor, xTable, false);
-
- // Get an XIndexAccess to all table rows
- XIndexAccess xRows = xTable.getRows();
-
- // Get the first row in the table
- XPropertySet xRow = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xRows.getByIndex ( 0 ) );
-
- // We want the background of the first row to be visible too
- xRow.setPropertyValue( "BackTransparent", new Boolean(false));
-
- // And let's make it dark blue
- xRow.setPropertyValue( "BackColor", new Integer(6710932));
-
- // Put a description of the table contents into the first cell
- insertIntoCell( "A1", "AutoText Groups", xTable);
-
- // Create a table cursor pointing at the second cell in the first
- // column
- XTextTableCursor xTableCursor = xTable.createCursorByCellName("A2");
-
- // Loop over the group names
- for ( int i = 0 ; i < aGroupNames.length ; i ++ )
- {
- // Get the name of the current cell
- String sCellName = xTableCursor.getRangeName ();
-
- // Get the XText interface of the current cell
- XText xCellText = (XText) UnoRuntime.queryInterface (
- XText.class, xTable.getCellByName ( sCellName ) );
-
- // Set the cell contents of the current cell to be
- //the name of the of an autotext group
- xCellText.setString ( aGroupNames[i] );
-
- // Access the autotext group with this name
- XAutoTextGroup xGroup = (XAutoTextGroup)
- UnoRuntime.queryInterface (XAutoTextGroup.class,
- xContainer.getByName(aGroupNames[i]));
-
- // Get the titles of each autotext block in this group
- String [] aBlockNames = xGroup.getTitles();
-
- // Make sure that the autotext group contains at least one block
- if ( aBlockNames.length > 0 )
- {
- // Split the current cell vertically into two seperate cells
- xTableCursor.splitRange ( (short) 1, false );
-
- // Put the cursor in the newly created right hand cell
- // and select it
- xTableCursor.goRight ( (short) 1, false );
-
- // Split this cell horizontally to make a seperate cell
- // for each Autotext block
- if ( ( aBlockNames.length -1 ) > 0 )
- xTableCursor.splitRange (
- (short) (aBlockNames.length - 1), true );
-
- // loop over the block names
- for ( int j = 0 ; j < aBlockNames.length ; j ++ )
- {
- // Get the XText interface of the current cell
- xCellText = (XText) UnoRuntime.queryInterface (
- XText.class, xTable.getCellByName (
- xTableCursor.getRangeName() ) );
-
- // Set the text contents of the current cell to the
- // title of an Autotext block
- xCellText.setString ( aBlockNames[j] );
-
- // Move the cursor down one cell
- xTableCursor.goDown( (short)1, false);
- }
- }
- // Go back to the cell we originally split
- xTableCursor.gotoCellByName ( sCellName, false );
-
- // Go down one cell
- xTableCursor.goDown( (short)1, false);
- }
-
- XAutoTextGroup xGroup;
- String [] aBlockNames;
-
- // Add a depth so that we only generate 200 numbers before giving up
- // on finding a random autotext group that contains autotext blocks
- int nDepth = 0;
- do
- {
- // Generate a random, positive number which is lower than
- // the number of autotext groups
- int nRandom = Math.abs ( maRandom.nextInt() %
- aGroupNames.length );
-
- // Get the autotext group at this name
- xGroup = ( XAutoTextGroup ) UnoRuntime.queryInterface (
- XAutoTextGroup.class, xContainer.getByName (
- aGroupNames[ nRandom ] ) );
-
- // Fill our string array with the names of all the blocks in
- // this group
- aBlockNames = xGroup.getElementNames();
-
- // increment our depth counter
- ++nDepth;
- }
- while ( nDepth < 200 && aBlockNames.length == 0 );
- // If we managed to find a group containg blocks...
- if ( aBlockNames.length > 0 )
- {
- // Pick a random block in this group and get it's
- // XAutoTextEntry interface
- int nRandom = Math.abs ( maRandom.nextInt()
- % aBlockNames.length );
- XAutoTextEntry xEntry = ( XAutoTextEntry )
- UnoRuntime.queryInterface (
- XAutoTextEntry.class, xGroup.getByName (
- aBlockNames[ nRandom ] ) );
- // insert the modified autotext block at the end of the document
- xEntry.applyTo ( mxDocCursor );
-
- // Get the titles of all text blocks in this AutoText group
- String [] aBlockTitles = xGroup.getTitles();
-
- // Get the XNamed interface of the autotext group
- XNamed xGroupNamed = ( XNamed ) UnoRuntime.queryInterface (
- XNamed.class, xGroup );
-
- // Output the short cut and title of the random block
- //and the name of the group it's from
- System.out.println ( "Inserted the Autotext '" +
- aBlockTitles[nRandom]
- + "', shortcut '" + aBlockNames[nRandom]
- + "' from group '"
- + xGroupNamed.getName());
- }
- }
-
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- // Insert new paragraph
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
-
- // Position cursor in new paragraph
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Insert a string in the new paragraph
- mxDocText.insertString ( mxDocCursor,
- "Some text for a new autotext block", false );
-
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to insert indexes and index marks
- */
- protected void IndexExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- // Insert a new paragraph and position the cursor in it
- mxDocText.insertControlCharacter ( mxDocCursor,
- ControlCharacter.PARAGRAPH_BREAK, false );
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Create a new ContentIndexMark and get it's XPropertySet interface
- XPropertySet xEntry = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class,
- mxDocFactory.createInstance("com.sun.star.text.ContentIndexMark"));
-
- // Set the text to be displayed in the index
- xEntry.setPropertyValue(
- "AlternativeText", "Big dogs! Falling on my head!");
-
- // The Level property _must_ be set
- xEntry.setPropertyValue ( "Level", new Short ( (short) 1 ) );
-
- // Create a ContentIndex and access it's XPropertySet interface
- XPropertySet xIndex = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class,
- mxDocFactory.createInstance ( "com.sun.star.text.ContentIndex" ) );
-
- // Again, the Level property _must_ be set
- xIndex.setPropertyValue ( "Level", new Short ( (short) 10 ) );
-
- // Access the XTextContent interfaces of both the Index and the
- // IndexMark
- XTextContent xIndexContent = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xIndex );
- XTextContent xEntryContent = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xEntry );
-
- // Insert both in the document
- mxDocText.insertTextContent ( mxDocCursor, xEntryContent, false );
- mxDocText.insertTextContent ( mxDocCursor, xIndexContent, false );
-
- // Get the XDocumentIndex interface of the Index
- XDocumentIndex xDocIndex = (XDocumentIndex) UnoRuntime.queryInterface(
- XDocumentIndex.class, xIndex );
-
- // And call it's update method
- xDocIndex.update();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to create and insert reference marks, and
- * GetReference Text Fields
- */
- protected void ReferenceExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
-
- // Insert a paragraph break
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
-
- // Get the Paragraph cursor
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
-
- // Move the cursor into the new paragraph
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Create a new ReferenceMark and get it's XNamed interface
- XNamed xRefMark = (XNamed) UnoRuntime.queryInterface(XNamed.class,
- mxDocFactory.createInstance ("com.sun.star.text.ReferenceMark"));
-
- // Set the name to TableHeader
- xRefMark.setName ( "TableHeader" );
-
- // Get the TextTablesSupplier interface of the document
- XTextTablesSupplier xTableSupplier = ( XTextTablesSupplier )
- UnoRuntime.queryInterface(XTextTablesSupplier.class, mxDoc);
-
- // Get an XIndexAccess of TextTables
- XIndexAccess xTables = (XIndexAccess)UnoRuntime.queryInterface(
- XIndexAccess.class, xTableSupplier.getTextTables());
-
- // We've only inserted one table, so get the first one from index zero
- XTextTable xTable = ( XTextTable ) UnoRuntime.queryInterface (
- XTextTable.class, xTables.getByIndex( 0 ) );
-
- // Get the first cell from the table
- XText xTableText = (XText) UnoRuntime.queryInterface(
- XText.class, xTable.getCellByName ( "A1" ) );
-
- // Get a text cursor for the first cell
- XTextCursor xTableCursor = xTableText.createTextCursor();
-
- // Get the XTextContent interface of the reference mark so we can
- // insert it
- XTextContent xContent = ( XTextContent ) UnoRuntime.queryInterface (
- XTextContent.class, xRefMark );
-
- // Insert the reference mark into the first cell of the table
- xTableText.insertTextContent ( xTableCursor, xContent, false );
-
- // Create a 'GetReference' text field to refer to the reference mark
- // we just inserted, and get it's XPropertySet interface
- XPropertySet xFieldProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, mxDocFactory.createInstance (
- "com.sun.star.text.TextField.GetReference" ) );
-
- // Get the XReferenceMarksSupplier interface of the document
- XReferenceMarksSupplier xRefSupplier = ( XReferenceMarksSupplier )
- UnoRuntime.queryInterface( XReferenceMarksSupplier.class, mxDoc );
-
- // Get an XNameAccess which refers to all inserted reference marks
- XNameAccess xMarks = ( XNameAccess ) UnoRuntime.queryInterface (
- XNameAccess.class, xRefSupplier.getReferenceMarks() );
-
- // Put the names of each reference mark into an array of strings
- String[] aNames = xMarks.getElementNames();
-
- // Make sure that at least 1 reference mark actually exists
- // (well, we just inserted one!)
- if ( aNames.length > 0 )
- {
- // Output the name of the first reference mark ('TableHeader')
- System.out.println (
- "GetReference text field inserted for ReferenceMark : "
- + aNames[0] );
-
- // Set the SourceName of the GetReference text field to
- // 'TableHeader'
- xFieldProps.setPropertyValue ( "SourceName", aNames[0] );
-
- // specify that the source is a reference mark (could also be a
- // footnote, bookmark or sequence field )
- xFieldProps.setPropertyValue ( "ReferenceFieldSource",
- new Short(ReferenceFieldSource.REFERENCE_MARK));
-
- // We want the reference displayed as 'above' or 'below'
- xFieldProps.setPropertyValue ( "ReferenceFieldPart",
- new Short(ReferenceFieldPart.UP_DOWN));
-
-
- // Get the XTextContent interface of the GetReference text field
- XTextContent xRefContent = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xFieldProps );
-
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
-
- // Make some text to precede the reference
- mxDocText.insertString(mxDocText.getEnd(), "The table ", false);
-
- // Insert the text field
- mxDocText.insertTextContent(mxDocText.getEnd(), xRefContent, false);
-
- // And some text after the reference..
- mxDocText.insertString(mxDocText.getEnd(),
- " contains the sum of some random numbers.", false );
-
- // Refresh the document
- XRefreshable xRefresh = (XRefreshable) UnoRuntime.queryInterface(
- XRefreshable.class, mxDoc );
- xRefresh.refresh();
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to create and insert footnotes, and how to
- access the XFootnotesSupplier interface of the document
- */
- protected void FootnoteExample ()
- {
- try
- {
- // Create a new footnote from the document factory and get it's
- // XFootnote interface
- XFootnote xFootnote = (XFootnote) UnoRuntime.queryInterface(
- XFootnote.class, mxDocFactory.createInstance (
- "com.sun.star.text.Footnote" ) );
-
- // Set the label to 'Numbers'
- xFootnote.setLabel ( "Numbers" );
-
- // Get the footnotes XTextContent interface so we can...
- XTextContent xContent = ( XTextContent ) UnoRuntime.queryInterface (
- XTextContent.class, xFootnote );
-
- // ...insert it into the document
- mxDocText.insertTextContent ( mxDocCursor, xContent, false );
-
- // Get the XFootnotesSupplier interface of the document
- XFootnotesSupplier xFootnoteSupplier = (XFootnotesSupplier)
- UnoRuntime.queryInterface(XFootnotesSupplier.class, mxDoc );
-
- // Get an XIndexAccess interface to all footnotes
- XIndexAccess xFootnotes = ( XIndexAccess ) UnoRuntime.queryInterface (
- XIndexAccess.class, xFootnoteSupplier.getFootnotes() );
-
- // Get the XFootnote interface to the first footnote inserted ('Numbers')
- XFootnote xNumbers = ( XFootnote ) UnoRuntime.queryInterface (
- XFootnote.class, xFootnotes.getByIndex( 0 ) );
-
- // Get the XSimpleText interface to the Footnote
- XSimpleText xSimple = (XSimpleText ) UnoRuntime.queryInterface (
- XSimpleText.class, xNumbers );
-
- // Create a text cursor for the foot note text
- XTextRange xRange = (XTextRange ) UnoRuntime.queryInterface (
- XTextRange.class, xSimple.createTextCursor() );
-
- // And insert the actual text of the footnote.
- xSimple.insertString (
- xRange, " The numbers were generated by using java.util.Random", false );
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to create and manipulate shapes, and how to
- access the draw page of the document to insert shapes
- */
- protected void DrawPageExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- // Insert two new paragraphs
- mxDocText.insertControlCharacter(mxDocCursor,
- ControlCharacter.PARAGRAPH_BREAK, false);
- mxDocText.insertControlCharacter(mxDocCursor,
- ControlCharacter.PARAGRAPH_BREAK, false);
-
- // Get the XParagraphCursor interface of our document cursor
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
-
- // Position the cursor in the 2nd paragraph
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Create a RectangleShape using the document factory
- XShape xRect = (XShape) UnoRuntime.queryInterface(
- XShape.class, mxDocFactory.createInstance (
- "com.sun.star.drawing.RectangleShape" ) );
-
- // Create an EllipseShape using the document factory
- XShape xEllipse = (XShape) UnoRuntime.queryInterface(
- XShape.class, mxDocFactory.createInstance (
- "com.sun.star.drawing.EllipseShape" ) );
-
- // Set the size of both the ellipse and the rectangle
- Size aSize = new Size();
- aSize.Height = 4000;
- aSize.Width = 10000;
- xRect.setSize(aSize);
- aSize.Height = 3000;
- aSize.Width = 6000;
- xEllipse.setSize ( aSize );
-
- // Set the position of the Rectangle to the right of the ellipse
- Point aPoint = new Point();
- aPoint.X = 6100;
- aPoint.Y = 0;
- xRect.setPosition ( aPoint );
-
- // Get the XPropertySet interfaces of both shapes
- XPropertySet xRectProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xRect );
- XPropertySet xEllipseProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xEllipse );
-
- // And set the AnchorTypes of both shapes to 'AT_PARAGRAPH'
- xRectProps.setPropertyValue ( "AnchorType",
- TextContentAnchorType.AT_PARAGRAPH );
- xEllipseProps.setPropertyValue ( "AnchorType",
- TextContentAnchorType.AT_PARAGRAPH );
-
- // Access the XDrawPageSupplier interface of the document
- XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)
- UnoRuntime.queryInterface (XDrawPageSupplier.class, mxDoc );
-
- // Get the XShapes interface of the draw page
- XShapes xShapes = ( XShapes ) UnoRuntime.queryInterface (
- XShapes.class, xDrawPageSupplier.getDrawPage () );
-
- // Add both shapes
- xShapes.add ( xEllipse );
- xShapes.add ( xRect );
-
- /*
- This doesn't work, I am assured that FME and AMA are fixing it.
-
- XShapes xGrouper = (XShapes) UnoRuntime.queryInterface(
- XShapes.class, mxDocFactory.createInstance (
- "com.sun.star.drawing.GroupShape" ) );
-
- XShape xGrouperShape = (XShape) UnoRuntime.queryInterface(
- XShape.class, xGrouper );
- xShapes.add ( xGrouperShape );
-
- xGrouper.add ( xRect );
- xGrouper.add ( xEllipse );
-
- XShapeGrouper xShapeGrouper = (XShapeGrouper)
- UnoRuntime.queryInterface(XShapeGrouper.class, xShapes);
- xShapeGrouper.group ( xGrouper );
- */
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to create, insert and apply styles
- */
- protected void StylesExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
-
- // Insert two paragraph breaks
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
-
- // Create a new style from the document's factory
- XStyle xStyle = (XStyle) UnoRuntime.queryInterface(
- XStyle.class, mxDocFactory.createInstance(
- "com.sun.star.style.ParagraphStyle" ) );
-
- // Access the XPropertySet interface of the new style
- XPropertySet xStyleProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xStyle );
-
- // Give the new style a light blue background
- xStyleProps.setPropertyValue ( "ParaBackColor", new Integer (13421823));
-
- // Get the StyleFamiliesSupplier interface of the document
- XStyleFamiliesSupplier xSupplier = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, mxDoc);
-
- // Use the StyleFamiliesSupplier interface to get the XNameAccess
- // interface of the actual style families
- XNameAccess xFamilies = ( XNameAccess ) UnoRuntime.queryInterface (
- XNameAccess.class, xSupplier.getStyleFamilies() );
-
- // Access the 'ParagraphStyles' Family
- XNameContainer xFamily = (XNameContainer ) UnoRuntime.queryInterface (
- XNameContainer.class,
- xFamilies.getByName ( "ParagraphStyles" ) );
-
- // Insert the newly created style into the ParagraphStyles family
- xFamily.insertByName ( "All-Singing All-Dancing Style", xStyle );
-
- // Get the XParagraphCursor interface of the document cursor
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
-
- // Select the first paragraph inserted
- xParaCursor.gotoPreviousParagraph ( false );
- xParaCursor.gotoPreviousParagraph ( true );
-
- // Access the property set of the cursor selection
- XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, mxDocCursor );
-
- // Set the style of the cursor selection to our newly created style
- xCursorProps.setPropertyValue ( "ParaStyleName",
- "All-Singing All-Dancing Style" );
-
- // Go back to the end
- mxDocCursor.gotoEnd ( false );
-
- // Select the last paragraph in the document
- xParaCursor.gotoNextParagraph ( true );
-
- // And reset it's style to 'Standard' (the programmatic name for
- // the default style)
- xCursorProps.setPropertyValue ( "ParaStyleName", "Standard" );
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to set numbering types and numbering levels
- using the com.sun.star.text.NumberingRules service
- */
- protected void NumberingExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- // Get the RelativeTextContentInsert interface of the document
- XRelativeTextContentInsert xRelative =
- (XRelativeTextContentInsert ) UnoRuntime.queryInterface (
- XRelativeTextContentInsert.class, mxDocText );
-
- // Use the document's factory to create the NumberingRules service,
- // and get it's XIndexAccess interface
- XIndexAccess xNum = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class,
- mxDocFactory.createInstance( "com.sun.star.text.NumberingRules" ) );
-
- // Also get the NumberingRule's XIndexReplace interface
- XIndexReplace xReplace = (XIndexReplace) UnoRuntime.queryInterface(
- XIndexReplace.class, xNum );
-
- // Create an array of XPropertySets, one for each of the three
- // paragraphs we're about to create
- XPropertySet xParas[] = new XPropertySet [ 3 ];
- for ( int i = 0 ; i < 3 ; ++ i )
- {
- // Create a new paragraph
- XTextContent xNewPara = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, mxDocFactory.createInstance(
- "com.sun.star.text.Paragraph" ) );
-
- // Get the XPropertySet interface of the new paragraph and put
- // it in our array
- xParas[i] = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xNewPara );
-
- // Insert the new paragraph into the document after the fish
- // section. As it is an insert relative to the fish section, the
- // first paragraph inserted will be below the next two
- xRelative.insertTextContentAfter ( xNewPara, mxFishSection );
-
- // Separate from the above, but also needs to be done three times
-
- // Get the PropertyValue sequence for this numbering level
- PropertyValue [] aProps = (PropertyValue [] ) xNum.getByIndex ( i );
-
- // Iterate over the PropertyValue's for this numbering level,
- // looking for the 'NumberingType' property
- for ( int j = 0 ; j < aProps.length ; ++j )
- {
- if ( aProps[j].Name.equals ( "NumberingType" ) )
- {
- // Once we find it, set it's value to a new type,
- // dependent on which numbering level we're currently on
- switch ( i )
- {
- case 0 : aProps[j].Value =
- new Short(NumberingType.ROMAN_UPPER);
- break;
- case 1 : aProps[j].Value =
- new Short(NumberingType.CHARS_UPPER_LETTER);
- break;
- case 2 : aProps[j].Value =
- new Short(NumberingType.ARABIC);
- break;
- }
- // Put the updated PropertyValue sequence back into the
- // NumberingRules service
- xReplace.replaceByIndex ( i, aProps );
- break;
- }
- }
- }
- // Get the XParagraphCursor interface of our text cursro
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
- // Go to the end of the document, then select the preceding paragraphs
- mxDocCursor.gotoEnd ( false );
- xParaCursor.gotoPreviousParagraph ( false );
- xParaCursor.gotoPreviousParagraph ( true );
- xParaCursor.gotoPreviousParagraph ( true );
-
- // Get the XPropertySet of the cursor's currently selected text
- XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, mxDocCursor );
-
- // Set the updated Numbering rules to the cursor's property set
- xCursorProps.setPropertyValue ( "NumberingRules", xNum );
- mxDocCursor.gotoEnd( false );
-
- // Set the first paragraph that was inserted to a numbering level of
- // 2 (thus it will have Arabic style numbering)
- xParas[0].setPropertyValue ( "NumberingLevel", new Short((short) 2));
-
- // Set the second paragraph that was inserted to a numbering level of
- // 1 (thus it will have 'Chars Upper Letter' style numbering)
- xParas[1].setPropertyValue ( "NumberingLevel", new Short((short) 1));
-
- // Set the third paragraph that was inserted to a numbering level of
- // 0 (thus it will have 'Chars Upper Letter' style numbering)
- xParas[2].setPropertyValue ( "NumberingLevel", new Short((short) 0));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates how to create linked and unlinked sections
- */
- protected void TextSectionExample ()
- {
- try
- {
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
- // Insert two paragraph breaks
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, true );
-
- // Create a new TextSection from the document factory and access
- // it's XNamed interface
- XNamed xChildNamed = (XNamed) UnoRuntime.queryInterface(
- XNamed.class, mxDocFactory.createInstance(
- "com.sun.star.text.TextSection" ) );
- // Set the new sections name to 'Child_Section'
- xChildNamed.setName ( "Child_Section" );
-
- // Access the Child_Section's XTextContent interface and insert it
- // into the document
- XTextContent xChildSection = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xChildNamed );
- mxDocText.insertTextContent ( mxDocCursor, xChildSection, false );
-
- // Access the XParagraphCursor interface of our text cursor
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface(XParagraphCursor.class, mxDocCursor);
-
- // Go back one paragraph (into Child_Section)
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Insert a string into the Child_Section
- mxDocText.insertString ( mxDocCursor, "This is a test", false );
-
- // Go to the end of the document
- mxDocCursor.gotoEnd( false );
-
- // Go back two paragraphs
- xParaCursor.gotoPreviousParagraph ( false );
- xParaCursor.gotoPreviousParagraph ( false );
- // Go to the end of the document, selecting the two paragraphs
- mxDocCursor.gotoEnd ( true );
-
- // Create another text section and access it's XNamed interface
- XNamed xParentNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
- mxDocFactory.createInstance("com.sun.star.text.TextSection"));
-
- // Set this text section's name to Parent_Section
- xParentNamed.setName ( "Parent_Section" );
-
- // Access the Parent_Section's XTextContent interface ...
- XTextContent xParentSection = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xParentNamed );
- // ...and insert it into the document
- mxDocText.insertTextContent ( mxDocCursor, xParentSection, false );
-
- // Go to the end of the document
- mxDocCursor.gotoEnd ( false );
- // Insert a new paragraph
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- // And select the new pargraph
- xParaCursor.gotoPreviousParagraph ( true );
-
- // Create a new Text Section and access it's XNamed interface
- XNamed xLinkNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
- mxDocFactory.createInstance("com.sun.star.text.TextSection"));
- // Set the new text section's name to Linked_Section
- xLinkNamed.setName ( "Linked_Section" );
-
- // Access the Linked_Section's XTextContent interface
- XTextContent xLinkedSection = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xLinkNamed );
- // And insert the Linked_Section into the document
- mxDocText.insertTextContent ( mxDocCursor, xLinkedSection, false );
-
- // Access the Linked_Section's XPropertySet interface
- XPropertySet xLinkProps = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xLinkNamed );
- // Set the linked section to be linked to the Child_Section
- xLinkProps.setPropertyValue ( "LinkRegion", "Child_Section" );
-
- // Access the XPropertySet interface of the Child_Section
- XPropertySet xChildProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xChildNamed );
- // Set the Child_Section's background colour to blue
- xChildProps.setPropertyValue( "BackColor", new Integer(13421823));
-
- // Refresh the document, so the linked section matches the Child_Section
- XRefreshable xRefresh = (XRefreshable) UnoRuntime.queryInterface(
- XRefreshable.class, mxDoc );
- xRefresh.refresh();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /** This method demonstrates the XTextColumns interface and how to insert a
- blank paragraph using the XRelativeTextContentInsert interface
- */
- protected void TextColumnsExample ()
- {
- try
- {
- // Go to the end of the doucment
- mxDocCursor.gotoEnd( false );
- // insert a new paragraph
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
-
- // insert the string 'I am a fish.' 100 times
- for ( int i = 0 ; i < 100 ; ++i )
- {
- mxDocText.insertString ( mxDocCursor, "I am a fish.", false );
- }
- // insert a paragraph break after the text
- mxDocText.insertControlCharacter (
- mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
-
- // Get the XParagraphCursor interface of our text cursor
- XParagraphCursor xParaCursor = (XParagraphCursor)
- UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
- // Jump back before all the text we just inserted
- xParaCursor.gotoPreviousParagraph ( false );
- xParaCursor.gotoPreviousParagraph ( false );
-
- // Insert a string at the beginning of the block of text
- mxDocText.insertString ( mxDocCursor, "Fish section begins:", false );
-
- // Then select all of the text
- xParaCursor.gotoNextParagraph ( true );
- xParaCursor.gotoNextParagraph ( true );
-
- // Create a new text section and get it's XNamed interface
- XNamed xSectionNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
- mxDocFactory.createInstance("com.sun.star.text.TextSection"));
-
- // Set the name of our new section (appropiately) to 'Fish'
- xSectionNamed.setName ( "Fish" );
-
- // Create the TextColumns service and get it's XTextColumns interface
- XTextColumns xColumns = (XTextColumns) UnoRuntime.queryInterface(
- XTextColumns.class,
- mxDocFactory.createInstance ( "com.sun.star.text.TextColumns" ) );
-
- // We want three columns
- xColumns.setColumnCount ( (short) 3 );
-
- // Get the TextColumns, and make the middle one narrow with a larger
- // margin on the left than the right
- TextColumn[] aSequence = xColumns.getColumns ();
- aSequence[1].Width /= 2;
- aSequence[1].LeftMargin = 350;
- aSequence[1].RightMargin = 200;
- // Set the updated TextColumns back to the XTextColumns
- xColumns.setColumns ( aSequence );
-
- // Get the property set interface of our 'Fish' section
- XPropertySet xSectionProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xSectionNamed );
-
- // Set the columns to the Text Section
- xSectionProps.setPropertyValue ( "TextColumns", xColumns );
-
- // Get the XTextContent interface of our 'Fish' section
- mxFishSection = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class, xSectionNamed );
-
- // Insert the 'Fish' section over the currently selected text
- mxDocText.insertTextContent ( mxDocCursor, mxFishSection, true );
-
- // Get the wonderful XRelativeTextContentInsert interface
- XRelativeTextContentInsert xRelative = (XRelativeTextContentInsert )
- UnoRuntime.queryInterface (
- XRelativeTextContentInsert.class, mxDocText );
-
- // Create a new empty paragraph and get it's XTextContent interface
- XTextContent xNewPara = (XTextContent) UnoRuntime.queryInterface(
- XTextContent.class,
- mxDocFactory.createInstance("com.sun.star.text.Paragraph"));
-
- // Insert the empty paragraph after the fish Text Section
- xRelative.insertTextContentAfter ( xNewPara, mxFishSection );
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-}
diff --git a/odk/examples/DevelopersGuide/Text/TextTemplateWithUserFields.odt b/odk/examples/DevelopersGuide/Text/TextTemplateWithUserFields.odt
deleted file mode 100644
index 7c681403..00000000
--- a/odk/examples/DevelopersGuide/Text/TextTemplateWithUserFields.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/DevelopersGuide/Text/makefile.mk b/odk/examples/DevelopersGuide/Text/makefile.mk
deleted file mode 100644
index dbb2000e..00000000
--- a/odk/examples/DevelopersGuide/Text/makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-TEXT_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/Text$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Text$/PrintDemo.odt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Text$/TextDocuments.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/Text$/TextTemplateWithUserFields.odt
-# $(DESTDIRDEVGUIDEEXAMPLES)$/Text$/ViewCursorExample.sxw
-
-DIR_FILE_LIST= \
- $(TEXT_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_text_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_text.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java b/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java
deleted file mode 100644
index daa3d821..00000000
--- a/odk/examples/DevelopersGuide/UCB/ChildrenRetriever.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.ucb.OpenCommandArgument2;
-import com.sun.star.ucb.OpenMode;
-import com.sun.star.ucb.XContent;
-import com.sun.star.ucb.XContentAccess;
-import com.sun.star.ucb.XDynamicResultSet;
-import com.sun.star.beans.Property;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.sdbc.XRow;
-import com.sun.star.sdbc.XResultSet;
-
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.StringTokenizer;
-
-/**
- * Retrieve the Children of a UCB Folder Content
- */
-public class ChildrenRetriever {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XContent m_content;
- private String m_contenturl = "";
- private Vector m_propnames = new Vector();
-
- /**
- * Constructor. Create a new connection with the specific args to a running office
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -propNames=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public ChildrenRetriever( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- }
-
- /**
- * Open a folder content, get properties values.
- * This method requires the main and the optional arguments to be set in order to work.
- * See Constructor.
- *
- *@return Vector Returns children properties values if values successfully retrieved,
- * null otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public Vector getChildren()
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
- Vector properties = getProperties();
- return getChildren ( properties );
- }
-
- /**
- * Open a folder content, get properties values for the properties.
- *
- *@param Vector Properties
- *@return Vector Returns children properties values if values successfully retrieved,
- * null otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public Vector getChildren( Vector properties )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- Vector result = null;
- if ( m_content != null ) {
- int size = 0;
- if ( properties != null && !properties.isEmpty()) {
- size = properties.size();
- }
- // Fill info for the properties wanted.
- Property[] props = new Property[ size ];
- for ( int index = 0 ; index < size; index++ ) {
-
- // Define property sequence.
- Property prop = new Property();
- prop.Name = ( String )properties.get( index );
- prop.Handle = -1; // n/a
- props[ index ] = prop;
- }
-
- // Fill argument structure...
- OpenCommandArgument2 arg = new OpenCommandArgument2();
- arg.Mode = OpenMode.ALL; // FOLDER, DOCUMENTS -> simple filter
- arg.Priority = 32768; // Final static for 32768
- arg.Properties = props;
-
- XDynamicResultSet set;
-
- // Execute command "open".
- set = ( XDynamicResultSet )UnoRuntime.queryInterface(
- XDynamicResultSet.class, m_helper.executeCommand( m_content, "open", arg ));
- XResultSet resultSet = ( XResultSet )set.getStaticResultSet();
-
- result = new Vector();
-
- /////////////////////////////////////////////////////////////////////
- // Iterate over children, access children and property values...
- /////////////////////////////////////////////////////////////////////
-
- // Move to begin.
- if ( resultSet.first() ) {
- XContentAccess contentAccess = ( XContentAccess )UnoRuntime.queryInterface(
- XContentAccess.class, resultSet );
- XRow row = ( XRow )UnoRuntime.queryInterface( XRow.class, resultSet );
-
- do {
- Vector propsValues = new Vector();
-
- // Obtain URL of child.
- String id = contentAccess.queryContentIdentifierString();
- propsValues.add( id );
- for ( int i = 1; i <= size ; i++) {
- Object propValue = row.getObject( i, null );
- if ( !row.wasNull() && !(propValue instanceof com.sun.star.uno.Any )) {
- propsValues.add( propValue );
- } else {
- propsValues.add( "[ Property not found ]" );
- }
- }
- result.add( propsValues );
- } while ( resultSet.next() ); // next child
- }
- }
- return result;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Get the properties.
- *
- *@return String That contains the properties
- */
- public Vector getProperties() {
- return m_propnames;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-propNames=" )) {
- StringTokenizer tok
- = new StringTokenizer( args[i].substring( 11 ), ";" );
-
- while ( tok.hasMoreTokens() )
- m_propnames.add( tok.nextToken() );
-
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = "file:///";
- }
-
- if ( m_propnames.size() == 0 ) {
- m_propnames.add( "Title" );
- m_propnames.add( "IsDocument" );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : ChildrenRetriever -url=... -propNames=..." );
- System.out.println(
- "Defaults: -url=file:/// -propNames=Title,IsDocument" );
- System.out.println(
- "\nExample : -url=file:///temp/ -propNames=Title;IsFolder;IsDocument" );
- }
-
- /**
- * Print all properties out contained in vector .
- *
- *@param Vector
- */
- public void printLine( Vector props ) {
- int limit;
- while ( !props.isEmpty() ) {
- String print = "";
- int size = props.size();
- for ( int i = 0; i < size; i++ ) {
- limit = 15;
- Object obj = props.get( i );
- if ( obj != null) {
- String prop = obj.toString();
- int leng = prop.length();
- if ( leng < limit ) {
- for ( int l = leng; l < limit; l++) {
- prop += " ";
- }
- print+= prop + " ";
- props.set( i, null );
- } else {
- String temp1 = prop.substring( 0, limit );
- String temp2 = prop.substring( limit );
- print+= temp1 + " ";
- props.set( i, temp2 );
- }
- } else {
- for ( int l = 0; l < limit; l++) {
- print += " ";
- }
- print+= " ";
- }
- }
- System.out.println( print );
- boolean isEmpty = true;
- for ( int i = 0; i < size; i++ ) {
- Object obj = props.get( i );
- if( obj != null )
- isEmpty = false;
- }
- if( isEmpty )
- props.clear();
- }
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * access the children from a folder.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
-
- System.out.println( "\n" );
- System.out.println(
- "-----------------------------------------------------------------" );
- System.out.println(
- "ChildrenRetriever - obtains the children of a folder resource." );
- System.out.println(
- "-----------------------------------------------------------------" );
-
- try {
- ChildrenRetriever access = new ChildrenRetriever( args );
-
- // Get the properties Title and IsFolder for the children.
- Vector result = access.getChildren();
-
- String tempPrint = "\nChildren of resource " + access.getContentURL();
- int size = tempPrint.length();
- System.out.println( tempPrint );
- tempPrint = "";
- for( int i = 0; i < size; i++ ) {
- tempPrint += "-";
- }
- System.out.println( tempPrint );
-
- if ( result != null && !result.isEmpty() ) {
-
- Vector cont = new Vector();
- cont.add("URL:");
- Vector props = access.getProperties();
- size = props.size();
- for ( int i = 0; i < size; i++ ) {
- Object obj = props.get( i );
- String prop = obj.toString();
- cont.add( prop + ":" );
- }
- access.printLine(cont);
- System.out.println( "\n" );
- for ( Enumeration e = result.elements(); e.hasMoreElements(); ) {
- Vector propsV = ( Vector )e.nextElement();
- access.printLine( propsV );
- }
- }
- } catch ( com.sun.star.ucb.ResultSetException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/DataStreamComposer.java b/odk/examples/DevelopersGuide/UCB/DataStreamComposer.java
deleted file mode 100644
index 899861a0..00000000
--- a/odk/examples/DevelopersGuide/UCB/DataStreamComposer.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.ucb.InsertCommandArgument;
-import com.sun.star.ucb.XContent;
-import com.sun.star.io.XInputStream;
-
-/**
- * Setting (Storing) the Content Data Stream of a UCB Document Content.
- */
-public class DataStreamComposer {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XContent m_content;
- private String m_contenturl = "";
- private String m_srcURL = "";
-
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -srcURL=... (optional)
- * -workdir=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public DataStreamComposer( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- }
-
- /**
- * Write the document data stream of a document content.
- * This method requires the main and the optional arguments to be set in order to work.
- * See Constructor.
- *
- *@return boolean Result
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- *@exception java.lang.Exception
- */
- public boolean setDataStream()
- throws com.sun.star.ucb.CommandAbortedException,
- com.sun.star.uno.Exception,
- java.lang.Exception {
-
- String sourceURL = getSourceURL();
- return ( setDataStream( sourceURL ));
- }
-
- /**
- * Write the document data stream of a document content.
- *
- *@param String Source URL
- *@return boolean Returns true if data stream successfully seted, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- *@exception java.lang.Exception
- */
- public boolean setDataStream( String sourceURL )
- throws com.sun.star.ucb.CommandAbortedException,
- com.sun.star.uno.Exception,
- java.lang.Exception {
-
- XInputStream stream;
- if ( sourceURL == null || sourceURL.equals("") ) {
- stream = new MyInputStream();
- } else {
- String[] args = new String[ 1 ];
- args[ 0 ] = "-url=" + sourceURL;
- DataStreamRetriever access = new DataStreamRetriever( args );
- stream = access.getDataStream();
- }
- return ( setDataStream( stream ));
- }
-
- /**
- * Write the document data stream of a document content...
- *
- *@param XInputStream Stream
- *@return boolean Returns true if data stream successfully seted, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean setDataStream( XInputStream stream )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- boolean result = false;
- XInputStream data = stream;
- if ( data != null && m_content != null ) {
-
- // Fill argument structure...
- InsertCommandArgument arg = new InsertCommandArgument();
- arg.Data = data;
- arg.ReplaceExisting = true;
-
- // Execute command "insert".
- m_helper.executeCommand( m_content, "insert", arg );
- result = true;
- }
- return result;
- }
-
- /**
- * Get source URL.
- *
- *@return String That contains the source URL
- */
- public String getSourceURL() {
- return m_srcURL;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- String workdir = "";
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-srcURL=" )) {
- m_srcURL = args[i].substring( 9 );
- } else if ( args[i].startsWith( "-workdir=" )) {
- workdir = args[i].substring( 9 );
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.createTargetDataFile( workdir );
- }
-
- if ( m_srcURL == null || m_srcURL.equals( "" )) {
- m_srcURL = Helper.prependCurrentDirAsAbsoluteFileURL( "data/data.txt" );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : DataStreamComposer -url=... -srcURL=... -workdir=..." );
- System.out.println(
- "Defaults: -url=<workdir>/resource-<uniquepostfix> -srcURL=<currentdir>/data/data.txt -workdir=<currentdir>" );
- System.out.println(
- "\nExample : -url=file:///temp/my.txt -srcURL=file:///temp/src.txt " );
- }
-
-
- /**
- * Create a new connection with the specific args to a running office and
- * set the Content Data Stream of a UCB Document Content.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
- System.out.println( "\n" );
- System.out.println(
- "-----------------------------------------------------------------" );
- System.out.println(
- "DataStreamComposer - sets the data stream of a document resource." );
- System.out.println(
- " The data stream is obtained from another (the source) document " );
- System.out.println(
- " resource before." );
- System.out.println(
- "-----------------------------------------------------------------" );
- try {
-
- DataStreamComposer dataStream = new DataStreamComposer( args );
- String sourceURL = dataStream.getSourceURL();
- boolean result = dataStream.setDataStream( sourceURL );
- if ( result ) {
- System.out.println(
- "\nSetting data stream succeeded.\n Source URL: " +
- dataStream.getSourceURL() +
- "\n Target URL: " +
- dataStream.getContentURL() );
- } else {
- System.out.println(
- "\nSetting data stream failed. \n Source URL: " +
- dataStream.getSourceURL() +
- "\n Target URL: " +
- dataStream.getContentURL() );
- }
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java b/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java
deleted file mode 100644
index 5bf66124..00000000
--- a/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.ucb.OpenCommandArgument2;
-import com.sun.star.ucb.OpenMode;
-import com.sun.star.ucb.XContent;
-import com.sun.star.io.XActiveDataSink;
-import com.sun.star.io.XInputStream;
-
-/**
- * Accessing (Loading) the Content Data Stream of a UCB Document Content
- */
-public class DataStreamRetriever {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XContent m_content;
- private String m_contenturl = "";
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public DataStreamRetriever( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- }
-
- /**
- * Read the document data stream of a document content using a
- * XActiveDataSink implementation as data sink....
- *
- *@return XInputStream Returns input stream if stream successfully retrieved,
- * null otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public XInputStream getDataStream()
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- XInputStream data = null;
- if ( m_content != null ) {
-
- // Fill argument structure...
- OpenCommandArgument2 arg = new OpenCommandArgument2();
- arg.Mode = OpenMode.DOCUMENT;
- arg.Priority = 32768; // Final static for 32768
-
- // Create data sink implementation object.
- XActiveDataSink dataSink = new MyActiveDataSink();
- arg.Sink = dataSink;
-
- // Execute command "open". The implementation of the command will
- // supply an XInputStream implementation to the data sink.
- m_helper.executeCommand( m_content, "open", arg );
-
- // Get input stream supplied by the open command implementation.
- data = dataSink.getInputStream();
- }
- return data;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.prependCurrentDirAsAbsoluteFileURL( "data/data.txt" );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : DataStreamRetriever -url=..." );
- System.out.println(
- "Defaults: -url=<currentdir>/data/data.txt" );
- System.out.println(
- "\nExample : -url=file:///temp/my.txt" );
- }
-
- /**
- * Print Stream content.
- *
- *@param XInputStream
- *@exception com.sun.star.uno.Exception
- */
- public void printStream( XInputStream data )
- throws com.sun.star.uno.Exception {
-
- /////////////////////////////////////////////////////////////////////
- // Read data from input stream...65536
- /////////////////////////////////////////////////////////////////////
-
- // Data buffer. Will be allocated by input stream implementation!
- byte[][] buffer = new byte[ 1 ][ 65536 ];
- int read = data.readSomeBytes( buffer, 65536 );
- System.out.println( "Read bytes : " + read );
- System.out.println( "Read data (only first 64K displayed): ");
- while ( read > 0 ) {
- byte[] bytes = new byte[ read ];
- for( int i = 0; i < read; i++ ) {
- bytes[ i ] = buffer[ 0 ][ i ];
- }
- System.out.println( new String(bytes) );
-
- // Process data contained in buffer.
- read = data.readSomeBytes( buffer, 65536 );
- }
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * access (Load) the content data stream of a UCB document content.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
- System.out.println( "\n" );
- System.out.println(
- "-----------------------------------------------------------------------" );
- System.out.println(
- "DataStreamRetriever - obtains the data stream from a document resource." );
- System.out.println(
- "-----------------------------------------------------------------------" );
-
- try {
-
- DataStreamRetriever access = new DataStreamRetriever( args );
- XInputStream data = access.getDataStream();
- String url = access.getContentURL();
- if ( data != null ) {
- String tempPrint = "\nGetting data stream for resource " + url +
- " succeeded.";
- int size = tempPrint.length();
- System.out.println( tempPrint );
- tempPrint = "";
- for( int i = 0; i < size; i++ ) {
- tempPrint += "-";
- }
- System.out.println( tempPrint );
- access.printStream( data );
- } else {
- System.out.println(
- "Getting data stream for resource " + url + " failed." );
- }
- } catch ( com.sun.star.io.NotConnectedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.io.BufferSizeExceededException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.io.IOException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/Helper.java b/odk/examples/DevelopersGuide/UCB/Helper.java
deleted file mode 100644
index 791302b7..00000000
--- a/odk/examples/DevelopersGuide/UCB/Helper.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.Vector;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-import com.sun.star.lang.XMultiComponentFactory;
-
-import com.sun.star.ucb.Command;
-import com.sun.star.ucb.XContent;
-import com.sun.star.ucb.XContentProvider;
-import com.sun.star.ucb.XContentIdentifier;
-import com.sun.star.ucb.XContentIdentifierFactory;
-import com.sun.star.ucb.XCommandProcessor;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-
-
-/**
- * Helper for creating a new connection with the specific args to a running office.
- */
-public class Helper {
-
- /**
- * Member properties
- */
- private XInterface m_ucb = null;
- private String m_contenturl = null;
- private static XComponentContext m_xContext = null;
-
- /**
- * Constructor, create a new instance of the ucb. UNO is bootstrapped and
- * the remote office service manger is used to create the ucb. If necessary
- * a new office process is started.
- *
- * @exception java.lang.Exception
- */
- public Helper(String url) throws java.lang.Exception {
- m_contenturl = url;
-
- if (null == m_xContext ) {
- // get the remote office component context
- m_xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- }
-
- XMultiComponentFactory xMCF = m_xContext.getServiceManager();
-
- m_ucb = (XInterface)UnoRuntime.queryInterface(XInterface.class,
- xMCF.createInstanceWithContext(
- "com.sun.star.ucb.UniversalContentBroker", m_xContext));
- }
-
- /**
- * Returns created identifier object for given URL..
- *
- *@return XContent Created identifier object for given URL
- *@exception java.lang.Exception
- */
- public XContent createUCBContent() throws java.lang.Exception {
- return createUCBContent( getContentURL() );
- }
-
- /**
- * Returned created identifier object for given URL.
- *
- *@param String Connect URL. Example : -url=file:///
- *@return XContent Created identifier object for given URL
- *@exception java.lang.Exception
- */
- public XContent createUCBContent( String connectURL ) throws java.lang.Exception {
- XContent content = null;
- if ( connectURL != null && !connectURL.equals( "" )) {
-
- // Obtain required UCB interfaces...
- XContentIdentifierFactory idFactory
- = ( XContentIdentifierFactory )UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, m_ucb );
- XContentProvider provider
- = ( XContentProvider )UnoRuntime.queryInterface(
- XContentProvider.class, m_ucb );
-
- // Create identifier object for given URL.
- XContentIdentifier id = idFactory.createContentIdentifier( connectURL );
- content = provider.queryContent( id );
- }
- return content;
- }
-
- /**
- * Get ucb instance.
- *
- *@return XInterface That contains the ucb instance
- */
- public XInterface getUCB() {
- return m_ucb;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Executes a command.
- *
- *param XInterface
- *param String
- *param Object
- *@return Object The result according to the specification of the command.
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- Object executeCommand( XInterface ifc, String commandName, Object argument )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- /////////////////////////////////////////////////////////////////////
- // Obtain command processor interface from given content.
- /////////////////////////////////////////////////////////////////////
-
- XCommandProcessor cmdProcessor
- = (XCommandProcessor)UnoRuntime.queryInterface(
- XCommandProcessor.class, ifc );
-
- /////////////////////////////////////////////////////////////////////
- // Assemble command to execute.
- /////////////////////////////////////////////////////////////////////
-
- Command command = new Command();
- command.Name = commandName;
- command.Handle = -1; // not available
- command.Argument = argument;
-
- // Note: throws CommandAbortedException, Exception
- return cmdProcessor.execute( command, 0, null );
- }
-
- public static String getAbsoluteFileURLFromSystemPath( String systemPath )
- {
- try
- {
- File file = new File( systemPath );
- String url = file.toURI().toURL().toString();
- if ( url.charAt( 6 ) != '/' ) { // file:/xxx vs. file:///xxxx
- StringBuffer buf1 = new StringBuffer( "file:///" );
- buf1.append( url.substring( 6 ) );
- url = buf1.toString();
- }
- return url;
- }
- catch ( java.net.MalformedURLException e )
- {
- e.printStackTrace();
- }
- return new String();
- }
-
- public static String prependCurrentDirAsAbsoluteFileURL( String relativeURL )
- {
- // get url of current dir.
- String url = getAbsoluteFileURLFromSystemPath( "" );
- StringBuffer buf = new StringBuffer( url );
- if ( !url.endsWith( File.separator ) )
- buf.append( File.separator );
- buf.append( relativeURL );
- return buf.toString();
- }
-
- public static String createTargetDataFile( String workDir )
- {
- try
- {
- StringBuffer buf = new StringBuffer();
- if ( workDir != null && workDir.length() > 0 ) {
- buf.append( workDir );
- buf.append( File.separator );
- }
- buf.append( "resource-" );
- buf.append( System.currentTimeMillis() );
- File file = new File( buf.toString() );
- String url = file.toURI().toURL().toString();
- if ( url.charAt( 6 ) != '/' ) { // file:/xxx vs. file:///xxxx
- StringBuffer buf1 = new StringBuffer( "file:///" );
- buf1.append( url.substring( 6 ) );
- url = buf1.toString();
- }
-
- try
- {
- file.createNewFile();
- String content = new String(
- "This is the content of a sample data file." );
- FileOutputStream stream = new FileOutputStream( file );
- stream.write( content.getBytes() );
- stream.close();
- }
- catch ( java.io.IOException e )
- {
- e.printStackTrace();
- }
-
- return url;
- }
- catch ( java.net.MalformedURLException e )
- {
- e.printStackTrace();
- }
-
- return new String();
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/Makefile b/odk/examples/DevelopersGuide/UCB/Makefile
deleted file mode 100644
index a6b172bf..00000000
--- a/odk/examples/DevelopersGuide/UCB/Makefile
+++ /dev/null
@@ -1,156 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-# Builds the UCB examples of the Developers Guide.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=UCBExamples
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-OUT_APP_MISC = $(OUT_MISC)/$(EXAMPLE_NAME)
-
-APP1_NAME=ChildrenRetriever
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-APP2_NAME=DataStreamComposer
-APP2_JAR=$(OUT_APP_CLASS)/$(APP2_NAME).jar
-APP3_NAME=DataStreamRetriever
-APP3_JAR=$(OUT_APP_CLASS)/$(APP3_NAME).jar
-APP4_NAME=PropertiesComposer
-APP4_JAR=$(OUT_APP_CLASS)/$(APP4_NAME).jar
-APP5_NAME=PropertiesRetriever
-APP5_JAR=$(OUT_APP_CLASS)/$(APP5_NAME).jar
-APP6_NAME=ResourceCreator
-APP6_JAR=$(OUT_APP_CLASS)/$(APP6_NAME).jar
-APP7_NAME=ResourceManager
-APP7_JAR=$(OUT_APP_CLASS)/$(APP7_NAME).jar
-APP8_NAME=ResourceRemover
-APP8_JAR=$(OUT_APP_CLASS)/$(APP8_NAME).jar
-
-APP_JAVAFILES = \
- Helper.java \
- MyActiveDataSink.java \
- MyInputStream.java
-
-APP_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(APP_JAVAFILES))
-APP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-# Targets
-.PHONY: ALL
-ALL : \
- UCBExamples
-
-include $(SETTINGS)/stdtarget.mk
-
-$(APP_CLASSFILES) : $(APP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $(APP_JAVAFILES)
-
-$(OUT_APP_CLASS)/%.class : %.java $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/$(APP2_NAME).class : $(APP2_NAME).java $(OUT_APP_CLASS)/DataStreamRetriever.class $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/$(APP6_NAME).class : $(APP6_NAME).java $(OUT_APP_CLASS)/DataStreamRetriever.class $(APP_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class $(APP_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class $(OUT_APP_CLASS)/DataStreamRetriever.class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(basename $(@F)).class DataStreamRetriever.class $(APP_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP6_JAR) : $(OUT_APP_CLASS)/$(APP6_NAME).mf $(OUT_APP_CLASS)/$(APP6_NAME).class $(OUT_APP_CLASS)/DataStreamRetriever.class $(APP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(basename $(@F)).mf $(basename $(@F)).class DataStreamRetriever.class $(APP_CLASSNAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class
-$(APP3_JAR) : $(OUT_APP_CLASS)/$(APP3_NAME).mf $(OUT_APP_CLASS)/$(APP3_NAME).class
-$(APP4_JAR) : $(OUT_APP_CLASS)/$(APP4_NAME).mf $(OUT_APP_CLASS)/$(APP4_NAME).class
-$(APP5_JAR) : $(OUT_APP_CLASS)/$(APP5_NAME).mf $(OUT_APP_CLASS)/$(APP5_NAME).class
-$(APP6_JAR) : $(OUT_APP_CLASS)/$(APP6_NAME).mf $(OUT_APP_CLASS)/$(APP6_NAME).class
-$(APP7_JAR) : $(OUT_APP_CLASS)/$(APP7_NAME).mf $(OUT_APP_CLASS)/$(APP7_NAME).class
-$(APP8_JAR) : $(OUT_APP_CLASS)/$(APP8_NAME).mf $(OUT_APP_CLASS)/$(APP8_NAME).class
-
-UCBExamples : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR) $(APP5_JAR) $(APP6_JAR) $(APP7_JAR) $(APP8_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo $(MAKE) $(APP4_NAME).run
- @echo $(MAKE) $(APP5_NAME).run
- @echo $(MAKE) $(APP6_NAME).run
- @echo $(MAKE) $(APP7_NAME).run
- @echo $(MAKE) $(APP8_NAME).run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- -$(MKDIR) $(subst /,$(PS),$(OUT_APP_MISC))
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< -workdir=$(OUT_APP_MISC)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/DevelopersGuide/UCB/MyActiveDataSink.java b/odk/examples/DevelopersGuide/UCB/MyActiveDataSink.java
deleted file mode 100644
index 3eb0dc8f..00000000
--- a/odk/examples/DevelopersGuide/UCB/MyActiveDataSink.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.io.XActiveDataSink;
-import com.sun.star.io.XInputStream;
-
-/**
- * XActiveDataSink interface implementation. Makes it possible to read
- * the corresponding object from an input stream.
- */
-public class MyActiveDataSink implements XActiveDataSink {
-
- /**
- * Member properties
- */
- XInputStream m_aStream = null;
-
- /**
- * Constructor
- */
- public MyActiveDataSink() {
- super();
- }
-
- /**
- * Plugs the input stream.
- *
- *@param XInputStream
- */
- public void setInputStream( XInputStream aStream ) {
- m_aStream = aStream;
- }
-
- /**
- * Get the plugged stream.
- *
- *@return XInputStream The plugged stream
- */
- public XInputStream getInputStream() {
- return m_aStream;
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/MyInputStream.java b/odk/examples/DevelopersGuide/UCB/MyInputStream.java
deleted file mode 100644
index 187ff97e..00000000
--- a/odk/examples/DevelopersGuide/UCB/MyInputStream.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// imports
-import com.sun.star.io.BufferSizeExceededException;
-import com.sun.star.io.NotConnectedException;
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XSeekable;
-
-/**
- * XInputStream interface implementation.
- */
-public class MyInputStream implements XSeekable, XInputStream {
-
- /**
- * Member properties
- */
- private int offset = 0;
- private int read = offset;
- private byte[] bigbuffer;
-
- /**
- * Constructor
- */
- public MyInputStream() {
- }
-
- // XSeekable. Makes it possible to seek to a certain position within a stream.
-
- /**
- * Returns the length of the stream.
- *
- *@return long The length of the storage medium on which the stream works.
- */
- public synchronized long getLength()
- throws com.sun.star.io.IOException,com.sun.star.uno.RuntimeException {
- if ( bigbuffer != null ) {
- return bigbuffer.length - offset;
- } else {
- return 0;
- }
- }
-
- /**
- * Returns the current offset of the stream.
- *
- *@return long The current offset in this stream.
- */
- public synchronized long getPosition()
- throws com.sun.star.io.IOException,com.sun.star.uno.RuntimeException {
- return read - offset ;
- }
-
- /**
- * Changes the seek pointer to a new location relative to the beginning of the stream.
- *
- *@param long
- */
- public synchronized void seek(long p0)
- throws IllegalArgumentException, com.sun.star.io.IOException,
- com.sun.star.uno.RuntimeException {
- if( bigbuffer != null ) {
- p0 +=offset;
- read = ( int ) p0;
- if( read < offset || read > bigbuffer.length )
- throw new IllegalArgumentException();
- }
- }
-
- // XInputStream. This is the basic interface to read data from a stream.
-
- /**
- * States how many bytes can be read or skipped without blocking.
- *
- *@return int If not available, then returned 0
- */
- public synchronized int available()
- throws NotConnectedException, com.sun.star.io.IOException,
- com.sun.star.uno.RuntimeException {
- if( bigbuffer != null )
- return ( bigbuffer.length - read );
- else
- return 0;
- }
-
- /**
- * Closes the stream. .
- */
- public void closeInput()
- throws NotConnectedException,com.sun.star.io.IOException,
- com.sun.star.uno.RuntimeException {
- read = -1;
- }
-
- /**
- * Reads the specified number of bytes in the given sequence.
- *
- *@param byte[][]
- *@param int
- *@return int
- */
- public synchronized int readBytes(byte[][] p0, int p1)
- throws NotConnectedException, BufferSizeExceededException,
- com.sun.star.io.IOException, com.sun.star.uno.RuntimeException {
- if( bigbuffer != null ) {
- if( read == -1 )
- return 0;
- int i = 0;
- int available;
- if ( p1 > bigbuffer.length - read )
- available = bigbuffer.length - read;
- else
- available = p1;
-
- p0[0] = new byte[p1];
- while( available != 0 ) {
- p0[0][i++] = bigbuffer[read++];
- --available;
- }
- return i;
- } else {
- p0[0] = new byte[0];
- return 0;
- }
- }
-
- /**
- * Reads the available number of bytes at maximum nMaxBytesToRead .
- * This method blocks the thread until at least one byte is available.
- *
- *@param byte[][]
- *@param int
- *@return int
- */
- public synchronized int readSomeBytes(byte[][] p0, int p1)
- throws NotConnectedException,
- BufferSizeExceededException,
- com.sun.star.io.IOException,
- com.sun.star.uno.RuntimeException {
- return readBytes( p0,p1 );
- }
-
- /**
- * Skips the next nBytesToSkip bytes (must be positive).
- * It is up to the implementation whether this method is blocking the thread or not.
- *
- *@param int
- */
- public synchronized void skipBytes(int p0)
- throws NotConnectedException, BufferSizeExceededException,
- com.sun.star.io.IOException, com.sun.star.uno.RuntimeException {
- read += p0;
- if( read > bigbuffer.length )
- read = bigbuffer.length;
-
- if( read < offset )
- read = offset;
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/PropertiesComposer.java b/odk/examples/DevelopersGuide/UCB/PropertiesComposer.java
deleted file mode 100644
index 3807447a..00000000
--- a/odk/examples/DevelopersGuide/UCB/PropertiesComposer.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.Vector;
-import java.util.StringTokenizer;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.ucb.XContent;
-import com.sun.star.uno.UnoRuntime;
-
-/**
- * Setting Property Values of a UCB Content
- */
-public class PropertiesComposer {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XContent m_content;
- private String m_contenturl = "";
- private Vector m_propNames = new Vector();
- private Vector m_propValues = new Vector();
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -propNames=... (optional)
- * -propValues=... (optional)
- * -workdir=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public PropertiesComposer( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- }
-
- /**
- * Set values of the properties.
- * This method requires the main and the optional arguments to be set in order to work.
- * See Constructor.
- *
- *@return Object[] Returns null or instance object of com.sun.star.uno.Any
- * if values successfully seted, properties otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public Object[] setProperties()
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
- Vector properties = getProperties();
- Vector propertyValues = getPropertyValues();
- return setProperties( properties, propertyValues );
- }
-
- /**
- * Set values of the properties.
- *
- *@param Vector Properties
- *@param Vector Properties value
- *@return Object[] Returns null or instance object of com.sun.star.uno.Any
- * if values successfully seted, properties otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public Object[] setProperties( Vector properties, Vector propertiesValues )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- Object[] result = null;
- if ( m_content != null && !properties.isEmpty() &&
- !propertiesValues.isEmpty() &&
- properties.size() == propertiesValues.size() ) {
-
- /*
- **** This code is for unregistered properties. ****
-
- XPropertyContainer xPropContainer
- = (XPropertyContainer)UnoRuntime.queryInterface(
- XPropertyContainer.class, m_content );
-
- XPropertySetInfo xPropSetInfo = ( XPropertySetInfo )UnoRuntime.queryInterface(
- XPropertySetInfo.class,
- m_helper.executeCommand( m_content, "getPropertySetInfo", null ));
- */
-
- int size = properties.size();
- PropertyValue[] props = new PropertyValue[ size ];
- for ( int index = 0 ; index < size; index++ ) {
- String propName = ( String )properties.get( index );
- Object propValue = propertiesValues.get( index );
-
- /*
- **** This code is for unregistered properties. ****
-
- if ( !xPropSetInfo.hasPropertyByName( propName )) {
- xPropContainer.addProperty(
- propName, PropertyAttribute.MAYBEVOID, propValue );
- }
- */
-
- // Define property sequence.
- PropertyValue prop = new PropertyValue();
- prop.Name = propName;
- prop.Handle = -1; // n/a
- prop.Value = propValue;
- props[ index ] = prop;
- }
-
- // Execute command "setPropertiesValues".
- Object[] obj =
- ( Object[] )m_helper.executeCommand( m_content, "setPropertyValues", props );
- if ( obj.length == size )
- result = obj;
- }
- return result;
- }
-
- /**
- * Get properties names.
- *
- *@return Vector That contains the properties names
- */
- public Vector getProperties() {
- return m_propNames;
- }
-
- /**
- * Get properties values.
- *
- *@return Vector That contains the properties values
- */
- public Vector getPropertyValues() {
- return m_propValues;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- String workdir = "";
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-propNames=" )) {
- StringTokenizer tok
- = new StringTokenizer( args[i].substring( 11 ), ";" );
-
- while ( tok.hasMoreTokens() )
- m_propNames.add( tok.nextToken() );
-
- } else if ( args[i].startsWith( "-propValues=" )) {
- StringTokenizer tok
- = new StringTokenizer( args[i].substring( 12 ), ";" );
-
- while ( tok.hasMoreTokens() )
- m_propValues.add( tok.nextToken() );
- } else if ( args[i].startsWith( "-workdir=" )) {
- workdir = args[i].substring( 9 );
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.createTargetDataFile( workdir );
- }
-
- if ( m_propNames.size() == 0 ) {
- m_propNames.add( "Title" );
- }
-
- if ( m_propValues.size() == 0 ) {
- m_propValues.add(
- "changed-" + m_contenturl.substring(
- m_contenturl.lastIndexOf( "/" ) + 1 ) );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : PropertiesComposer -url=... -propNames=... -propValues=... -workdir=..." );
- System.out.println(
- "Defaults: -url=<workdir>/resource-<uniquepostfix> -propNames=Title -propValues=changed-<uniquepostfix> -workdir=<currentdir>" );
- System.out.println(
- "\nExample : -propNames=Title;Foo -propValues=MyRenamedFile.txt;bar" );
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * set properties of a resource.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
- System.out.println( "\n" );
- System.out.println(
- "--------------------------------------------------------" );
- System.out.println(
- "PropertiesComposer - sets property values of a resource." );
- System.out.println(
- "--------------------------------------------------------" );
-
- try {
-
- PropertiesComposer setProp = new PropertiesComposer( args );
- Vector properties = setProp.getProperties();
- Vector propertiesValues = setProp.getPropertyValues();
- Object[] result = setProp.setProperties( properties, propertiesValues );
-
- String tempPrint = "\nSetting properties of resource " + setProp.getContentURL();
- int size = tempPrint.length();
- System.out.println( tempPrint );
- tempPrint = "";
- for( int i = 0; i < size; i++ ) {
- tempPrint += "-";
- }
- System.out.println( tempPrint );
- if ( result != null ) {
- for ( int index = 0; index < result.length; index++ ) {
- Object obj = result[ index ];
- if( obj == null || obj instanceof com.sun.star.uno.Any )
- System.out.println(
- "Setting property " + properties.get( index ) + " succeeded." );
- else
- System.out.println(
- "Setting property " + properties.get( index ) + " failed." );
- }
- }
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/PropertiesRetriever.java b/odk/examples/DevelopersGuide/UCB/PropertiesRetriever.java
deleted file mode 100644
index ea7bb3c5..00000000
--- a/odk/examples/DevelopersGuide/UCB/PropertiesRetriever.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import java.util.Vector;
-import java.util.StringTokenizer;
-
-import com.sun.star.beans.Property;
-import com.sun.star.ucb.XContent;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.sdbc.XRow;
-
-
-/**
- * Obtaining Property Values from a UCB Content
- */
-public class PropertiesRetriever {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XContent m_content;
- private String m_contenturl = "";
- private Vector m_propNames = new Vector();
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -propNames=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public PropertiesRetriever( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- }
-
- /**
- * Get values of the properties.
- * This method requires the main and the optional arguments to be set in order to work.
- * See Constructor.
- *
- *@param Vector Properties
- *@return Vector Returns Properties values if values successfully retrieved, null otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public Vector getPropertyValues()
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
- Vector properties = getProperties();
- return getPropertyValues ( properties );
- }
-
- /**
- * Get values of the properties.
- *
- *@param Vector Properties
- *@return Vector Returns Properties values if values successfully retrieved, null otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public Vector getPropertyValues( Vector properties )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
- Vector m_propValues = null;
- if ( m_content != null && properties != null && !properties.isEmpty() ) {
-
- int size = properties.size();
-
- // Fill info for the properties wanted.
- Property[] props = new Property[ size ];
- for ( int index = 0 ; index < size; index++ ) {
-
- // Define property sequence.
- Property prop = new Property();
- prop.Name = ( String )properties.get( index );
- prop.Handle = -1; // n/a
- props[ index ] = prop;
- }
-
- // Execute command "getPropertyValues".
- XRow values =
- ( XRow )UnoRuntime.queryInterface(
- XRow.class, m_helper.executeCommand( m_content,"getPropertyValues", props ));
-
- m_propValues = new Vector();
-
- /*
- Extract values from row object. Note that the
- first column is 1, not 0.
- Title: Obtain value of column 1 as string.*/
- for ( int index = 1 ; index <= size; index++ ) {
- Object propertyValue = values.getObject( index, null );
- if ( !values.wasNull() && !(propertyValue instanceof com.sun.star.uno.Any ))
- m_propValues.add( propertyValue );
- else
- m_propValues.add( "[ Property not found ]" );
- }
- }
- return m_propValues;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Get the properties.
- *
- *@return Vector That contains the properties
- */
- public Vector getProperties() {
- return m_propNames;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-propNames=" )) {
- StringTokenizer tok
- = new StringTokenizer( args[i].substring( 11 ), ";" );
-
- while ( tok.hasMoreTokens() )
- m_propNames.add( tok.nextToken() );
-
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.prependCurrentDirAsAbsoluteFileURL( "data/data.txt" );
- }
-
- if ( m_propNames.size() == 0 ) {
- m_propNames.add( "Title" );
- m_propNames.add( "IsDocument" );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : PropertiesRetriever -url=... -propNames=..." );
- System.out.println(
- "Defaults: -url=<currentdir>/data/data.txt -propNames=Title;IsDocument" );
- System.out.println(
- "\nExample : -propNames=Title;IsFolder" );
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * get the properties values from a resource.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
- System.out.println( "\n" );
- System.out.println(
- "--------------------------------------------------------------" );
- System.out.println(
- "PropertiesRetriever - obtains property values from a resource." );
- System.out.println(
- "--------------------------------------------------------------" );
- try {
- PropertiesRetriever obtProperty = new PropertiesRetriever( args );
- Vector properties = obtProperty.getProperties();
- Vector propertiesValues = obtProperty.getPropertyValues( properties );
-
- String tempPrint = "\nProperties of resource " + obtProperty.getContentURL();
- int size = tempPrint.length();
- System.out.println( tempPrint );
- tempPrint = "";
- for( int i = 0; i < size; i++ ) {
- tempPrint += "-";
- }
- System.out.println( tempPrint );
-
- if ( properties != null && propertiesValues != null ) {
- size = properties.size();
- for (int index = 0; index < size ; index++ ) {
- String property = ( String )properties.get( index );
- Object propValue = propertiesValues.get( index );
- System.out.println( property + " : " + propValue );
- }
- }
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/ResourceCreator.java b/odk/examples/DevelopersGuide/UCB/ResourceCreator.java
deleted file mode 100644
index 4dc1946c..00000000
--- a/odk/examples/DevelopersGuide/UCB/ResourceCreator.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.ucb.ContentInfo;
-import com.sun.star.ucb.InsertCommandArgument;
-import com.sun.star.ucb.XContent;
-import com.sun.star.io.XInputStream;
-
-
-/**
- * Creating a New Resource
- */
-public class ResourceCreator {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XContent m_content;
- private String m_contenturl = "";
- private String m_name = "";
- private String m_srcURL = "";
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -name=... (optional)
- * -srcURL=... (optional)
- * -workdir=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public ResourceCreator( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
- String url = getContentURL();
-
- // Init
- m_helper = new Helper( url );
- if ( url.startsWith( "file:///" )) {
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- } else {
- throw new Exception(
- "Create new resource : parameter 'url' must contain a File URL " +
- "pointing to the file system folder in which the new resource " +
- "shall be created. (Example: file:///tmp/)" );
- }
- }
-
- /**
- * Create a new resource.
- * This method requires the main and the optional arguments to be set in order to work.
- * See Constructor.
- *
- *@return boolean Returns true if resource successfully created, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean createNewResource()
- throws com.sun.star.ucb.CommandAbortedException,
- com.sun.star.uno.Exception,
- java.lang.Exception {
-
- String sourceURL = getSourceURL();
- String name = getName();
- return createNewResource( sourceURL, name );
- }
-
- /**
- * Create a new resource.
- *
- *@param String Source resource URL
- *@param String New resource name
- *@return boolean Returns true if resource successfully created, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean createNewResource( String sourceURL, String name )
- throws com.sun.star.ucb.CommandAbortedException,
- com.sun.star.uno.Exception,
- java.lang.Exception {
-
- XInputStream stream = null;
- if ( sourceURL == null || sourceURL.equals( "" )) {
- stream = new MyInputStream();
- } else {
- String[] args = new String[ 1 ];
- args[ 0 ] = "-url=" + sourceURL;
- DataStreamRetriever access = new DataStreamRetriever( args );
- stream = access.getDataStream();
- }
- return createNewResource( stream, name );
- }
-
- /**
- * Create a new resource.
- *
- *@param XInputStream Source resource stream
- *@param String New resource name
- *@return boolean Returns true if resource successfully created, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean createNewResource( XInputStream stream, String name )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- boolean result = false;
- if ( stream != null && name != null && !name.equals( "" )) {
-
- // Note: The data for info may have been obtained from
- // property CreatableContentsInfo.
- ContentInfo info = new ContentInfo();
- info.Type = "application/vnd.sun.staroffice.fsys-file";
- info.Attributes = 0;
-
- // Create new, empty content (execute command "createNewContent").
- XContent newContent = ( XContent )UnoRuntime.queryInterface(
- XContent.class,
- m_helper.executeCommand( m_content, "createNewContent", info ) );
-
- if ( newContent != null ) {
-
- /////////////////////////////////////////////////////////////////////
- // Set mandatory properties...
- /////////////////////////////////////////////////////////////////////
-
- // Define property value sequence.
- PropertyValue[] props = new PropertyValue[ 1 ];
- PropertyValue prop = new PropertyValue();
- prop.Name = "Title";
- prop.Handle = -1; // n/a
- prop.Value = name;
- props[ 0 ] = prop;
-
- // Execute command "setPropertyValues".
- m_helper.executeCommand( newContent, "setPropertyValues", props );
-
- /////////////////////////////////////////////////////////////////////
- // Write the new file to disk...
- /////////////////////////////////////////////////////////////////////
-
- // Obtain document data for the new file.
- XInputStream data = stream;
-
- // Fill argument structure...
- InsertCommandArgument arg = new InsertCommandArgument();
- arg.Data = data;
- arg.ReplaceExisting = false;
-
- // Execute command "insert".
- m_helper.executeCommand( newContent, "insert", arg );
- result = true;
- }
- }
- return result;
- }
-
- /**
- * Get new resource name.
- *
- *@return String That contains the name
- */
- public String getName() {
- return m_name;
- }
-
- /**
- * Get source URL.
- *
- *@return String That contains the source URL
- */
- public String getSourceURL() {
- return m_srcURL;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- String workdir = "";
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-name=" )) {
- m_name = args[i].substring( 6 );
- } else if ( args[i].startsWith( "-srcURL=" )) {
- m_srcURL = args[i].substring( 8 );
- } else if ( args[i].startsWith( "-workdir=" )) {
- workdir = args[i].substring( 9 );
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.getAbsoluteFileURLFromSystemPath( workdir );
- }
-
- if ( m_name == null || m_name.equals( "" )) {
- m_name = "created-resource-" + System.currentTimeMillis();
- }
-
- if ( m_srcURL == null || m_srcURL.equals( "" )) {
- m_srcURL = Helper.prependCurrentDirAsAbsoluteFileURL( "data/data.txt" );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : ResourceCreator -url=... -name=... -srcURL=... -workdir=..." );
- System.out.println(
- "Defaults: -url=<workdir> -name=created-resource-<uniquepostfix> -srcURL=<currentdir>/data/data.txt> -workdir=<currentdir>" );
- System.out.println(
- "\nExample : -url=file:///home/kai/ -name=newfile.txt -srcURL=file:///home/kai/sourcefile.txt" );
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * create a new resource.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
- System.out.println( "\n" );
- System.out.println(
- "-----------------------------------------------------------------------" );
- System.out.println(
- "ResourceCreator - creates a new file in an existing file system folder." );
- System.out.println(
- " (Content for the new file can be retrieved from another file)." );
- System.out.println(
- "-----------------------------------------------------------------------" );
- try {
- ResourceCreator create = new ResourceCreator( args );
- boolean result = create.createNewResource();
- if ( result ) {
- System.out.println(
- "Creation of new resource " + create.getName() + " in folder: " +
- create.getContentURL() + " succeeded." );
- } else {
- System.out.println(
- "Creation of new resource " + create.getName() + " in folder: " +
- create.getContentURL() + " failed." );
- }
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/ResourceManager.java b/odk/examples/DevelopersGuide/UCB/ResourceManager.java
deleted file mode 100644
index bfe94ed5..00000000
--- a/odk/examples/DevelopersGuide/UCB/ResourceManager.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.ucb.NameClash;
-import com.sun.star.ucb.TransferCommandOperation;
-import com.sun.star.ucb.GlobalTransferCommandArgument;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
- * Copying, Moving and Creating Links to a Resource
- */
-public class ResourceManager {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private XInterface m_ucb;
- private String m_contenturl = "";
- private String m_srcURL = "";
- private String m_targetFolderURL = "";
- private String m_newTitle = "";
- private String m_transOperation = "";
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -targetFolderURL=... (optional)
- * -newTitle=... (optional)
- * -transOper=... (optional)
- * -workdir=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public ResourceManager( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Get xUCB
- m_ucb = m_helper.getUCB();
- }
-
- /**
- * Copy, move or create a link for a resource.
- * This method requires the main and the optional arguments to be set in order to work.
- * See Constructor.
- *
- *@return boolean Returns true if resource successfully transfered, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean transferResource()
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
- String sourceURL = getContentURL(); // URL of the source object
- String targetFolderURL = getTargetFolderURL(); // URL of the target folder
- String newTitle = getNewTitle(); // New name for the resource
- String transOperation = getTransOperation();
- return transferResource( sourceURL, targetFolderURL, newTitle, transOperation );
- }
-
- /**
- * Copy, move or create a link for a resource.
- *
- *@param String Source URL
- *@param String Target folder URL
- *@param String Transfering operation (copy, move, link)
- *@return boolean Returns true if resource successfully transfered, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean transferResource(
- String sourceURL, String targetFolderURL,
- String newTitle, String transOperation )
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- boolean result = false;
- if ( m_ucb != null && sourceURL != null && !sourceURL.equals( "" ) &&
- targetFolderURL != null && !targetFolderURL.equals( "" ) &&
- newTitle != null && transOperation != null && !transOperation.equals( "" ) &&
- ( transOperation.equals( "copy" ) || transOperation.equals( "move" ) ||
- transOperation.equals( "link" ))) {
-
- /////////////////////////////////////////////////////////////////////
- // Copy, move or create a link for a resource to another location...
- /////////////////////////////////////////////////////////////////////
- GlobalTransferCommandArgument arg = new GlobalTransferCommandArgument();
- if ( transOperation.equals( "copy" )) {
- arg.Operation = TransferCommandOperation.COPY;
- } else if ( transOperation.equals( "move" )) {
- arg.Operation = TransferCommandOperation.MOVE;
- } else if ( transOperation.equals( "link" )) {
- arg.Operation = TransferCommandOperation.LINK;
- }
- arg.SourceURL = sourceURL;
- arg.TargetURL = targetFolderURL;
-
- // object get a new unique name
- arg.NewTitle = newTitle;
-
- // fail, if object with same name exists in target folder
- arg.NameClash = NameClash.ERROR;
-
- // Let UCB execute the command "globalTransfer".
- m_helper.executeCommand( m_ucb, "globalTransfer", arg );
- result = true;
- }
- return result;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Get trasfering Operation.
- *
- *@return String That contains the trasfering Operation
- */
- public String getTransOperation() {
- return m_transOperation;
- }
-
- /**
- * Get target folder URL.
- *
- *@return String That contains the target folder URL
- */
- public String getTargetFolderURL() {
- return m_targetFolderURL;
- }
-
- /**
- * Get new title for the resource to be transfered.
- *
- *@return String That contains a new title for the transfered
- * resource. Can be empty. In this case resource
- * will keep the title it has in the source folder.
- */
- public String getNewTitle() {
- return m_newTitle;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- String workdir = "";
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-targetFolderURL=" )) {
- m_targetFolderURL = args[i].substring( 17 );
- } else if ( args[i].startsWith( "-newTitle=" )) {
- m_newTitle = args[i].substring( 10 );
- } else if ( args[i].startsWith( "-transOper=" )) {
- m_transOperation = args[i].substring( 11 );
- } else if ( args[i].startsWith( "-workdir=" )) {
- workdir = args[i].substring( 9 );
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.prependCurrentDirAsAbsoluteFileURL( "data/data.txt" );;
- }
-
- if ( m_targetFolderURL == null || m_targetFolderURL.equals( "" )) {
- m_targetFolderURL = Helper.getAbsoluteFileURLFromSystemPath( workdir );
- }
-
- if ( m_newTitle == null || m_newTitle.equals( "" )) {
- m_newTitle = "transfered-resource-" + System.currentTimeMillis();
- }
-
- if ( m_transOperation == null || m_transOperation.equals( "" )) {
- m_transOperation = "copy";
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage: ResourceManager -url=... -targetFolderURL=... -newTitle=... -transOper=... -workdir=..." );
- System.out.println(
- "Defaults: -url=<currentdir>/data/data.txt> -targetFolderURL=<workdir> -newTitle=transfered-resource-<uniquepostfix> -transOper=copy -workdir=<currentdir>");
- System.out.println(
- "\nExample : -url=file:///temp/MyFile.txt -targetFolderURL=file:///test/ -newTitle=RenamedFile.txt -transOper=copy " );
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * copy, move or create links a resource.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
-
- System.out.println( "\n" );
- System.out.println(
- "-----------------------------------------------------------------" );
- System.out.println(
- "ResourceManager - copies/moves a resource." );
- System.out.println(
- "-----------------------------------------------------------------" );
-
- try {
- ResourceManager transResource = new ResourceManager( args );
- String sourceURL = transResource.getContentURL();
- String targetFolderURL = transResource.getTargetFolderURL();
- String newTitle = transResource.getNewTitle();
- String transOperation = transResource.getTransOperation();
- boolean result = transResource.transferResource(
- sourceURL, targetFolderURL, newTitle, transOperation );
- if ( result )
- System.out.println( "\nTransfering resource succeeded." );
- else
- System.out.println( "Transfering resource failed." );
-
- System.out.println( " Source URL : " + sourceURL );
- System.out.println( " Target Folder URL : " + targetFolderURL );
- System.out.println( " New name : " + newTitle );
- System.out.println( " Transfer Operation: " + transOperation );
-
-
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/ResourceRemover.java b/odk/examples/DevelopersGuide/UCB/ResourceRemover.java
deleted file mode 100644
index 09a6bcb7..00000000
--- a/odk/examples/DevelopersGuide/UCB/ResourceRemover.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/**
- * Deleting a resource
- */
-public class ResourceRemover {
-
- /**
- * Member properties
- */
- private Helper m_helper;
- private String m_contenturl = "";
- private com.sun.star.ucb.XContent m_content;
-
- /**
- * Constructor.
- *
- *@param String[] This construtor requires the arguments:
- * -url=... (optional)
- * -workdir=... (optional)
- * See Help (method printCmdLineUsage()).
- * Without the arguments a new connection to a
- * running office cannot created.
- *@exception java.lang.Exception
- */
- public ResourceRemover( String args[] ) throws java.lang.Exception {
-
- // Parse arguments
- parseArguments( args );
-
- // Init
- m_helper = new Helper( getContentURL() );
-
- // Create UCB content
- m_content = m_helper.createUCBContent();
- }
-
- /**
- * Delete resource.
- *
- *@return boolean Returns true if resource successfully deleted, false otherwise
- *@exception com.sun.star.ucb.CommandAbortedException
- *@exception com.sun.star.uno.Exception
- */
- public boolean deleteResource()
- throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
-
- boolean result = false;
- if ( m_content != null ) {
-
- /////////////////////////////////////////////////////////////////////
- // Destroy a resource physically...
- /////////////////////////////////////////////////////////////////////
-
- Boolean deletePhysically = new Boolean( true );
-
- // Execute command "delete".
- m_helper.executeCommand( m_content, "delete", deletePhysically );
- result = true;
- }
- return result;
- }
-
- /**
- * Get connect URL.
- *
- *@return String That contains the connect URL
- */
- public String getContentURL() {
- return m_contenturl;
- }
-
- /**
- * Parse arguments
- *
- *@param String[] Arguments
- *@exception java.lang.Exception
- */
- public void parseArguments( String[] args ) throws java.lang.Exception {
-
- String workdir = "";
-
- for ( int i = 0; i < args.length; i++ ) {
- if ( args[i].startsWith( "-url=" )) {
- m_contenturl = args[i].substring( 5 );
- } else if ( args[i].startsWith( "-workdir=" )) {
- workdir = args[i].substring( 9 );
- } else if ( args[i].startsWith( "-help" ) ||
- args[i].startsWith( "-?" )) {
- printCmdLineUsage();
- System.exit( 0 );
- }
- }
-
- if ( m_contenturl == null || m_contenturl.equals( "" )) {
- m_contenturl = Helper.createTargetDataFile( workdir );
- }
- }
-
- /**
- * Print the commands options
- */
- public void printCmdLineUsage() {
- System.out.println(
- "Usage : ResourceRemover -url=... -workdir=..." );
- System.out.println(
- "Defaults: -url=<workdir>/resource-<uniquepostfix> -workdir=<currentdir>" );
- System.out.println(
- "\nExample : -url=file:///temp/MyFile.txt \n" );
- }
-
- /**
- * Create a new connection with the specific args to a running office and
- * delete a resource.
- *
- *@param String[] Arguments
- */
- public static void main ( String args[] ) {
-
- System.out.println( "\n" );
- System.out.println(
- "-----------------------------------------------------------------" );
- System.out.println(
- "ResourceRemover - destroys a resource." );
- System.out.println(
- "-----------------------------------------------------------------" );
-
- try {
- ResourceRemover delete = new ResourceRemover( args );
- boolean result = delete.deleteResource();
- String url = delete.getContentURL();
- if ( result ) {
- System.out.println(
- "Delete of resource " + url + " succeeded." );
- } else {
- System.out.println(
- "Delete of resource " + url + " failed." );
- }
- } catch ( com.sun.star.ucb.CommandAbortedException e ) {
- System.out.println( "Error: " + e );
- } catch ( com.sun.star.uno.Exception e ) {
- System.out.println( "Error: " + e );
- } catch ( java.lang.Exception e ) {
- System.out.println( "Error: " + e );
- }
- System.exit( 0 );
- }
-}
diff --git a/odk/examples/DevelopersGuide/UCB/data/data.txt b/odk/examples/DevelopersGuide/UCB/data/data.txt
deleted file mode 100644
index dd47db97..00000000
--- a/odk/examples/DevelopersGuide/UCB/data/data.txt
+++ /dev/null
@@ -1 +0,0 @@
-sample sample sample sample sample sample sample sample EOF \ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/UCB/makefile.mk b/odk/examples/DevelopersGuide/UCB/makefile.mk
deleted file mode 100644
index c95d3769..00000000
--- a/odk/examples/DevelopersGuide/UCB/makefile.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-UCB_FILES=\
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/data$/data.txt \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/ChildrenRetriever.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/DataStreamComposer.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/DataStreamRetriever.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/Helper.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/Makefile \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/MyActiveDataSink.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/MyInputStream.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/PropertiesComposer.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/PropertiesRetriever.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/ResourceCreator.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/ResourceManager.java \
- $(DESTDIRDEVGUIDEEXAMPLES)$/UCB$/ResourceRemover.java
-
-DIR_FILE_LIST= \
- $(UCB_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/devguide_ucb_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/devguide_ucb.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/DevelopersGuide/examples.html b/odk/examples/DevelopersGuide/examples.html
deleted file mode 100644
index 4beca94f..00000000
--- a/odk/examples/DevelopersGuide/examples.html
+++ /dev/null
@@ -1,3032 +0,0 @@
-<html>
-<head>
- <title>OpenOffice.org %PRODUCT_RELEASE% SDK - Developer's Guide Examples</title>
- <link rel="stylesheet" type="text/css"
- href="../../docs/sdk_styles.css">
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
- <meta name="author" content="J&uuml;rgen Schmidt">
- <meta name="created" content="2004-12-14">
-</head>
-<body class="sdkbody">
-<a name="examples"></a>
-<table class="table1" cellpadding="0">
- <tbody>
- <tr style="background-image:url(../../docs/images/sdk_head-2.png); backgorund-position: bottom; ">
- <td class="background" colspan="3" align="left"><img src="../../docs/images/sdk_head-1.png" width="800" height="120" usemap="#Map" border="0"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing10"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td colspan="3"><img class="nothing1"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1">Developer's Guide
-Examples</td>
- <td align="right"> <a href="../examples.html"
- title="link to the examples overview"><img class="navigate"
- src="../../docs/images/nav_left.png"></a> <a href="../../index.html"
- title="link to the SDK start page"><img class="navigate"
- src="../../docs/images/nav_home.png"></a></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="3">
- <p>The <a
- href="http://doc.services.openoffice.org/wiki/index.php/Documentation/DevGuide/OpenOffice.org_Developers_Guide"
- title="link to the Developer's Guide in the Wiki">Developer's Guide</a>
-comes with a wide range of examples from all application areas which
-shows the use of the API in the context of the different functional
-areas. Furthermore the examples can be used as a first starting point
-to modify an existing example to their own needs.</p>
- <p>Some fo the examples need a running office
-instance listening on a port. If this is necessary you will get further
-information in the makefiles.</p>
- <p>All examples marked with a <img
- src="../../docs/images/bluball.gif"> are executable and be started
-using a run target in the makefile. The name of the binary (C++) can
-differ compared to the source file, please see the run target in the
-appropriate makefile. Some of the examples which create a component
-have no run target. In these cases a document is provided which
-instantiates and runs the component (see the makefile output). Also the
-Basic examples provide documents which use and shows the implemented
-functionality. The database and forms examples need a running database,
-please see the description below. But note that is not described in
-detail how to create a working data source (see the office help).</p>
- </td>
- </tr>
- <tr>
- <td><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr valign="top">
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#FirstSteps"
- title="link to the First Steps examples">First Steps</a></td>
- <td class="content4"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#ProfessionalUNO"
- title="link to the Professional UNO examples">Professional UNO</a></td>
- <td class="content10"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Components"
- title="link to the Components examples">Writing UNO components</a></td>
- </tr>
- <tr valign="top">
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#OfficeDevelopment"
- title="link to the Office Development examples">Office Development</a></td>
- <td class="content4"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Text" title="link to the Text examples">Text
-Documents</a></td>
- <td class="content10"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Spreadsheet"
- title="link to the Spreadsheet examples">Spreadsheet Documents</a></td>
- </tr>
- <tr valign="top">
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Drawing"
- title="link to the Drawing And Presentation examples">Drawing and
-Presentation Documents</a></td>
- <td class="content4"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Charts"
- title="link to the Charts examples">Charts</a></td>
- <td class="content10"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#BasicandDialogs"
- title="link to the Basic And Dialogs examples">OpenOffice.org %PRODUCT_RELEASE% Basic and
-Dialogs</a></td>
- </tr>
- <tr valign="top">
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Database"
- title="link to the Database examples">Database Access</a></td>
- <td class="content4"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Forms"
- title="link to the Forms examples">Forms</a></td>
- <td class="content10"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#UniversalContentBroker%28UCB%29"
- title="link to the Universal Content Broker examples">Universal
-Content Broker (UCB)</a></td>
- </tr>
- <tr valign="top">
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Configuration"
- title="link to the Configuration examples">Configuration Management</a></td>
- <td class="content4"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#OfficeBean"
- title="link to the OOoBean examples">Office Bean</a></td>
- <td class="content10"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#Accessibility"
- title="link to the Accessibility examples">Accessibility</a></td>
- </tr>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#ScriptingFramework" title="link to the Scripting Framework examples">Scripting Framework</a></td>
- <td class="content4"></td>
- <td class="content3"><img
- src="../../docs/images/arrow-1.gif"></td>
- <td><a href="#GraphicalUserInterfaces" title="link to the Graphical UserInterfaces examples">Graphical User Interfaces</a></td>
- <td class="content10"></td>
- <td class="content3"></td>
- <td></td>
- <tr>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="FirstSteps">FirstSteps
-examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Text Document Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./FirstSteps/FirstUnoContact.java"
- title="link to FirstSteps/FirstUnoContact.java">FirstUnoContact</a></td>
- <td class="cell80">Shows how to initialize UNO and
-get a remote office service manager from a running OpenOffice.org %PRODUCT_RELEASE% in a
-different process space.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./FirstSteps/FirstLoadComponent.java"
- title="link to FirstSteps/FirstLoadComponent.java">FirstLoadComponent</a></td>
- <td class="cell80">Demonstrates how to load a
-component into OpenOffice.org %PRODUCT_RELEASE% by a Java application.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./FirstSteps/HelloTextTableShape.java"
- title="link to FirstSteps/HelloTextTableShape.java">HelloTextTableShape</a></td>
- <td class="cell80">Performs some generic text and
-shape operations on a text document, a spreadsheet document and a
-drawing document.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a
- name="ProfessionalUNO">Professional UNO examples1</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Lifetime Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/Lifetime/MyUnoObject.java"
- title="link to ProfUNO/Lifetime/MyUnoObject.java">MyUnoObject</a></td>
- <td class="cell80">Shows that it depends on the
-implementation of the Java VM whether finalize() will be called or not.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/Lifetime/object_lifetime.cxx"
- title="link to ProfUNO/Lifetime/object_lifetime.java">object_lifetime.cxx
-(ProfUnoLifetime)</a></td>
- <td class="cell80">Shows the UNO reference counting
-mechanism in C++.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Interprocess Connection Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/InterprocessConn/ConnectionAwareClient.java"
- title="link to ProfUNO/InterprocessConn/ConnectionAwareClient/.java">ConnectionAwareClient</a></td>
- <td class="cell80">Implements a client which is aware
-of losing connection to OpenOffice.org %PRODUCT_RELEASE%.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/InterprocessConn/UrlResolver.java"
- title="link to ProfUNO/InterProcessConn/UrlResolver.java">UrlResolver</a></td>
- <td class="cell80">Builds a connection to
-OpenOffice.org %PRODUCT_RELEASE% using the URL given on the command line. This example
-shows the usage of <a
- href="../../docs/common/ref/com/sun/star/bridge/XUnoUrlResolver.html"
- title="link to the reference documentation of com.sun.star.bridge.XUnoResolver"><code>XUnoUrlResolver</code></a>.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">C++ Binding Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/CppBinding/office_connect.cxx"
- title="link to ProfUNO/CppBinding/office_connect.java">office_connect.cxx</a></td>
- <td class="cell80">Builds a connection to
-OpenOffice.org %PRODUCT_RELEASE% using C++.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/CppBinding/string_samples.cxx"
- title="link to ProfUNO/Cppbinding/string_samples.java">string_samples.cxx</a></td>
- <td class="cell80">Demonstrates usage of RTL string
-classes <a href="../../docs/cpp/ref/names/rtl/c-OString.html"
- title="link to the reference documentation of rtl::OString"><code>OString</code></a>,
- <a href="../../docs/cpp/ref/names/rtl/c-OUString.html"
- title="link to the reference documentation of rtl::OUString"><code>OUString</code></a>
-and <a href="../../docs/cpp/ref/names/rtl/c-OUStringBuffer.html"
- title="link to the reference documentation of rtl::OUStringBuffer"><code>OUStringBuffer</code></a>.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">SimpleBootstrap Java Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java"
- title="link to ProfUNO/SimpleBootstrap_java/SimpleBootstrap_java.java">SimpleBootstrap_java.java</a></td>
- <td class="cell80">Shows the transparent use of
-office UNO components from Java. The remote office component context is
-obtained by using the <code>com.sun.star.comp.helper.Bootstrap.bootstrap()</code>
-method, which bootstraps the component context from a UNO installation.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./ProfUNO/SimpleBootstrap_java/manifest.mf"
- title="link to ProfUNO/SimpleBootstrap_java/manifest.mf"> manifest.mf</a></td>
- <td class="cell80">Contains the additional manifest
-file entries.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
-
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">SimpleBootstrap C++ Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx"
- title="link to ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx">SimpleBootstrap_cpp.cxx</a></td>
- <td class="cell80">Shows the transparent use of
-office UNO components from C++. The remote office component context is
-obtained by using the <code>::cppu::bootstrap()</code> function, which
-bootstraps the component context from a UNO installation.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Deployment Features</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"> <a
- href="./Components/SimpleLicense/description.xml"
- title="link to Components/SimpleLicense/description.xml">description.xml</a></td>
- <td class="cell80">Demonstrates how license files can be embedded, so that they are shown to the user during installation.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
-
-
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Components">Writing
-UNO components examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Jobs Addon Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/JobsAddon/AsyncJob.java"
- title="link to Components/Addons/JobsAddon/AsyncJob.java">AsyncJob</a></td>
- <td class="cell80">An java example showing how a job
-can analyze the given arguments and how the environment can be
-detected, in which the job is executed.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/JobsAddon/Jobs.xcu"
- title="link to Components/Addons/JobsAddon/Jobs.xcu">Jobs.xcu</a></td>
- <td class="cell80">Contains the example job
-configuration.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/JobsAddon/Addons.xcu"
- title="link to Components/Addons/JobsAddon/Addons.xcu">Addons.xcu</a></td>
- <td class="cell80">Contains the configuration entries
-for the Jobs addon where different entries are configured.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">ProtocolHandler Addon Java</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java"
- title="link to Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java">ProtocolHandlerAddon</a></td>
- <td class="cell80">Implements a ProtocolHandler addon
-component in Java.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu">ProtocolHandler.xcu</a></td>
- <td class="cell80">Contains the ProtocolHandler
-configuration.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu">Addons.xcu</a></td>
- <td class="cell80">Contains the configuration entries
-for the ProtocolHandler addon where different entries are configured.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">ProtocolHandler Addon C++</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx">addon.cxx</a></td>
- <td class="cell80">Implements a ProtocolHandler addon
-component in C++.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx">addon.hxx</a></td>
- <td class="cell80">Contains the class definition of
-the c++ ProtocolHandler example.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/component.cxx"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/component.cxx">component.cxx</a></td>
- <td class="cell80">Implements the administrative
-component functions (component_writeInfo, component_getFactory).</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/ProtocolHandler.xcu">ProtocolHandler.xcu</a></td>
- <td class="cell80">Contains the ProtocolHandler
-configuration.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu"
- title="link to Components/Addons/ProtocolHandlerAddon_cpp/Addons.xcu">Addons.xcu</a></td>
- <td class="cell80">Contains the configuration entries
-for the ProtocolHandler addon where different entries are configured.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Java Component Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif"> <a
- href="./Components/JavaComponent/TestJavaComponent.java"
- title="link to Components/JavaComponent/TestJavaComponent.java">TestJavaComponent</a></td>
- <td class="cell80">Demonstrates how to extend the
-service provider with a new factory and instantiates the example
-components.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/JavaComponent/TestComponentA.java"
- title="link to Components/JavaComponent/TestComponentA.java">TestComponentA</a></td>
- <td class="cell80">Shows a simple demo component
-which implements <a
- href="../../docs/common/ref/com/sun/star/lang/XTypeProvider.html"
- title="link to the reference documentation of com.sun.star.lang.XTypeProvider"><code>XTypeProvider</code></a>,
- <a
- href="../../docs/common/ref/com/sun/star/lang/XServiceInfo.html"
- title="link to the reference documentation of com.sun.star.lang.XServicedInfo">
- <code>XServiceInfo</code></a> and an own interface <code>XSomethingA</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/JavaComponent/TestComponentB.java"
- title="link to Components/JavaComponent/TestComponentB.java">TestComponentB</a></td>
- <td class="cell80">Shows a simple demo component
-which implements <a
- href="../../docs/common/ref/com/sun/star/lang/XTypeProvider.html"
- title="link to the reference documentation of com.sun.star.lang.XTypeProvider">
- <code>XTypeProvider</code></a>, <a
- href="../../docs/common/ref/com/sun/star/lang/XServiceInfo.html"
- title="link to the reference documentation of com.sun.star.lang.XServiceInfo"><code>XServiceInfo</code></a>
-and an own interface <code>XSomethingB</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/JavaComponent/TestServiceProvider.java"
- title="link to Components/JavaComponent/TestServiceProvider.java">TestServiceProvider</a></td>
- <td class="cell80">Implements a factory (service
-provider) which can create the two test components.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">C++ Component Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif"> <a
- href="./Components/CppComponent/TestCppComponent.cxx"
- title="link to Components/CppComponent/TestCppComponent.cxx">TestCppComponent.cxx</a></td>
- <td class="cell80">Shows how to create new instances
-of the demo services and calls some methods of the demo interface.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/CppComponent/service1_impl.cxx"
- title="link to Components/CppComponent/service1_impl.cxx">service1_impl.cxx</a></td>
- <td class="cell80">Implements a simple UNO service
-with an own interface in C++.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/CppComponent/service2_impl.cxx"
- title="link to Components/CppComponent/service2_impl.cxx">service2_impl.cxx</a></td>
- <td class="cell80">Implements another simple UNO
-service in C++.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Thumbs Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Thumbs/org/openoffice/comp/test/ImageShrink.java"
- title="link to Components/Thumbs/org/openoffice/comp/test/ImageShrink.java">ImageShrink</a></td>
- <td class="cell80">Contains a framework for a
-component which scales images in a directory and stores them to another
-directory. This code does not really do anything, it just contains the
-framework.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/Thumbs/org/openoffice/comp/test/Thumbs.java"
- title="link to Components/Thumbs/org/openoffice/comp/test/Thumbs.java">Thumbs</a></td>
- <td class="cell80">This example registers a factory
-for the image shrink component and instantiates it.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Dialog Component Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif"> <a
- href="./Components/DialogComponent/DialogComponent.java"
- title="link to Components/DialogComponent/DialogComponent.java">DialogComponent.java</a></td>
- <td class="cell80">Implements a component accessing a dialog created
- with the OpenOffice.org %PRODUCT_RELEASE% Basic IDE. The component provides methods that
- can be bound to dialog respectively control events .</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/DialogComponent/XTestDialogHandler.idl"
- title="link to Components/DialogComponent/XTestDialogHandler.idl">XTestDialogHandler.idl</a></td>
- <td class="cell80">Interface implementing a createDialog method showing the
- dialog and some methods to be used as event handler for the dialog.
- </td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/DialogComponent/TestDialogHandler.idl"
- title="link to Components/DialogComponent/TestDialogHandler.idl">TestDialogHandler.idl</a></td>
- <td class="cell80">
- Service definition for the component implementing
- its own interface <code>XTestDialogHandler</code>.
- </td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Components/DialogComponent/DialogComponent.odt"
- title="link to Components/DialogComponent/DialogComponent.odt">DialogComponent.odt</a></td>
- <td class="cell80">Document containing Basic code to
- instantiate the Dialog Components and a Dialog containing
- controls with events bound to methods supported by the
- Dialog Component.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a
- name="OfficeDevelopment">Office Development examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Ascii Filter Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java"
- title="link to OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java">AsciiReplaceFilter</a></td>
- <td class="cell80">Implements an example for an
-import/export filter service.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java"
- title="link to OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java">FilterOptions</a></td>
- <td class="cell80">Offers some helper methods to
-analyze and prepare the arguments of the filter method.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/AsciiFilter/TypeDetection.xcu"
- title="link to OfficeDev/FilterDevelopment/AsciiFilter/TypeDetection.xcu">TypeDetection.xcu</a></td>
- <td class="cell80">Contains the necessary
-configuration items for the AsciiReplaceFilter.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">FlatXmlFilter C++ Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx">FlatXml.cxx</a></td>
- <td class="cell80">Implements an import/export filter
-storing the data in one xml stream instead of the normal three streams
-in for example an .odt file. The example is implemented in C++.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.xcu"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXmlFilter_cpp.xcu">FlatXmlFilter_cpp.xcu</a></td>
- <td class="cell80">Contains the necessary
-configuration items for the C++ flat xml filter.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">FlatXmlFilter Java Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java">FlatXml</a></td>
- <td class="cell80">Implements an import/export filter
-storing the data in one xml stream instead of the normal three streams
-in for example an .odt file. The example is implemented in Java.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.xcu"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.xcu">FlatXmlFilter_java.xcu</a></td>
- <td class="cell80">Contains the necessary
-configuration items for the Java flat xml filter.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">FlatXml FilterDetection Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx">filterdetect.cxx</a></td>
- <td class="cell80">Implements an example filter
-detection for the flat xml filter. The example is implemented in C++.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx">filterdetect.hxx</a></td>
- <td class="cell80">Contains the class definition of
-the filter detection example.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx">fdcomp.cxx</a></td>
- <td class="cell80">Implements the administrative
-component functions (component_writeInfo, component_getFactory).</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/FilterDevelopment/FlatXmlFilterDetection/FlatXmlTypeDetection.xcu"
- title="link to OfficeDev/FilterDevelopment/FlatXmlFilterDetection/FlatXmlTypeDetection.xcu">FlatXmlTypeDetection.xcu</a></td>
- <td class="cell80">Contains the necessary
-configuration items for the C++ flat xml type detection.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Desktop Environment Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/CustomizeView.java"
- title="link to OfficeDev/DesktopEnvironment/CustomizeView.java">CustomizeView</a></td>
- <td class="cell80">Offers a view which allows hiding
-and showing of the menubar, toolbar and objectbar of the related
-document component.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeDev/DesktopEnvironment/Desk.java"
- title="link to OfficeDev/DesktopEnvironment/Desk.java">Desk</a></td>
- <td class="cell80">This is the main part of a demo
-application based on the framework APIs. It mainly shows the mechanisms
-to load, store and convert documents, as well as dispatch and dispatch
-interception. It integrates windows from OpenOffice.org %PRODUCT_RELEASE% via system
-window handle. This is the same mechanism as used by the OOoBean, but
-the OOoBean itself is not used here, just the JNI window handle access.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/DocumentView.java"
- title="link to OfficeDev/DesktopEnvironment/DocumentView.java">DocumentView</a></td>
- <td class="cell80">Deals with the application window
-and it's actions.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/FunctionHelper.java"
- title="link to OfficeDev/DesktopEnvironment/FunctionHelper.java">FunctionHelper</a></td>
- <td class="cell80">This helper comprises all
-OpenOffice.org %PRODUCT_RELEASE% API calls. Thus it is possible to learn about these
-aspects separately from the rest of the application example.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/IOnewayLink.java"
- title="link to OfficeDev/DesktopEnvironment/IOnewayLink.java">IOnewayLink</a></td>
- <td class="cell80">This is an interface to receive
-asynchronous events from UNO oneway calls.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/IShutdownListener.java"
- title="link to OfficeDev/DesktopEnvironment/IShutdownListener.java">IShutdownListener</a></td>
- <td class="cell80">This is a listener interface to
-clean up on shutdown of OpenOffice.org %PRODUCT_RELEASE%.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/Interceptor.java"
- title="link to OfficeDev/DesktopEnvironment/Interceptor.java">Interceptor</a></td>
- <td class="cell80">This implements a dispatch
-interceptor for a specific URL.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java"
- title="link to OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java">JavaWindowPeerFake</a></td>
- <td class="cell80">Fakes an <a
- href="../../docs/common/ref/com/sun/star/awt/XWindowPeer.html"
- title=" link to the reference documentation of com.sun.star.awt.XWindowPeer"><code>XWindowPeer</code></a>
-for the Java native window handle to create a child window for the
-office frame.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/NativeView.java"
- title="link to OfficeDev/DesktopEnvironment/NativeView.java">NativeView</a></td>
- <td class="cell80">Implements native JNI methods to
-get the window handle of the Java window.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/OfficeConnect.java"
- title=" link to OfficeDev/DesktopEnvironment/OfficeConnect.java">OfficeConnect</a></td>
- <td class="cell80">Builds the remote bridge to
-OpenOffice.org %PRODUCT_RELEASE% and exports its UNO service manager for the Java side of
-the application.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/OnewayExecutor.java"
- title="link to OfficeDev/DesktopEnvironment/OnewayExecutor.java">OnewayExecutor</a></td>
- <td class="cell80">Implements <code>IOnewayLink</code>
-to decouple asynchronous oneway calls in the Java process.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/StatusListener.java"
- title="link to OfficeDev/DesktopEnvironment/StatusListener.java">StatusListener</a></td>
- <td class="cell80">Implements a listener for a <a
- href="../../docs/common/ref/com/sun/star/frame/FeatureStateEvent.html"
- title="link to the reference documentation of com.sun.star.frame.FeatureStateEvent">
- <code>FeatureStateEvent</code></a>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/StatusView.java"
- title="link to OfficeDev/DesktopEnvironment/StatusView.java">StatusView</a></td>
- <td class="cell80">Shows the current status for which
-the application is registered as an event listener.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DesktopEnvironment/ViewContainer.java"
- title="link to OfficeDev/DesktopEnvironment/ViewContainer.java">ViewContainer</a></td>
- <td class="cell80">Performs a clean up on the Java
-side on OpenOffice.org %PRODUCT_RELEASE% shutdown.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Office Development Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/OfficeConnect.java"
- title="link to OfficeDev/OfficeConnect.java">OfficeConnect</a></td>
- <td class="cell80">Builds the remote bridge to
-OpenOffice.org %PRODUCT_RELEASE% and exports its UNO service manager to the Java side.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeDev/ContextMenuInterceptor.java"
- title="link to OfficeDev/ContextMenuInterceptor.java">ContextMenuInterceptor</a></td>
- <td class="cell80">This example shows a context menu
-interceptor that creates a new menu entry that has a sub menu. This sub
-menu is in inserted into the context menu on the topmost position. It
-provides some helper functions to the user that are reachable through
-the menu Help.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/MenuElement.java"
- title="link to OfficeDev/MenuElement.java">MenuElement</a></td>
- <td class="cell80">A helper class for the context
-menu interceptor example. It determines the menu element type.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeDev/Number_Formats.java"
- title="link to OfficeDev/Number_Formats.java">Number_Formats</a></td>
- <td class="cell80">Demonstrates the use of number
-formats in a spreadsheet document.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Termination Test Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeDev/TerminationTest/TerminationTest.java"
- title="link to OfficeDev/TerminationTest/TerminationTest.java">TerminationTest</a></td>
- <td class="cell80">This example uses the
-TerminateListener and shows the use of them in a running program.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/TerminationTest/TerminateListener.java"
- title="link to OfficeDev/TerminationTest/TerminateListener.java">TerminateListener</a></td>
- <td class="cell80">An example implementation of <a
- href="../../docs/common/ref/com/sun/star/frame/XTerminateListener.html"
- title="link to the reference documentation of com.sun.star.frame.XTerminationListener">
- <code>XTerminateListener</code></a>. It is called
-when OpenOffice.org %PRODUCT_RELEASE% terminates.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Clipboard Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeDev/Clipboard/Clipboard.java"
- title="link to OfficeDev/Clipboard/Clipboard.java">Clipboard</a></td>
- <td class="cell80">Demonstrates the usage of the
-clipboard service by registering a clipboard listener, getting a list
-of formats from the current clipboard content and copying some data to
-the clipboard.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Clipboard/ClipboardListener.java"
- title="link to OfficeDev/Clipboard/ClipboardListener.java">ClipboardListener</a></td>
- <td class="cell80">Implements a clipboard listener
-for the Clipboard example. In such a class, actions can be implemented
-which happen whenever the clipboard content changes.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Clipboard/ClipboardOwner.java"
- title="link to OfficeDev/Clipboard/ClipboardOwner.java">ClipboardOwner</a></td>
- <td class="cell80">Implements a clipboard owner for
-the Clipboard example. This class is notified when it loses ownership
-of the clipboard.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Clipboard/TextTransferable.java"
- title="link to OfficeDev/Clipboard/TextTransferable.java">TextTransferable</a></td>
- <td class="cell80">Implements a data object for the
-Clipboard example. Such classes supply clients with data in a variety
-of formats.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Linguistic Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeDev/Linguistic/LinguisticExamples.java"
- title="link to OfficeDev/Linguistic/LinguisticExamples.java">LinguisticExamples</a></td>
- <td class="cell80">A short example that uses most of
-the functionality from the OpenOffice.org %PRODUCT_RELEASE% linguistic API.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/OneInstanceFactory.java"
- title="link to OfficeDev/Linguistic/OneInstanceFactory.java">OneInstanceFactory</a></td>
- <td class="cell80">This class is used to provide a
-service factory for the linguistic services. It enforces that the
-actual implementations are only instantiated once.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/PropChgHelper.java"
- title="link to OfficeDev/Linguistic/PropChgHelper.java">PropChgHelper</a></td>
- <td class="cell80">The base class for several
-property change helpers which are used to keep track of the changes of
-the service relevant linguistic properties. It is also used by the
-thesaurus directly.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/PropChgHelper_Hyph.java"
- title="link to OfficeDev/Linguistic/PropChgHelper_Hyph.java">PropChgHelper_Hyph</a></td>
- <td class="cell80">The property change helper that is
-tracking the hyphenation relevant properties.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/PropChgHelper_Spell.java"
- title="link to OfficeDev/Linguistic/PropChgHelper_Spell.java">PropChgHelper_Spell</a></td>
- <td class="cell80">The property change helper that is
-tracking the spell checking relevant properties.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/SampleHyphenator.java"
- title="link to OfficeDev/Linguistic/SampleHyphenator.java">SampleHyphenator</a></td>
- <td class="cell80">A simple implementation for a <a
- href="../../docs/common/ref/com/sun/star/linguistic2/Hyphenator.html"
- title="link to the reference documentation of com.sun.star.linguistic2.Hypenator"><code>Hyphenator</code></a>
-service.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/SampleSpellChecker.java"
- title="link to OfficeDev/Linguistic/SampleSpellChecker.java">SampleSpellChecker</a></td>
- <td class="cell80">A simple implementation for a <a
- href="../../docs/common/ref/com/sun/star/linguistic2/SpellChecker.html"
- title="link to the reference documentation of com.sun.star.linguistic2.SpellChecker"><code>SpellChecker</code></a>
-service.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/SampleThesaurus.java"
- title="link to OfficeDev/Linguistic/SampleThesaurus.java">SampleThesaurus</a></td>
- <td class="cell80">A simple implementation for a <a
- href="../../docs/common/ref/com/sun/star/linguistic2/Thesaurus.html"
- title="link to the reference documentation of com.sun.star.linguistic2.Thesaurus"><code>Thesaurus</code></a>
-service.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/XHyphenatedWord_impl.java"
- title="link to OfficeDev/Linguistic/XHyphenatedWord_impl.java">XHyphenatedWord_impl</a></td>
- <td class="cell80">An object implementing the <a
- href="../../docs/common/ref/com/sun/star/linguistic2/XHyphenatedWord.html"
- title="link to the reference documentation of com.sun.star.linguistic2/XHyphenatedWord"><code>XHyphenatedWord</code></a>
-interface. An instance of this type may be returned by the hyphenator.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/XMeaning_impl.java"
- title="link to OfficeDev/Linguistic/XMeaning_impl.java">XMeaning_impl</a></td>
- <td class="cell80">An object implementing the <a
- href="../../docs/common/ref/com/sun/star/linguistic2/XMeaning.html"
- title="link to the reference documentation of com.sun.star.linguistic2.XMeaning"><code>XMeaning</code></a>
-interface. An instance of this type may be returned by the thesaurus.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/XPossibleHyphens_impl.java"
- title="link to OfficeDev/Linguistic/XPossibleHyphens_impl.java">XPossibleHyphens_impl</a></td>
- <td class="cell80">An object implementing the <a
- href="../../docs/common/ref/com/sun/star/linguistic2/XPossibleHyphens.html"
- title="link to the reference documentation of com.sun.star.linguistic2.XPossibleHyphens">
- <code>XPossibleHyphens</code></a> interface. An
-instance of this type may be returned by the hyphenator.</td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/Linguistic/XSpellAlternatives_impl.java"
- title="link to OfficeDev/Linguistic/XSpellAlternatives_impl.java">XSpellAlternatives_impl</a></td>
- <td class="cell80">An object implementing the <a
- href="../../docs/common/ref/com/sun/star/linguistic2/XSpellAlternatives.html"
- title="link to the reference documentation of com.sun.star.linguistic2.XSpellAlternatives">
- <code>XSpellAlternatives</code></a> interface. An
-instance of this type may be returned by the spell checker.</td>
- </tr>
- <tr>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Path Settings Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/PathSettings/PathSettingsTest.java"
- title="link to OfficeDev/PathSettings/PathSettingsTest.java">PathsettingsTest</a></td>
- <td class="cell80">This code example creates the
-service <a
- href="../../docs/common/ref/com/sun/star/util/PathSettings.html"
- title="link to the reference documentation of com.sun.star.util.PathSettingst">
- <code>com.sun.star.util.PathSettings</code></a> and
-retrieves all path properties from it. It shows how a developer can
-change the path properties using the <a
- href="../../docs/common/ref/com/sun/star/beans/XPropertySet.html"
- title="link to the reference documentation of com.sun.star.beans.XPropertySet"><code>XPropertySet</code></a>
-interface.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Path Substitution Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/PathSubstitution/PathSubstitutionTest.java"
- title="link to OfficeDev/PathSubstitution/PathSubstitutionTest.java">PathSubstitutionTest</a></td>
- <td class="cell80">This code example creates the path
-substitution service <a
- href="../../docs/common/ref/com/sun/star/util/PathSubstitution.html"
- title="link to the reference documentation of com.sun.star.util.PathSubstitution">
- <code>com.sun.star.util.PathSubstitution</code></a>
-and retrieves the pre-defined Office path variables. It shows the
-variable values on the screen. The reSubstiuteVariables function is
-used to show how the service exchanges parts of a path with a path
-variable supporting platform independent path usage.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Disable Commands Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./OfficeDev/DisableCommands/DisableCommandsTest.java"
- title="link to OfficeDev/DisableCommands/DisableCommandsTest.java">DisableCommandsTest</a></td>
- <td class="cell80">Implements an example showing how
-a developer can use the configuration API to disable/enable commands at
-runtime.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Text">Text
-Documents examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Text/TextDocuments.java"
- title="link to Text/TextDocuments.java">TextDocuments</a></td>
- <td class="cell80">
- <p>Demonstrates a wide variety of API functions in
-text documents and text document views.</p>
- <ul>
- <li>use of templates</li>
- <li>using the view cursor, including visible text
-selections</li>
- <li>changing the paragraph style</li>
- <li>using various editing facilities like text
-insertion</li>
- <li>using various cursor interfaces</li>
- <li>creating text contents, like tables, sections
-and frames, well as text fields and columns</li>
- <li>using stylesheets</li>
- <li>applying numbering styles</li>
- <li>using references, indexes, footnotes and
-autotext</li>
- <li>loading, storing and printing a text document</li>
- </ul>
- <p>Adjust the strings at the beginning of the class
-definition to match your installation!</p>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Spreadsheet">Spreadsheet
-Documents examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Spreadsheet/ExampleAddIn.java"
- title="link to Spreadsheet/ExampleAddIn.java">ExampleAddIn</a></td>
- <td class="cell80">Implements a simple add-in
-component for spreadsheet documents. This component needs to be
-deployed before it can be used.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Spreadsheet/ExampleDataPilotSource.java"
- title="link to Spreadsheet/ExampleDataPilotSource.java">ExampleDataPilotSource</a></td>
- <td class="cell80">Shows usage of a wide variety of
-spreadsheet interfaces like <a
- href="../../docs/common/ref/com/sun/star/sheet/XCellRangeData.html"
- title="link to the reference documentation of com.sun.star.sheet.XCellRangeData">
- <code>XCellRangeData</code></a>, <a
- href="../../docs/common/ref/com/sun/star/sheet/XCellSeries.html"
- title="link to the reference documentation of com.sun.star.sheet.XCellSeries"><code>XCellSeries</code></a>,
- <a
- href="../../docs/common/ref/com/sun/star/sheet/XArrayFormulaRange.html"
- title="link to the reference documentation of com.sun.star.sheet.XArrayFormularRange"><code>XArrayFormulaRange</code></a>
-and <a
- href="../../docs/common/ref/com/sun/star/sheet/XMultipleOperation.html"
- title="link to the reference documentation of com.sun.star.sheet.XMultipleOperation"><code>XMultipleOperations</code></a>
-as well as named ranges, label ranges and data pilot.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Spreadsheet/GeneralTableSample.java"
- title="link to Spreadsheet/GeneralTableSample.java">GeneralTableSample</a></td>
- <td class="cell80">Executes some examples working on
-generic tables.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Spreadsheet/SpreadsheetDocHelper.java"
- title="link to Spreadsheet/SpreadsheetDocHelper.java">SpreadsheetDocHelper</a></td>
- <td class="cell80">Defines a helper class for the
-other examples to access spreadsheet documents, sheets and cells.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Spreadsheet/SpreadsheetSample.java"
- title="link to Spreadsheet/SpreadsheetSample.java">SpreadsheetSample</a></td>
- <td class="cell80">Executes some examples working on
-a spreadsheet document.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Spreadsheet/ViewSample.java"
- title="link to Spreadsheet/ViewSample.java">ViewSample</a></td>
- <td class="cell80">Shows how to manipulate view
-settings like splitting sheeting sheets and selecting cells.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Drawing">Drawing
-and Presentation Documents examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/ChangeOrderDemo.java"
- title="link to Drawing/ChangeOrderDemo.java">ChangeOrderDemo</a></td>
- <td class="cell80">Shows how to change the painting
-order of shapes.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/ControlAndSelectDemo.java"
- title="link to Drawing/ControlAndSelectDemo.java">ControlAndSelectDemo</a></td>
- <td class="cell80">Demonstrates the creation of a
-control shape and selects it in the current view.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/CustomShowDemo.java"
- title="link to Drawing/CustomShowDemo.java">CustomShowDemo</a></td>
- <td class="cell80">Creates two custom shows and
-selects one of these.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/DrawViewDemo.java"
- title="link to Drawing/DrawViewDemo.java">DrawViewDemo</a></td>
- <td class="cell80">Prints the view data properties
-and the controller properties of a drawing view and shows an example of
-setting such a property.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/DrawingDemo.java"
- title="link to Drawing/DrawingDemo.java">DrawingDemo</a></td>
- <td class="cell80">Creates several shapes on several
-slides. Nice pattern included!</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/FillAndLineStyleDemo.java"
- title="link to Drawing/FillAndLineStyleDemo.java">FillAndLineStyleDemo</a></td>
- <td class="cell80">Demonstrates usage of area fill
-and line style properties.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/GluePointDemo.java"
- title="link to Drawing/GluePointDemo.java">GluePointDemo</a></td>
- <td class="cell80">Creates two shapes with glue
-points and connects them with two connectors.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/GraphicExportDemo.java"
- title="link to Drawing/GraphicExportDemo.java">GraphicExportDemo</a></td>
- <td class="cell80">Loads a drawing document and
-exports it to a GIF file. Run this program with source URL, target URL
-and page index on the command line, where the URLs are fully qualified
-URLs.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Drawing/Helper.java"
- title="link to Drawing/Helper.java">Helper</a></td>
- <td class="cell80">Contains a helper class for the
-other examples to connect to OpenOffice.org %PRODUCT_RELEASE% and open or create a drawing
-document.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/LayerDemo.java" title="link to Drawing/LayerDemo.java">LayerDemo</a></td>
- <td class="cell80">Creates shapes in different layers
-to show how to protect shapes from modifications.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/ObjectTransformationDemo.java"
- title="link to Drawing/ObjectTransformationDemo.java">ObjectTransformationDemo</a></td>
- <td class="cell80">Shows geometric transformations on
-a shape using a homogenous matrix.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/Organigram.java"
- title="link to Drawing/Organigram.java">Organigram</a></td>
- <td class="cell80">Demonstrates the creation of an
-organigram consisting of shapes and connectors.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Drawing/PageHelper.java"
- title="link to Drawing/PageHelper.java">PageHelper</a></td>
- <td class="cell80">Contains a helper class for
-accessing several kinds of draw pages in a presentation or drawing
-document.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/PresentationDemo.java"
- title="link to Drawing/PresentationDemo.java">PresentationDemo</a></td>
- <td class="cell80">Creates a presentation and runs it
-with some user interaction.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Drawing/ShapeHelper.java"
- title="link to Drawing/ShapeHelper.java">ShapeHelper</a></td>
- <td class="cell80">Contains a helper class for
-accessing and creating shapes for the other examples.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Drawing/StyleDemo.java" title="link to Drawing/StyleDemo.java">StyleDemo</a></td>
- <td class="cell80">Creates a shape and applies a
-predefined shape stylesheet.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a href="./Drawing/TextDemo.java"
- title="link to Drawing/TextDemo.java">TextDemo</a></td>
- <td class="cell80">Demonstrates usage of text and
-text styles in shapes.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Charts">Charts
-examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Charts/CalcHelper.java"
- title="link to Charts/CalcHelper.java">CalcHelper</a></td>
- <td class="cell80">Contains some helper methods for
-charts in spreadsheet documents, like accessing sheets by name,
-inserting a chart into a sheet, filling cell ranges with random numbers
-etc.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Charts/ChartHelper.java"
- title="link to Charts/ChartHelper.java">ChartHelper</a></td>
- <td class="cell80">Contains some helper methods for
-charts, like creating a chart as an embedded object.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Charts/ChartInCalc.java"
- title="link to Charts/ChartInCalc.java">ChartInCalc</a></td>
- <td class="cell80">Demonstrates how to create an
-embedded chart object with a random scatter chart within a spreadsheet.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Charts/ChartInDraw.java"
- title="link to Charts/ChartInDraw.java">ChartInDraw</a></td>
- <td class="cell80">Inserts a 3D-bar chart into a
-drawing document.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Charts/ChartInWriter.java"
- title="link to Charts/ChartInWriter.java">ChartInWriter</a></td>
- <td class="cell80">Inserts an embedded chart object
-with a random bar chart in a text document. This example does not
-really work, because the API for embedding objects into text documents
-is not implemented. To be more precise.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Charts/Helper.java"
- title="link to Charts/Helper.java">Helper</a></td>
- <td class="cell80">Shows how to connect to
-OpenOffice.org %PRODUCT_RELEASE% and create text, drawing or spreadsheet document. This
-class is used as a helper class for the other examples.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Charts/JavaSampleChartAddIn.java"
- title="link to Charts/JavaSampleChartAddIn.java">JavaSampleChartAddIn</a></td>
- <td class="cell80">Gives an example of how to
-implement chart add-ins to create new or specialized diagram types. The
-resulting component has to be deployed before it can be used.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Charts/ListenAtCalcRangeInDraw.java"
- title="link to Charts/ListenAtCalcRangeInDraw.java">ListenAtCalcRangeInDraw</a></td>
- <td class="cell80">This helper class is used to build
-connection between an embedded chart object in a drawing document and a
-data range in a spreadsheet document.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Charts/SelectionChangeListener.java"
- title="link to Charts/SelectionChangeListener.java">SelectionChangeListener</a></td>
- <td class="cell80">Shows how to register a handler
-which is called when the selection within an embedded chart object
-changes.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a
- name="BasicandDialogs">OpenOffice.org %PRODUCT_RELEASE% Basic and Dialogs examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./BasicAndDialogs/FirstStepsBasic.odt"
- title="link to BasicAndDialogs/FirstStepsBasic.odt">FirstStepsBasic.odt</a></td>
- <td class="cell80">This StarBasc example shows how to
-create an own dialog which inserts a graphics object into a text
-document.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./BasicAndDialogs/CreatingDialogs/SampleDialog.java"
- title="link to BasicAndDialogs/CreatingDialogs/SampleDialog.java">SampleDialog</a></td>
- <td class="cell80">This example builds a Java
-component which creates a simple dialog.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./BasicAndDialogs/CreatingDialogs/CreatingDialogs.odt"
- title="link to BasicAndDialogs/CreatingDialogs/CreatingDialogs.odt">CreatingDialogs.odt</a></td>
- <td class="cell80">This document contains a simple
-Basic macro which loads the SampleDialog component. The macro will be
-executed by pressing a Push button.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./BasicAndDialogs/ToolkitControls/ToolkitControls"
- title="link to BasicAndDialogs/ToolkitControls">ToolkitControls</a></td>
- <td class="cell80">In this directory you find a Basic
-library which implements several examples using toolkit controls. You
-can easy pack this Basic library as a UNO package and can install it
-using the package manager (see the makefile output).<br>
-After the installation you will find a new library "ToolkitControls" in
-the Basic IDE containing 4 modules and the necessary dialogs.<br>
- <p>Select one of the following modules and press the
-Run button: </p>
- <ul>
- <li>FileDialog = simple dialog which ask for a
-filename (nothing else) </li>
- <li>MultiPage = a more complex dialog with several
-tab pages </li>
- <li>ProgressBar = a dialog which shows a progress
-bar </li>
- <li>ScrollBar = a dialog which shows a scroll bar </li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Database">Database
-Access examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- <tr>
- <td colspan="3"> The Database examples use a SQL
-database named "MYDB0" with write access. Make sure that you have a
-data source operating on such a database in your office before you run
-the example. </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Database Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Database/CodeSamples.java"
- title="link to Database/CodeSamples.java">CodeSamples</a></td>
- <td class="cell80">Creates the connection to
-OpenOffice.org %PRODUCT_RELEASE% and executes the code SalesMan samples for database API.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Database/OpenQuery.java"
- title="link to Database/OpenQuery.java">OpenQuery</a></td>
- <td class="cell80">Demonstrates the use of <a
- href="../../docs/common/ref/com/sun/star/sdbc/XResultSetUpdate.html"
- title="link to the reference documentation of com.sun.star.sdbc.XResultSetUpdate"><code>XResultSetUpdate</code></a>
-and <a href="../../docs/common/ref/com/sun/star/sdbc/XRowUpdate.html"
- title="link to the reference documentation of com.sun.star.sdbc.XRowUpdate">
- <code>XRowUpdate</code></a>.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a href="./Database/RowSet.java"
- title="link to Database/RowSet.java">RowSet</a></td>
- <td class="cell80">Demonstrates the usage of a row
-set.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/RowSetEventListener.java"
- title="link to Database/RowSetEventListener.java">RowSetEventListener</a></td>
- <td class="cell80">Demonstrates how to define
-listener for the row set example.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Database/Sales.java"
- title="link to Database/Sales.java">Sales</a></td>
- <td class="cell80">Creates a simple database table.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Database/SalesMan.java"
- title="link to Database/SalesMan.java">SalesMan</a></td>
- <td class="cell80">Creates a simple database table.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Database/sdbcx.java"
- title="link to Database/sdbcx.java">sdbcx</a></td>
- <td class="cell80">Demonstrates the usage of the
-SDBCX layer services.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Driver Skeleton Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/OSubComponent.hxx"
- title="link to Database/DriverSkeleton/OSubComponent.hxx">OSubComponent.hxx</a></td>
- <td class="cell80">Helper class to delegate special
-dispose handling.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/OTypeInfo.hxx"
- title="link to Database/DriverSkeleton/OTypeInfo.hxx">OTypeInfo.hxx</a></td>
- <td class="cell80">Contains the database types from
-the DatabaseMetaData getTypes call.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SConnection.hxx"
- title="link to Database/DriverSkeleton/SConnection.hxx">SConnection.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the service <code>com.sun.star.sdbc.Connection</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SConnection.cxx"
- title="link to Database/DriverSkeleton/SConnection.cxx">SConnection.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SConnection.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SDatabaseMetaData.hxx"
- title="link to Database/DriverSkeleton/SDatabaseMetaData.hxx">SDatabaseMetaData.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the interface <code>com.sun.star.sdbc.XDatabaseMetaData</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SDatabaseMetaData.cxx"
- title="link to Database/DriverSkeleton/SDatabaseMetaData.cxx">SDatabaseMetaData.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SDatabaseMetaData.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SDriver.hxx"
- title="link to Database/DriverSkeleton/SDriver.hxx">SDriver.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the service <code>com.sun.star.sdbc.Driver</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SDriver.cxx"
- title="link to Database/DriverSkeleton/SDriver.cxx">SDriver.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SDriver.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SPreparedStatement.hxx"
- title="link to Database/DriverSkeleton/SPreparedStatement.hxx">SPreparedStatement.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the service <code>com.sun.star.sdbc.PreparedStatement</code>.
- </td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SPreparedStatement.cxx"
- title="link to Database/DriverSkeleton/SPreparedStatement.cxx">SPreparedStatement.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SPreparedStatement.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SResultSet.hxx"
- title="link to Database/DriverSkeleton/SResultSet.hxx">SResultSet.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the service <code>com.sun.star.sdbc.ResultSet</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SResultSet.cxx"
- title="link to Database/DriverSkeleton/SResultSet.cxx">SResultSet.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SResultSet.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SResultSetMetaData.hxx"
- title="link to Database/DriverSkeleton/SResultSetMetaData.hxx">SResultSetMetaData.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the interface <code>com.sun.star.sdbc.XResultSetMetaData</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SResultSetMetaData.cxx"
- title="link to Database/DriverSkeleton/SResultSetMetaData.cxx">SResultSetMetaData.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SResultSetMetaData.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SServices.cxx"
- title="link to Database/DriverSkeleton/SServices.cxx">SServices.cxx</a></td>
- <td class="cell80">This file contains a class
-implementing the service needed to register the driver.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SStatement.hxx"
- title="link to Database/DriverSkeleton/SStatement.hxx">SStatement.hxx</a></td>
- <td class="cell80">This file contains the declaration
-of a class implementing the service <code>com.sun.star.sdbc.Statement</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/SStatement.cxx"
- title="link to Database/DriverSkeleton/SStatement.cxx">SStatement.cxx</a></td>
- <td class="cell80">This file contains the
-implementation of the class declared in SStatement.hxx.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/propertyids.hxx"
- title="link to Database/DriverSkeleton/propertyids.hxx">propertyids.hxx</a></td>
- <td class="cell80">Defines some common used strings
-and declare a helper class for properties.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Database/DriverSkeleton/propertyids.cxx"
- title="link to Database/DriverSkeleton/propertyids.cxx">propertyids.cxx</a></td>
- <td class="cell80">Implements the property helper
-class.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Forms">Forms
-examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/BooleanValidator.java"
- title="link to Forms/BooleanValidator.java">BooleanValidator</a></td>
- <td class="cell80">The class <code>BooleanOperator</code>
-implements an <a
- href="../../docs/common/ref/com/sun/star/form/validation/XValidator.html"
- title="link to the reference documentation of com.sun.star.form.validation.XValidator">validator</a>
-for a form control, which can veto certain radio button or check box
-states.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/ButtonOperator.java"
- title="link to Forms/ButtonOperator.java">ButtonOperator</a></td>
- <td class="cell80">The form created by the sample
-program contains various buttons which are tied to certain
-functionality. The class ButtonOperator, well, operates these buttons.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/ComponentTreeTraversal.java"
- title="link to Forms/ComponentTreeTraversal.java">ComponentTreeTraversal</a></td>
- <td class="cell80">Helper classes for traveling
-through a tree of <a
- href="../../docs/common/ref/com/sun/star/form/FormComponent.html"
- title="link to the reference documentation of com.sun.star.form.FormComponent">
- <code>FormComponent's</code></a>.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/ControlLock.java"
- title="link to Forms/ControlLock.java">ControlLock</a></td>
- <td class="cell80">Helper class for implementing the
-locking of control depending on the state of the underlying <a
- href="../../docs/common/ref/com/sun/star/sdb/RowSet.html"
- title="link to the reference documentation of com.sun.star.sdb.RowSet"><code>RowSet</code></a>.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Forms/ControlValidation.java"
- title="link to Forms/ControlValidation.java">ControlValidation</a></td>
- <td class="cell80">This is the main class for the
-control validation example. It creates a sample document, fills it with
-controls, and attaches several validators to those controls</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/ControlValidator.java"
- title="link to Forms/ControlValidator.java">ControlValidator</a></td>
- <td class="cell80">Base class implementing the common
-denominator for components <a
- href="../../docs/common/ref/com/sun/star/form/validation/ValidatableControlModel.html"
- title="link to the reference documentation of com.sun.star.form.validation.ValidatableControlModel">validating
-form controls.</a></td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Forms/DataAwareness.java"
- title="link to Forms/DataAwareness.java">DataAwareness</a></td>
- <td class="cell80">This class implements the basic
-example for a form working on a database. Two tables will be created
-and a form (writer document) with a bussiness example will fill its
-fields from these tables.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/DateValidator.java"
- title="link to Forms/DateValidator.java">DateValidator</a></td>
- <td class="cell80">The class <code>DateValidator</code>
-implements an <a
- href="../../docs/common/ref/com/sun/star/form/validation/XValidator.html"
- title="link to the reference documentation of com.sun.star.form.validation.XValidator">validator</a>
-for a form control, which can check the content of a form date field. </td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/DocumentBasedExample.java"
- title="link to Forms/DocumentBasedExample.java">DocumentBasedExample</a></td>
- <td class="cell80">This class collects common
-functionality of examples which require a document.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/DocumentHelper.java"
- title="link to Forms/DocumentHelper.java">DocumentHelper</a></td>
- <td class="cell80">Helper class for encapsulating
-working with a document.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/DocumentType.java"
- title="link to Forms/DocumentType.java">DocumentType</a></td>
- <td class="cell80">A simple enumeration class for
-classifying a document.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/DocumentViewHelper.java"
- title="link to Forms/DocumentViewHelper.java">DocumentViewHelper</a></td>
- <td class="cell80">Helper class for encapsulating
-working with a view for a document.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/FLTools.java"
- title="link to Forms/FLTools.java">FLTools</a></td>
- <td class="cell80">Various small tools for the form
-layer sample program.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/FormLayer.java"
- title="link to Forms/FormLayer.java">FormLayer</a></td>
- <td class="cell80">Helper class for accessing and
-manipulating the form layer of a document.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/GridFieldValidator.java"
- title="link to Forms/GridFieldValidator.java">GridFieldValidator</a></td>
- <td class="cell80"><code>GridFieldValidator</code> is
-responsible for validating the input in a specific grid control column.
-This is not to be mixed up with the control-based validation as
-described in the <a
- href="../../docs/common/ref/com/sun/star/form/validation/module-ix.html"
- title="link to the reference documentation of com.sun.star.form.validation">validation</a>
-module. Instead, a <code>GridFieldValidator</code> assembles and uses
-various other concepts.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/InteractionRequest.java"
- title="link to Forms/InteractionRequest.java">InteractionRequest</a></td>
- <td class="cell80">A simple implementation of a <a
- href="../../docs/common/ref/com/sun/star/task/XInteractionRequest.html"
- title="link to the reference documentation of com.sun.star.task.XInteractionRequest"><code>XInteractionRequest</code></a>.
-Not tied to the form layer example, but a general helper.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/KeyGenerator.java"
- title="link to Forms/KeyGenerator.java">KeyGenerator</a></td>
- <td class="cell80">Helper class which is able to
-generate (unique) keys for a (<a
- href="../../docs/common/ref/com/sun/star/sdb/RowSet.html"
- title="link to the reference documentation of com.sun.star.sdb.RowSet"><code>RowSet</code>
- </a>) column. An instance of this class can be tied
-to a specific row set column. It then monitors the state of the
-underlying row set, and upon inserting a new record into it (two
-operation modi are possible here), it automatically inserts a newly
-created (two modi, too) key into the column.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/ListSelectionValidator.java"
- title="link to Forms/ListSelectionValidator.java">ListSelectionValidator</a></td>
- <td class="cell80">The class <code>ListSelectionValidator</code>
-implements an <a
- href="../../docs/common/ref/com/sun/star/form/validation/XValidator.html"
- title="link to the reference documentation of com.sun.star.form.validation.XValidator">validator</a>
-for a form control, which can veto certain selections in a list box
-control.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/NumericValidator.java"
- title="link to Forms/NumericValidator.java">NumericValidator</a></td>
- <td class="cell80">The class <code>NumericValidator</code>
-implements an <a
- href="../../docs/common/ref/com/sun/star/form/validation/XValidator.html"
- title="link to the reference documentation of com.sun.star.form.validation.XValidator">validator</a>
-for a form control, which can veto certain values in every control
-which allows exchanging numerical values.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/SingleControlValidation.java"
- title="link to Forms/SingleControlValidation.java">SingleControlValidation</a></td>
- <td class="cell80">Though form documents feature
-inbuilt mechanisms for visually indicating invalid control content (see
- <a
- href="../../docs/common/ref/com/sun/star/form/validation/module-ix.html"
- title="link to the reference documentation of com.sun.star.form.validation"><code>com.sun.star.form.validation</code>
- </a> for discussions about validity), the <a
- href="./Forms/ControlValidation.java"
- title="link to Forms/ControlValidation.java">ControlValidation</a>
-example extends this. The validity state of every control in this
-example, as well as possible explanations for invalidity, are displayed
-in dedicated texts. The <code>SingleControlValidation</code> class
-ties together a validatable control and those status texts.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/SpreadsheetDocument.java"
- title="link to Forms/SpreadsheetDocument.java">SpreadsheetDocument</a></td>
- <td class="cell80">A specialized <a
- href="./Forms/DocumentHelper.java"
- title="link to Forms/DocumentHelper.java"><code>DocumentHelper<code></code></code></a>
-which represents a spreadsheet document, and offers some form related
-functionality. For instance, this class allows the creation of <a
- href="../../docs/common/ref/com/sun/star/table/CellValueBinding.html"
- title="link to the reference documentation of com.sun.star.table.CellValueBinding">
- <code>CellValueBinding</code></a> instances, which
-can be used to couple the content of a form control with the content of
-a spreadsheet cell.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Forms/SpreadsheetValueBinding.java"
- title="link to Forms/SpreadsheetValueBinding.java">SpreadsheetValueBinding</a></td>
- <td class="cell80">This example demonstrates how to
-bind form controls to spreadsheet cells.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/SpreadsheetView.java"
- title="link to Forms/SpreadsheetView.java">SpreadsheetView</a></td>
- <td class="cell80">A specialized <a
- href="./Forms/DocumentViewHelper.java"
- title="link to Forms/DocumentViewHelper.java"><code>DocumentViewHelper</code></a>
-which represents a view to a spreadsheet document.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/TableCellTextBinding.java"
- title="link to Forms/TableCellTextBinding.java">TableCellTextBinding</a></td>
- <td class="cell80">This class allows binding the
-control of a form control with a table cell in a text document. For
-this, it uses the mechanisms of the <a
- href="../../docs/common/ref/com/sun/star/form/binding/module-ix.html"
- title="link to the reference documentation of com.sun.star.form.binding">
- <code>com.sun.star.form.binding</code></a> module.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/TextValidator.java"
- title="link to Forms/TextValidator.java">TextValidator</a></td>
- <td class="cell80">The class <code>TextValidator</code>
-implements an <a
- href="../../docs/common/ref/com/sun/star/form/validation/XValidator.html"
- title="link to the reference documentation of com.sun.star.form.validation.XValidator">validator</a>
-for a form control, which can monitor a form text field.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Forms/TimeValidator.java"
- title="link to Forms/TimeValidator.java">TimeValidator</a></td>
- <td class="cell80">The class <code>TimeValidator</code>
-implements an <a
- href="../../docs/common/ref/com/sun/star/form/validation/XValidator.html"
- title="link to the reference documentation of com.sun.star.form.validation.XValidator">validator</a>
-for a form control, which can monitor the content of a form time field.
- </td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/UNO.java"
- title="link to Forms/UNO.java">UNO</a></td>
- <td class="cell80">A small UNO-syntax related helper
-class.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Forms/ValueBinding.java"
- title="link to Forms/ValueBinding.java">ValueBinding</a></td>
- <td class="cell80">An example how to bind the content
-of a form control to a table cell in a text document.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./Forms/WaitForInput.java"
- title="link to Forms/WaitForInput.java">WaitForInput</a></td>
- <td class="cell80">A pretty small helper for the
-interactive examples, which notifies another instance when the user
-pressed key on the console.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a
- name="UniversalContentBroker(UCB)">Universal Content Broker (UCB)
-examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/ChildrenRetriever.java"
- title="link to UCB/ChildrenRetriever.java">ChildrenRetriever</a></td>
- <td class="cell80">Shows child entries of a given
-folder. Try -help or -? on the command line to view optional parameters.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/DataStreamComposer.java"
- title="link to UCB/DataStreamComposer.java">DataStreamComposer</a></td>
- <td class="cell80">Demonstrates usage of the data
-stream by copying the data from one UCB node to another.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/DataStreamRetriever.java"
- title="link to UCB/DataStreamRetriever.java">DataStreamRetriever</a></td>
- <td class="cell80">Shows how to obtain the data
-stream from a document resource.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="./UCB/Helper.java"
- title="link to UCB/Helper.java">Helper</a></td>
- <td class="cell80">Some helper methods to access the
-UCB which are used by the other examples.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./UCB/MyActiveDataSink.java"
- title="link to UCB/MyActiveDataSink.java">MyActiveDataSink</a></td>
- <td class="cell80">A helper class for the <code>DataStreamRetriever</code>
-example which implements a data sink.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/PropertiesComposer.java"
- title="link to UCB/PropertiesComposer.java">PropertiesComposer</a></td>
- <td class="cell80">Shows how to set property values
-of an UCB resource.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/PropertiesRetriever.java"
- title="link to UCB/PropertiesRetriever.java">PropertiesRetriever</a></td>
- <td class="cell80">Shows how to access property
-values of an UCB resource.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/ResourceCreator.java"
- title="link to UCB/ResourceCreator.java">ResourceCreator</a></td>
- <td class="cell80">Creates a new file in an existing
-file system folder.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/ResourceManager.java"
- title="link to UCB/ResourceManager.java">ResourceManager</a></td>
- <td class="cell80">Demonstrates how to copy and move
-UCB resources.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./UCB/ResourceRemover.java"
- title="link to UCB/ResourceRemover.java">ResourceRemover</a></td>
- <td class="cell80">Demonstrates how to remove UCB
-resources.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Configuration">Configuration
-Management examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Config/ConfigExamples.java"
- title="link to Config/ConfigExamples.java">ConfigExamples</a></td>
- <td class="cell80">This example connects to a
-OpenOffice.org %PRODUCT_RELEASE%, gets the configuration manager and accesses the
-configuration in various ways.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="OfficeBean">Office
-Bean example</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./OfficeBean/OOoBeanViewer.java"
- title="link to OfficeBean/OOoBeanViewer.java">OOoBeanViewer</a></td>
- <td class="cell80">Shows how to use the <code>OOoBean</code>
-embedded in a Java AWT component. It shows how to load and store
-documents as well as how to control toolbar visibility.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a name="Accessibility">Accessibility
-examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/ConnectionTask.java"
- title="link to Accessibility/ConnectionTask.java">ConnectionTask</a></td>
- <td class="cell80">A timer task that tries to
-(re-)connect to a running Office application. When it can not detect an
-Office application that accepts connections then it waits for some time
-and tries again.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/EventHandler.java"
- title="link to Accessibility/EventHandler.java">EventHandler</a></td>
- <td class="cell80">Handle all events that are used by
-this tool. It is called by the EventListenerProxy class with somewhat
-preprocessed events.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/EventListenerProxy.java"
- title="link to Accessibility/EventListenerProxy.java">EventListenerProxy</a></td>
- <td class="cell80">This proxy runs in its own thread
-to avoid deadlocks with the Office it listens to. It waits for top
-window events to be informed of new or removed top level windows and
-for some accessibility events that are relevant to display the
-currently focused object.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/GraphicalDisplay.java"
- title="link to Accessibility/GraphicalDisplay.java">GraphicalDisplay</a></td>
- <td class="cell80">This widget displays a graphical
-representation of the currently focused object. The focused object is
-painted as a green rectangle and its ancestors as gray rectangles to
-give an impression of the relative location of the objects.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/IAccessibleObjectDisplay.java"
- title="link to Accessibility/IAccessibleObjectDisplay.java">IAccessibleObjectDisplay</a></td>
- <td class="cell80">This interface is implemented by
-all classes that display the currently focused object, namely
-GraphicalDisplay and TextualDisplay. It allows the owner of the display
-classes to tell them to display a specific object: usually the focused
-object.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/MessageArea.java"
- title="link to Accessibility/MessageArea.java">MessageArea</a></td>
- <td class="cell80">A text area that shows messages
-about what the tools is currently doing.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/NameProvider.java"
- title="link to Accessibility/NameProvider.java">NameProvider</a></td>
- <td class="cell80">In contrast to the Java
-Accessibility API which uses Strings for event types, roles, states,
-and relation types, the UNO Accessibility API uses numbers for this
-task. In order to present them to the user in a more readable form this
-class returns the string name for each event, role, state, or relation.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/RegistrationThread.java"
- title="link to Accessibility/RegistrationThread.java">RegistrationThread</a></td>
- <td class="cell80">When a new window appears or an
-existing one is removed the tool registers or unregisters at all the
-window's children as accessibility event listener. This is handled by
-RegistrationThread objects in their own threads so that the user
-interface is not blocked.</td>
- </tr>
- <tr>
- <td class="cell20"><img
- src="../../docs/images/bluball.gif"> <a
- href="./Accessibility/SSR.java" title="link to Accessibility/SSR.java">SSR</a></td>
- <td class="cell80">The main class sets up the user
-interface and starts the ConnectionTask object that eventually will
-initiate a connection to a running Office application and in turn will
-create RegistrationThread objects to register at all Office windows as
-accessibility event listener and thus gets informed about the currently
-focused object.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./Accessibility/TextualDisplay.java"
- title="link to Accessibility/TextualDisplay.java">TextualDisplay</a></td>
- <td class="cell80">Show some textual information
-about the currently focused object like its name, description, and role.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a
- name="ScriptingFramework">Scripting Framework Examples</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./ScriptingFramework/SayHello/SayHello/SayHello.java"
- title="link to ScriptingFramework/SayHello/SayHello/SayHello.java">SayHello</a></td>
- <td class="cell80">A Scripting Framework Java macro
-that opens a new Writer document and inserts the word Hello in it.</td>
- </tr>
- <tr>
- <td class="cell20"><a
- href="./ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java"
- title="link to ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java">ScriptSelector</a></td>
- <td class="cell80">A Scripting Framework Java macro
-that opens a Java Swing dialog with a tree view of the macro hierarchy
-for the Office application.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8"
- src="../../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tbody>
- <tr>
- <td>
- <table class="table3">
- <tbody>
- <tr>
- <td colspan="2" class="head1"><a
- name="GraphicalUserInterfaces">Graphical User Interfaces</a></td>
- <td align="right"> <a href="#examples"
- title="link to the Developer's Guide examples overview"><img
- class="navigate" src="../../docs/images/nav_up.png"></a> <a
- href="../../index.html" title="link to the SDK start page"><img
- class="navigate" src="../../docs/images/nav_home.png"></a> </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20"> Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/DialogDocument.java" title="link to GUI/DialogDocument.java">DialogDocument</a></td>
- <td class="cell80">A sample showing how to display an office document in a dialog window.</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/Messagebox.java" title="link to GUI/MessageBox.java">MessageBox</a></td>
- <td class="cell80">A sample showing how to display a simple message box.</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/UnoDialogSample.java" title="link to GUI/UnoDialogSample.java">UnoDialogSample</a></td>
- <td class="cell80">A sample showing how to create various controls in a dialog (fixed text field, currency field, progress bar, fixed line, group box, edit field, time field, date field, pattern field, numeric field, progressbar, check box, radio button, list box, combo box, formatted field, file control, button control, roadmap control)</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/UnoDialogSample2.java" title="link to GUI/UnoDialogSample2.java">UnoDialogSample2</a></td>
- <td class="cell80">A dialog sample showing how to use a roadmap control.</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/UnoMenu.java" title="link to GUI/UnoMenu.java">UnoMenu</a></td>
- <td class="cell80">A sample showing a top window with some menus.</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/UnoMenu2.java" title="link to GUI/UnoMenu2.java">UnoMenu2</a></td>
- <td class="cell80">A dialog sample showing how to use or work with a context menu.</td>
- </tr>
- <tr>
- <td class="cell20"><img src="../../docs/images/bluball.gif">
-<a href="./GUI/ImageControlSample.java" title="link to GUI/ImageControlSample.java">ImageControlSample2</a></td>
- <td class="cell80">Dialog sample showing how to use an image control.</td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing30"
- src="../../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line"
- src="../../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td colspan="3">
- <div class="centertext">
- <p><img class="oraclelogo" src="../../docs/images/odk-footer-logo.gif" title="Sponsored by Oracle" alt="Oracle Logo" />
- Copyright &copy; 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.<p>
- </div>
- </td>
- </tr>
- </tbody>
-</table>
-<map name="Map">
-<area shape="rect" coords="10,68,93,105" href="http://www.oracle.com">
-</map>
-</body>
-</html>
diff --git a/odk/examples/OLE/activex/Makefile b/odk/examples/OLE/activex/Makefile
deleted file mode 100644
index 815fa86b..00000000
--- a/odk/examples/OLE/activex/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the OLE activex C++ component example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=so_activex
-COMPONENT_IMPL_NAME=$(SHAREDLIB_PRE)$(COMPONENT_NAME).$(SHAREDLIB_EXT)
-COMPONENT_IMPL=$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(COMPONENT_NAME).$(SHAREDLIB_EXT)
-OUT_COMP_INC = $(OUT_INC)/$(COMPONENT_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(COMPONENT_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMPONENT_NAME)
-
-MIDLFILES = so_activex.idl
-
-CXXFILES = SOActiveX.cpp \
- SOComWindowPeer.cpp \
- so_activex.cpp \
- StdAfx2.cpp
-
-SLOFILES = $(patsubst %.cpp,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- OleActvieXComponentExample
-
-include $(SETTINGS)/stdtarget.mk
-
-# Attention: so_activex.idl is no UNOIDL file!
-$(OUT_COMP_INC)/so_activex.h : so_activex.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- midl.exe /tlb $(OUT_COMP_GEN)/so_activex.tlb /h $(OUT_COMP_INC)/so_activex.h \
- /iid $(OUT_COMP_INC)/so_activex_i.c /proxy $(OUT_COMP_INC)/so_activex_p.c \
- /dlldata $(OUT_COMP_INC)/dlldata.c /Oicf $<
-
-$(OUT_COMP_GEN)/so_activex.res : so_activex.rc $(OUT_COMP_INC)/so_activex.h
- -$(MKDIR) $(subst /,$(PS),$(@D))
- rc $(CC_INCLUDES) /R /FO$@ so_activex.rc
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cpp
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-
-# Note: If you don't use the MS Visual Studio .Net, please comment out the next line.
-CL_NEW_LIB=atls.lib
-
-$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)%.$(SHAREDLIB_EXT) : $(SLOFILES) $(OUT_COMP_GEN)/so_activex.res so_activex.def
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_LIB))
- @echo .
- @echo -----------------------------------------------------------------------------------
- @echo ATTENTION: If you have problems with linking the library and if you do not use the
- @echo MS .Net compiler please check the makefile and comment out the variable CL_NEW_LIB.
- @echo -----------------------------------------------------------------------------------
- @echo .
- $(LINK) $(LIBRARY_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) \
- /DEF:so_activex.def /IMPLIB:$(OUT_LIB)/iso_activex.lib $(SLOFILES) \
- msvcrt.lib kernel32.lib user32.lib uuid.lib advapi32.lib ole32.lib oleaut32.lib gdi32.lib \
- urlmon.lib Shlwapi.lib oldnames.lib $(CL_NEW_LIB) $(OUT_COMP_GEN)/so_activex.res
- $(LINK_MANIFEST)
-
-ifeq "$(OS)" "WIN"
-OleActvieXComponentExample : $(COMPONENT_IMPL)
- @echo --------------------------------------------------------------------------------
- @echo The activex control was created, please load the "$(QM)example.html$(QM)" file
- @echo in your InternetExplorer to use the activex control.
- @echo --------------------------------------------------------------------------------
-else
-OleActvieXComponentExample :
- @echo --------------------------------------------------------------------------------
- @echo This example works only under Windows!
- @echo --------------------------------------------------------------------------------
-endif
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_LIB)/*$(COMPONENT_NAME).*))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(COMPONENT_NAME).*))
diff --git a/odk/examples/OLE/activex/README.txt b/odk/examples/OLE/activex/README.txt
deleted file mode 100644
index b8be6fcb..00000000
--- a/odk/examples/OLE/activex/README.txt
+++ /dev/null
@@ -1,39 +0,0 @@
- Compile.
-Warning: Before the control can be built user has to add path to MS ATL headers
- into Makefile.
-
-If you use the build environment of the SDK you have to check which MS compiler
-do you use. It you use the MS Visual Studio .NET compiler everything should work
-fine with the SDK. If you use an older MS compiler please edit the Makefile and
-uncomment or remove the line 'CL_NEW_LIB=atls.lib'.
-
- Description.
-
-The StarOffice ActiveX control shows an example of access to UNO through COM technology.
-It requires a properly installed StarOffice version 6.0/6.1 or OpenOffice 1.0.
-This is a Lite ActiveX control so it can be used only in containers that
-allows to use such controls. It can be activated with an <OBJECT> tag from
-a html-page to embed a document. Without any parameters a new writer document will be
-opened for editing. Possible parameters are
- src - full URL to the file that should be edited/viewed;
- it can contain "private:factory/..." URLs to open new documents
- for edit, for example "private:factory/swriter"
- readonly - if it is set to "true" the document will be opened readonly,
- otherwise the document will be opened for editing.
-
-The control can be extended easily, for example it can be changed
-to allow scripting to load different documents.
-
-As any ActiveX control this one should be registered.
-To let MSIE register it itself the "CODEBASE" parameter
-for the "OBJECT" tag should be specified
-with an URL to the library "so_activex.dll".
-
-Also it can be done using regsvr32 application.
-To do it please write
-<Path to Windows installation>\System32\regsvr32 so_activex.dll
-
-To unregister the control please use /u option:
-<Path to Windows installation>\system32\regsvr32 so_activex.dll /u
-
-
diff --git a/odk/examples/OLE/activex/SOActiveX.cpp b/odk/examples/OLE/activex/SOActiveX.cpp
deleted file mode 100644
index cfadfca1..00000000
--- a/odk/examples/OLE/activex/SOActiveX.cpp
+++ /dev/null
@@ -1,645 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// SOActiveX.cpp : Implementation of CSOActiveX
-
-#include "stdafx2.h"
-#include "so_activex.h"
-#include "SOActiveX.h"
-#include "SOComWindowPeer.h"
-
-#define STAROFFICE_WINDOWCLASS "SOParentWindow"
-
-#define BARS_NUMBER 3
-#define BARS_TO_SHOW 2
-
-OLECHAR* pSlotUrl[BARS_NUMBER] =
- {L"slot:5910" // SID_TOGGLEFUNCTIONBAR
- ,L"slot:5920" // SID_TOGGLESTATUSBAR
- ,L"slot:6661" // SID_TOGGLE_MENUBAR
- };
-
-OLECHAR* pSlotName[BARS_NUMBER] =
- {L"FunctionBarVisible" // SID_TOGGLEFUNCTIONBAR
- ,L"StatusBarVisible" // SID_TOGGLESTATUSBAR
- ,L"MenuBarVisible" // SID_TOGGLE_MENUBAR
- };
-
-
-
-/////////////////////////////////////////////////////////////////////////////
-
-HRESULT ExecuteFunc( IDispatch* idispUnoObject,
- OLECHAR* sFuncName,
- CComVariant* params,
- unsigned int count,
- CComVariant* pResult )
-{
- if( !idispUnoObject )
- return E_FAIL;
-
- DISPID id;
- HRESULT hr = idispUnoObject->GetIDsOfNames( IID_NULL, &sFuncName, 1, LOCALE_USER_DEFAULT, &id);
- if( !SUCCEEDED( hr ) ) return hr;
-
- DISPPARAMS dispparams= { params, 0, count, 0};
-
- // DEBUG
- EXCEPINFO myInfo;
- return idispUnoObject->Invoke( id, IID_NULL,LOCALE_USER_DEFAULT, DISPATCH_METHOD,
- &dispparams, pResult, &myInfo, 0);
-}
-
-HRESULT GetIDispByFunc( IDispatch* idispUnoObject,
- OLECHAR* sFuncName,
- CComVariant* params,
- unsigned int count,
- CComPtr<IDispatch>& pdispResult )
-{
- if( !idispUnoObject )
- return E_FAIL;
-
- CComVariant result;
- HRESULT hr = ExecuteFunc( idispUnoObject, sFuncName, params, count, &result );
- if( !SUCCEEDED( hr ) ) return hr;
-
- if( result.vt != VT_DISPATCH || result.pdispVal == NULL )
- return hr;
-
- pdispResult = CComPtr<IDispatch>( result.pdispVal );
-
- return S_OK;
-}
-
-HRESULT PutPropertiesToIDisp( IDispatch* pdispObject,
- OLECHAR** sMemberNames,
- CComVariant* pVariant,
- unsigned int count )
-{
- for( unsigned int ind = 0; ind < count; ind++ )
- {
- DISPID id;
- HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, &sMemberNames[ind], 1, LOCALE_USER_DEFAULT, &id );
- if( !SUCCEEDED( hr ) ) return hr;
-
- hr = CComDispatchDriver::PutProperty( pdispObject, id, &pVariant[ind] );
- if( !SUCCEEDED( hr ) ) return hr;
- }
-
- return S_OK;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CSOActiveX
-
-CSOActiveX::CSOActiveX()
-: mCookie(0)
-, mCurFileUrl( L"private:factory/swriter" )
-, mbLoad( FALSE )
-, mParentWin( NULL )
-, mOffWin( NULL )
-, mbViewOnly( FALSE )
-{
- CLSID clsFactory = {0x82154420,0x0FBF,0x11d4,{0x83, 0x13,0x00,0x50,0x04,0x52,0x6A,0xB4}};
- HRESULT hr = CoCreateInstance( clsFactory, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&mpDispFactory);
-
- mPWinClass.style = CS_HREDRAW|CS_VREDRAW;
- mPWinClass.lpfnWndProc = ::DefWindowProc;
- mPWinClass.cbClsExtra = 0;
- mPWinClass.cbWndExtra = 0;
- mPWinClass.hInstance = (HINSTANCE) GetModuleHandle(NULL); //myInstance;
- mPWinClass.hIcon = NULL;
- mPWinClass.hCursor = NULL;
- mPWinClass.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
- mPWinClass.lpszMenuName = NULL;
- mPWinClass.lpszClassName = STAROFFICE_WINDOWCLASS;
-
- RegisterClass(&mPWinClass);
-}
-
-CSOActiveX::~CSOActiveX()
-{
- Cleanup();
-
-}
-
-HRESULT CSOActiveX::Cleanup()
-{
- if( mpDispFrame && mbViewOnly )
- {
- ShowSomeBars();
- mbViewOnly = FALSE;
- }
-
- if( mpDispFrame )
- {
- // mpDispFrame->dispose();
- CComVariant dummyResult;
- ExecuteFunc( mpDispFrame, L"dispose", NULL, 0, &dummyResult );
- mpDispFrame = CComPtr< IDispatch >();
- }
-
- if( ::IsWindow( mOffWin ) )
- ::DestroyWindow( mOffWin );
-
- return S_OK;
-}
-
-
-STDMETHODIMP CSOActiveX::InitNew ()
-{
- mbLoad = TRUE;
- return S_OK;
-}
-
-STDMETHODIMP CSOActiveX::Load ( LPSTREAM pStm )
-{
- mbLoad = TRUE;
-
- // may be later?
- // for now just ignore
-
- return S_OK;
-}
-
-STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPERRORLOG pErrorLog )
-{
- IPropertyBag2* pPropBag2;
- HRESULT hr = pPropBag->QueryInterface( IID_IPropertyBag2, (void**)&pPropBag2 );
- ATLASSERT( hr >= 0 );
-
- if( !SUCCEEDED( hr ) )
- return hr;
-
- unsigned long aNum;
- hr = pPropBag2->CountProperties( &aNum );
- ATLASSERT( hr >= 0 );
- if( !SUCCEEDED( hr ) )
- return hr;
-
- PROPBAG2* aPropNames = new PROPBAG2[aNum];
- unsigned long aReaded;
-
- hr = pPropBag2->GetPropertyInfo( 0,
- aNum,
- aPropNames,
- &aReaded );
- ATLASSERT( hr >= 0 );
- if( !SUCCEEDED( hr ) )
- {
- delete[] aPropNames;
- return hr;
- }
-
- CComVariant* aVal = new CComVariant[aNum];
- HRESULT* hvs = new HRESULT[aNum];
- hr = pPropBag2->Read( aNum,
- aPropNames,
- NULL,
- aVal,
- hvs );
- ATLASSERT( hr >= 0 );
- if( !SUCCEEDED( hr ) )
- {
- delete[] hvs;
- delete[] aVal;
- delete[] aPropNames;
- return hr;
- }
-
- USES_CONVERSION;
- for( unsigned long ind = 0; ind < aNum; ind++ )
- {
- // all information from the 'object' tag is in strings
- if( aVal[ind].vt == VT_BSTR && !strcmp( OLE2T( aPropNames[ind].pstrName ), "src" ) )
- {
- mCurFileUrl = wcsdup( aVal[ind].bstrVal );
- }
- else if( aVal[ind].vt == VT_BSTR
- && !strcmp( OLE2T( aPropNames[ind].pstrName ), "readonly" ) )
- {
- if( !strcmp( OLE2T( aVal[ind].bstrVal ), "true" ) )
- {
- mbViewOnly = TRUE;
- }
- else
- {
- // the default value
- mbViewOnly = FALSE;
- }
- }
- }
-
- delete[] hvs;
- delete[] aVal;
- delete[] aPropNames;
-
- if( !mpDispFactory )
- return hr;
-
- mbLoad = TRUE;
-
- Invalidate();
- UpdateWindow();
-
- return hr;
-}
-
-HRESULT CSOActiveX::GetUnoStruct( OLECHAR* sStructName, CComPtr<IDispatch>& pdispResult )
-{
- return GetIDispByFunc( mpDispFactory, L"Bridge_GetStruct", &CComVariant( sStructName ), 1, pdispResult );
-}
-
-HRESULT CSOActiveX::GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl )
-{
- HRESULT hr = GetUnoStruct( L"com.sun.star.util.URL", pdispUrl );
- if( !SUCCEEDED( hr ) ) return hr;
-
- OLECHAR* sURLMemberName = L"Complete";
- DISPID nURLID;
- hr = pdispUrl->GetIDsOfNames( IID_NULL, &sURLMemberName, 1, LOCALE_USER_DEFAULT, &nURLID );
- if( !SUCCEEDED( hr ) ) return hr;
- hr = CComDispatchDriver::PutProperty( pdispUrl, nURLID, &CComVariant( sUrl ) );
- if( !SUCCEEDED( hr ) ) return hr;
-
- CComPtr<IDispatch> pdispTransformer;
- hr = GetIDispByFunc( mpDispFactory,
- L"createInstance",
- &CComVariant( L"com.sun.star.util.URLTransformer" ),
- 1,
- pdispTransformer );
- if( !SUCCEEDED( hr ) ) return hr;
-
- CComVariant dummyResult;
- CComVariant aInOutParam;
- aInOutParam.ppdispVal = &pdispUrl;
- aInOutParam.vt = VT_DISPATCH | VT_BYREF;
- hr = ExecuteFunc( pdispTransformer, L"parseStrict", &aInOutParam, 1, &dummyResult );
- if( !SUCCEEDED( hr ) || dummyResult.vt != VT_BOOL || !dummyResult.boolVal ) return hr;
-
- return S_OK;
-}
-
-
-HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height )
-{
- if( !mpDispFactory )
- return E_FAIL;
-
- // create window handle holder
- CComPtr< CComObject< SOComWindowPeer > > pPeerToSend = new CComObject<SOComWindowPeer>( hwnd );
- pPeerToSend->SetHWNDInternally( hwnd );
- CComQIPtr< IDispatch, &IID_IDispatch > pIDispToSend( pPeerToSend );
-
- // create rectangle structure
- CComPtr<IDispatch> pdispRectangle;
- HRESULT hr = GetUnoStruct( L"com.sun.star.awt.Rectangle", pdispRectangle );
- if( !SUCCEEDED( hr ) ) return hr;
-
- OLECHAR* sRectMemberNames[4] = { L"X",
- L"Y",
- L"Width",
- L"Height" };
- CComVariant pRectVariant[4];
- pRectVariant[0] = pRectVariant[1] = pRectVariant[2] = pRectVariant[3] = CComVariant( 0 );
-
- hr = PutPropertiesToIDisp( pdispRectangle, sRectMemberNames, pRectVariant, 4 );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // create WindowDescriptor structure
- CComPtr<IDispatch> pdispWinDescr;
- hr = GetUnoStruct( L"com.sun.star.awt.WindowDescriptor", pdispWinDescr );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // fill in descriptor with info
- OLECHAR* sDescriptorMemberNames[6] = { L"Type",
- L"WindowServiceName",
- L"ParentIndex",
- L"Parent",
- L"Bounds",
- L"WindowAttributes" };
- CComVariant pDescriptorVar[6];
- pDescriptorVar[0] = CComVariant( 0 );
- pDescriptorVar[1] = CComVariant( L"workwindow" );
- pDescriptorVar[2] = CComVariant( 1 );
- pDescriptorVar[3] = CComVariant( pIDispToSend );
- pDescriptorVar[4] = CComVariant( pdispRectangle );
- pDescriptorVar[5] = CComVariant( 33 );
- hr = PutPropertiesToIDisp( pdispWinDescr, sDescriptorMemberNames, pDescriptorVar, 6 );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // create XToolkit instance
- CComPtr<IDispatch> pdispToolkit;
- hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.awt.Toolkit" ), 1, pdispToolkit );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // create window with toolkit
- hr = GetIDispByFunc( pdispToolkit, L"createWindow", &CComVariant( pdispWinDescr ), 1, mpDispWin );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // create frame
- hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.frame.Task" ), 1, mpDispFrame );
- if( !SUCCEEDED( hr ) || !mpDispFrame )
- {
- // the interface com.sun.star.frame.Task is removed in 6.1
- // but the interface com.sun.star.frame.Frame has some bugs in 6.0
- hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.frame.Frame" ), 1, mpDispFrame );
- if( !SUCCEEDED( hr ) ) return hr;
- }
-
- // initialize frame
- CComVariant dummyResult;
- hr = ExecuteFunc( mpDispFrame, L"initialize", &CComVariant( mpDispWin ), 1, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // create desktop
- CComPtr<IDispatch> pdispDesktop;
- hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.frame.Desktop" ), 1, pdispDesktop );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // create tree of frames
- CComPtr<IDispatch> pdispChildren;
- hr = GetIDispByFunc( pdispDesktop, L"getFrames", NULL, 0, pdispChildren );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // insert new frame into desctop hierarchy
- hr = ExecuteFunc( pdispChildren, L"append", &CComVariant( mpDispFrame ), 1, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
-
- // initialize window
- hr = ExecuteFunc( mpDispWin, L"setBackground", &CComVariant( (long)0xFFFFFFFF ), 1, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
-
- hr = ExecuteFunc( mpDispWin, L"setVisible", &CComVariant( TRUE ), 1, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
-
- CComVariant aPosArgs[5];
- aPosArgs[4] = CComVariant( 0 );
- aPosArgs[3] = CComVariant( 0 );
- aPosArgs[2] = CComVariant( width );
- aPosArgs[1] = CComVariant( height );
- aPosArgs[0] = CComVariant( 12 );
- hr = ExecuteFunc( mpDispWin, L"setPosSize", aPosArgs, 5, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
-
-
- return S_OK;
-}
-
-HRESULT CSOActiveX::CallDispatch1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal )
-{
- CComPtr<IDispatch> pdispURL;
- HRESULT hr = GetUrlStruct( sUrl, pdispURL );
- if( !SUCCEEDED( hr ) ) return hr;
-
- CComPtr<IDispatch> pdispXDispatch;
- CComVariant aArgs[3];
- aArgs[2] = CComVariant( pdispURL );
- aArgs[1] = CComVariant( L"" );
- aArgs[0] = CComVariant( (int)0 );
- hr = GetIDispByFunc( mpDispFrame,
- L"queryDispatch",
- aArgs,
- 3,
- pdispXDispatch );
- if( !SUCCEEDED( hr ) ) return hr;
-
- SAFEARRAY FAR* pPropVals = SafeArrayCreateVector( VT_DISPATCH, 0, 1 );
- long ix = 0;
- CComPtr<IDispatch> pdispPropVal;
- hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal );
- if( !SUCCEEDED( hr ) ) return hr;
-
- OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" };
- CComVariant pPropVar[2];
- pPropVar[0] = CComVariant( sArgName );
- pPropVar[1] = CComVariant(); pPropVar[1].vt = VT_BOOL; pPropVar[1].boolVal = sArgVal ? VARIANT_TRUE : VARIANT_FALSE ;
- hr = PutPropertiesToIDisp( pdispPropVal, sPropMemberNames, pPropVar, 2 );
- if( !SUCCEEDED( hr ) ) return hr;
-
- SafeArrayPutElement( pPropVals, &ix, pdispPropVal );
-
- CComVariant aDispArgs[2];
- aDispArgs[1] = CComVariant( pdispURL );
- // aDispArgs[0] = CComVariant( pPropVals ); such constructor is not defined ??!
- aDispArgs[0] = CComVariant(); aDispArgs[0].vt = VT_ARRAY | VT_DISPATCH; aDispArgs[0].parray = pPropVals;
-
- CComVariant dummyResult;
- hr = ExecuteFunc( pdispXDispatch, L"dispatch", aDispArgs, 2, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
-
- return S_OK;
-}
-
-HRESULT CSOActiveX::ShowSomeBars()
-{
- // show FunctionBar and StatusBar
- for( int ind = 0; ind < BARS_TO_SHOW; ind ++ )
- {
- HRESULT hr = CallDispatch1PBool( pSlotUrl[ind], pSlotName[ind], TRUE );
- if( !SUCCEEDED( hr ) ) return hr;
- }
-
- return S_OK;
-}
-
-HRESULT CSOActiveX::HideAllBars()
-{
- for( int ind = 0; ind < BARS_NUMBER; ind ++ )
- {
- HRESULT hr = CallDispatch1PBool( pSlotUrl[ind], pSlotName[ind], FALSE );
- if( !SUCCEEDED( hr ) ) return hr;
- }
-
- return S_OK;
-}
-
-HRESULT CSOActiveX::LoadURLToFrame( )
-{
- HRESULT hr = CallDispatch1PBool( mCurFileUrl, L"ReadOnly", mbViewOnly );
- if( !SUCCEEDED( hr ) ) return hr;
-
- if( mbViewOnly )
- HideAllBars();
-
- return S_OK;
-}
-
-HRESULT CSOActiveX::OnDrawAdvanced( ATL_DRAWINFO& di )
-{
- if( m_spInPlaceSite && mCurFileUrl )
- {
- HWND hwnd;
- HRESULT hr = m_spInPlaceSite->GetWindow( &hwnd );
- if( !SUCCEEDED( hr ) ) return hr;
-
- if( mParentWin != hwnd || !mOffWin )
- {
- if( mpDispFrame )
- {
- CComVariant dummyResult;
- ExecuteFunc( mpDispFrame, L"dispose", NULL, 0, &dummyResult );
- mpDispFrame = CComPtr<IDispatch>();
- }
-
- mParentWin = hwnd;
- mOffWin = CreateWindow(
- STAROFFICE_WINDOWCLASS,
- "OfficeContainer",
- WS_CHILD | WS_CLIPCHILDREN | WS_BORDER,
- di.prcBounds->left,
- di.prcBounds->top,
- di.prcBounds->right - di.prcBounds->left,
- di.prcBounds->bottom - di.prcBounds->top,
- mParentWin,
- NULL,
- NULL,
- NULL );
-
- ::ShowWindow( mOffWin, SW_SHOW );
- }
- else
- {
- RECT aRect;
- ::GetWindowRect( mOffWin, &aRect );
-
- if( aRect.left != di.prcBounds->left || aRect.top != di.prcBounds->top
- || aRect.right != di.prcBounds->right || aRect.bottom != di.prcBounds->bottom )
- {
- // on this state the office window should exist already
- ::SetWindowPos( mOffWin,
- HWND_TOP,
- di.prcBounds->left,
- di.prcBounds->top,
- di.prcBounds->right - di.prcBounds->left,
- di.prcBounds->bottom - di.prcBounds->top,
- SWP_NOZORDER );
-
- CComVariant aPosArgs[5];
- aPosArgs[4] = CComVariant( 0 );
- aPosArgs[3] = CComVariant( 0 );
- aPosArgs[2] = CComVariant( int(di.prcBounds->right - di.prcBounds->left) );
- aPosArgs[1] = CComVariant( int(di.prcBounds->bottom - di.prcBounds->top) );
- aPosArgs[0] = CComVariant( 12 );
- CComVariant dummyResult;
- hr = ExecuteFunc( mpDispWin, L"setPosSize", aPosArgs, 5, &dummyResult );
- if( !SUCCEEDED( hr ) ) return hr;
- }
- }
-
- if( ! mpDispFrame )
- {
- hr = CreateFrameOldWay( mOffWin,
- di.prcBounds->right - di.prcBounds->left,
- di.prcBounds->bottom - di.prcBounds->top );
- if( !SUCCEEDED( hr ) ) return hr;
- }
-
- if( mbLoad )
- {
- hr = LoadURLToFrame();
- if( !SUCCEEDED( hr ) ) return hr;
- mbLoad = FALSE;
- }
- }
-
- return S_OK;
-}
-
-
-STDMETHODIMP CSOActiveX::SetClientSite( IOleClientSite* aClientSite )
-{
- HRESULT hr = IOleObjectImpl<CSOActiveX>::SetClientSite( aClientSite );
-
- if( !aClientSite )
- {
- ATLASSERT( mWebBrowser2 );
- if( mWebBrowser2 )
- AtlUnadvise( mWebBrowser2, DIID_DWebBrowserEvents2, mCookie );
- return hr;
- }
-
- CComPtr<IOleContainer> aContainer;
- m_spClientSite->GetContainer( &aContainer );
- ATLASSERT( aContainer );
-
- if( SUCCEEDED( hr ) && aContainer )
- {
- CComQIPtr<IServiceProvider, &IID_IServiceProvider> aServiceProvider( aContainer );
- ATLASSERT( aServiceProvider );
-
- if( aServiceProvider )
- {
- aServiceProvider->QueryService( SID_SInternetExplorer,
- IID_IWebBrowser,
- (void**)&mWebBrowser2 );
- ATLASSERT( mWebBrowser2 );
- if( mWebBrowser2 )
- AtlAdvise( mWebBrowser2, GetUnknown(), DIID_DWebBrowserEvents2, &mCookie );
- }
- }
-
- return hr;
-}
-
-STDMETHODIMP CSOActiveX::Invoke(DISPID dispidMember,
- REFIID riid,
- LCID lcid,
- WORD wFlags,
- DISPPARAMS* pDispParams,
- VARIANT* pvarResult,
- EXCEPINFO* pExcepInfo,
- UINT* puArgErr)
-{
- if (riid != IID_NULL)
- return DISP_E_UNKNOWNINTERFACE;
-
- if (!pDispParams)
- return DISP_E_PARAMNOTOPTIONAL;
-
- if ( dispidMember == DISPID_ONQUIT )
- Cleanup();
-
- IDispatchImpl<ISOActiveX, &IID_ISOActiveX,
- &LIBID_SO_ACTIVEXLib>::Invoke(
- dispidMember, riid, lcid, wFlags, pDispParams,
- pvarResult, pExcepInfo, puArgErr);
-
- return S_OK;
-}
-
-// ---------------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/SOActiveX.h b/odk/examples/OLE/activex/SOActiveX.h
deleted file mode 100644
index f115d49e..00000000
--- a/odk/examples/OLE/activex/SOActiveX.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// SOActiveX.h : Declaration of the CSOActiveX
-
-#ifndef __SOACTIVEX_H_
-#define __SOACTIVEX_H_
-
-#include "resource.h" // main symbols
-#include <ExDispID.h>
-#include <ExDisp.h>
-#include <shlguid.h>
-#include <atlctl.h>
-
-#include "so_activex.h"
-
-/////////////////////////////////////////////////////////////////////////////
-// CSOActiveX
-class ATL_NO_VTABLE CSOActiveX :
- public CComObjectRootEx<CComSingleThreadModel>,
- public IDispatchImpl<ISOActiveX, &IID_ISOActiveX, &LIBID_SO_ACTIVEXLib>,
- public CComControl<CSOActiveX>,
- public IPersistStreamInitImpl<CSOActiveX>,
- public IOleControlImpl<CSOActiveX>,
- public IOleObjectImpl<CSOActiveX>,
- public IOleInPlaceActiveObjectImpl<CSOActiveX>,
- public IViewObjectExImpl<CSOActiveX>,
- public IOleInPlaceObjectWindowlessImpl<CSOActiveX>,
-// public IConnectionPointContainerImpl<CSOActiveX>,
- public CComCoClass<CSOActiveX, &CLSID_SOActiveX>,
-// public CProxy_ItryPluginEvents< CSOActiveX >,
- public IPersistPropertyBagImpl< CSOActiveX >,
- public IProvideClassInfo2Impl< &CLSID_SOActiveX,
- &DIID__ISOActiveXEvents,
- &LIBID_SO_ACTIVEXLib >,
- public IObjectSafetyImpl< CSOActiveX,
- INTERFACESAFE_FOR_UNTRUSTED_DATA >
-{
-protected:
- CComPtr<IWebBrowser2> mWebBrowser2;
- DWORD mCookie;
-
- CComPtr<IDispatch> mpDispFactory;
- CComPtr<IDispatch> mpDispFrame;
- CComPtr<IDispatch> mpDispWin;
- OLECHAR* mCurFileUrl;
- BOOL mbLoad;
- BOOL mbViewOnly;
- WNDCLASS mPWinClass;
- HWND mParentWin;
- HWND mOffWin;
-public:
- CSOActiveX();
- ~CSOActiveX();
-
-DECLARE_REGISTRY_RESOURCEID(IDR_SOACTIVEX)
-
-DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-BEGIN_COM_MAP(CSOActiveX)
- COM_INTERFACE_ENTRY(ISOActiveX)
- COM_INTERFACE_ENTRY(IDispatch)
- COM_INTERFACE_ENTRY(IViewObjectEx)
- COM_INTERFACE_ENTRY(IViewObject2)
- COM_INTERFACE_ENTRY(IViewObject)
- COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
- COM_INTERFACE_ENTRY(IOleInPlaceObject)
- COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
- COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
- COM_INTERFACE_ENTRY(IOleControl)
- COM_INTERFACE_ENTRY(IOleObject)
- COM_INTERFACE_ENTRY(IPersistStreamInit)
- COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
-// COM_INTERFACE_ENTRY(IConnectionPointContainer)
- COM_INTERFACE_ENTRY(IProvideClassInfo)
- COM_INTERFACE_ENTRY(IProvideClassInfo2)
- COM_INTERFACE_ENTRY(IPersistPropertyBag)
- COM_INTERFACE_ENTRY(IObjectSafety)
-END_COM_MAP()
-
-BEGIN_PROP_MAP(CSOActiveX)
- PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
- PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
- // Example entries
- // PROP_ENTRY("Property Description", dispid, clsid)
- // PROP_PAGE(CLSID_StockColorPage)
-END_PROP_MAP()
-
-BEGIN_CONNECTION_POINT_MAP(CSOActiveX)
-END_CONNECTION_POINT_MAP()
-
-BEGIN_MSG_MAP(CSOActiveX)
- CHAIN_MSG_MAP(CComControl<CSOActiveX>)
- DEFAULT_REFLECTION_HANDLER()
-END_MSG_MAP()
-// Handler prototypes:
-// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
-// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
-
-
-
-// IViewObjectEx
- DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE)
-
-// ISOActiveX
-public:
-
- STDMETHOD(SetClientSite)( IOleClientSite* aClientSite );
- STDMETHOD(Invoke)( DISPID dispidMember,
- REFIID riid,
- LCID lcid,
- WORD wFlags,
- DISPPARAMS* pDispParams,
- VARIANT* pvarResult,
- EXCEPINFO* pExcepInfo,
- UINT* puArgErr);
- STDMETHOD(Load) ( LPPROPERTYBAG pPropBag, LPERRORLOG pErrorLog );
- STDMETHOD(Load) ( LPSTREAM pStm );
- STDMETHOD(InitNew) ();
- HRESULT OnDrawAdvanced(ATL_DRAWINFO& di);
- HRESULT OnDraw(ATL_DRAWINFO& di) { return S_OK; }
-
- HRESULT CreateFrameOldWay( HWND hwnd, int width, int height );
- HRESULT GetUnoStruct( OLECHAR* sStructName, CComPtr<IDispatch>& pdispResult );
- HRESULT LoadURLToFrame();
- HRESULT ShowSomeBars();
- HRESULT HideAllBars();
- HRESULT CallDispatch1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal );
- HRESULT GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl );
- HRESULT Cleanup();
-};
-
-#endif //__SOACTIVEX_H_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/SOActiveX.rgs b/odk/examples/OLE/activex/SOActiveX.rgs
deleted file mode 100644
index d3814df3..00000000
--- a/odk/examples/OLE/activex/SOActiveX.rgs
+++ /dev/null
@@ -1,33 +0,0 @@
-HKCR
-{
- so_activex.SOActiveX.1 = s 'SOActiveX Class'
- {
- CLSID = s '{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}'
- }
- so_activex.SOActiveX = s 'SOActiveX Class'
- {
- CLSID = s '{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}'
- CurVer = s 'so_activex.SOActiveX.1'
- }
- NoRemove CLSID
- {
- ForceRemove {67F2A879-82D5-4A6D-8CC5-FFB3C114B69D} = s 'SOActiveX Class'
- {
- ProgID = s 'so_activex.SOActiveX.1'
- VersionIndependentProgID = s 'so_activex.SOActiveX'
- ForceRemove 'Programmable'
- InprocServer32 = s '%MODULE%'
- {
- val ThreadingModel = s 'Apartment'
- }
- ForceRemove 'Control'
- ForceRemove 'ToolboxBitmap32' = s '%MODULE%, 101'
- 'MiscStatus' = s '0'
- {
- '1' = s '131473'
- }
- 'TypeLib' = s '{61FA3F13-8061-4796-B055-3697ED28CB38}'
- 'Version' = s '1.0'
- }
- }
-}
diff --git a/odk/examples/OLE/activex/SOComWindowPeer.cpp b/odk/examples/OLE/activex/SOComWindowPeer.cpp
deleted file mode 100644
index 1065a1be..00000000
--- a/odk/examples/OLE/activex/SOComWindowPeer.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// SOComWindowPeer.cpp : Implementation of CHelpApp and DLL registration.
-
-#include "stdafx2.h"
-#include "so_activex.h"
-#include "SOComWindowPeer.h"
-#include <sal/macros.h>
-
-/////////////////////////////////////////////////////////////////////////////
-//
-
-STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid)
-{
- static const IID* arr[] =
- {
- &IID_ISOComWindowPeer,
- };
-
- for (int i=0;i<SAL_N_ELEMENTS(arr);i++)
- {
- if (InlineIsEqualGUID(*arr[i],riid))
- return S_OK;
- }
- return S_FALSE;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/SOComWindowPeer.h b/odk/examples/OLE/activex/SOComWindowPeer.h
deleted file mode 100644
index e843aa70..00000000
--- a/odk/examples/OLE/activex/SOComWindowPeer.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// SOComWindowPeer.h: Definition of the SOComWindowPeer class
-//
-//////////////////////////////////////////////////////////////////////
-
-#if !defined __SOCOMWINDOWPEER_H_
-#define __SOCOMWINDOWPEER_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "resource.h" // main symbols
-#include <ExDispID.h>
-#include <ExDisp.h>
-#include <shlguid.h>
-#include <atlctl.h>
-
-#include "so_activex.h"
-
-/////////////////////////////////////////////////////////////////////////////
-// SOComWindowPeer
-
-class SOComWindowPeer :
- public IDispatchImpl<ISOComWindowPeer, &IID_ISOComWindowPeer, &LIBID_SO_ACTIVEXLib>,
- public ISupportErrorInfo,
- public CComObjectRoot,
- public CComCoClass<SOComWindowPeer,&CLSID_SOComWindowPeer>
-{
- HWND m_hwnd;
-public:
- SOComWindowPeer() : m_hwnd( NULL ) {}
-
-BEGIN_COM_MAP(SOComWindowPeer)
- COM_INTERFACE_ENTRY(IDispatch)
- COM_INTERFACE_ENTRY(ISOComWindowPeer)
- COM_INTERFACE_ENTRY(ISupportErrorInfo)
-END_COM_MAP()
-DECLARE_NOT_AGGREGATABLE(SOComWindowPeer)
-// Remove the comment from the line above if you don't want your object to
-// support aggregation.
-
-DECLARE_REGISTRY_RESOURCEID(IDR_SOCOMWINDOWPEER)
-
-// ISupportsErrorInfo
- STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
-
-// ISOComWindowPeer
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE getWindowHandle(
- /* [in] */ SAFEARRAY __RPC_FAR * procId,
- /* [in] */ short s,
- /* [retval][out] */ long __RPC_FAR *ret)
- {
- *ret = (long) m_hwnd;
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE getToolkit(
- /* [retval][out] */ IDispatch __RPC_FAR *__RPC_FAR *retVal)
- {
- *retVal = NULL;
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE setPointer(
- /* [in] */ IDispatch __RPC_FAR *xPointer)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE setBackground(
- /* [in] */ int nColor)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE invalidate(
- /* [in] */ short __MIDL_0015)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE invalidateRect(
- /* [in] */ IDispatch __RPC_FAR *aRect,
- /* [in] */ short nFlags)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE dispose( void)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE addEventListener(
- /* [in] */ IDispatch __RPC_FAR *xListener)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE removeEventListener(
- /* [in] */ IDispatch __RPC_FAR *xListener)
- {
- return S_OK;
- }
-
- virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Bridge_implementedInterfaces(
- /* [retval][out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *pVal)
- {
- *pVal = SafeArrayCreateVector( VT_BSTR, 0, 2 );
-
- if( !*pVal )
- return E_FAIL;
-
- long ix = 0;
- CComBSTR aInterface( OLESTR( "com.sun.star.awt.XSystemDependentWindowPeer" ) );
- SafeArrayPutElement( *pVal, &ix, aInterface );
-
- ix = 1;
- aInterface = CComBSTR( OLESTR( "com.sun.star.awt.XWindowPeer" ) );
- SafeArrayPutElement( *pVal, &ix, aInterface );
-
- return S_OK;
- }
-
- void SetHWNDInternally( HWND hwnd ) { m_hwnd = hwnd; }
-};
-
-#endif // __SOCOMWINDOWPEER_H_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/SOComWindowPeer.rgs b/odk/examples/OLE/activex/SOComWindowPeer.rgs
deleted file mode 100644
index 42e985a3..00000000
--- a/odk/examples/OLE/activex/SOComWindowPeer.rgs
+++ /dev/null
@@ -1,23 +0,0 @@
-HKCR
-{
- so_activex.SOComWindowPeer.1 = s 'SOComWindowPeer Class'
- {
- CLSID = s '{EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D}'
- }
- so_activex.SOComWindowPeer = s 'SOComWindowPeer Class'
- {
- CLSID = s '{EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D}'
- }
- NoRemove CLSID
- {
- ForceRemove {EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D} = s 'SOComWindowPeer Class'
- {
- ProgID = s 'so_activex.SOComWindowPeer.1'
- VersionIndependentProgID = s 'so_activex.SOComWindowPeer'
- InprocServer32 = s '%MODULE%'
- {
- val ThreadingModel = s 'both'
- }
- }
- }
-}
diff --git a/odk/examples/OLE/activex/StdAfx2.cpp b/odk/examples/OLE/activex/StdAfx2.cpp
deleted file mode 100644
index 12ffbc18..00000000
--- a/odk/examples/OLE/activex/StdAfx2.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// stdafx1.cpp : source file that includes just the standard includes
-// stdafx1.pch will be the pre-compiled header
-// stdafx1.obj will contain the pre-compiled type information
-
-#include "stdafx2.h"
-
-#ifdef _ATL_STATIC_REGISTRY
-#include <statreg.h>
-#include <statreg.cpp>
-#endif
-
-#include <atlimpl.cpp>
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/StdAfx2.h b/odk/examples/OLE/activex/StdAfx2.h
deleted file mode 100644
index 548e334f..00000000
--- a/odk/examples/OLE/activex/StdAfx2.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// stdafx1.h : include file for standard system include files,
-// or project specific include files that are used frequently,
-// but are changed infrequently
-
-#if !defined(AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED_)
-#define AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#define STRICT
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
-#endif
-#define _ATL_APARTMENT_THREADED
-#define _ATL_STATIC_REGISTRY
-
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-
-#include <atlbase.h>
-//You may derive a class from CComModule and use it if you want to override
-//something, but do not change the name of _Module
-extern CComModule _Module;
-#include <atlcom.h>
-#include <atlctl.h>
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/example.html b/odk/examples/OLE/activex/example.html
deleted file mode 100644
index fd5876a6..00000000
--- a/odk/examples/OLE/activex/example.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Document Title</TITLE>
-</HEAD>
-<BODY>
-
-<center>
-First you should edit the example.html file!!!
-</center>
-<center>
-<!-- Please edit CODEBASE parameter -->
-<!-- In case ActiveX control is already registered the parameter can be removed -->
-<OBJECT CLASSID="clsid:67F2A879-82D5-4A6D-8CC5-FFB3C114B69D" width="500" height="500"
- CODEBASE="<path_to_the_sdk_sample_output_dir>\bin\so_activex.dll">
-<!-- Full URL to a document
- <PARAM NAME="src" VALUE="file:///d:/tmp/test.odt">
--->
-<!-- Just view the document, do not edit
- <PARAM NAME="readonly" VALUE="true">
--->
-</OBJECT>
-
-</center>
-
-</BODY>
-</HTML>
diff --git a/odk/examples/OLE/activex/resource.h b/odk/examples/OLE/activex/resource.h
deleted file mode 100644
index 7587e0c1..00000000
--- a/odk/examples/OLE/activex/resource.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by so_activex.rc
-//
-#define IDS_PROJNAME 100
-#define IDB_SOACTIVEX 101
-#define IDR_SOACTIVEX 102
-#define IDB_SOCOMWINDOWPEER 103
-#define IDR_SOCOMWINDOWPEER 104
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 201
-#define _APS_NEXT_COMMAND_VALUE 32768
-#define _APS_NEXT_CONTROL_VALUE 201
-#define _APS_NEXT_SYMED_VALUE 105
-#endif
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/so_activex.cpp b/odk/examples/OLE/activex/so_activex.cpp
deleted file mode 100644
index 9581c214..00000000
--- a/odk/examples/OLE/activex/so_activex.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// so_activex.cpp : Implementation of DLL Exports.
-
-
-// Note: Proxy/Stub Information
-// To build a separate proxy/stub DLL,
-// run nmake -f so_activexps.mk in the project directory.
-
-#include "stdafx2.h"
-#include "resource.h"
-#include <initguid.h>
-#include "so_activex.h"
-
-#include "so_activex_i.c"
-#include "SOActiveX.h"
-
-
-CComModule _Module;
-
-BEGIN_OBJECT_MAP(ObjectMap)
-OBJECT_ENTRY(CLSID_SOActiveX, CSOActiveX)
-END_OBJECT_MAP()
-
-/////////////////////////////////////////////////////////////////////////////
-// DLL Entry Point
-
-extern "C"
-BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
-{
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- _Module.Init(ObjectMap, hInstance, &LIBID_SO_ACTIVEXLib);
- DisableThreadLibraryCalls(hInstance);
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- _Module.Term();
- return TRUE; // ok
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// Used to determine whether the DLL can be unloaded by OLE
-
-STDAPI DllCanUnloadNow(void)
-{
- return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// Returns a class factory to create an object of the requested type
-
-STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
-{
- return _Module.GetClassObject(rclsid, riid, ppv);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DllRegisterServer - Adds entries to the system registry
-
-STDAPI DllRegisterServer(void)
-{
- HRESULT aResult = _Module.RegisterServer(TRUE);
-
- return aResult;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DllUnregisterServer - Removes entries from the system registry
-
-STDAPI DllUnregisterServer(void)
-{
- HRESULT aResult = _Module.UnregisterServer(TRUE);
-
- return aResult;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/OLE/activex/so_activex.def b/odk/examples/OLE/activex/so_activex.def
deleted file mode 100644
index 68939efa..00000000
--- a/odk/examples/OLE/activex/so_activex.def
+++ /dev/null
@@ -1,5 +0,0 @@
-EXPORTS
- DllCanUnloadNow PRIVATE
- DllGetClassObject PRIVATE
- DllRegisterServer PRIVATE
- DllUnregisterServer PRIVATE
diff --git a/odk/examples/OLE/activex/so_activex.idl b/odk/examples/OLE/activex/so_activex.idl
deleted file mode 100644
index 23a4eb49..00000000
--- a/odk/examples/OLE/activex/so_activex.idl
+++ /dev/null
@@ -1,138 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// so_activex.idl : IDL source for so_activex.dll
-//
-
-// This file will be processed by the MIDL tool to
-// produce the type library (so_activex.tlb) and marshalling code.
-
-import "oaidl.idl";
-import "ocidl.idl";
-#include "olectl.h"
-
-
- [
- object,
- uuid(DACF7E3F-626B-4BF9-964B-F4910C843711),
- dual,
- helpstring("ISOActiveX Interface"),
- pointer_default(unique)
- ]
- interface ISOActiveX : IDispatch
- {
- };
-
-[
- object,
- uuid(BF5D10F3-8A10-4A0B-B150-2B6AA2D7E118),
- dual,
- helpstring("ISOComWindowPeer Interface"),
- pointer_default(unique)
-]
-interface ISOComWindowPeer : IDispatch
-{
- [id(1), helpstring("method getWindowHandle")]
- HRESULT getWindowHandle( [in] SAFEARRAY(VARIANT) procId,
- [in] short s,
- [out,retval] long* ret);
-
- [id(2), helpstring("method getToolkit")]
- HRESULT getToolkit( [out,retval] IDispatch** retVal );
-
- [id(3), helpstring("method setPointer")]
- HRESULT setPointer( [in] IDispatch* xPointer );
-
- [id(4), helpstring("method setBackground")]
- HRESULT setBackground( [in] int nColor );
-
- [id(5), helpstring("method invalidate")]
- HRESULT invalidate( [in] short );
-
- [id(6), helpstring("method invalidateRect")]
- HRESULT invalidateRect( [in] IDispatch* aRect, [in] short nFlags );
-
- [id(7), helpstring("method dispose")]
- HRESULT dispose();
-
- [id(8), helpstring("method addEventListener")]
- HRESULT addEventListener( [in] IDispatch* xListener );
-
- [id(9), helpstring("method removeEventListener")]
- HRESULT removeEventListener( [in] IDispatch* xListener );
-
- [propget, id(10), helpstring("property_implementedInterfaces")]
- HRESULT Bridge_implementedInterfaces([out, retval] SAFEARRAY(BSTR) *pVal);
-};
-
-[
- uuid(61FA3F13-8061-4796-B055-3697ED28CB38),
- version(1.0),
- helpstring("so_activex 1.0 Type Library")
-]
-library SO_ACTIVEXLib
-{
- importlib("stdole32.tlb");
- importlib("stdole2.tlb");
-
- [
- uuid(7F760565-5719-4F04-BA86-112C474B10EA),
- helpstring("_ISOActiveXEvents Interface")
- ]
- dispinterface _ISOActiveXEvents
- {
- properties:
- methods:
- };
-
- [
- uuid(67F2A879-82D5-4A6D-8CC5-FFB3C114B69D),
- helpstring("SOActiveX Class")
- ]
- coclass SOActiveX
- {
- [default] interface ISOActiveX;
- [default, source] dispinterface _ISOActiveXEvents;
- };
-
- [
- uuid(EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D),
- helpstring("SOComWindowPeer Class")
- ]
- coclass SOComWindowPeer
- {
- [default] interface ISOComWindowPeer;
- };
-};
-
diff --git a/odk/examples/OLE/activex/so_activex.rc b/odk/examples/OLE/activex/so_activex.rc
deleted file mode 100644
index 72ca32e1..00000000
--- a/odk/examples/OLE/activex/so_activex.rc
+++ /dev/null
@@ -1,136 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian resources
-
-//#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-//#ifdef _WIN32
-//LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-//#pragma code_page(1251)
-//#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-//IDB_SOACTIVEX BITMAP DISCARDABLE "soacti.bmp"
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// REGISTRY
-//
-
-IDR_SOACTIVEX REGISTRY DISCARDABLE "SOActiveX.rgs"
-IDR_SOCOMWINDOWPEER REGISTRY DISCARDABLE "SOComWindowPeer.rgs"
-//#endif // Russian resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""winres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "1 TYPELIB ""so_activex.tlb""\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_PROJNAME "so_activex"
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-1 TYPELIB .\..\..\..\WINexample.out\misc\so_activex\so_activex.tlb
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/odk/examples/OLE/delphi/InsertTables/Project1.dpr b/odk/examples/OLE/delphi/InsertTables/Project1.dpr
deleted file mode 100644
index 9f2bd2fd..00000000
--- a/odk/examples/OLE/delphi/InsertTables/Project1.dpr
+++ /dev/null
@@ -1,14 +0,0 @@
-program Project1;
-
-uses
- Forms,
- SampleUI in 'SampleUI.pas' {OKBottomDlg},
- SampleCode in 'SampleCode.pas';
-
-{$R *.RES}
-
-begin
- Application.Initialize;
- Application.CreateForm(TOKBottomDlg, OKBottomDlg);
- Application.Run;
-end.
diff --git a/odk/examples/OLE/delphi/InsertTables/Project1.res b/odk/examples/OLE/delphi/InsertTables/Project1.res
deleted file mode 100644
index e69de29b..00000000
--- a/odk/examples/OLE/delphi/InsertTables/Project1.res
+++ /dev/null
diff --git a/odk/examples/OLE/delphi/InsertTables/SampleCode.pas b/odk/examples/OLE/delphi/InsertTables/SampleCode.pas
deleted file mode 100644
index f314f7ea..00000000
--- a/odk/examples/OLE/delphi/InsertTables/SampleCode.pas
+++ /dev/null
@@ -1,393 +0,0 @@
-{***********************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************}
-unit SampleCode;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ComObj, Variants;
-
- type
- TSampleCode = class
-
- function Connect() : boolean;
- procedure Disconnect();
-
- function CreateDocument(bReadOnly : boolean) : boolean;
-
- procedure InsertTable(sTableName : String; dbPointer : String);
-
- procedure InsertDatabaseTable(
- oDoc : Variant;
- sTableName : String;
- oCursor : Variant;
- iRows : Integer;
- iColumns : Integer;
- dbPointer : String );
- function CreateTextTable(
- oDoc : Variant;
- oCursor : Variant;
- sName : String;
- iRow : Integer;
- iColumn : Integer) : Variant;
- function getCellContent(
- sBookmarkName : String ) : Variant;
- function getDatabasePointer(
- sTableName : String;
- sCellname : String ) : String;
- procedure InsertBookmark(
- oDoc : Variant;
- oTextCursor : Variant;
- sBookmarkName : String );
- function CreateBookmarkName(
- sTableName : String;
- sCellName : String;
- sDatabasepointer : String ) : String;
- procedure ChangeCellContent(
- oDoc : Variant;
- sTableName : String;
- sCellName : String;
- dValue : Double );
- function GetBookmarkFromDBPointer(
- oDoc : Variant;
- sBookmarkName : String) : Variant;
- function GetBookmarkFromAdress(
- oDoc : Variant;
- sTableName : String;
- sCellAdress : String) : Variant;
- function JumpToBookmark(
- oBookmark : Variant) : Variant;
- function CreateUniqueTablename(oDoc : Variant) : String;
-
- private
- StarOffice : Variant;
- Document : Variant;
-
- { Private-Deklarationen }
- public
- { Public-Deklarationen }
- end;
-
-implementation
-
-{ Insert a table texttable and insert in each cell a Bookmark with the address
- of the cell and database pointer
-}
-
-function TSampleCode.Connect() : boolean;
-begin
- if VarIsEmpty(StarOffice) then
- StarOffice := CreateOleObject('com.sun.star.ServiceManager');
-
- Connect := not (VarIsEmpty(StarOffice) or VarIsNull(StarOffice));
-end;
-
-procedure TSampleCode.Disconnect();
-begin
- StarOffice := Unassigned;
-end;
-
-function TSampleCode.CreateDocument(bReadOnly : boolean) : boolean;
-var
- StarDesktop : Variant;
- LoadParams : Variant;
- CoreReflection : Variant;
- PropertyValue : Variant;
-begin
- StarDesktop := StarOffice.createInstance('com.sun.star.frame.Desktop');
-
- if (bReadOnly) then begin
- LoadParams := VarArrayCreate([0, 0], varVariant);
- CoreReflection := StarOffice.createInstance('com.sun.star.reflection.CoreReflection');
-
- CoreReflection
- .forName('com.sun.star.beans.PropertyValue')
- .createObject(PropertyValue);
-
- PropertyValue.Name := 'ReadOnly';
- PropertyValue.Value := true;
-
- LoadParams[0] := PropertyValue;
- end
- else
- LoadParams := VarArrayCreate([0, -1], varVariant);
-
- Document := StarDesktop.LoadComponentFromURL( 'private:factory/swriter', '_blank', 0, LoadParams);
-
- CreateDocument := not (VarIsEmpty(Document) or VarIsNull(Document));
-end;
-
-
-function TSampleCode.getCellContent(
- sBookmarkName : String ) : Variant;
-var
- oBookmark : Variant;
- oTextCursor : Variant;
-begin
- oBookmark := GetBookmarkFromDBPointer( Document, sBookmarkName );
- oTextCursor := JumpToBookmark( oBookmark );
-
- getCellContent := oTextCursor.Cell.Value;
-
-end;
-
-
-function TSampleCode.getDatabasePointer(
- sTableName : String;
- sCellname : String ) : String;
-var
- oBookmark : Variant;
- sBookmarkName : String;
- iPos : Integer;
-begin
- oBookmark := GetBookmarkFromAdress( Document, sTableName, sCellName );
-
- sBookmarkName := oBookmark.getName();
-
- iPos := Pos('/%', sBookmarkName);
- while Pos('/%', sBookmarkName) > 0 do
- begin
- iPos := Pos('/%', sBookmarkName);
- sBookmarkName[iPos] := '%';
- end;
-
- Delete( sBookmarkName, 1, iPos+1);
- getDatabasePointer := sBookmarkName;
-end;
-
-
-procedure TSampleCode.InsertTable(sTableName : String; dbPointer : String);
-var
- oCursor : Variant;
-begin
- { create a cursor object on the current position in the document }
- oCursor := Document.Text.CreateTextCursor();
-
- { Create for each table a unique database name }
- if (sTableName = '') then
- sTableName := createUniqueTablename(Document);
-
- InsertDatabaseTable( Document, sTableName, oCursor, 4, 2, dbPointer );
-
- ChangeCellContent( Document, sTableName, 'B2', 1.12 );
-end;
-
-procedure TSampleCode.InsertDatabaseTable(
- oDoc : Variant;
- sTableName : String;
- oCursor : Variant;
- iRows : Integer;
- iColumns : Integer;
- dbPointer : String);
-var
- oTable : Variant;
- sCellnames : Variant;
- iCellcounter : Integer;
- oCellCursor : Variant;
- oTextCursor : Variant;
- sCellName : String;
-begin
- oTable := CreateTextTable( oDoc, oCursor, sTableName, iRows, iColumns );
- sCellnames := oTable.getCellNames();
-
- For iCellcounter := VarArrayLowBound( sCellnames, 1) to VarArrayHighBound(sCellnames, 1) do
- begin
- sCellName := sCellnames[iCellcounter];
-
- oCellCursor := oTable.getCellByName(sCellName);
- oCellCursor.Value := iCellcounter;
- oTextCursor := oCellCursor.getEnd();
- InsertBookmark(
- oDoc,
- oTextCursor,
- createBookmarkName(sTableName, sCellName, dbPointer));
- end;
-end;
-
-{
-
-' Change the content of a cell
-}
-
-procedure TSampleCode.ChangeCellContent(
- oDoc : Variant;
- sTableName : String;
- sCellName : String;
- dValue : Double );
-var
- oBookmark : Variant;
- oTextCursor : Variant;
- sBookmarkName : String;
-begin
- oBookmark := GetBookmarkFromAdress( oDoc, sTableName, sCellName );
- oTextCursor := JumpToBookmark( oBookmark );
- oTextCursor.Cell.Value := dValue;
-
- { create a new bookmark for the new number }
- sBookmarkName := oBookmark.getName();
- oBookmark.dispose();
- InsertBookmark( oDoc, oTextCursor, sBookmarkName );
-end;
-
-
-{ ' Jump to Bookmark and return for this position the cursor }
-
-function TSampleCode.JumpToBookmark(
- oBookmark : Variant) : Variant;
-
-begin
- JumpToBookmark := oBookmark.Anchor.Text.createTextCursorByRange(
- oBookmark.Anchor );
-end;
-
-
-{ ' Create a Texttable on a Textdocument }
-function TSampleCode.CreateTextTable(
- oDoc : Variant;
- oCursor : Variant;
- sName : String;
- iRow : Integer;
- iColumn : Integer) : Variant;
-var
- ret : Variant;
-begin
- ret := oDoc.createInstance( 'com.sun.star.text.TextTable' );
-
- ret.setName( sName );
- ret.initialize( iRow, iColumn );
- oDoc.Text.InsertTextContent( oCursor, ret, False );
-
- CreateTextTable := ret;
-end;
-
-
-{ 'create a unique name for the Texttables }
-function TSampleCode.CreateUniqueTablename(oDoc : Variant) : String;
-var
- iHighestNumber : Integer;
- sTableNames : Variant;
- iTableCounter : Integer;
- sTableName : String;
- iTableNumber : Integer;
- i : Integer;
-begin
- sTableNames := oDoc.getTextTables.getElementNames();
- iHighestNumber := 0;
- For iTableCounter := VarArrayLowBound(sTableNames, 1) to VarArrayHighBound(sTableNames, 1) do
- begin
- sTableName := sTableNames[iTableCounter];
- i := Pos( '$$', sTableName );
- iTableNumber := strtoint( Copy(sTableName, i + 2, Length( sTableName ) - i - 1 ) );
-
- If iTableNumber > iHighestNumber then
- iHighestNumber := iTableNumber;
- end;
- createUniqueTablename := 'DBTable$$' + inttostr(iHighestNumber + 1);
-end;
-
-
-{' Insert a Bookmark on the cursor }
-procedure TSampleCode.InsertBookmark(
- oDoc : Variant;
- oTextCursor : Variant;
- sBookmarkName : String);
-var
- oBookmarkInst : Variant;
-begin
- oBookmarkInst := oDoc.createInstance('com.sun.star.text.Bookmark');
-
- oBookmarkInst.Name := sBookmarkName;
- oTextCursor.gotoStart( true );
- oTextCursor.text.InsertTextContent( oTextCursor, oBookmarkInst, true );
-end;
-
-
-function TSampleCode.CreateBookmarkName(
- sTableName : String;
- sCellName : String;
- sDatabasepointer : String ) : String;
-begin
- createBookmarkName := '//' + sTableName + '/%' + sCellName + '/%' + sDatabasePointer + ':' + sCellName;
-end;
-
-{ ' Returns the Bookmark the Tablename and Cellname }
-function TSampleCode.GetBookmarkFromAdress(
- oDoc : Variant;
- sTableName : String;
- sCellAdress : String) : Variant;
-var
- sTableAddress : String;
- iTableNameLength : Integer;
- sBookNames : Variant;
- iBookCounter : Integer;
-begin
- sTableAddress := '//' + sTableName + '/%' + sCellAdress;
- iTableNameLength := Length( sTableAddress );
-
- sBookNames := oDoc.Bookmarks.getElementNames;
-
- for iBookCounter := VarArrayLowBound(sBookNames, 1) to VarArrayHighBound(sBookNames, 1) do
- begin
- If sTableAddress = Copy( sBookNames[iBookCounter], 1, iTableNameLength) then
- begin
- GetBookmarkFromAdress := oDoc.Bookmarks.getByName(sBookNames[iBookCounter]);
- exit;
- end;
- end;
-end;
-
-{ ' Returns the Bookmark the Tablename and Cellname }
-function TSampleCode.GetBookmarkFromDBPointer(
- oDoc : Variant;
- sBookmarkName : String) : Variant;
-var
- sBookNames : Variant;
- iBookCounter : Integer;
-begin
- sBookNames := oDoc.Bookmarks.getElementNames;
-
- for iBookCounter := VarArrayLowBound(sBookNames, 1) to VarArrayHighBound(sBookNames, 1) do
- begin
- If Pos(sBookmarkName, sBookNames[iBookCounter]) = (1 + Length(sBookNames[iBookCounter]) - Length(sBookmarkName)) then
- begin
- GetBookmarkFromDBPointer := oDoc.Bookmarks.getByName(sBookNames[iBookCounter]);
- exit;
- end;
- end;
-end;
-
-end.
-
-
diff --git a/odk/examples/OLE/delphi/InsertTables/SampleUI.dfm b/odk/examples/OLE/delphi/InsertTables/SampleUI.dfm
deleted file mode 100644
index 082fce7b..00000000
--- a/odk/examples/OLE/delphi/InsertTables/SampleUI.dfm
+++ /dev/null
@@ -1,4 +0,0 @@
-ÿ
-ParentFont OldCreateOrder PositionpoScreenCenter PixelsPerInch`
-TextHeight Table NameTable namedisconnectEnabledTabOrderOnClick OnDisconnectTStatusBar
-StatusBar1LeftSimpleTextReady \ No newline at end of file
diff --git a/odk/examples/OLE/delphi/InsertTables/SampleUI.pas b/odk/examples/OLE/delphi/InsertTables/SampleUI.pas
deleted file mode 100644
index fcd4f430..00000000
--- a/odk/examples/OLE/delphi/InsertTables/SampleUI.pas
+++ /dev/null
@@ -1,168 +0,0 @@
-{***********************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************}
-unit SampleUI;
-
-interface
-
-uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
- Buttons, ExtCtrls, SampleCode, ComCtrls;
-
-type
- TOKBottomDlg = class(TForm)
- Bevel1: TBevel;
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- Button4: TButton;
- Edit1: TEdit;
- Label1: TLabel;
- Edit2: TEdit;
- Label2: TLabel;
- Button5: TButton;
- Button6: TButton;
- Edit3: TEdit;
- Label3: TLabel;
- Label4: TLabel;
- Label6: TLabel;
- Edit6: TEdit;
- Bevel2: TBevel;
- Bevel3: TBevel;
- Bevel4: TBevel;
- StatusBar1: TStatusBar;
- Edit4: TEdit;
- Label7: TLabel;
- procedure OnConnect(Sender: TObject);
- procedure OnDisconnect(Sender: TObject);
- procedure OnCreateDocument(Sender: TObject);
- procedure OnInsertTable(Sender: TObject);
- procedure OnGetDatabasePointer(Sender: TObject);
- procedure OnGetCellContent(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- OKBottomDlg: TOKBottomDlg;
- Sample : TSampleCode;
-implementation
-
-{$R *.DFM}
-
-procedure TOKBottomDlg.OnConnect(Sender: TObject);
-begin
- StatusBar1.SimpleText := 'Connection to StarOffice ...';
- Sample := TSampleCode.Create();
- if Sample.Connect() then
- begin
- Button1.Enabled := false;
- Button2.Enabled := true;
- Button3.Enabled := true;
- Button4.Enabled := false;
- Button5.Enabled := false;
- Button6.Enabled := false;
- end;
- StatusBar1.SimpleText := 'Ready';
-end;
-
-procedure TOKBottomDlg.OnDisconnect(Sender: TObject);
-begin
- StatusBar1.SimpleText := 'Disconnection from StarOffice ...';
- Sample.Disconnect();
- Button1.Enabled := true;
- Button2.Enabled := false;
- Button3.Enabled := false;
- Button4.Enabled := false;
- Button5.Enabled := false;
- Button6.Enabled := false;
- StatusBar1.SimpleText := 'Ready';
-end;
-
-procedure TOKBottomDlg.OnCreateDocument(Sender: TObject);
-begin
- StatusBar1.SimpleText := 'Creating new text document ...';
- try
- if Sample.CreateDocument(false) then
- begin
- Button4.Enabled := true;
- Button5.Enabled := true;
- Button6.Enabled := true;
- end;
- StatusBar1.SimpleText := 'Ready';
- except
- StatusBar1.SimpleText := 'Error';
- end;
-end;
-
-procedure TOKBottomDlg.OnInsertTable(Sender: TObject);
-begin
- try
- StatusBar1.SimpleText := 'Inserting Table ...';
- Sample.InsertTable(Edit2.Text, Edit1.Text);
- StatusBar1.SimpleText := 'Ready';
- except
- StatusBar1.SimpleText := 'Error';
- end;
-end;
-
-procedure TOKBottomDlg.OnGetDatabasePointer(Sender: TObject);
-var
- res : String;
-begin
- try
- StatusBar1.SimpleText := 'Getting database pointer ...';
- res := Sample.getDatabasePointer(Edit4.Text, Edit3.Text);
- Application.MessageBox(PChar('the pointer: ' + res), PChar('Result'), ID_OK);
- StatusBar1.SimpleText := 'Ready';
- except
- StatusBar1.SimpleText := 'Error';
- end;
-end;
-
-procedure TOKBottomDlg.OnGetCellContent(Sender: TObject);
-var
- res : String;
-begin
- try
- StatusBar1.SimpleText := 'Getting cell content ...';
- res := Sample.getCellContent(Edit6.Text);
- Application.MessageBox(PChar('the content: ' + res), PChar('Result'), ID_OK);
- StatusBar1.SimpleText := 'Ready';
- except
- StatusBar1.SimpleText := 'Error';
- end;
-end;
-
-end.
diff --git a/odk/examples/OLE/delphi/StarOffice_Delphi.sxw b/odk/examples/OLE/delphi/StarOffice_Delphi.sxw
deleted file mode 100644
index 77ccc4b7..00000000
--- a/odk/examples/OLE/delphi/StarOffice_Delphi.sxw
+++ /dev/null
Binary files differ
diff --git a/odk/examples/OLE/delphi/StarOffice_and_Delphi.pdf b/odk/examples/OLE/delphi/StarOffice_and_Delphi.pdf
deleted file mode 100644
index 92eee437..00000000
--- a/odk/examples/OLE/delphi/StarOffice_and_Delphi.pdf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/OLE/makefile.mk b/odk/examples/OLE/makefile.mk
deleted file mode 100644
index 49c7a822..00000000
--- a/odk/examples/OLE/makefile.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-ACTIVEX_FILES=\
- $(DESTDIROLEEXAMPLES)$/activex$/example.html \
- $(DESTDIROLEEXAMPLES)$/activex$/Makefile \
- $(DESTDIROLEEXAMPLES)$/activex$/README.txt \
- $(DESTDIROLEEXAMPLES)$/activex$/resource.h \
- $(DESTDIROLEEXAMPLES)$/activex$/SOActiveX.cpp \
- $(DESTDIROLEEXAMPLES)$/activex$/SOActiveX.h \
- $(DESTDIROLEEXAMPLES)$/activex$/SOActiveX.rgs \
- $(DESTDIROLEEXAMPLES)$/activex$/SOComWindowPeer.cpp \
- $(DESTDIROLEEXAMPLES)$/activex$/SOComWindowPeer.h \
- $(DESTDIROLEEXAMPLES)$/activex$/SOComWindowPeer.rgs \
- $(DESTDIROLEEXAMPLES)$/activex$/so_activex.cpp \
- $(DESTDIROLEEXAMPLES)$/activex$/so_activex.def \
- $(DESTDIROLEEXAMPLES)$/activex$/so_activex.idl \
- $(DESTDIROLEEXAMPLES)$/activex$/so_activex.rc \
- $(DESTDIROLEEXAMPLES)$/activex$/StdAfx2.cpp \
- $(DESTDIROLEEXAMPLES)$/activex$/StdAfx2.h
-
-DELPHI_FILES=\
- $(DESTDIROLEEXAMPLES)$/delphi$/InsertTables$/Project1.dpr \
- $(DESTDIROLEEXAMPLES)$/delphi$/InsertTables$/Project1.res \
- $(DESTDIROLEEXAMPLES)$/delphi$/InsertTables$/SampleCode.pas \
- $(DESTDIROLEEXAMPLES)$/delphi$/InsertTables$/SampleUI.dfm \
- $(DESTDIROLEEXAMPLES)$/delphi$/InsertTables$/SampleUI.pas \
- $(DESTDIROLEEXAMPLES)$/delphi$/StarOffice_and_Delphi.pdf \
- $(DESTDIROLEEXAMPLES)$/delphi$/StarOffice_Delphi.sxw
-
-VBSCRIPT_FILES=\
- $(DESTDIROLEEXAMPLES)$/vbscript$/readme.txt \
- $(DESTDIROLEEXAMPLES)$/vbscript$/WriterDemo.vbs
-
-DIR_FILE_LIST= \
- $(ACTIVEX_FILES) \
- $(DELPHI_FILES) \
- $(VBSCRIPT_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/ex_ole_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/ex_ole_files.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
diff --git a/odk/examples/OLE/vbscript/WriterDemo.vbs b/odk/examples/OLE/vbscript/WriterDemo.vbs
deleted file mode 100644
index 71d011e4..00000000
--- a/odk/examples/OLE/vbscript/WriterDemo.vbs
+++ /dev/null
@@ -1,172 +0,0 @@
-'***********************************************************************
-'*
-'* The Contents of this file are made available subject to the terms of
-'* the BSD license.
-'*
-'* Copyright 2000, 2010 Oracle and/or its affiliates.
-'* All rights reserved.
-'*
-'* Redistribution and use in source and binary forms, with or without
-'* modification, are permitted provided that the following conditions
-'* are met:
-'* 1. Redistributions of source code must retain the above copyright
-'* notice, this list of conditions and the following disclaimer.
-'* 2. Redistributions in binary form must reproduce the above copyright
-'* notice, this list of conditions and the following disclaimer in the
-'* documentation and/or other materials provided with the distribution.
-'* 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-'* contributors may be used to endorse or promote products derived
-'* from this software without specific prior written permission.
-'*
-'* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-'* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-'* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-'* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-'* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-'* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-'* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-'* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-'* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-'* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-'* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-'*
-'*************************************************************************
-
-'The service manager is always the starting point
-'If there is no office running then an office is started up
-Set objServiceManager= WScript.CreateObject("com.sun.star.ServiceManager")
-
-'Create the CoreReflection service that is later used to create structs
-Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
-
-'Create the Desktop
-Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")
-
-'Open a new empty writer document
-Dim args()
-Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
-
-'Create a text object
-Set objText= objDocument.getText
-
-'Create a cursor object
-Set objCursor= objText.createTextCursor
-
-'Inserting some Text
-objText.insertString objCursor, "The first line in the newly created text document." & vbLf, false
-
-'Inserting a second line
-objText.insertString objCursor, "Now we're in the second line", false
-
-'Create instance of a text table with 4 columns and 4 rows
-Set objTable= objDocument.createInstance( "com.sun.star.text.TextTable")
-objTable.initialize 4, 4
-
-'Insert the table
-objText.insertTextContent objCursor, objTable, false
-
-'Get first row
-Set objRows= objTable.getRows
-Set objRow= objRows.getByIndex( 0)
-
-'Set the table background color
-objTable.setPropertyValue "BackTransparent", false
-objTable.setPropertyValue "BackColor", 13421823
-
-'Set a different background color for the first row
-objRow.setPropertyValue "BackTransparent", false
-objRow.setPropertyValue "BackColor", 6710932
-
-'Fill the first table row
-insertIntoCell "A1","FirstColumn", objTable
-insertIntoCell "B1","SecondColumn", objTable
-insertIntoCell "C1","ThirdColumn", objTable
-insertIntoCell "D1","SUM", objTable
-
-objTable.getCellByName("A2").setValue 22.5
-objTable.getCellByName("B2").setValue 5615.3
-objTable.getCellByName("C2").setValue -2315.7
-objTable.getCellByName("D2").setFormula"sum <A2:C2>"
-
-objTable.getCellByName("A3").setValue 21.5
-objTable.getCellByName("B3").setValue 615.3
-objTable.getCellByName("C3").setValue -315.7
-objTable.getCellByName("D3").setFormula "sum <A3:C3>"
-
-objTable.getCellByName("A4").setValue 121.5
-objTable.getCellByName("B4").setValue -615.3
-objTable.getCellByName("C4").setValue 415.7
-objTable.getCellByName("D4").setFormula "sum <A4:C4>"
-
-'Change the CharColor and add a Shadow
-objCursor.setPropertyValue "CharColor", 255
-objCursor.setPropertyValue "CharShadowed", true
-
-'Create a paragraph break
-'The second argument is a com::sun::star::text::ControlCharacter::PARAGRAPH_BREAK constant
-objText.insertControlCharacter objCursor, 0 , false
-
-'Inserting colored Text.
-objText.insertString objCursor, " This is a colored Text - blue with shadow" & vbLf, false
-
-'Create a paragraph break ( ControlCharacter::PARAGRAPH_BREAK).
-objText.insertControlCharacter objCursor, 0, false
-
-'Create a TextFrame.
-Set objTextFrame= objDocument.createInstance("com.sun.star.text.TextFrame")
-
-'Create a Size struct.
-Set objSize= createStruct("com.sun.star.awt.Size")
-objSize.Width= 15000
-objSize.Height= 400
-objTextFrame.setSize( objSize)
-
-' TextContentAnchorType.AS_CHARACTER = 1
-objTextFrame.setPropertyValue "AnchorType", 1
-
-'insert the frame
-objText.insertTextContent objCursor, objTextFrame, false
-
-'Get the text object of the frame
-Set objFrameText= objTextFrame.getText
-
-
-'Create a cursor object
-Set objFrameTextCursor= objFrameText.createTextCursor
-
-'Inserting some Text
-objFrameText.insertString objFrameTextCursor, "The first line in the newly created text frame.", _
- false
-objFrameText.insertString objFrameTextCursor, _
- vbLf & "With this second line the height of the frame raises.", false
-
-'Create a paragraph break
-'The second argument is a com::sun::star::text::ControlCharacter::PARAGRAPH_BREAK constant
-objFrameText.insertControlCharacter objCursor, 0 , false
-
-'Change the CharColor and add a Shadow
-objCursor.setPropertyValue "CharColor", 65536
-objCursor.setPropertyValue "CharShadowed", false
-
-'Insert another string
-objText.insertString objCursor, " That's all for now !!", false
-
-On Error Resume Next
-If Err Then
- MsgBox "An error occurred"
-End If
-
-
-Sub insertIntoCell( strCellName, strText, objTable)
- Set objCellText= objTable.getCellByName( strCellName)
- Set objCellCursor= objCellText.createTextCursor
- objCellCursor.setPropertyValue "CharColor",16777215
- objCellText.insertString objCellCursor, strText, false
-End Sub
-
-Function createStruct( strTypeName)
- Set classSize= objCoreReflection.forName( strTypeName)
- Dim aStruct
- classSize.createObject aStruct
- Set createStruct= aStruct
-End Function
diff --git a/odk/examples/OLE/vbscript/readme.txt b/odk/examples/OLE/vbscript/readme.txt
deleted file mode 100644
index 082a4dff..00000000
--- a/odk/examples/OLE/vbscript/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Run the script in WriterDemo.vbs with Windows Script Host.
-Commmand line:
-
-cscript WriterDemo.vbs
diff --git a/odk/examples/basic/drawing/dirtree.txt b/odk/examples/basic/drawing/dirtree.txt
deleted file mode 100644
index 9cb9afe6..00000000
--- a/odk/examples/basic/drawing/dirtree.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Explorer
- Workspace
- Bookmarks
- Database
- Macros
- StarOffice Math
- StarOffice API
- ToDo
- Translations
- Chinese
- German
- English
- French
- Italian
- Dutch
- Portuguese
- Swedish
- Spanish
- Examples
- Databases \ No newline at end of file
diff --git a/odk/examples/basic/drawing/importexportofasciifiles.odg b/odk/examples/basic/drawing/importexportofasciifiles.odg
deleted file mode 100644
index 721f9e7b..00000000
--- a/odk/examples/basic/drawing/importexportofasciifiles.odg
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/forms_and_controls/beef.wmf b/odk/examples/basic/forms_and_controls/beef.wmf
deleted file mode 100644
index 0947521c..00000000
--- a/odk/examples/basic/forms_and_controls/beef.wmf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/forms_and_controls/burger.wmf b/odk/examples/basic/forms_and_controls/burger.wmf
deleted file mode 100644
index 35b30c39..00000000
--- a/odk/examples/basic/forms_and_controls/burger.wmf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/forms_and_controls/burger_factory.odt b/odk/examples/basic/forms_and_controls/burger_factory.odt
deleted file mode 100644
index 8203ea0f..00000000
--- a/odk/examples/basic/forms_and_controls/burger_factory.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/forms_and_controls/chicken.wmf b/odk/examples/basic/forms_and_controls/chicken.wmf
deleted file mode 100644
index 6be326d0..00000000
--- a/odk/examples/basic/forms_and_controls/chicken.wmf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/forms_and_controls/fish.wmf b/odk/examples/basic/forms_and_controls/fish.wmf
deleted file mode 100644
index d7060f28..00000000
--- a/odk/examples/basic/forms_and_controls/fish.wmf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/forms_and_controls/vegetable.wmf b/odk/examples/basic/forms_and_controls/vegetable.wmf
deleted file mode 100644
index 364d122c..00000000
--- a/odk/examples/basic/forms_and_controls/vegetable.wmf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/makefile.mk b/odk/examples/basic/makefile.mk
deleted file mode 100644
index 594b93fb..00000000
--- a/odk/examples/basic/makefile.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-DRAWING_FILES=\
- $(DESTDIRBASICEXAMPLES)$/drawing$/dirtree.txt \
- $(DESTDIRBASICEXAMPLES)$/drawing$/importexportofasciifiles.odg
-
-FORMSANDCONTROLS_FILES=\
- $(DESTDIRBASICEXAMPLES)$/forms_and_controls$/beef.wmf \
- $(DESTDIRBASICEXAMPLES)$/forms_and_controls$/burger.wmf \
- $(DESTDIRBASICEXAMPLES)$/forms_and_controls$/burger_factory.odt \
- $(DESTDIRBASICEXAMPLES)$/forms_and_controls$/chicken.wmf \
- $(DESTDIRBASICEXAMPLES)$/forms_and_controls$/fish.wmf \
- $(DESTDIRBASICEXAMPLES)$/forms_and_controls$/vegetable.wmf
-
-SHEET_FILES=\
- $(DESTDIRBASICEXAMPLES)$/sheet$/adapting_to_euroland.ods
-
-STOCKQUOTEUPDATER_FILES=\
- $(DESTDIRBASICEXAMPLES)$/stock_quotes_updater$/stock.ods
-
-TEXT_FILES=\
- $(DESTDIRBASICEXAMPLES)$/text$/creating_an_index$/index.odt \
- $(DESTDIRBASICEXAMPLES)$/text$/creating_an_index$/indexlist.txt \
- $(DESTDIRBASICEXAMPLES)$/text$/modifying_text_automatically$/changing_appearance.odt \
- $(DESTDIRBASICEXAMPLES)$/text$/modifying_text_automatically$/inserting_bookmarks.odt \
- $(DESTDIRBASICEXAMPLES)$/text$/modifying_text_automatically$/replacing_text.odt \
- $(DESTDIRBASICEXAMPLES)$/text$/modifying_text_automatically$/using_regular_expressions.odt
-
-DIR_FILE_LIST= \
- $(DRAWING_FILES) \
- $(FORMSANDCONTROLS_FILES) \
- $(SHEET_FILES) \
- $(STOCKQUOTEUPDATER_FILES) \
- $(TEXT_FILES) \
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/ex_basic_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/ex_basic_files.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
-
diff --git a/odk/examples/basic/sheet/adapting_to_euroland.ods b/odk/examples/basic/sheet/adapting_to_euroland.ods
deleted file mode 100644
index 6c1ced5a..00000000
--- a/odk/examples/basic/sheet/adapting_to_euroland.ods
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/stock_quotes_updater/stock.ods b/odk/examples/basic/stock_quotes_updater/stock.ods
deleted file mode 100644
index 5b530b5c..00000000
--- a/odk/examples/basic/stock_quotes_updater/stock.ods
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/text/creating_an_index/index.odt b/odk/examples/basic/text/creating_an_index/index.odt
deleted file mode 100644
index 7af60ff2..00000000
--- a/odk/examples/basic/text/creating_an_index/index.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/text/creating_an_index/indexlist.txt b/odk/examples/basic/text/creating_an_index/indexlist.txt
deleted file mode 100644
index 43c548a7..00000000
--- a/odk/examples/basic/text/creating_an_index/indexlist.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Sun
-StarOffice
-Solaris
-Java
-Developer
-technology
-Administration
-countries
-
diff --git a/odk/examples/basic/text/modifying_text_automatically/changing_appearance.odt b/odk/examples/basic/text/modifying_text_automatically/changing_appearance.odt
deleted file mode 100644
index ac718501..00000000
--- a/odk/examples/basic/text/modifying_text_automatically/changing_appearance.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/text/modifying_text_automatically/inserting_bookmarks.odt b/odk/examples/basic/text/modifying_text_automatically/inserting_bookmarks.odt
deleted file mode 100644
index aea712f1..00000000
--- a/odk/examples/basic/text/modifying_text_automatically/inserting_bookmarks.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/text/modifying_text_automatically/replacing_text.odt b/odk/examples/basic/text/modifying_text_automatically/replacing_text.odt
deleted file mode 100644
index 14a3882c..00000000
--- a/odk/examples/basic/text/modifying_text_automatically/replacing_text.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/basic/text/modifying_text_automatically/using_regular_expressions.odt b/odk/examples/basic/text/modifying_text_automatically/using_regular_expressions.odt
deleted file mode 100644
index 9374b6cb..00000000
--- a/odk/examples/basic/text/modifying_text_automatically/using_regular_expressions.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
deleted file mode 100644
index 6401f73e..00000000
--- a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/*****************************************************************************
- *****************************************************************************
- *
- * Simple client application using the UnoUrlResolver service.
- *
- *****************************************************************************
- *****************************************************************************/
-#include <stdio.h>
-#include <wchar.h>
-
-#include <sal/main.h>
-
-#include <cppuhelper/bootstrap.hxx>
-
-#include <osl/file.hxx>
-#include <osl/process.h>
-#include <rtl/process.h>
-
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-#include <string.h>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::bridge;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::registry;
-
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-
-//============================================================================
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
- OUString sConnectionString(RTL_CONSTASCII_USTRINGPARAM("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"));
-
- sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
-
- if (nCount < 1)
- {
- printf("using: DocumentLoader -env:URE_MORE_TYPES=<office_types_rdb_url> <file_url> [<uno_connection_url>]\n\n"
- "example: DocumentLoader -env:URE_MORE_TYPES=\"file:///.../basis-link/program/offapi.rdb\" \"file:///e:/temp/test.odt\" \"uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager\"\n");
- exit(1);
- }
- if (nCount == 2)
- {
- rtl_getAppCommandArg(1, &sConnectionString.pData);
- }
-
- Reference< XComponentContext > xComponentContext(::cppu::defaultBootstrap_InitialComponentContext());
-
- /* Gets the service manager instance to be used (or null). This method has
- been added for convenience, because the service manager is a often used
- object.
- */
- Reference< XMultiComponentFactory > xMultiComponentFactoryClient(
- xComponentContext->getServiceManager() );
-
- /* Creates an instance of a component which supports the services specified
- by the factory.
- */
- Reference< XInterface > xInterface =
- xMultiComponentFactoryClient->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")),
- xComponentContext );
-
- Reference< XUnoUrlResolver > resolver( xInterface, UNO_QUERY );
-
- // Resolves the component context from the office, on the uno URL given by argv[1].
- try
- {
- xInterface = Reference< XInterface >(
- resolver->resolve( sConnectionString ), UNO_QUERY );
- }
- catch ( Exception& e )
- {
- printf("Error: cannot establish a connection using '%s':\n %s\n",
- OUStringToOString(sConnectionString, RTL_TEXTENCODING_ASCII_US).getStr(),
- OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
- exit(1);
- }
-
- // gets the server component context as property of the office component factory
- Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY );
- xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xComponentContext;
-
- // gets the service manager from the office
- Reference< XMultiComponentFactory > xMultiComponentFactoryServer(
- xComponentContext->getServiceManager() );
-
- /* Creates an instance of a component which supports the services specified
- by the factory. Important: using the office component context.
- */
- Reference < XComponentLoader > xComponentLoader(
- xMultiComponentFactoryServer->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ) ),
- xComponentContext ), UNO_QUERY );
-
- /* Loads a component specified by an URL into the specified new or existing
- frame.
- */
- OUString sAbsoluteDocUrl, sWorkingDir, sDocPathUrl, sArgDocUrl;
- rtl_getAppCommandArg(0, &sArgDocUrl.pData);
-
- osl_getProcessWorkingDir(&sWorkingDir.pData);
- osl::FileBase::getFileURLFromSystemPath( sArgDocUrl, sDocPathUrl);
- osl::FileBase::getAbsoluteFileURL( sWorkingDir, sDocPathUrl, sAbsoluteDocUrl);
-
- Reference< XComponent > xComponent = xComponentLoader->loadComponentFromURL(
- sAbsoluteDocUrl, OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0,
- Sequence < ::com::sun::star::beans::PropertyValue >() );
-
- // dispose the local service manager
- Reference< XComponent >::query( xMultiComponentFactoryClient )->dispose();
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/DocumentLoader/Makefile b/odk/examples/cpp/DocumentLoader/Makefile
deleted file mode 100644
index 02a872a4..00000000
--- a/odk/examples/cpp/DocumentLoader/Makefile
+++ /dev/null
@@ -1,108 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the C++ DocumentLoader example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=DocumentLoader
-
-OUT_COMP_INC = $(OUT_INC)/$(COMPONENT_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(COMPONENT_NAME)
-OUT_COMP_OBJ=$(OUT_OBJ)/$(COMPONENT_NAME)
-
-CXXFILES = DocumentLoader.cxx
-
-OBJFILES = $(patsubst %.cxx,$(OUT_SLO_COMP)/%.$(OBJ_EXT),$(CXXFILES))
-
-ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(OFFICE_TYPES)
-
-# Targets
-.PHONY: ALL
-ALL : \
- CppDocumentLoaderExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_OBJ)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(OUT_BIN)/DocumentLoader$(EXE_EXT) : $(OUT_COMP_OBJ)/DocumentLoader.$(OBJ_EXT)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
-ifeq "$(OS)" "WIN"
- $(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_COMP_GEN)/$(basename $(@F)).map \
- $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-else
- $(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS_BIN) $@
-endif
-endif
-
-CppDocumentLoaderExample : $(OUT_BIN)/DocumentLoader$(EXE_EXT)
- @echo --------------------------------------------------------------------------------
- @echo The example loads the "$(QM)test.odt$(QM)" document in the DocumentLoader example directory.
- @echo If you want to load your own document, please use:
- @echo $(SQM) $(SQM)DocumentLoader -env:URE_MORE_TYPES="$(QM)<fileurl_office_types_rdb>$(QM)" "$(QM)filename$(QM)" [connection_url]
- @echo -
- @echo Use the following command to execute the example!
- @echo -
- @echo $(MAKE) DocumentLoader.run
- @echo -
- @echo NOTE: This example does not use the new UNO bootstrap mechanism, it uses still a socket
- @echo $(SQM) $(SQM)connection. The example use the defaultBootstrap_InitialComponentContext method and provides
- @echo $(SQM) $(SQM)the additional office types via the UNO environment variable -env:URE_MORE_TYPES=...
- @echo $(SQM) $(SQM)Before you can run this example you have to start your office in listening mode.
- @echo -
- @echo $(SQM) $(SQM)soffice "$(QM)-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager$(QM)"
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_BIN)/DocumentLoader$(EXE_EXT)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(ENV_OFFICE_TYPES) $(subst \\,/,$(subst /,$(PS),"$(OO_SDK_HOME)/examples/cpp/DocumentLoader/test.odt"))
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_OBJ))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/DocumentLoader*))
diff --git a/odk/examples/cpp/DocumentLoader/test.odt b/odk/examples/cpp/DocumentLoader/test.odt
deleted file mode 100644
index 82edb8ef..00000000
--- a/odk/examples/cpp/DocumentLoader/test.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/cpp/complextoolbarcontrols/Addons.xcu b/odk/examples/cpp/complextoolbarcontrols/Addons.xcu
deleted file mode 100644
index 52ef0d37..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/Addons.xcu
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="OfficeToolBar">
- <node oor:name="com.sun.star.comp.framework.addon.complextoolbarcontrols" oor:op="replace">
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command1</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Image Button</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>ImageButton</value>
- </prop>
- </node>
- <node oor:name="m2" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command2</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">ComboBox</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>Combobox</value>
- </prop>
- <prop oor:name="Width" oor:type="xs:long">
- <value>200</value>
- </prop>
- </node>
- <node oor:name="m3" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>private:separator</value>
- </prop>
- </node>
- <node oor:name="m4" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command5</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Spinfield</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>Spinfield</value>
- </prop>
- <prop oor:name="Width" oor:type="xs:long">
- <value>70</value>
- </prop>
- </node>
- <node oor:name="m5" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>private:separator</value>
- </prop>
- </node>
- <node oor:name="m6" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command6</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Editfield</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>Editfield</value>
- </prop>
- <prop oor:name="Width" oor:type="xs:long">
- <value>130</value>
- </prop>
- </node>
- <node oor:name="m7" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>private:separator</value>
- </prop>
- </node>
- <node oor:name="m8" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command7</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Dropdownbox</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>Dropdownbox</value>
- </prop>
- <prop oor:name="Width" oor:type="xs:long">
- <value>80</value>
- </prop>
- </node>
- <node oor:name="m9" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command3</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Toggle Dropdown Button</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>ToggleDropdownButton</value>
- </prop>
- </node>
- <node oor:name="m10" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command4</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Dropdown Button</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument</value>
- </prop>
- <prop oor:name="ControlType" oor:type="xs:string">
- <value>DropdownButton</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="Images">
- <node oor:name="vnd.demo.complextoolbarcontrols.image1" oor:op="replace">
- <prop oor:name="URL">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:Command1</value>
- </prop>
- <node oor:name="UserDefinedImages">
- <prop oor:name="ImageSmallURL" oor:type="xs:string">
- <value>%origin%/logo_small.png</value>
- </prop>
- <prop oor:name="ImageBigURL" oor:type="xs:string">
- <value>%origin%/logo_big.png</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx b/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx
deleted file mode 100644
index fd344840..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "MyListener.h"
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-void SAL_CALL CalcListener::notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException)
-{
-}
-
-void SAL_CALL CalcListener::disposing( const com::sun::star::lang::EventObject& aSource ) throw( com::sun::star::uno::RuntimeException )
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/CalcWindowState.xcu b/odk/examples/cpp/complextoolbarcontrols/CalcWindowState.xcu
deleted file mode 100644
index dbb79464..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/CalcWindowState.xcu
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="CalcWindowState" oor:package="org.openoffice.Office.UI">
- <node oor:name="UIElements">
- <node oor:name="States">
- <node oor:name="private:resource/toolbar/addon_com.sun.star.comp.framework.addon.complextoolbarcontrols" oor:op="replace">
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Complex Toolbar Controls</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data> \ No newline at end of file
diff --git a/odk/examples/cpp/complextoolbarcontrols/Jobs.xcu b/odk/examples/cpp/complextoolbarcontrols/Jobs.xcu
deleted file mode 100644
index 342b6fe3..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/Jobs.xcu
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="Jobs">
- <node oor:name="DemoAddOn" oor:op="replace">
- <prop oor:name="Service">
- <value>vnd.demo.NewDocListener</value>
- </prop>
- </node>
- </node>
- <node oor:name="Events">
- <node oor:name="OnNew" oor:op="replace">
- <node oor:name="JobList">
- <node oor:name="DemoAddOn" oor:op="replace"/>
- </node>
- </node>
- <node oor:name="OnLoad" oor:op="replace">
- <node oor:name="JobList">
- <node oor:name="DemoAddOn" oor:op="replace"/>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.cxx b/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.cxx
deleted file mode 100644
index 5270c44a..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "ListenerHelper.h"
-
-using com::sun::star::frame::XFrame;
-using com::sun::star::frame::XDispatch;
-using com::sun::star::frame::XStatusListener;
-using com::sun::star::lang::XEventListener;
-using com::sun::star::lang::EventObject;
-using com::sun::star::uno::Reference;
-using com::sun::star::uno::RuntimeException;
-using com::sun::star::frame::FeatureStateEvent;
-
-static AllListeners aListeners;
-
-void ListenerHelper::AddListener(
- const Reference < XFrame >& xFrame,
- const Reference < XStatusListener > xControl,
- const ::rtl::OUString& aCommand )
-{
- sal_uInt32 i=0;
- sal_uInt32 nSize = aListeners.size();
- for ( i=0; i<nSize; i++ )
- if ( aListeners[i].xFrame == xFrame )
- break;
-
- OSL_ENSURE( i<nSize, "No dispatch found for this listener!" );
- aListeners[i].aContainer[aCommand].push_back( xControl );
-}
-
-void ListenerHelper::RemoveListener(
- const Reference < XFrame >& xFrame,
- const Reference < XStatusListener > xControl,
- const ::rtl::OUString& aCommand )
-{
- sal_uInt32 nSize = aListeners.size();
- for ( sal_uInt32 i=0; i<nSize; i++ )
- {
- if ( aListeners[i].xFrame == xFrame )
- {
- StatusListeners& aL = aListeners[i].aContainer[aCommand];
- StatusListeners::iterator aIter = aL.begin();
- while ( aIter != aL.end() )
- {
- if ( (*aIter) == xControl )
- {
- aL.erase( aIter );
- break;
- }
-
- ++aIter;
- }
- }
- }
-}
-
-void ListenerHelper::Notify(
- const Reference < XFrame >& xFrame,
- const ::rtl::OUString& aCommand,
- FeatureStateEvent& rEvent )
-{
- sal_uInt32 nSize = aListeners.size();
- for ( sal_uInt32 i=0; i<nSize; i++ )
- {
- if ( aListeners[i].xFrame == xFrame )
- {
- rEvent.Source = aListeners[i].xDispatch;
- StatusListeners& aL = aListeners[i].aContainer[aCommand];
- StatusListeners::iterator aIter = aL.begin();
- while ( aIter != aL.end() )
- {
- (*aIter)->statusChanged( rEvent );
- ++aIter;
- }
- }
- }
-}
-
-com::sun::star::uno::Reference < XDispatch > ListenerHelper::GetDispatch(
- const Reference < XFrame >& xFrame,
- const ::rtl::OUString& aCommand )
-{
- sal_uInt32 nSize = aListeners.size();
- for ( sal_uInt32 i=0; i<nSize; i++ )
- {
- if ( aListeners[i].xFrame == xFrame )
- return aListeners[i].xDispatch;
- }
-
- return Reference < XDispatch >();
-}
-
-void ListenerHelper::AddDispatch(
- const Reference < XDispatch > xDispatch,
- const Reference < XFrame >& xFrame,
- const ::rtl::OUString& aCommand )
-{
- ListenerItem aItem;
- aItem.xFrame = xFrame;
- aItem.xDispatch = xDispatch;
- aListeners.push_back( aItem );
- xFrame->addEventListener( new ListenerItemEventListener( xFrame ) );
-}
-
-void SAL_CALL ListenerItemEventListener::disposing( const EventObject& aEvent) throw (RuntimeException)
-{
- AllListeners::iterator aIter = aListeners.begin();
- while ( aIter != aListeners.end() )
- {
- if ( (*aIter).xFrame == mxFrame )
- {
- aListeners.erase( aIter );
- break;
- }
-
- ++aIter;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h b/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h
deleted file mode 100644
index 15cb7f21..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#include <vector>
-#include <boost/unordered_map.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
-#include <com/sun/star/frame/FeatureStateEvent.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-
-#include <rtl/ustring.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-struct hashObjectName_Impl
-{
- size_t operator()(const ::rtl::OUString Str) const
- {
- return (size_t)Str.hashCode();
- }
-};
-
-struct eqObjectName_Impl
-{
- sal_Bool operator()(const ::rtl::OUString Str1, const ::rtl::OUString Str2) const
- {
- return ( Str1 == Str2 );
- }
-};
-
-typedef std::vector < com::sun::star::uno::Reference < com::sun::star::frame::XStatusListener > > StatusListeners;
-
-typedef boost::unordered_map
-<
- ::rtl::OUString,
- StatusListeners,
- hashObjectName_Impl,
- eqObjectName_Impl
->
-ListenerMap;
-
-// For every frame there is *one* Dispatch object for all possible commands
-// this struct contains an array of listeners for every supported command
-// these arrays are accessed by a boost::unordered_map (with the command string as index)
-struct ListenerItem
-{
- ListenerMap aContainer;
- ::com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > xDispatch;
- ::com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame;
-};
-
-typedef std::vector < ListenerItem > AllListeners;
-
-class ListenerHelper
-{
-public:
- void AddListener(
- const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame,
- const com::sun::star::uno::Reference < com::sun::star::frame::XStatusListener > xControl,
- const ::rtl::OUString& aCommand );
- void RemoveListener(
- const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame,
- const com::sun::star::uno::Reference < com::sun::star::frame::XStatusListener > xControl,
- const ::rtl::OUString& aCommand );
- void Notify(
- const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame,
- const ::rtl::OUString& aCommand,
- com::sun::star::frame::FeatureStateEvent& rEvent );
- com::sun::star::uno::Reference < com::sun::star::frame::XDispatch > GetDispatch(
- const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame,
- const ::rtl::OUString& aCommand );
- void AddDispatch(
- const com::sun::star::uno::Reference < com::sun::star::frame::XDispatch > xDispatch,
- const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame,
- const ::rtl::OUString& aCommand );
-};
-
-class ListenerItemEventListener : public cppu::WeakImplHelper1 < ::com::sun::star::lang::XEventListener >
-{
- ::com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
-public:
- ListenerItemEventListener( const com::sun::star::uno::Reference < com::sun::star::frame::XFrame >& xFrame)
- : mxFrame(xFrame)
- {}
- virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException);
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/Makefile b/odk/examples/cpp/complextoolbarcontrols/Makefile
deleted file mode 100644
index 06af1afa..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/Makefile
+++ /dev/null
@@ -1,185 +0,0 @@
- #*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the complextoolbarcontrols C++ component example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=complextoolbarcontrols
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
-COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
-COMP_REGISTERFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_register_component.flag
-COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
-
-CXXFILES = \
- MyProtocolHandler.cxx \
- MyJob.cxx \
- MyListener.cxx \
- WriterListener.cxx \
- CalcListener.cxx \
- ListenerHelper.cxx \
- exports.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- Example
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(STL_INCLUDES) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-
-#$(COMP_MAPFILE) : $(SLOFILES)
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-#ifeq "$(OS)" "MACOSX"
-# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-#endif
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-# rule for component package manifest
-$(OUT_COMP_GEN)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)WriterWindowState.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:meda-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)CalcWindowState.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)ProtocolHandler.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
-
-# @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=native;platform=$(UNOPKG_PLATFORM)$(QM)" >> $@
-# @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_GEN)/,,$(UNOPKG_PLATFORM)/$(@D))).uno.$(SHAREDLIB_EXT)$(QM)"/$(CSEP) >> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-$(COMP_COMPONENTS) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)vnd.My.impl.NewDocListener$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)vnd.My.NewDocListener$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)vnd.demo.Impl.ProtocolHandler$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)vnd.demo.ProtocolHandler$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) Addons.xcu ProtocolHandler.xcu WriterWindowState.xcu CalcWindowState.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
- -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_NAME).components
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
- $(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu WriterWindowState.xcu CalcWindowState.xcu logo_small.png logo_big.png
- cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-Example : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The "$(QM)ProtocolHandler$(QM)" addon component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo --------------------------------------------------------------------------------
-
-run: $(COMP1_COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" -writer
-
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx b/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx
deleted file mode 100644
index d07d67d8..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "MyJob.h"
-#include <osl/diagnose.h>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/document/XEventBroadcaster.hpp>
-
-using rtl::OUString;
-using com::sun::star::uno::Sequence;
-using com::sun::star::uno::Reference;
-using com::sun::star::uno::Any;
-using com::sun::star::uno::UNO_QUERY;
-using com::sun::star::uno::XInterface;
-using com::sun::star::uno::Exception;
-using com::sun::star::uno::RuntimeException;
-using com::sun::star::lang::IllegalArgumentException;
-using com::sun::star::lang::XMultiServiceFactory;
-using com::sun::star::beans::NamedValue;
-using com::sun::star::document::XEventBroadcaster;
-
-Any SAL_CALL MyJob::execute( const Sequence< NamedValue >& aArguments )
- throw ( IllegalArgumentException, Exception, RuntimeException )
-{
- Reference < XEventBroadcaster > xBrd( mxMSF->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster")) ), UNO_QUERY );
- Reference < com::sun::star::document::XEventListener > xLstner( mxMSF->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Office.MyListener")) ), UNO_QUERY );
- if ( xBrd.is() )
- xBrd->addEventListener( xLstner );
- return Any();
-}
-
-OUString MyJob_getImplementationName ()
- throw (RuntimeException)
-{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Office.MyJob" ) );
-}
-
-#define SERVICE_NAME "com.sun.star.task.Job"
-
-sal_Bool SAL_CALL MyJob_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
-{
- return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
-}
-
-Sequence< OUString > SAL_CALL MyJob_getSupportedServiceNames( )
- throw (RuntimeException)
-{
- Sequence < OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
- return aRet;
-}
-
-#undef SERVICE_NAME
-
-Reference< XInterface > SAL_CALL MyJob_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*) new MyJob( rSMgr );
-}
-
-// XServiceInfo
-OUString SAL_CALL MyJob::getImplementationName( )
- throw (RuntimeException)
-{
- return MyJob_getImplementationName();
-}
-
-sal_Bool SAL_CALL MyJob::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
-{
- return MyJob_supportsService( rServiceName );
-}
-
-Sequence< OUString > SAL_CALL MyJob::getSupportedServiceNames( )
- throw (RuntimeException)
-{
- return MyJob_getSupportedServiceNames();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyJob.h b/odk/examples/cpp/complextoolbarcontrols/MyJob.h
deleted file mode 100644
index 3f2989f7..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/MyJob.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#ifndef _MyJob_HXX
-
-#define _MyJob_HXX
-
-
-
-#ifndef _COM_SUN_STAR_TASK_XJOB_HPP_
-
-#include <com/sun/star/task/XJob.hpp>
-
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-#endif
-
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
-
-#include <cppuhelper/implbase2.hxx>
-
-#endif
-
-
-
-namespace com
-
-{
-
- namespace sun
-
- {
-
- namespace star
-
- {
-
- namespace frame
-
- {
-
- class XModel;
-
- class XFrame;
-
- }
-
-
-
- namespace beans
-
- {
-
- struct NamedValue;
-
- }
-
- }
-
- }
-
-}
-
-
-
-class MyJob : public cppu::WeakImplHelper2
-
-<
-
- com::sun::star::task::XJob,
-
- com::sun::star::lang::XServiceInfo
-
->
-
-{
-
-private:
-
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
-
-
-
-public:
-
- MyJob( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
-
- : mxMSF( rxMSF ) {}
-
- virtual ~MyJob() {}
-
-
-
- // XJob
-
- virtual ::com::sun::star::uno::Any SAL_CALL execute(
-
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments )
-
- throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
-
-
- // XServiceInfo
-
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
-
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
-
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
-
- throw (::com::sun::star::uno::RuntimeException);
-
-};
-
-
-
-::rtl::OUString MyJob_getImplementationName()
-
- throw ( ::com::sun::star::uno::RuntimeException );
-
-
-
-sal_Bool SAL_CALL MyJob_supportsService( const ::rtl::OUString& ServiceName )
-
- throw ( ::com::sun::star::uno::RuntimeException );
-
-
-
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL MyJob_getSupportedServiceNames( )
-
- throw ( ::com::sun::star::uno::RuntimeException );
-
-
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-
-SAL_CALL MyJob_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
-
- throw ( ::com::sun::star::uno::Exception );
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx b/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
deleted file mode 100644
index da9fce33..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "MyListener.h"
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/document/XEventBroadcaster.hpp>
-
-namespace css = ::com::sun::star;
-
-
-MyListener::MyListener(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
- : m_xSMGR(xSMGR)
-{}
-
-
-MyListener::~MyListener()
-{}
-
-
-css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans::NamedValue >& lArguments)
- throw (css::lang::IllegalArgumentException,
- css::uno::Exception,
- css::uno::RuntimeException)
-{
- css::uno::Sequence< css::beans::NamedValue > lEnv;
-
- sal_Int32 i = 0;
- sal_Int32 c = lArguments.getLength();
- const css::beans::NamedValue* p = lArguments.getConstArray();
- for (i=0; i<c; ++i)
- {
- if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Environment")))
- {
- p[i].Value >>= lEnv;
- break;
- }
- }
-
- css::uno::Reference< css::frame::XModel > xModel;
-
- c = lEnv.getLength();
- p = lEnv.getConstArray();
- for (i=0; i<c; ++i)
- {
- if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model")))
- {
- p[i].Value >>= xModel;
- break;
- }
- if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")))
- {
- css::uno::Reference< css::frame::XController > xController;
- css::uno::Reference< css::frame::XFrame > xFrame;
- p[i].Value >>= xFrame;
- if (xFrame.is())
- xController = xFrame->getController();
- if (xController.is())
- xModel = xController->getModel();
- break;
- }
- }
-
- if (!xModel.is())
- return css::uno::Any();
-
- css::uno::Reference< css::lang::XServiceInfo > xInfo(xModel, css::uno::UNO_QUERY);
- sal_Bool bCalc = xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument")));
- sal_Bool bWriter = (
- xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))) &&
- !xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.WebDocument"))) &&
- !xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalDocument")))
- );
-
- // Wir interessieren uns nur für Writer und Calc. Werden hier aber für
- // alle neu geöffneten Dokumente benachrichtigt ...
- if (!bCalc && !bWriter)
- return css::uno::Any();
-
- void* pListener = 0;
- if (bCalc)
- pListener = (void*)(new CalcListener(m_xSMGR));
- else
- if (bWriter)
- pListener = (void*)(new WriterListener(m_xSMGR));
-
- css::uno::Reference< css::document::XEventListener > xDocListener (static_cast< css::document::XEventListener* >(pListener), css::uno::UNO_QUERY);
- css::uno::Reference< css::document::XEventBroadcaster > xDocBroadcaster (xModel , css::uno::UNO_QUERY);
-
- xDocBroadcaster->addEventListener(xDocListener);
-
- return css::uno::Any();
-}
-
-
-::rtl::OUString SAL_CALL MyListener::getImplementationName()
- throw (css::uno::RuntimeException)
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MYLISTENER_IMPLEMENTATIONNAME));
-}
-
-
-css::uno::Sequence< ::rtl::OUString > SAL_CALL MyListener::getSupportedServiceNames()
- throw (css::uno::RuntimeException)
-{
- css::uno::Sequence< ::rtl::OUString > lNames(1);
- lNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MYLISTENER_SERVICENAME));
- return lNames;
-}
-
-
-sal_Bool SAL_CALL MyListener::supportsService(const ::rtl::OUString& sServiceName)
- throw (css::uno::RuntimeException)
-{
- return (
- sServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MYLISTENER_SERVICENAME)) ||
- sServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.task.Job"))
- );
-}
-
-
-css::uno::Reference< css::uno::XInterface > MyListener::st_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
-{
- MyListener* pListener = new MyListener(xSMGR);
- css::uno::Reference< css::uno::XInterface > xListener(static_cast< css::task::XJob* >(pListener), css::uno::UNO_QUERY);
- return xListener;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyListener.h b/odk/examples/cpp/complextoolbarcontrols/MyListener.h
deleted file mode 100644
index 24caa9d3..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/MyListener.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#ifndef _MyListener_HXX
-#define _MyListener_HXX
-
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/task/XJob.hpp>
-#include <com/sun/star/document/XEventListener.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-
-#define MYLISTENER_IMPLEMENTATIONNAME "vnd.My.impl.NewDocListener"
-#define MYLISTENER_SERVICENAME "vnd.My.NewDocListener"
-
-namespace css = ::com::sun::star;
-
-/*---------------------------------------------------
- * Registriert sich in der Office Konfiguration als Job.
- * Dieser wird dann für alle neu geöffneten Dokumente automatisch
- * gerufen. Man bekommt eine Reference auf das geöffnete Dokument
- * überreicht und kann dann prüfen, ob es ein unterstütztes Format
- * hat. (Wir interessieren uns ja schließlich nur für Writer/Calc Dokumente.)
- *
- * @see CalcListener
- * @see WriterListener
- */
-class MyListener : public cppu::WeakImplHelper2< css::task::XJob ,
- css::lang::XServiceInfo >
-{
- private:
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
-
- public:
- MyListener(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
- virtual ~MyListener();
-
- // XJob
- virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence< css::beans::NamedValue >& lArguments)
- throw (css::lang::IllegalArgumentException,
- css::uno::Exception,
- css::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw (css::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& sServiceName)
- throw (css::uno::RuntimeException);
-
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
- throw (css::uno::RuntimeException);
-
- public:
-
- static css::uno::Reference< css::uno::XInterface > st_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
-};
-
-class CalcListener : public cppu::WeakImplHelper1< css::document::XEventListener >
-{
- private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
-
-
- public:
- CalcListener(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF )
- {}
-
- virtual ~CalcListener()
- {}
-
- // document.XEventListener
- virtual void SAL_CALL notifyEvent(const css::document::EventObject& aEvent)
- throw (css::uno::RuntimeException);
- virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
- throw (css::uno::RuntimeException);
-};
-
-class WriterListener : public cppu::WeakImplHelper1< css::document::XEventListener >
-{
- private:
- css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
-
- public:
- WriterListener(const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMSF);
-
- virtual ~WriterListener()
- {}
-
- // document.XEventListener
- virtual void SAL_CALL notifyEvent(const css::document::EventObject& aEvent)
- throw (css::uno::RuntimeException);
- virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
- throw (css::uno::RuntimeException);
-};
-
-#endif // _MyListener_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
deleted file mode 100644
index 17bea5d1..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ /dev/null
@@ -1,542 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "ListenerHelper.h"
-#include "MyProtocolHandler.h"
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/frame/DispatchDescriptor.hpp>
-#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
-#include <com/sun/star/text/XTextViewCursor.hpp>
-#include <com/sun/star/text/XTextCursor.hpp>
-#include <com/sun/star/text/XTextDocument.hpp>
-#include <com/sun/star/sheet/XSpreadsheetView.hpp>
-#include <com/sun/star/frame/ControlCommand.hpp>
-#include <com/sun/star/frame/ControlEvent.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/frame/XControlNotificationListener.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/awt/XWindowPeer.hpp>
-#include <com/sun/star/awt/WindowAttribute.hpp>
-#include <com/sun/star/awt/XMessageBox.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/container/XContainerQuery.hpp>
-
-#include <osl/file.hxx>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::frame;
-using com::sun::star::lang::XMultiServiceFactory;
-using com::sun::star::beans::PropertyValue;
-using com::sun::star::util::URL;
-using com::sun::star::text::XTextViewCursorSupplier;
-using com::sun::star::text::XTextViewCursor;
-using com::sun::star::text::XTextCursor;
-using com::sun::star::sheet::XSpreadsheetView;
-using com::sun::star::frame::XModel;
-using com::sun::star::text::XTextRange;
-using com::sun::star::text::XTextDocument;
-using com::sun::star::beans::NamedValue;
-using namespace com::sun::star::awt;
-using com::sun::star::view::XSelectionSupplier;
-using namespace com::sun::star::system;
-
-ListenerHelper aListenerHelper;
-
-void BaseDispatch::ShowMessageBox( const Reference< XFrame >& rFrame, const ::rtl::OUString& aTitle, const ::rtl::OUString& aMsgText )
-{
- if ( !mxToolkit.is() )
- mxToolkit = Reference< XToolkit > ( mxMSF->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.awt.Toolkit" ))), UNO_QUERY );
- if ( rFrame.is() && mxToolkit.is() )
- {
- // describe window properties.
- WindowDescriptor aDescriptor;
- aDescriptor.Type = WindowClass_MODALTOP;
- aDescriptor.WindowServiceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "infobox" ));
- aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = Reference< XWindowPeer >( rFrame->getContainerWindow(), UNO_QUERY );
- aDescriptor.Bounds = Rectangle(0,0,300,200);
- aDescriptor.WindowAttributes = WindowAttribute::BORDER | WindowAttribute::MOVEABLE | WindowAttribute::CLOSEABLE;
-
- Reference< XWindowPeer > xPeer = mxToolkit->createWindow( aDescriptor );
- if ( xPeer.is() )
- {
- Reference< XMessageBox > xMsgBox( xPeer, UNO_QUERY );
- if ( xMsgBox.is() )
- {
- xMsgBox->setCaptionText( aTitle );
- xMsgBox->setMessageText( aMsgText );
- xMsgBox->execute();
- }
- }
- }
-}
-
-void BaseDispatch::SendCommand( const com::sun::star::util::URL& aURL, const ::rtl::OUString& rCommand, const Sequence< NamedValue >& rArgs, sal_Bool bEnabled )
-{
- Reference < XDispatch > xDispatch =
- aListenerHelper.GetDispatch( mxFrame, aURL.Path );
-
- FeatureStateEvent aEvent;
-
- aEvent.FeatureURL = aURL;
- aEvent.Source = xDispatch;
- aEvent.IsEnabled = bEnabled;
- aEvent.Requery = sal_False;
-
- ControlCommand aCtrlCmd;
- aCtrlCmd.Command = rCommand;
- aCtrlCmd.Arguments = rArgs;
-
- aEvent.State <<= aCtrlCmd;
- aListenerHelper.Notify( mxFrame, aEvent.FeatureURL.Path, aEvent );
-}
-
-void BaseDispatch::SendCommandTo( const Reference< XStatusListener >& xControl, const URL& aURL, const ::rtl::OUString& rCommand, const Sequence< NamedValue >& rArgs, sal_Bool bEnabled )
-{
- FeatureStateEvent aEvent;
-
- aEvent.FeatureURL = aURL;
- aEvent.Source = (::com::sun::star::frame::XDispatch*) this;
- aEvent.IsEnabled = bEnabled;
- aEvent.Requery = sal_False;
-
- ControlCommand aCtrlCmd;
- aCtrlCmd.Command = rCommand;
- aCtrlCmd.Arguments = rArgs;
-
- aEvent.State <<= aCtrlCmd;
- xControl->statusChanged( aEvent );
-}
-
-void SAL_CALL MyProtocolHandler::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException)
-{
- Reference < XFrame > xFrame;
- if ( aArguments.getLength() )
- {
- // das erste Argument ist immer der Frame, da ein ProtocolHandler den braucht um Zugriff
- // auf den Context zu haben, in dem er aufgerufen wird
- aArguments[0] >>= xFrame;
- mxFrame = xFrame;
- }
-}
-
-Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& aURL, const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags )
- throw( RuntimeException )
-{
- Reference < XDispatch > xRet;
- if ( !mxFrame.is() )
- return 0;
-
- Reference < XController > xCtrl = mxFrame->getController();
- if ( xCtrl.is() && !aURL.Protocol.compareToAscii("vnd.demo.complextoolbarcontrols.demoaddon:") )
- {
- Reference < XTextViewCursorSupplier > xCursor( xCtrl, UNO_QUERY );
- Reference < XSpreadsheetView > xView( xCtrl, UNO_QUERY );
- if ( !xCursor.is() && !xView.is() )
- // ohne ein entsprechendes Dokument funktioniert der Handler nicht
- return xRet;
-
- if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command6" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) )
- {
- xRet = aListenerHelper.GetDispatch( mxFrame, aURL.Path );
- if ( !xRet.is() )
- {
- xRet = xCursor.is() ? (BaseDispatch*) new WriterDispatch( mxMSF, mxFrame ) :
- (BaseDispatch*) new CalcDispatch( mxMSF, mxFrame );
- aListenerHelper.AddDispatch( xRet, mxFrame, aURL.Path );
- }
- }
- }
-
- return xRet;
-}
-
-Sequence < Reference< XDispatch > > SAL_CALL MyProtocolHandler::queryDispatches( const Sequence < DispatchDescriptor >& seqDescripts )
- throw( RuntimeException )
-{
- sal_Int32 nCount = seqDescripts.getLength();
- Sequence < Reference < XDispatch > > lDispatcher( nCount );
-
- for( sal_Int32 i=0; i<nCount; ++i )
- lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL, seqDescripts[i].FrameName, seqDescripts[i].SearchFlags );
-
- return lDispatcher;
-}
-
-::rtl::OUString MyProtocolHandler_getImplementationName ()
- throw (RuntimeException)
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MYPROTOCOLHANDLER_IMPLEMENTATIONNAME));
-}
-
-sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& ServiceName )
- throw (RuntimeException)
-{
- return (
- ServiceName.equalsAscii(MYPROTOCOLHANDLER_SERVICENAME ) ||
- ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.ProtocolHandler"))
- );
-}
-
-Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler_getSupportedServiceNames( )
- throw (RuntimeException)
-{
- Sequence < ::rtl::OUString > aRet(1);
- aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MYPROTOCOLHANDLER_SERVICENAME));
- return aRet;
-}
-
-#undef SERVICE_NAME
-
-Reference< XInterface > SAL_CALL MyProtocolHandler_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*) new MyProtocolHandler( rSMgr );
-}
-
-// XServiceInfo
-::rtl::OUString SAL_CALL MyProtocolHandler::getImplementationName( )
- throw (RuntimeException)
-{
- return MyProtocolHandler_getImplementationName();
-}
-
-sal_Bool SAL_CALL MyProtocolHandler::supportsService( const ::rtl::OUString& rServiceName )
- throw (RuntimeException)
-{
- return MyProtocolHandler_supportsService( rServiceName );
-}
-
-Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler::getSupportedServiceNames( )
- throw (RuntimeException)
-{
- return MyProtocolHandler_getSupportedServiceNames();
-}
-
-void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < PropertyValue >& lArgs ) throw (RuntimeException)
-{
- /* Its neccessary to hold this object alive, till this method finish.
- May the outside dispatch cache (implemented by the menu/toolbar!)
- forget this instance during de-/activation of frames (focus!).
-
- E.g. An open db beamer in combination with the My-Dialog
- can force such strange situation :-(
- */
- Reference< XInterface > xSelfHold(static_cast< XDispatch* >(this), UNO_QUERY);
-
- if ( !aURL.Protocol.compareToAscii("vnd.demo.complextoolbarcontrols.demoaddon:") )
- {
- if ( !aURL.Path.compareToAscii("Command1" ) )
- {
- // open the OpenOffice.org web page
- ::rtl::OUString sURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://www.openoffice.org")));
- Reference< XSystemShellExecute > xSystemShellExecute( mxMSF->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), UNO_QUERY );
- if ( xSystemShellExecute.is() )
- {
- try
-
- {
- xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
- }
- catch( Exception& rEx )
- {
- (void)rEx;
- }
- }
- }
- else if ( !aURL.Path.compareToAscii("Command2" ) )
- {
- // remove the text if it's in our list
- Sequence< NamedValue > aRemoveArgs( 1 );
- aRemoveArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ));
- aRemoveArgs[0].Value <<= maComboBoxText;
- SendCommand( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveEntryText")), aRemoveArgs, sal_True );
-
- // add the new text to the start of the list
- Sequence< NamedValue > aInsertArgs( 2 );
- aInsertArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pos" ));
- aInsertArgs[0].Value <<= sal_Int32( 0 );
- aInsertArgs[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ));
- aInsertArgs[1].Value <<= maComboBoxText;
- SendCommand( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InsertEntry")), aInsertArgs, sal_True );
- }
- else if ( !aURL.Path.compareToAscii("Command3" ) )
- {
- // Retrieve the text argument from the sequence property value
- rtl::OUString aText;
- for ( sal_Int32 i = 0; i < lArgs.getLength(); i++ )
- {
- if ( lArgs[i].Name.equalsAsciiL( "Text", 4 ))
- {
- lArgs[i].Value >>= aText;
- break;
- }
- }
-
- // create new URL to address the combox box
- URL aCmdURL;
- aCmdURL.Path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command2"));
- aCmdURL.Protocol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:"));
- aCmdURL.Complete = aCmdURL.Path + aCmdURL.Protocol;
-
- // set the selected item as text into the combobox
- Sequence< NamedValue > aArgs( 1 );
- aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text"));
- aArgs[0].Value <<= aText;
- SendCommand( aCmdURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetText")), aArgs, sal_True );
- }
- else if ( !aURL.Path.compareToAscii("Command4" ) )
- {
- // Retrieve the text argument from the sequence property value
- rtl::OUString aText;
- for ( sal_Int32 i = 0; i < lArgs.getLength(); i++ )
- {
- if ( lArgs[i].Name.equalsAsciiL( "Text", 4 ))
- {
- lArgs[i].Value >>= aText;
- break;
- }
- }
-
- // just enable this command
-
- // set enable flag according to selection
- if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Button Disabled" ) ))
- mbButtonEnabled = sal_False;
- else
- mbButtonEnabled = sal_True;
-
- // create new URL to address the image button
- URL aCmdURL;
- aCmdURL.Path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command1"));
- aCmdURL.Protocol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:"));
- aCmdURL.Complete = aCmdURL.Path + aCmdURL.Protocol;
-
- // create and initialize FeatureStateEvent with IsEnabled
- ::com::sun::star::frame::FeatureStateEvent aEvent;
- aEvent.FeatureURL = aCmdURL;
- aEvent.Source = (::com::sun::star::frame::XDispatch*) this;
- aEvent.IsEnabled = mbButtonEnabled;
- aEvent.Requery = sal_False;
- aEvent.State <<= Any();
-
- // Notify listener about new state
- Reference < XDispatch > xDispatch = aListenerHelper.GetDispatch( mxFrame, aURL.Path );
- aListenerHelper.Notify( mxFrame, aEvent.FeatureURL.Path, aEvent );
- }
- else if ( !aURL.Path.compareToAscii("Command5" ) )
- {
- }
- }
-}
-
-void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
-{
- if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:")) )
- {
- if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) )
- {
- // just enable this command
- ::com::sun::star::frame::FeatureStateEvent aEvent;
- aEvent.FeatureURL = aURL;
- aEvent.Source = (::com::sun::star::frame::XDispatch*) this;
- aEvent.IsEnabled = mbButtonEnabled;
- aEvent.Requery = sal_False;
- aEvent.State <<= Any();
- xControl->statusChanged( aEvent );
- }
- else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) )
- {
- // just enable this command
- ::com::sun::star::frame::FeatureStateEvent aEvent;
- aEvent.FeatureURL = aURL;
- aEvent.Source = (::com::sun::star::frame::XDispatch*) this;
- aEvent.IsEnabled = sal_True;
- aEvent.Requery = sal_False;
- aEvent.State <<= Any();
- xControl->statusChanged( aEvent );
- }
- else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) )
- {
- // A toggle dropdown box is normally used for a group of commands
- // where the user can select the last issued command easily.
- // E.g. a typical command group would be "Insert shape"
- Sequence< NamedValue > aArgs( 1 );
-
- // send command to set context menu content
- Sequence< rtl::OUString > aContextMenu( 3 );
- aContextMenu[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command 1"));
- aContextMenu[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command 2"));
- aContextMenu[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command 3"));
-
- aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("List"));
- aArgs[0].Value <<= aContextMenu;
- SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetList")), aArgs, sal_True );
-
- // send command to check item on pos=0
- aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pos" ));
- aArgs[0].Value <<= sal_Int32( 0 );
- SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True );
- }
- else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) )
- {
- // A dropdown box is normally used for a group of dependent modes, where
- // the user can only select one. The modes cannot be combined.
- // E.g. a typical group would be left,right,center,block.
- Sequence< NamedValue > aArgs( 1 );
-
- // send command to set context menu content
- Sequence< rtl::OUString > aContextMenu( 2 );
- aContextMenu[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Button Enabled"));
- aContextMenu[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Button Disabled"));
-
- aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("List"));
- aArgs[0].Value <<= aContextMenu;
- SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetList")), aArgs, sal_True );
-
- // set position according to enable/disable state of button
- sal_Int32 nPos( mbButtonEnabled ? 0 : 1 );
-
- // send command to check item on pos=0
- aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pos" ));
- aArgs[0].Value <<= nPos;
- SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True );
- }
- else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) )
- {
- // A spin button
- Sequence< NamedValue > aArgs( 5 );
-
- // send command to initialize spin button
- aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value"));
- aArgs[0].Value <<= double( 0.0 );
- aArgs[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UpperLimit"));
- aArgs[1].Value <<= double( 10.0 );
- aArgs[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LowerLimit"));
- aArgs[2].Value <<= double( 0.0 );
- aArgs[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Step"));
- aArgs[3].Value <<= double( 0.1 );
- aArgs[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutputFormat"));
- aArgs[4].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%.2f cm"));
-
- SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetValues")), aArgs, sal_True );
- }
- else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) )
- {
- // A dropdown box is normally used for a group of commands
- // where the user can select one of a defined set.
- Sequence< NamedValue > aArgs( 1 );
-
- // send command to set context menu content
- Sequence< rtl::OUString > aList( 10 );
- aList[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("White"));
- aList[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Black"));
- aList[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Red"));
- aList[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Blue"));
- aList[4] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Green"));
- aList[5] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Grey"));
- aList[6] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Yellow"));
- aList[7] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Orange"));
- aList[8] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Brown"));
- aList[9] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pink"));
-
- aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("List"));
- aArgs[0].Value <<= aList;
- SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetList")), aArgs, sal_True );
- }
-
- aListenerHelper.AddListener( mxFrame, xControl, aURL.Path );
- }
-}
-
-void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
-{
- aListenerHelper.RemoveListener( mxFrame, xControl, aURL.Path );
-}
-
-void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event ) throw (RuntimeException)
-{
- if ( Event.aURL.Protocol.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:" ) ))
- {
- if ( Event.aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Command2" ) ))
- {
- // We get notifications whenever the text inside the combobox has been changed.
- // We store the new text into a member.
- if ( Event.Event.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TextChanged" ) ))
- {
- rtl::OUString aNewText;
- sal_Bool bHasText( sal_False );
- for ( sal_Int32 i = 0; i < Event.aInformation.getLength(); i++ )
- {
- if ( Event.aInformation[i].Name.equalsAsciiL( "Text", 4 ))
- {
- bHasText = Event.aInformation[i].Value >>= aNewText;
- break;
- }
- }
-
- if ( bHasText )
- maComboBoxText = aNewText;
- }
- }
- }
-}
-
-BaseDispatch::BaseDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const ::rtl::OUString& rServiceName )
- : mxMSF( rxMSF )
- , mxFrame( xFrame )
- , msDocService( rServiceName )
- , mbButtonEnabled( sal_True )
-{
-}
-
-
-BaseDispatch::~BaseDispatch()
-{
- mxFrame.clear();
- mxMSF.clear();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h
deleted file mode 100644
index 3ffae431..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#ifndef _MyProtocolHandler_HXX
-#define _MyProtocolHandler_HXX
-
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XControlNotificationListener.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <cppuhelper/implbase3.hxx>
-#ifndef _CPPUHELPER_IMPLBASE2_HXX
-#include <cppuhelper/implbase2.hxx>
-#endif
-#include <com/sun/star/awt/XToolkit.hpp>
-
-#define MYPROTOCOLHANDLER_IMPLEMENTATIONNAME "vnd.demo.Impl.ProtocolHandler"
-#define MYPROTOCOLHANDLER_SERVICENAME "vnd.demo.ProtocolHandler"
-
-namespace com
-{
- namespace sun
- {
- namespace star
- {
- namespace frame
- {
- class XModel;
- class XFrame;
- }
- }
- }
-}
-
-
-class MyProtocolHandler : public cppu::WeakImplHelper3
-<
- com::sun::star::frame::XDispatchProvider,
- com::sun::star::lang::XInitialization,
- com::sun::star::lang::XServiceInfo
->
-{
-private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
-public:
- MyProtocolHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ) {}
-
- // XDispatchProvider
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
- SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL,
- const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags )
- throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > >
- SAL_CALL queryDispatches(
- const ::com::sun::star::uno::Sequence < ::com::sun::star::frame::DispatchDescriptor >& seqDescriptor )
- throw( ::com::sun::star::uno::RuntimeException );
-
- // XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
-};
-
-::rtl::OUString MyProtocolHandler_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
-
-sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MyProtocolHandler_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
-
-class BaseDispatch : public cppu::WeakImplHelper2
-<
- ::com::sun::star::frame::XDispatch,
- ::com::sun::star::frame::XControlNotificationListener
->
-{
-protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > mxToolkit;
- ::rtl::OUString msDocService;
- ::rtl::OUString maComboBoxText;
- sal_Bool mbButtonEnabled;
-
-public:
- BaseDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const ::rtl::OUString& rServiceName );
-
- virtual ~BaseDispatch();
-
- void ShowMessageBox( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aTitle, const ::rtl::OUString& aMsgText );
- void SendCommand( const com::sun::star::util::URL& aURL, const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rArgs, sal_Bool bEnabled );
- void SendCommandTo( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xControl, const com::sun::star::util::URL& aURL, const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rArgs, sal_Bool bEnabled );
-
- // XDispatch
- virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArgs )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl,
- const ::com::sun::star::util::URL& aURL ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl,
- const ::com::sun::star::util::URL& aURL ) throw (::com::sun::star::uno::RuntimeException);
-
- // XControlNotificationListener
- virtual void SAL_CALL controlEvent( const ::com::sun::star::frame::ControlEvent& Event )
- throw (::com::sun::star::uno::RuntimeException);
-};
-
-class WriterDispatch : public BaseDispatch
-{
-public:
- WriterDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame )
- : BaseDispatch( rxMSF, xFrame, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument" ) ) )
- {}
-};
-
-class CalcDispatch : public BaseDispatch
-{
-public:
- CalcDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame )
- : BaseDispatch( rxMSF, xFrame, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadSheetDocument" ) ) )
- {}
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/ProtocolHandler.xcu b/odk/examples/cpp/complextoolbarcontrols/ProtocolHandler.xcu
deleted file mode 100644
index 3bab7441..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/ProtocolHandler.xcu
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data oor:name="ProtocolHandler" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="HandlerSet">
- <node oor:name="vnd.demo.ProtocolHandler" oor:op="replace">
- <prop oor:name="Protocols" oor:type="oor:string-list">
- <value>vnd.demo.complextoolbarcontrols.demoaddon:*</value>
- </prop>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/cpp/complextoolbarcontrols/WriterListener.cxx b/odk/examples/cpp/complextoolbarcontrols/WriterListener.cxx
deleted file mode 100644
index 2d41f12d..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/WriterListener.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "MyListener.h"
-
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-void SAL_CALL WriterListener::notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException)
-{
-}
-
-void SAL_CALL WriterListener::disposing( const com::sun::star::lang::EventObject& aSource ) throw( com::sun::star::uno::RuntimeException )
-{
-}
-
-WriterListener::WriterListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF )
-{
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/WriterWindowState.xcu b/odk/examples/cpp/complextoolbarcontrols/WriterWindowState.xcu
deleted file mode 100644
index fd5453eb..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/WriterWindowState.xcu
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="WriterWindowState" oor:package="org.openoffice.Office.UI">
- <node oor:name="UIElements">
- <node oor:name="States">
- <node oor:name="private:resource/toolbar/addon_com.sun.star.comp.framework.addon.complextoolbarcontrols" oor:op="replace">
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Complex Toolbar Controls</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data> \ No newline at end of file
diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
deleted file mode 100644
index 42f9eaab..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <stdio.h>
-
-#include <osl/mutex.hxx>
-#include <osl/thread.h>
-#include <cppuhelper/factory.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <sal/types.h>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
-#include "MyProtocolHandler.h"
-#include "MyListener.h"
-
-namespace css = ::com::sun::star;
-
-// static void writeInfo(const css::uno::Reference< css::registry::XRegistryKey >& xRegistryKey ,
-// const char* pImplementationName,
-// const char* pServiceName )
-// {
-// ::rtl::OUStringBuffer sKey(256);
-// sKey.append (::rtl::OUString::createFromAscii(pImplementationName));
-// sKey.appendAscii("/UNO/SERVICES/");
-// sKey.append (::rtl::OUString::createFromAscii(pServiceName));
-
-// xRegistryKey->createKey(sKey.makeStringAndClear());
-// }
-
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplName ,
- void* pServiceManager,
- void* pRegistryKey )
-{
- if ( !pServiceManager || !pImplName )
- return 0;
-
- css::uno::Reference< css::lang::XSingleServiceFactory > xFactory ;
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR (reinterpret_cast< css::lang::XMultiServiceFactory* >(pServiceManager), css::uno::UNO_QUERY);
- ::rtl::OUString sImplName = ::rtl::OUString::createFromAscii(pImplName);
-
- if (sImplName.equalsAscii(MYLISTENER_IMPLEMENTATIONNAME))
- {
- css::uno::Sequence< ::rtl::OUString > lNames(1);
- lNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MYLISTENER_IMPLEMENTATIONNAME));
- xFactory = ::cppu::createSingleFactory(xSMGR, sImplName, MyListener::st_createInstance, lNames);
- }
- else
- if (sImplName.equalsAscii(MYPROTOCOLHANDLER_IMPLEMENTATIONNAME))
- {
- css::uno::Sequence< ::rtl::OUString > lNames(1);
- lNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(MYPROTOCOLHANDLER_SERVICENAME));
- xFactory = ::cppu::createSingleFactory(xSMGR, sImplName, MyProtocolHandler_createInstance, lNames);
- }
-
- if (!xFactory.is())
- return 0;
-
- xFactory->acquire();
- return xFactory.get();
-}
-
-} // extern C
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/complextoolbarcontrols/logo_big.png b/odk/examples/cpp/complextoolbarcontrols/logo_big.png
deleted file mode 100644
index 23dd2410..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/logo_big.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/cpp/complextoolbarcontrols/logo_small.png b/odk/examples/cpp/complextoolbarcontrols/logo_small.png
deleted file mode 100644
index c24b4e27..00000000
--- a/odk/examples/cpp/complextoolbarcontrols/logo_small.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/cpp/counter/Makefile b/odk/examples/cpp/counter/Makefile
deleted file mode 100644
index e74b4722..00000000
--- a/odk/examples/cpp/counter/Makefile
+++ /dev/null
@@ -1,175 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the C++ counter example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=counter
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-COMP_IMPL=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
-COMP_RDB_NAME = $(COMP_NAME).uno.rdb
-COMP_RDB = $(OUT_BIN)/$(COMP_RDB_NAME)
-OUT_COMP_INC = $(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_OBJ = $(OUT_OBJ)/$(COMP_NAME)
-OUT_COMP_SLO = $(OUT_SLO)/$(COMP_NAME)
-COMP_SERVICES=$(SHAREDLIB_OUT)/counterservices.rdb
-
-ENV_EXAMPLE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(COMP_RDB)
-ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=$(URLPREFIX)$(COMP_SERVICES)
-
-COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
-
-IDLFILES = XCountable.idl
-
-COMPCXXFILES = counter.cxx
-
-CXXFILES = countermain.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(COMPCXXFILES))
-OBJFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-GENURDFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/%.urd,$(IDLFILES))
-
-TYPESLIST = -Tfoo.XCountable
-
-# Targets
-.PHONY: ALL
-ALL : \
- CppCounterExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_GEN)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -I. -I$(IDL_DIR) -O$(OUT_COMP_GEN) $<
-
-# This example type library will be extended by the URE types
-$(OUT_BIN)/%.rdb : $(GENURDFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(REGMERGE) $@ /UCR $(GENURDFILES)
-# $(REGMERGE) $@ / $(URE_TYPES)
-
-$(COMP_TYPEFLAG) : $(COMP_RDB) $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
- $(CPPUMAKER) -Gc -BUCR -O$(OUT_COMP_INC) $(TYPESLIST) $(COMP_RDB) -X $(URE_TYPES)
- echo flagged > $@
-
-$(OUT_COMP_OBJ)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(OUT_OBJ))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(OUT_SLO))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-$(OUT_BIN)/countermain$(EXE_EXT) : $(OUT_COMP_OBJ)/countermain.$(OBJ_EXT) $(SHAREDLIB_OUT)/counter.uno.$(SHAREDLIB_EXT)
-ifeq "$(OS)" "WIN"
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(EXE_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_COMP_GEN)/$(basename $(@F)).map \
- $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-else
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB)
-endif
-
-$(COMP_SERVICES) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)com.sun.star.comp.example.cpp.Counter$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)foo.Counter$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-
-CppCounterExample : $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL) $(COMP_SERVICES)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) countermain.run
- @echo -
- @echo NOTE: The example makes use of the URE and use the defaultBootstrap_InitialComponentContext method.
- @echo $(SQM) $(SQM)The additional example IDL types are provided via the UNO environment variable -env:URE_MORE_TYPES=...
- @echo $(SQM) $(SQM)and the example component is made available via -env:URE_MORE_SERVICES=...
- @echo $(SQM) $(SQM)Please check the generated $(QM)$(COMP_SERVICES)$(QM) to see how you can specify your own components in such an environment
- @echo $(SQM) $(SQM)and how to use the passive UNO registration.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(ENV_EXAMPLE_TYPES) $(ENV_COMP_SERVICES)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_OBJ))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_RDB)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/countermain*))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_SERVICES)))
diff --git a/odk/examples/cpp/counter/XCountable.idl b/odk/examples/cpp/counter/XCountable.idl
deleted file mode 100644
index 2df69c91..00000000
--- a/odk/examples/cpp/counter/XCountable.idl
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <com/sun/star/uno/XInterface.idl>
-
-module foo
-{
- /**
- * Interface to count things.
- */
- interface XCountable : com::sun::star::uno::XInterface
- {
- long getCount();
- void setCount( [in] long nCount );
- long increment();
- long decrement();
- };
-
- service Counter
- {
- // exported interfaces:
- interface XCountable;
- };
-};
diff --git a/odk/examples/cpp/counter/counter.cxx b/odk/examples/cpp/counter/counter.cxx
deleted file mode 100644
index 3da423bc..00000000
--- a/odk/examples/cpp/counter/counter.cxx
+++ /dev/null
@@ -1,233 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/*************************************************************************
- *************************************************************************
- *
- * service implementation: foo.Counter
- * exported interfaces: foo.XCounter
- *
- * simple example component implementing a counter
- *
- *************************************************************************
- *************************************************************************/
-
-#include <stdio.h>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/queryinterface.hxx> // helper for queryInterface() impl
-#include <cppuhelper/factory.hxx> // helper for component factory
-// generated c++ interfaces
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <foo/XCountable.hpp>
-
-#define SERVICENAME "foo.Counter"
-#define IMPLNAME "com.sun.star.comp.example.cpp.Counter"
-
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::foo;
-
-
-//========================================================================
-class MyCounterImpl
- : public XCountable
- , public XServiceInfo
-{
- // to obtain other services if needed
- Reference< XMultiServiceFactory > m_xServiceManager;
-
- sal_Int32 m_nRefCount;
- sal_Int32 m_nCount;
-
-public:
- MyCounterImpl( const Reference< XMultiServiceFactory > & xServiceManager )
- : m_xServiceManager( xServiceManager ), m_nRefCount( 0 )
- { printf( "< MyCounterImpl ctor called >\n" ); }
- ~MyCounterImpl()
- { printf( "< MyCounterImpl dtor called >\n" ); }
-
- // XInterface implementation
- virtual void SAL_CALL acquire() throw ()
- { ++m_nRefCount; }
- virtual void SAL_CALL release() throw ()
- { if (! --m_nRefCount) delete this; }
- virtual Any SAL_CALL queryInterface( const Type & rType ) throw (RuntimeException)
- { return cppu::queryInterface(rType,
- static_cast< XInterface* >( static_cast< XServiceInfo* >( this ) ),
- static_cast< XCountable* >( this ),
- static_cast< XServiceInfo* >( this ) ); }
-
- // XServiceInfo implementation
- virtual OUString SAL_CALL getImplementationName( ) throw(RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException);
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(RuntimeException);
- static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static( );
-
- // XCountable implementation
- virtual sal_Int32 SAL_CALL getCount() throw (RuntimeException)
- { return m_nCount; }
- virtual void SAL_CALL setCount( sal_Int32 nCount ) throw (RuntimeException)
- { m_nCount = nCount; }
- virtual sal_Int32 SAL_CALL increment() throw (RuntimeException)
- { return (++m_nCount); }
- virtual sal_Int32 SAL_CALL decrement() throw (RuntimeException)
- { return (--m_nCount); }
-};
-
-//*************************************************************************
-OUString SAL_CALL MyCounterImpl::getImplementationName( )
- throw(RuntimeException)
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM(IMPLNAME) );
-}
-
-//*************************************************************************
-sal_Bool SAL_CALL MyCounterImpl::supportsService( const OUString& ServiceName )
- throw(RuntimeException)
-{
- Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getArray();
- for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
- if( pArray[i] == ServiceName )
- return sal_True;
- return sal_False;
-}
-
-//*************************************************************************
-Sequence<OUString> SAL_CALL MyCounterImpl::getSupportedServiceNames( )
- throw(RuntimeException)
-{
- return getSupportedServiceNames_Static();
-}
-
-//*************************************************************************
-Sequence<OUString> SAL_CALL MyCounterImpl::getSupportedServiceNames_Static( )
-{
- OUString aName( RTL_CONSTASCII_USTRINGPARAM(SERVICENAME) );
- return Sequence< OUString >( &aName, 1 );
-}
-
-
-
-
-/**
- * Function to create a new component instance; is needed by factory helper implementation.
- * @param xMgr service manager to if the components needs other component instances
- */
-Reference< XInterface > SAL_CALL MyCounterImpl_create(
- const Reference< XMultiServiceFactory > & xMgr )
-{
- return Reference<XInterface>(static_cast<XCountable*>(new MyCounterImpl(xMgr)));
-}
-
-
-//#########################################################################
-//#### EXPORTED ###########################################################
-//#########################################################################
-
-
-/**
- * This function creates an implementation section in the registry and another subkey
- *
- * for each supported service.
- * @param pServiceManager the service manager
- * @param pRegistryKey the registry key
- */
-// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
-// {
-// sal_Bool result = sal_False;
-
-// if (pRegistryKey)
-// {
-// try
-// {
-// Reference< XRegistryKey > xNewKey(
-// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-// OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLNAME "/UNO/SERVICES") ) ) );
-
-// const Sequence< OUString > & rSNL =
-// MyCounterImpl::getSupportedServiceNames_Static();
-// const OUString * pArray = rSNL.getConstArray();
-// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
-// xNewKey->createKey( pArray[nPos] );
-
-// return sal_True;
-// }
-// catch (InvalidRegistryException &)
-// {
-// // we should not ignore exceptions
-// }
-// }
-// return result;
-// }
-
-/**
- * This function is called to get service factories for an implementation.
- *
- * @param pImplName name of implementation
- * @param pServiceManager a service manager, need for component creation
- * @param pRegistryKey the registry key for this component, need for persistent data
- * @return a component factory
- */
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
-{
- void * pRet = 0;
-
- if (rtl_str_compare( pImplName, IMPLNAME ) == 0)
- {
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(IMPLNAME) ),
- MyCounterImpl_create,
- MyCounterImpl::getSupportedServiceNames_Static() ) );
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/counter/countermain.cxx b/odk/examples/cpp/counter/countermain.cxx
deleted file mode 100644
index 8eb9f942..00000000
--- a/odk/examples/cpp/counter/countermain.cxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/*************************************************************************
- *************************************************************************
- *
- * simple client application registering and using the counter component.
- *
- *************************************************************************
- *************************************************************************/
-
-#include <stdio.h>
-
-#include <sal/main.h>
-#include <rtl/ustring.hxx>
-
-#include <osl/diagnose.h>
-
-#include <cppuhelper/bootstrap.hxx>
-
-// generated c++ interfaces
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/registry/XImplementationRegistration.hpp>
-#include <foo/XCountable.hpp>
-
-
-using namespace foo;
-using namespace cppu;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-
-using namespace ::rtl;
-
-
-//=======================================================================
-SAL_IMPLEMENT_MAIN()
-{
- try {
-
- Reference< XComponentContext > xContext(::cppu::defaultBootstrap_InitialComponentContext());
- OSL_ENSURE( xContext.is(), "### bootstrap failed!\n" );
-
- Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager();
- OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" );
-
- Reference< XInterface > xx = xMgr->createInstanceWithContext(
- OUString::createFromAscii("foo.Counter"), xContext);
-
- OSL_ENSURE( xx.is(), "### cannot get service instance of \"foo.Counter\"!" );
-
- Reference< XCountable > xCount( xx, UNO_QUERY );
- OSL_ENSURE( xCount.is(), "### cannot query XCountable interface of service instance \"foo.Counter\"!" );
-
- if (xCount.is())
- {
- xCount->setCount( 42 );
- fprintf( stdout , "%d," , (int)xCount->getCount() );
- fprintf( stdout , "%d," , (int)xCount->increment() );
- fprintf( stdout , "%d\n" , (int)xCount->decrement() );
- }
-
- Reference< XComponent >::query( xContext )->dispose();
-
- } catch( Exception& e) {
- printf("Error: caught exception:\n %s\n",
- OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
- exit(1);
- }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/makefile.mk b/odk/examples/cpp/makefile.mk
deleted file mode 100644
index 462dba06..00000000
--- a/odk/examples/cpp/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-COUNTER_FILES=\
- $(DESTDIRCPPEXAMPLES)$/counter$/counter.cxx \
- $(DESTDIRCPPEXAMPLES)$/counter$/counter.uno.xml \
- $(DESTDIRCPPEXAMPLES)$/counter$/countermain.cxx \
- $(DESTDIRCPPEXAMPLES)$/counter$/Makefile \
- $(DESTDIRCPPEXAMPLES)$/counter$/XCountable.idl
-
-DOUCMENTLOADER_FILES=\
- $(DESTDIRCPPEXAMPLES)$/DocumentLoader$/DocumentLoader.cxx \
- $(DESTDIRCPPEXAMPLES)$/DocumentLoader$/Makefile \
- $(DESTDIRCPPEXAMPLES)$/DocumentLoader$/test.odt
-
-REMOTECLIENT_FILES=\
- $(DESTDIRCPPEXAMPLES)$/remoteclient$/Makefile \
- $(DESTDIRCPPEXAMPLES)$/remoteclient$/remoteclient.cxx \
- $(DESTDIRCPPEXAMPLES)$/remoteclient$/remoteclientsample.uno.xml
-
-DIR_FILE_LIST= \
- $(COUNTER_FILES) \
- $(DOUCMENTLOADER_FILES) \
- $(REMOTECLIENT_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/ex_cpp_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/ex_cpp_files.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
-
diff --git a/odk/examples/cpp/remoteclient/Makefile b/odk/examples/cpp/remoteclient/Makefile
deleted file mode 100644
index 97b0c3f9..00000000
--- a/odk/examples/cpp/remoteclient/Makefile
+++ /dev/null
@@ -1,155 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the C++ remoteclient example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=remoteclientsample
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-COMP_IMPL=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
-COMP_RDB_NAME = $(COMP_NAME).uno.rdb
-COMP_RDB = $(OUT_BIN)/$(COMP_RDB_NAME)
-COMP_SERVICES=$(SHAREDLIB_OUT)/remoteclientsample.rdb
-
-ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=$(URLPREFIX)$(COMP_SERVICES)
-
-OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-
-COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
-
-CXXFILES = remoteclient.cxx
-
-SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
-
-# Targets
-.PHONY: ALL
-ALL : \
- CppClientExample
-
-include $(SETTINGS)/stdtarget.mk
-
-# This example type library will be extended by the URE types
-$(OUT_BIN)/%.rdb :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(REGMERGE) $@ / $(URE_TYPES)
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-$(COMP_SERVICES) :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)com.sun.star.comp.product.example.RemoteClientSample$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)com.sun.star.bridge.example.RemoteClientSample$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
- @echo $(OSEP)/components$(CSEP) >> $@
-
-
-#CppClientExample : $(COMP_IMPL) $(COMP_ENV_FLAG)
-CppClientExample : $(COMP_IMPL) $(COMP_SERVICES)
- @echo --------------------------------------------------------------------------------
- @echo The remoteclient C++ component can be used by using the uno binary. Use the
- @echo the follwong command to start the example. The run target starts a remote
- @echo server and connect with the client to this server.
- @echo -
- @echo $(MAKE) remoteclient.run
- @echo -
- @echo NOTE: The example uses the $(QM)uno$(QM) tool to prepare a working UNO environment.
- @echo $(SQM) $(SQM)The example component is made available via -env:URE_MORE_SERVICES=...
- @echo $(SQM) $(SQM)Please check the generated $(QM)$(COMP_SERVICES)$(QM) to see how you can specify your own components in such an environment
- @echo $(SQM) $(SQM)and how to use the passive UNO registration.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(COMP_IMPL)
- @echo Start the remote server process ...
- @echo -
-ifeq "$(OS)" "WIN"
- start uno $(ENV_COMP_SERVICES) --singleaccept -s com.sun.star.io.Pipe \
- -u "uno:socket,host=localhost,port=2083;urp;MyPipe"
-else
- uno $(ENV_COMP_SERVICES) --singleaccept -s com.sun.star.io.Pipe \
- -u "uno:socket,host=localhost,port=2083;urp;MyPipe" &
- @echo waiting on the server process ...
- sleep 5
-endif
- @echo -
- @echo ... remote server process runs ...
- @echo -
- @echo Start remote client process ...
- @echo -
- uno $(ENV_COMP_SERVICES) -s com.sun.star.bridge.example.RemoteClientSample \
- -- "uno:socket,host=localhost,port=2083;urp;MyPipe"
- @echo -
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_SERVICES)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
-# -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/remoteserver.rdb))
diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx
deleted file mode 100644
index 84c83f8e..00000000
--- a/odk/examples/cpp/remoteclient/remoteclient.cxx
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#include <stdio.h>
-#include <osl/mutex.hxx>
-#include <cppuhelper/factory.hxx>
-
-#include <com/sun/star/uno/XNamingService.hpp>
-
-#include <com/sun/star/registry/XImplementationRegistration.hpp>
-
-#include <com/sun/star/connection/XConnector.hpp>
-
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-
-#include <com/sun/star/lang/XMain.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::connection;
-using namespace ::com::sun::star::bridge;
-using namespace ::com::sun::star::io;
-
-
-namespace remotebridges_officeclient {
-
-class PipeClientMain : public WeakImplHelper1< XMain >
-{
-public:
- PipeClientMain( const Reference< XMultiServiceFactory > &r ) :
- m_xSMgr( r )
- {}
-public: // Methods
-
-
- virtual sal_Int32 SAL_CALL run( const Sequence< OUString >& aArguments )
- throw(RuntimeException);
-
-
-private: // helper methods
- void testPipe( const Reference < XInterface > & rComponent );
- Reference< XMultiServiceFactory > m_xSMgr;
-};
-
-void PipeClientMain::testPipe( const Reference< XInterface > & rxInterface )
-{
- // ask for the input stream
- Reference< XInputStream > rInputStream( rxInterface, UNO_QUERY );
-
- // ask for the output stream
- Reference< XOutputStream > rOutputStream( rxInterface, UNO_QUERY );
-
- if( rInputStream.is() && rOutputStream.is() )
- {
- printf( "got inputstream and outputstream from remote process\n" );
-
- sal_Int8 a[] = { 5,4,3,2,1,0 };
- Sequence< sal_Int8 > seq( a , 6 );
- rOutputStream->writeBytes( seq );
- rOutputStream->closeOutput();
-
- Sequence< sal_Int8> seqRead;
- if( rInputStream->readBytes( seqRead ,3 ) != 3 )
- {
- printf( "error : Couldn't read the expected number of bytes\n" );
- return;
- }
-
- if( seqRead.getConstArray()[0] != 5 ||
- seqRead.getConstArray()[1] != 4 ||
- seqRead.getConstArray()[2] != 3 )
- {
- printf( "error : The array doesn't contain the expected values\n" );
- return;
- }
-
- // try to read more bytes than written
- if( rInputStream->readBytes( seqRead , 4 ) != 3 )
- {
- printf( "error : Got an unexpected number of bytes\n" );
- return;
- }
-
- if( seqRead.getConstArray()[0] != 2 ||
- seqRead.getConstArray()[1] != 1 ||
- seqRead.getConstArray()[2] != 0 )
- {
- printf( "error : The array doesn't contain the expected values\n" );
- return;
- }
-
- printf( "pipe test worked perfect\n" );
- }
- else
- {
- printf( "Couldn't get inputstream and outputstream\n" );
- }
-}
-
-
-sal_Int32 PipeClientMain::run( const Sequence< OUString > & aArguments ) throw ( RuntimeException )
-{
- printf( "Connecting ....\n" );
-
- if( aArguments.getLength() == 1 )
- {
- try {
- Reference < XInterface > r =
- m_xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) );
- Reference < XUnoUrlResolver > rResolver( r , UNO_QUERY );
-
- // connect to the remote process and retrieve the initial object
- r = rResolver->resolve( aArguments.getConstArray()[0] );
-
- if( r.is() )
- {
- printf( "got the remote initial object\n" );
- testPipe( r );
- }
- else
- {
- printf( "error : didn't get the initial object\n" );
- }
- }
- catch( ConnectionSetupException &e )
- {
- OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
- printf( "%s\n", o.pData->buffer );
- printf( "couldn't access local resource ( possible security resons )\n" );
- }
- catch( NoConnectException &e )
- {
- OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
- printf( "%s\n", o.pData->buffer );
- printf( "no server listening on the resource\n" );
- }
- catch( IllegalArgumentException &e )
- {
- OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
- printf( "%s\n", o.pData->buffer );
- printf( "uno url invalid\n" );
- }
- catch( RuntimeException & e )
- {
- OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
- printf( "%s\n", o.pData->buffer );
- printf( "a remote call was aborted\n" );
- }
- }
- else
- {
- printf( "usage: (uno remoteclient-component --) uno-url\n"
- "e.g.: uno:socket,host=localhost,port=2083;urp;MyPipe\n" );
- return 1;
- }
- return 0;
-}
-
-Reference< XInterface > SAL_CALL CreateInstance( const Reference< XMultiServiceFactory > &r)
-{
- return Reference< XInterface > ( ( OWeakObject * ) new PipeClientMain(r) );
-}
-
-Sequence< OUString > getSupportedServiceNames()
-{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.example.RemoteClientSample"));
- pNames = &seqNames;
- }
- }
- return *pNames;
-}
-
-}
-
-using namespace remotebridges_officeclient;
-#define IMPLEMENTATION_NAME "com.sun.star.comp.product.example.RemoteClientSample"
-
-
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
- void * pRet = 0;
-
- if (pServiceManager && rtl_str_compare( pImplName, IMPLEMENTATION_NAME ) == 0)
- {
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- CreateInstance, getSupportedServiceNames() ) );
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/examples.html b/odk/examples/examples.html
deleted file mode 100644
index ed666958..00000000
--- a/odk/examples/examples.html
+++ /dev/null
@@ -1,750 +0,0 @@
-<html>
-<head>
- <title>OpenOffice.org %PRODUCT_RELEASE% SDK - Examples</title>
- <link rel="stylesheet" type="text/css" href="../docs/sdk_styles.css">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="author" content="J&uuml;rgen Schmidt">
- <meta name="created" content="2004-12-14">
-</head>
-
-<body class="sdkbody"><a name="examples"/>
-<table class="table1" cellpadding=0>
- <tr style="background-image:url(../docs/images/sdk_head-2.png); backgorund-position: bottom; ">
- <td class="background" colspan="3" align="left"><img src="../docs/images/sdk_head-1.png" width="800" height="120" usemap="#Map" border="0"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing10" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td colspan="3"><img class="nothing1" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1">Examples</td>
- <td align="right"><a href="../index.html" title="link to the SDK start page"><img class="navigate" src="../docs/images/nav_home.png"></a></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="3">
- <p>The SDK provides a rich set of examples in different programming
- languages (Java, C++, OpenOffice.org %PRODUCT_RELEASE% Basic, OLE) to illustrate the use
- of the API and demonstrate how to benefit from the included word
- processor, spreadsheet, presentation software, graphics program and
- database of OpenOffice.org %PRODUCT_RELEASE%.<br>
- Some fo the examples need a running office instance listening on a
- port. If this is necessary you will get further information in the
- makefiles.</p>
- <p>Every makefile contains at least one run target to execute an
- running example, please see the makefile output in the different
- example directories. Some of the examples which create a component have
- no run target. In these cases a document is provided which instantiates
- and runs the component (see the makefile output). Also the Basic
- examples provide documents which use and shows the implemented
- functionality.</p>
- </td>
- </tr>
- <tr>
- <td><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- </table>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr valign="top">
- <td class="content3"><img src="../docs/images/arrow-1.gif"></td>
- <td><a href="DevelopersGuide/examples.html" title="link to the Developer's Guide examples overview page">Developer's Guide examples</a></td>
- <td class="content75">The <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide" title="link to the Developer's Guide in the Wiki">Developer's Guide</a> comes
- with a rich set of examples which demonstrate the use of the API in
- the different application areas.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="../docs/images/arrow-1.gif"></td>
- <td><a href="#Java_examples" title="link to the Java examples section">Java examples</a></td>
- <td class="content75">Set of simple and more complex examples which
- shows the use of the API from Java.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="../docs/images/arrow-1.gif"></td>
- <td><a href="#Cpp_examples" title="link to the C++ examples section">C++ examples</a></td>
- <td class="content75">Small set of examples which shows the use of
- the API from C++.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="../docs/images/arrow-1.gif"></td>
- <td><a href="#Basic_examples" title="link to the OpenOffice.org %PRODUCT_RELEASE% Basic examples section">OpenOffice.org %PRODUCT_RELEASE% Basic examples</a></td>
- <td class="content75">Small set of examples which shows the use of
- the API from OpenOffice.org %PRODUCT_RELEASE% Basic.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="../docs/images/arrow-1.gif"></td>
- <td><a href="#OLE_examples" title="link to the OLE examples section">Object Linking and Embedding (OLE) examples</a></td>
- <td class="content75">Examples which show the use of the API from
- OLE.</td>
- </tr>
- <tr valign="top">
- <td class="content3"><img src="../docs/images/arrow-1.gif"></td>
- <td><a href="#CLI_examples" title="link to the CLI examples section">Common Language Infrastructure (CLI) examples</a></td>
- <td class="content75">Examples which show the use of the API from
- the CLI.</td>
- </tr>
- </table>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1"><a name="Java_examples">Java examples</td>
- <td align="right">
- <a href="#examples" title="link to the examples overview"><img class="navigate" src="../docs/images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="../docs/images/nav_home.png"></a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Text Document Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">BookmarkInsertion</a></td>
- <td class="cell80">This application connects to the office server and
- gets the <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. An empty text document will be opened
- and an example text will be entered. Afterwards, some bookmarks will be
- inserted.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">HardFormatting</a></td>
- <td class="cell80">This program connects to the office server and gets
- the <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. Furthermore, an empty text document will be
- opened, an example text will be entered, some text attributes will be
- inspected, and the <a href="../docs/common/ref/com/sun/star/beans/PropertyState.html" title="link into the IDL reference to the enum com.sun.star.beans.PropertyState"> PropertyState</a> will be checked from the selection.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">SWriter</a></td>
- <td class="cell80">The program connects to the office server and gets the
- <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. An empty text document will be created, some
- text will be entered, and a text table, a colored text, and text frame
- will be inserted.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">StyleCreation</a></td>
- <td class="cell80">The example connects to the office server and gets the
- <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. An empty text document will be opened, a new
- paragraph style will be created, and applied.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">StyleInitialization</a></td>
- <td class="cell80">The program connects to the office server and gets the
- <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. Thereafter, an empty text document will be
- opened and an example text will be entered. The paragraph collection will
- be used, in order to apply a different paragraph style on the
- paragraphs.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">TextDocumentStructure</a></td>
- <td class="cell80">The application connects to the office server and gets
- the <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. An empty text document will be opened, an
- enumeration of all paragraphs and an enumeration of all text portions
- will be created.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">TextReplace</a></td>
- <td class="cell80">The example connects to the office server and gets the
- <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. An empty text document will be created, an
- example text will be inserted, and some English spelled words will be
- replaced with US spelled words.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">GraphicsInserter</a></td>
- <td class="cell80">The GraphicsInserter creates a graphics object on an
- empty text document by setting its position, width, height, and URL.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Text/" title="link to the source directory of the Java Text examples">WriterSelector</a></td>
- <td class="cell80">This class gives you information on the selected
- objects (text range, text frame, or graphics) at an OpenOffice.org
- Server.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Spreadsheet Document Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Spreadsheet/" title="link to the source directory of the Java Spreadsheet examples">CalcAddins</a></td>
- <td class="cell80">This component adds new functions to the spreadsheet
- application. After registering the component, the inserted functions can
- be found with help of the functions autopilot. The new functions are
- assigned to the category <i>Add-in</i>.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Spreadsheet/" title="link to the source directory of the Java Spreadsheet examples">ChartTypeChange</a></td>
- <td class="cell80">This class loads an OpenOffice.org %PRODUCT_RELEASE% Calc document and
- changes the type of the embedded chart.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Spreadsheet/" title="link to the source directory of the Java Spreadsheet examples">EuroAdaption</a></td>
- <td class="cell80">The application connects to the office server and gets
- the <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>, opens an empty Calc document, enters an
- example text, sets the number format to DM, changes the number format to
- EUR (Euro), and uses the DM/EUR factor on each cell with content.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Spreadsheet/" title="link to the source directory of the Java Spreadsheet examples">SCalc</a></td>
- <td class="cell80">The program connects to the office server and gets the
- <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. Then an empty calc document will be opened,
- cell styles will be created, some data will be inserted into the sheets,
- and the created cell styles will be applied. Finally, a 3D chart will be
- inserted.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Drawing Document Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/Drawing/" title="link to the source directory of the Java Drawing examples">SDraw</a></td>
- <td class="cell80">This program connects to the office server and gets
- the <a href="../docs/common/ref/com/sun/star/lang/XMultiComponentFactory.html" title="link into the IDL reference to the interface com.sun.star.lang.XMultiComponentFactory"> multi component factory</a>. Afterwards, an empty text document will
- be created and some shapes will be inserted on the draw page.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Document Handling Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/DocumentHandling/" title="link to the source directory of the Java DocumentHandling examples">DocumentConverter</a></td>
- <td class="cell80">The program offers a service that converts arbitrary
- documents to a favored document type.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/DocumentHandling/" title="link to the source directory of the Java DocumentHandling examples">DocumentLoader</a></td>
- <td class="cell80">The <i>DocumentLoader</i> can open a new or an
- existing document.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/DocumentHandling/"title="link to the source directory of the Java DocumentHandling examples">DocumentPrinter</a></td>
- <td class="cell80">The <i>DocumentPrinter</i> allows you to print the
- favored pages of a specified document on your favored printer.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/DocumentHandling/" title="link to the source directory of the Java DocumentHandling examples">DocumentSaver</a></td>
- <td class="cell80">The DocumentSaver shows how to save a document and
- how you can change the type of your document.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">UNO Component Examples</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="http://wiki.services.openoffice.org/wiki/Object_Inspector" title="link to the Object Inspector project page in the wiki">Object Inspector</a></td>
- <td class="cell80">The Object Inspector is primarily an auxiliary tool
- for the developer, which can present information about an object of the
- OpenOffice.org %PRODUCT_RELEASE% API at run-time. Depending on the object to be inspected,
- appropriate methods, interfaces, services, and attributes can be displayed
- to the developer. The methods, interfaces, services and attributes are
- represented in a predictable tree. If the attributes contained in an
- object are to be examined, the appropriate nodes in the tree can be
- expanded with the help of the mouse. For each non primitive object, five
- categories are offered to the user, as long as those are available with
- that object. The Object Inspector is currently available as a NetBeans project
- only because of major code changes. Please see the <a href="http://wiki.services.openoffice.org/wiki/Object_Inspector" title="link to the Object Inspector project page in the wiki">project page</a> for further details.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/MinimalComponent/" title="link to the source directory of the Java MinimalComponent example">MinimalComponent</a></td>
- <td class="cell80">This class provides a minimal UNO component. You can
- take this class as a base for your own components. By extensions of this
- class it is possible to also extend the function range of the Office.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/PropertySet/" title="link to the source directory of the Java PropertySet example">PropTest</a></td>
- <td class="cell80">Contains a component that provides property set
- interfaces by means of inheriting <a href="../docs/java/ref/com/sun/star/lib/uno/helper/PropertySet.html" title="link into the Java UNO reference to the PropertySet helper class">com.sun.star.lib.uno.helper.ProperterSet</a>.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/ToDo/" title="link to the source directory of the Java ToDo example">ToDo</a></td>
- <td class="cell80">For every to-do listed in a spreadsheet document, this
- component calculates the start date, day of week of the start date, the
- end date, and the day of week of the end date. All calculations are
- dependent upon the values of &quot;Needed Days&quot;, &quot;Due Date&quot;
- and &quot;Status&quot;. The columns &quot;Needed Days&quot; and
- &quot;Status&quot; are mandatory. The first to-do should be placed in
- row nine. The date to start the calculation should be placed in cell C6.
- The private holidays should be placed in cell K4/K5 and below.<br>
- All rows will be calculated up to the first empty cell in the first
- column. If a cell in the column &quot;Due Date&quot; is colored red,
- you should take a look at your entries.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="java/EmbedDocument/EmbeddedObject" title="link to the source directory of the Java EmbeddedObject example">EmbeddedObject</a></td>
- <td class="cell80">Contains a component that provides an example of embedded object implementation.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="3">
- <p>Additional information:</p>
- <p>
- <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Simple_Component_in_Java" title="link to the &quot;Simple component in Java&quot; chapter in the Developer's Guide">How to write a UNO component in Java</a><br>
- <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Java_Language_Binding" title="link to the &quot;Java UNO Language Bnding&quot; chapter in the Developer's Guide">Java UNO Language Binding</a><br>
- <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Debugging" title="link to the &quot;Debugging Java components&quot; chapter in the Developer's Guide">Debugging Java components</a><br>
- </p>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1"><a name="Cpp_examples">C++ examples</td>
- <td align="right">
- <a href="#examples" title="link to the examples overview"><img class="navigate" src="../docs/images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="../docs/images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- The DocumentLoader example needs a running office server, before
- running this program you should invoke the office with the following
- command:
- <blockquote>
- <code>soffice &quot;-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager&quot;</code>
- </blockquote>
- You can also customize the mentioned host and port to your needs.
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="cpp/DocumentLoader/"title="link to the source directory of the C++ DocumentLoader example">DocumentLoader</a></td>
- <td class="cell80">This component works the same as the appropriate Java
- example, but is implemented in C++.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="cpp/counter/" title="link to the source directory of the C++ counter example">Counter</a></td>
- <td class="cell80">This demo shows how to implement a very simple UNO
- component and how to access the UNO component from an executable.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="cpp/remoteclient/" title="link to the source directory of the C++ remoteclient example">Remote client</a></td>
- <td class="cell80">The 'uno' program is used to export an arbitrary
- service to other processes. In this example the com.sun.star.uno.Pipe
- service (which is built in io-module) is exported. The client component
- implements the <a href="../docs/common/ref/com/sun/star/lang/XMain.html" title="link into the IDL reference to the interface com.sun.star.lang.XMain">
- com.sun.star.lang.XMain</a> interface. In the run method, it connects to
- the servers process and retrieves an instance and does some calls on the
- instance.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="cpp/complextoolbarcontrols/" title="link to the source directory of the C++ complextoolbarcontrols example">complextoolbarcontrols</a></td>
- <td class="cell80">This example shows how to create a toolbar add-on with complex toolbar controls.
- It shows how to use an Image Button, a Combo Box, a Spin Field, an Edit Field, a Dropdown Box, a Toggle Dropdown Button and a normal Dropdown Button</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="3">
- <p>Additional information:</p>
- <p>
- <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/C%2B%2B_Component" title="link to the &quot;How to write a UNO component in C++&quot; chapter in the Developer's Guide">How to write a UNO component in C++</a><br>
- <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/C%2B%2B_Language_Binding" title="link to the &quot;C++ UNO Language Binding&quot; chapter in the Developer's Guide">C++ UNO Language Binding</a><br>
- <a href="../docs/cpp/ref/index.html" title="link to the C++ API reference">C++ reference</a>
- </p>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1"><a name="Basic_examples">OpenOffice.org %PRODUCT_RELEASE% Basic examples</td>
- <td align="right">
- <a href="#examples" title="link to the examples overview"><img class="navigate" src="../docs/images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="../docs/images/nav_home.png"></a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>The example programs are embedded in OpenOffice.org %PRODUCT_RELEASE% documents in the
- samples directory. To view or edit the OpenOffice.org %PRODUCT_RELEASE% Basic source,
- select the appropriate document and then select Tools-&gt;Macro.</p>
- <p>Most of the examples are stand-alone, but two of them (Creating an
- Index and Import/Export of ASCII Files) have an associated data file
- identified by a .txt file name suffix).</p>
- <p>Some of the examples are also available in Java, you can find them in
- the <a href="#Java_examples" title="link to the Java examples section">
- Java section</a>.</p>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/text/modifying_text_automatically/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic text/modifying_text_automatically examples">Changing Appearance</a></td>
- <td class="cell80"> To change the style used for certain words, you can
- start with the following example. This code searches for the regular
- expression <code>the[a-z]</code>, which stands for the text portion the
- followed by exactly one lowercase letter. All occurrences of these four
- letters are then changed to bold characters. The same happens in the next
- part of the program, this time changing the appearance of
- <code>all[a-z]</code> to italic. In order for this example to work, you
- must execute it from an open text document.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/text/modifying_text_automatically/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic text/modifying_text_automatically examples">Replacing Text</a></td>
- <td class="cell80">If you regularly receive documents from other people
- for editing, you might want to make sure that certain words are always
- written the same. The next example illustrates this by forcing certain
- words to be spelled in American English.<br>
- In order for this example to work, you must execute it from an open text
- document. For a real world application, it is a good idea to read the
- words from an external file.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/text/modifying_text_automatically/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic text/modifying_text_automatically examples">Using Regular Expressions</a></td>
- <td class="cell80">Another application of automatic text modification is
- related to stylistic questions. Suppose your company&#146;s policy is to
- avoid the use of certain words. You want to replace these words, but you
- cannot do that automatically because you have to find the appropriate
- replacement, which depends on the context. So instead of deleting or
- replacing the offending words automatically, you change their color to
- make them stand out during a subsequent manual review process.<br>
- The following example handles two kinds of unwanted wordings: those
- which are absolutely forbidden and must be replaced by something else,
- and those which are considered bad style. A subroutine is responsible
- for the changes. It can be used to make all words in a list appear in a
- certain color in the text document. To keep the lists short, we use
- regular expressions which provide for the variants of the words
- (plural, adjective etc.).</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/text/modifying_text_automatically/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic text/modifying_text_automatically examples">Inserting Bookmarks</a></td>
- <td class="cell80">
- <p>The next example does something very similar. This time, however, we
- do not change the color of the words but insert a bookmark at each of
- them. You can thus use the StarOffice navigator to jump directly from
- word to word. Bookmarks must first be created using
- <code>createInstance()</code>. They are then inserted with
- <code>insertTextContent()</code> at the current text range.</p>
- <p>The main difference to the preceding example is the For loop in
- <code>markList()</code>. Instead of changing the color of the current
- word, it creates a new bookmark, oBookmark, whose name is the current
- word with an integer appended. It then inserts this bookmark at the
- word.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/text/creating_an_index/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic text/create_index example">Creating an Index</a></td>
- <td class="cell80">Indices for text documents can be created manually in
- OpenOffice.org %PRODUCT_RELEASE% Writer by clicking on the words that should appear in the
- index. If the document is large, or if you have to generate indices for
- several documents, this task should be automated.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/sheet/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic sheet example">Adapting to Euroland</a></td>
- <td class="cell80">Most of the members of the European Union will abandon
- their old currency in favor of the new Euro in 2001. This requires
- modifications to all programs using the old currencies. Since the exchange
- rates for the old currencies have been fixed at the end of 1999, one can
- already convert old data. The following program does this for all values
- in a table that are formatted with the currency string DM.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/drawing/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic drawing example">Import/Export of ASCII Files</a></td>
- <td class="cell80">You can use the drawing facilities of StarOffice API
- to generate a picture from ASCII input. One application would be a
- hierarchical representation of a directory listing, based on textual
- data.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/stock_quotes_updater/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic stock_quotes_updater example">Stock Quotes Updater</a></td>
- <td class="cell80">If you want to display stock charts for certain
- companies, you can open up your browser every day, go to a search engine,
- look up the quote and copy it by hand into a table. Or you can use a
- program that does all this automatically. The following example relies on
- the sheet module. It uses URLs to obtain the current stock quotes. The
- quotes are displayed in sheets, one for each company. We show a line
- diagram and the numerical values for this company on every sheet. The
- functionality is hidden in the three subroutines <code>GetValue()</code>,
- <code>UpdateValue()</code>, and <code>UpdateChart()</code>.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="basic/forms_and_controls/" title="link to the source directory of the OpenOffice.org %PRODUCT_RELEASE% Basic forms_and_controls example">Forms and Controls</a></td>
- <td class="cell80">The example document Burger Factory offers some forms
- and controls, which you can use to order your desired burger type,
- beverage, topping, and sauce. By hitting the button
- &quot;Order now!&quot;, your order will be placed.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="3">
- Additional information: <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Basic/OpenOffice.org_Basic" title="link to the &quot;OpenOffice.org %PRODUCT_RELEASE% Basic language binding&quot; chapter in the Developer's Guide">OpenOffice.org %PRODUCT_RELEASE% Basic language binding</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1"><a name="OLE_examples">Object Linking and Embedding (OLE) examples</td>
- <td align="right">
- <a href="#examples" title="link to the examples overview"><img class="navigate" src="../docs/images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="../docs/images/nav_home.png"></a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="OLE/activex/" title="link to the source directory of the activex plugin example using the OLE bridge">ActiveX Control</a></td>
- <td class="cell80">The ActiveX control shows an example of access to UNO
- through COM technology. It requires a properly installed StarOffice
- version 6.0 or OpenOffice 1.0 or newer. This is a Lite ActiveX control
- so it can be used only in containers that allow the use of such controls.
- It can be activated with an &lt;OBJECT&gt; tag from a html-page to embed
- a document. Without any parameters a new writer document will be opened
- for editing. For more details please see the <a href="OLE/activex/README.txt" title="link to the README file of the activex example">README</a>.<br>
- Note: This example works only under windows and if you don't use the MS
- .Net C++ compiler please check the makefile and take notice of the
- comments.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="OLE/vbscript/" title="link to the source directory of the VBScript example using the OLE bridge">WriterDemo</a></td>
- <td class="cell80">This Visual Basic Script creates an empty text
- document and inserts text, a table, and a text frame.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="3">
- Additional information: <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Automation_Bridge" title="link to the &quot;Automation Language Binding&quot; chapter in the Developer's Guide">Automation Language Binding</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- <td>
- <table class="table2">
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="2" class="head1"><a name="CLI_examples">Common Language Infrastructure (CLI) examples</td>
- <td align="right">
- <a href="#examples" title="link to the examples overview"><img class="navigate" src="../docs/images/nav_up.png"></a>
- <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="../docs/images/nav_home.png"></a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table4">
- <tbody>
- <tr class="thead">
- <td class="cell20">Example</td>
- <td class="cell80">Description</td>
- </tr>
- <tr>
- <td class="cell20"><a href="CLI/CSharp/Spreadsheet/" title="link to the source directory of the Spreadsheet example using the CLI-UNO bridge">Spreadsheet Example</a></td>
- <td class="cell80">This example is written in C# and shows how Spreadsheet
- documents are created and filled with content. This example actually
- consists of three separate executables, SpreadsheetSample.exe,
- GeneralTableSample.exe, ViewSample.exe.</td>
- </tr>
- <tr>
- <td class="cell20"><a href="CLI/VB.NET/WriterDemo/" title="link to the source directory of the WriterDeom example using the CLI-UNO bridge">WriterDemo</a></td>
- <td class="cell80">This example is written in VB.NET. It creates a text
- document and inserts text, a table, and a text frame.</td>
- </tr>
- <tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table class="table3">
- <tr>
- <td colspan="3">
- Additional information: <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/CLI/CLI_Language_Binding" title="link to the &quot;CLI-UNO Language Binding&quot; chapter in the Developer's Guide">CLI-UNO Language Binding</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td class="content1"><img class="nothing8" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing30" src="../docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="../docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td colspan="3">
- <div class="centertext">
- <p><img class="oraclelogo" src="../docs/images/odk-footer-logo.gif" title="Sponsored by Oracle" alt="Oracle Logo" />
- Copyright &copy; 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.<p>
- </div>
- </td>
- </tr>
-</table>
-<map name="Map">
- <area shape="rect" coords="10,68,93,105" href="http://www.oracle.com">
-</map>
-</body>
-</html>
diff --git a/odk/examples/java/ConverterServlet/ConverterServlet.html b/odk/examples/java/ConverterServlet/ConverterServlet.html
deleted file mode 100644
index 7c68ce8b..00000000
--- a/odk/examples/java/ConverterServlet/ConverterServlet.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html><head><title>Document Converter
-</title></head><body>
-<h1>Document Converter</h1>
-<p>Converting documents with a remote running OpenOffice.org.</p>
-<form action="http://localhost:8080/conversion/servlet/ConverterServlet" method=post enctype="multipart/form-data">
- <table width="510" border="0">
- <tr>
- <td>Local document</td>
- <td>
- <input type=file size=50 maxlength=100000 name="DocumentToBeConverted">
- </td>
- </tr>
- <tr>
- <td>Target document type</td>
- <td>
- <select name="converttype">
- <option selected>swriter: StarOffice XML (Writer)</option>
- <option>swriter: HTML (StarWriter)</option>
- <option>swriter: MS Word 97</option>
- <option>swriter: Text</option>
- <option>scalc: StarOffice XML (Calc)</option>
- <option>scalc: HTML (StarCalc)</option>
- <option>scalc: MS Excel 97</option>
- <option>sdraw: StarOffice XML (Draw)</option>
- <option>simpress: StarOffice XML (Impress)</option>
- <option>simpress: MS PowerPoint 97</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>Extension</td>
- <td>
- <input type=text name="extension">
- </td>
- </tr>
- </table>
- <p>The converted document will be returned by the server. If you selected the
- target document type &quot;swriter: HTML (StarWriter)&quot; or &quot;scalc:
- HTML (StarCalc)&quot;, the document will be shown in the browser. If have an application
- registered in your browser for the selected document type (mime type) the application will be started.
- Otherwise, a dialog will be opened, which allows you to open or save the converted document.</p>
- <p>
- <input type=submit value="Convert">
- </p>
-</form>
-</body></html>
diff --git a/odk/examples/java/ConverterServlet/ConverterServlet.java b/odk/examples/java/ConverterServlet/ConverterServlet.java
deleted file mode 100644
index 281b47db..00000000
--- a/odk/examples/java/ConverterServlet/ConverterServlet.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// JDK API
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.Enumeration;
-
-// Servlet API
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletOutputStream;
-
-// Helper API
-import com.oreilly.servlet.MultipartRequest;
-import com.oreilly.servlet.MultipartResponse;
-import com.oreilly.servlet.ServletUtils;
-
-// UNO API
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XStorable;
-import com.sun.star.util.XCloseable;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-
-
-/** This class implements a http servlet in order to convert an incoming document
- * with help of a running OpenOffice.org and to push the converted file back
- * to the client.
- */
-public class ConverterServlet extends HttpServlet {
- /** Specifies the temporary directory on the web server.
- */
- private String stringWorkingDirectory =
- System.getProperty( "java.io.tmpdir" ).replace( '\\', '/' );
-
- /** Specifies the host for the office server.
- */
- private String stringHost = "localhost";
-
- /** Specifies the port for the office server.
- */
- private String stringPort = "2083";
-
- /** Called by the server (via the service method) to allow a servlet to handle
- * a POST request. The file from the client will be uploaded to the web server
- * and converted on the web server and after all pushed to the client.
- * @param request Object that contains the request the client has made of the servlet.
- * @param response Object that contains the response the servlet sends to the client.
- * @throws ServletException If the request for the POST could not be handled.
- * @throws IOException If an input or output error is detected when the servlet handles the request.
- */
- protected void doPost( HttpServletRequest request,
- HttpServletResponse response) throws ServletException, java.io.IOException {
- try {
- // If necessary, add a slash to the end of the string.
- if ( !stringWorkingDirectory.endsWith( "/" ) ) {
- stringWorkingDirectory += "/";
- }
-
- // Construct a MultipartRequest to help read the information.
- // Pass in the request, a directory to save files to, and the
- // maximum POST size we should attempt to handle.
- MultipartRequest multipartrequest =
- new MultipartRequest( request, stringWorkingDirectory, 5 * 1024 * 1024 );
-
- // Getting all file names from the request
- Enumeration files = multipartrequest.getFileNames();
-
- // Every received file will be converted to the specified type
- while (files.hasMoreElements()) {
- // Getting the name from the element
- String stringName = (String)files.nextElement();
-
- // Getting the filename from the request
- String stringFilename =
- multipartrequest.getFilesystemName( stringName );
-
- // Converting the given file on the server to the specified type and
- // append a special extension
- File cleanupFile = null;
- String stringSourceFile = stringWorkingDirectory + stringFilename;
-
- try {
- String stringConvertedFile = convertDocument(stringSourceFile,
- multipartrequest.getParameter( "converttype" ),
- multipartrequest.getParameter( "extension" ));
-
- String shortFileName = stringConvertedFile.substring(
- stringConvertedFile.lastIndexOf('/') + 1);
-
- // Set the response header
- // Set the filename, is used when the file will be saved (problem with mozilla)
- response.addHeader( "Content-Disposition",
- "attachment; filename=" + shortFileName);
-
- // Constructing the multi part response to the client
- MultipartResponse multipartresponse = new MultipartResponse(response);
-
- // Is the convert type HTML?
- if ( ( multipartrequest.getParameter( "converttype" ).equals(
- "swriter: HTML (StarWriter)" ) )
- || ( multipartrequest.getParameter( "converttype" ).equals(
- "scalc: HTML (StarCalc)" ) ) ) {
- // Setting the content type of the response being sent to the client
- // to text
- multipartresponse.startResponse( "text/html" );
- } else {
- // Setting the content type of the response being sent to the client
- // to application/octet-stream so that file will open a dialog box
- // at the client in order to save the converted file
- multipartresponse.startResponse( "application/octet-stream" );
- }
-
- // Pushing the converted file to the client
- ServletUtils.returnFile( stringConvertedFile,
- response.getOutputStream() );
-
- // Finishing the multi part response
- multipartresponse.finish();
-
- // clean up the working directory
- cleanupFile = new File(stringConvertedFile);
- if ( cleanupFile.exists() )
- cleanupFile.delete();
-
- } catch (Exception exc) {
- response.setContentType( "text/html;charset=8859-1" );
- PrintWriter out = response.getWriter();
-
- exc.printStackTrace();
-
- out.println( "<html><head>" );
- out.println( " <title>" + "SDK Converter Servlet" + "</title>" );
- out.println( "</head>" );
- out.println( "<body><br><p>");
- out.println( "<b>Sorry, the conversion failed!</b></p>");
- out.println( "<p><b>Error Mesage:</b><br>" + exc.getMessage() + "<br>");
- exc.printStackTrace(out);
- out.println( "</p></body><html>");
- }
-
- // clean up the working directory
- cleanupFile = new File(stringSourceFile);
- if ( cleanupFile.exists() )
- cleanupFile.delete();
- }
- }
- catch (Exception exception) {
- System.err.println( exception.toString() );
- }
- }
-
- /** This method converts a document to a given type by using a running
- * OpenOffice.org and saves the converted document to the specified
- * working directory.
- * @param stringDocumentName The full path name of the file on the server to be converted.
- * @param stringConvertType Type to convert to.
- * @param stringExtension This string will be appended to the file name of the converted file.
- * @return The full path name of the converted file will be returned.
- * @see stringWorkingDirectory
- */
- private String convertDocument( String stringDocumentName,
- String stringConvertType,
- String stringExtension)
- throws Exception
- {
- String stringConvertedFile = "";
-
- // Converting the document to the favoured type
-// try {
- // Composing the URL
- String stringUrl = "file:///" + stringDocumentName;
-
- /* Bootstraps a component context with the jurt base components
- registered. Component context to be granted to a component for running.
- Arbitrary values can be retrieved from the context. */
- XComponentContext xcomponentcontext =
- com.sun.star.comp.helper.Bootstrap.createInitialComponentContext( null );
-
- /* Gets the service manager instance to be used (or null). This method has
- been added for convenience, because the service manager is a often used
- object. */
- XMultiComponentFactory xmulticomponentfactory =
- xcomponentcontext.getServiceManager();
-
- /* Creates an instance of the component UnoUrlResolver which
- supports the services specified by the factory. */
- Object objectUrlResolver =
- xmulticomponentfactory.createInstanceWithContext(
- "com.sun.star.bridge.UnoUrlResolver", xcomponentcontext );
-
- // Create a new url resolver
- XUnoUrlResolver xurlresolver = ( XUnoUrlResolver )
- UnoRuntime.queryInterface( XUnoUrlResolver.class,
- objectUrlResolver );
-
- // Resolves an object that is specified as follow:
- // uno:<connection description>;<protocol description>;<initial object name>
- Object objectInitial = xurlresolver.resolve(
- "uno:socket,host=" + stringHost + ",port=" + stringPort +
- ";urp;StarOffice.ServiceManager" );
-
- // Create a service manager from the initial object
- xmulticomponentfactory = ( XMultiComponentFactory )
- UnoRuntime.queryInterface( XMultiComponentFactory.class, objectInitial );
-
- // Query for the XPropertySet interface.
- XPropertySet xpropertysetMultiComponentFactory = ( XPropertySet )
- UnoRuntime.queryInterface( XPropertySet.class, xmulticomponentfactory );
-
- // Get the default context from the office server.
- Object objectDefaultContext =
- xpropertysetMultiComponentFactory.getPropertyValue( "DefaultContext" );
-
- // Query for the interface XComponentContext.
- xcomponentcontext = ( XComponentContext ) UnoRuntime.queryInterface(
- XComponentContext.class, objectDefaultContext );
-
- /* A desktop environment contains tasks with one or more
- frames in which components can be loaded. Desktop is the
- environment for components which can instanciate within
- frames. */
- XComponentLoader xcomponentloader = ( XComponentLoader )
- UnoRuntime.queryInterface( XComponentLoader.class,
- xmulticomponentfactory.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xcomponentcontext ) );
-
- // Preparing properties for loading the document
- PropertyValue propertyvalue[] = new PropertyValue[ 1 ];
- // Setting the flag for hidding the open document
- propertyvalue[ 0 ] = new PropertyValue();
- propertyvalue[ 0 ].Name = "Hidden";
- propertyvalue[ 0 ].Value = new Boolean(true);
-
- // Loading the wanted document
- Object objectDocumentToStore =
- xcomponentloader.loadComponentFromURL(
- stringUrl, "_blank", 0, propertyvalue );
-
- // Getting an object that will offer a simple way to store a document to a URL.
- XStorable xstorable =
- ( XStorable ) UnoRuntime.queryInterface( XStorable.class,
- objectDocumentToStore );
-
- // Preparing properties for converting the document
- propertyvalue = new PropertyValue[ 2 ];
- // Setting the flag for overwriting
- propertyvalue[ 0 ] = new PropertyValue();
- propertyvalue[ 0 ].Name = "Overwrite";
- propertyvalue[ 0 ].Value = new Boolean(true);
- // Setting the filter name
- propertyvalue[ 1 ] = new PropertyValue();
- propertyvalue[ 1 ].Name = "FilterName";
- propertyvalue[ 1 ].Value = stringConvertType;
-
- // Appending the favoured extension to the origin document name
- int index = stringUrl.lastIndexOf('.');
- if ( index >= 0 ) {
- stringConvertedFile = stringUrl.substring(0, index) + "." + stringExtension;
- } else {
- stringConvertedFile = stringUrl + "." + stringExtension;
- }
-
- // Storing and converting the document
- xstorable.storeAsURL( stringConvertedFile, propertyvalue );
-
- XCloseable xcloseable = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,xstorable );
-
- // Closing the converted document
- if ( xcloseable != null )
- xcloseable.close(false);
- else {
- // If Xcloseable is not supported (older versions,
- // use dispose() for closing the document
- XComponent xComponent = ( XComponent ) UnoRuntime.queryInterface(
- XComponent.class, xstorable );
- xComponent.dispose();
- }
-
-// }
-// catch( Exception exception ) {
-// exception.printStackTrace();
-// return( "" );
-// }
-
- if ( stringConvertedFile.startsWith( "file:///" ) ) {
- // Truncating the beginning of the file name
- stringConvertedFile = stringConvertedFile.substring( 8 );
- }
-
- // Returning the name of the converted file
- return stringConvertedFile;
- }
-}
diff --git a/odk/examples/java/ConverterServlet/Makefile b/odk/examples/java/ConverterServlet/Makefile
deleted file mode 100644
index 8c1828ce..00000000
--- a/odk/examples/java/ConverterServlet/Makefile
+++ /dev/null
@@ -1,94 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java ConverterServlet example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=ConverterServletExample
-OUT_COMP_CLASS=$(OUT_CLASS)/$(COMPONENT_NAME)
-
-JAVAFILES = \
- ConverterServlet.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/cos.jar\
- $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/servlet.jar\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- ConverterServletExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OFFICE_CLASSES_DIR)/cos.jar :
- @echo --------------------------------------------------------------------------------
- @echo You need the servlet support Java archive "$(QM)cos.jar$(QM)" for this example.
- @echo You can download it from "$(QM)http://www.servlets.com/cos/index.html$(QM)"
- @echo and then please copy it into your "$(QM)$(OFFICE_CLASSES_DIR)$(QM)" directory.
- @echo --------------------------------------------------------------------------------
-
-$(OFFICE_CLASSES_DIR)/servlet.jar :
- @echo --------------------------------------------------------------------------------
- @echo You need the servlet API "$(QM)servlet.jar$(QM)" for this example.
- @echo You can download it from "$(QM)http://java.sun.com/products/servlet/index.html$(QM)"
- @echo and then please copy it into your "$(QM)$(OFFICE_CLASSES_DIR)$(QM)" directory.
- @echo --------------------------------------------------------------------------------
-
-$(CLASSFILES) : $(JAVAFILES) $(OFFICE_CLASSES_DIR)/cos.jar $(OFFICE_CLASSES_DIR)/servlet.jar
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-ConverterServletExample : $(CLASSFILES)
- @echo --------------------------------------------------------------------------------
- @echo Please see the README file for more information how to use the converter
- @echo servlet.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $(JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
diff --git a/odk/examples/java/ConverterServlet/README b/odk/examples/java/ConverterServlet/README
deleted file mode 100644
index ea59b80b..00000000
--- a/odk/examples/java/ConverterServlet/README
+++ /dev/null
@@ -1,38 +0,0 @@
-Servlet for converting documents
-================================
-
-Build preparation:
-==================
-In the file "ConverterServlet.html", search for the following line:
-<form action="http://localhost:8080/conversion/servlet/ConverterServlet" method=post enctype="multipart/form-data">
-Replace the existing IP address (localhost) with your intended IP address.
-
-Installation instructions:
-==========================
-1. If no web server is available you should install your favourite web server.
- The example was tested with a Tomcat 4.1 server (http://jakarta.apache.org/tomcat/)
-2. Download the servlet support Java archive (cos.jar) from
- http://www.servlets.com/cos/index.html and copy the file to the directory
- <OFFICE_HOME>/program/classes. If you don't use the created WAR (WAR = simple web archive file, it
- is similar to a normal Jar file) file, please make these classes also known to your web server.
-3. You need also the Servlet API (servlet.jar). The Tomcat server comes with this Servlet API. Please
- copy the file "servlet.jar" to the directory <OFFICE_HOME>/program/classes.
- If you don't use the Tomcat server, make sure that the Servlet API is in the classpath of your web
- server. You can download the Servlet API from http://java.sun.com/products/servlet/index.html .
-4. Use your GNU make (http://www.gnu.org) to build the servlet class.
-5. Make the servlet class known to your web server.
- The example creates also a WAR file which can be easy deployed in a Tomcat server.
- 5.1 Browse the 'Tomcat Web Application Manager'
- 5.2 Navigate into the section 'Upload a WAR file to install'
- 5.3 Browse to your generated WAR file and select it
- 5.4 install it
-
-
-Converting documents with the servlet:
-======================================
-1. Browse your web server "http://<your_ip>/conversion/ConverterServlet.html" or
- open the file "ConverterServlet.html" in your web browser and select a file.
-2. Select a type to convert the file to, and the extension for the converted file.
-3. Press the button. The document will be uploaded to the server, converted and
- pushed back to the client. Your browser will open a dialog for saving the
- converted document.
diff --git a/odk/examples/java/ConverterServlet/web.xml b/odk/examples/java/ConverterServlet/web.xml
deleted file mode 100644
index 9bef5ff9..00000000
--- a/odk/examples/java/ConverterServlet/web.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
- <display-name>Conversion</display-name>
- <description>
- Converter servlet demo of the SDK.
- </description>
-
- <servlet>
- <servlet-name>ConverterServlet</servlet-name>
- <servlet-class>ConverterServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ConverterServlet</servlet-name>
- <url-pattern>/servlet/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
diff --git a/odk/examples/java/DocumentHandling/DocumentConverter.java b/odk/examples/java/DocumentHandling/DocumentConverter.java
deleted file mode 100644
index 97d40793..00000000
--- a/odk/examples/java/DocumentHandling/DocumentConverter.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.io.File;
-import java.io.FileFilter;
-
-
-/** The class <CODE>DocumentConverter</CODE> allows you to convert all documents
- * in a given directory and in its subdirectories to a given type. A converted
- * document will be created in the same directory as the origin document.
- *
- */
-public class DocumentConverter {
- /** Containing the loaded documents
- */
- static com.sun.star.frame.XComponentLoader xCompLoader = null;
- /** Containing the given type to convert to
- */
- static String sConvertType = "";
- /** Containing the given extension
- */
- static String sExtension = "";
- /** Containing the current file or directory
- */
- static String sIndent = "";
- /** Containing the directory where the converted files are saved
- */
- static String sOutputDir = "";
-
- /** Traversing the given directory recursively and converting their files to
- * the favoured type if possible
- * @param fileDirectory Containing the directory
- */
- static void traverse( File fileDirectory ) {
- // Testing, if the file is a directory, and if so, it throws an exception
- if ( !fileDirectory.isDirectory() ) {
- throw new IllegalArgumentException(
- "not a directory: " + fileDirectory.getName()
- );
- }
-
- // Prepare Url for the output directory
- File outdir = new File(DocumentConverter.sOutputDir);
- String sOutUrl = "file:///" + outdir.getAbsolutePath().replace( '\\', '/' );
-
- System.out.println("\nThe converted documents will stored in \""
- + outdir.getPath() + "!");
-
- System.out.println(sIndent + "[" + fileDirectory.getName() + "]");
- sIndent += " ";
-
- // Getting all files and directories in the current directory
- File[] entries = fileDirectory.listFiles();
-
-
- // Iterating for each file and directory
- for ( int i = 0; i < entries.length; ++i ) {
- // Testing, if the entry in the list is a directory
- if ( entries[ i ].isDirectory() ) {
- // Recursive call for the new directory
- traverse( entries[ i ] );
- } else {
- // Converting the document to the favoured type
- try {
- // Composing the URL by replacing all backslashs
- String sUrl = "file:///"
- + entries[ i ].getAbsolutePath().replace( '\\', '/' );
-
- // Loading the wanted document
- com.sun.star.beans.PropertyValue propertyValues[] =
- new com.sun.star.beans.PropertyValue[1];
- propertyValues[0] = new com.sun.star.beans.PropertyValue();
- propertyValues[0].Name = "Hidden";
- propertyValues[0].Value = new Boolean(true);
-
- Object oDocToStore =
- DocumentConverter.xCompLoader.loadComponentFromURL(
- sUrl, "_blank", 0, propertyValues);
-
- // Getting an object that will offer a simple way to store
- // a document to a URL.
- com.sun.star.frame.XStorable xStorable =
- (com.sun.star.frame.XStorable)UnoRuntime.queryInterface(
- com.sun.star.frame.XStorable.class, oDocToStore );
-
- // Preparing properties for converting the document
- propertyValues = new com.sun.star.beans.PropertyValue[2];
- // Setting the flag for overwriting
- propertyValues[0] = new com.sun.star.beans.PropertyValue();
- propertyValues[0].Name = "Overwrite";
- propertyValues[0].Value = new Boolean(true);
- // Setting the filter name
- propertyValues[1] = new com.sun.star.beans.PropertyValue();
- propertyValues[1].Name = "FilterName";
- propertyValues[1].Value = DocumentConverter.sConvertType;
-
- // Appending the favoured extension to the origin document name
- int index1 = sUrl.lastIndexOf('/');
- int index2 = sUrl.lastIndexOf('.');
- String sStoreUrl = sOutUrl + sUrl.substring(index1, index2 + 1)
- + DocumentConverter.sExtension;
-
- // Storing and converting the document
- xStorable.storeAsURL(sStoreUrl, propertyValues);
-
- // Closing the converted document. Use XCloseable.clsoe if the
- // interface is supported, otherwise use XComponent.dispose
- com.sun.star.util.XCloseable xCloseable =
- (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(
- com.sun.star.util.XCloseable.class, xStorable);
-
- if ( xCloseable != null ) {
- xCloseable.close(false);
- } else {
- com.sun.star.lang.XComponent xComp =
- (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, xStorable);
-
- xComp.dispose();
- }
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- }
-
- System.out.println(sIndent + entries[ i ].getName());
- }
- }
-
- sIndent = sIndent.substring(2);
- }
-
- /** Bootstrap UNO, getting the remote component context, getting a new instance
- * of the desktop (used interface XComponentLoader) and calling the
- * static method traverse
- * @param args The array of the type String contains the directory, in which
- * all files should be converted, the favoured converting type
- * and the wanted extension
- */
- public static void main( String args[] ) {
- if ( args.length < 3 ) {
- System.out.println("usage: java -jar DocumentConverter.jar " +
- "\"<directory to convert>\" \"<type to convert to>\" " +
- "\"<extension>\" \"<output_directory>\"");
- System.out.println("\ne.g.:");
- System.out.println("usage: java -jar DocumentConverter.jar " +
- "\"c:/myoffice\" \"swriter: MS Word 97\" \"doc\"");
- System.exit(1);
- }
-
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- xCompLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
- oDesktop);
-
- // Getting the given starting directory
- File file = new File(args[0]);
-
- // Getting the given type to convert to
- sConvertType = args[1];
-
- // Getting the given extension that should be appended to the
- // origin document
- sExtension = args[2];
-
- // Getting the given type to convert to
- sOutputDir = args[3];
-
- // Starting the conversion of documents in the given directory
- // and subdirectories
- traverse(file);
-
- System.exit(0);
- } catch( Exception e ) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/DocumentHandling/DocumentLoader.java b/odk/examples/java/DocumentHandling/DocumentLoader.java
deleted file mode 100644
index a5a7fb5f..00000000
--- a/odk/examples/java/DocumentHandling/DocumentLoader.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-
-/** This class opens a new or an existing office document.
- */
-public class DocumentLoader {
- public static void main(String args[]) {
- if ( args.length < 1 ) {
- System.out.println(
- "usage: java -jar DocumentLoader.jar \"<URL|path>\"" );
- System.out.println( "\ne.g.:" );
- System.out.println(
- "java -jar DocumentLoader.jar \"private:factory/swriter\"" );
- System.exit(1);
- }
-
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- com.sun.star.frame.XComponentLoader xCompLoader =
- (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, oDesktop);
-
- String sUrl = args[0];
- if ( sUrl.indexOf("private:") != 0) {
- java.io.File sourceFile = new java.io.File(args[0]);
- StringBuffer sbTmp = new StringBuffer("file:///");
- sbTmp.append(sourceFile.getCanonicalPath().replace('\\', '/'));
- sUrl = sbTmp.toString();
- }
-
- // Load a Writer document, which will be automaticly displayed
- com.sun.star.lang.XComponent xComp = xCompLoader.loadComponentFromURL(
- sUrl, "_blank", 0, new com.sun.star.beans.PropertyValue[0]);
-
- if ( xComp != null )
- System.exit(0);
- else
- System.exit(1);
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/DocumentHandling/DocumentPrinter.java b/odk/examples/java/DocumentHandling/DocumentPrinter.java
deleted file mode 100644
index 3331f43f..00000000
--- a/odk/examples/java/DocumentHandling/DocumentPrinter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-
-public class DocumentPrinter {
- public static void main(String args[]) {
- if ( args.length < 3 ) {
- System.out.println("usage: java -jar DocumentLoader.jar " +
- "\"<Favoured printer>\" \"<URL|path>\" \"<Pages>\"");
- System.out.println( "\ne.g.:" );
- System.out.println("java -jar DocumentLoader.jar \"amadeus\" " +
- "\"file:///f:/TestPrint.odt\" \"1-3;7;9\"");
- System.exit(1);
- }
-
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- com.sun.star.frame.XComponentLoader xCompLoader =
- (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, oDesktop);
-
- java.io.File sourceFile = new java.io.File(args[1]);
- StringBuffer sUrl = new StringBuffer("file:///");
- sUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- // Load a Writer document, which will be automaticly displayed
- com.sun.star.lang.XComponent xComp = xCompLoader.loadComponentFromURL(
- sUrl.toString(), "_blank", 0,
- new com.sun.star.beans.PropertyValue[0] );
-
- // Querying for the interface XPrintable on the loaded document
- com.sun.star.view.XPrintable xPrintable =
- (com.sun.star.view.XPrintable)UnoRuntime.queryInterface(
- com.sun.star.view.XPrintable.class, xComp);
-
- // Setting the property "Name" for the favoured printer (name of
- // IP address)
- com.sun.star.beans.PropertyValue propertyValue[] =
- new com.sun.star.beans.PropertyValue[1];
- propertyValue[0] = new com.sun.star.beans.PropertyValue();
- propertyValue[0].Name = "Name";
- propertyValue[0].Value = args[ 0 ];
-
- // Setting the name of the printer
- xPrintable.setPrinter( propertyValue );
-
- // Setting the property "Pages" so that only the desired pages
- // will be printed.
- propertyValue[0] = new com.sun.star.beans.PropertyValue();
- propertyValue[0].Name = "Pages";
- propertyValue[0].Value = args[ 2 ];
-
- // Printing the loaded document
- xPrintable.print( propertyValue );
-
- System.exit(0);
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/DocumentHandling/DocumentSaver.java b/odk/examples/java/DocumentHandling/DocumentSaver.java
deleted file mode 100644
index 93d6231a..00000000
--- a/odk/examples/java/DocumentHandling/DocumentSaver.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-
-/** The purpose of this class is to open a specified text document and save this
- * file to a specified URL. The type of the saved file is
- * "swriter: StarOffice XML (Writer)".
- */
-public class DocumentSaver {
- /** The main method of the application.
- * @param args The program needs two arguments:
- * - full file name to open,
- * - full file name to save.
- */
- public static void main(String args[]) {
- if ( args.length < 2 ) {
- System.out.println("usage: java -jar DocumentSaver.jar" +
- "\"<URL|path to load>\" \"<URL|path to save>\"");
- System.out.println("\ne.g.:");
- System.out.println("java -jar DocumentSaver " +
- "\"file:///f:/TestPrint.doc\"" +
- "\"file:///f:/TestPrint.odt\"");
- System.exit(1);
- }
-
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- com.sun.star.frame.XComponentLoader xCompLoader =
- (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, oDesktop);
-
- java.io.File sourceFile = new java.io.File(args[0]);
- StringBuffer sLoadUrl = new StringBuffer("file:///");
- sLoadUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- sourceFile = new java.io.File(args[1]);
- StringBuffer sSaveUrl = new StringBuffer("file:///");
- sSaveUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
-
- com.sun.star.beans.PropertyValue[] propertyValue =
- new com.sun.star.beans.PropertyValue[1];
- propertyValue[0] = new com.sun.star.beans.PropertyValue();
- propertyValue[0].Name = "Hidden";
- propertyValue[0].Value = new Boolean(true);
-
- Object oDocToStore = xCompLoader.loadComponentFromURL(
- sLoadUrl.toString(), "_blank", 0, propertyValue );
- com.sun.star.frame.XStorable xStorable =
- (com.sun.star.frame.XStorable)UnoRuntime.queryInterface(
- com.sun.star.frame.XStorable.class, oDocToStore );
-
- propertyValue = new com.sun.star.beans.PropertyValue[ 2 ];
- propertyValue[0] = new com.sun.star.beans.PropertyValue();
- propertyValue[0].Name = "Overwrite";
- propertyValue[0].Value = new Boolean(true);
- propertyValue[1] = new com.sun.star.beans.PropertyValue();
- propertyValue[1].Name = "FilterName";
- propertyValue[1].Value = "StarOffice XML (Writer)";
- xStorable.storeAsURL( sSaveUrl.toString(), propertyValue );
-
- System.out.println("\nDocument \"" + sLoadUrl + "\" saved under \"" +
- sSaveUrl + "\"\n");
-
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class,
- oDocToStore );
-
- if (xCloseable != null ) {
- xCloseable.close(false);
- } else
- {
- com.sun.star.lang.XComponent xComp = (com.sun.star.lang.XComponent)
- UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, oDocToStore );
- xComp.dispose();
- }
- System.out.println("document closed!");
- System.exit(0);
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/DocumentHandling/Makefile b/odk/examples/java/DocumentHandling/Makefile
deleted file mode 100644
index 0cf20833..00000000
--- a/odk/examples/java/DocumentHandling/Makefile
+++ /dev/null
@@ -1,145 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java DocumentHandling examples of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-SAMPLE_NAME=JavaDocumentHandlingExamples
-SAMPLE_CLASS_OUT = $(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT = $(OUT_MISC)/$(SAMPLE_NAME)
-
-DIRFLAG=$(OUT_MISC)/$(SAMPLE_NAME)_directory.flag
-
-APP1_NAME=DocumentConverter
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP2_NAME=DocumentLoader
-APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar
-APP3_NAME=DocumentPrinter
-APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar
-APP4_NAME=DocumentSaver
-APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(SAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(SAMPLE_CLASS_OUT)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $<
-
-$(SAMPLE_CLASS_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(SAMPLE_CLASS_OUT)/$(APP1_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP1_NAME).class
-$(APP2_JAR) : $(SAMPLE_CLASS_OUT)/$(APP2_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP2_NAME).class
-$(APP3_JAR) : $(SAMPLE_CLASS_OUT)/$(APP3_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP3_NAME).class
-$(APP4_JAR) : $(SAMPLE_CLASS_OUT)/$(APP4_NAME).mf $(SAMPLE_CLASS_OUT)/$(APP4_NAME).class
-
-$(SAMPLE_NAME) : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR)
- @echo --------------------------------------------------------------------------------
- @echo The $(APP1_NAME) search the "$(QM)./test$(QM)" directory for documents, convert
- @echo them using using the "$(QM)MS Word 97$(QM)" filter and the extension "$(QM).doc$(QM)".
- @echo The converted files are store in "$(QM)$(SAMPLE_GEN_OUT)/converted_files$(QM)".
- @echo The list of possible filter names can change. Normally an updated list can be found
- @echo on "$(QM)http://www.openoffice.org/files/documents/25/111/filter_description.html$(QM)".
- @echo -
- @echo The $(APP2_NAME) loads the document "$(QM)./test/test1.odt$(QM)".
- @echo -
- @echo The $(APP3_NAME) prints the document "$(QM)./test/test1.odt$(QM)" using the
- @echo the specified printer. If the printer is unknown, the default printer is used.
- @echo -
- @echo The $(APP5_NAME) loads the document "$(QM)./test/test1.odt$(QM)" and saves it
- @echo under "$(QM)$(SAMPLE_GEN_OUT)/savetest/testsave.odt$(QM)".
- @echo -
- @echo Please use one of the following commands to execute the examples!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo $(MAKE) $(APP2_NAME).run
- @echo $(MAKE) $(APP3_NAME).run
- @echo $(MAKE) $(APP4_NAME).run
- @echo --------
- @echo The examples need parameters. Please use one the following commands to
- @echo start the demo if you do not want the default parameters specified in the
- @echo this makefile. Starting without parameters print a command line help:
- @echo --- $(APP1_NAME) ---
- @echo java -jar $(APP1_NAME).jar "$(QM)directory$(QM)" "$(QM)filter name$(QM)" "$(QM)extension$(QM)" "$(QM)output_directory$(QM)"
- @echo --- $(APP2_NAME) ---
- @echo java -jar $(APP2_NAME).jar "$(QM)Url|path$(QM)"
- @echo --- $(APP3_NAME) ---
- @echo java -jar $(APP3_NAME).jar "$(QM)printername$(QM)" "$(QM)filename$(QM)" "$(QM)pages$(QM)"
- @echo --- $(APP4_NAME) ---
- @echo java -jar $(APP4_NAME).jar "$(QM)load Url|path$(QM)" "$(QM)save Url|path$(QM)"
- @echo --------------------------------------------------------------------------------
-
-$(APP1_NAME).run: $(APP1_JAR)
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/converted_files)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< "./test" "MS Word 97" "doc" "$(SAMPLE_GEN_OUT)/converted_files"
-
-$(APP2_NAME).run: $(APP2_JAR)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< "./test/test1.odt"
-
-$(APP3_NAME).run: $(APP3_JAR)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< "my_printer" "./test/test1.odt" 1
-
-$(APP4_NAME).run: $(APP4_JAR)
- -$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/savetest)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< "./test/test1.odt" "$(SAMPLE_GEN_OUT)/savetest/testsave.odt"
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
diff --git a/odk/examples/java/DocumentHandling/test/test1.odt b/odk/examples/java/DocumentHandling/test/test1.odt
deleted file mode 100644
index 66db1c56..00000000
--- a/odk/examples/java/DocumentHandling/test/test1.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Drawing/Makefile b/odk/examples/java/Drawing/Makefile
deleted file mode 100644
index 6281c246..00000000
--- a/odk/examples/java/Drawing/Makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java Drawing example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=JavaDrawingExample
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=SDraw
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
-
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-
-$(EXAMPLE_NAME) : $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) SDraw.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/java/Drawing/SDraw.java b/odk/examples/java/Drawing/SDraw.java
deleted file mode 100644
index 551689c5..00000000
--- a/odk/examples/java/Drawing/SDraw.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: bootstrap UNO and get the remote component context
-// Step 2: open an empty text document
-// Step 3: get the drawpage an insert some shapes
-//***************************************************************************
-
-
-import java.lang.Math;
-
-import com.sun.star.uno.UnoRuntime;
-
-public class SDraw {
-
-
- public static void main(String args[]) {
-
- //oooooooooooooooooooooooooooStep 1oooooooooooooooooooooooooooooooooooooooo
- // bootstrap UNO and get the remote component context. The context can
- // be used to get the service manager
- //*************************************************************************
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
- com.sun.star.lang.XComponent xDrawDoc = null;
- com.sun.star.drawing.XDrawPage xDrawPage = null;
-
- //oooooooooooooooooooooooooooStep 2oooooooooooooooooooooooooooooooooooooooo
- // open an empty document. In this case it's a draw document.
- // For this purpose an instance of com.sun.star.frame.Desktop
- // is created. It's interface XDesktop provides the XComponentLoader,
- // which is used to open the document via loadComponentFromURL
- //*************************************************************************
-
- //Open document
- //Draw
- System.out.println("Opening an empty Draw document ...");
- xDrawDoc = openDraw(xContext);
-
- //oooooooooooooooooooooooooooStep 3oooooooooooooooooooooooooooooooooooooooo
- // get the drawpage an insert some shapes.
- // the documents DrawPageSupplier supplies the DrawPage vi IndexAccess
- // To add a shape get the MultiServiceFaktory of the document, create an
- // instance of the ShapeType and add it to the Shapes-container
- // provided by the drawpage
- //*************************************************************************
-
-
- // get the drawpage of drawing here
- try {
- System.out.println( "getting Drawpage" );
- com.sun.star.drawing.XDrawPagesSupplier xDPS =
- (com.sun.star.drawing.XDrawPagesSupplier)UnoRuntime.queryInterface(
- com.sun.star.drawing.XDrawPagesSupplier.class, xDrawDoc);
- com.sun.star.drawing.XDrawPages xDPn = xDPS.getDrawPages();
- com.sun.star.container.XIndexAccess xDPi =
- (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XIndexAccess.class, xDPn);
- xDrawPage = (com.sun.star.drawing.XDrawPage)UnoRuntime.queryInterface(
- com.sun.star.drawing.XDrawPage.class, xDPi.getByIndex(0));
- } catch ( Exception e ) {
- System.err.println( "Couldn't create document"+ e );
- e.printStackTrace(System.err);
- }
-
- createSequence(xDrawDoc, xDrawPage);
-
- //put something on the drawpage
- System.out.println( "inserting some Shapes" );
- com.sun.star.drawing.XShapes xShapes = (com.sun.star.drawing.XShapes)
- UnoRuntime.queryInterface(
- com.sun.star.drawing.XShapes.class, xDrawPage);
- xShapes.add(createShape(xDrawDoc,2000,1500,1000,1000,"Line",0));
- xShapes.add(createShape(xDrawDoc,3000,4500,15000,1000,"Ellipse",16711680));
- xShapes.add(createShape(xDrawDoc,5000,3500,7500,5000,"Rectangle",6710932));
-
- //*************************************************************************
- System.out.println("done");
- System.exit(0);
- }
-
- public static com.sun.star.lang.XComponent openDraw(
- com.sun.star.uno.XComponentContext xContext)
- {
- com.sun.star.frame.XComponentLoader xCLoader;
- com.sun.star.text.XTextDocument xDoc = null;
- com.sun.star.lang.XComponent xComp = null;
-
- try {
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- xCLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
- oDesktop);
- com.sun.star.beans.PropertyValue szEmptyArgs[] =
- new com.sun.star.beans.PropertyValue[0];
- String strDoc = "private:factory/sdraw";
- xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, szEmptyArgs);
-
- } catch(Exception e){
- System.err.println(" Exception " + e);
- e.printStackTrace(System.err);
- }
-
- return xComp;
- }
-
- public static com.sun.star.drawing.XShape createShape(
- com.sun.star.lang.XComponent xDocComp, int height, int width, int x,
- int y, String kind, int col)
- {
- //possible values for kind are 'Ellipse', 'Line' and 'Rectangle'
- com.sun.star.awt.Size size = new com.sun.star.awt.Size();
- com.sun.star.awt.Point position = new com.sun.star.awt.Point();
- com.sun.star.drawing.XShape xShape = null;
-
- //get MSF
- com.sun.star.lang.XMultiServiceFactory xDocMSF =
- (com.sun.star.lang.XMultiServiceFactory) UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xDocComp );
-
- try {
- Object oInt = xDocMSF.createInstance("com.sun.star.drawing."
- +kind + "Shape");
- xShape = (com.sun.star.drawing.XShape)UnoRuntime.queryInterface(
- com.sun.star.drawing.XShape.class, oInt);
- size.Height = height;
- size.Width = width;
- position.X = x;
- position.Y = y;
- xShape.setSize(size);
- xShape.setPosition(position);
-
- } catch ( Exception e ) {
- System.err.println( "Couldn't create instance "+ e );
- e.printStackTrace(System.err);
- }
-
- com.sun.star.beans.XPropertySet xSPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xShape);
-
- try {
- xSPS.setPropertyValue("FillColor", new Integer(col));
- } catch (Exception e) {
- System.err.println("Can't change colors " + e);
- e.printStackTrace(System.err);
- }
-
- return xShape;
- }
-
- public static com.sun.star.drawing.XShape createSequence(
- com.sun.star.lang.XComponent xDocComp, com.sun.star.drawing.XDrawPage xDP)
- {
- com.sun.star.awt.Size size = new com.sun.star.awt.Size();
- com.sun.star.awt.Point position = new com.sun.star.awt.Point();
- com.sun.star.drawing.XShape xShape = null;
- com.sun.star.drawing.XShapes xShapes = (com.sun.star.drawing.XShapes)
- UnoRuntime.queryInterface(com.sun.star.drawing.XShapes.class, xDP);
- int height = 3000;
- int width = 3500;
- int x = 1900;
- int y = 20000;
- Object oInt = null;
- int r = 40;
- int g = 0;
- int b = 80;
-
- //get MSF
- com.sun.star.lang.XMultiServiceFactory xDocMSF =
- (com.sun.star.lang.XMultiServiceFactory)UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xDocComp );
-
- for (int i=0; i<370; i=i+25) {
- try{
- oInt = xDocMSF.createInstance("com.sun.star.drawing.EllipseShape");
- xShape = (com.sun.star.drawing.XShape)UnoRuntime.queryInterface(
- com.sun.star.drawing.XShape.class, oInt);
- size.Height = height;
- size.Width = width;
- position.X = (x+(i*40));
- position.Y =
- (new Float(y+(Math.sin((i*Math.PI)/180))*5000)).intValue();
- xShape.setSize(size);
- xShape.setPosition(position);
-
- } catch ( Exception e ) {
- // Some exception occures.FAILED
- System.err.println( "Couldn't get Shape "+ e );
- e.printStackTrace(System.err);
- }
-
- b=b+8;
-
- com.sun.star.beans.XPropertySet xSPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
- xShape);
-
- try {
- xSPS.setPropertyValue("FillColor", new Integer(getCol(r,g,b)));
- xSPS.setPropertyValue("Shadow", new Boolean(true));
- } catch (Exception e) {
- System.err.println("Can't change colors " + e);
- e.printStackTrace(System.err);
- }
- xShapes.add(xShape);
- }
-
- com.sun.star.drawing.XShapeGrouper xSGrouper =
- (com.sun.star.drawing.XShapeGrouper)UnoRuntime.queryInterface(
- com.sun.star.drawing.XShapeGrouper.class, xDP);
-
- xShape = xSGrouper.group(xShapes);
-
- return xShape;
- }
-
- public static int getCol(int r, int g, int b) {
- return r*65536+g*256+b;
- }
-}
-
-
-
diff --git a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java
deleted file mode 100644
index 9e2ff4bd..00000000
--- a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java
+++ /dev/null
@@ -1,1024 +0,0 @@
-import java.awt.*;
-import java.applet.*;
-import java.awt.event.*;
-import java.net.*;
-import java.io.*;
-
-import javax.swing.JOptionPane;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-
-import com.sun.star.lang.XComponent;
-
-import com.sun.star.beans.PropertyValue;
-
-import com.sun.star.datatransfer.DataFlavor;
-import com.sun.star.datatransfer.XTransferable;
-
-import com.sun.star.container.XNameAccess;
-
-import com.sun.star.io.XStream;
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XOutputStream;
-import com.sun.star.io.XTruncate;
-
-import com.sun.star.embed.*;
-
-public class EmbedContApp extends Applet implements MouseListener, XEmbeddedClient
-{
- private XMultiServiceFactory m_xServiceFactory;
-
- private XEmbeddedObject m_xEmbedObj;
- private XStorage m_xStorage;
-
- private Frame m_aFrame;
- private Menu m_aFileMenu;
- private Menu m_aObjectMenu;
- private Toolkit m_aToolkit;
- private Image m_aImage;
-
- private boolean m_bOwnFile = false;
-
- private boolean m_bLinkObj = false;
- private String m_aLinkURI;
-
- public EmbedContApp( Frame aFrame, XMultiServiceFactory xServiceFactory )
- {
- m_aFrame = aFrame;
- m_xServiceFactory = xServiceFactory;
- }
-
- public void init()
- {
- resize( 640, 480 );
- setBackground( Color.gray );
-
- m_aToolkit = Toolkit.getDefaultToolkit();
-
- // Get a menu bar.
- MenuBar aMenuBar = m_aFrame.getMenuBar();
- if( aMenuBar == null )
- {
- aMenuBar = new MenuBar();
- m_aFrame.setMenuBar( aMenuBar );
- }
-
- // Create menus for the menu bar.
-
- // File menu
- m_aFileMenu = new Menu( "File", true );
- aMenuBar.add( m_aFileMenu );
-
- MenuItem aItem = new NewMenuItem();
- m_aFileMenu.add( aItem );
-
- aItem = new OpenFileMenuItem();
- m_aFileMenu.add( aItem );
-
- aItem = new SaveMenuItem();
- m_aFileMenu.add( aItem );
-
- aItem = new SaveAsMenuItem();
- m_aFileMenu.add( aItem );
-
- // Object menu
- m_aObjectMenu = new Menu( "Object", true );
- aMenuBar.add( m_aObjectMenu );
-
- aItem = new NewObjectMenuItem();
- m_aObjectMenu.add( aItem );
-
- aItem = new LoadObjectMenuItem();
- m_aObjectMenu.add( aItem );
-
- aItem = new LinkObjectMenuItem();
- m_aObjectMenu.add( aItem );
-
- aItem = new ConvertLinkToEmbedMenuItem();
- m_aObjectMenu.add( aItem );
-
- // Handle mouse clicks in our window.
-// addMouseListener( new MouseWatcher() );
- addMouseListener( this );
- }
-
- public void update( Graphics g )
- {
- paint( g );
- }
-
- public void paint( Graphics g )
- {
- super.paint( g );
-
- if ( m_xEmbedObj != null )
- {
- synchronized( this )
- {
- if ( m_aImage != null )
- g.drawImage( m_aImage, 0, 0, EmbedContApp.this );
- }
- }
- }
-
- public void generateNewImage()
- {
- if ( m_xEmbedObj != null )
- {
- try {
- int nOldState = m_xEmbedObj.getCurrentState();
- int nState = nOldState;
- if ( nOldState == EmbedStates.EMBED_LOADED )
- {
- m_xEmbedObj.changeState( EmbedStates.EMBED_RUNNING );
- nState = EmbedStates.EMBED_RUNNING;
- }
-
- if ( nState == EmbedStates.EMBED_ACTIVE || nState == EmbedStates.EMBED_RUNNING )
- {
- XComponentSupplier xCompProv = (XComponentSupplier)UnoRuntime.queryInterface(
- XComponentSupplier.class,
- m_xEmbedObj );
- if ( xCompProv != null )
- {
- XComponent xComp = xCompProv.getComponent();
- XTransferable xTransfer = (XTransferable)UnoRuntime.queryInterface(
- XTransferable.class,
- xComp );
- if ( xTransfer != null )
- {
- DataFlavor aFlavor = new DataFlavor();
- aFlavor.MimeType = "image/png";
- aFlavor.HumanPresentableName = "Portable Network Graphics";
- aFlavor.DataType = new Type( byte[].class );
-
- byte[] aPNGData = (byte[])AnyConverter.toArray( xTransfer.getTransferData( aFlavor ) );
- if ( aPNGData != null && aPNGData.length != 0 )
- {
- synchronized( this )
- {
- m_aImage = m_aToolkit.createImage( aPNGData );
- }
- }
- }
- else
- System.out.println( "paint() : can not get XTransferable for the component!\n" );
- }
- else
- System.out.println( "paint() : XComponentSupplier is not implemented!\n" );
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- // dialogs should not be used in paint()
- System.out.println( "Exception in paint(): " + e );
- }
- }
- }
-
- public void mouseClicked( MouseEvent e )
- {
- if( e.getModifiers() == InputEvent.BUTTON1_MASK )
- {
- // activate object if exists and not active
- if ( m_xEmbedObj != null )
- {
- try {
- m_xEmbedObj.changeState( EmbedStates.EMBED_ACTIVE );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame, ex, "Exception on mouse click", JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
-
- public void mousePressed( MouseEvent e ){};
- public void mouseEntered( MouseEvent e ){};
- public void mouseExited( MouseEvent e ){};
- public void mouseReleased( MouseEvent e ){};
-
- // XEmbeddedClient
- public void saveObject()
- throws com.sun.star.uno.Exception
- {
- if ( m_xEmbedObj != null )
- {
- try {
- XEmbedPersist xPersist = (XEmbedPersist)UnoRuntime.queryInterface( XEmbedPersist.class, m_xEmbedObj );
- if ( xPersist != null )
- {
- xPersist.storeOwn();
- generateNewImage();
- }
- else
- JOptionPane.showMessageDialog( m_aFrame, "No XEmbedPersist!", "Error:", JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in saveObject:", JOptionPane.ERROR_MESSAGE );
- }
- }
-
- generateNewImage();
- repaint();
- }
-
- public void onShowWindow( boolean bVisible )
- {
- // for now nothing to do
- }
-
- // classes
- class NewMenuItem extends MenuItem implements ActionListener // Menu New
- {
- public NewMenuItem()
- {
- super( "New", new MenuShortcut( KeyEvent.VK_A ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // clear everything
- clearObjectAndStorage();
-
- repaint();
- }
- }
-
- class SaveAsMenuItem extends MenuItem implements ActionListener // Menu SaveAs...
- {
- public SaveAsMenuItem()
- {
- super( "SaveAs..." );
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // open SaveAs dialog and store
-
- if ( m_xStorage != null && m_xEmbedObj != null )
- {
- FileDialog aFileDialog = new FileDialog( m_aFrame, "SaveAs", FileDialog.SAVE );
- aFileDialog.show();
- if ( aFileDialog.getFile() != null )
- {
- String aFileName = aFileDialog.getDirectory() + aFileDialog.getFile();
- File aFile = new File( aFileName );
- if ( aFile != null )
- {
- // create object from specified file
- String aFileURI = aFile.toURI().toASCIIString();
- try {
- saveObject();
-
- if ( m_bLinkObj )
- storeLinkToStorage();
-
- saveStorageAsFileURI( aFileURI );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception in SaveAsMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
- else
- JOptionPane.showMessageDialog( m_aFrame, "No document is embedded!", "Error:", JOptionPane.ERROR_MESSAGE );
- }
- }
-
- class OpenFileMenuItem extends MenuItem implements ActionListener // Menu Open
- {
- public OpenFileMenuItem()
- {
- super( "Open", new MenuShortcut( KeyEvent.VK_C ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // clear everything
- clearObjectAndStorage();
-
- // open OpenFile dialog and load doc
- FileDialog aFileDialog = new FileDialog( m_aFrame, "Open" );
- aFileDialog.show();
- if ( aFileDialog.getFile() != null )
- {
- String aFileName = aFileDialog.getDirectory() + aFileDialog.getFile();
- File aFile = new File( aFileName );
- if ( aFile != null )
- {
- // create object from specified file
- String aFileURI = aFile.toURI().toASCIIString();
-
- // load from specified file
- loadFileURI( aFileURI );
-
- if ( m_xEmbedObj != null )
- {
- try {
- m_xEmbedObj.setClientSite( EmbedContApp.this );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception in OpenFileMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
-
- generateNewImage();
- repaint();
- }
- }
-
- class SaveMenuItem extends MenuItem implements ActionListener // Menu Save
- {
- public SaveMenuItem()
- {
- super( "Save", new MenuShortcut( KeyEvent.VK_D ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // if has persistance store there
- // if not open SaveAs dialog and store
- if ( m_xStorage != null && m_xEmbedObj != null )
- {
- if ( m_bOwnFile )
- {
- if ( m_xStorage == null )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- "No storage for oned file!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- return;
- }
-
- try {
- saveObject();
-
- if ( m_bLinkObj )
- storeLinkToStorage();
-
- XTransactedObject xTransact = (XTransactedObject)UnoRuntime.queryInterface( XTransactedObject.class,
- m_xStorage );
- if ( xTransact != null )
- xTransact.commit();
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception during save operation in SaveMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- else
- {
- FileDialog aFileDialog = new FileDialog( m_aFrame, "SaveAs", FileDialog.SAVE );
- aFileDialog.show();
- if ( aFileDialog.getFile() != null )
- {
- String aFileName = aFileDialog.getDirectory() + aFileDialog.getFile();
- File aFile = new File( aFileName );
- if ( aFile != null )
- {
- // create object from specified file
- String aFileURI = aFile.toURI().toASCIIString();
- try {
- saveObject();
-
- if ( m_bLinkObj )
- storeLinkToStorage();
-
- saveStorageAsFileURI( aFileURI );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception during 'save as' operation in SaveMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
- }
- else
- JOptionPane.showMessageDialog( m_aFrame, "No document is embedded!", "Error:", JOptionPane.ERROR_MESSAGE );
- }
- }
-
- class NewObjectMenuItem extends MenuItem implements ActionListener // Menu NewObject
- {
- public NewObjectMenuItem()
- {
- super( "Create", new MenuShortcut( KeyEvent.VK_N ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // remove current object an init a new one
- clearObjectAndStorage();
-
- Object[] possibleValues = { "com.sun.star.comp.Writer.TextDocument",
- "com.sun.star.comp.Writer.GlobalDocument",
- "com.sun.star.comp.Writer.WebDocument",
- "com.sun.star.comp.Calc.SpreadsheetDocument",
- "com.sun.star.comp.Draw.PresentationDocument",
- "com.sun.star.comp.Draw.DrawingDocument",
- "com.sun.star.comp.Math.FormulaDocument" };
-
- String selectedValue = (String)JOptionPane.showInputDialog( null, "DocumentType", "Select",
- JOptionPane.INFORMATION_MESSAGE, null,
- possibleValues, possibleValues[0] );
-
- if ( selectedValue != null )
- {
- m_xStorage = createTempStorage();
-
- if ( m_xStorage != null )
- m_xEmbedObj = createEmbedObject( selectedValue );
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create temporary storage!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
-
-
- if ( m_xEmbedObj != null )
- {
- try {
- m_xEmbedObj.setClientSite( EmbedContApp.this );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception in NewObjectMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
-
- generateNewImage();
- repaint();
- }
- }
-
- class LoadObjectMenuItem extends MenuItem implements ActionListener // Menu LoadObject
- {
- public LoadObjectMenuItem()
- {
- super( "Load from file", new MenuShortcut( KeyEvent.VK_L ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // first remove current object
- clearObjectAndStorage();
-
- // open OpenFile dialog and load doc
- FileDialog aFileDialog = new FileDialog( m_aFrame, "Select sources to use for object init" );
- aFileDialog.show();
- if ( aFileDialog.getFile() != null )
- {
- String aFileName = aFileDialog.getDirectory() + aFileDialog.getFile();
- File aFile = new File( aFileName );
- if ( aFile != null )
- {
- // create object from specified file
- String aFileURI = aFile.toURI().toASCIIString();
- m_xStorage = createTempStorage();
-
- if ( m_xStorage != null )
- m_xEmbedObj = loadEmbedObject( aFileURI );
-
- if ( m_xEmbedObj != null )
- {
- try {
- m_xEmbedObj.setClientSite( EmbedContApp.this );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception in LoadObjectMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
-
- generateNewImage();
- repaint();
- }
- }
-
- class LinkObjectMenuItem extends MenuItem implements ActionListener // Menu LinkObject
- {
- public LinkObjectMenuItem()
- {
- super( "Create link", new MenuShortcut( KeyEvent.VK_M ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- // first remove current object
- clearObjectAndStorage();
-
- // open OpenFile dialog and load doc
- FileDialog aFileDialog = new FileDialog( m_aFrame, "Select sources to use for object init" );
- aFileDialog.show();
- if ( aFileDialog.getFile() != null )
- {
- m_xStorage = createTempStorage();
-
- String aFileName = aFileDialog.getDirectory() + aFileDialog.getFile();
- File aFile = new File( aFileName );
- if ( aFile != null )
- {
- // create object from specified file
- String aFileURI = aFile.toURI().toASCIIString();
-
- m_xEmbedObj = createLinkObject( aFileURI );
-
- if ( m_xEmbedObj != null )
- {
- m_aLinkURI = aFileURI;
- m_bLinkObj = true;
-
- try {
- m_xEmbedObj.setClientSite( EmbedContApp.this );
- }
- catch( Exception ex )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- ex,
- "Exception in LinkObjectMenuItem:",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
-
- generateNewImage();
- repaint();
- }
- }
-
- class ConvertLinkToEmbedMenuItem extends MenuItem implements ActionListener // Menu LinkObject
- {
- public ConvertLinkToEmbedMenuItem()
- {
- super( "Convert link to embed", new MenuShortcut( KeyEvent.VK_M ));
- addActionListener( this );
- }
-
- public void actionPerformed( ActionEvent e )
- {
- if ( !m_bLinkObj )
- {
- JOptionPane.showMessageDialog( m_aFrame, "The object is not a link!", "Error:", JOptionPane.ERROR_MESSAGE );
- return;
- }
-
- if ( m_xEmbedObj != null )
- {
- if ( m_xStorage != null )
- {
- try {
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface( XNameAccess.class,
- m_xStorage );
- if ( xNameAccess != null && xNameAccess.hasByName( "LinkName" ) )
- m_xStorage.removeElement( "LinkName" );
-
- XEmbedPersist xPersist = (XEmbedPersist)UnoRuntime.queryInterface( XEmbedPersist.class,
- m_xEmbedObj );
- if ( xPersist != null )
- {
- PropertyValue[] pEmp = new PropertyValue[0];
- xPersist.setPersistentEntry( m_xStorage, "EmbedSub", EntryInitModes.ENTRY_NO_INIT, pEmp );
- m_bLinkObj = false;
- m_aLinkURI = null;
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "No XEmbedPersist in ConvertLink... !",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e1 )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- e1,
- "Exception in ConvertLinkToEmbed:try 1 :",
- JOptionPane.ERROR_MESSAGE );
- }
- }
- }
- }
- }
-
- // Helper methods
- public XEmbeddedObject createEmbedObject( String aServiceName )
- {
- XEmbeddedObject xEmbObj = null;
- byte[] pClassID = new byte[16];
-
- if ( aServiceName.equals( "com.sun.star.comp.Writer.TextDocument" ) )
- {
- int[] pTempClassID = { 0x8B, 0xC6, 0xB1, 0x65, 0xB1, 0xB2, 0x4E, 0xDD,
- 0xAA, 0x47, 0xDA, 0xE2, 0xEE, 0x68, 0x9D, 0xD6 };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
- else if ( aServiceName.equals( "com.sun.star.comp.Writer.GlobalDocument" ) )
- {
- int[] pTempClassID = { 0xB2, 0x1A, 0x0A, 0x7C, 0xE4, 0x03, 0x41, 0xFE,
- 0x95, 0x62, 0xBD, 0x13, 0xEA, 0x6F, 0x15, 0xA0 };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
- else if ( aServiceName.equals( "com.sun.star.comp.Writer.WebDocument" ) )
- {
- int[] pTempClassID = { 0xA8, 0xBB, 0xA6, 0x0C, 0x7C, 0x60, 0x45, 0x50,
- 0x91, 0xCE, 0x39, 0xC3, 0x90, 0x3F, 0xAC, 0x5E };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
- else if ( aServiceName.equals( "com.sun.star.comp.Calc.SpreadsheetDocument" ) )
- {
- int[] pTempClassID = { 0x47, 0xBB, 0xB4, 0xCB, 0xCE, 0x4C, 0x4E, 0x80,
- 0xA5, 0x91, 0x42, 0xD9, 0xAE, 0x74, 0x95, 0x0F };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
- else if ( aServiceName.equals( "com.sun.star.comp.Draw.PresentationDocument" ) )
- {
- int[] pTempClassID = { 0x91, 0x76, 0xE4, 0x8A, 0x63, 0x7A, 0x4D, 0x1F,
- 0x80, 0x3B, 0x99, 0xD9, 0xBF, 0xAC, 0x10, 0x47 };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
- else if ( aServiceName.equals( "com.sun.star.comp.Draw.DrawingDocument" ) )
- {
- int[] pTempClassID = { 0x4B, 0xAB, 0x89, 0x70, 0x8A, 0x3B, 0x45, 0xB3,
- 0x99, 0x1C, 0xCB, 0xEE, 0xAC, 0x6B, 0xD5, 0xE3 };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
- else if ( aServiceName.equals( "com.sun.star.comp.Math.FormulaDocument" ) )
- {
- int[] pTempClassID = { 0x07, 0x8B, 0x7A, 0xBA, 0x54, 0xFC, 0x45, 0x7F,
- 0x85, 0x51, 0x61, 0x47, 0xE7, 0x76, 0xA9, 0x97 };
- for ( int ind = 0; ind < 16; ind++ )
- pClassID[ind] = (byte)pTempClassID[ind];
- }
-
- if ( pClassID != null )
- {
- // create embedded object based on the class ID
- try {
- Object oEmbedFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.EmbeddedObjectFactory" );
- XEmbedObjectFactory xEmbedFactory = (XEmbedObjectFactory)UnoRuntime.queryInterface(
- XEmbedObjectFactory.class,
- oEmbedFactory );
- if ( xEmbedFactory != null )
- {
- Object oEmbObj = xEmbedFactory.createInstanceInitNew( pClassID,
- "Dummy name",
- m_xStorage,
- "EmbedSub" );
- xEmbObj = (XEmbeddedObject)UnoRuntime.queryInterface( XEmbeddedObject.class, oEmbObj );
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create EmbedFactory!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in createInstanceInitNew():", JOptionPane.ERROR_MESSAGE );
- }
- }
- else
- JOptionPane.showMessageDialog( m_aFrame, "Can't retrieve class ID!", "Error:", JOptionPane.ERROR_MESSAGE );
-
- return xEmbObj;
- }
-
- public XEmbeddedObject createLinkObject( String aLinkURL )
- {
- XEmbeddedObject xEmbObj = null;
-
- try {
- Object oEmbedFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.EmbeddedObjectFactory" );
- XEmbedObjectFactory xEmbedFactory = (XEmbedObjectFactory)UnoRuntime.queryInterface(
- XEmbedObjectFactory.class,
- oEmbedFactory );
- if ( xEmbedFactory != null )
- {
- Object oEmbObj = xEmbedFactory.createInstanceLink( aLinkURL );
- xEmbObj = (XEmbeddedObject)UnoRuntime.queryInterface( XEmbeddedObject.class, oEmbObj );
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create EmbedFactory!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in createLinkObject():", JOptionPane.ERROR_MESSAGE );
- }
-
-
- return xEmbObj;
- }
-
-
- public XEmbeddedObject loadEmbedObject( String aFileURI )
- {
- XEmbeddedObject xEmbObj = null;
- try {
- Object oEmbedFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.EmbeddedObjectFactory" );
- XEmbedObjectFactory xEmbedFactory = (XEmbedObjectFactory)UnoRuntime.queryInterface(
- XEmbedObjectFactory.class,
- oEmbedFactory );
- if ( xEmbedFactory != null )
- {
- PropertyValue[] aMedDescr = { new PropertyValue(), new PropertyValue() };
- aMedDescr[0].Name = "URL";
- aMedDescr[0].Value = (Object) aFileURI;
- aMedDescr[1].Name = "ReadOnly";
- aMedDescr[1].Value = (Object) new Boolean( false );
- Object oEmbObj = xEmbedFactory.createInstanceInitFromMediaDescriptor( m_xStorage,
- "EmbedSub",
- aMedDescr );
- xEmbObj = (XEmbeddedObject)UnoRuntime.queryInterface( XEmbeddedObject.class, oEmbObj );
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create EmbedFactory!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in loadEmbedObject():", JOptionPane.ERROR_MESSAGE );
- }
-
- return xEmbObj;
- }
-
- public void clearObjectAndStorage()
- {
- synchronized( this )
- {
- m_aImage = null;
- }
-
- m_bOwnFile = false;
-
- m_aLinkURI = null;
- m_bLinkObj = false;
-
- if ( m_xEmbedObj != null )
- {
- try {
- XComponent xComponent = (XComponent)UnoRuntime.queryInterface( XComponent.class, m_xEmbedObj );
- if ( xComponent != null )
- xComponent.dispose();
- }
- catch ( Exception ex )
- {}
- m_xEmbedObj = null;
- }
-
- if ( m_xStorage != null )
- {
- try {
- XComponent xComponent = (XComponent)UnoRuntime.queryInterface( XComponent.class, m_xStorage );
- if ( xComponent != null )
- xComponent.dispose();
- }
- catch ( Exception ex )
- {}
- m_xStorage = null;
- }
- }
-
- public XStorage createTempStorage()
- {
- XStorage xTempStorage = null;
-
- try {
- Object oStorageFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.StorageFactory" );
- XSingleServiceFactory xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface(
- XSingleServiceFactory.class,
- oStorageFactory );
- if ( xStorageFactory != null )
- {
- Object oStorage = xStorageFactory.createInstance();
- xTempStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create StorageFactory!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in createTempStorage():", JOptionPane.ERROR_MESSAGE );
- }
-
- return xTempStorage;
- }
-
- public void saveStorageAsFileURI( String aFileURI )
- {
- try {
- Object oStorageFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.StorageFactory" );
- XSingleServiceFactory xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface(
- XSingleServiceFactory.class,
- oStorageFactory );
- if ( xStorageFactory != null )
- {
- Object aArgs[] = new Object[2];
- aArgs[0] = aFileURI;
- aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
-
- Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
- XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
- m_xStorage.copyToStorage( xTargetStorage );
-
- XComponent xComponent = (XComponent)UnoRuntime.queryInterface( XComponent.class, m_xStorage );
- xComponent.dispose();
-
- m_xStorage = xTargetStorage;
- m_bOwnFile = true;
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create StorageFactory!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in saveStorageToFileURI():", JOptionPane.ERROR_MESSAGE );
- }
-
- }
-
- public void loadFileURI( String aFileURI )
- {
- try
- {
- Object oStorageFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.StorageFactory" );
- XSingleServiceFactory xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface(
- XSingleServiceFactory.class,
- oStorageFactory );
- Object aArgs[] = new Object[2];
- aArgs[0] = aFileURI;
- aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
-
- Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
- XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
-
- Object oEmbedFactory = m_xServiceFactory.createInstance( "com.sun.star.embed.EmbeddedObjectFactory" );
- XEmbedObjectFactory xEmbedFactory = (XEmbedObjectFactory)UnoRuntime.queryInterface(
- XEmbedObjectFactory.class,
- oEmbedFactory );
-
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface( XNameAccess.class,
- xTargetStorage );
- if ( xNameAccess == null )
- {
- JOptionPane.showMessageDialog( m_aFrame, "No XNameAccess!", "Error:", JOptionPane.ERROR_MESSAGE );
- return;
- }
-
- Object oEmbObj = null;
- if ( xNameAccess.hasByName( "LinkName" ) && xTargetStorage.isStreamElement( "LinkName" ) )
- {
- XStream xLinkStream = xTargetStorage.openStreamElement( "LinkName", ElementModes.ELEMENT_READ );
- if ( xLinkStream != null )
- {
- XInputStream xInStream = xLinkStream.getInputStream();
- if ( xInStream != null )
- {
- byte[][] pBuff = new byte[1][0];
- int nRead = xInStream.readBytes( pBuff, 1000 );
- m_aLinkURI = new String( pBuff[0] );
- xInStream.closeInput();
- oEmbObj = xEmbedFactory.createInstanceLink( m_aLinkURI );
- m_bLinkObj = true;
- }
- }
- }
- else
- oEmbObj = xEmbedFactory.createInstanceInitFromEntry( xTargetStorage,
- "EmbedSub",
- false );
-
- m_xEmbedObj = (XEmbeddedObject)UnoRuntime.queryInterface( XEmbeddedObject.class, oEmbObj );
-
- if ( m_xEmbedObj != null )
- {
- m_xStorage = xTargetStorage;
- m_bOwnFile = true;
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create EmbedObject from storage!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame, e, "Exception in loadFileURI():", JOptionPane.ERROR_MESSAGE );
- }
- }
-
- public void storeLinkToStorage()
- {
- if ( m_xStorage != null && m_bLinkObj )
- {
- try {
- XStream xLinkStream = m_xStorage.openStreamElement( "LinkName", ElementModes.ELEMENT_WRITE );
-
- if ( xLinkStream != null )
- {
- XOutputStream xLinkOutStream = xLinkStream.getOutputStream();
- XTruncate xTruncate = (XTruncate) UnoRuntime.queryInterface( XTruncate.class,
- xLinkOutStream );
- if ( xLinkOutStream != null && xTruncate != null )
- {
- xTruncate.truncate();
-
- char[] aLinkChar = m_aLinkURI.toCharArray();
- byte[] aLinkBytes = new byte[ aLinkChar.length ];
- for ( int ind = 0; ind < aLinkChar.length; ind++ )
- aLinkBytes[ind] = (byte)aLinkChar[ind];
-
- xLinkOutStream.writeBytes( aLinkBytes );
- xLinkOutStream.closeOutput();
-
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface( XComponent.class,
- xLinkStream );
- if ( xComponent != null )
- xComponent.dispose();
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "The substream can not be truncated or written!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
-
- }
- else
- JOptionPane.showMessageDialog( m_aFrame,
- "Can't create/open substream!",
- "Error:",
- JOptionPane.ERROR_MESSAGE );
- }
- catch( Exception e )
- {
- JOptionPane.showMessageDialog( m_aFrame,
- e,
- "Exception in storeLinkToStorage:",
- JOptionPane.ERROR_MESSAGE );
-
- }
- }
- }
-}
-
diff --git a/odk/examples/java/EmbedDocument/Container1/EmbedContFrame.java b/odk/examples/java/EmbedDocument/Container1/EmbedContFrame.java
deleted file mode 100644
index 2a29ff4c..00000000
--- a/odk/examples/java/EmbedDocument/Container1/EmbedContFrame.java
+++ /dev/null
@@ -1,108 +0,0 @@
-import java.awt.*;
-import java.awt.event.*;
-
-import com.sun.star.comp.servicemanager.ServiceManager;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.connection.XConnector;
-import com.sun.star.connection.XConnection;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.uno.XComponentContext;
-
-import com.sun.star.container.*;
-import com.sun.star.beans.*;
-import com.sun.star.lang.*;
-
-
-public class EmbedContFrame extends Frame
-{
- WindowListener m_aCloser = new WindowAdapter()
- {
- public void windowClosing( WindowEvent e )
- {
- dispose();
- System.exit( 0 );
- }
- };
-
- public EmbedContFrame( String sName )
- {
- super( sName );
- addWindowListener( m_aCloser );
- }
-
- public static void start()
- {
- EmbedContFrame aFrame = new EmbedContFrame( "Testing container." );
-
- // connect to the office
- XMultiServiceFactory aServiceFactory = null;
- try {
- aServiceFactory = connectOfficeGetServiceFactory();
- }
- catch( Exception e )
- {}
-
- if ( aServiceFactory == null )
- {
- System.out.println( "Can't get service manager!\n" );
- System.exit( 1 );
- }
-
- EmbedContApp aApp = new EmbedContApp( aFrame, aServiceFactory );
- aApp.init();
- aApp.start();
-
- Dimension aSize = aApp.getSize();
-
- aFrame.add( "Center", aApp );
- aFrame.pack();
- aFrame.setSize( aSize );
-
- aFrame.setVisible( true );
- }
-
- public static void main( String args[] )
- {
- EmbedContFrame.start();
- }
-
- public static XMultiServiceFactory connectOfficeGetServiceFactory()
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException,
- Exception
- {
- String sConnectionString = "uno:socket,host=localhost,port=8100;urp;StarOffice.NamingService";
-
- // Get component context
- XComponentContext xComponentContext =
- com.sun.star.comp.helper.Bootstrap.createInitialComponentContext( null );
-
- // initial serviceManager
- XMultiComponentFactory xLocalServiceManager = xComponentContext.getServiceManager();
-
- // create a connector, so that it can contact the office
- Object oUrlResolver = xLocalServiceManager.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver",
- xComponentContext );
- XUnoUrlResolver xUrlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface( XUnoUrlResolver.class, oUrlResolver );
-
- Object oInitialObject = xUrlResolver.resolve( sConnectionString );
- XNamingService xName = (XNamingService)UnoRuntime.queryInterface( XNamingService.class, oInitialObject );
-
- XMultiServiceFactory xMSF = null;
- if( xName != null ) {
- Object oMSF = xName.getRegisteredObject( "StarOffice.ServiceManager" );
- xMSF = (XMultiServiceFactory)UnoRuntime.queryInterface( XMultiServiceFactory.class, oMSF );
- }
- else
- System.out.println( "Error: Can't get XNamingService interface from url resolver!" );
-
- return xMSF;
- }
-}
-
diff --git a/odk/examples/java/EmbedDocument/Container1/Makefile b/odk/examples/java/EmbedDocument/Container1/Makefile
deleted file mode 100644
index be1f5299..00000000
--- a/odk/examples/java/EmbedDocument/Container1/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-# Builds the Java Storage test example of the SDK.
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=EmbedDocument.Container1
-OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME)
-
-JAVAFILES = \
- EmbedContApp.java\
- EmbedContFrame.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- JavaStorageTestExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-JavaStorageTestExample : $(CLASSFILES)
- @echo --------------------------------------------------------------------------------
- @echo Please use following command to execute the example!
- @echo ------
- @echo $(MAKE) EmbedContFrame.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java b/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java
deleted file mode 100755
index 0be57999..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.openoffice.examples.embedding;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import javax.swing.JTextArea;
-import javax.swing.JFrame;
-import java.io.*;
-import javax.imageio.ImageIO;
-
-import org.openoffice.examples.embedding.OwnEmbeddedObject;
-
-public class EditorFrame extends JFrame
-{
- OwnEmbeddedObject m_aEmbObj;
- JTextArea m_aTextArea;
- BufferedImage m_aBufImage;
-
- WindowListener m_aCloser = new WindowAdapter()
- {
- public void windowClosing( WindowEvent e )
- {
- // m_aBufImage = m_aTextArea.getGraphicsConfiguration().createCompatibleImage( m_aTextArea.getWidth(), m_aTextArea.getHeight() );
- m_aBufImage = new BufferedImage( m_aTextArea.getWidth(), m_aTextArea.getHeight(), BufferedImage.TYPE_INT_RGB );
- Graphics2D aGr = m_aBufImage.createGraphics();
- m_aTextArea.paintAll( aGr );
- aGr.dispose();
-
- hide();
- m_aEmbObj.CloseFrameRequest();
- }
- };
-
- public EditorFrame( String sName, OwnEmbeddedObject aEmbObj, int nWidth, int nHeight )
- {
- super( sName );
- m_aEmbObj = aEmbObj;
- addWindowListener( m_aCloser );
- m_aTextArea = new JTextArea( "", nWidth, nHeight );
-
- add( "Center", m_aTextArea );
- pack();
- // setResizable( false );
- }
-
- public String getText()
- {
- return m_aTextArea.getText();
- }
-
- public void setText( String aText )
- {
- m_aTextArea.setText( aText );
- }
-
- public Dimension getAppSize()
- {
- return m_aTextArea.getSize();
- }
-
- public void setAppSize( Dimension aSize )
- {
- Dimension aOwnSize = getSize();
- Dimension aAppSize = m_aTextArea.getSize();
- Dimension aToSet =
- new Dimension( (int)( aSize.getWidth() + aOwnSize.getWidth() - aAppSize.getWidth() ),
- (int)(aSize.getHeight() + aOwnSize.getHeight() - aAppSize.getHeight() ) );
-
- setSize( aToSet );
- validate();
-
- // pack();
- }
-
- public byte[] getReplacementImage()
- {
- Dimension aDim = m_aTextArea.getSize();
- BufferedImage aBufImage = null;
-
- if ( m_aBufImage != null )
- aBufImage = m_aBufImage;
- else
- {
- try
- {
- int nWidth = (int)aDim.getWidth();
- int nHeight = (int)aDim.getHeight();
- aBufImage = new BufferedImage( nWidth, nHeight, BufferedImage.TYPE_INT_RGB );
- Graphics2D aGr = aBufImage.createGraphics();
- aGr.setBackground( Color.WHITE );
- aGr.clearRect( 0, 0, nWidth, nHeight );
- aGr.dispose();
- }
- catch ( java.lang.Exception e )
- {}
- }
-
- if ( aBufImage != null )
- {
- try
- {
- File aTmpFile = File.createTempFile( "temp", ".png" );
- ImageIO.write( aBufImage, "png", aTmpFile );
-
- int nLen = (int)aTmpFile.length();
- byte[] aResult = new byte[nLen];
- FileInputStream aTmpStream = new FileInputStream( aTmpFile );
- aTmpStream.read( aResult );
- aTmpStream.close();
- aTmpFile.delete();
-
- return aResult;
- }
- catch ( java.lang.Exception e )
- {}
- }
-
- return new byte[0];
- }
-}
-
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.odt b/odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.odt
deleted file mode 100644
index dde408bd..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.xcu b/odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.xcu
deleted file mode 100644
index fd6f7674..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/EmbeddedObject.xcu
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.Office" oor:name="Embedding">
- <node oor:name="Objects">
- <node oor:name="69474366-FD6F-4806-8374-8EDD1B6E771D" oor:op="replace">
- <prop oor:name="ObjectFactory"><value>org.openoffice.examples.embedding.Factory69474366FD6F480683748EDD1B6E771D</value></prop>
- <prop oor:name="ObjectDocumentServiceName"><value></value></prop>
- <prop oor:name="ObjectMiscStatus"/>
- <prop oor:name="ObjectVerbs"><value>PRIMARY SHOW OPEN HIDE</value></prop>
- </node>
- </node>
- <node oor:name="MimeTypeClassIDRelations">
- <prop oor:name="application/x-openoffice-embedded-69474366-FD6F-4806-8374-8EDD1B6E771D" oor:op="replace" oor:type="xs:string">
- <value>69474366-FD6F-4806-8374-8EDD1B6E771D</value>
- </prop>
- </node>
- <node oor:name="ObjectNames">
- <node oor:name="Object69474366-FD6F-4806-8374-8EDD1B6E771D" oor:op="replace">
- <prop oor:name="ObjectUIName">
- <value xml:lang="en-US">Example of a simple outplace text object</value>
- </prop>
- <prop oor:name="ClassID">
- <value>69474366-FD6F-4806-8374-8EDD1B6E771D</value>
- </prop>
- </node>
- </node>
-</oor:component-data>
-
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/Makefile b/odk/examples/java/EmbedDocument/EmbeddedObject/Makefile
deleted file mode 100755
index 62fb17e5..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/Makefile
+++ /dev/null
@@ -1,149 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-# include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-
-# we use the sample directory name for separating this example
-# from others in the output directory
-SAMPLE_NAME=EmbeddedObject
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=OwnEmbeddedObject
-COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME)
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-PACKAGE = org/openoffice/examples/embedding
-
-COMP_JAVAFILES =\
- OwnEmbeddedObject.java\
- OwnEmbeddedObjectFactory.java\
- EditorFrame.java
-
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : $(COMP_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMP_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst \\,\,$(subst /,$(PS),$(@D)))
- @echo RegistrationClassName: $(subst /,.,$(PACKAGE)).$(COMP_NAME)Factory> $@
-
-# component as well as application are dependent from the generated types
-# rule for component class files
-$(COMP_CLASS_OUT)/%.class : $(COMP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $(COMP_JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP_CLASS_OUT) .
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(SAMPLE_NAME).xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_NAME).components
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(SAMPLE_NAME).xcu
- $(SDK_ZIP) $@ -u $(COMP_NAME).components
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u $@ $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u $@ META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst \\,\,$(subst /,$(PS),$(@D)))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(COMP_NAME) : $(COMP_REGISTERFLAG)
- @echo ------
- @echo The $(COMP_NAME) component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo Load the "$(QM)$(SAMPLE_NAME).odt$(QM)" document to see how this component works.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo -
- @echo $(MAKE) $(SAMPLE_NAME).odt.load
- @echo --------------------------------------------------------------------------------
-
-$(SAMPLE_NAME).odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.components b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.components
deleted file mode 100644
index 421706f7..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="OwnEmbeddedObject.uno.jar">
- <implementation name="org.openoffice.examples.embedding.OwnEmbeddedObjectFactory">
- <service name="org.openoffice.examples.embedding.Factory69474366FD6F480683748EDD1B6E771D"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
deleted file mode 100755
index df2da9f0..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
+++ /dev/null
@@ -1,1124 +0,0 @@
-package org.openoffice.examples.embedding;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.io.XStream;
-import com.sun.star.io.XOutputStream;
-import com.sun.star.io.XInputStream;
-import com.sun.star.io.XTruncate;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.lang.XComponent;
-import com.sun.star.document.EventObject;
-import com.sun.star.embed.VisualRepresentation;
-import com.sun.star.container.XNameAccess;
-
-
-import com.sun.star.embed.*;
-
-import java.util.Vector;
-import java.awt.Dimension;
-import java.lang.Integer;
-import org.omg.CORBA.COMM_FAILURE;
-
-import org.openoffice.examples.embedding.EditorFrame;
-
-public final class OwnEmbeddedObject extends WeakBase
- implements com.sun.star.embed.XEmbedPersist,
- com.sun.star.embed.XEmbeddedObject
-{
- protected final XComponentContext m_xContext;
- protected final byte[] m_aClassID;
-
- protected boolean m_bDisposed = false;
- protected int m_nObjectState = -1;
-
- protected com.sun.star.embed.XStorage m_xParentStorage;
- protected com.sun.star.embed.XStorage m_xOwnStorage;
- protected String m_aEntryName;
-
- protected com.sun.star.embed.XStorage m_xNewParentStorage;
- protected com.sun.star.embed.XStorage m_xNewOwnStorage;
- protected String m_aNewEntryName;
- protected boolean m_bWaitSaveCompleted = false;
-
- protected EditorFrame m_aEditorFrame;
-
- protected Vector m_aListeners;
-
- com.sun.star.embed.VerbDescriptor[] m_pOwnVerbs;
-
- com.sun.star.embed.XEmbeddedClient m_xClient;
-
- Dimension m_aObjSize;
-
- // -------------------------------------------------------------
- protected Vector GetListeners()
- {
- if ( m_aListeners == null )
- m_aListeners = new Vector<Object>( 10, 10 );
-
- return m_aListeners;
- }
-
- // -------------------------------------------------------------
- protected Dimension UpdateSizeAndGetFromActive()
- {
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.ACTIVE )
- m_aObjSize = m_aEditorFrame.getAppSize();
-
- if ( m_aObjSize != null )
- return m_aObjSize;
- else
- return new Dimension();
- }
-
- // -------------------------------------------------------------
- protected void SwitchOwnPersistence( XStorage xParentStorage, XStorage xOwnStorage, String aEntryName )
- {
- if ( xOwnStorage != m_xOwnStorage )
- {
- if ( m_xOwnStorage != null )
- m_xOwnStorage.dispose();
- m_xParentStorage = xParentStorage;
- m_xOwnStorage = xOwnStorage;
- m_aEntryName = aEntryName;
- }
- }
-
- // -------------------------------------------------------------
- protected void SwitchOwnPersistence( XStorage xParentStorage, String aEntryName ) throws com.sun.star.io.IOException
- {
- if ( xParentStorage != m_xParentStorage || !aEntryName.equals( m_aEntryName ) )
- {
- try
- {
- XStorage xOwnStorage = xParentStorage.openStorageElement( aEntryName, com.sun.star.embed.ElementModes.READWRITE );
- SwitchOwnPersistence( xParentStorage, xOwnStorage, aEntryName );
- }
- catch( com.sun.star.uno.RuntimeException e )
- {
- throw e;
- }
- catch( com.sun.star.io.IOException e )
- {
- throw e;
- }
- catch( com.sun.star.uno.Exception e )
- {
- throw new com.sun.star.io.IOException( "Error while switching object storage!" );
- }
- }
- }
-
- // -------------------------------------------------------------
- protected static void SaveDataToStorage( XStorage xStorage, String aString, Dimension aDimension ) throws com.sun.star.io.IOException
- {
- try
- {
- // save the text
- XStream xStream = xStorage.openStreamElement( "content.txt", com.sun.star.embed.ElementModes.READWRITE );
- XComponent xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
- if ( xStreamComp == null )
- throw new com.sun.star.uno.RuntimeException();
-
- XOutputStream xOutStream = xStream.getOutputStream();
- XTruncate xTruncate = ( XTruncate ) UnoRuntime.queryInterface( XTruncate.class, xOutStream );
- if ( xTruncate == null )
- throw new com.sun.star.io.IOException();
-
- xTruncate.truncate();
- xOutStream.writeBytes( aString.getBytes() );
-
- // save the size
- xStream = xStorage.openStreamElement( "properties.txt", com.sun.star.embed.ElementModes.READWRITE );
- xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
- if ( xStreamComp == null )
- throw new com.sun.star.uno.RuntimeException();
-
- xOutStream = xStream.getOutputStream();
- xTruncate = ( XTruncate ) UnoRuntime.queryInterface( XTruncate.class, xOutStream );
- if ( xTruncate == null )
- throw new com.sun.star.io.IOException();
-
- xTruncate.truncate();
- String aProps = Integer.toString( (int)aDimension.getWidth() ) + "|" + Integer.toString( (int)aDimension.getHeight() );
- xOutStream.writeBytes( aProps.getBytes() );
-
- // set the media type
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, xStorage );
- if ( xPropSet == null )
- throw new com.sun.star.uno.RuntimeException();
- xPropSet.setPropertyValue( "MediaType", "application/x-openoffice-embedded-69474366-FD6F-4806-8374-8EDD1B6E771D" );
-
- XTransactedObject xTransact = ( XTransactedObject ) UnoRuntime.queryInterface( XTransactedObject.class, xStorage );
- if ( xTransact != null )
- xTransact.commit();
-
- xStreamComp.dispose();
- }
- catch( com.sun.star.uno.RuntimeException e )
- {
- throw e;
- }
- catch( com.sun.star.io.IOException e )
- {
- throw e;
- }
- catch( com.sun.star.uno.Exception e )
- {
- throw new com.sun.star.io.IOException( "Error while switching object storage!" );
- }
- }
-
- // -------------------------------------------------------------
- protected void PostEvent( String aEvEntryName )
- {
- if ( m_aListeners != null )
- {
- com.sun.star.document.EventObject aEventObject = new com.sun.star.document.EventObject( this, aEvEntryName );
- for ( int nInd = 0; nInd < m_aListeners.size(); nInd++ )
- {
- try
- {
- com.sun.star.document.XEventListener xListener = ( com.sun.star.document.XEventListener )
- UnoRuntime.queryInterface( com.sun.star.document.XEventListener.class, m_aListeners.get( nInd ) );
-
- if ( xListener != null )
- xListener.notifyEvent( aEventObject );
- }
- catch( java.lang.Exception e )
- {
- m_aListeners.remove( nInd );
- }
- }
- }
- }
-
- // -------------------------------------------------------------
- protected void StateChangeNotification( boolean bBeforeChange, int nOldState, int nNewState )
- {
- if ( m_aListeners != null )
- {
- com.sun.star.lang.EventObject aEventObject = new com.sun.star.lang.EventObject( this );
- for ( int nInd = 0; nInd < m_aListeners.size(); nInd++ )
- {
- try
- {
- com.sun.star.embed.XStateChangeListener xListener = ( com.sun.star.embed.XStateChangeListener )
- UnoRuntime.queryInterface( com.sun.star.embed.XStateChangeListener.class, m_aListeners.get( nInd ) );
-
- if ( xListener != null )
- {
- if ( bBeforeChange )
- xListener.changingState( aEventObject, nOldState, nNewState );
- else
- xListener.stateChanged( aEventObject, nOldState, nNewState );
- }
- }
- catch( java.lang.Exception e )
- {
- m_aListeners.remove( nInd );
- }
- }
- }
- }
-
- // -------------------------------------------------------------
- protected String ReadStringFromStream( XStorage xStorage, String aStreamName ) throws com.sun.star.io.IOException
- {
- if ( xStorage == null )
- throw new com.sun.star.uno.RuntimeException();
-
- try
- {
- XStream xStream = xStorage.openStreamElement( aStreamName, com.sun.star.embed.ElementModes.READWRITE );
- XComponent xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
- if ( xStreamComp == null )
- throw new com.sun.star.uno.RuntimeException();
-
- XInputStream xInStream = xStream.getInputStream();
- byte[][] aData = new byte[1][];
- aData[0] = new byte[0];
- String aResult = new String();
-
- int nLen = 0;
- do
- {
- nLen = xInStream.readBytes( aData, 10 );
- if ( aData.length == 0 || aData[0] == null )
- throw new com.sun.star.io.IOException();
- aResult += new String( aData[0] );
- } while( nLen > 0 );
-
- xStreamComp.dispose();
-
- return aResult;
- }
- catch( com.sun.star.uno.RuntimeException e )
- {
- throw e;
- }
- catch( com.sun.star.io.IOException e )
- {
- throw e;
- }
- catch( com.sun.star.uno.Exception e )
- {
- throw new com.sun.star.io.IOException( "Error while reading one of object streams!" );
- }
- }
-
- // -------------------------------------------------------------
- protected void ReadSizeFromOwnStorage() throws com.sun.star.io.IOException
- {
- String aSize = ReadStringFromStream( m_xOwnStorage, "properties.txt" );
-
- int nSeparator = aSize.indexOf( '|' );
- if ( nSeparator > 0 && nSeparator < aSize.length() - 1 )
- {
- int nWidth = Integer.parseInt( aSize.substring( 0, nSeparator ) );
- int nHeight = Integer.parseInt( aSize.substring( nSeparator + 1, aSize.length() ) );
- m_aObjSize = new Dimension( nWidth, nHeight );
- }
- }
-
- // -------------------------------------------------------------
- public OwnEmbeddedObject( XComponentContext context, byte[] aClassID )
- {
- m_xContext = context;
- m_aClassID = aClassID;
- };
-
- // -------------------------------------------------------------
- public void CloseFrameRequest()
- {
- com.sun.star.embed.XEmbeddedClient xClient = m_xClient;
- if ( xClient == null )
- return;
-
- UpdateSizeAndGetFromActive();
- StateChangeNotification( true, com.sun.star.embed.EmbedStates.ACTIVE, com.sun.star.embed.EmbedStates.RUNNING );
-
- try{
- xClient.visibilityChanged( false );
- } catch( com.sun.star.uno.Exception e ){}
-
- try{
- xClient.saveObject();
- } catch( com.sun.star.uno.Exception e ){}
-
- m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
- StateChangeNotification( false, com.sun.star.embed.EmbedStates.ACTIVE, m_nObjectState );
-
- PostEvent( "OnVisAreaChanged" );
- }
-
- // com.sun.star.embed.XCommonEmbedPersist:
- // -------------------------------------------------------------
- public void storeOwn() throws com.sun.star.embed.WrongStateException, com.sun.star.io.IOException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 || m_bWaitSaveCompleted )
- throw new com.sun.star.embed.WrongStateException();
-
- // nothing to do, if the object is in loaded state
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.LOADED )
- return;
-
- if ( m_xOwnStorage == null )
- throw new com.sun.star.io.IOException();
-
- PostEvent( "OnSave" );
-
- if ( m_aEditorFrame == null )
- throw new com.sun.star.uno.RuntimeException();
-
- SaveDataToStorage( m_xOwnStorage, m_aEditorFrame.getText(), UpdateSizeAndGetFromActive() );
-
- PostEvent( "OnSaveDone" );
- }
-
- // -------------------------------------------------------------
- public boolean isReadonly() throws com.sun.star.embed.WrongStateException
- {
- return false;
- }
-
- // -------------------------------------------------------------
- public void reload(com.sun.star.beans.PropertyValue[] aMediaArgs, com.sun.star.beans.PropertyValue[] aObjectArgs) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.io.IOException, com.sun.star.uno.Exception
- {
- // not implemented currently
- return;
- }
-
- // com.sun.star.embed.XEmbedPersist:
- // -------------------------------------------------------------
- public void setPersistentEntry(com.sun.star.embed.XStorage xStorage, String aEntryName, int nEntryConnectionMode, com.sun.star.beans.PropertyValue[] aMediaArgs, com.sun.star.beans.PropertyValue[] aObjectArgs) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.io.IOException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( xStorage == null || aEntryName.length() == 0 )
- throw new com.sun.star.lang.IllegalArgumentException();
-
- if ( ( m_nObjectState != -1 || nEntryConnectionMode == com.sun.star.embed.EntryInitModes.NO_INIT )
- && ( m_nObjectState == -1 || nEntryConnectionMode != com.sun.star.embed.EntryInitModes.NO_INIT ) )
- {
- // if the object is not loaded
- // it can not get persistant representation without initialization
-
- // if the object is loaded
- // it can switch persistant representation only without initialization
-
- throw new com.sun.star.embed.WrongStateException();
- }
-
- if ( m_bWaitSaveCompleted )
- {
- if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.NO_INIT )
- {
- if ( m_xParentStorage == xStorage && m_aEntryName.equals( aEntryName ) )
- saveCompleted( false );
- else if ( m_xNewParentStorage == xStorage && m_aNewEntryName.equals( aEntryName ) )
- saveCompleted( true );
- else
- throw new com.sun.star.embed.WrongStateException();
- }
- else
- throw new com.sun.star.embed.WrongStateException();
-
- return;
- }
-
- boolean bElExists = xStorage.hasByName( aEntryName );
-
- if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.DEFAULT_INIT )
- {
- SwitchOwnPersistence( xStorage, aEntryName );
- if ( bElExists )
- {
- XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_xOwnStorage );
- if ( xPropSet == null )
- throw new com.sun.star.uno.RuntimeException();
-
- String aMediaType = AnyConverter.toString( xPropSet.getPropertyValue( "MediaType" ) );
- if ( !aMediaType.equals( "application/x-openoffice-embedded-69474366-FD6F-4806-8374-8EDD1B6E771D" ) )
- throw new com.sun.star.lang.IllegalArgumentException();
-
- m_nObjectState = com.sun.star.embed.EmbedStates.LOADED;
- }
- else
- {
- m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
- m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
- m_aObjSize = m_aEditorFrame.getAppSize();
- }
- }
- else if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.TRUNCATE_INIT )
- {
- SwitchOwnPersistence( xStorage, aEntryName );
- m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
- m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
- m_aObjSize = m_aEditorFrame.getAppSize();
- }
- else
- throw new com.sun.star.lang.IllegalArgumentException();
- }
-
- // -------------------------------------------------------------
- public void storeToEntry(com.sun.star.embed.XStorage xStorage, String aEntryName, com.sun.star.beans.PropertyValue[] aMediaArgs, com.sun.star.beans.PropertyValue[] aObjectArgs) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.io.IOException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 || m_bWaitSaveCompleted )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.LOADED )
- {
- m_xParentStorage.copyElementTo( m_aEntryName, xStorage, aEntryName );
- }
- else
- {
- com.sun.star.embed.XStorage xSubStorage =
- xStorage.openStorageElement( aEntryName,
- com.sun.star.embed.ElementModes.READWRITE | com.sun.star.embed.ElementModes.TRUNCATE );
-
- String aContents = m_aEditorFrame.getText();
-
- SaveDataToStorage( xSubStorage, m_aEditorFrame.getText(), UpdateSizeAndGetFromActive() );
- }
- }
-
- // -------------------------------------------------------------
- public void storeAsEntry(com.sun.star.embed.XStorage xStorage, String aEntryName, com.sun.star.beans.PropertyValue[] aMediaArgs, com.sun.star.beans.PropertyValue[] aObjectArgs) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.io.IOException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 || m_bWaitSaveCompleted )
- throw new com.sun.star.embed.WrongStateException();
-
- com.sun.star.embed.XStorage xSubStorage = null;
-
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.LOADED )
- {
- xSubStorage =
- xStorage.openStorageElement( aEntryName,
- com.sun.star.embed.ElementModes.READWRITE | com.sun.star.embed.ElementModes.NOCREATE );
-
- m_xOwnStorage.copyToStorage( xSubStorage );
- }
- else
- {
- xSubStorage =
- xStorage.openStorageElement( aEntryName,
- com.sun.star.embed.ElementModes.READWRITE | com.sun.star.embed.ElementModes.TRUNCATE );
-
- SaveDataToStorage( xSubStorage, m_aEditorFrame.getText(), UpdateSizeAndGetFromActive() );
- }
-
- m_bWaitSaveCompleted = true;
- m_xNewOwnStorage = xSubStorage;
- m_xNewParentStorage = xStorage;
- m_aNewEntryName = aEntryName;
-
- }
-
- // -------------------------------------------------------------
- public void saveCompleted(boolean bUseNew) throws com.sun.star.embed.WrongStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- // it is allowed to call saveCompleted( false ) for nonstored objects
- if ( !m_bWaitSaveCompleted && !bUseNew )
- return;
-
- if ( !m_bWaitSaveCompleted )
- throw new com.sun.star.io.IOException();
-
- if ( bUseNew )
- {
- SwitchOwnPersistence( m_xNewParentStorage, m_xNewOwnStorage, m_aNewEntryName );
- PostEvent( "OnSaveAsDone" );
- }
- else
- {
- try
- {
- m_xNewOwnStorage.dispose();
- }
- catch( com.sun.star.uno.RuntimeException e )
- {}
- }
-
- m_xNewOwnStorage = null;
- m_xNewParentStorage = null;
- m_aNewEntryName = null;
- m_bWaitSaveCompleted = false;
- }
-
- // -------------------------------------------------------------
- public boolean hasEntry() throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_bWaitSaveCompleted )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( m_xOwnStorage != null )
- return true;
-
- return false;
- }
-
- // -------------------------------------------------------------
- public String getEntryName() throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 || m_bWaitSaveCompleted )
- throw new com.sun.star.embed.WrongStateException();
-
- return m_aEntryName;
- }
-
- // com.sun.star.embed.XVisualObject:
- // -------------------------------------------------------------
- public void setVisualAreaSize(long nAspect, com.sun.star.awt.Size aSize) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( nAspect == com.sun.star.embed.Aspects.MSOLE_ICON )
- // the ICON aspect should be handled by the container
- throw new com.sun.star.embed.WrongStateException();
-
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.LOADED )
- changeState( com.sun.star.embed.EmbedStates.RUNNING );
-
- if ( m_aEditorFrame == null )
- throw new com.sun.star.uno.RuntimeException();
-
- m_aObjSize.setSize( aSize.Width, aSize.Height );
- m_aEditorFrame.setAppSize( m_aObjSize );
- }
-
- // -------------------------------------------------------------
- public com.sun.star.awt.Size getVisualAreaSize(long nAspect) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( nAspect == com.sun.star.embed.Aspects.MSOLE_ICON )
- // the ICON aspect should be handled by the container
- throw new com.sun.star.embed.WrongStateException();
-
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.LOADED )
- changeState( com.sun.star.embed.EmbedStates.RUNNING );
-
- UpdateSizeAndGetFromActive();
-
- return new com.sun.star.awt.Size( (int)m_aObjSize.getWidth(), (int)m_aObjSize.getHeight() );
- }
-
- // -------------------------------------------------------------
- public VisualRepresentation getPreferredVisualRepresentation(long nAspect) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( nAspect == com.sun.star.embed.Aspects.MSOLE_ICON )
- // the ICON aspect should be handled by the container
- throw new com.sun.star.embed.WrongStateException();
-
- if ( m_nObjectState == com.sun.star.embed.EmbedStates.LOADED )
- changeState( com.sun.star.embed.EmbedStates.RUNNING );
-
- byte[] aData = m_aEditorFrame.getReplacementImage();
- VisualRepresentation aVisRep = new VisualRepresentation();
- aVisRep.Data = aData;
- aVisRep.Flavor = new com.sun.star.datatransfer.DataFlavor( "image/png", "png", new com.sun.star.uno.Type( byte[].class ) );
- return aVisRep;
- }
-
- // -------------------------------------------------------------
- public int getMapUnit(long nAspect) throws com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( nAspect == com.sun.star.embed.Aspects.MSOLE_ICON )
- // the ICON aspect should be handled by the container
- throw new com.sun.star.embed.WrongStateException();
-
- return com.sun.star.embed.EmbedMapUnits.PIXEL;
- }
-
- // com.sun.star.embed.XClassifiedObject:
- // -------------------------------------------------------------
- public byte[] getClassID()
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- return m_aClassID;
- }
-
- // -------------------------------------------------------------
- public String getClassName()
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- return new String();
- }
-
- // -------------------------------------------------------------
- public void setClassInfo(byte[] aClassID, String sClassName) throws com.sun.star.lang.NoSupportException
- {
- throw new com.sun.star.lang.NoSupportException();
- }
-
- // com.sun.star.embed.XComponentSupplier:
- // -------------------------------------------------------------
- public com.sun.star.util.XCloseable getComponent()
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- // allows no access to the component, this simple example just has no
- return null;
- }
-
- // com.sun.star.embed.XStateChangeBroadcaster:
- // -------------------------------------------------------------
- public void addStateChangeListener(com.sun.star.embed.XStateChangeListener xListener)
- {
- if ( m_bDisposed )
- return;
-
- GetListeners().add( xListener );
- }
-
- // -------------------------------------------------------------
- public void removeStateChangeListener(com.sun.star.embed.XStateChangeListener xListener)
- {
- if ( m_bDisposed )
- return;
-
- if ( m_aListeners != null )
- m_aListeners.remove( xListener );
- }
-
- // com.sun.star.document.XEventBroadcaster:
- // -------------------------------------------------------------
- public void addEventListener(com.sun.star.document.XEventListener xListener)
- {
- if ( m_bDisposed )
- return;
-
- GetListeners().add( xListener );
- }
-
- // -------------------------------------------------------------
- public void removeEventListener(com.sun.star.document.XEventListener xListener)
- {
- if ( m_bDisposed )
- return;
-
- if ( m_aListeners != null )
- m_aListeners.remove( xListener );
- }
-
- // com.sun.star.util.XCloseBroadcaster:
- // -------------------------------------------------------------
- public void addCloseListener(com.sun.star.util.XCloseListener xListener)
- {
- if ( m_bDisposed )
- return;
-
- GetListeners().add( xListener );
- }
-
- // -------------------------------------------------------------
- public void removeCloseListener(com.sun.star.util.XCloseListener xListener)
- {
- if ( m_bDisposed )
- return;
-
- if ( m_aListeners != null )
- m_aListeners.remove( xListener );
- }
-
- // com.sun.star.util.XCloseable:
- // -------------------------------------------------------------
- public void close(boolean bDeliverOwnership) throws com.sun.star.util.CloseVetoException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- com.sun.star.lang.EventObject aEventObject = new com.sun.star.lang.EventObject( this );
-
- if ( m_aListeners != null )
- {
- for ( int nInd = 0; nInd < m_aListeners.size(); nInd++ )
- {
- try
- {
- com.sun.star.util.XCloseListener xListener = ( com.sun.star.util.XCloseListener )
- UnoRuntime.queryInterface( com.sun.star.document.XEventListener.class, m_aListeners.get( nInd ) );
-
- if ( xListener != null )
- xListener.queryClosing( aEventObject, bDeliverOwnership );
- }
- catch( com.sun.star.util.CloseVetoException e )
- {
- throw e;
- }
- catch( java.lang.Exception e )
- {
- m_aListeners.remove( nInd );
- }
- }
-
- m_bDisposed = true;
-
- for ( int nInd = 0; nInd < m_aListeners.size(); nInd++ )
- {
- try
- {
- com.sun.star.util.XCloseListener xListener = ( com.sun.star.util.XCloseListener )
- UnoRuntime.queryInterface( com.sun.star.document.XEventListener.class, m_aListeners.get( nInd ) );
-
- if ( xListener != null )
- xListener.notifyClosing( aEventObject );
- }
- catch( java.lang.Exception e )
- {
- m_aListeners.remove( nInd );
- }
- }
-
- m_aListeners.clear();
- }
-
- m_bDisposed = true;
-
- if ( m_aEditorFrame != null )
- {
- m_aEditorFrame.dispose();
- m_aEditorFrame = null;
- }
-
- if ( m_xOwnStorage != null )
- {
- try {
- m_xOwnStorage.dispose();
- } catch( java.lang.Exception e ) {}
- m_xOwnStorage = null;
- }
- }
-
- // com.sun.star.embed.XEmbeddedObject:
- // -------------------------------------------------------------
- public void changeState(int nNewState) throws com.sun.star.embed.UnreachableStateException, com.sun.star.embed.WrongStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- int nOldState = m_nObjectState;
-
- if ( nOldState == nNewState )
- {
- if ( nOldState == com.sun.star.embed.EmbedStates.ACTIVE )
- {
- if ( m_aEditorFrame == null )
- throw new com.sun.star.uno.RuntimeException();
- m_aEditorFrame.toFront();
- }
-
- return;
- }
-
- if ( nNewState != com.sun.star.embed.EmbedStates.LOADED
- && nNewState != com.sun.star.embed.EmbedStates.RUNNING
- && nNewState != com.sun.star.embed.EmbedStates.ACTIVE )
- throw new com.sun.star.embed.UnreachableStateException();
-
- StateChangeNotification( true, nOldState, nNewState );
-
- try
- {
- if ( nOldState == com.sun.star.embed.EmbedStates.LOADED )
- {
- // switch to the RUNNING state first
- String aText = ReadStringFromStream( m_xOwnStorage, "content.txt" );
-
- EditorFrame aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
- aEditorFrame.setText( aText );
-
- ReadSizeFromOwnStorage();
-
- m_aEditorFrame = aEditorFrame;
- m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
-
- if ( nNewState == com.sun.star.embed.EmbedStates.ACTIVE )
- {
- if ( m_xClient == null )
- throw new com.sun.star.embed.WrongStateException();
-
- m_aEditorFrame.show();
- m_aEditorFrame.toFront();
-
- if ( m_aObjSize != null )
- aEditorFrame.setAppSize( m_aObjSize );
-
- m_xClient.visibilityChanged( true );
- m_nObjectState = com.sun.star.embed.EmbedStates.ACTIVE;
- }
- }
- else if ( nOldState == com.sun.star.embed.EmbedStates.RUNNING )
- {
- if ( nNewState == com.sun.star.embed.EmbedStates.LOADED )
- {
- EditorFrame aFrame = m_aEditorFrame;
- m_aEditorFrame = null;
- aFrame.dispose();
- m_nObjectState = nNewState;
- }
- else // nNewState == ACTIVE
- {
- if ( m_aEditorFrame == null )
- throw new com.sun.star.uno.RuntimeException();
-
- if ( m_xClient == null )
- throw new com.sun.star.embed.WrongStateException();
-
- m_aEditorFrame.show();
- m_aEditorFrame.toFront();
-
- if ( m_aObjSize != null )
- m_aEditorFrame.setAppSize( m_aObjSize );
-
- m_xClient.visibilityChanged( true );
-
- m_nObjectState = nNewState;
- }
- }
- else // nOldState == ACTIVE
- {
- UpdateSizeAndGetFromActive();
- if ( nNewState == com.sun.star.embed.EmbedStates.RUNNING )
- {
- m_aEditorFrame.hide();
- m_nObjectState = nNewState;
- }
- else // nNewState == LOADED
- {
- EditorFrame aFrame = m_aEditorFrame;
- m_aEditorFrame = null;
- aFrame.dispose();
- m_nObjectState = nNewState;
- }
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- if ( nOldState != m_nObjectState )
- StateChangeNotification( false, nOldState, m_nObjectState );
- throw e;
- }
-
- StateChangeNotification( true, nOldState, nNewState );
- }
-
- // -------------------------------------------------------------
- public int[] getReachableStates() throws com.sun.star.embed.NeedsRunningStateException, com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- int[] pStates = new int[3];
- pStates[0] = com.sun.star.embed.EmbedStates.LOADED;
- pStates[1] = com.sun.star.embed.EmbedStates.RUNNING;
- pStates[2] = com.sun.star.embed.EmbedStates.ACTIVE;
-
- return pStates;
- }
-
- // -------------------------------------------------------------
- public int getCurrentState() throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- return m_nObjectState;
- }
-
- // -------------------------------------------------------------
- public void doVerb(int nVerbID) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.embed.WrongStateException, com.sun.star.embed.UnreachableStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( nVerbID == com.sun.star.embed.EmbedVerbs.MS_OLEVERB_PRIMARY
- || nVerbID == com.sun.star.embed.EmbedVerbs.MS_OLEVERB_SHOW
- || nVerbID == com.sun.star.embed.EmbedVerbs.MS_OLEVERB_OPEN )
- changeState( com.sun.star.embed.EmbedStates.ACTIVE );
- else if ( nVerbID == com.sun.star.embed.EmbedVerbs.MS_OLEVERB_HIDE )
- changeState( com.sun.star.embed.EmbedStates.RUNNING );
- }
-
- // -------------------------------------------------------------
- public com.sun.star.embed.VerbDescriptor[] getSupportedVerbs() throws com.sun.star.embed.NeedsRunningStateException, com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- if ( m_pOwnVerbs == null )
- {
- try
- {
- XMultiComponentFactory xFactory = m_xContext.getServiceManager();
- Object obj = xFactory.createInstanceWithContext( "com.sun.star.configuration.ConfigurationProvider", m_xContext );
- XMultiServiceFactory xConfProvider = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, obj );
- if ( xConfProvider == null )
- throw new com.sun.star.uno.RuntimeException();
-
- Object[] aArgs = new Object[1];
- aArgs[0] = "/org.openoffice.Office.Embedding/Objects";
- Object oSettings = xConfProvider.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs );
- XNameAccess xObjConfNA = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oSettings );
- if ( xObjConfNA == null )
- throw new com.sun.star.uno.RuntimeException();
-
- Object oEmbObj = xObjConfNA.getByName( "69474366-FD6F-4806-8374-8EDD1B6E771D" );
- XNameAccess xEmbObjNA = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, oEmbObj );
- if ( xEmbObjNA == null )
- throw new com.sun.star.uno.RuntimeException();
-
- String[] pVerbShortcuts = (String[]) AnyConverter.toArray( xEmbObjNA.getByName( "ObjectVerbs" ) );
- if ( pVerbShortcuts != null && pVerbShortcuts.length != 0 )
- {
- com.sun.star.embed.VerbDescriptor[] pVerbs = new com.sun.star.embed.VerbDescriptor[pVerbShortcuts.length];
- aArgs[0] = "/org.openoffice.Office.Embedding/Verbs";
- Object oVerbs = xConfProvider.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs );
- XNameAccess xVerbsConfNA = ( XNameAccess ) UnoRuntime.queryInterface( XNameAccess.class, oVerbs );
- if ( xVerbsConfNA == null )
- throw new com.sun.star.uno.RuntimeException();
-
- for ( int nInd = 0; nInd < pVerbShortcuts.length; nInd++ )
- {
- try
- {
- XNameAccess xVerbNA = (XNameAccess) UnoRuntime.queryInterface(
- XNameAccess.class,
- xVerbsConfNA.getByName( pVerbShortcuts[nInd] ) );
- if ( xVerbNA != null )
- {
- com.sun.star.embed.VerbDescriptor aVerb = new com.sun.star.embed.VerbDescriptor();
- aVerb.VerbID = AnyConverter.toInt( xVerbNA.getByName( "VerbID" ) );
- aVerb.VerbName = AnyConverter.toString( xVerbNA.getByName( "VerbUIName" ) );
- aVerb.VerbFlags = AnyConverter.toInt( xVerbNA.getByName( "VerbFlags" ) );
- aVerb.VerbAttributes = AnyConverter.toInt( xVerbNA.getByName( "VerbAttributes" ) );
- pVerbs[nInd] = aVerb;
- }
- }
- catch( java.lang.Exception e )
- {
- }
-
- if ( pVerbs[nInd] == null )
- {
- // let the error be visible
- pVerbs[nInd] = new com.sun.star.embed.VerbDescriptor();
- pVerbs[nInd].VerbID = com.sun.star.embed.EmbedVerbs.MS_OLEVERB_PRIMARY;
- pVerbs[nInd].VerbName = "ERROR!";
- pVerbs[nInd].VerbFlags = 0;
- pVerbs[nInd].VerbAttributes = com.sun.star.embed.VerbAttributes.MS_VERBATTR_ONCONTAINERMENU;
- }
- }
-
- m_pOwnVerbs = pVerbs;
- }
- }
- catch( com.sun.star.uno.Exception e )
- {}
- }
-
- if ( m_pOwnVerbs != null )
- return m_pOwnVerbs;
-
- return new com.sun.star.embed.VerbDescriptor[0];
- }
-
- // -------------------------------------------------------------
- public void setClientSite(com.sun.star.embed.XEmbeddedClient xClient) throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- m_xClient = xClient;
- }
-
- // -------------------------------------------------------------
- public com.sun.star.embed.XEmbeddedClient getClientSite() throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- return m_xClient;
- }
-
- // -------------------------------------------------------------
- public void update() throws com.sun.star.embed.WrongStateException, com.sun.star.uno.Exception
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- // not implemented
- }
-
- // -------------------------------------------------------------
- public void setUpdateMode(int nMode) throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- // not implemented
- }
-
- // -------------------------------------------------------------
- public long getStatus(long nAspect) throws com.sun.star.embed.WrongStateException
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- if ( m_nObjectState == -1 )
- throw new com.sun.star.embed.WrongStateException();
-
- return 0;
- }
-
- // -------------------------------------------------------------
- public void setContainerName(String sName)
- {
- if ( m_bDisposed )
- throw new com.sun.star.lang.DisposedException();
-
- // not implemented
- }
-}
-
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
deleted file mode 100755
index 09f1dd94..00000000
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.openoffice.examples.embedding;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.Exception;
-import com.sun.star.lang.IllegalArgumentException;
-
-import com.sun.star.embed.*;
-
-import org.openoffice.examples.embedding.OwnEmbeddedObject;
-
-public final class OwnEmbeddedObjectFactory extends WeakBase
- implements com.sun.star.lang.XServiceInfo,
- com.sun.star.embed.XEmbedObjectFactory
-{
- private final XComponentContext m_xContext;
- private static final String m_implementationName = OwnEmbeddedObjectFactory.class.getName();
- private static final String[] m_serviceNames = {
- "org.openoffice.examples.embedding.Factory69474366FD6F480683748EDD1B6E771D" };
- private static final byte[] m_classID = { 0x69, 0x47, 0x43, 0x66, (byte)0xFD, 0x6F, 0x48, 0x06, (byte)0x83, 0x74, (byte)0x8E, (byte)0xDD, 0x1B, 0x6E, 0x77, 0x1D };
-
-
- public OwnEmbeddedObjectFactory( XComponentContext context )
- {
- m_xContext = context;
- };
-
- public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplementationName.equals( m_implementationName ) )
- xFactory = Factory.createComponentFactory(OwnEmbeddedObjectFactory.class, m_serviceNames);
- return xFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo( XRegistryKey xRegistryKey ) {
-// return Factory.writeRegistryServiceInfo(m_implementationName,
-// m_serviceNames,
-// xRegistryKey);
-// }
-
- // com.sun.star.lang.XServiceInfo:
- public String getImplementationName() {
- return m_implementationName;
- }
-
- public boolean supportsService( String sService ) {
- int len = m_serviceNames.length;
-
- for( int i=0; i < len; i++) {
- if (sService.equals(m_serviceNames[i]))
- return true;
- }
- return false;
- }
-
- public String[] getSupportedServiceNames() {
- return m_serviceNames;
- }
-
- // com.sun.star.embed.XEmbedObjectFactory:
- public Object createInstanceUserInit(byte[] aClassID, String sClassName, com.sun.star.embed.XStorage xStorage, String sEntName, int nEntryConnectionMode, com.sun.star.beans.PropertyValue[] aArgs, com.sun.star.beans.PropertyValue[] aObjectArgs) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.io.IOException, com.sun.star.uno.Exception
- {
- if ( xStorage == null || sEntName == null || sEntName.length() == 0 )
- throw new com.sun.star.lang.IllegalArgumentException();
-
- if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.DEFAULT_INIT )
- {
- if ( aClassID != null && aClassID.length != 0 )
- {
- if ( aClassID.length != m_classID.length )
- throw new com.sun.star.lang.IllegalArgumentException();
-
- for ( int i = 0; i < aClassID.length; i++ )
- if ( aClassID[i] != m_classID[i] )
- throw new com.sun.star.lang.IllegalArgumentException();
- }
- else if ( !xStorage.hasByName( sEntName ) )
- throw new com.sun.star.lang.IllegalArgumentException();
- }
- else if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.TRUNCATE_INIT )
- {
- if ( aClassID.length != m_classID.length )
- throw new com.sun.star.lang.IllegalArgumentException();
-
- for ( int i = 0; i < m_classID.length; i++ )
- if ( aClassID[i] != m_classID[i] )
- throw new com.sun.star.lang.IllegalArgumentException();
- }
-
- OwnEmbeddedObject aObject = new OwnEmbeddedObject( m_xContext, m_classID );
- aObject.setPersistentEntry( xStorage, sEntName, nEntryConnectionMode, aArgs, aObjectArgs );
-
- return aObject;
- }
-
-}
diff --git a/odk/examples/java/Inspector/Addon.xcu b/odk/examples/java/Inspector/Addon.xcu
deleted file mode 100644
index 7989e35d..00000000
--- a/odk/examples/java/Inspector/Addon.xcu
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<oor:node xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addon" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="OfficeToolBar">
- <node oor:name="org.openoffice.Object-Inspector" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Object Inspector</value>
- </prop>
- <node oor:name="m1" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>vnd.org.openoffice.inspector:post</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value/>
- <value xml:lang="en-US">~Start Inspector...</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value></value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- </oor:node>
-
diff --git a/odk/examples/java/Inspector/Addons.xcu b/odk/examples/java/Inspector/Addons.xcu
deleted file mode 100644
index ee44a8d6..00000000
--- a/odk/examples/java/Inspector/Addons.xcu
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="OfficeToolBar">
- <node oor:name="org.openoffice.Office.addon.Inspector" oor:op="replace">
- <node oor:name="toolBar_Inspector" oor:op="replace">
- <prop oor:name="URL" oor:type="xs:string">
- <value>org.openoffice.Office.addon.Inspector:inspect</value>
- </prop>
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Object Inspector</value>
- </prop>
- <prop oor:name="Target" oor:type="xs:string">
- <value>_self</value>
- </prop>
- <prop oor:name="Context" oor:type="xs:string">
- <value></value>
- </prop>
- </node>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/java/Inspector/HideableMutableTreeNode.java b/odk/examples/java/Inspector/HideableMutableTreeNode.java
deleted file mode 100644
index 37ac35f1..00000000
--- a/odk/examples/java/Inspector/HideableMutableTreeNode.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// *** HideableMutableTreeNode ***
-import javax.swing.*;
-import javax.swing.tree.*;
-
-/**
- * <code>HideableMutableTreeNode</code> is a <code>DefaultMutableTreeNode</code>
- * implementation that works with <code>HideableTreeModel</code>.
- */
-public class HideableMutableTreeNode extends DefaultMutableTreeNode {
- /**
- * The node is visible flag.
- */
- public boolean bIsvisible = true;
- private static final String SDUMMY = "Dummy";
-
-
- /**
- * Creates a tree node that has no parent and no children, but which
- * allows children.
- */
- public HideableMutableTreeNode() {
- super();
- }
-
- /**
- * Creates a tree node with no parent, no children, but which allows
- * children, and initializes it with the specified user object.
- *
- * @param userObject - an Object provided by the user that
- * constitutes the node's data
- */
- public HideableMutableTreeNode(Object _userObject) {
- super(_userObject);
- }
-
- /**
- * Creates a tree node with no parent, no children, initialized with the
- * specified user object, and that allows children only if specified.
- *
- * @param _userObject - an Object provided by the user that describes the node's data
- * @param _ballowsChildren - if true, the node is allowed to have childnodes -- otherwise, it is always a leaf node
- */
- public HideableMutableTreeNode(Object _userObject, boolean _ballowsChildren) {
- super(_userObject, _ballowsChildren);
- }
-
- /**
- * Checks if the node is visible.
- *
- * @return true if the node is visible, else false
- */
- public boolean isVisible() {
- return this.bIsvisible;
- }
-
- /**
- * Sets if the node is visible.
- *
- * @param returns true if the node is visible, else false
- */
- public void setVisible(boolean _bIsVisible) {
- this.bIsvisible = _bIsVisible;
- }
-
-
- public void addDummyNode(){
- removeDummyNode();
- DefaultMutableTreeNode oDefaultMutableTreeNode = new DefaultMutableTreeNode(SDUMMY);
- add(oDefaultMutableTreeNode);
-
- }
-
-
- public boolean removeDummyNode(){
- boolean breturn = false;
- if (getChildCount() == 1){
- DefaultMutableTreeNode oDefaultMutableTreeNode = (DefaultMutableTreeNode) getChildAt(0);
- if (oDefaultMutableTreeNode != null){
- if (oDefaultMutableTreeNode.getUserObject().equals(SDUMMY)){
- remove(0);
- breturn = true;
- }
- }
- }
- return breturn;
- }
-
-} \ No newline at end of file
diff --git a/odk/examples/java/Inspector/HideableTreeModel.java b/odk/examples/java/Inspector/HideableTreeModel.java
deleted file mode 100644
index 91444d14..00000000
--- a/odk/examples/java/Inspector/HideableTreeModel.java
+++ /dev/null
@@ -1,298 +0,0 @@
-
-// *** HideableTreeModel ***
-import java.awt.*;
-import java.awt.event.*;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Vector;
-import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.tree.*;
-
-
-public class HideableTreeModel implements TreeModel {
-
- private Vector modelListeners = new Vector();
- private Object root = null;
-
-
- public HideableTreeModel(TreeNode _root) {
- super();
- setRoot(_root);
- }
-
-
- public Object getRoot() {
- return this.root;
- }
-
-
- protected void setRoot(Object r) {
- this.root = r;
- }
-
-
- public Object[] getPathToRoot(Object node) {
- return getPathToRoot(node, 0);
- }
-
-
- private Object[] getPathToRoot(Object node, int i) {
- Object anode[];
- if(node == null) {
- if(i == 0) {
- return null;
- }
- anode = new Object[i];
- } else {
- i++;
- if(node == getRoot()) {
- anode = new Object[i];
- } else {
- anode = getPathToRoot(getParent(node), i);
- }
- anode[anode.length - i] = node;
- }
- return anode;
- }
-
-
- public void addTreeModelListener(TreeModelListener l) {
- modelListeners.addElement(l);
- }
-
-
- public void removeTreeModelListener(TreeModelListener l) {
- modelListeners.removeElement(l);
- }
-
-
- public void reload() {
- reload(getRoot());
- }
-
-
- public void reload(Object node) {
- if(node != null) {
- TreePath tp = new TreePath(getPathToRoot(node));
- fireTreeStructureChanged(new TreeModelEvent(this, tp));
- }
- }
-
-
- public void valueForPathChanged(TreePath path, Object newValue) {
- nodeChanged(path.getLastPathComponent());
- }
-
- public void nodeInserted(Object node, Object child) {
- nodeInserted(node, child, -1);
- }
-
-
- public void nodeInserted(Object node, Object child, int index) {
- if(index < 0) {
- index = getIndexOfChild(node, child);
- }
- if(node != null && child != null && index >= 0) {
- TreePath tp = new TreePath(getPathToRoot(node));
- int[] ai = { index };
- Object[] ac = { child };
- fireTreeNodesInserted(new TreeModelEvent(this, tp, ai, ac));
- }
- }
-
-
- public void nodeRemoved(Object node, Object child, int index) {
- if(node != null && child != null && index >= 0) {
- TreePath tp = new TreePath(getPathToRoot(node));
- int[] ai = { index };
- Object[] ac = { child };
- fireTreeNodesRemoved(new TreeModelEvent(this, tp, ai, ac));
- }
- }
-
-
- public void nodeChanged(Object node) {
- if(node != null) {
- TreePath tp = new TreePath(getPathToRoot(node));
- fireTreeNodesChanged(new TreeModelEvent(this, tp, null, null));
- }
- }
-
-
- protected void fireTreeNodesChanged(TreeModelEvent event) {
- for(int i = 0; i < modelListeners.size(); i++) {
- ((TreeModelListener)modelListeners.elementAt(i)).treeNodesChanged(event);
- }
- }
-
-
- protected void fireTreeNodesInserted(TreeModelEvent event) {
- for(int i = 0; i < modelListeners.size(); i++) {
- ((TreeModelListener)modelListeners.elementAt(i)).treeNodesInserted(event);
- }
- }
-
-
- protected void fireTreeNodesRemoved(TreeModelEvent event) {
- for(int i = 0; i < modelListeners.size(); i++) {
- ((TreeModelListener)modelListeners.elementAt(i)).treeNodesRemoved(event);
- }
- }
-
- protected void fireTreeStructureChanged(TreeModelEvent event) {
- for(int i = 0; i < modelListeners.size(); i++) {
- ((TreeModelListener)modelListeners.elementAt(i)).treeStructureChanged(event);
- }
- }
-
-
- public ArrayList getExpandedPaths(JTree tree) {
- ArrayList expandedPaths = new ArrayList();
- addExpandedPaths(tree, tree.getPathForRow(0), expandedPaths);
- return expandedPaths;
- }
-
-
- private void addExpandedPaths(JTree tree, TreePath path, ArrayList pathlist) {
- Enumeration aEnum = tree.getExpandedDescendants(path);
- while(aEnum.hasMoreElements()) {
- TreePath tp = (TreePath) aEnum.nextElement();
- pathlist.add(tp);
- addExpandedPaths(tree, tp, pathlist);
- }
- }
-
-
- public void expandPaths(JTree tree, ArrayList pathlist) {
- for(int i = 0; i < pathlist.size(); i++) {
- tree.expandPath((TreePath)pathlist.get(i));
- }
- }
-
-
- public boolean isLeaf(Object _oNode) {
- if(_oNode instanceof TreeNode) {
- return ((TreeNode) _oNode).isLeaf();
- }
- return true;
- }
-
-
-
- public Object getParent(Object node) {
- if(node != getRoot() && (node instanceof TreeNode)) {
- return ((TreeNode)node).getParent();
- }
- return null;
- }
-
-
- public boolean isNodeVisible(Object node) {
- if(node != getRoot()) {
- if(node instanceof HideableMutableTreeNode) {
- return ((HideableMutableTreeNode)node).isVisible();
- }
- }
- return true;
- }
-
-
- public boolean setNodeVisible(Object node, boolean v) {
- // can't hide root
- if(node != getRoot()) {
- if(node instanceof HideableMutableTreeNode) {
- HideableMutableTreeNode n = (HideableMutableTreeNode)node;
- if(v != n.isVisible()) {
- TreeNode parent = n.getParent();
- if(v) {
- // need to get index after showing...
- n.setVisible(v);
- int index = getIndexOfChild(parent, n);
- nodeInserted(parent, n, index);
- } else {
- // need to get index before hiding...
- int index = getIndexOfChild(parent, n);
- n.setVisible(v);
- nodeRemoved(parent, n, index);
- }
- }
- return true;
- }
- }
- return false;
- }
-
-
- public boolean isPathToNodeVisible(Object node) {
- Object[] path = getPathToRoot(node);
- for(int i = 0; i < path.length; i++) {
- if(!isNodeVisible(path[i])) {
- return false;
- }
- }
- return true;
- }
-
-
- public void ensurePathToNodeVisible(Object node) {
- Object[] path = getPathToRoot(node);
- for(int i = 0; i < path.length; i++) {
- setNodeVisible(path[i], true);
- }
- }
-
-
- public Object getChild(Object parent, int index) {
- if(parent instanceof TreeNode) {
- TreeNode p = (TreeNode) parent;
- for(int i = 0, j = -1; i < p.getChildCount(); i++) {
- TreeNode pc = (TreeNode)p.getChildAt(i);
- if(isNodeVisible(pc)) {
- j++;
- }
- if(j == index) {
- return pc;
- }
- }
- }
- return null;
- }
-
-
- public int getChildCount(Object parent) {
- int count = 0;
- if(parent instanceof TreeNode) {
- TreeNode p = (TreeNode) parent;
- for(int i = 0; i < p.getChildCount(); i++) {
- TreeNode pc = (TreeNode)p.getChildAt(i);
- if(isNodeVisible(pc)) {
- count++;
- }
- }
- }
- return count;
- }
-
-
- public int getIndexOfChild(Object parent, Object child) {
- int index = -1;
- if(parent instanceof TreeNode && child instanceof TreeNode) {
- TreeNode p = (TreeNode)parent;
- TreeNode c = (TreeNode)child;
- if(isNodeVisible(c)) {
- index = 0;
- for(int i = 0; i < p.getChildCount(); i++) {
- TreeNode pc = (TreeNode)p.getChildAt(i);
- if(pc.equals(c)) {
- return index;
- }
- if(isNodeVisible(pc)) {
- index++;
- }
- }
- }
- }
- return index;
- }
-} \ No newline at end of file
diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java
deleted file mode 100644
index 78f5cc18..00000000
--- a/odk/examples/java/Inspector/Inspector.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.XMessageBoxFactory;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.NamedValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.ui.dialogs.XExecutableDialog;
-import com.sun.star.ui.dialogs.XFolderPicker;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.CloseVetoException;
-import com.sun.star.util.XChangesBatch;
-import com.sun.star.util.XCloseable;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-import org.openoffice.XInstanceInspector;
-
-
-/** The purpose of this class is to provide a factory for creating the service
- * (<CODE>__getServiceFactory</CODE>) and writes the information into the given
- * registry key (<CODE>__writeRegistryServiceInfo</CODE>).
- */
-public class Inspector{
- public static final String sIDLDOCUMENTSUBFOLDER = "docs/common/ref/";
-
-
- /** This class implements the method of the interface XInstanceInspector.
- * Also the class implements the interfaces XServiceInfo, and XTypeProvider.
- */
- static public class _Inspector extends WeakBase implements XInstanceInspector, XServiceInfo{
-
- static private final String __serviceName = "org.openoffice.InstanceInspector";
- private HashMap aApplicationHashMap = new HashMap();
- private String sTitle = "Object Inspector";
- private Vector aHiddenDocuments = new Vector();
-// private String[] sApplicationDocUrls = new String[]{"private:factory/swriter", "private:factory/scalc", "private:factory/simpress", "private:factory/sdraw", "private:factory/sbase"};
-// private String[] sApplicationDocNames = new String[]{"Text Document", "Spreadsheet", "Presentation", "Drawing", "Database"};
- private XComponentContext m_xComponentContext;
- private HashMap aInspectorPanes = new HashMap();
- private XDialogProvider m_oSwingDialogProvider;
- private TDocSupplier oTDocSupplier;
- private Introspector m_oIntrospector = null;
- // TODO: improve these strings:
- private static final String sWRONGINSTALLATIONPATH = "Your selected path does not refer to an SDK-Installation!";
- /** Creates a new instance of Dialog */
- public _Inspector(XComponentContext _xComponentContext) {
- m_xComponentContext = _xComponentContext;
- m_oIntrospector = Introspector.getIntrospector(m_xComponentContext);
- aApplicationHashMap.put("private:factory/swriter", "Text Document");
- aApplicationHashMap.put("private:factory/scalc", "Spreadsheet");
- aApplicationHashMap.put("private:factory/simpress", "Presentation");
- aApplicationHashMap.put("private:factory/sdraw", "Drawing");
- aApplicationHashMap.put("private:factory/smath", "Formula");
- m_oSwingDialogProvider = new SwingDialogProvider(this, sTitle);
-// aApplicationHashMap.put("private:factory/sbase", "Database");
- }
-
-
- public XComponentContext getXComponentContext(){
- return m_xComponentContext;
- }
-
-
- public HashMap getInspectorPages(){
- return aInspectorPanes;
- }
-
-
- protected String getSDKPath(){
- String sRetPath = "";
- try{
- XNameAccess xNameAccess = getConfigurationAccess("org.openoffice.inspector.ObjectInspector", true);
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xNameAccess);
- sRetPath = (String) xPropertySet.getPropertyValue("SDKPath");
- }catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }
- return sRetPath;
- }
-
-
- public String getIDLPath(){
- String sRetPath = getSDKPath();
- if (m_oIntrospector.isValidSDKInstallationPath(sRetPath)){
- sRetPath = m_oIntrospector.addToPath(sRetPath, sIDLDOCUMENTSUBFOLDER);
- }
- else{
- sRetPath = "";
- }
- return sRetPath;
- }
-
-
- public void openIdlFileforSelectedNode(){
- InspectorPane oInspectorPane = m_oSwingDialogProvider.getSelectedInspectorPage();
- if (oInspectorPane != null){
- XUnoNode oUnoNode = oInspectorPane.getSelectedNode();
- if (oUnoNode != null){
- String sPath = getIDLPath();
- oUnoNode.openIdlDescription(sPath);
- }
- }
- }
-
-
- public void assignSDKPath() {
- try {
- String sInstallationFolder = "";
- Object oFolderPicker = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.ui.dialogs.FolderPicker", m_xComponentContext);
- XFolderPicker xFolderPicker = (XFolderPicker) UnoRuntime.queryInterface(XFolderPicker.class, oFolderPicker);
- XExecutableDialog xExecutable = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oFolderPicker);
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oFolderPicker);
- String sPath = getSDKPath();
- if (!sPath.equals("")){
- xFolderPicker.setDisplayDirectory(sPath);
- }
- xFolderPicker.setTitle("Add the Path to your SDK installation");
- short nResult = xExecutable.execute();
- if (nResult == com.sun.star.ui.dialogs.ExecutableDialogResults.OK){
- sInstallationFolder = xFolderPicker.getDirectory();
- if (m_oIntrospector.isValidSDKInstallationPath(sInstallationFolder)){
- XNameAccess xNameAccess = getConfigurationAccess(true);
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xNameAccess);
- xPropertySet.setPropertyValue("SDKPath", sInstallationFolder);
- XChangesBatch xBatch = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, xNameAccess);
- xBatch.commitChanges();
- }
- else{
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xFolderPicker);
- Object oWindow = xPropertySet.getPropertyValue("Window");
- XWindowPeer xWindowPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, oWindow);
- showErrorMessageBox(xWindowPeer, sTitle, sWRONGINSTALLATIONPATH);
- assignSDKPath();
- }
- }
- xComponent.dispose();
- }catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }}
-
-
- public void showErrorMessageBox(XWindowPeer _xWindowPeer, String _sTitle, String _sMessage){
- try {
- Object oToolkit = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit", m_xComponentContext);
- XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class, oToolkit);
- Rectangle aRectangle = new Rectangle();
- XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xWindowPeer, aRectangle, "errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
- if (xMessageBox != null){
- short nResult = xMessageBox.execute();
- xComponent.dispose();
- }
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace(System.out);
- }}
-
-
- public void inspect(java.lang.Object _oUserDefinedObject, String _sTitle) throws com.sun.star.uno.RuntimeException {
- try {
- int nPageIndex = m_oSwingDialogProvider.getInspectorPageCount();
- SwingTreeControlProvider oSwingTreeControlProvider = new SwingTreeControlProvider(m_oSwingDialogProvider);
- InspectorPane oInspectorPane = new InspectorPane(getXComponentContext(), m_oSwingDialogProvider, oSwingTreeControlProvider, getSourceCodeLanguage());
- oInspectorPane.inspect(_oUserDefinedObject, _sTitle);
- getInspectorPages().put(_sTitle, oInspectorPane);
- m_oSwingDialogProvider.show(nPageIndex);
- }catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }}
-
-
- public void inspectOpenEmptyDocument(String _sApplicationDocUrl){
- XComponent xComponent = getTDocSupplier().openEmptyDocument(_sApplicationDocUrl);
- String sRootTitle = (String) aApplicationHashMap.get(_sApplicationDocUrl);
- inspect(xComponent, sRootTitle);
- aHiddenDocuments.add(xComponent);
- }
-
-
- public void inspectOpenDocument(String _sTDocUrl){
- String sTreeNodeName = getTDocSupplier().getTitleByTDocUrl(_sTDocUrl);
- XModel xTDocModel = getTDocSupplier().getXModelByTDocUrl(_sTDocUrl);
- inspect(xTDocModel, sTreeNodeName);
- }
-
-
- public void inspectSelectedNode(){
- InspectorPane oInspectorPane = m_oSwingDialogProvider.getSelectedInspectorPage();
- if (oInspectorPane != null){
- XUnoNode oUnoNode = oInspectorPane.getSelectedNode();
- Object oUnoObject = oUnoNode.getUnoObject();
- if (oUnoObject != null){
- String sNodeDescription = UnoNode.getNodeDescription(oUnoObject);
- inspect(oUnoObject, sNodeDescription);
- }
- }
- }
-
-
- public void addSourceCodeOfSelectedNode(){
- InspectorPane oInspectorPane = m_oSwingDialogProvider.getSelectedInspectorPage();
- if (oInspectorPane != null){
- oInspectorPane.addSourceCodeOfSelectedNode();
- }
- }
-
-
- public void invokeSelectedMethod(){
- InspectorPane oInspectorPane = m_oSwingDialogProvider.getSelectedInspectorPage();
- if (oInspectorPane != null){
- oInspectorPane.invokeSelectedMethodNode();
- }
- }
-
-
- public void setSourceCodeLanguage(final int _nLanguage){
- try{
- String sLanguage = "Java";
- XNameAccess xNameAccess = getConfigurationAccess("org.openoffice.inspector.ObjectInspector", true);
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xNameAccess);
- switch (_nLanguage){
- case XLanguageSourceCodeGenerator.nJAVA:
- sLanguage = "Java";
- break;
- case XLanguageSourceCodeGenerator.nCPLUSPLUS:
- sLanguage = "CPlusPlus";
- break;
- case XLanguageSourceCodeGenerator.nBASIC:
- sLanguage = "Basic";
- break;
- default:
- System.out.println("Warning: Sourcecode language is not defined!");
- }
- xPropertySet.setPropertyValue("Language", sLanguage);
- XChangesBatch xBatch = (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, xNameAccess);
- xBatch.commitChanges();
- for (int i = 0; i < m_oSwingDialogProvider.getInspectorPageCount(); i++){
- m_oSwingDialogProvider.getInspectorPage(i).convertCompleteSourceCode(_nLanguage);
- }
- }catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }}
-
-
- private TDocSupplier getTDocSupplier(){
- if (oTDocSupplier == null){
- oTDocSupplier = new TDocSupplier(m_xComponentContext);
- }
- return oTDocSupplier;
- }
-
- public String[] getTDocUrls(){
- return getTDocSupplier().getTDocUrls();
- }
-
-
- public String[] getTDocTitles(String[] _sTDocUrls){
- return getTDocSupplier().getTDocTitles(_sTDocUrls);
- }
-
-
- public String[][] getApplicationUrls(){
- Set aSet = aApplicationHashMap.keySet();
- String[][] sReturnList = new String[aSet.size()][];
- int n= 0;
- for ( Iterator i = aSet.iterator(); i.hasNext(); ){
- String[] sSingleApplication = new String[2];
- sSingleApplication[0] = (String) i.next();
- // assign the title in the second index
- sSingleApplication[1] = (String) aApplicationHashMap.get(sSingleApplication[0]);
- sReturnList[n++] = sSingleApplication;
- }
- return sReturnList;
- }
-
-
- public void disposeHiddenDocuments(){
- int nHiddenCount = aHiddenDocuments.size();
- if (nHiddenCount > 0){
- for (int i = nHiddenCount - 1; i >= 0; i--){
- XComponent xComponent = (XComponent) aHiddenDocuments.get(i);
- if (xComponent != null){
- try {
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xComponent);
- xCloseable.close(true);
- aHiddenDocuments.remove(i);
- } catch (CloseVetoException ex) {
- ex.printStackTrace();
- }
- }
- }
- }
- }
-
-
- public static String[] getServiceNames() {
- String[] sSupportedServiceNames = { __serviceName };
- return sSupportedServiceNames;
- }
-
- // Implement the interface XServiceInfo
- /** Get all supported service names.
- * @return Supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- // Implement the interface XServiceInfo
- /** Test, if the given service will be supported.
- * @param sService Service name.
- * @return Return true, if the service will be supported.
- */
- public boolean supportsService( String sServiceName ) {
- return sServiceName.equals( __serviceName );
- }
-
- // Implement the interface XServiceInfo
- /** Get the implementation name of the component.
- * @return Implementation name of the component.
- */
- public String getImplementationName() {
- return _Inspector.class.getName();
- }
-
-
- private int getSourceCodeLanguage(){
- int nLanguage = XLanguageSourceCodeGenerator.nJAVA;
- try{
- XNameAccess xNameAccess = getConfigurationAccess("org.openoffice.inspector.ObjectInspector", false);
- String sLanguage = (String) xNameAccess.getByName("Language");
- if (sLanguage.toUpperCase().equals("JAVA")){
- nLanguage = XLanguageSourceCodeGenerator.nJAVA;
- }
- else if (sLanguage.toUpperCase().equals("BASIC")){
- nLanguage = XLanguageSourceCodeGenerator.nBASIC;
- }
- else if (sLanguage.toUpperCase().equals("CPLUSPLUS")){
- nLanguage = XLanguageSourceCodeGenerator.nCPLUSPLUS;
- }
- else{
- System.out.println("Warning: Sourcecode language " + sLanguage + " is not defined!");
- }
- m_oSwingDialogProvider.selectSourceCodeLanguage(nLanguage);
- }catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }
- return nLanguage;
- }
-
-
- public XNameAccess getConfigurationAccess(boolean _bUpdate){
- return getConfigurationAccess("org.openoffice.inspector.ObjectInspector", _bUpdate);
- }
-
-
- public XNameAccess getConfigurationAccess(String _sNodePath, boolean update) {
- XNameAccess xNameAccess = null;
- try {
- String sAccess = "";
- if (update) {
- sAccess = "com.sun.star.configuration.ConfigurationUpdateAccess";
- }
- else{
- sAccess = "com.sun.star.configuration.ConfigurationAccess";
- }
- XMultiComponentFactory xMCF = m_xComponentContext.getServiceManager();
- Object oDefaultProvider = xMCF.createInstanceWithContext("com.sun.star.configuration.DefaultProvider", this.getXComponentContext());
- XMultiServiceFactory xMSFCfg = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDefaultProvider);
- Object oAccess = xMSFCfg.createInstanceWithArguments(sAccess, new Object[]{new NamedValue("nodepath", _sNodePath)});
- xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oAccess);
- } catch (com.sun.star.uno.Exception e) {
- }
- return xNameAccess;
- }
-
-
- }
-
-// end of inner class
-
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleComponentFactory</code> for creating
- * the component
- * @param sImplName the name of the implementation for which a
- * service is desired
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory( String sImplName )
- {
- XSingleComponentFactory xFactory = null;
- if ( sImplName.equals( _Inspector.class.getName() ) )
- xFactory = Factory.createComponentFactory(_Inspector.class, _Inspector.getServiceNames());
- if ( xFactory == null )
- xFactory = InspectorAddon.__getComponentFactory(sImplName);
- return xFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- return (Factory.writeRegistryServiceInfo(_Inspector.class.getName(), _Inspector.getServiceNames(), regKey)
- && InspectorAddon.__writeRegistryServiceInfo(regKey));
- }
-}
-
diff --git a/odk/examples/java/Inspector/InspectorAddon.java b/odk/examples/java/Inspector/InspectorAddon.java
deleted file mode 100644
index 92c8ab5c..00000000
--- a/odk/examples/java/Inspector/InspectorAddon.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.frame.DispatchDescriptor;
-import com.sun.star.frame.FrameSearchFlag;
-import com.sun.star.frame.XController;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XStatusListener;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lib.uno.helper.Factory;
-
-
-public class InspectorAddon {
- /** This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class InspectorAddonImpl extends WeakBase implements XDispatchProvider, XInitialization, XServiceInfo {
- private static XModel xModel = null;
- org.openoffice.XInstanceInspector xInstInspector = null;
-// Dispatcher oDispatcher = null;
- XFrame m_xFrame = null;
-
- private static final String[] m_serviceNames = {
- "org.openoffice.InstanceInspectorAddon",
- "com.sun.star.frame.ProtocolHandler" };
- ;
- private XComponentContext m_xContext = null;
-
- /** Creates a new instance of InspectorAddon */
- public InspectorAddonImpl(XComponentContext _xContext) {
- m_xContext = _xContext;
- }
-
- public XDispatch queryDispatch( /*IN*/com.sun.star.util.URL aURL, /*IN*/String sTargetFrameName, /*IN*/int iSearchFlags ) {
- XDispatch xRet = null;
- if ( aURL.Protocol.compareTo("org.openoffice.Office.addon.Inspector:") == 0 ) {
- if ( aURL.Path.compareTo( "inspect" ) == 0 ){
- // Todo: Check if the frame is already administered (use hashtable)
- xRet = new Dispatcher(m_xFrame);
- }
- }
- return xRet;
- }
-
-
- public XDispatch[] queryDispatches( /*IN*/DispatchDescriptor[] seqDescripts ) {
- int nCount = seqDescripts.length;
- XDispatch[] lDispatcher = new XDispatch[nCount];
- for( int i=0; i<nCount; ++i )
- lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL, seqDescripts[i].FrameName, seqDescripts[i].SearchFlags );
- return lDispatcher;
- }
-
-
- public void initialize( Object[] object ) throws com.sun.star.uno.Exception {
- if ( object.length > 0 ){
- m_xFrame = ( XFrame ) UnoRuntime.queryInterface(XFrame.class, object[ 0 ] );
- }
- }
-
- public class Dispatcher implements XDispatch{
- private XFrame m_xFrame = null;
- private XModel xModel = null;
-
- public Dispatcher(XFrame _xFrame){
- m_xFrame = _xFrame;
- if (m_xFrame != null){
- XController xController = m_xFrame.getController();
- if (xController != null){
- xModel = xController.getModel();
- }
- }
- }
-
- // XDispatch
- public void dispatch( /*IN*/com.sun.star.util.URL _aURL, /*IN*/com.sun.star.beans.PropertyValue[] aArguments ) {
- try{
- if ( _aURL.Protocol.compareTo("org.openoffice.Office.addon.Inspector:") == 0 ){
- if ( _aURL.Path.equals("inspect")){
- Object oUnoInspectObject = xModel;
- com.sun.star.lang.XMultiComponentFactory xMCF = m_xContext.getServiceManager();
- if (xInstInspector == null){
- Object obj= xMCF.createInstanceWithContext("org.openoffice.InstanceInspector", m_xContext);
- xInstInspector = (org.openoffice.XInstanceInspector)UnoRuntime.queryInterface(org.openoffice.XInstanceInspector.class, obj);
- }
- if ((m_xFrame == null) || (xModel == null)){
- Object oDesktop = xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
- m_xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oDesktop);
- oUnoInspectObject = m_xFrame;
- }
- XPropertySet xFramePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xFrame);
- String sTitle = (String) xFramePropertySet.getPropertyValue("Title");
- String[] sTitleList = sTitle.split(" - ");
- if (sTitleList.length > 0){
- sTitle = sTitleList[0];
- }
- xInstInspector.inspect(oUnoInspectObject, sTitle);
- }
- }
- } catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace(System.out);
- }}
-
- public void addStatusListener( /*IN*/XStatusListener xControl, /*IN*/com.sun.star.util.URL aURL ) {
- }
-
- public void removeStatusListener( /*IN*/XStatusListener xControl, /*IN*/com.sun.star.util.URL aURL ) {
- }
-
-
- }
-
-
- public static String[] getServiceNames() {
- return m_serviceNames;
- }
-
- // Implement the interface XServiceInfo
- /** Get all supported service names.
- * @return Supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- // Implement the interface XServiceInfo
- /** Test, if the given service will be supported.
- * @param sService Service name.
- * @return Return true, if the service will be supported.
- */
- public boolean supportsService( String sServiceName ) {
- int len = m_serviceNames.length;
-
- for( int i=0; i < len; i++) {
- if ( sServiceName.equals( m_serviceNames[i] ) )
- return true;
- }
-
- return false;
- }
-
- // Implement the interface XServiceInfo
- /** Get the implementation name of the component.
- * @return Implementation name of the component.
- */
- public String getImplementationName() {
- return InspectorAddonImpl.class.getName();
- }
-
- }
-
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleComponentFactory</code> for creating
- * the component
- * @param sImplName the name of the implementation for which a
- * service is desired
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory( String sImplName )
- {
- XSingleComponentFactory xFactory = null;
- if ( sImplName.equals( InspectorAddonImpl.class.getName() ) )
- xFactory = Factory.createComponentFactory(InspectorAddonImpl.class, InspectorAddonImpl.getServiceNames());
- return xFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- return Factory.writeRegistryServiceInfo(InspectorAddonImpl.class.getName(), InspectorAddonImpl.getServiceNames(), regKey);
- }
-
-// __create( XComponentContext ){
-//
-// }
-}
diff --git a/odk/examples/java/Inspector/InspectorPane.java b/odk/examples/java/Inspector/InspectorPane.java
deleted file mode 100644
index 14d14478..00000000
--- a/odk/examples/java/Inspector/InspectorPane.java
+++ /dev/null
@@ -1,629 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.TypeClass;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.beans.XIntrospectionAccess;
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.reflection.XIdlMethod;
-import javax.swing.tree.ExpandVetoException;
-import org.openoffice.XInstanceInspector;
-import javax.swing.tree.TreePath;
-import javax.swing.event.TreeWillExpandListener;
-
- public class InspectorPane extends WeakBase implements XInstanceInspector{ //, XServiceInfo
- private XIdlMethod[] xIdlMethods;
- private Property[] aProperties;
- private boolean bIncludeContent = false;
- private XComponentContext m_xComponentContext;
- private XDialogProvider m_xDialogProvider;
- private Introspector m_oIntrospector = null;
- private SourceCodeGenerator m_oSourceCodeGenerator;
- private XTreeControlProvider m_xTreeControlProvider;
- private String sTitle = "";
-
-
- /** The constructor of the inner class has a XMultiServiceFactory parameter.
- * @param xMultiServiceFactory XMultiServiceFactory
- */
- public InspectorPane(XComponentContext _xComponentContext, XDialogProvider _xDialogProvider, XTreeControlProvider _xTreeControlProvider, int _nLanguage) {
- m_xComponentContext = _xComponentContext;
- m_xTreeControlProvider = _xTreeControlProvider;
- m_xDialogProvider = _xDialogProvider;
- m_oIntrospector = Introspector.getIntrospector(m_xComponentContext);
- m_oSourceCodeGenerator = new SourceCodeGenerator(_nLanguage);
- _xTreeControlProvider.addInspectorPane(this);
- }
-
-
- private void setMaximumOfProgressBar(Object _oUnoObject){
- int nMaxValue = 0;
- xIdlMethods = m_oIntrospector.getMethods(_oUnoObject);
- aProperties = m_oIntrospector.getProperties(_oUnoObject);
- }
-
-
- /** Inspect the given object for methods, properties, interfaces, and
- * services.
- * @param a The object to inspect
- * @throws RuntimeException If
- */
- public void inspect(java.lang.Object _oUserDefinedObject, String _sTitle) throws com.sun.star.uno.RuntimeException {
- try {
- Object oContainer = m_xTreeControlProvider.inspect(_oUserDefinedObject, _sTitle);
- m_xDialogProvider.addInspectorPage(getTitle(), oContainer);
- }
- catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }}
-
-
- public void setTitle(String _sTitle){
- if (_sTitle != null){
- if (_sTitle.length() > 0){
- sTitle = _sTitle;
- }
- }
- }
-
-
- public String getTitle(){
- return sTitle;
- }
-
-
-
- private Type[] getTypes(Object _oUnoObject){
- Type[] aTypes = null;
- if (m_oIntrospector.isArray(_oUnoObject)){
- aTypes = (Type[])_oUnoObject;
- }
- else{
- aTypes = m_oIntrospector.getInterfaces(_oUnoObject);
- }
- return aTypes;
- }
-
-
- private Object invoke(XUnoMethodNode _oUnoMethodNode){
- try{
- String sParamValueDescription = "";
- Object oUnoReturnObject = _oUnoMethodNode.invoke();
- boolean bHasParameters = _oUnoMethodNode.hasParameters();
- boolean bIsPrimitive = _oUnoMethodNode.isPrimitive();
- if (bHasParameters){
- sParamValueDescription = " (" + m_oSourceCodeGenerator.getMethodParameterValueDescription(_oUnoMethodNode, _oUnoMethodNode.getLastParameterObjects(), true) + ")";
- }
- if (oUnoReturnObject != null ){
- String sNodeDescription = "";
- XUnoNode oUnoNode = null;
- if (_oUnoMethodNode.getXIdlMethod().getReturnType().getTypeClass().getValue() == TypeClass.VOID_value){
- sNodeDescription += _oUnoMethodNode.getXIdlMethod().getReturnType().getName() + " " + _oUnoMethodNode.getXIdlMethod().getName() + sParamValueDescription;
- _oUnoMethodNode.setLabel(sNodeDescription);
- m_xTreeControlProvider.nodeChanged(_oUnoMethodNode);
- }
- else if (bHasParameters || !bIsPrimitive){
- if (bIsPrimitive){
- sNodeDescription += m_oSourceCodeGenerator.getStringValueOfObject(oUnoReturnObject, _oUnoMethodNode.getTypeClass());
- }
- else{
- Any aReturnObject = Any.complete(oUnoReturnObject);
- String sShortClassName = m_oIntrospector.getShortClassName(aReturnObject.getType().getTypeName());
- sNodeDescription += m_oSourceCodeGenerator.getVariableNameforUnoObject(sShortClassName);
- }
- if (m_oIntrospector.isArray(oUnoReturnObject)){
- if (m_oIntrospector.isUnoTypeObject(oUnoReturnObject)){
- oUnoNode = addUnoFacetteNode(_oUnoMethodNode, XUnoFacetteNode.SINTERFACEDESCRIPTION, _oUnoMethodNode.getUnoObject());
- }
- else if(m_oIntrospector.isUnoPropertyTypeObject(oUnoReturnObject)){
- oUnoNode = addUnoFacetteNode(_oUnoMethodNode, XUnoFacetteNode.SPROPERTYINFODESCRIPTION, oUnoReturnObject);
- }
- else if(m_oIntrospector.isUnoPropertyValueTypeObject(oUnoReturnObject)){
- oUnoNode = addUnoFacetteNode(_oUnoMethodNode, XUnoFacetteNode.SPROPERTYVALUEDESCRIPTION, oUnoReturnObject);
- }
- }
- if (oUnoNode == null){
- if (bHasParameters){
- sNodeDescription += sParamValueDescription;
- }
- oUnoNode = addUnoNode(null, oUnoReturnObject, sNodeDescription);
- if (bHasParameters){
- oUnoNode.setParameterObjects(_oUnoMethodNode.getLastParameterObjects());
- }
- }
- if (oUnoNode != null){
- oUnoNode.setFoldable(!bIsPrimitive);
- _oUnoMethodNode.setFoldable(false);
- _oUnoMethodNode.addChildNode(oUnoNode);
- m_xTreeControlProvider.nodeInserted(_oUnoMethodNode, oUnoNode, _oUnoMethodNode.getChildCount()-1);
- }
- }
- else{
- if (bIsPrimitive){
- sNodeDescription = _oUnoMethodNode.getStandardMethodDescription() + "=" + UnoMethodNode.getDisplayValueOfPrimitiveType(oUnoReturnObject);
- _oUnoMethodNode.setLabel(sNodeDescription);
- m_xTreeControlProvider.nodeChanged(_oUnoMethodNode);
- }
- }
- }
- // ReturnObject of method node == null..
- else{
- if (!bHasParameters){
- _oUnoMethodNode.setLabel(_oUnoMethodNode.getLabel() + " = null");
- }
- else{
- _oUnoMethodNode.setLabel(_oUnoMethodNode.getXIdlMethod().getName() + sParamValueDescription + " = null");
- }
- m_xTreeControlProvider.nodeChanged(_oUnoMethodNode);
- }
- return oUnoReturnObject;
- }catch(Exception exception ) {
- return null;
- }}
-
-
- public void invokeSelectedMethodNode(){
- XTreePathProvider xTreePathProvider = m_xTreeControlProvider.getSelectedPath();
- XUnoNode oUnoNode = xTreePathProvider.getLastPathComponent();
- if (oUnoNode instanceof XUnoMethodNode){
- invoke((XUnoMethodNode) oUnoNode);
- m_xTreeControlProvider.expandPath(xTreePathProvider);
- }
- }
-
-
- public void addSourceCodeOfSelectedNode(){
- XTreePathProvider oTreePathProvider = m_xTreeControlProvider.getSelectedPath();
- XUnoNode oUnoNode = oTreePathProvider.getLastPathComponent();
- if (oUnoNode instanceof XUnoMethodNode){
- XUnoMethodNode oUnoMethodNode = (XUnoMethodNode) oUnoNode;
- if (!oUnoMethodNode.isInvoked() && oUnoMethodNode.isInvokable()){
- invoke(oUnoMethodNode);
- }
- }
- String sSourceCode = m_oSourceCodeGenerator.addSourceCodeOfUnoObject(oTreePathProvider, true, true, true);
- m_xTreeControlProvider.setSourceCode(sSourceCode);
- }
-
-
- public void convertCompleteSourceCode(int _nLanguage){
- String sSourceCode = m_oSourceCodeGenerator.convertAllUnoObjects(_nLanguage);
- m_xTreeControlProvider.setSourceCode(sSourceCode);
- }
-
- protected XUnoNode getSelectedNode(){
- return m_xTreeControlProvider.getSelectedNode();
- }
-
-
- // add the object to the hashtable for a possible access in the tree
- private XUnoFacetteNode addUnoFacetteNode(XUnoNode _oParentNode, String _sNodeDescription, Object _oUnoObject){
- return m_xTreeControlProvider.addUnoFacetteNode( _oParentNode, _sNodeDescription, _oUnoObject);
- }
-
-
- private XUnoMethodNode addMethodNode(Object _objectElement, XIdlMethod _xIdlMethod){
- return m_xTreeControlProvider.addMethodNode(_objectElement, _xIdlMethod);
- }
-
-
-
- public void addMethodsToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, XIdlMethod[] _xIdlMethods){
- if (this.m_oIntrospector.isValid(_xIdlMethods)){
- for ( int n = 0; n < _xIdlMethods.length; n++ ) {
- XIdlMethod xIdlMethod = _xIdlMethods[n];
- if (!xIdlMethod.getDeclaringClass().getName().equals("com.sun.star.uno.XInterface")){
- XUnoMethodNode oChildNode = addMethodNode(_oUnoParentObject, xIdlMethod);
- if (oChildNode != null){
- _oGrandParentNode.addChildNode(oChildNode);
- }
- }
- }
- }
- }
-
-
- private void addFacetteNodesToTreeNode(XUnoNode _oParentNode, Object _oUnoObject){
- if (m_oIntrospector.hasMethods(_oUnoObject)){
- XUnoFacetteNode oUnoFacetteNode = addUnoFacetteNode(_oParentNode, XUnoFacetteNode.SMETHODDESCRIPTION, _oUnoObject);
- }
- if (m_oIntrospector.hasProperties(_oUnoObject)){
- XUnoFacetteNode oUnoFacetteNode = addUnoFacetteNode(_oParentNode, XUnoFacetteNode.SPROPERTYDESCRIPTION, _oUnoObject);
- }
- if (m_oIntrospector.hasInterfaces(_oUnoObject)){
- XUnoFacetteNode oUnoFacetteNode = addUnoFacetteNode(_oParentNode, XUnoFacetteNode.SINTERFACEDESCRIPTION, _oUnoObject);
- }
- if (m_oIntrospector.isContainer(_oUnoObject)){
- XUnoFacetteNode oUnoFacetteNode = addUnoFacetteNode(_oParentNode, XUnoFacetteNode.SCONTAINERDESCRIPTION, _oUnoObject);
- }
- if (m_oIntrospector.hasSupportedServices(_oUnoObject)){
- XUnoFacetteNode oUnoFacetteNode = addUnoFacetteNode(_oParentNode, XUnoFacetteNode.SSERVICEDESCRIPTION, _oUnoObject);
- }
- }
-
-
- private void addInterfacesToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, Type[] _aTypes) {
- try {
- if (_oUnoParentObject != null){
- for ( int m = 0; m < _aTypes.length; m++ ) {
- addUnoNode(_oGrandParentNode, _oUnoParentObject, _aTypes[m]);
- }
- }
- }
- catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }}
-
-
- // add all services for the given object to the tree under the node parent
- private void addServicesToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoObject) {
- try{
- XServiceInfo xServiceInfo = ( XServiceInfo ) UnoRuntime.queryInterface( XServiceInfo.class, _oUnoObject );
- if ( xServiceInfo != null ){
- String[] sSupportedServiceNames = xServiceInfo.getSupportedServiceNames();
- for ( int m = 0; m < sSupportedServiceNames.length; m++ ) {
- String sServiceName = sSupportedServiceNames[m];
- if (sServiceName.length() > 0){
- XUnoNode oUnoNode = addUnoNode(_oGrandParentNode, _oUnoObject, sSupportedServiceNames[m]);
- oUnoNode.setNodeType(XUnoNode.nSERVICE);
- }
- }
- }
- }
- catch(Exception exception) {
- exception.printStackTrace(System.out);
- }}
-
-
- private void addPropertiesAndInterfacesOfService(XUnoNode _oUnoServiceNode){
- String sServiceName = _oUnoServiceNode.getClassName();
- Object oUnoObject = _oUnoServiceNode.getUnoObject();
- addInterfacesToTreeNode(_oUnoServiceNode, oUnoObject, m_oIntrospector.getInterfaces(oUnoObject, sServiceName));
- addPropertiesToTreeNode(_oUnoServiceNode, oUnoObject, m_oIntrospector.getProperties(oUnoObject, sServiceName));
- }
-
-
- private void addPropertiesToTreeNode(XUnoNode _oParentNode, Object _oUnoParentObject, Property[] _aProperties) {
- try {
- if (_aProperties.length > 0){
- for ( int n = 0; n < _aProperties.length; n++ ){
- Property aProperty = _aProperties[n];
- XIntrospectionAccess xIntrospectionAccess = m_oIntrospector.getXIntrospectionAccess(_oUnoParentObject);
- XPropertySet xPropertySet = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xIntrospectionAccess.queryAdapter(new Type( XPropertySet.class)));
- if (xPropertySet != null) {
- if (xPropertySet.getPropertySetInfo().hasPropertyByName(aProperty.Name)){
- Object objectElement = xPropertySet.getPropertyValue(aProperty.Name);
- if (objectElement != null) {
- XUnoNode oChildNode = m_xTreeControlProvider.addUnoPropertyNode(_oUnoParentObject, aProperty, objectElement);
- if (oChildNode != null){
- _oParentNode.addChildNode(oChildNode);
- }
- }
- }
- }
- }
- }
- }
- catch(Exception exception) {
- exception.printStackTrace(System.out);
- }}
-
-
- public void addContainerElementsToTreeNode(XUnoNode _oParentNode, Object _oUnoParentObject){
- Object[] oUnoContainerElements = m_oIntrospector.getUnoObjectsOfContainer(_oUnoParentObject);
- if (m_oIntrospector.isValid(oUnoContainerElements)){
- if (oUnoContainerElements.length > 0){
- for (int i=0; i< oUnoContainerElements.length; i++){
- XUnoNode oChildNode = addUnoNode(_oParentNode, oUnoContainerElements[i], UnoNode.getNodeDescription(oUnoContainerElements[i]));
- m_xTreeControlProvider.nodeInserted(_oParentNode, oChildNode, _oParentNode.getChildCount()-1);
- }
- }
- }
- }
-
-
- private XUnoNode addUnoNode(XUnoNode _oParentNode, Object _oUnoObject, String _sLabel ){
- XUnoNode oUnoNode = this.m_xTreeControlProvider.addUnoNode(_oUnoObject);
- oUnoNode.setLabel(_sLabel);
- if (_oParentNode != null){
- _oParentNode.addChildNode(oUnoNode);
- }
- setNodeFoldable(oUnoNode, _oUnoObject);
- return oUnoNode;
- }
-
-
- private void setNodeFoldable(XUnoNode _oUnoNode, Object _oUnoObject){
- if (_oUnoObject != null){
- if (!m_oIntrospector.isObjectPrimitive(_oUnoObject)){
- _oUnoNode.setFoldable(true);
- }
- }
- }
-
-
- private XUnoNode addUnoNode(XUnoNode _oParentNode, Object _oUnoObject, Type _aType){
- XUnoNode oUnoNode = this.m_xTreeControlProvider.addUnoNode(_oUnoObject, _aType);
- if (_oParentNode != null){
- _oParentNode.addChildNode(oUnoNode);
- }
- setNodeFoldable(oUnoNode, _oUnoObject);
- return oUnoNode;
- }
-
-
- private void addPropertySetInfoNodesToTreeNode(XUnoFacetteNode _oUnoFacetteNode, Object _oUnoObject){
- if (_oUnoObject.getClass().isArray()){
- Object[] object = ( Object[] ) _oUnoObject;
- for ( int i = 0; i < object.length; i++ ) {
- Property aProperty = (Property) object[i];
- XUnoPropertyNode oUnoPropertyNode = m_xTreeControlProvider.addUnoPropertyNode(_oUnoObject, aProperty);
- oUnoPropertyNode.setLabel(XUnoFacetteNode.SPROPERTYINFODESCRIPTION + " (" + aProperty.Name + ")");
- oUnoPropertyNode.setFoldable(true);
- _oUnoFacetteNode.addChildNode(oUnoPropertyNode);
- }
- }
- }
-
- private void addPrimitiveValuesToTreeNode(XUnoNode _oUnoNode, Object _oUnoObject){
- if (_oUnoObject.getClass().isArray()){
- if (!_oUnoObject.getClass().getComponentType().isPrimitive()){
- Object[] object = ( Object[] ) _oUnoObject;
- for ( int i = 0; i < object.length; i++ ) {
- if (m_oIntrospector.isObjectPrimitive(object[i])){
- XUnoNode oChildNode = addUnoNode(_oUnoNode, null, UnoNode.getNodeDescription(object[i]));
- }
- }
- }
- else{
- String[] sDisplayValues = UnoNode.getDisplayValuesofPrimitiveArray(_oUnoObject);
- for ( int i = 0; i < sDisplayValues.length; i++ ) {
- XUnoNode oUnoNode = addUnoNode(_oUnoNode, null, sDisplayValues[i]);
- }
- }
- }
- }
-
-
- private void addPropertySetInfoSubNodes(XUnoPropertyNode _oUnoPropertyNode){
- Property aProperty = _oUnoPropertyNode.getProperty();
- _oUnoPropertyNode.addChildNode(m_xTreeControlProvider.addUnoPropertyNodeWithName(aProperty));
- _oUnoPropertyNode.addChildNode(m_xTreeControlProvider.addUnoPropertyNodeWithType(aProperty));
- _oUnoPropertyNode.addChildNode(m_xTreeControlProvider.addUnoPropertyNodeWithHandle(aProperty));
- _oUnoPropertyNode.addChildNode(m_xTreeControlProvider.addUnoPropertyNodeWithAttributesDescription(aProperty));
- }
-
-
- private void addPropertyValueSubNodes(XUnoFacetteNode _oUnoFacetteNode, Object _oUnoObject){
- if (m_oIntrospector.isUnoPropertyValueTypeObject(_oUnoObject)){
- Object[] object = ( Object[] ) _oUnoObject;
- for ( int i = 0; i < object.length; i++ ) {
- String sObjectClassName = object[i].getClass().getName();
- if (sObjectClassName.equals("com.sun.star.beans.PropertyValue")){
- XUnoNode oChildNode = null;
- PropertyValue aPropertyValue = (PropertyValue) object[i];
- if (! m_oIntrospector.isObjectPrimitive(aPropertyValue.Value)){
- oChildNode = m_xTreeControlProvider.addUnoPropertyNode(_oUnoObject, aPropertyValue, _oUnoObject);
- }
- else{
- oChildNode = addUnoNode(null, aPropertyValue.Value, UnoPropertyNode.getStandardPropertyValueDescription(aPropertyValue));
- }
- if (oChildNode != null){
- _oUnoFacetteNode.addChildNode(oChildNode);
- }
- }
- }
- }
- }
-
-
- public boolean expandNode(XUnoNode _oUnoNode, XTreePathProvider _xTreePathProvider){
- if ( _oUnoNode != null ) {
- _oUnoNode.setFoldable(false);
- if (m_xTreeControlProvider.isMethodNode(_oUnoNode)){
- XUnoMethodNode oUnoMethodNode = (XUnoMethodNode) _oUnoNode;
- if (!oUnoMethodNode.isInvoked()){
- Object oUnoReturnObject = invoke((XUnoMethodNode) _oUnoNode);
- if (oUnoReturnObject == null){
- _oUnoNode.setFoldable(true);
- return false;
- }
- }
- }
- else if (m_xTreeControlProvider.isPropertyNode(_oUnoNode)){
- XUnoPropertyNode oUnoPropertyNode = (XUnoPropertyNode) _oUnoNode;
- Object oUnoObject = oUnoPropertyNode.getUnoReturnObject();
- if (oUnoPropertyNode.getPropertyNodeType() == XUnoPropertyNode.nPROPERTYSETINFOTYPE){
- addPropertySetInfoSubNodes(oUnoPropertyNode);
- }
- else{
- //TOOD this code is redundant!!!
- if ( oUnoObject.getClass().isArray()){
- // TOODO probably we should provid a possibility to insert also non-primitive nodes
- addPrimitiveValuesToTreeNode(oUnoPropertyNode, oUnoObject);
- }
- else{
- addFacetteNodesToTreeNode(oUnoPropertyNode, oUnoObject);
- }
- }
- }
- else if (m_xTreeControlProvider.isFacetteNode(_oUnoNode)){
- XUnoFacetteNode oUnoFacetteNode = (XUnoFacetteNode) _oUnoNode;
- Object oUnoObject = _oUnoNode.getUnoObject();
- if (oUnoFacetteNode.isMethodNode()){
- addMethodsToTreeNode(oUnoFacetteNode, oUnoObject, m_oIntrospector.getMethods(oUnoObject));
- }
- if (oUnoFacetteNode.isPropertyNode()){
- String sNodeDescription = oUnoFacetteNode.getLabel();
- // TODO: it's very dangerous to distinguishe the different UnoFacetteNodes only by the nodedescription
- if (sNodeDescription.startsWith(XUnoFacetteNode.SPROPERTYINFODESCRIPTION)){
- addPropertySetInfoNodesToTreeNode(oUnoFacetteNode, oUnoObject);
- }
- else if (sNodeDescription.startsWith(XUnoFacetteNode.SPROPERTYVALUEDESCRIPTION)){
- addPropertyValueSubNodes(oUnoFacetteNode, oUnoObject);
- }
- else{
- addPropertiesToTreeNode(oUnoFacetteNode, oUnoObject, m_oIntrospector.getProperties(oUnoObject));
- }
- }
- if (oUnoFacetteNode.isServiceNode()){
- addServicesToTreeNode(oUnoFacetteNode, oUnoObject);
- }
- if (oUnoFacetteNode.isInterfaceNode()){
- addInterfacesToTreeNode(oUnoFacetteNode, oUnoObject, getTypes(oUnoObject));
- }
- if (oUnoFacetteNode.isContainerNode()){
- addContainerElementsToTreeNode(oUnoFacetteNode, oUnoObject);
- }
- }
- else if (_oUnoNode.getNodeType() == XUnoNode.nSERVICE){
- addPropertiesAndInterfacesOfService(_oUnoNode);
- }
- else if (_oUnoNode.getNodeType() == XUnoNode.nINTERFACE){
- Type aType = _oUnoNode.getUnoType();
- if (aType != null){
- addMethodsToTreeNode(_oUnoNode, _oUnoNode.getUnoObject(), m_oIntrospector.getMethodsOfInterface(aType));
- }
- }
- else if (_oUnoNode.getNodeType() == XUnoNode.nOTHERS){
- Object oUnoObject = _oUnoNode.getUnoObject();
- if ( oUnoObject.getClass().isArray()){
- // TOODO probably we should provid a possibility to insert also non-primitive nodes
- addPrimitiveValuesToTreeNode(_oUnoNode, oUnoObject);
- }
- else{
- addFacetteNodesToTreeNode(_oUnoNode, oUnoObject);
- }
- }
- }
- return true;
- }
-
-
-
- public void applyFilter(XUnoFacetteNode _oUnoFacetteNode, String _sFilter){
- for (int i = 0; i < _oUnoFacetteNode.getChildCount(); i++){
- XUnoNode oUnoNode = _oUnoFacetteNode.getChild(i);
- boolean bIsVisible = oUnoNode.isFilterApplicable(_sFilter);
- m_xTreeControlProvider.setNodeVisible(oUnoNode, bIsVisible);
- }
- _oUnoFacetteNode.setFilter(_sFilter);
- }
-
-
- /** In opposition to 'getUnoObjectOfTreeNode' this method inspects the passed node if it represents a Uno object
- * If not it returns null
- *
- */
- private Object getUnoObjectOfExplicitTreeNode(XTreePathProvider _xTreePathProvider){
- XUnoNode oUnoNode = _xTreePathProvider.getLastPathComponent();
- if (oUnoNode != null){
- return oUnoNode.getUnoObject();
- }
- return null;
- }
-
-
- public String getFilter(XUnoNode _oUnoNode){
- String sFilter = "";
- if (_oUnoNode != null){
- XUnoNode oUnoNode = _oUnoNode;
- boolean bleaveLoop = false;
- do{
- if (m_xTreeControlProvider.isFacetteNode(oUnoNode)){
- sFilter = ((XUnoFacetteNode) oUnoNode).getFilter();
- bleaveLoop = true;
- }
- else{
- if (oUnoNode.getParentNode() != null){
- oUnoNode = oUnoNode.getParentNode();
- }
- else{
- bleaveLoop = true;
- }
- }
- } while(!bleaveLoop);
- }
- return sFilter;
- }
-
-
- /** In opposition to 'getUnoObjectOfexplictTreeNode' this method inspects the passed node if it represents a Uno object
- * if not it keeps checking all ancestors until it finds a Uno representation
- */
- private Object getUnoObjectOfTreeNode(XTreePathProvider _xTreePathProvider){
- XTreePathProvider xTreePathProvider = _xTreePathProvider;
- HideableMutableTreeNode oNode = null;
- Object oUnoObject = null;
- while (xTreePathProvider != null){
- oUnoObject = getUnoObjectOfExplicitTreeNode(xTreePathProvider);
- if (oUnoObject != null){
- if (oUnoObject instanceof String){
- }
- else{
- if (!m_oIntrospector.isUnoTypeObject(oUnoObject)){
- return oUnoObject;
- }
- }
- }
- xTreePathProvider = xTreePathProvider.getParentPath();
- }
- return null;
- }
-
-
- public void showPopUpMenu(Object _invoker, int x, int y) throws ClassCastException{
- XUnoNode oUnoNode = getSelectedNode();
- boolean bdoEnableInvoke = oUnoNode instanceof XUnoMethodNode;
-// boolean bdoEnableSourceCodeGeneration = true;
- if (bdoEnableInvoke){
- XUnoMethodNode oUnoMethodNode = (XUnoMethodNode) oUnoNode;
- bdoEnableInvoke = oUnoMethodNode.isInvokable();
-// bdoEnableSourceCodeGeneration = bdoEnableInvoke;
- }
- m_xDialogProvider.enablePopupMenuItem(XDialogProvider.SINVOKE, bdoEnableInvoke);
-// m_xDialogProvider.enablePopupMenuItem(XDialogProvider.SADDTOSOURCECODE, bdoEnableSourceCodeGeneration);
- m_xDialogProvider.showPopUpMenu(_invoker, x, y);
- }
-}
- \ No newline at end of file
diff --git a/odk/examples/java/Inspector/InstanceInspector.idl b/odk/examples/java/Inspector/InstanceInspector.idl
deleted file mode 100644
index 8de7e920..00000000
--- a/odk/examples/java/Inspector/InstanceInspector.idl
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_ORG_OPENOFFICE_INSTANCEINSPECTOR_IDL
-#define INCLUDED_ORG_OPENOFFICE_INSTANCEINSPECTOR_IDL
-
-#include <XInstanceInspector.idl>
-
-
-module org { module openoffice {
-
- /**
- * This service describes an instance inspector which can inspect
- * UNO objects and provides information about the implemented
- * interfaces, the supported services and properties of this onject.
- */
- service InstanceInspector: XInstanceInspector;
-
-}; };
-
-#endif
diff --git a/odk/examples/java/Inspector/InstanceInspectorTest.odt b/odk/examples/java/Inspector/InstanceInspectorTest.odt
deleted file mode 100644
index 74cde4e6..00000000
--- a/odk/examples/java/Inspector/InstanceInspectorTest.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/Introspector.java b/odk/examples/java/Inspector/Introspector.java
deleted file mode 100644
index cdae4f4d..00000000
--- a/odk/examples/java/Inspector/Introspector.java
+++ /dev/null
@@ -1,667 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.IllegalTypeException;
-import com.sun.star.beans.MethodConcept;
-import com.sun.star.beans.NamedValue;
-import com.sun.star.beans.Property;
-import com.sun.star.beans.XIntrospection;
-import com.sun.star.beans.XIntrospectionAccess;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.bridge.UnoUrlResolver;
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
-import com.sun.star.container.XHierarchicalNameAccess;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.reflection.ParamInfo;
-import com.sun.star.reflection.TypeDescriptionSearchDepth;
-import com.sun.star.reflection.XConstantTypeDescription;
-import com.sun.star.reflection.XConstantsTypeDescription;
-import com.sun.star.reflection.XIdlClass;
-import com.sun.star.reflection.XIdlField;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.reflection.XIdlReflection;
-import com.sun.star.reflection.XIndirectTypeDescription;
-import com.sun.star.reflection.XInterfaceTypeDescription;
-import com.sun.star.reflection.XInterfaceTypeDescription2;
-import com.sun.star.reflection.XPropertyTypeDescription;
-import com.sun.star.reflection.XServiceTypeDescription;
-import com.sun.star.reflection.XTypeDescription;
-import com.sun.star.reflection.XTypeDescriptionEnumeration;
-import com.sun.star.reflection.XTypeDescriptionEnumerationAccess;
-import com.sun.star.ucb.CommandAbortedException;
-import com.sun.star.ucb.XSimpleFileAccess;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.TypeClass;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.URL;
-import java.util.List;
-import java.util.Vector;
-import javax.swing.JOptionPane;
-
-public class Introspector extends WeakBase{
-
- private XIntrospection m_xIntrospection;
- private XMultiComponentFactory m_xMultiComponentFactory;
- private XComponentContext m_xComponentContext;
- private XTypeDescriptionEnumerationAccess m_xTDEnumerationAccess;
- private static XComponentContext xOfficeComponentContext;
- private XIdlReflection mxIdlReflection;
- private URL openHyperlink;
- private static Introspector m_oIntrospector = null;
- private XSimpleFileAccess xSimpleFileAccess = null;
-
-
-
- public static Introspector getIntrospector(){
- if (m_oIntrospector == null){
- throw new NullPointerException();
- }
- else{
- return m_oIntrospector;
- }
- }
-
- public static Introspector getIntrospector(XComponentContext _xComponentContext){
- if (m_oIntrospector == null){
- m_oIntrospector = new Introspector(_xComponentContext);
- }
- return m_oIntrospector;
- }
-
-
- /** Creates a new instance of Introspection */
- private Introspector(XComponentContext _xComponentContext) {
- try{
- m_xComponentContext = _xComponentContext;
- m_xMultiComponentFactory = m_xComponentContext.getServiceManager();
- Object o = m_xMultiComponentFactory.createInstanceWithContext("com.sun.star.beans.Introspection", m_xComponentContext);
- m_xIntrospection = ( XIntrospection ) UnoRuntime.queryInterface(XIntrospection.class, o );
- Object oCoreReflection = getXMultiComponentFactory().createInstanceWithContext("com.sun.star.reflection.CoreReflection", getXComponentContext());
- mxIdlReflection = (XIdlReflection) UnoRuntime.queryInterface(XIdlReflection.class, oCoreReflection);
- initTypeDescriptionManager();
- }
- catch( Exception exception ) {
- System.err.println( exception );
- }}
-
-
- protected XComponentContext getXComponentContext(){
- return m_xComponentContext;
- }
-
-
- protected XMultiComponentFactory getXMultiComponentFactory(){
- return m_xMultiComponentFactory;
- }
-
-
- protected XIntrospectionAccess getXIntrospectionAccess(Object _oUnoComponent){
- return m_xIntrospection.inspect(_oUnoComponent);
- }
-
-
- public boolean isContainer(Object _oUnoObject){
- boolean bIsContainer = false;
- try {
- XIntrospectionAccess xIntrospectionAccessObject = getXIntrospectionAccess(_oUnoObject);
- if (xIntrospectionAccessObject != null){
- XEnumerationAccess xEnumerationAccess = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, xIntrospectionAccessObject.queryAdapter( new Type( XEnumerationAccess.class ) ) );
- if (xEnumerationAccess != null){
- XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
- bIsContainer = xEnumeration.hasMoreElements();
- }
- if (!bIsContainer){
- XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
- if (xIndexAccess != null){
- bIsContainer = (xIndexAccess.getCount() > 0);
- }
- }
- }
- } catch (IllegalTypeException ex) {
- ex.printStackTrace(System.out);
- }
- return bIsContainer;
- }
-
-
- // add all containers for the given object to the tree under the node
- // parent
- public Object[] getUnoObjectsOfContainer(Object _oUnoParentObject) {
- Object[] oRetComponents = null;
- try {
- Vector oRetComponentsVector = new Vector();
- XIntrospectionAccess xIntrospectionAccessObject = getXIntrospectionAccess(_oUnoParentObject);
- if ( xIntrospectionAccessObject != null ) {
- XEnumerationAccess xEnumerationAccess = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, xIntrospectionAccessObject.queryAdapter( new Type( XEnumerationAccess.class ) ) );
- if ( xEnumerationAccess != null ) {
- XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
- while ( xEnumeration.hasMoreElements() ) {
- oRetComponentsVector.add(xEnumeration.nextElement());
- }
- }
- XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
- if ( xIndexAccess != null ) {
- XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER);
- for ( int i = 0; i < xIndexAccess.getCount(); i++ ) {
- Object[][] aParamInfo = new Object[1][1];
- aParamInfo[0] = new Integer[] { new Integer(i) };
- oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo));
- }
- }
- }
- if (oRetComponentsVector != null){
- oRetComponents = new Object[oRetComponentsVector.size()];
- oRetComponentsVector.toArray(oRetComponents);
- }
- }
- catch( Exception exception ) {
- System.err.println( exception );
- }
- return oRetComponents;
- }
-
-
- protected XIdlMethod[] getMethodsOfInterface(Type _aType){
- try{
- XIdlClass xIdlClass = mxIdlReflection.forName(_aType.getTypeName());
- return xIdlClass.getMethods();
- }
- catch( Exception e ) {
- System.err.println( e );
- return null;
- }}
-
-
- protected XIdlField[] getFieldsOfType(Type _aType){
- try{
- XIdlClass xIdlClass = mxIdlReflection.forName(_aType.getTypeName());
- return xIdlClass.getFields();
- }
- catch( Exception e ) {
- System.err.println( e );
- return null;
- }}
-
-
- public boolean hasMethods(Object _oUnoObject){
- boolean bHasMethods = (getMethods(_oUnoObject).length > 0);
- return bHasMethods;
- }
-
-
- // add all methods for the given object to the tree under the node parent
- public XIdlMethod[] getMethods(Object _oUnoParentObject) {
- try {
- XIntrospectionAccess xIntrospectionAccess = getXIntrospectionAccess(_oUnoParentObject);
- if (xIntrospectionAccess != null){
- XIdlMethod[] xIdlMethods = xIntrospectionAccess.getMethods(MethodConcept.ALL - MethodConcept.DANGEROUS);
- return xIdlMethods;
- }
- }
- catch( Exception e ) {
- System.err.println( e );
- }
- return null;
- }
-
-
- public boolean hasProperties(Object _oUnoObject){
- boolean bHasProperties = (getProperties(_oUnoObject).length > 0);
- return bHasProperties;
- }
-
-
- protected Property[] getProperties( Object _oUnoParentObject){
- try {
- XIntrospectionAccess xIntrospectionAccess = getXIntrospectionAccess(_oUnoParentObject);
- if (xIntrospectionAccess != null){
- Property[] aProperties = xIntrospectionAccess.getProperties(com.sun.star.beans.PropertyConcept.ATTRIBUTES + com.sun.star.beans.PropertyConcept.PROPERTYSET);
- return aProperties;
- }
- }
- catch( Exception e ) {
- System.err.println( e );
- }
- return null;
- }
-
-
- protected Property[] getProperties(Object _oUnoObject, String _sServiceName){
- Property[] aProperties = getProperties(_oUnoObject);
- List aListOfProperties = java.util.Arrays.asList(aProperties);
- Vector aPropertiesVector = new Vector(aListOfProperties);
- if (aProperties != null){
- XPropertyTypeDescription[] xPropertyTypeDescriptions = getPropertyDescriptionsOfService(_sServiceName);
- for (int i = aProperties.length - 1; i >= 0; i--){
- if (!hasByName(xPropertyTypeDescriptions, _sServiceName + "." + aProperties[i].Name)){
- aPropertiesVector.remove(i);
- }
- }
- }
- Property[] aRetProperties = new Property[aPropertiesVector.size()];
- aPropertiesVector.toArray(aRetProperties);
- return aRetProperties;
- }
-
-
- protected Type[] getInterfaces(Object _oUnoObject, String _sServiceName){
- Type[] aTypes = getInterfaces(_oUnoObject);
- List aListOfTypes = java.util.Arrays.asList(aTypes);
- Vector aTypesVector = new Vector(aListOfTypes);
- if (aTypes != null){
- XInterfaceTypeDescription[] xInterfaceTypeDescriptions = getInterfaceDescriptionsOfService(_sServiceName);
- for (int i = aTypes.length - 1; i >= 0; i--){
- if (!hasByName(xInterfaceTypeDescriptions, aTypes[i].getTypeName())){
- aTypesVector.remove(i);
- }
- }
- }
- Type[] aRetTypes = new Type[aTypesVector.size()];
- aTypesVector.toArray(aRetTypes);
- return aRetTypes;
- }
-
-
- public boolean hasInterfaces(Object _oUnoObject){
- return (getInterfaces(_oUnoObject).length > 0);
- }
-
-
- protected Type[] getInterfaces(Object _oUnoParentObject){
- Type[] aTypes = new Type[]{};
- XTypeProvider xTypeProvider = ( XTypeProvider ) UnoRuntime.queryInterface( XTypeProvider.class, _oUnoParentObject);
- if ( xTypeProvider != null ) {
- aTypes = xTypeProvider.getTypes();
- }
- return aTypes;
- }
-
-
-
- public static boolean isObjectSequence(Object _oUnoObject){
- Type aType = AnyConverter.getType(_oUnoObject);
- return aType.getTypeClass().getValue() == TypeClass.SEQUENCE_value;
- }
-
-
- public static boolean isObjectPrimitive(Object _oUnoObject){
- boolean breturn = false;
- if (_oUnoObject != null){
- Type aType = AnyConverter.getType(_oUnoObject);
- breturn = isObjectPrimitive(_oUnoObject.getClass(), aType.getTypeClass());
- }
- return breturn;
- }
-
-
- public static boolean isPrimitive(TypeClass _typeClass){
- return (( _typeClass == TypeClass.BOOLEAN )
- || ( _typeClass == TypeClass.BYTE )
- || ( _typeClass == TypeClass.CHAR )
- || ( _typeClass == TypeClass.DOUBLE )
- || ( _typeClass == TypeClass.ENUM )
- || ( _typeClass == TypeClass.FLOAT )
- || ( _typeClass == TypeClass.HYPER )
- || ( _typeClass == TypeClass.LONG )
- || ( _typeClass == TypeClass.SHORT )
- || ( _typeClass == TypeClass.STRING )
- || ( _typeClass == TypeClass.UNSIGNED_HYPER )
- || ( _typeClass == TypeClass.UNSIGNED_LONG )
- || ( _typeClass == TypeClass.UNSIGNED_SHORT ));
- }
-
- public static boolean isObjectPrimitive(Class _oUnoClass, TypeClass _typeClass){
- return !( ( !_oUnoClass.isPrimitive() ) && ( _typeClass != TypeClass.ARRAY )
- && ( _typeClass != TypeClass.BOOLEAN )
- && ( _typeClass != TypeClass.BYTE )
- && ( _typeClass != TypeClass.CHAR )
- && ( _typeClass != TypeClass.DOUBLE )
- && ( _typeClass != TypeClass.ENUM )
- && ( _typeClass != TypeClass.FLOAT )
- && ( _typeClass != TypeClass.HYPER )
- && ( _typeClass != TypeClass.LONG )
- && ( _typeClass != TypeClass.SHORT )
- && ( _typeClass != TypeClass.STRING )
- && ( _typeClass != TypeClass.UNSIGNED_HYPER )
- && ( _typeClass != TypeClass.UNSIGNED_LONG )
- && ( _typeClass != TypeClass.UNSIGNED_SHORT ));
- }
-
-
- protected void initTypeDescriptionManager() {
- try {
- Object oTypeDescriptionManager = getXComponentContext().getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager");
- m_xTDEnumerationAccess = (XTypeDescriptionEnumerationAccess) UnoRuntime.queryInterface(XTypeDescriptionEnumerationAccess.class, oTypeDescriptionManager);
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }}
-
-
- protected XTypeDescriptionEnumerationAccess getXTypeDescriptionEnumerationAccess(){
- return m_xTDEnumerationAccess;
- }
-
-
- protected XConstantTypeDescription[] getFieldsOfConstantGroup(String _sTypeClass){
- XConstantTypeDescription[] xConstantTypeDescriptions = null;
- try {
- TypeClass[] eTypeClasses = new com.sun.star.uno.TypeClass[1];
- eTypeClasses[0] = com.sun.star.uno.TypeClass.CONSTANTS;
- XTypeDescriptionEnumeration xTDEnumeration = m_xTDEnumerationAccess.createTypeDescriptionEnumeration(getModuleName(_sTypeClass), eTypeClasses, TypeDescriptionSearchDepth.INFINITE);
- while (xTDEnumeration.hasMoreElements()) {
- XTypeDescription xTD = xTDEnumeration.nextTypeDescription();
- if (xTD.getName().equals(_sTypeClass)){
- XConstantsTypeDescription xConstantsTypeDescription = (XConstantsTypeDescription) UnoRuntime.queryInterface(XConstantsTypeDescription.class, xTD);
- xConstantTypeDescriptions = xConstantsTypeDescription.getConstants();
- }
- String sName = xTD.getName();
- }
- return xConstantTypeDescriptions;
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }
- return null;
- }
-
- private XServiceTypeDescription getServiceTypeDescription(String _sServiceName, TypeClass _eTypeClass){
- try{
- if (_sServiceName.length() > 0){
- TypeClass[] eTypeClasses = new com.sun.star.uno.TypeClass[2];
- eTypeClasses[0] = com.sun.star.uno.TypeClass.SERVICE;
- eTypeClasses[1] = _eTypeClass;
- XTypeDescriptionEnumeration xTDEnumeration = getXTypeDescriptionEnumerationAccess().createTypeDescriptionEnumeration(Introspector.getModuleName(_sServiceName), eTypeClasses, TypeDescriptionSearchDepth.INFINITE);
- while (xTDEnumeration.hasMoreElements()) {
- XTypeDescription xTD = xTDEnumeration.nextTypeDescription();
- if (xTD.getName().equals(_sServiceName)){
- XServiceTypeDescription xServiceTypeDescription = (XServiceTypeDescription) UnoRuntime.queryInterface(XServiceTypeDescription.class, xTD);
- return xServiceTypeDescription;
- }
- }
- }
- return null;
- } catch (Exception ex) {
- ex.printStackTrace(System.out);
- return null;
- }}
-
-
- public XPropertyTypeDescription[] getPropertyDescriptionsOfService(String _sServiceName){
- try {
- XServiceTypeDescription xServiceTypeDescription = getServiceTypeDescription(_sServiceName, com.sun.star.uno.TypeClass.PROPERTY);
- if (xServiceTypeDescription != null){
- XPropertyTypeDescription[] xPropertyTypeDescriptions = xServiceTypeDescription.getProperties();
- return xPropertyTypeDescriptions;
- }
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }
- return new XPropertyTypeDescription[]{};
- }
-
-
- public XTypeDescription getReferencedType(String _sTypeName){
- XTypeDescription xTypeDescription = null;
- try{
- XHierarchicalNameAccess xHierarchicalNameAccess = (XHierarchicalNameAccess) UnoRuntime.queryInterface(XHierarchicalNameAccess.class, m_xTDEnumerationAccess);
- if (xHierarchicalNameAccess != null){
- if (xHierarchicalNameAccess.hasByHierarchicalName(_sTypeName)){
- XIndirectTypeDescription xIndirectTypeDescription = (XIndirectTypeDescription) UnoRuntime.queryInterface(XIndirectTypeDescription.class, xHierarchicalNameAccess.getByHierarchicalName(_sTypeName));
- if (xIndirectTypeDescription != null){
- xTypeDescription = xIndirectTypeDescription.getReferencedType();
- }
- }
- }
- } catch (Exception ex) {
- ex.printStackTrace(System.out);
- }
- return xTypeDescription;
- }
-
-
- public XInterfaceTypeDescription[] getInterfaceDescriptionsOfService(String _sServiceName){
- try {
- XServiceTypeDescription xServiceTypeDescription = getServiceTypeDescription(_sServiceName, com.sun.star.uno.TypeClass.INTERFACE);
- if (xServiceTypeDescription != null){
- XInterfaceTypeDescription[] xInterfaceTypeDescriptions = xServiceTypeDescription.getMandatoryInterfaces();
- return xInterfaceTypeDescriptions;
- }
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }
- return new XInterfaceTypeDescription[]{};
- }
-
-
- static boolean hasByName(XTypeDescription[] _xTypeDescriptions, String _sTypeName){
- for (int i = 0; i < _xTypeDescriptions.length; i++){
- if (_xTypeDescriptions[i].getName().equals(_sTypeName)){
- return true;
- }
- }
- return false;
- }
-
-
- public static String getModuleName(String _sTypeClass){
- int nlastindex = _sTypeClass.lastIndexOf(".");
- if (nlastindex > -1){
- return _sTypeClass.substring(0, nlastindex);
- }
- else{
- return "";
- }
- }
-
-
- public static String getShortClassName(String _sClassName){
- String sShortClassName = _sClassName;
- int nindex = _sClassName.lastIndexOf(".");
- if ((nindex < _sClassName.length()) && nindex > -1){
- sShortClassName = _sClassName.substring(nindex + 1);
- }
- return sShortClassName;
- }
-
-
-
- public static boolean isUnoTypeObject(Object _oUnoObject){
- return isOfUnoType(_oUnoObject, "com.sun.star.uno.Type");
- }
-
-
- public static boolean isUnoPropertyTypeObject(Object _oUnoObject){
- return isOfUnoType(_oUnoObject, "com.sun.star.beans.Property");
- }
-
-
- public static boolean isUnoPropertyValueTypeObject(Object _oUnoObject){
- return isOfUnoType(_oUnoObject, "com.sun.star.beans.PropertyValue");
- }
-
-
- public static boolean isOfUnoType(Object _oUnoObject, String _sTypeName){
- boolean bIsUnoObject = false;
- if (_oUnoObject != null){
- if (_oUnoObject.getClass().isArray()){
- if (!_oUnoObject.getClass().getComponentType().isPrimitive()){
- Object[] oUnoArray = (Object[]) _oUnoObject;
- if (oUnoArray.length > 0){
- bIsUnoObject = ( oUnoArray[0].getClass().getName().equals(_sTypeName));
- }
- }
- }
- }
- else{
- bIsUnoObject = (_oUnoObject.getClass().getName().equals(_sTypeName));
- }
- return bIsUnoObject;
- }
-
-
- public String getConstantDisplayString(int _nValue, XConstantTypeDescription[] _xConstantTypeDescription, String _sDisplayString){
- String sPrefix = "";
- int[] nbits = new int[_xConstantTypeDescription.length];
- for (int i = 0; i < _xConstantTypeDescription.length; i++){
- short nConstantValue = ((Short) _xConstantTypeDescription[i].getConstantValue()).shortValue();
- nbits[i] = _nValue & nConstantValue;
- if (nbits[i] > 0){
- _sDisplayString += sPrefix + _xConstantTypeDescription[i].getName();
- sPrefix = " + ";
- }
- }
- return _sDisplayString;
- }
-
-
- public static boolean isValid(Object[] _oObject){
- if (_oObject != null){
- if (_oObject.length > 0){
- return true;
- }
- }
- return false;
- }
-
-
- public static boolean isValid(Object _oObject){
- if (_oObject != null){
- return (!AnyConverter.isVoid(_oObject));
- }
- return false;
- }
-
-
- public static boolean isArray(Object _oObject){
- return _oObject.getClass().isArray();
- }
-
-
- public boolean hasSupportedServices(Object _oUnoObject){
- boolean bHasSupportedServices = false;
- XServiceInfo xServiceInfo = ( XServiceInfo ) UnoRuntime.queryInterface( XServiceInfo.class, _oUnoObject);
- if ( xServiceInfo != null ){
- String[] sSupportedServiceNames = xServiceInfo.getSupportedServiceNames();
- bHasSupportedServices = sSupportedServiceNames.length > 0;
- }
- return bHasSupportedServices;
- }
-
-
- public Object getValueOfText(TypeClass aTypeClass, String sText){
- Object oReturn = null;
- switch (aTypeClass.getValue()){
- case TypeClass.CHAR_value:
- break;
- case TypeClass.DOUBLE_value:
- oReturn = Double.valueOf(sText);
- break;
- case TypeClass.ENUM_value:
- break;
- case TypeClass.FLOAT_value:
- oReturn = Float.valueOf(sText);
- break;
- case TypeClass.HYPER_value:
- oReturn = Long.valueOf(sText);
- break;
- case TypeClass.LONG_value:
- oReturn = Integer.valueOf(sText);
- break;
- case TypeClass.SHORT_value:
- oReturn = Byte.valueOf(sText);
- break;
- case TypeClass.STRING_value:
- oReturn = sText;
- break;
- case TypeClass.UNSIGNED_HYPER_value:
- oReturn = Long.valueOf(sText);
- break;
- case TypeClass.UNSIGNED_LONG_value:
- oReturn = Integer.valueOf(sText);
- break;
- case TypeClass.UNSIGNED_SHORT_value:
- oReturn = Byte.valueOf(sText);
- break;
- default:
- }
- return oReturn;
- }
-
-
- public XSimpleFileAccess getXSimpleFileAccess(){
- try {
- if (xSimpleFileAccess == null){
- Object oSimpleFileAccess = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.ucb.SimpleFileAccess", m_xComponentContext);
- xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, oSimpleFileAccess);
- }
- return xSimpleFileAccess;
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace(System.out);
- return null;
- }}
-
-
- public boolean isValidSDKInstallationPath(String _sSDKInstallationPath){
- boolean bIsValid = false;
- try {
- String sIDLFolder = Introspector.addToPath(_sSDKInstallationPath, Inspector.sIDLDOCUMENTSUBFOLDER);
- String sIndexFile = Introspector.addToPath(_sSDKInstallationPath, "index.html");
- if (getXSimpleFileAccess() != null){
- bIsValid = (getXSimpleFileAccess().exists(sIDLFolder) && getXSimpleFileAccess().exists(sIndexFile));
- }
- } catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace(System.out);
- }
- return bIsValid;
- }
-
-
- public static String addToPath(String _sPath, String _sSubPath){
- if (!_sPath.endsWith("/")){
- _sPath += "/";
- }
- return _sPath + _sSubPath;
- }
-
-}
diff --git a/odk/examples/java/Inspector/Makefile b/odk/examples/java/Inspector/Makefile
deleted file mode 100644
index 2b0c1b37..00000000
--- a/odk/examples/java/Inspector/Makefile
+++ /dev/null
@@ -1,195 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java InstanceInspector component example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-
-# we use the sample directory name dor separating this example
-# from others in the output directory
-SAMPLE_NAME=InstanceInspector
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-# some special macro names for separating the component jar stuff
-COMP_NAME=Inspector
-COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME)
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_RDB_NAME=$(COMP_NAME).uno.rdb
-COMP_RDB=$(COMP_GEN_OUT)/$(COMP_RDB_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-
-IDLFILES = InstanceInspector.idl \
- XInstanceInspector.idl
-
-# normally the idl file should be stored in a directory tree fitting the
-# module structure, for the example we know the module structure
-PACKAGE = org/openoffice
-
-COMP_JAVAFILES = XDialogProvider.java XTreeControlProvider.java XTreePathProvider.java MethodParametersDialog.java HideableMutableTreeNode.java HideableTreeModel.java Introspector.java XUnoNode.java SwingUnoNode.java UnoNode.java XUnoMethodNode.java SwingUnoMethodNode.java UnoMethodNode.java XUnoPropertyNode.java SwingUnoPropertyNode.java UnoPropertyNode.java XUnoFacetteNode.java SwingUnoFacetteNode.java TDocSupplier.java UnoTreeRenderer.java InspectorAddon.java XLanguageSourceCodeGenerator.java SourceCodeGenerator.java InspectorPane.java SwingDialogProvider.java SwingTreeControlProvider.java SwingTreePathProvider.java Inspector.java
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-GEN_CLASSFILES = $(patsubst %.idl,$(SAMPLE_CLASS_OUT)/$(PACKAGE)/%.class,$(IDLFILES))
-GEN_TYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GEN_URDFILES = $(patsubst %.idl,$(SAMPLE_GEN_OUT)/%.urd,$(IDLFILES))
-
-# the generated types are necessary for the component jar
-GEN_CLASSFILENAMES = $(subst $(SAMPLE_CLASS_OUT)/,,$(GEN_CLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT))
-
-COMP_IMAGE_FILES= images/containers_16.png \
- images/content_16.png \
- images/interfaces_16.png \
- images/methods_16.png \
- images/properties_16.png \
- images/services_16.png
-
-# Targets
-.PHONY: ALL
-ALL : JavaInspectorExample
-
-include $(SETTINGS)/stdtarget.mk
-
-# rule for component manifest file
-$(COMP_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(basename $(basename $(@F)))> $@
-
-# rule for compiling the IDL files
-$(SAMPLE_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -C -I. -I$(IDL_DIR) -O$(SAMPLE_GEN_OUT) $<
-
-# rule for creating the component rdb file
-$(COMP_GEN_OUT)/%.rdb : $(GEN_URDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GEN_URDFILES)
-
-# rule for creating IDL dependent class files
-$(GEN_CLASSFILES) : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GEN_TYPELIST) -O$(SAMPLE_CLASS_OUT) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-# component as well as application are dependent from the generated types
-# rule for component class files
-$(COMP_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -sourcepath . -d $(COMP_CLASS_OUT) $<
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES) $(COMP_IMAGE_FILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP_CLASS_OUT) .
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(GEN_CLASSFILENAMES)
- +$(SDK_JAR) uvf $@ $(COMP_IMAGE_FILES)
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)ProtocolHandler.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-schema$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)ObjectInspector.xcs$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)ObjectInspector.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) Addons.xcu ProtocolHandler.xcu ObjectInspector.xcu ObjectInspector.xcs $(COMP_UNOPKG_MANIFEST)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) ../../../bin/$(@F) $(COMP_RDB_NAME)
-
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME)
- $(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu ObjectInspector.xcu ObjectInspector.xcs
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-JavaInspectorExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The InstanceInspector component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo document.
- @echo -
- @echo $(MAKE) InstanceInspectorTest.odt.load
- @echo --------------------------------------------------------------------------------
-
-InstanceInspectorTest.odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/java/Inspector/MethodParametersDialog.java b/odk/examples/java/Inspector/MethodParametersDialog.java
deleted file mode 100644
index 80387370..00000000
--- a/odk/examples/java/Inspector/MethodParametersDialog.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.reflection.ParamInfo;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.TypeClass;
-import java.awt.BorderLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.util.Vector;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JComponent;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-
-/**
- * @author bc93774
- */
-public class MethodParametersDialog extends JDialog{
- private javax.swing.JPanel jPnlParamContainer;
- private ParameterPanel[] m_aParameterPanels;
- private ParamInfo[] m_aParamInfo;
- private XIdlMethod m_xIdlMethod;
- private ActionListener oActionListener;
- private JButton jHelpButton = new JButton("Help");
- private JButton jOKButton = new JButton("Ok");
- private JButton jInvokeButton = new JButton("Invoke");
- private Object m_oReturnButton = null;
- private Object m_oUnoObject = null;
- private Object m_oUnoReturnObject = null;
- private JLabel jLblResult;
- private JPanel jResultPanel = null;
- private boolean bisdiposed = false;
- private XUnoMethodNode m_xUnoMethodNode;
-
-
- public MethodParametersDialog(XUnoMethodNode _xUnoMethodNode){
- m_xUnoMethodNode = _xUnoMethodNode;
- m_xIdlMethod = _xUnoMethodNode.getXIdlMethod();
- m_aParamInfo = m_xIdlMethod.getParameterInfos();
- m_oUnoObject = m_xUnoMethodNode.getUnoObject();
- Object[] m_aParameterObjects = new Object[m_aParamInfo.length];
- }
-
-
- public Vector getMethodObjects() {
- super.setModal(true);
- addBorderPanel(getContentPane(), BorderLayout.NORTH);
- addBorderPanel(getContentPane(), BorderLayout.WEST);
- addBorderPanel(getContentPane(), BorderLayout.EAST);
- jPnlParamContainer = new JPanel();
- jPnlParamContainer.setLayout(new javax.swing.BoxLayout(jPnlParamContainer, javax.swing.BoxLayout.Y_AXIS));
- JPanel jHeaderPanel = new JPanel(new BorderLayout());
- JLabel jLblHeader = new JLabel();
- jLblHeader.setText("Please insert the values for the given Parameters of the method '" + m_xIdlMethod.getName() + "'");
- jHeaderPanel.add(jLblHeader,BorderLayout.WEST);
- jPnlParamContainer.add(jHeaderPanel);
-
- m_aParameterPanels = new ParameterPanel[m_aParamInfo.length];
- for (int i = 0; i < m_aParameterPanels.length; i++){
- m_aParameterPanels[i] = new ParameterPanel(m_aParamInfo[i]);
- jPnlParamContainer.add(m_aParameterPanels[i]);
- }
- jPnlParamContainer.add(new ButtonPanel(), java.awt.BorderLayout.SOUTH);
- getContentPane().add(jPnlParamContainer, java.awt.BorderLayout.CENTER);
- pack();
- setLocation(350, 350);
- setTitle("Object Inspector - Parameter Values of '" + m_xIdlMethod.getName() + "'");
- super.setFocusable(true);
- super.setFocusableWindowState(true);
- super.requestFocus();
- m_aParameterPanels[0].getInputComponent().requestFocusInWindow();
- setVisible(true);
- if (!bisdiposed){
- Vector aMethodObjects = new Vector();
- for (int i = 0; i < m_aParameterPanels.length; i++){
- aMethodObjects.add(m_aParameterPanels[i].getValue());
- }
- aMethodObjects.add(m_oUnoReturnObject);
- return aMethodObjects;
- }
- else{
- return null;
- }
- }
-
-
- private void insertResultPanel(Exception _oInvocationException){
- boolean bAddPanel = false;
- if (jResultPanel == null){
- jResultPanel = new JPanel(new BorderLayout());
- bAddPanel = true;
- }
- else{
- jResultPanel.removeAll();
- }
- jLblResult = new JLabel();
- jLblResult.setMaximumSize(new java.awt.Dimension(getSize().width - 20, 57));
- if (_oInvocationException != null){
- jLblResult.setText("<html>Invoking the method cause an exception: <br>" + _oInvocationException.toString() + "</html>");
- }
- else{
- jLblResult.setText("<html>The invocation of the method did not produce any error</html>");
- }
- jResultPanel.add(jLblResult,BorderLayout.WEST);
- if (bAddPanel){
- int nPos = jPnlParamContainer.getComponentCount() - 1;
- jPnlParamContainer.add(jResultPanel, nPos);
- }
- super.pack();
- super.validate();
- }
-
-
- private Object[] getParameterValues(){
- Object[] oParameterValues = new Object[m_aParameterPanels.length];
- for (int i = 0; i < m_aParameterPanels.length; i++){
- oParameterValues[i] = m_aParameterPanels[i].getValue();
- }
- return oParameterValues;
- }
-
-
- private boolean isCompleted(){
- boolean bIsCompleted = true;
- for (int i = 0; i < m_aParameterPanels.length; i++){
- bIsCompleted = m_aParameterPanels[i].isCompleted();
- if (!bIsCompleted){
- break;
- }
- }
- return bIsCompleted;
- }
-
-
- private void addBorderPanel(java.awt.Container _jContainer, String _sLayout){
- JPanel jPnlBorder = new JPanel();
- jPnlBorder.setPreferredSize(new java.awt.Dimension(10, 10));
- _jContainer.add(jPnlBorder, _sLayout);
- }
-
- private void addGapPanel(java.awt.Container _jContainer){
- JPanel jPnlBorder = new JPanel();
- jPnlBorder.setPreferredSize(new java.awt.Dimension(10, 10));
- jPnlBorder.setMaximumSize(new java.awt.Dimension(10, 10));
- _jContainer.add(jPnlBorder);
- }
-
-
- private class ParameterPanel extends JPanel{
- private JComponent m_jComponent;
- private TypeClass m_aTypeClass = null;
-
- public ParameterPanel(ParamInfo _aParamInfo){
- JTextField jTextField = new JTextField();
- JComboBox jComboBox = new JComboBox();
- m_aTypeClass = _aParamInfo.aType.getTypeClass();
- setLayout(new java.awt.BorderLayout());
- addBorderPanel(this, BorderLayout.NORTH);
- addBorderPanel(this, BorderLayout.SOUTH);
- JPanel jPnlCenter1 = new javax.swing.JPanel();
- jPnlCenter1.setLayout(new javax.swing.BoxLayout(jPnlCenter1, javax.swing.BoxLayout.X_AXIS));
- JLabel jLabel1 = new JLabel();
- jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
- String sParamText = _aParamInfo.aName + " (" + _aParamInfo.aType.getName() +")";
- jLabel1.setText(sParamText);
- jPnlCenter1.add(jLabel1);
- addGapPanel(jPnlCenter1);
- switch (m_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- jComboBox.setBackground(new java.awt.Color(255, 255, 255));
- jComboBox.setPreferredSize(new java.awt.Dimension(50, 19));
- jComboBox.addItem("True");
- jComboBox.addItem("False");
- jComboBox.addKeyListener(new UpdateUIAdapter());
- jPnlCenter1.add(jComboBox);
- m_jComponent = jComboBox;
- break;
- case TypeClass.BYTE_value:
- case TypeClass.CHAR_value:
- case TypeClass.DOUBLE_value:
- case TypeClass.ENUM_value:
- case TypeClass.FLOAT_value:
- case TypeClass.HYPER_value:
- case TypeClass.LONG_value:
- case TypeClass.SHORT_value:
- case TypeClass.STRING_value:
- case TypeClass.UNSIGNED_HYPER_value:
- case TypeClass.UNSIGNED_LONG_value:
- case TypeClass.UNSIGNED_SHORT_value:
- jTextField.setPreferredSize(new java.awt.Dimension(50, 19));
- jTextField.addKeyListener(new UpdateUIAdapter());
- jPnlCenter1.add(jTextField);
- m_jComponent = jTextField;
- break;
- default:
- System.out.println("Type " + m_aTypeClass.getValue() + " not yet defined in 'ParameterPanel()'");
- }
- add(jPnlCenter1, java.awt.BorderLayout.CENTER);
- JPanel jPnlEast = new JPanel();
- add(jPnlEast, BorderLayout.EAST);
- }
-
- private JComponent getInputComponent(){
- return m_jComponent;
- }
-
- public Object getValue(){
- Object oReturn = null;
- if (m_jComponent instanceof JTextField){
- String sText = ((JTextField) m_jComponent).getText();
- oReturn = Introspector.getIntrospector().getValueOfText(m_aTypeClass, sText);
- }
- else{
- JComboBox jComboBox = ((JComboBox) m_jComponent);
- oReturn = Boolean.valueOf(jComboBox.getSelectedIndex() == 0);
- }
- return oReturn;
- }
-
-
- public boolean isCompleted(){
- if (m_jComponent instanceof JTextField){
- return !((JTextField) m_jComponent).getText().equals("");
- }
- else{
- return true;
- }
- }
- }
-
-
- private class UpdateUIAdapter extends KeyAdapter{
- public void keyReleased(KeyEvent e){
- boolean bIsCompleted = isCompleted();
- jOKButton.setEnabled(bIsCompleted);
- jInvokeButton.setEnabled(bIsCompleted);
- if (jLblResult != null){
- jLblResult.setEnabled(false);
- jLblResult.invalidate();
- }
- }
- }
-
-
-
- private class ButtonPanel extends JPanel{
- public ButtonPanel(){
- super();
- setLayout(new BorderLayout());
- addBorderPanel(this, BorderLayout.NORTH);
- addBorderPanel(this, BorderLayout.SOUTH);
- JPanel jPnlBottomCenter = new JPanel();
- jPnlBottomCenter.setLayout(new javax.swing.BoxLayout(jPnlBottomCenter, javax.swing.BoxLayout.X_AXIS));
- jHelpButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- oActionListener.actionPerformed(e);
- }
- });
- jHelpButton.setEnabled(oActionListener != null);
- jPnlBottomCenter.add(jHelpButton);
- addGapPanel(jPnlBottomCenter);
- jOKButton.setEnabled(false);
- jOKButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- invokeParameterMethod();
- dispose();
- }
- });
- jOKButton.setEnabled(isCompleted());
- jInvokeButton.setEnabled(isCompleted());
- jInvokeButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- invokeParameterMethod();
- }
- });
-
- jPnlBottomCenter.add(jOKButton);
- addGapPanel(jPnlBottomCenter);
- jPnlBottomCenter.add(jInvokeButton);
- addGapPanel(jPnlBottomCenter);
- JButton jCancelButton = new JButton("Cancel");
- jCancelButton.setFocusCycleRoot(true);
- jCancelButton.setFocusPainted(true);
- jCancelButton.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- bisdiposed = true;
- dispose();
- }
- });
-
- jPnlBottomCenter.add(jCancelButton);
- add(jPnlBottomCenter);
- }
- }
-
-
- public void addActionListener(ActionListener _oActionListener){
- oActionListener = _oActionListener;
- jHelpButton.setEnabled(oActionListener != null);
- }
-
-
- public void invokeParameterMethod(){
- try{
- Object[] oParameters = getParameterValues();
- m_oUnoReturnObject = m_xUnoMethodNode.invoke(m_oUnoObject, oParameters);
- insertResultPanel(null);
- } catch (Exception ex) {
- insertResultPanel(ex);
- m_oUnoReturnObject = null;
- }}
-
-}
diff --git a/odk/examples/java/Inspector/ObjectInspector.xcs b/odk/examples/java/Inspector/ObjectInspector.xcs
deleted file mode 100644
index 01a35ca1..00000000
--- a/odk/examples/java/Inspector/ObjectInspector.xcs
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<oor:component-schema
- xmlns:oor="http://openoffice.org/2001/registry"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- oor:name="ObjectInspector"
- oor:package="org.openoffice.inspector"
- xml:lang="en-US">
- <info>
- <desc>Configuration parameters for the Object Inspector.</desc>
- </info>
- <component>
- <prop oor:name="Language" oor:type="xs:string"/>
- <prop oor:name="SDKPath" oor:type="xs:string"/>
- </component>
-
-</oor:component-schema>
diff --git a/odk/examples/java/Inspector/ObjectInspector.xcu b/odk/examples/java/Inspector/ObjectInspector.xcu
deleted file mode 100644
index 93c2711f..00000000
--- a/odk/examples/java/Inspector/ObjectInspector.xcu
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE local [
- <!ENTITY ProductName "Object Inspector">
- <!ENTITY ProductVersion "0.8">
-]>
-<oor:component-data
- xmlns:oor="http://openoffice.org/2001/registry"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- oor:name="ObjectInspector" oor:package="org.openoffice.inspector">
- <prop oor:name="Language" oor:type="xs:string">
- <value>Java</value>
- </prop>
- <prop oor:name="SDKPath" oor:type="xs:string">
- <value></value>
- </prop>
-
-</oor:component-data>
-
diff --git a/odk/examples/java/Inspector/ProtocolHandler.xcu b/odk/examples/java/Inspector/ProtocolHandler.xcu
deleted file mode 100644
index 932c0f20..00000000
--- a/odk/examples/java/Inspector/ProtocolHandler.xcu
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<oor:component-data oor:name="ProtocolHandler" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="HandlerSet">
- <node oor:name="InspectorAddon$InspectorAddonImpl" oor:op="replace">
- <prop oor:name="Protocols" oor:type="oor:string-list">
- <value>org.openoffice.Office.addon.Inspector:*</value>
- </prop>
- </node>
- </node>
-</oor:component-data>
-
diff --git a/odk/examples/java/Inspector/ProtocolHandlerAddon.java b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
deleted file mode 100644
index 2844d25e..00000000
--- a/odk/examples/java/Inspector/ProtocolHandlerAddon.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.Type;
-import com.sun.star.frame.XStatusListener;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.DispatchDescriptor;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.WindowAttribute;
-import com.sun.star.awt.WindowClass;
-import com.sun.star.awt.WindowDescriptor;
-import com.sun.star.awt.Rectangle;
-
-public class ProtocolHandlerAddon {
- /** This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class ProtocolHandlerAddonImpl extends WeakBase implements
- XDispatchProvider,
- XDispatch,
- XInitialization,
- XServiceInfo {
-
- /** The service name, that must be used to get an instance of this service.
- */
- static private final String[] m_serviceNames = { "com.sun.star.frame.ProtocolHandler" };
-
- /** The component context, that gives access to the service manager and all registered services.
- */
- private XComponentContext m_xCmpCtx;
-
- /** The toolkit, that we can create UNO dialogs.
- */
- private XToolkit m_xToolkit;
-
- /** The frame where the addon depends on.
- */
- private XFrame m_xFrame;
- private XStatusListener m_xStatusListener;
-
-
- /** The constructor of the inner class has a XMultiServiceFactory parameter.
- * @param xmultiservicefactoryInitialization A special service factory
- * could be introduced while initializing.
- */
- public ProtocolHandlerAddonImpl( XComponentContext xComponentContext ) {
- m_xCmpCtx = xComponentContext;
- }
-
- /** This method is a member of the interface for initializing an object
- * directly after its creation.
- * @param object This array of arbitrary objects will be passed to the
- * component after its creation.
- * @throws Exception Every exception will not be handled, but will be
- * passed to the caller.
- */
- public void initialize( Object[] object )
- throws com.sun.star.uno.Exception {
-
- if ( object.length > 0 )
- {
- m_xFrame = ( XFrame ) UnoRuntime.queryInterface(
- XFrame.class, object[ 0 ] );
- }
-
- // Create the toolkit to have access to it later
- m_xToolkit = (XToolkit) UnoRuntime.queryInterface(
- XToolkit.class,
- m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
- m_xCmpCtx));
- }
-
- /** This method returns an array of all supported service names.
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- public static String[] getServiceNames() {
- return m_serviceNames;
- }
-
- /** This method returns true, if the given service will be
- * supported by the component.
- * @param stringService Service name.
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService( String sService ) {
- int len = m_serviceNames.length;
-
- for( int i=0; i < len; i++) {
- if ( sService.equals( m_serviceNames[i] ) )
- return true;
- }
-
- return false;
- }
-
- /** Return the class name of the component.
- * @return Class name of the component.
- */
- public String getImplementationName() {
- return ProtocolHandlerAddonImpl.class.getName();
- }
-
- // XDispatchProvider
- public XDispatch queryDispatch( /*IN*/com.sun.star.util.URL aURL,
- /*IN*/String sTargetFrameName,
- /*IN*/int iSearchFlags ) {
- XDispatch xRet = null;
- if ( aURL.Protocol.compareTo("org.openoffice.Office.addon.example:") == 0 ) {
- if ( aURL.Path.compareTo( "Function1" ) == 0 )
- xRet = this;
- if ( aURL.Path.compareTo( "Function2" ) == 0 )
- xRet = this;
- if ( aURL.Path.compareTo( "Help" ) == 0 )
- xRet = this;
- }
- return xRet;
- }
-
- public XDispatch[] queryDispatches( /*IN*/DispatchDescriptor[] seqDescripts ) {
- int nCount = seqDescripts.length;
- XDispatch[] lDispatcher = new XDispatch[nCount];
-
- for( int i=0; i<nCount; ++i )
- lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL,
- seqDescripts[i].FrameName,
- seqDescripts[i].SearchFlags );
-
- return lDispatcher;
- }
-
- // XDispatch
- public void dispatch( /*IN*/com.sun.star.util.URL aURL,
- /*IN*/com.sun.star.beans.PropertyValue[] aArguments ) {
-
- if ( aURL.Protocol.compareTo("org.openoffice.Office.addon.example:") == 0 )
- {
- if ( aURL.Path.compareTo( "Function1" ) == 0 )
- {
- showMessageBox("SDK DevGuide Add-On example", "Function 1 activated");
- }
- if ( aURL.Path.compareTo( "Function2" ) == 0 )
- {
- showMessageBox("SDK DevGuide Add-On example", "Function 2 activated");
- }
- if ( aURL.Path.compareTo( "Help" ) == 0 )
- {
- showMessageBox("About SDK DevGuide Add-On example", "This is the SDK Add-On example");
- }
- }
- }
-
- public void addStatusListener( /*IN*/XStatusListener xControl,
- /*IN*/com.sun.star.util.URL aURL ) {
- }
-
- public void removeStatusListener( /*IN*/XStatusListener xControl,
- /*IN*/com.sun.star.util.URL aURL ) {
- }
-
- public void showMessageBox(String sTitle, String sMessage) {
- try {
- if ( null != m_xFrame && null != m_xToolkit ) {
-
- // describe window properties.
- WindowDescriptor aDescriptor = new WindowDescriptor();
- aDescriptor.Type = WindowClass.MODALTOP;
- aDescriptor.WindowServiceName = new String( "infobox" );
- aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = (XWindowPeer)UnoRuntime.queryInterface(
- XWindowPeer.class, m_xFrame.getContainerWindow());
- aDescriptor.Bounds = new Rectangle(0,0,300,200);
- aDescriptor.WindowAttributes = WindowAttribute.BORDER |
- WindowAttribute.MOVEABLE |
- WindowAttribute.CLOSEABLE;
-
- XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
- if ( null != xPeer ) {
- XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
- XMessageBox.class, xPeer);
- if ( null != xMsgBox )
- {
- xMsgBox.setCaptionText( sTitle );
- xMsgBox.setMessageText( sMessage );
- xMsgBox.execute();
- }
- }
- }
- } catch ( com.sun.star.uno.Exception e) {
- // do your error handling
- }
- }
- }
-
-
- /** Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return Returns a <code>XSingleServiceFactory</code> for creating the
- * component.
- * @see com.sun.star.comp.loader.JavaLoader#
- * @param stringImplementationName The implementation name of the component.
- * @param xmultiservicefactory The service manager, who gives access to every
- * known service.
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplementationName.equals( ProtocolHandlerAddonImpl.class.getName() ) )
- xFactory = Factory.createComponentFactory(ProtocolHandlerAddonImpl.class,
- ProtocolHandlerAddonImpl.getServiceNames());
-
- return xFactory;
- }
-
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @see com.sun.star.lib.uno.helper.Factory#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static boolean __writeRegistryServiceInfo(
- XRegistryKey xRegistryKey ) {
- return Factory.writeRegistryServiceInfo(
- ProtocolHandlerAddonImpl.class.getName(),
- ProtocolHandlerAddonImpl.getServiceNames(),
- xRegistryKey );
- }
-}
diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java
deleted file mode 100644
index e8aa20c6..00000000
--- a/odk/examples/java/Inspector/SourceCodeGenerator.java
+++ /dev/null
@@ -1,1766 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.UnknownPropertyException;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.lang.Locale;
-import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.reflection.ParamInfo;
-import com.sun.star.reflection.XIdlClass;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.reflection.XTypeDescription;
-import com.sun.star.text.XTextTablesSupplier;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.TypeClass;
-import com.sun.star.uno.UnoRuntime;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-
-public class SourceCodeGenerator {
- private Vector sExceptions = new Vector();
- Vector sHeaderStatements = new HeaderStatements();
- private XLanguageSourceCodeGenerator m_xLanguageSourceCodeGenerator;
- private String sHeaderCode = "";
- private String sStatementCode = "";
- private String sMainMethodSignature = "";
-
- private Hashtable aVariables = new Hashtable();
- private final String SSUFFIXSEPARATOR = "_";
- private final String SVARIABLENAME = "VariableName";
- private final String SARRAYVARIABLENAME = "VariableNameList";
- private final String SUNOOBJECTNAME = "oUnobject";
- private final String SUNOSTRUCTNAME = "aUnoStruct";
- private Introspector m_oIntrospector;
- private Vector aTreepathProviders = new Vector();
- private XTreePathProvider xTreepathProvider = null;
- private boolean baddExceptionHandling = false;
- private boolean bXPropertySetExceptionsAreAdded = false;
- private XUnoNode oInitialUnoNode = null;
- private final String sINITIALVARIABLENAME = "_oUnoEntryObject";
-
-
- /** Creates a new instance of SourceCodeGenerator */
- public SourceCodeGenerator(int _nLanguage) {
- this.setLanguage(_nLanguage);
- m_oIntrospector = Introspector.getIntrospector();
- }
-
-
- public String addSourceCodeOfUnoObject(XTreePathProvider _xTreepathProvider, boolean _brememberPath, boolean _bAddMethodSignature, boolean _baddHeader){
- String sSourceCode = "";
- String sVariableName = "";
- if (_xTreepathProvider != null) {
- for (int i = 0; i < _xTreepathProvider.getPathCount(); i++){
- XUnoNode oUnoNode = _xTreepathProvider.getPathComponent(i);
- if (i == 0){
- sVariableName = sINITIALVARIABLENAME;
- oInitialUnoNode = oUnoNode;
- }
- else{
- if (oUnoNode instanceof XUnoMethodNode){
- XUnoMethodNode oUnoMethodNode = (XUnoMethodNode) oUnoNode;
- if (oUnoMethodNode.isInvoked()){
- UnoObjectDefinition oUnoReturnObjectDefinition = getUnoObjectDefinition(_xTreepathProvider, oUnoMethodNode, i);
- if (!isVariableDeclared(oUnoReturnObjectDefinition, this.generateVariableNameFromMethod(oUnoMethodNode.getXIdlMethod()))){
-// sStatementCode += "\n";
- sStatementCode += "\n" + getMethodStatementSourceCode(oUnoMethodNode, sVariableName, oUnoReturnObjectDefinition);
- }
- sVariableName = oUnoReturnObjectDefinition.getVariableName();
- }
- }
- else if (oUnoNode instanceof XUnoPropertyNode){
- XUnoPropertyNode oUnoPropertyNode = (XUnoPropertyNode) oUnoNode;
- Any oReturnObject = com.sun.star.uno.Any.complete(oUnoPropertyNode.getUnoReturnObject());
- UnoObjectDefinition oUnoReturnObjectDefinition = new UnoObjectDefinition(oReturnObject);
- if (!isVariableDeclared(oUnoReturnObjectDefinition, oUnoPropertyNode.getProperty().Name)){
-// sStatementCode += "\n";
- sStatementCode += "\n" + getPropertyStatementSourceCode(oUnoPropertyNode, sVariableName, oUnoReturnObjectDefinition);
- }
- sVariableName = oUnoReturnObjectDefinition.getVariableName();
- }
- }
- }
- }
- String sCompleteCode = combineCompleteSourceCode(sMainMethodSignature, _baddHeader);
- xTreepathProvider = _xTreepathProvider;
- if (_brememberPath){
- aTreepathProviders.add(_xTreepathProvider);
- }
- return sCompleteCode;
- }
-
-
- private void setLanguage(int _nLanguage){
- XLanguageSourceCodeGenerator xLanguageSourceCodeGenerator = null;
- switch(_nLanguage){
- case XLanguageSourceCodeGenerator.nJAVA:
- xLanguageSourceCodeGenerator = new JavaCodeGenerator();
- break;
- case XLanguageSourceCodeGenerator.nCPLUSPLUS:
- xLanguageSourceCodeGenerator = new CPlusPlusCodeGenerator();
- break;
- case XLanguageSourceCodeGenerator.nBASIC:
- xLanguageSourceCodeGenerator = new BasicCodeGenerator();
- break;
- default:
- System.out.println("Unknown Sourcecode Language. Check Menus!");
- }
- if (xLanguageSourceCodeGenerator != null){
- m_xLanguageSourceCodeGenerator = xLanguageSourceCodeGenerator;
- }
- }
-
- private void resetSourceCodeGeneration(int _nLanguage){
- aVariables.clear();
- this.sHeaderStatements.clear();
- setLanguage(_nLanguage);
- String sHeaderCode = "";
- sStatementCode = "";
- }
-
- private String generateVariableNameFromMethod(String _sMethodName, String _sPrefix, boolean _bConsiderAll){
- String sReturn = "";
- if (_sMethodName.startsWith(_sPrefix)){
- int nPrefixLength = _sPrefix.length();
- if (_sMethodName.length() > nPrefixLength){
- String sChar = _sMethodName.substring(nPrefixLength, nPrefixLength + 1);
- String sUpperChar = sChar.toUpperCase();
- if (sUpperChar.equals(sChar)){
- if (_bConsiderAll){
- sReturn = _sMethodName;
- }
- else{
- sReturn = _sMethodName.substring(nPrefixLength, _sMethodName.length());
- }
- }
- }
- }
- return sReturn;
- }
-
-
- private String generateVariableNameFromMethod(XIdlMethod _xIdlMethod){
- // todo: refactor this!!!
- String sMethodName = _xIdlMethod.getName();
- String sReturn = "";
- sReturn = generateVariableNameFromMethod(sMethodName, "getBy", false);
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "get", false);
- }
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "attach", false);
- }
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "assign", false);
- }
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "attach", false);
- }
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "create", false);
- }
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "is", true);
- }
- if (sReturn.equals("")){
- sReturn = generateVariableNameFromMethod(sMethodName, "has", true);
- }
- if (sReturn.equals("")){
- sReturn = sMethodName;
- }
- return sReturn;
- }
-
-
- public String convertAllUnoObjects(int _nLanguage){
- String sSourceCode = "";
- resetSourceCodeGeneration(_nLanguage);
- int ncount = aTreepathProviders.size();
- for (int i=0; i< ncount; i++){
- sSourceCode = addSourceCodeOfUnoObject((XTreePathProvider) aTreepathProviders.get(i), false, (i==0), (i == (ncount-1)));
- }
- return sSourceCode;
- }
-
- private UnoObjectDefinition getUnoObjectDefinition(XTreePathProvider _xTreePathProvider, XUnoMethodNode _oUnoMethodNode, int _nindex){
- XUnoNode oUnoNode = null;
- Object oUnoReturnObject = null;
- Object[] oParamObjects = null;
- XIdlClass xIdlClass = _oUnoMethodNode.getXIdlMethod().getReturnType();
- String sTypeName = xIdlClass.getName();
- TypeClass aTypeClass = xIdlClass.getTypeClass();
- if (aTypeClass.getValue() != TypeClass.VOID_value){
- if (_xTreePathProvider.getPathCount() > _nindex + 1){
- oUnoNode = _xTreePathProvider.getPathComponent(_nindex + 1);
- oUnoReturnObject = oUnoNode.getUnoObject();
- }
- }
- if (oUnoReturnObject == null){
- oUnoReturnObject = _oUnoMethodNode.getLastUnoReturnObject();
- }
- UnoObjectDefinition oUnoObjectDefinition = new UnoObjectDefinition(oUnoReturnObject, sTypeName, aTypeClass);
- if (_oUnoMethodNode.hasParameters()){
- if (oUnoNode != null){
- oParamObjects = oUnoNode.getParameterObjects();
- }
- else{
- oParamObjects = _oUnoMethodNode.getLastParameterObjects();
- }
- }
- if (oParamObjects != null){
- oUnoObjectDefinition.addParameterObjects(oParamObjects);
- }
- return oUnoObjectDefinition;
- }
-
-
- private String combineCompleteSourceCode(String _sMethodSignature, boolean _bAddHeader){
- String sCompleteCode = "";
- if (_bAddHeader){
- sMainMethodSignature = m_xLanguageSourceCodeGenerator.getMainMethodSignatureSourceCode(oInitialUnoNode, sINITIALVARIABLENAME);
- m_xLanguageSourceCodeGenerator.assignqueryInterfaceHeaderSourceCode();
- sCompleteCode += getHeaderSourceCode();
- }
- sCompleteCode += sMainMethodSignature;
- sCompleteCode += sStatementCode;
- if (_bAddHeader){
- sCompleteCode += m_xLanguageSourceCodeGenerator.getMethodTerminationSourceCode();
- sCompleteCode += "\n" + m_xLanguageSourceCodeGenerator.getCommentSign() + "...";
- }
- return sCompleteCode;
- }
-
-
- public String getPropertyStatementSourceCode(XUnoPropertyNode _oUnoPropertyNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){
- String sReturnObjectVariableDefinition = "";
- String sStatement = "";
- String sPropertyName = _oUnoPropertyNode.getProperty().Name;
- UnoObjectDefinition oUnoObjectDefinition = new UnoObjectDefinition(_oUnoPropertyNode.getUnoObject(), "com.sun.star.beans.XPropertySet");
- if (!m_xLanguageSourceCodeGenerator.needsqueryInterface() || (oUnoObjectDefinition.getTypeClass().getValue() == TypeClass.STRUCT_value)){
- oUnoObjectDefinition.setVariableName(_sVariableName);
- if (oUnoObjectDefinition.getTypeClass().getValue() == TypeClass.STRUCT_value){
- sReturnObjectVariableDefinition = getVariableInitialization(_oUnoReturnObjectDefinition, false);
- sStatement += m_xLanguageSourceCodeGenerator.getStructSourceCode(sReturnObjectVariableDefinition, oUnoObjectDefinition.getVariableName(), sPropertyName);
- return sStatement;
- }
- }
- sStatement += addQueryInterfaceSourceCode(oUnoObjectDefinition, _sVariableName, "com.sun.star.beans.XPropertySet");
- if (_oUnoReturnObjectDefinition.getTypeClass().getValue() != TypeClass.VOID_value){
- sReturnObjectVariableDefinition = getVariableInitialization(_oUnoReturnObjectDefinition, true);
- }
- sStatement += m_xLanguageSourceCodeGenerator.getPropertyValueGetterSourceCode(sPropertyName, sReturnObjectVariableDefinition, oUnoObjectDefinition.getVariableName(), _oUnoReturnObjectDefinition.getTypeClass(), _oUnoReturnObjectDefinition.getTypeName());
- addXPropertySetRelatedExceptions();
- return sStatement;
- }
-
-
- public String getMethodStatementSourceCode(XUnoMethodNode _oUnoMethodNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){
- String sReturnObjectVariableDefinition = "";
- String sStatement = "";
- XIdlMethod xIdlMethod = _oUnoMethodNode.getXIdlMethod();
- TypeClass aReturnTypeClass = xIdlMethod.getReturnType().getTypeClass();
- UnoObjectDefinition oUnoObjectDefinition = new UnoObjectDefinition(_oUnoMethodNode.getUnoObject(), _oUnoMethodNode.getClassName());
- String sVariableStemName = this.generateVariableNameFromMethod(xIdlMethod);
- sStatement += addQueryInterfaceSourceCode(oUnoObjectDefinition, _sVariableName, oUnoObjectDefinition.getTypeName());
- if (_oUnoReturnObjectDefinition.getTypeClass().getValue() != TypeClass.VOID_value){
- sReturnObjectVariableDefinition = getVariableInitialization(_oUnoReturnObjectDefinition, false) + " = ";
- }
- Object[] oParamObjects = _oUnoReturnObjectDefinition.getParameterObjects();
- String sParameterCode = getMethodParameterValueDescription(_oUnoMethodNode, oParamObjects, false);
- String sSeparator = m_xLanguageSourceCodeGenerator.getMethodSeparator();
- sStatement += "\t" + sReturnObjectVariableDefinition + oUnoObjectDefinition.getVariableName() + sSeparator + xIdlMethod.getName() + "(" + sParameterCode + ")";
- sStatement += m_xLanguageSourceCodeGenerator.getStatementTerminationCharacter();
- addExceptions(xIdlMethod);
- return sStatement;
- }
-
-
- private String addQueryInterfaceSourceCode(UnoObjectDefinition _oUnoObjectDefinition, String _sVariableName, String _sTypeName){
- String sLocStatement = "";
- if (m_xLanguageSourceCodeGenerator.needsqueryInterface()){
- if (!isVariableDeclared(_oUnoObjectDefinition, "")){
- String sObjectVariableDefinition = getVariableDeclaration(_oUnoObjectDefinition, false, "");
- sLocStatement += m_xLanguageSourceCodeGenerator.getqueryInterfaceSourceCode(_sTypeName, sObjectVariableDefinition, _sVariableName);
- }
- }
- else{
- _oUnoObjectDefinition.setVariableName(_sVariableName);
- }
- return sLocStatement;
- }
-
-
- private void addXPropertySetRelatedExceptions(){
- if (!bXPropertySetExceptionsAreAdded){
- sExceptions.add("com.sun.star.beans.UnknownPropertyException");
- sExceptions.add("com.sun.star.lang.WrappedTargetException");
- sExceptions.add("com.sun.star.lang.IllegalArgumentException");
- bXPropertySetExceptionsAreAdded = true;
- baddExceptionHandling = true;
- }
- }
-
-
- private void addExceptions(XIdlMethod _xIdlMethod){
- XIdlClass[] xIdlClasses = _xIdlMethod.getExceptionTypes();
- for (int i = 0; i > xIdlClasses.length; i++){
- sExceptions.add(xIdlClasses[0].getName());
- baddExceptionHandling = true;
- }
- }
-
- private String getRootDescription(XUnoNode _oUnoNode){
- return "_o" + _oUnoNode.toString();
- }
-
-
- private String getHeaderSourceCode(){
- Enumeration aEnumeration = aVariables.elements();
- while(aEnumeration.hasMoreElements()){
- UnoObjectDefinition oUnoObjectDefinition = (UnoObjectDefinition) aEnumeration.nextElement();
- String sCurHeaderStatement = m_xLanguageSourceCodeGenerator.getHeaderSourceCode(oUnoObjectDefinition.getUnoObject(), oUnoObjectDefinition.getTypeName(), oUnoObjectDefinition.getTypeClass());
- sHeaderStatements.add(sCurHeaderStatement);
- }
- String sHeaderSourcecode = "";
- String[] sHeaderStatementArray = new String[sHeaderStatements.size()];
- sHeaderStatements.toArray(sHeaderStatementArray);
- java.util.Arrays.sort(sHeaderStatementArray);
- for (int i = 0; i < sHeaderStatementArray.length; i++){
- sHeaderSourcecode += sHeaderStatementArray[i];
- }
- sHeaderSourcecode += m_xLanguageSourceCodeGenerator.getFinalHeaderStatements();
- return sHeaderSourcecode +"\n" + m_xLanguageSourceCodeGenerator.getCommentSign() + "...\n";
- }
-
-
- private class HeaderStatements extends Vector{
-
- public boolean contains(Object _oElement){
- String sCompName = (String) _oElement;
- for (int i = 0; i < this.size(); i++){
- String sElement = (String) this.get(i);
- if (sElement.equals(sCompName)){
- return true;
- }
- }
- return false;
- }
-
-
- public boolean add(Object _oElement){
- if (_oElement instanceof String){
- if (!contains(_oElement)){
- super.add(_oElement);
- return true;
- }
- }
- return false;
- }
- }
-
-
- private boolean isVariableDeclared(UnoObjectDefinition _oUnoObjectDefinition, String _sDefaultStemName){
- boolean bisDeclared = false;
- if (!_sDefaultStemName.equals("")){
- _oUnoObjectDefinition.setCentralVariableStemName(_sDefaultStemName);
- }
- String sVariableStemName = _oUnoObjectDefinition.getVariableStemName();
- bisDeclared = aVariables.containsKey(sVariableStemName);
- if (bisDeclared){
- Object oUnoObject = _oUnoObjectDefinition.getUnoObject();
- if (m_oIntrospector.isObjectPrimitive(oUnoObject)){
- bisDeclared = false;
- }
- else if (m_oIntrospector.isObjectSequence(oUnoObject)){
- bisDeclared = false;
- }
- else{
- String sCompVariableName = sVariableStemName;
- String sUnoObjectIdentity = oUnoObject.toString();
- boolean bleaveloop = false;
- int a = 2;
- while (!bleaveloop){
- if (aVariables.containsKey(sCompVariableName)){
- Object oUnoCompObject = ((UnoObjectDefinition) aVariables.get(sCompVariableName)).getUnoObject();
- String sUnoCompObjectIdentity = oUnoCompObject.toString();
- bleaveloop = sUnoCompObjectIdentity.equals(sUnoObjectIdentity);
- bisDeclared = bleaveloop;
- if (!bleaveloop){
- sCompVariableName = sVariableStemName + SSUFFIXSEPARATOR + a++;
- }
- }
- else{
- bleaveloop = true;
- bisDeclared = false;
- }
- }
- }
- }
- return bisDeclared;
- }
-
-
- private String addUniqueVariableName(String _sStemVariableName, UnoObjectDefinition _oUnoObjectDefinition){
- boolean bElementexists = true;
- int a = 2;
- String sCompName = _sStemVariableName;
- while (bElementexists){
- if (! aVariables.containsKey(sCompName)){
- aVariables.put(sCompName, _oUnoObjectDefinition);
- break;
- }
- sCompName = _sStemVariableName + SSUFFIXSEPARATOR + a++;
- }
- return sCompName;
- }
-
-
-
- private String getTypeString(String _sTypeName, TypeClass _aTypeClass, boolean _bAsHeaderSourceCode){
- String sTypeString = "";
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getbooleanTypeDescription();
- break;
- case TypeClass.BYTE_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getbyteTypeDescription();
- break;
- case TypeClass.CHAR_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getcharTypeDescription();
- break;
- case TypeClass.DOUBLE_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getdoubleTypeDescription();
- break;
- case TypeClass.FLOAT_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getfloatTypeDescription();
- break;
- case TypeClass.HYPER_value:
- sTypeString = m_xLanguageSourceCodeGenerator.gethyperTypeDescription();
- break;
- case TypeClass.LONG_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getlongTypeDescription();
- break;
- case TypeClass.SHORT_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getshortTypeDescription();
- break;
- case TypeClass.STRING_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getstringTypeDescription(_bAsHeaderSourceCode);
- break;
- case TypeClass.UNSIGNED_HYPER_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getunsignedhyperTypeDescription();
- break;
- case TypeClass.UNSIGNED_LONG_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getunsignedlongTypeDescription();
- break;
- case TypeClass.UNSIGNED_SHORT_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getdoubleTypeDescription();
- break;
- case TypeClass.SEQUENCE_value:
- //TODO consider mulitdimensional Arrays
- XTypeDescription xTypeDescription = Introspector.getIntrospector().getReferencedType(_sTypeName);
- if (xTypeDescription != null){
- sTypeString = getTypeString(xTypeDescription.getName(), xTypeDescription.getTypeClass(), _bAsHeaderSourceCode);
- }
- break;
- case TypeClass.ANY_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getanyTypeDescription(_bAsHeaderSourceCode);
- break;
- case TypeClass.TYPE_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getObjectTypeDescription("com.sun.star.uno.Type", _bAsHeaderSourceCode);
- break;
- case TypeClass.ENUM_value:
- case TypeClass.STRUCT_value:
- case TypeClass.INTERFACE_ATTRIBUTE_value:
- case TypeClass.INTERFACE_METHOD_value:
- case TypeClass.INTERFACE_value:
- case TypeClass.PROPERTY_value:
- sTypeString = m_xLanguageSourceCodeGenerator.getObjectTypeDescription(_sTypeName, _bAsHeaderSourceCode);
- break;
- default:
- }
- return sTypeString;
- }
-
-
- private String getVariableDeclaration(UnoObjectDefinition _oUnoObjectDefinition, boolean _bInitialize, String _sVariableDefaultName){
- TypeClass aTypeClass = _oUnoObjectDefinition.getTypeClass();
- TypeClass aLocTypeClass = aTypeClass;
- boolean bIsArray = false;
- if (_oUnoObjectDefinition.getUnoObject() != null){
- bIsArray = m_oIntrospector.isObjectSequence(_oUnoObjectDefinition.getUnoObject());
- }
- else{
- bIsArray = _oUnoObjectDefinition.getTypeClass().getValue() == TypeClass.SEQUENCE_value;
- }
- String sVariableName = _oUnoObjectDefinition.getVariableName(_sVariableDefaultName);
- String sTypeName = _oUnoObjectDefinition.getTypeName();
- String sTypeString = getTypeString(sTypeName, aLocTypeClass, false);
- if (bIsArray){
- XTypeDescription xTypeDescription = Introspector.getIntrospector().getReferencedType(sTypeName);
- if (xTypeDescription != null){
- aLocTypeClass = xTypeDescription.getTypeClass();
- }
- }
- String sVariableDeclaration = m_xLanguageSourceCodeGenerator.getVariableDeclaration(sTypeString, sVariableName, bIsArray, aLocTypeClass, _bInitialize);
- addUniqueVariableName(sVariableName, _oUnoObjectDefinition);
- return sVariableDeclaration;
- }
-
-
- public String getVariableInitialization(UnoObjectDefinition _oUnoObjectDefinition, boolean _bInitialize){
- String sObjectVariableDeclaration = "";
- String sVariableName = _oUnoObjectDefinition.getVariableName();
- if (isVariableDeclared(_oUnoObjectDefinition, "")){
- sObjectVariableDeclaration = sVariableName;
- }
- else{
- sObjectVariableDeclaration = getVariableDeclaration(_oUnoObjectDefinition, _bInitialize, "");
- }
- return sObjectVariableDeclaration;
- }
-
-
-
- public String getVariableNameforUnoObject(String _sShortClassName){
- if (_sShortClassName.startsWith("X")){
- return "x" + _sShortClassName.substring(1);
- }
- else{
- return _sShortClassName;
- }
- }
-
-
-class UnoObjectDefinition{
- Object m_oUnoObject = null;
- Type aType = null;
- String sVariableStemName = "";
- String m_sCentralVariableStemName = "";
- String sVariableName = "";
- String m_sTypeName = "";
- TypeClass m_aTypeClass = null;
- Object[] m_oParameterObjects = null;
-
-
- public UnoObjectDefinition(Any _oUnoObject){
- m_sTypeName = _oUnoObject.getType().getTypeName();
- m_aTypeClass = _oUnoObject.getType().getTypeClass();
- m_oUnoObject = _oUnoObject;
- m_sCentralVariableStemName = getCentralVariableStemName(m_aTypeClass);
- }
-
-
- public UnoObjectDefinition(Object _oUnoObject, String _sTypeName, TypeClass _aTypeClass){
- m_oUnoObject = _oUnoObject;
- m_sTypeName = _sTypeName;
- m_aTypeClass = _aTypeClass;
- m_sCentralVariableStemName = getCentralVariableStemName(m_aTypeClass);
- }
-
-
- public UnoObjectDefinition(Object _oUnoObject, String _sTypeName){
- m_oUnoObject = _oUnoObject;
- m_sTypeName = _sTypeName;
- m_aTypeClass = AnyConverter.getType(_oUnoObject).getTypeClass();
- m_sCentralVariableStemName = getCentralVariableStemName(m_aTypeClass);
- }
-
-
- private String getCentralVariableStemName(TypeClass _aTypeClass){
- String sCentralVariableStemName = "";
- int nTypeClass = _aTypeClass.getValue();
- switch(nTypeClass){
- case TypeClass.SEQUENCE_value:
- //TODO consider mulitdimensional Arrays
- XTypeDescription xTypeDescription = Introspector.getIntrospector().getReferencedType(getTypeName());
- if (xTypeDescription != null){
- sCentralVariableStemName = getCentralVariableStemName(xTypeDescription.getTypeClass());
- }
- break;
- case TypeClass.TYPE_value:
- sCentralVariableStemName = SVARIABLENAME;
- break;
- case TypeClass.STRUCT_value:
- sCentralVariableStemName = Introspector.getShortClassName(getTypeName());
- break;
- case TypeClass.INTERFACE_ATTRIBUTE_value:
- case TypeClass.INTERFACE_METHOD_value:
- case TypeClass.INTERFACE_value:
- case TypeClass.PROPERTY_value:
- String sShortClassName = m_oIntrospector.getShortClassName(getTypeName());
- sCentralVariableStemName = getVariableNameforUnoObject(sShortClassName);
- default:
- sCentralVariableStemName = SVARIABLENAME;
- }
- return sCentralVariableStemName;
- }
-
- /** may return null
- */
- public Object getUnoObject(){
- return m_oUnoObject;
- }
-
-
- public void setTypeClass(TypeClass _aTypeClass){
- sVariableStemName = "";
- m_aTypeClass = _aTypeClass;
- }
-
-
- public TypeClass getTypeClass(){
- return m_aTypeClass;
- }
-
-
- public void setTypeName(String _sTypeName){
- sVariableStemName = "";
- m_sTypeName = _sTypeName;
- }
-
-
- public String getTypeName(){
- return m_sTypeName;
- }
-
-
- public void setCentralVariableStemName(String _sCentralVariableStemName){
- m_sCentralVariableStemName = _sCentralVariableStemName;
- }
-
-
- public String getVariableStemName(){
- if (sVariableStemName.equals("")){
- sVariableStemName = getVariableStemName(m_aTypeClass);
- }
- return sVariableStemName;
- }
-
-
- public void addParameterObjects(Object[] _oParameterObjects){
- m_oParameterObjects = _oParameterObjects;
- }
-
-
- public Object[] getParameterObjects(){
- return m_oParameterObjects;
- }
-
-
- public boolean hasParameterObjects(){
- boolean breturn = false;
- if (m_oParameterObjects != null){
- breturn = m_oParameterObjects.length > 0;
- }
- return breturn;
- }
-
-
- public String getVariableStemName(TypeClass _aTypeClass){
- int nTypeClass = _aTypeClass.getValue();
- switch(nTypeClass){
- case TypeClass.BOOLEAN_value:
- sVariableStemName = "b" + m_sCentralVariableStemName;
- break;
- case TypeClass.DOUBLE_value:
- case TypeClass.FLOAT_value:
- sVariableStemName = "f" + m_sCentralVariableStemName;
- break;
- case TypeClass.BYTE_value:
- case TypeClass.HYPER_value:
- case TypeClass.LONG_value:
- case TypeClass.UNSIGNED_HYPER_value:
- case TypeClass.UNSIGNED_LONG_value:
- case TypeClass.UNSIGNED_SHORT_value:
- case TypeClass.SHORT_value:
- sVariableStemName = "n" + m_sCentralVariableStemName;
- break;
- case TypeClass.CHAR_value:
- case TypeClass.STRING_value:
- sVariableStemName = "s" + m_sCentralVariableStemName;
- break;
- case TypeClass.SEQUENCE_value:
- //TODO consider mulitdimensional Arrays
- XTypeDescription xTypeDescription = Introspector.getIntrospector().getReferencedType(getTypeName());
- if (xTypeDescription != null){
- sVariableStemName = getVariableStemName(xTypeDescription.getTypeClass());
- }
- break;
- case TypeClass.TYPE_value:
- sVariableStemName = "a" + m_sCentralVariableStemName;
- break;
- case TypeClass.ANY_value:
- sVariableStemName = "o" + m_sCentralVariableStemName;
- break;
- case TypeClass.STRUCT_value:
- case TypeClass.ENUM_value:
- sVariableStemName = "a" + m_sCentralVariableStemName;
- break;
- case TypeClass.INTERFACE_ATTRIBUTE_value:
- case TypeClass.INTERFACE_METHOD_value:
- case TypeClass.INTERFACE_value:
- case TypeClass.PROPERTY_value:
- String sShortClassName = m_oIntrospector.getShortClassName(getTypeName());
- sVariableStemName = getVariableNameforUnoObject(sShortClassName);
- default:
- }
- return sVariableStemName;
- }
-
-
- private void setVariableName(String _sVariableName){
- sVariableName = _sVariableName;
- }
-
-
- private String getVariableName(String _sCentralVariableStemName){
- if (!_sCentralVariableStemName.equals("")){
- this.m_sCentralVariableStemName = _sCentralVariableStemName;
- }
- return getVariableName();
- }
-
-
- private String getVariableName() throws NullPointerException{
- if (sVariableName.equals("")){
- int a = 2;
- sVariableName = getVariableStemName();
- boolean bleaveloop = false;
- while (!bleaveloop){
- if (aVariables.containsKey(sVariableName)){
- String sUnoObjectIdentity = ((UnoObjectDefinition) aVariables.get(sVariableName)).getUnoObject().toString();
- if (m_oUnoObject != null){
- if ((sUnoObjectIdentity.equals(m_oUnoObject.toString()) && (!m_oIntrospector.isPrimitive(this.getTypeClass())) &&
- (! m_oIntrospector.isObjectSequence(m_oUnoObject)))){
- bleaveloop = true;
- }
- else{
- sVariableName = getVariableStemName() + SSUFFIXSEPARATOR + a++;
- }
- }
- else{
- bleaveloop = true;
- }
- }
- else{
- bleaveloop = true;
- // throw new NullPointerException("SourceCode Variable " + _sStemVariableName + " not defined");
- }
- }
- }
- return sVariableName;
- }
- }
-
-
- public String getStringValueOfObject(Object _oUnoObject, TypeClass _aTypeClass){
- String sReturn = "";
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- boolean bbooleanValue = ((Boolean) _oUnoObject).booleanValue();
- sReturn += Boolean.toString(bbooleanValue);
- case TypeClass.CHAR_value:
- break;
- case TypeClass.DOUBLE_value:
- double fdoubleValue = ((Double) _oUnoObject).doubleValue();
- sReturn += Double.toString(fdoubleValue);
- break;
- case TypeClass.ENUM_value:
- break;
- case TypeClass.FLOAT_value:
- float floatValue = ((Float) _oUnoObject).floatValue();
- sReturn += Float.toString(floatValue);
- break;
- case TypeClass.HYPER_value:
- long nlongValue = ((Long) _oUnoObject).longValue();
- sReturn += Long.toString(nlongValue);
- break;
- case TypeClass.LONG_value:
- int nintValue = ((Integer) _oUnoObject).intValue();
- sReturn += Integer.toString(nintValue);
- break;
- case TypeClass.SHORT_value:
- short nshortValue = ((Short) _oUnoObject).shortValue();
- sReturn += Short.toString(nshortValue);
- break;
- case TypeClass.STRING_value:
- sReturn += (String) _oUnoObject;
- break;
- case TypeClass.UNSIGNED_HYPER_value:
- nlongValue = ((Long) _oUnoObject).longValue();
- sReturn += Long.toString(nlongValue);
- break;
- case TypeClass.UNSIGNED_LONG_value:
- nintValue = ((Integer) _oUnoObject).intValue();
- sReturn += Integer.toString(nintValue);
- break;
- case TypeClass.UNSIGNED_SHORT_value:
- nshortValue = ((Short) _oUnoObject).shortValue();
- sReturn += Short.toString(nshortValue);
- break;
- default:
- System.out.println("Type " + _aTypeClass.getValue() + " not yet defined in 'getStringValueOfObject()'");
- }
- return sReturn;
- }
-
-
- public String getMethodParameterValueDescription(XUnoMethodNode _oUnoMethodNode, Object[] _oParamObjects, boolean _bIncludeParameterNames){
- String sParamSourceCode = "";
- ParamInfo[] aParamInfos = _oUnoMethodNode.getXIdlMethod().getParameterInfos();
- if (_oParamObjects != null){
- for (int i = 0; i < _oParamObjects.length; i++){
- TypeClass aTypeClass = aParamInfos[i].aType.getTypeClass();
- if (_bIncludeParameterNames){
- sParamSourceCode += aParamInfos[i].aName + "=";
- }
- String sParamDescription = getStringValueOfObject(_oParamObjects[i], aTypeClass);
- sParamDescription = this.m_xLanguageSourceCodeGenerator.castLiteral(sParamDescription, aTypeClass);
- sParamSourceCode += sParamDescription;
-
- if (i < _oParamObjects.length - 1){
- sParamSourceCode += ", ";
- }
- }
- }
- return sParamSourceCode;
- }
-
-
- public class JavaCodeGenerator implements XLanguageSourceCodeGenerator{
- String sStatementsCode = "";
- boolean bAddAnyConverter = false;
-// boolean bAddTypeImport = false;
- boolean bIsPropertyUnoObjectDefined = false;
-
- public JavaCodeGenerator(){
- }
-
-
- public String getStatementTerminationCharacter(){
- return ";";
- }
-
-
- public String getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass){
- String sClassName = _sClassName;
- String sHeaderStatement = "";
- if (_oUnoObject != null){
- if (!m_oIntrospector.isObjectPrimitive(_oUnoObject)){
- if (m_oIntrospector.isObjectSequence(_oUnoObject)){
- XTypeDescription xTypeDescription = m_oIntrospector.getReferencedType(sClassName);
- if (xTypeDescription != null){
- if (!m_oIntrospector.isPrimitive(xTypeDescription.getTypeClass())){
- sClassName = getTypeString(xTypeDescription.getName(), xTypeDescription.getTypeClass(), true);
- }
- // primitive Types are not supposed to turn up in the import section...
- else{
- sClassName = "";
- }
- }
- }
- else{
- sClassName = getTypeString(_sClassName, _aTypeClass, true);
- }
- }
- else if (_aTypeClass.getValue() == TypeClass.ENUM_value){
- sClassName = _sClassName;
- }
- else{
- sClassName = "";
- }
- if (!sClassName.equals("")){
- sHeaderStatement = "import " + sClassName + ";\n";
- }
- }
- return sHeaderStatement;
- }
-
-
- public String getFinalHeaderStatements(){
- return "";
- }
-
-
- public void assignqueryInterfaceHeaderSourceCode(){
- sHeaderStatements.add("import com.sun.star.uno.UnoRuntime;\n");
- sHeaderStatements.add("import com.sun.star.uno.XInterface;\n");
- if (bAddAnyConverter){
- sHeaderStatements.add("import com.sun.star.uno.AnyConverter;\n");
- }
- }
-
-
-
- public String getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName){
- boolean bLocAddAnyConverter = true;
- String sReturn = "";
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toBoolean(" + _sObjectDescription + ")";
- break;
- case TypeClass.CHAR_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toChar(" + _sObjectDescription + ")";
- break;
- case TypeClass.BYTE_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toByte(" + _sObjectDescription + ")";
- break;
- case TypeClass.DOUBLE_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toDouble(" + _sObjectDescription + ")";
- break;
- case TypeClass.FLOAT_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toFloat(" + _sObjectDescription + ")";
- break;
- case TypeClass.UNSIGNED_HYPER_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toUnsignedLong(" + _sObjectDescription + ")";
- break;
- case TypeClass.HYPER_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toLong(" + _sObjectDescription + ")";
- break;
- case TypeClass.UNSIGNED_LONG_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toUnsignedInt(" + _sObjectDescription + ")";
- break;
- case TypeClass.LONG_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toInt(" + _sObjectDescription + ")";
- break;
- case TypeClass.SHORT_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toShort(" + _sObjectDescription + ")";
- break;
- case TypeClass.UNSIGNED_SHORT_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toUnsignedShort(" + _sObjectDescription + ")";
- break;
- case TypeClass.STRING_value:
- sReturn = _sReturnVariableName + " = AnyConverter.toString(" + _sObjectDescription + ")";
- break;
- default:
- String sShortTypeName = Introspector.getShortClassName(_sTypeName);
- if (bIsPropertyUnoObjectDefined){
- sReturn = "oUnoObject = " + _sObjectDescription + ";\n\t";
- }
- else{
- sReturn = "Object oUnoObject = " + _sObjectDescription + ";\n\t";
- bIsPropertyUnoObjectDefined = true;
- }
- sReturn += _sReturnVariableName + " = (" + sShortTypeName + ") AnyConverter.toObject(" + sShortTypeName + ".class, oUnoObject);";
-// this.bAddTypeImport = true;
- break;
- }
- if (!bAddAnyConverter){
- bAddAnyConverter = bLocAddAnyConverter;
- }
- return sReturn;
- }
-
-
- public String getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember){
- return "\t" + _sReturnVariableDescription + " = " + _sObjectDescription + "." + _sMember + ";";
- }
-
- public String getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription){
- //TODO try to use + _oUnoNode.getClassName() instead of the hack
- String sReturn = "public void codesnippet(XInterface " + _soReturnObjectDescription + "){";
- if (baddExceptionHandling){
- sReturn += "\ntry{";
- }
- return sReturn;
- }
-
- public String getMethodSeparator(){
- return ".";
- }
-
- public boolean needsqueryInterface(){
- return true;
- }
-
- public String getqueryInterfaceSourceCode(String _sClassName, String _sReturnVariableName, String _sIncomingObjectName){
- String sShortClassName = m_oIntrospector.getShortClassName(_sClassName);
- return "\t" + _sReturnVariableName + " = (" + sShortClassName + ") UnoRuntime.queryInterface(" + sShortClassName + ".class, " + _sIncomingObjectName + ");\n";
- }
-
-
- public String getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName){
- String sObjectDescription = _sIncomingObjectName + ".getPropertyValue(\"" + _sPropertyName + "\")";
- String sReturn = getConvertedSourceCodeValueOfObject(_sReturnVariableName, sObjectDescription, _aTypeClass, _sTypeName);
- sReturn += ";";
- sReturn = "\t" + sReturn;
- return sReturn;
-// return "\t" + _sReturnVariableName + " = " + _sIncomingObjectName + ".getPropertyValue(\"" + _sPropertyName + "\");";
- }
-
-
- public String getObjectTypeDescription(String _sClassName, boolean _bAsHeader){
- String sReturn = "";
- if (_bAsHeader){
- sReturn = _sClassName;
- }
- else{
- sReturn = m_oIntrospector.getShortClassName(_sClassName);
- }
- return sReturn;
- }
-
-
- public String getMethodTerminationSourceCode(){
- String sReturn = "";
- int nIndex = 1;
- String sExceptionName = "e";
- if (baddExceptionHandling){
- for (int i = 0; i < sExceptions.size(); i++){
- String sCurException = (String) sExceptions.get(i);
- if (sReturn.indexOf(sCurException) == -1){
- if (nIndex > 1){
- sExceptionName = "e"+ nIndex;
- }
- else{
- sReturn +="\n}";
- }
- sReturn += "catch (" + sCurException + " " + sExceptionName + "){\n";
- sReturn += "\t" + sExceptionName + ".printStackTrace(System.out);\n";
- sReturn += "\t" + getCommentSign() + "Enter your Code here...\n}";
- nIndex++;
- }
- }
- }
- sReturn += "\n}";
- return sReturn;
- }
-
- public String castLiteral(String _sExpression, TypeClass _aTypeClass){
- String sReturn = "";
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- sReturn = _sExpression;
- break;
- case TypeClass.BYTE_value:
- sReturn = "(byte) " + _sExpression;
- break;
- case TypeClass.CHAR_value:
- sReturn = "'" + _sExpression + "'";
- break;
- case TypeClass.DOUBLE_value:
- sReturn = "(double) " + _sExpression;
- break;
- case TypeClass.FLOAT_value:
- sReturn = "(float) " + _sExpression;
- break;
- case TypeClass.UNSIGNED_SHORT_value:
- case TypeClass.SHORT_value:
- sReturn = "(short) " + _sExpression;
- break;
- case TypeClass.STRING_value:
- sReturn = "\"" + _sExpression + "\"";
- break;
- case TypeClass.HYPER_value:
- case TypeClass.UNSIGNED_HYPER_value:
- sReturn = "(long) " + _sExpression;
- break;
- case TypeClass.LONG_value:
- sReturn = _sExpression;
- break;
- case TypeClass.ENUM_value:
- default:
- sReturn = _sExpression;
- System.out.println("Type " + _aTypeClass.getValue() + " not yet defined in 'castliteral()'");
- }
- return sReturn;
- }
-
-
- public String getbooleanTypeDescription(){
- return "boolean";
- }
-
- public String getbyteTypeDescription(){
- return "byte";
- }
-
- public String getshortTypeDescription(){
- return "short";
- }
-
- public String getunsignedshortTypeDescription(){
- return "short";
- }
-
- public String getlongTypeDescription(){
- return "int";
- }
-
- public String getunsignedlongTypeDescription(){
- return "int";
- }
-
- public String gethyperTypeDescription(){
- return "long";
- }
-
- public String getunsignedhyperTypeDescription(){
- return "long";
- }
-
- public String getfloatTypeDescription(){
- return "float";
- }
-
- public String getdoubleTypeDescription(){
- return "double";
- }
-
- public String getcharTypeDescription(){
- return "char";
- }
-
- public String getstringTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "String";
- }
- }
-
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "com.sun.star.uno.Type";
- }
- else{
- return "Type";
- }
- }
-
- public String getanyTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "Object";
- }
- }
-
-
- public String getStringValue(String _sValue){
- return _sValue;
- }
-
-
- public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean _bIsArray, TypeClass _aTypeClass, boolean _bInitialize){
- String sReturn = "";
- if (_bIsArray){
- sReturn = _sTypeString + "[] " + _sVariableName;
- }
- else{
- sReturn = _sTypeString + " " + _sVariableName;
- }
- return sReturn;
- }
-
-
- public String getArrayDeclaration(String _sVariableDeclaration){
- String sReturn = "";
- String[] sDeclarations = _sVariableDeclaration.split(" ");
- for (int i = 0; i< sDeclarations.length;i++){
- sReturn += sDeclarations[i];
- if (i == 0){
- sReturn += "[]";
- }
- if (i < (sDeclarations.length -1)){
- sReturn += " ";
- }
- }
- return sReturn;
- }
-
- public String getCommentSign(){
- return "//";
- }
- }
-
-
- public class BasicCodeGenerator implements XLanguageSourceCodeGenerator{
- String sStatementsCode = "";
-
- public BasicCodeGenerator(){
- }
-
- public String getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass){
- String sHeaderStatement = "";
- return sHeaderStatement;
- }
-
- public String getFinalHeaderStatements(){
- return "";
- }
-
- public String getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription){
- //TODO try to use + _oUnoNode.getClassName() instead of the hack
- return "Sub Main(" + _soReturnObjectDescription + " as " + getanyTypeDescription(false) + ")";
- }
-
- public boolean needsqueryInterface(){
- return false;
- }
-
- public void assignqueryInterfaceHeaderSourceCode(){
- }
-
- public String getMethodSeparator(){
- return ".";
- }
-
-
- public String getqueryInterfaceSourceCode(String _sClassName, String _sReturnVariableName, String _sIncomingObjectName){
- return _sIncomingObjectName;
- }
-
-
- public String getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName){
- return "\t" + _sReturnVariableName + " = " + _sIncomingObjectName + "." + _sPropertyName;
- }
-
-
- public String getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember){
- return getPropertyValueGetterSourceCode(_sMember, _sReturnVariableDescription, _sObjectDescription, null, "" );
- }
-
- public String getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName){
- return _sReturnVariableName + " = " + _sObjectDescription;
- }
-
-
- public String getObjectTypeDescription(String _sClassName, boolean _bAsHeader){
- return "Object";
- }
-
-
- public String getMethodTerminationSourceCode(){
- return "\nEnd Sub\n";
- }
-
-
- public String castLiteral(String _sExpression, TypeClass _aTypeClass){
- String sReturn = "";
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- case TypeClass.BYTE_value:
- case TypeClass.DOUBLE_value:
- case TypeClass.FLOAT_value:
- case TypeClass.UNSIGNED_SHORT_value:
- case TypeClass.SHORT_value:
- case TypeClass.LONG_value:
- case TypeClass.UNSIGNED_LONG_value:
- case TypeClass.HYPER_value:
- case TypeClass.UNSIGNED_HYPER_value:
- sReturn = _sExpression;
- break;
- case TypeClass.CHAR_value:
- case TypeClass.STRING_value:
- sReturn = "\"" +_sExpression + "\"";
- break;
- case TypeClass.ENUM_value:
- default:
- sReturn = _sExpression;
- System.out.println("Type " + _aTypeClass.getValue() + " not yet defined in 'castliteral()'");
- }
- return sReturn;
- }
-
-
-
- public String getbooleanTypeDescription(){
- return "Boolean";
- }
-
- public String getbyteTypeDescription(){
- return "Integer";
- }
-
- public String getshortTypeDescription(){
- return "Integer";
- }
-
- public String getunsignedshortTypeDescription(){
- return "Integer";
- }
-
- public String getlongTypeDescription(){
- return "Integer";
- }
-
- public String getunsignedlongTypeDescription(){
- return "Long";
- }
-
- public String gethyperTypeDescription(){
- return "Long";
- }
-
- public String getunsignedhyperTypeDescription(){
- return "Long";
- }
-
- public String getfloatTypeDescription(){
- return "Double";
- }
-
- public String getdoubleTypeDescription(){
- return "Double";
- }
-
- public String getcharTypeDescription(){
- return "String";
- }
-
- public String getstringTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "String";
- }
- }
-
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "Object";
- }
- }
-
- public String getanyTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "Object";
- }
- }
-
- public String getStatementTerminationCharacter(){
- return "";
- }
-
-
- public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean bIsArray, TypeClass _aTypeClass, boolean _bInitialize){
- String sReturn = "";
- if (bIsArray){
- sReturn = "Dim " + _sVariableName + "() as " + _sTypeString + "\n\t" + _sVariableName;
- }
- else{
- sReturn = "Dim " + _sVariableName + " as " + _sTypeString + "\n\t" + _sVariableName;
- }
- return sReturn;
- }
-
-
- public String getStringValue(String _sValue){
- return _sValue;
- }
-
-
- public String getArrayDeclaration(String _sVariableDeclaration){
- String sReturn = "";
- String[] sDeclarations = _sVariableDeclaration.split(" ");
- for (int i = 0; i< sDeclarations.length;i++){
- sReturn += sDeclarations[i];
- if (i == 0){
- sReturn += "[]";
- }
- if (i < (sDeclarations.length -1)){
- sReturn += " ";
- }
- }
- return sReturn;
- }
-
- public String getCommentSign(){
- return "'";
- }
-
- }
-
- public class CPlusPlusCodeGenerator implements XLanguageSourceCodeGenerator{
- String sStatementsCode = "";
- boolean bIncludeStringHeader = false;
- boolean bIncludeAny = false;
- boolean bIncludeSequenceHeader = false;
-
- public CPlusPlusCodeGenerator(){
- }
-
- private String getCSSNameSpaceString(){
- return "css";
- }
-
- public String getStatementTerminationCharacter(){
- return ";";
- }
-
-
- public String getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass){
- String sClassName = _sClassName;
- String sHeaderStatement = "";
- if (_oUnoObject != null){
- if (!m_oIntrospector.isObjectPrimitive(_oUnoObject)){
- if (m_oIntrospector.isObjectSequence(_oUnoObject)){
- XTypeDescription xTypeDescription = m_oIntrospector.getReferencedType(sClassName);
- if (xTypeDescription != null){
- if (!m_oIntrospector.isPrimitive(xTypeDescription.getTypeClass())){
- sClassName = getTypeString(xTypeDescription.getName(), xTypeDescription.getTypeClass(), true);
- }
- // primitive Types are not supposed to turn up in the import section...
- else{
- sClassName = "";
- }
- }
- }
- else{
- sClassName = getTypeString(_sClassName, _aTypeClass, true);
- }
- if (!sClassName.equals("")){
- sHeaderStatement = getHeaderOfClass(sClassName);
- }
- }
- }
- return sHeaderStatement;
- }
-
-
-
- public String getFinalHeaderStatements(){
- String sReturn = "";
- sReturn += "\nnamespace " + getCSSNameSpaceString() + " = com::sun::star;\n";
- sReturn += "using ::rtl::OUString;\n";
- return sReturn;
- }
-
-
- private String getHeaderOfClass(String _sClassName){
- return "#include \"" + _sClassName.replace('.', '/') + ".hpp\"\n"; // #include <com/sun/star/uno/XComponentContext.hpp>
- }
-
-
-
- public void assignqueryInterfaceHeaderSourceCode(){
- sHeaderStatements.add("#include \"sal/config.h\"\n");
- sHeaderStatements.add("#include \"sal/types.h\"\n");
- if (bIncludeStringHeader){
- sHeaderStatements.add("#include \"rtl/ustring.hxx\"\n");
- }
- sHeaderStatements.add("#include \"com/sun/star/uno/Reference.hxx\"\n");
- if (bIncludeSequenceHeader){
- sHeaderStatements.add("#include \"com/sun/star/uno/Sequence.hxx\"\n");
- }
- sHeaderStatements.add(getHeaderOfClass("com.sun.star.uno.XInterface"));
- if (bIncludeAny){
- sHeaderStatements.add(getHeaderOfClass("com.sun.star.uno.Any"));
- }
- }
-
-
- public String getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription){
- String sReturn = "";
- sReturn = "void codesnippet(const " + getCSSNameSpaceString() + "::uno::Reference<" + getCSSNameSpaceString() + "::uno::XInterface>& " + _soReturnObjectDescription + " ){";
- int a = 0;
- if (!sExceptions.contains("com.sun.star.uno.RuntimeException")){
- sExceptions.add("com.sun.star.uno.RuntimeException");
- }
- if (baddExceptionHandling){
- sReturn += "\n//throw ";
- for (int i = 0; i < sExceptions.size(); i++){
- String sCurException = (String) sExceptions.get(i);
- if (sReturn.indexOf(sCurException) == -1){
- if (a++ > 0){
- sReturn += ", ";
- }
- sReturn += getObjectTypeDescription(sCurException, false);
-
- }
- }
-
- }
- sReturn += "{";
- return sReturn;
- }
-
-
- public boolean needsqueryInterface(){
- return true;
- }
-
-
- public String getqueryInterfaceSourceCode(String _sClassName, String _sReturnVariableName, String _sIncomingObjectName){
- return "\t" + _sReturnVariableName + "( " + _sIncomingObjectName + ", " + getCSSNameSpaceString() + "::uno::UNO_QUERY_THROW);\n";
- }
-
-
- public String getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName){
- String sFirstLine = "\t";
- String sReturnVariableName = _sReturnVariableName;
- // e.g. uno::Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) );
- String[] sVarDefinition = _sReturnVariableName.split("=");
- if (sVarDefinition.length > 0){
- String sVariable = sVarDefinition[0];
- String[] sVarDeclaration = sVariable.split(" ");
- if (sVarDeclaration.length > 0){
- sFirstLine += sReturnVariableName + ";\n";
- sReturnVariableName = sVarDeclaration[sVarDeclaration.length-1];
- }
- }
- String sObjectDescription = _sIncomingObjectName + "->getPropertyValue(" + getStringValue(_sPropertyName) + ")";
- String sSecondLine = "\t" + getConvertedSourceCodeValueOfObject(sReturnVariableName, sObjectDescription, _aTypeClass, _sTypeName) + ";";
- return sFirstLine + sSecondLine;
- }
-
-
- public String getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember){
- return "\t" + _sReturnVariableDescription + " = " + _sObjectDescription + "->" + _sMember + ";";
- }
-
-
- public String getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName){
-// if (m_oIntrospector.isPrimitive(_aTypeClass)){
- return _sObjectDescription + " >>= " + _sReturnVariableName;
-// }
-// else{
-// return _sReturnVariableName + " = " + _sObjectDescription;
-// }
- }
-
-
- public String getStringValue(String _sValue){
- bIncludeStringHeader = true;
- return "OUString(RTL_CONSTASCII_USTRINGPARAM(\"" + _sValue + "\"))";
- }
-
-
- public String getObjectTypeDescription(String _sClassName, boolean _bAsHeader){
- String sReturn = "";
- if (_bAsHeader){
- sReturn = _sClassName.replace('.', '/');
- }
- else{
- String sModuleName = m_oIntrospector.getModuleName(_sClassName);
- sModuleName = m_oIntrospector.getShortClassName(sModuleName);
- sReturn = getCSSNameSpaceString() + "::" + sModuleName + "::" + m_oIntrospector.getShortClassName(_sClassName);
- }
- return sReturn;
- }
-
-
- public String getMethodTerminationSourceCode(){
- return "\n}";
- }
-
- public String getMethodSeparator(){
- return "->";
- }
-
-
- public String castLiteral(String _sExpression, TypeClass _aTypeClass){
- String sReturn = "";
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- case TypeClass.BYTE_value:
- case TypeClass.DOUBLE_value:
- case TypeClass.FLOAT_value:
- case TypeClass.UNSIGNED_SHORT_value:
- case TypeClass.SHORT_value:
- case TypeClass.LONG_value:
- case TypeClass.UNSIGNED_LONG_value:
- case TypeClass.HYPER_value:
- case TypeClass.UNSIGNED_HYPER_value:
- sReturn = _sExpression;
- break;
- case TypeClass.CHAR_value:
- sReturn = "'" + _sExpression + "'";
- break;
- case TypeClass.STRING_value:
- sReturn = getStringValue(_sExpression);
- break;
- case TypeClass.ENUM_value:
- default:
- sReturn = _sExpression;
- System.out.println("Type " + _aTypeClass.getValue() + " not yet defined in 'castliteral()'");
- }
- return sReturn;
- }
-
- public String getbooleanTypeDescription(){
- return "sal_Bool";
- }
-
- public String getbyteTypeDescription(){
- return "sal_Int8";
- }
-
- public String getshortTypeDescription(){
- return "sal_Int16";
- }
-
- public String getunsignedshortTypeDescription(){
- return "sal_uInt16";
- }
-
- public String getlongTypeDescription(){
- return "sal_Int32";
- }
-
- public String getunsignedlongTypeDescription(){
- return "sal_uInt32";
- }
-
- public String gethyperTypeDescription(){
- return "sal_Int64";
- }
-
- public String getunsignedhyperTypeDescription(){
- return "sal_uInt64";
- }
-
- public String getfloatTypeDescription(){
- return "float";
- }
-
- public String getdoubleTypeDescription(){
- return "double";
- }
-
- public String getcharTypeDescription(){
- return "sal_Unicode";
- }
-
- public String getstringTypeDescription(boolean _bAsHeaderSourceCode){
- bIncludeStringHeader = true;
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "OUString";
- }
- }
-
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "com/sun/star/uno/Type";
- }
- else{
- return "Type";
- }
- }
-
- public String getanyTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "com/sun/star/uno/XInterface";
- }
- else{
- return "XInterface";
- }
- }
-
-
- public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean bIsArray, TypeClass _aTypeClass, boolean _bInitialize){
- boolean bIsPrimitive = m_oIntrospector.isPrimitive(_aTypeClass);
-
- // uno::Reference< frame::XDispatch > m_xDispatch
- String sReturn = "";
- if (bIsArray){
- bIncludeSequenceHeader = true;
- sReturn = getCSSNameSpaceString() + "::uno::Sequence<" + _sTypeString + "> " + _sVariableName;
- }
- else{
- if (bIsPrimitive){
- sReturn = _sTypeString + " " + _sVariableName;
- if (_bInitialize){
- switch (_aTypeClass.getValue()){
- case TypeClass.BOOLEAN_value:
- sReturn = sReturn + " = false";
- break;
- case TypeClass.BYTE_value:
- case TypeClass.UNSIGNED_SHORT_value:
- case TypeClass.SHORT_value:
- case TypeClass.LONG_value:
- case TypeClass.UNSIGNED_LONG_value:
- case TypeClass.HYPER_value:
- case TypeClass.UNSIGNED_HYPER_value:
- sReturn = sReturn + " = 0";
- break;
- case TypeClass.DOUBLE_value:
- case TypeClass.FLOAT_value:
- sReturn = sReturn + " = 0.0";
- break;
- case TypeClass.CHAR_value:
- sReturn = sReturn + "'0'";
- break;
- case TypeClass.STRING_value:
- sReturn = _sTypeString + " " + _sVariableName;
- break;
- default:
- sReturn = _sTypeString + " " + _sVariableName;
- System.out.println("Type " + _aTypeClass.getValue() + " not yet defined in 'getVariableDeclaration()'");
- }
- }
- }
- else{
- sReturn = getCSSNameSpaceString() + "::uno::Reference<" + _sTypeString + "> " +_sVariableName;
- }
- }
- return sReturn;
- }
-
- public String getArrayDeclaration(String _sVariableDeclaration){
- this.bIncludeSequenceHeader = true;
- String sReturn = "";
- String[] sDeclarations = _sVariableDeclaration.split(" ");
- if (sDeclarations.length == 2){
- sReturn = getCSSNameSpaceString() +"::uno::Sequence<" + sDeclarations[1] + ">";
- }
- return sReturn;
- }
-
- public String getCommentSign(){
- return "//";
- }
-
- }
-}
diff --git a/odk/examples/java/Inspector/SwingDialogProvider.java b/odk/examples/java/Inspector/SwingDialogProvider.java
deleted file mode 100644
index 7b85070c..00000000
--- a/odk/examples/java/Inspector/SwingDialogProvider.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.XComponentContext;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.event.ActionListener;
-import java.awt.event.ComponentAdapter;
-import java.awt.event.ComponentEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import javax.swing.ButtonGroup;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JDialog;
-import javax.swing.JEditorPane;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JRadioButtonMenuItem;
-import javax.swing.JTabbedPane;
-import javax.swing.KeyStroke;
-
-
-
-public class SwingDialogProvider implements XDialogProvider{
-
- private JPopupMenu m_jPopupMenu = new JPopupMenu();
- private XComponentContext m_xComponentContext;
- private Inspector._Inspector m_oInspector;
- private JDialog m_jInspectorDialog = new JDialog();
- private JTabbedPane m_jTabbedPane1 = new JTabbedPane();
- private Container cp;
-
- private JMenu jMnuOptions = new JMenu("Options");
- private JRadioButtonMenuItem jJavaMenuItem = null;
- private JRadioButtonMenuItem jCPlusPlusMenuItem = null;
- private JRadioButtonMenuItem jBasicMenuItem = null;
-
- /** Creates a new instance of SwingPopupMentuProvider */
- public SwingDialogProvider(Inspector._Inspector _oInspector, String _sTitle) {
- m_oInspector = _oInspector;
- m_xComponentContext = _oInspector.getXComponentContext();
- insertMenus();
- initializePopupMenu();
- cp = m_jInspectorDialog.getContentPane();
- cp.setLayout(new java.awt.BorderLayout(0, 10));
- m_jTabbedPane1.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
- m_jInspectorDialog.addWindowListener(new InspectorWindowAdapter());
- m_jInspectorDialog.addComponentListener(new InspectorComponentAdapter());
- m_jInspectorDialog.setTitle(_sTitle);
- m_jInspectorDialog.setLocation(100, 50);
- m_jInspectorDialog.getContentPane().add(m_jTabbedPane1);
- }
-
-
-
- public JDialog getDialog(){
- return m_jInspectorDialog;
- }
-
-
- public void addMenuBar(JMenuBar _jMenuBar){
- getDialog().setJMenuBar(_jMenuBar);
- }
-
-
- public void removeTabPaneByIndex(int _nIndex){
- if (_nIndex > -1){
- String sSelInspectorPanelTitle = m_jTabbedPane1.getTitleAt(_nIndex);
- m_jTabbedPane1.remove(_nIndex);
- m_oInspector.getInspectorPages().remove(sSelInspectorPanelTitle);
- }
- }
-
-
- public void selectInspectorPageByIndex(int nTabIndex){
- m_jTabbedPane1.setSelectedIndex(nTabIndex);
- }
-
-
- public int getInspectorPageCount(){
- return m_jTabbedPane1.getTabCount();
- }
-
-
- public JTabbedPane getTabbedPane(){
- return m_jTabbedPane1;
- }
-
-
- public InspectorPane getSelectedInspectorPage(){
- int nIndex = m_jTabbedPane1.getSelectedIndex();
- return getInspectorPage(nIndex);
- }
-
-
- public InspectorPane getInspectorPage(int _nIndex){
- InspectorPane oInspectorPane = null;
- if (_nIndex > -1){
- JPanel jPnlContainerInspectorPanel = (JPanel) m_jTabbedPane1.getComponentAt(_nIndex);
- String sInspectorPanelTitle = m_jTabbedPane1.getTitleAt(_nIndex);
- oInspectorPane = (InspectorPane) m_oInspector.getInspectorPages().get(sInspectorPanelTitle);
- }
- return oInspectorPane;
- }
-
-
- public void removeTabPanes(){
- int nCount = m_jTabbedPane1.getTabCount();
- if (nCount > 0){
- for (int i = nCount-1; i >= 0; i--){
- removeTabPaneByIndex(i);
- }
- }
- }
-
- public void removeSelectedTabPane(){
- int nIndex = getTabbedPane().getSelectedIndex();
- removeTabPaneByIndex(nIndex);
- }
-
-
- private class InspectorComponentAdapter extends ComponentAdapter{
- public void componentHidden(ComponentEvent e){
- m_jInspectorDialog.pack();
- m_jInspectorDialog.invalidate();
-
- }
-
- public void componentShown(ComponentEvent e){
- m_jInspectorDialog.pack();
- m_jInspectorDialog.invalidate();
- }
- }
-
- private class InspectorWindowAdapter extends WindowAdapter{
- public void windowClosed(WindowEvent e){
- removeTabPanes();
- m_oInspector.disposeHiddenDocuments();
- }
-
- public void windowClosing(WindowEvent e){
- removeTabPanes();
- m_oInspector.disposeHiddenDocuments();
- }
- }
-
-
-
- private void initializePopupMenu(){
- m_jPopupMenu.add(getInspectMenuItem("Inspect"));
- m_jPopupMenu.add(getSourceCodeMenuItem(SADDTOSOURCECODE));
- m_jPopupMenu.add(getInvokeMenuItem(SINVOKE));
- m_jPopupMenu.addSeparator();
- m_jPopupMenu.add(getHelpMenuItem("Help"));
- }
-
-
- private void addOpenDocumentMenu(JMenu _jMnuRoot){
- ActionListener oActionListener = new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- String sTDocUrl = evt.getActionCommand();
- m_oInspector.inspectOpenDocument(sTDocUrl);
- }
- };
- String[] sTDocUrls = m_oInspector.getTDocUrls();
- String[] sTDocTitles = m_oInspector.getTDocTitles(sTDocUrls);
- for (int i = 0; i < sTDocUrls.length; i++){
- addSingleMenuItem(_jMnuRoot, sTDocTitles[i], sTDocUrls[i], oActionListener);
- }
- }
-
-
- private void addApplicationDocumentMenu(JMenu _jMnuRoot){
- ActionListener oActionListener = new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- String sApplicationDocUrl = evt.getActionCommand();
- m_oInspector.inspectOpenEmptyDocument(sApplicationDocUrl);
- }
- };
- String[][] sApplUrls = m_oInspector.getApplicationUrls();
- for (int i = 0; i < sApplUrls.length; i++){
- addSingleMenuItem(_jMnuRoot, sApplUrls[i][1], sApplUrls[i][0], oActionListener);
- }
- }
-
-
- private void addSingleMenuItem(JMenu _jMnuOpenDocs, String _sTitle, String _sActionCommand, ActionListener _oActionListener){
- javax.swing.JMenuItem jMnuItemOpenDoc = new javax.swing.JMenuItem(_sTitle);
- jMnuItemOpenDoc.setActionCommand(_sActionCommand);
- jMnuItemOpenDoc.addActionListener(_oActionListener);
- _jMnuOpenDocs.add(jMnuItemOpenDoc);
- }
-
-
- private void addHelpMenu(JMenuBar _jInspectMenuBar){
- JMenu jMnuHelp = new JMenu("Help");
- jMnuHelp.add(getHelpMenuItem("Idl-Help"));
- _jInspectMenuBar.add(jMnuHelp);
- }
-
-
- private JMenuItem getHelpMenuItem(String _sMenuTitle){
- JMenuItem jMnuHelpItem = new JMenuItem(_sMenuTitle);
- jMnuHelpItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0));
- jMnuHelpItem.setMnemonic('H');
- jMnuHelpItem.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.openIdlFileforSelectedNode();
- }
- });
- return jMnuHelpItem;
- }
-
- private void addFileMenu(JMenuBar _jInspectMenuBar){
- JMenu jMnuFile = new JMenu("File");
- JMenuItem jMnuItemRemoveInspector = new JMenuItem("Remove");
- jMnuItemRemoveInspector.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- removeSelectedTabPane();
- }
- });
- jMnuFile.add(jMnuItemRemoveInspector);
- JMenuItem jMnuItemExit = new JMenuItem("Exit");
- jMnuItemExit.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- getDialog().dispose();
- }
- });
- jMnuFile.add(jMnuItemExit);
- _jInspectMenuBar.add(jMnuFile);
- }
-
- private JMenuItem getInspectMenuItem(String _sLabel){
- JMenuItem jMnuSelectedObject = new JMenuItem(_sLabel);
- jMnuSelectedObject.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.inspectSelectedNode();
- }
- });
- return jMnuSelectedObject;
- }
-
-
- private JMenuItem getSourceCodeMenuItem(String _sLabel){
- JMenuItem jMnuSelectedObject = new JMenuItem(_sLabel);
- jMnuSelectedObject.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.addSourceCodeOfSelectedNode();
- }
- });
- return jMnuSelectedObject;
- }
-
- private JMenuItem getInvokeMenuItem(String _sLabel){
- JMenuItem jMnuSelectedObject = new JMenuItem(_sLabel);
- jMnuSelectedObject.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.invokeSelectedMethod();
- }
- });
- return jMnuSelectedObject;
- }
-
-
- private void addInspectMenu(JMenuBar _jInspectMenuBar){
- JMenu jMnuInspect = new JMenu("Inspect");
- addApplicationDocumentMenu(jMnuInspect);
- jMnuInspect.addSeparator();
- addGlobalServiceManagerMenu(jMnuInspect);
- jMnuInspect.addSeparator();
- jMnuInspect.add(getInspectMenuItem("Selected Object"));
- jMnuInspect.addSeparator();
- addOpenDocumentMenu(jMnuInspect);
- _jInspectMenuBar.add(jMnuInspect);
- }
-
- public int getLanguage(){
- return XLanguageSourceCodeGenerator.nJAVA;
- }
-
-
- public void selectSourceCodeLanguage(int _nLanguage){
- switch (_nLanguage){
- case XLanguageSourceCodeGenerator.nJAVA:
- jJavaMenuItem.setSelected(true);
- break;
- case XLanguageSourceCodeGenerator.nCPLUSPLUS:
- jCPlusPlusMenuItem.setSelected(true);
- break;
- case XLanguageSourceCodeGenerator.nBASIC:
- jBasicMenuItem.setSelected(true);
- break;
- default:
- System.out.println("Warning: Sourcecode language is not defined!");
- }
- }
-
- private JRadioButtonMenuItem addLanguageMenuItem(ButtonGroup _group, String _sLanguageTitle, boolean _bSelect, char _sMnemonic, final int _nLanguage){
- JRadioButtonMenuItem jMenuItem = new JRadioButtonMenuItem(_sLanguageTitle, _bSelect);
- jMenuItem.setMnemonic(_sMnemonic);
- _group.add(jMenuItem);
- jMenuItem.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.setSourceCodeLanguage(_nLanguage);
- }
- });
- return jMenuItem;
- }
-
-
- public String getIDLPath(){
- return this.m_oInspector.getIDLPath();
- }
-
- private void addOptionsMenu(JMenuBar _jInspectMenuBar){
- ButtonGroup oButtonGroup = new ButtonGroup();
- jJavaMenuItem = addLanguageMenuItem(oButtonGroup, "Generate Java Sourcecode", true, 'J', XLanguageSourceCodeGenerator.nJAVA);
- jMnuOptions.add(jJavaMenuItem);
- jCPlusPlusMenuItem = addLanguageMenuItem(oButtonGroup, "Generate C++ Sourcecode", false, 'C', XLanguageSourceCodeGenerator.nCPLUSPLUS);
- jMnuOptions.add(jCPlusPlusMenuItem);
- jBasicMenuItem = addLanguageMenuItem(oButtonGroup, "Generate OpenOffice.org Basic Sourcecode", false, 'B', XLanguageSourceCodeGenerator.nBASIC);
- jMnuOptions.add(jBasicMenuItem);
- jMnuOptions.addSeparator();
- JMenuItem jMenuItem = new JMenuItem("Path to SDK-Installation");
- jMenuItem.setMnemonic('I');
- jMenuItem.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.assignSDKPath();
- }
- });
-
- jMnuOptions.add(jMenuItem);
- _jInspectMenuBar.add(jMnuOptions);
- }
-
-
- private void insertMenus(){
- JMenuBar jMenuBar1 = new javax.swing.JMenuBar();
- addFileMenu(jMenuBar1);
- addInspectMenu(jMenuBar1);
- JMenu jMnuEdit = new JMenu("Edit");
- JMenu jMnuView = new JMenu("View");
- addOptionsMenu(jMenuBar1);
- jMenuBar1.setFont(new java.awt.Font("Dialog", 0, 12));
- jMenuBar1.add(jMnuEdit);
- jMenuBar1.add(jMnuView);
- addHelpMenu(jMenuBar1);
- addMenuBar(jMenuBar1);
- }
-
- private void addGlobalServiceManagerMenu(JMenu _jMnuRoot){
- JMenuItem jMnuGlobalServiceManager = new JMenuItem("Global Service Manager");
- jMnuGlobalServiceManager.addActionListener(new ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- m_oInspector.inspect(m_xComponentContext.getServiceManager(), "Global ServiceManager");
- }
- });
- _jMnuRoot.add(jMnuGlobalServiceManager);
- }
-
-
-
- public void enablePopupMenuItem(String _sMenuTitle, boolean _bdoEnable){
- Component[] oComponents = m_jPopupMenu.getComponents();
- for (int i = 0; i < oComponents.length; i++){
- if (oComponents[i] instanceof JMenuItem){
- JMenuItem jMenuItem = (JMenuItem) oComponents[i];
- if (jMenuItem.getText().equals(_sMenuTitle)){
- jMenuItem.setEnabled(_bdoEnable);
- }
- }
- }
- }
-
-
- public void showPopUpMenu(Object _invoker, int x, int y) throws ClassCastException{
- if (_invoker instanceof Component){
- m_jPopupMenu.show((Component) _invoker, x, y);
- }
- }
-
-
- public void show(int _nPageIndex){
- Dimension aDimension = m_jInspectorDialog.getSize();
- selectInspectorPageByIndex(_nPageIndex);
- if (_nPageIndex > 0){
- m_jInspectorDialog.setSize(aDimension);
- }
- else{
- m_jInspectorDialog.pack();
- }
-// m_jInspectorDialog.paint(m_jInspectorDialog.getGraphics());
- m_jInspectorDialog.setVisible(true);
- }
-
- public void paint(){
- m_jTabbedPane1.paintImmediately(m_jTabbedPane1.getBounds());
- }
-
-
- public void addInspectorPage(String _sTitle, Object _oContainer) throws ClassCastException{
- if (_oContainer instanceof Component){
- m_jTabbedPane1.addTab(_sTitle, (Component) _oContainer);
- }
- }
-}
diff --git a/odk/examples/java/Inspector/SwingTreeControlProvider.java b/odk/examples/java/Inspector/SwingTreeControlProvider.java
deleted file mode 100644
index bf00acd7..00000000
--- a/odk/examples/java/Inspector/SwingTreeControlProvider.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.NullPointerException;
-import com.sun.star.reflection.XConstantTypeDescription;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-import java.awt.BorderLayout;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import javax.swing.JScrollBar;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import javax.swing.JTree;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-import javax.swing.event.TreeWillExpandListener;
-import javax.swing.tree.DefaultTreeSelectionModel;
-import javax.swing.tree.ExpandVetoException;
-import javax.swing.tree.TreePath;
-import javax.swing.tree.TreeSelectionModel;
-
-
-
-public class SwingTreeControlProvider implements XTreeControlProvider{
- private JTextArea jtxtGeneratedSourceCode = new JTextArea();
- private JTextField jtxtFilter = new JTextField();
- private javax.swing.JLabel jlblFilter = new javax.swing.JLabel("Set a filter");
- private JPanel jPnlBottom = new JPanel(new BorderLayout());
- private JPanel jPanelProgress = new JPanel(new BorderLayout());
- private JPanel jPnlPath = new JPanel(new BorderLayout());
- private JLabel jLblPath = new JLabel("Generated source code");
- private JProgressBar jProgressBar1 = new JProgressBar();
- private JTree jTree = new javax.swing.JTree();
- private XDialogProvider m_xDialogProvider;
- private HideableTreeModel treeModel;
- private UnoTreeRenderer oUnoTreeRenderer;
- private InspectorPane m_oInspectorPane;
- private Object oUserDefinedObject = null;
- private boolean bIsUserDefined = false;
- private SwingUnoNode oRootNode;
-
- private final int nDIALOGWIDTH = 800;
-
-
-
- public SwingTreeControlProvider(XDialogProvider _xDialogProvider){
- m_xDialogProvider = _xDialogProvider;
- }
-
-
- public void addInspectorPane(InspectorPane _oInspectorPane){
- m_oInspectorPane = _oInspectorPane;
- }
-
- public InspectorPane getInspectorPane() throws NullPointerException{
- if (m_oInspectorPane == null){
- throw new NullPointerException("InspectorPage has not been added to TreeControl");
- }
- else{
- return m_oInspectorPane;
- }
- }
-
- private void ComponentSelector(Object _oRootObject, String _sRootTreeNodeName) {
- String sTreeNodeName = _sRootTreeNodeName;
- oRootNode = new SwingUnoNode(_oRootObject);
- oRootNode.setLabel(_sRootTreeNodeName);
- treeModel = new HideableTreeModel(oRootNode);
- jTree.setModel(treeModel);
- jTree.setRootVisible(true);
- jTree.setVisible(true);
- oRootNode.setFoldable(true);
- enableFilterElements(null);
- }
-
-
-
- private void insertTopPanel(JPanel _jPnlCenter){
- javax.swing.JPanel jPnlTop = new javax.swing.JPanel(new BorderLayout(10, 10));
- jPnlTop.setPreferredSize(new java.awt.Dimension(nDIALOGWIDTH, 20));
- jlblFilter.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
- jlblFilter.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
- jPnlTop.add(jlblFilter, java.awt.BorderLayout.WEST);
- jtxtFilter.setHorizontalAlignment(javax.swing.JTextField.LEFT);
- jtxtFilter.setPreferredSize(new java.awt.Dimension(200, 10));
- jtxtFilter.addKeyListener(new InspectorKeyFilterAdapter());
- jPnlTop.add(jtxtFilter, java.awt.BorderLayout.CENTER);
- _jPnlCenter.add(jPnlTop, java.awt.BorderLayout.NORTH);
- }
-
-
- private void insertBottomPanel(JSplitPane _jSplitPane){ //JPanel _jPnlCenter){
- jtxtGeneratedSourceCode.setTabSize(4);
- jtxtGeneratedSourceCode.getAccessibleContext().setAccessibleName("generated SourceCode");
- JScrollPane jScrollPane = new JScrollPane(jtxtGeneratedSourceCode);
- jScrollPane.setPreferredSize(new Dimension(nDIALOGWIDTH,205));
- jtxtGeneratedSourceCode.setEditable(false);
- _jSplitPane.setBottomComponent(jScrollPane);
- }
-
- private void insertBorderPanes(Container _cp){
- JPanel jPnlEast = new JPanel(new BorderLayout());
- JPanel jPnlNorth = new JPanel(new BorderLayout());
- JPanel jPnlSouth = new JPanel(new BorderLayout());
- JPanel jPnlWest = new JPanel(new BorderLayout());
- _cp.add(jPnlNorth, java.awt.BorderLayout.NORTH);
- jPnlWest.setPreferredSize(new java.awt.Dimension(10, 10));
- _cp.add(jPnlWest, java.awt.BorderLayout.WEST);
- jPnlEast.setPreferredSize(new java.awt.Dimension(10, 10));
- _cp.add(jPnlEast, java.awt.BorderLayout.EAST);
- jPnlSouth.setPreferredSize(new java.awt.Dimension(10, 10));
- _cp.add(jPnlSouth, java.awt.BorderLayout.SOUTH);
- }
-
-
- public String enableFilterElements(XUnoNode _oUnoNode){
- String sFilter ="";
- boolean bIsFacetteNode = isFacetteNode(_oUnoNode);
- this.jtxtFilter.setEnabled(bIsFacetteNode);
- this.jlblFilter.setEnabled(bIsFacetteNode);
- sFilter = m_oInspectorPane.getFilter(_oUnoNode);
- jtxtFilter.setText(sFilter);
- return sFilter;
- }
-
-
- private class InspectorKeyFilterAdapter extends KeyAdapter{
- public void keyReleased(KeyEvent e){
- String sFilter = jtxtFilter.getText();
- SwingTreePathProvider oSwingTreePathProvider = new SwingTreePathProvider(jTree.getSelectionPath());
- XUnoNode oUnoNode = oSwingTreePathProvider.getLastPathComponent();
- if (oUnoNode instanceof XUnoFacetteNode){
- m_oInspectorPane.applyFilter((XUnoFacetteNode) oUnoNode, sFilter);
- }
- }
- }
-
-
-
- /** Inspect the given object for methods, properties, interfaces, and
- * services.
- * @param a The object to inspect
- * @throws RuntimeException If
- */
- public Object inspect(java.lang.Object _oUserDefinedObject, String _sTitle) throws com.sun.star.uno.RuntimeException {
- JPanel jPnlContainer = new javax.swing.JPanel(new BorderLayout(10, 10));
- try {
- javax.swing.JPanel jPnlCenter = new javax.swing.JPanel();
- bIsUserDefined = (_oUserDefinedObject != null);
- if (bIsUserDefined){
- oUserDefinedObject = _oUserDefinedObject;
- m_oInspectorPane.setTitle(_sTitle);
- }
- javax.swing.JScrollPane jScrollPane1 = new javax.swing.JScrollPane();
- TreeSelectionModel tsm = new DefaultTreeSelectionModel();
- tsm.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
- jTree.setSelectionModel(tsm);
- jTree.setVisible(false);
- jPnlCenter.setLayout(new java.awt.BorderLayout(10, 10));
- jPnlCenter.getAccessibleContext().setAccessibleName("inspection tab view");
- insertTopPanel(jPnlCenter);
- jScrollPane1.setViewportView(jTree);
- jScrollPane1.setPreferredSize(new java.awt.Dimension(600, 600));
- jScrollPane1.getAccessibleContext().setAccessibleName("API view scroll pane");
-
- JScrollBar jHScrollBar = jScrollPane1.createHorizontalScrollBar();
- jHScrollBar.getAccessibleContext().setAccessibleName("API view horizontal scroll bar");
- jScrollPane1.setHorizontalScrollBar(jHScrollBar);
-
- JScrollBar jVScrollBar = jScrollPane1.createVerticalScrollBar();
- jVScrollBar.getAccessibleContext().setAccessibleName("API view vertical scroll bar");
- jScrollPane1.setVerticalScrollBar(jVScrollBar);
-
- JSplitPane jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
- jSplitPane.setTopComponent(jScrollPane1);
- jPnlCenter.add(jSplitPane, java.awt.BorderLayout.CENTER);
- jSplitPane.setDividerLocation(500);
- insertBottomPanel(jSplitPane);
- UnoTreeRenderer oUnoTreeRenderer = new UnoTreeRenderer();
- jTree.setCellRenderer(oUnoTreeRenderer);
- jTree.addTreeSelectionListener(
- new TreeSelectionListener() {
- public void valueChanged(TreeSelectionEvent event) {
- TreePath tp = event.getNewLeadSelectionPath();
- if (tp != null){
- XUnoNode oUnoNode = getSelectedNode();
- String sFilter = enableFilterElements(oUnoNode);
- }
- }
- }
- );
- // Add KeyListener for help
- jTree.addKeyListener( new java.awt.event.KeyAdapter() {
- public void keyReleased(java.awt.event.KeyEvent event) {
- if ( event.getKeyCode() == KeyEvent.VK_F1 ) {
- // function key F1 pressed
- TreePath aTreePath = jTree.getSelectionPath();
- SwingUnoNode oUnoNode = (SwingUnoNode) aTreePath.getLastPathComponent();
- oUnoNode.openIdlDescription(m_xDialogProvider.getIDLPath());
- }
- }
- });
- jTree.addMouseListener(new MouseAdapter() {
- public void mousePressed (MouseEvent e) {
- if (e.isPopupTrigger()){
- m_oInspectorPane.showPopUpMenu(e.getComponent(), e.getX(), e.getY());
- }
- //unfortunately under Windows the method "isPopupTrigger" always returns false
- else if ((e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) == MouseEvent.BUTTON3_DOWN_MASK){
- m_oInspectorPane.showPopUpMenu(e.getComponent(), e.getX(), e.getY());
- }
- }
- });
- jPnlContainer.add(jPnlCenter, java.awt.BorderLayout.CENTER);
- insertBorderPanes(jPnlContainer);
- if (this.bIsUserDefined){
- ComponentSelector(oUserDefinedObject, m_oInspectorPane.getTitle());
- }
- m_xDialogProvider.addInspectorPage(m_oInspectorPane.getTitle(), jPnlContainer);
- addTreeExpandListener();
- }
- catch( Exception exception ) {
- exception.printStackTrace(System.out);
- }
- return jPnlContainer;
- }
-
- public HideableTreeModel getModel(){
- return treeModel;
- }
-
-
- public void addTreeExpandListener(){
- jTree.addTreeWillExpandListener(
- new TreeWillExpandListener() {
- public void treeWillExpand(javax.swing.event.TreeExpansionEvent event) throws javax.swing.tree.ExpandVetoException {
- SwingTreePathProvider oSwingTreePathProvider = new SwingTreePathProvider(event.getPath());
- XUnoNode oUnoNode = oSwingTreePathProvider.getLastPathComponent();
- if (!m_oInspectorPane.expandNode(oUnoNode, oSwingTreePathProvider)){
- throw new ExpandVetoException(event);
- }
- }
-
- public void treeWillCollapse( javax.swing.event.TreeExpansionEvent evt) throws javax.swing.tree.ExpandVetoException {
- }
- });
- }
-
-
- public void setSourceCode(String _sSourceCode){
- jtxtGeneratedSourceCode.setText(_sSourceCode);
- }
-
-
- public XTreePathProvider getSelectedPath(){
- return new SwingTreePathProvider(jTree.getSelectionPath());
- }
-
-
- public void expandPath(XTreePathProvider _xTreePathProvider) throws ClassCastException{
- SwingTreePathProvider oSwingTreePathProvider = (SwingTreePathProvider) _xTreePathProvider;
- jTree.expandPath(oSwingTreePathProvider.getSwingTreePath());
- }
-
-
- public XUnoNode getSelectedNode(){
- XUnoNode oUnoNode = null;
- TreePath aTreePath = jTree.getSelectionPath();
- Object oNode = aTreePath.getLastPathComponent();
- if (oNode instanceof XUnoNode){
- oUnoNode = (XUnoNode) oNode;
- }
- return oUnoNode;
- }
-
-
- public void nodeInserted(XUnoNode _oParentNode, XUnoNode _oChildNode, int index) {
- getModel().nodeInserted(_oParentNode, _oChildNode, _oParentNode.getChildCount()-1);
- }
-
-
- public void nodeChanged(XUnoNode _oNode) {
- getModel().nodeChanged(_oNode);
- }
-
-
- public boolean setNodeVisible(Object node, boolean v) {
- return getModel().setNodeVisible(node, v);
- }
-
-
- public boolean isPropertyNode(XUnoNode _oUnoNode){
- return (_oUnoNode instanceof SwingUnoPropertyNode);
- }
-
-
- public boolean isMethodNode(XUnoNode _oUnoNode){
- return (_oUnoNode instanceof SwingUnoMethodNode);
- }
-
-
- public boolean isFacetteNode(XUnoNode _oUnoNode){
- return (_oUnoNode instanceof SwingUnoFacetteNode);
- }
-
-
- public XUnoNode addUnoNode(Object _oUnoObject){
- return new SwingUnoNode(_oUnoObject);
- }
-
-
- public XUnoNode addUnoNode(Object _oUnoObject, Type _aType){
- return new SwingUnoNode(_oUnoObject, _aType);
- }
-
-
- public XUnoFacetteNode addUnoFacetteNode(XUnoNode _oParentNode, String _sNodeDescription, Object _oUnoObject){
- SwingUnoFacetteNode oSwingUnoFacetteNode = new SwingUnoFacetteNode(_oUnoObject);
- oSwingUnoFacetteNode.setLabel(_sNodeDescription);
- if (_oParentNode != null){
- ((SwingUnoNode) _oParentNode).addChildNode(oSwingUnoFacetteNode);
- }
- return oSwingUnoFacetteNode;
- }
-
-
- public XUnoMethodNode addMethodNode(Object _objectElement, XIdlMethod _xIdlMethod){
- SwingUnoMethodNode oSwingUnoMethodNode = new SwingUnoMethodNode(_xIdlMethod, _objectElement, m_xDialogProvider);
- return oSwingUnoMethodNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNodeWithName(Property _aProperty){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aProperty);
- oUnoPropertyNode.setLabel("Name: " + _aProperty.Name);
- return oUnoPropertyNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNodeWithHandle(Property _aProperty){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aProperty);
- oUnoPropertyNode.setLabel("Handle: " + _aProperty.Handle);
- return oUnoPropertyNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNodeWithType(Property _aProperty){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aProperty);
- oUnoPropertyNode.setLabel("Type: " + _aProperty.Type.getTypeName());
- return oUnoPropertyNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNodeWithAttributesDescription(Property _aProperty){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aProperty);
- XConstantTypeDescription[] xPropertyAttributesTypeDescriptions = Introspector.getIntrospector().getFieldsOfConstantGroup("com.sun.star.beans.PropertyAttribute");
- String sDisplay = Introspector.getIntrospector().getConstantDisplayString((int) _aProperty.Attributes, xPropertyAttributesTypeDescriptions, "Attributes: ");
- oUnoPropertyNode.setLabel(sDisplay);
- return oUnoPropertyNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNode(Object _oUnoObject, Property _aProperty){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aProperty, _oUnoObject, null);
- oUnoPropertyNode.setPropertyNodeType(XUnoPropertyNode.nPROPERTYSETINFOTYPE);
- oUnoPropertyNode.setLabel(UnoPropertyNode.getStandardPropertyDescription(_aProperty, null));
- return oUnoPropertyNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNode(Object _oUnoObject, Property _aProperty, Object _oUnoReturnObject){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aProperty, _oUnoObject, _oUnoReturnObject);
- oUnoPropertyNode.setLabel(UnoPropertyNode.getStandardPropertyDescription(_aProperty, _oUnoReturnObject));
- return oUnoPropertyNode;
- }
-
-
- public XUnoPropertyNode addUnoPropertyNode(Object _oUnoObject, PropertyValue _aPropertyValue, Object _oReturnObject){
- SwingUnoPropertyNode oUnoPropertyNode = new SwingUnoPropertyNode(_aPropertyValue, _oUnoObject, _oReturnObject);
- oUnoPropertyNode.setLabel(UnoPropertyNode.getStandardPropertyValueDescription(_aPropertyValue));
- return oUnoPropertyNode;
- }
-}
diff --git a/odk/examples/java/Inspector/SwingTreePathProvider.java b/odk/examples/java/Inspector/SwingTreePathProvider.java
deleted file mode 100644
index 37376c26..00000000
--- a/odk/examples/java/Inspector/SwingTreePathProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-import javax.swing.tree.TreePath;
-
-
-public class SwingTreePathProvider implements XTreePathProvider {
- TreePath m_aTreePath;
-
- /** Creates a new instance of TreePathProvider */
- public SwingTreePathProvider(TreePath _aTreePath) {
- m_aTreePath = _aTreePath;
- }
-
-
- public XUnoNode getLastPathComponent(){
- return (XUnoNode) m_aTreePath.getLastPathComponent();
- }
-
-
- public XUnoNode getPathComponent(int i){
- return (XUnoNode) m_aTreePath.getPathComponent(i);
- }
-
- public int getPathCount(){
- return m_aTreePath.getPathCount();
- }
-
-
- public XTreePathProvider getParentPath(){
- return new SwingTreePathProvider(m_aTreePath.getParentPath());
- }
-
-
- public XTreePathProvider pathByAddingChild(XUnoNode _oUnoNode){
- TreePath aTreePath = m_aTreePath.pathByAddingChild(_oUnoNode);
- return new SwingTreePathProvider(aTreePath);
- }
-
- public TreePath getSwingTreePath(){
- return m_aTreePath;
- }
-}
diff --git a/odk/examples/java/Inspector/SwingUnoFacetteNode.java b/odk/examples/java/Inspector/SwingUnoFacetteNode.java
deleted file mode 100644
index 1fbc0f1a..00000000
--- a/odk/examples/java/Inspector/SwingUnoFacetteNode.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.XComponentContext;
-import javax.swing.tree.DefaultMutableTreeNode;
-
-public class SwingUnoFacetteNode extends SwingUnoNode implements XUnoFacetteNode{
- String m_sFilter = "";
-
- /** Creates a new instance of UnoMethodNode */
- public SwingUnoFacetteNode(Object _oUnoObject){
- super(_oUnoObject);
- setFoldable(true);
- }
-
-
- public String getFilter(){
- return m_sFilter;
- }
-
- public void setFilter(String _sFilter){
- m_sFilter = _sFilter;
- }
-
- public String getName(){
- return toString();
- }
-
-// TODO The implementation of the following methods is not really robust and should be changed!!!
- public boolean isMethodNode(){
- return ((String) getUserObject()).equals(SMETHODDESCRIPTION);
- }
-
- public boolean isPropertyNode(){
- String sNodeDescription = (String) getUserObject();
- return ((sNodeDescription.equals(SPROPERTYDESCRIPTION)) || (sNodeDescription.equals(SPROPERTYINFODESCRIPTION)) || (sNodeDescription.equals(SPROPERTYVALUEDESCRIPTION)));
- }
-
- public boolean isContainerNode(){
- return ((String) getUserObject()).equals(SCONTAINERDESCRIPTION);
- }
-
- public boolean isServiceNode(){
- return ((String) getUserObject()).equals(SSERVICEDESCRIPTION);
- }
-
- public boolean isInterfaceNode(){
- return ((String) getUserObject()).equals(SINTERFACEDESCRIPTION);
- }
-}
-
diff --git a/odk/examples/java/Inspector/SwingUnoMethodNode.java b/odk/examples/java/Inspector/SwingUnoMethodNode.java
deleted file mode 100644
index 3487d430..00000000
--- a/odk/examples/java/Inspector/SwingUnoMethodNode.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.TypeClass;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Vector;
-
-
-
-public class SwingUnoMethodNode extends SwingUnoNode implements ActionListener, XUnoMethodNode{
-
- private UnoMethodNode m_oUnoMethodNode;
- private XDialogProvider m_xDialogProvider = null;
-
- public SwingUnoMethodNode(XIdlMethod _xIdlMethod, Object _oUnoObject, XDialogProvider _xDialogProvider) {
- super(_oUnoObject);
- m_oUnoMethodNode = new UnoMethodNode(_xIdlMethod, _oUnoObject, this);
- m_xDialogProvider = _xDialogProvider;
- setUserObject(m_oUnoMethodNode.getNodeDescription());
- if (m_oUnoMethodNode.isFoldable()){
- setFoldable(true);
- }
- }
-
- public boolean isFoldable(){
- return m_oUnoMethodNode.isFoldable();
- }
-
- public String getName(){
- return m_oUnoMethodNode.getName();
- }
-
- public String getClassName(){
- String sClassName = "";
- sClassName = getXIdlMethod().getDeclaringClass().getName();
- if (sClassName.equals("")){
- sClassName = super.getClassName();
- }
- return sClassName;
- }
-
- public String getAnchor(){
- return m_oUnoMethodNode.getAnchor();
- }
-
- public Object invoke(Object _oUnoObject, Object[] _oParameters) throws com.sun.star.uno.Exception{
- return m_oUnoMethodNode.invoke(_oUnoObject, _oParameters);
- }
-
-
- public Object[] getLastParameterObjects(){
- return m_oUnoMethodNode.getLastParameterObjects();
- }
-
- public Object getLastUnoReturnObject(){
- return m_oUnoMethodNode.getLastUnoReturnObject();
- }
-
- public TypeClass getTypeClass() {
- return m_oUnoMethodNode.getTypeClass();
- }
-
- public XIdlMethod getXIdlMethod() {
- return m_oUnoMethodNode.getXIdlMethod();
- }
-
- public boolean hasParameters() {
- return m_oUnoMethodNode.hasParameters();
- }
-
- public Object invoke() throws com.sun.star.uno.Exception{
- return m_oUnoMethodNode.invoke();
- }
-
- public boolean isInvoked() {
- return m_oUnoMethodNode.isInvoked();
- }
-
- public boolean isInvokable(){
- return m_oUnoMethodNode.isInvokable();
- }
-
- public boolean isPrimitive() {
- return m_oUnoMethodNode.isPrimitive();
- }
-
- public void actionPerformed(ActionEvent e){
- openIdlDescription(m_xDialogProvider.getIDLPath());
- }
-
- public Vector getMethodObjects(){
- MethodParametersDialog oMethodParametersDialog = new MethodParametersDialog(this);
- oMethodParametersDialog.addActionListener(this);
- return oMethodParametersDialog.getMethodObjects();
- }
-
-
- public String getParameterDescription(){
- return m_oUnoMethodNode.getParameterDescription();
- }
-
-
- public String getStandardMethodDescription(){
- return m_oUnoMethodNode.getStandardMethodDescription();
- }
-} \ No newline at end of file
diff --git a/odk/examples/java/Inspector/SwingUnoNode.java b/odk/examples/java/Inspector/SwingUnoNode.java
deleted file mode 100644
index 14f23e94..00000000
--- a/odk/examples/java/Inspector/SwingUnoNode.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.uno.Type;
-import javax.swing.tree.TreeNode;
-
-
-public class SwingUnoNode extends HideableMutableTreeNode implements XUnoNode{
- private UnoNode m_oUnoNode;
-
- /** Creates a new instance of SwingUnoNode */
- public SwingUnoNode(Object _oUnoObject) {
- super();
- m_oUnoNode = new UnoNode(_oUnoObject);
- }
-
-
- public SwingUnoNode(Object _oUnoObject, Type _aType) {
- super();
- m_oUnoNode = new UnoNode(_oUnoObject, _aType);
- if (_aType != null){
- this.setLabel(_aType.getTypeName());
- }
- }
-
-
- public Object getUnoObject(){
- return m_oUnoNode.getUnoObject();
- }
-
- public void setVisible(String _sFilter){
- boolean bisVisible = isFilterApplicable(_sFilter);
- super.setVisible(bisVisible);
- }
-
- public boolean isFilterApplicable(String _sFilter) {
- return m_oUnoNode.isFilterApplicable(_sFilter, getName());
- }
-
- public void setParameterObjects(Object[] _oParamObjects) {
- m_oUnoNode.setParameterObjects(_oParamObjects);
- }
-
- public void openIdlDescription(String _SDKPath) {
- m_oUnoNode.openIdlDescription(_SDKPath, getClassName(), getAnchor());
- }
-
- public Object[] getParameterObjects() {
- return m_oUnoNode.getParameterObjects();
- }
-
- public String getClassName(){
- String sClassName = m_oUnoNode.getClassName();
- if (sClassName.equals("")){
- TreeNode oTreeNode = getParent();
- if (oTreeNode != null){
- if (oTreeNode instanceof XUnoNode){
- SwingUnoNode oUnoNode = (SwingUnoNode) oTreeNode;
- sClassName = oUnoNode.getClassName();
- }
- }
- }
- return sClassName;
- }
-
- public String getAnchor() {
- return m_oUnoNode.getAnchor();
- }
-
-
- public void setFoldable(boolean _bIsFoldable){
- if (_bIsFoldable){
- addDummyNode();
- }
- else{
- removeDummyNode();
- }
- }
-
-
- public XUnoNode getParentNode(){
- return (SwingUnoNode) super.getParent();
- }
-
-
- public void addChildNode(XUnoNode _xUnoNode) {
- super.add((SwingUnoNode) _xUnoNode);
- }
-
- public void setLabel(String _sLabel){
- super.setUserObject(_sLabel);
- this.m_oUnoNode.setLabel(_sLabel);
- }
-
- public String getLabel(){
- return (String) super.getUserObject();
- }
-
-
- public int getChildCount(){
- return super.getChildCount();
- }
-
-
- public XUnoNode getChild(int _i){
- return (SwingUnoNode) super.getChildAt(_i);
- }
-
- public int getNodeType(){
- return m_oUnoNode.getNodeType();
- }
-
- public void setNodeType(int _nNodeType){
- m_oUnoNode.setNodeType(_nNodeType);
- }
-
-
- public String getName(){
- return getClassName();
- }
-
-
- public Type getUnoType(){
- return m_oUnoNode.getUnoType();
- }
-}
diff --git a/odk/examples/java/Inspector/SwingUnoPropertyNode.java b/odk/examples/java/Inspector/SwingUnoPropertyNode.java
deleted file mode 100644
index 34decfec..00000000
--- a/odk/examples/java/Inspector/SwingUnoPropertyNode.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-
-public class SwingUnoPropertyNode extends SwingUnoNode implements XUnoPropertyNode{
-
- private UnoPropertyNode m_oUnoPropertyNode = null;
-
-
- public SwingUnoPropertyNode(Property _aProperty, Object _oUnoObject, Object _oUnoReturnObject) {
- super(_oUnoObject);
- m_oUnoPropertyNode = new UnoPropertyNode(_aProperty, _oUnoObject, _oUnoReturnObject);
- super.setUserObject(m_oUnoPropertyNode.getLabel());
- setFoldable(m_oUnoPropertyNode.isFoldable());
- }
-
-
- public SwingUnoPropertyNode(Property _aProperty){
- super(null);
- m_oUnoPropertyNode = new UnoPropertyNode(_aProperty);
- }
-
-
- public SwingUnoPropertyNode(PropertyValue _aPropertyValue, Object _oUnoObject, Object _oUnoReturnObject) {
- super(_oUnoObject);
- m_oUnoPropertyNode = new UnoPropertyNode(_aPropertyValue, _oUnoObject, _oUnoReturnObject);
- }
-
- public String getName(){
- return m_oUnoPropertyNode.getName();
- }
-
-
- public Object getUnoReturnObject(){
- return m_oUnoPropertyNode.getUnoReturnObject();
- }
-
-
- public String getClassName(){
- String sClassName = m_oUnoPropertyNode.getClassName();
- if (sClassName.equals("")){
- sClassName = super.getClassName();
- }
- return sClassName;
- }
-
- public String getAnchor(){
- return m_oUnoPropertyNode.getAnchor();
- }
-
- public int getPropertyNodeType(){
- return m_oUnoPropertyNode.getPropertyNodeType();
- }
-
-
- public void setPropertyNodeType(int _nPropertyType){
- m_oUnoPropertyNode.setPropertyNodeType(_nPropertyType);
- }
-
- public Property getProperty(){
- return m_oUnoPropertyNode.getProperty();
- }
-
-}
diff --git a/odk/examples/java/Inspector/TDocSupplier.java b/odk/examples/java/Inspector/TDocSupplier.java
deleted file mode 100644
index 81d8ca05..00000000
--- a/odk/examples/java/Inspector/TDocSupplier.java
+++ /dev/null
@@ -1,168 +0,0 @@
-
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.sdbc.XRow;
-import com.sun.star.ucb.Command;
-import com.sun.star.ucb.XCommandProcessor;
-import com.sun.star.ucb.XContent;
-import com.sun.star.ucb.XContentIdentifier;
-import com.sun.star.ucb.XContentIdentifierFactory;
-import com.sun.star.ucb.XContentProvider;
-import com.sun.star.ucb.XSimpleFileAccess;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import javax.swing.JOptionPane;
-
-
-public class TDocSupplier {
- private XMultiComponentFactory m_xMultiComponentFactory;
- private XComponentContext m_xComponentContext;
-
-
- /** Creates a new instance of TDocSupplier */
- public TDocSupplier(XComponentContext _xComponentContext) {
- m_xComponentContext = _xComponentContext;
- m_xMultiComponentFactory = m_xComponentContext.getServiceManager();
- }
-
-
- protected XComponentContext getXComponentContext(){
- return m_xComponentContext;
- }
-
-
- protected XMultiComponentFactory getXMultiComponentFactory(){
- return m_xMultiComponentFactory;
- }
-
- public XModel getXModelByTDocUrl(String _sTDocUrl){
- try{
- XRow xRow = getXRowOfTDocUrl(_sTDocUrl, "DocumentModel");
- if (xRow != null){
- Object oModel = xRow.getObject(1, null);
- XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, oModel);
- return xModel;
- }
- }catch(Exception exception){
- exception.printStackTrace(System.out);
- }
- JOptionPane.showMessageDialog(new javax.swing.JFrame(), "The selected Document could not be opened!", "Object Inspector", JOptionPane.ERROR_MESSAGE);
- return null;
- }
-
-
- public String getTitleByTDocUrl(String _sTDocUrl){
- try{
- XRow xRow = this.getXRowOfTDocUrl(_sTDocUrl, "Title");
- if (xRow != null){
- return xRow.getString(1);
- }
- }catch(Exception exception){
- exception.printStackTrace(System.out);
- }
- JOptionPane.showMessageDialog(new javax.swing.JFrame(), "The selected Document could not be opened!", "Object Inspector", JOptionPane.ERROR_MESSAGE);
- return "";
- }
-
-
- private XRow getXRowOfTDocUrl(String _sTDocUrl, String _sPropertyName){
- try{
- String[] keys = new String[2];
- keys[ 0 ] = "Local";
- keys[ 1 ] = "Office";
- Object oUCB = getXMultiComponentFactory().createInstanceWithArgumentsAndContext( "com.sun.star.ucb.UniversalContentBroker", keys, getXComponentContext() );
- XContentIdentifierFactory xIdFactory = (XContentIdentifierFactory)UnoRuntime.queryInterface(XContentIdentifierFactory.class, oUCB);
- XContentProvider xProvider = (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, oUCB);
- XContentIdentifier xId = xIdFactory.createContentIdentifier(_sTDocUrl);
- XContent xContent = xProvider.queryContent(xId);
- XCommandProcessor xCmdProcessor = (XCommandProcessor) UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
- Property aProperty = new Property();
- aProperty.Name = _sPropertyName; // "DocumentModel"; //DocumentModel
- Command aCommand = new Command();
- aCommand.Name = "getPropertyValues";
- aCommand.Handle = -1; // not available
- aCommand.Argument = new Property[]{aProperty};
- Object oAny = xCmdProcessor.execute(aCommand, 0, null);
- XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, oAny);
- return xRow;
- }catch(Exception exception){
- exception.printStackTrace(System.out);
- return null;
- }}
-
-
- protected String[] getTDocTitles(String[] _sTDocUrls){
- String[] sTitles = new String[_sTDocUrls.length];
- for (int i = 0; i < _sTDocUrls.length; i++){
- sTitles[i] = getTitleByTDocUrl(_sTDocUrls[i]);
- }
- return sTitles;
- }
-
-
- protected String[] getTDocUrls(){
- try{
- Object oSimpleFileAccess = getXMultiComponentFactory().createInstanceWithContext("com.sun.star.ucb.SimpleFileAccess", getXComponentContext());
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, oSimpleFileAccess);
- String[] sContent = xSimpleFileAccess.getFolderContents("vnd.sun.star.tdoc:/", false);
- return sContent;
- } catch( Exception e ) {
- System.err.println( e );
- return new String[]{};
- }}
-
-
- public XComponent openEmptyDocument(String _sUrl){
- try{
- PropertyValue[] aPropertyValues = new PropertyValue[1];
- aPropertyValues[0] = new PropertyValue();
- aPropertyValues[0].Name = "Hidden";
- aPropertyValues[0].Value = Boolean.TRUE;
- Object oDesktop = getXMultiComponentFactory().createInstanceWithContext("com.sun.star.frame.Desktop", getXComponentContext());
- XComponentLoader xCL = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, oDesktop);
- return xCL.loadComponentFromURL(_sUrl, "_default", 0, aPropertyValues);
- }
- catch( Exception exception ) {
- System.err.println( exception );
- return null;
- }}
-
-}
diff --git a/odk/examples/java/Inspector/TestInspector.java b/odk/examples/java/Inspector/TestInspector.java
deleted file mode 100644
index e7583f94..00000000
--- a/odk/examples/java/Inspector/TestInspector.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.uno.UnoRuntime;
-
-import java.io.DataInputStream;
-
-public class TestInspector {
-
- public static void main(String args[]) {
- com.sun.star.uno.XComponentContext xContext = null;
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if( xContext != null )
- System.out.println("Connected to a running office ...");
- }
- catch( Exception e) {
- e.printStackTrace(System.out);
- System.exit(1);
- }
-
- try {
- com.sun.star.lang.XMultiComponentFactory xMCF = xContext.getServiceManager();
- // Creating an instance of the instance inspector with arguments
-
- XSingleComponentFactory xFactory = Inspector.__getComponentFactory(Inspector._Inspector.class.getName());
- Object obj= null;
- if (xFactory != null) {
- obj = xFactory.createInstanceWithContext(xContext);
- }
- org.openoffice.XInstanceInspector xInstInspector = null;
- if (obj != null) {
- xInstInspector = (org.openoffice.XInstanceInspector)UnoRuntime.queryInterface(org.openoffice.XInstanceInspector.class, obj);
- }
-
- /* A desktop environment contains tasks with one or more
- frames in which components can be loaded. Desktop is the
- environment for components which can instanciate within
- frames. */
- com.sun.star.frame.XComponentLoader xCmpLoader = (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface( com.sun.star.frame.XComponentLoader.class,
- xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xContext));
-
- // Load a new spreadsheet document, which will be automaticly
- // displayed and is used for inspection
- com.sun.star.lang.XComponent xComp = xCmpLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, new com.sun.star.beans.PropertyValue[0] );
- xInstInspector.inspect(xCmpLoader, "");
- System.out.println("You can now inspect the new spreadsheet " + "document ...\n");
- }
- catch( Exception e ) {
- System.err.println( e + e.getMessage());
- e.printStackTrace();
- }
-// System.exit( 0 );
- }
-}
diff --git a/odk/examples/java/Inspector/UnoFacetteNode.java b/odk/examples/java/Inspector/UnoFacetteNode.java
deleted file mode 100644
index 0fd91e43..00000000
--- a/odk/examples/java/Inspector/UnoFacetteNode.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.XComponentContext;
-import javax.swing.tree.DefaultMutableTreeNode;
-
-public class UnoFacetteNode extends UnoNode{
- String m_sFilter = "";
-
-
- /** Creates a new instance of UnoMethodNode */
- public UnoFacetteNode(Object _oUnoObject){
- super(_oUnoObject);
- addDummyNode();
- }
-
-
- public String getFilter(){
- return m_sFilter;
- }
-
- public void setFilter(String _sFilter){
- m_sFilter = _sFilter;
- }
-
- public String getName(){
- return toString();
- }
-
-// TODO The implementation of the following nodes is not really robust and should be changed!!!
- public boolean isMethodNode(){
- return ((String) getUserObject()).equals(SMETHODDESCRIPTION);
- }
-
- public boolean isPropertyNode(){
- String sNodeDescription = (String) getUserObject();
- return ((sNodeDescription.equals(SPROPERTYDESCRIPTION)) || (sNodeDescription.equals(SPROPERTYINFODESCRIPTION)) || (sNodeDescription.equals(SPROPERTYVALUEDESCRIPTION)));
- }
-
- public boolean isContainerNode(){
- return ((String) getUserObject()).equals(SCONTAINERDESCRIPTION);
- }
-
- public boolean isServiceNode(){
- return ((String) getUserObject()).equals(SSERVICEDESCRIPTION);
- }
-
- public boolean isInterfaceNode(){
- return ((String) getUserObject()).equals(SINTERFACEDESCRIPTION);
- }
-}
-
diff --git a/odk/examples/java/Inspector/UnoMethodNode.java b/odk/examples/java/Inspector/UnoMethodNode.java
deleted file mode 100644
index d80aa6f7..00000000
--- a/odk/examples/java/Inspector/UnoMethodNode.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.reflection.ParamInfo;
-import com.sun.star.reflection.ParamMode;
-import com.sun.star.reflection.XIdlClass;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.TypeClass;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Vector;
-
-public class UnoMethodNode extends UnoNode{
- XIdlMethod m_xIdlMethod = null;
- Object[] m_oParamObjects = null;
- Object m_oUnoReturnObject = null;
- boolean m_bisInvoked = false;
- XUnoMethodNode m_xUnoMethodNode = null;
-
-
- /** Creates a new instance of UnoMethodNode */
- public UnoMethodNode(XIdlMethod _xIdlMethod, Object _oUnoObject, XUnoMethodNode _xUnoMethodNode) {
- super(_oUnoObject);
- m_xIdlMethod = _xIdlMethod;
- m_oParamObjects = new Object[m_xIdlMethod.getParameterInfos().length];
- m_xUnoMethodNode = _xUnoMethodNode;
- }
-
- protected boolean isFoldable(){
- return ((!this.isPrimitive()) && (getTypeClass().getValue() != TypeClass.VOID_value));
- }
-
- protected boolean isInvokable(){
- boolean bisFoldable = true;
- XIdlClass[] xIdlClasses = m_xIdlMethod.getParameterTypes();
- for (int i = 0; i < xIdlClasses.length; i++){
- bisFoldable = Introspector.isPrimitive(xIdlClasses[i].getTypeClass());
- if (!bisFoldable){
- return false;
- }
- }
- return bisFoldable;
- }
-
- public XIdlMethod getXIdlMethod(){
- return m_xIdlMethod;
- }
-
-
- public String getAnchor(){
- return getXIdlMethod().getName();
- }
-
-
- public String getName(){
- return getXIdlMethod().getName();
- }
-
-
- public Object invoke(){
- Object oUnoReturnObject = null;
- if (!hasParameters()){
- oUnoReturnObject = invokeParameterlessMethod();
- m_bisInvoked = true;
- }
- else{
- Vector oUnoMethodObjects = m_xUnoMethodNode.getMethodObjects();
- if (oUnoMethodObjects != null){
- for (int i = 0; i < getXIdlMethod().getParameterInfos().length; i++){
- this.m_oParamObjects[i] = oUnoMethodObjects.get(i);
- }
- if (oUnoMethodObjects.size() == m_oParamObjects.length + 1){
- oUnoReturnObject = oUnoMethodObjects.get(oUnoMethodObjects.size()-1);
- }
- m_bisInvoked = (oUnoReturnObject != null);
- }
- }
- m_oUnoReturnObject = oUnoReturnObject;
- return oUnoReturnObject;
- }
-
-
- public boolean isInvoked(){
- return m_bisInvoked;
- }
-
-
- protected String getNodeDescription(){
- String sNodeDescription = "";
- String sParameters = getParameterDescription();
- if (m_xIdlMethod.getParameterInfos().length > 0){
- sNodeDescription = getStandardMethodDescription();
- }
- else{
- TypeClass typeClass = getTypeClass();
- if (typeClass != TypeClass.VOID){
- sNodeDescription = getStandardMethodDescription();
- }
- else{
- sNodeDescription = getStandardMethodDescription();
- }
- }
- return sNodeDescription;
- }
-
-
- public String getStandardMethodDescription(){
- String sNodeDescription = m_xIdlMethod.getReturnType().getName() + " " + m_xIdlMethod.getName() + " (" + getParameterDescription() + " )";
- if (isPrimitive()){
- sNodeDescription += "";
- }
- return sNodeDescription;
- }
-
-
- public boolean hasParameters(){
- return (m_xIdlMethod.getParameterInfos().length > 0);
- }
-
-
- public Object[] getLastParameterObjects(){
- return m_oParamObjects;
- }
-
-
- public Object getLastUnoReturnObject(){
- return m_oUnoReturnObject;
- }
-
-
- public String getParameterDescription(){
- ParamInfo[] paramInfo = m_xIdlMethod.getParameterInfos();
- String sParameters = "";
- String sStandardMethodDisplayText = m_xIdlMethod.getReturnType().getName() + " " + m_xIdlMethod.getName() + " (" + sParameters + " )";
- if (Introspector.isValid(paramInfo)) {
- // get all parameters with type and mode
- for ( int i = 0; i < paramInfo.length; i++ ) {
- XIdlClass xIdlClass = paramInfo[ i ].aType;
- if ( i == 0 ) {
- // the first parameter has no leading comma
- sParameters += "[" + getParamMode(paramInfo[ i ].aMode ) + "] " + xIdlClass.getName();
- }
- else {
- // all other parameters are separated with comma
- sParameters += ", [" + getParamMode(paramInfo[ i ].aMode ) + "] " + xIdlClass.getName();
- }
- }
- }
- return sParameters;
- }
-
-
- // return the parameter mode (IN, OUT, INOUT)
- private static String getParamMode(ParamMode paramMode) {
- String toReturn = "";
- if ( paramMode == ParamMode.IN ) {
- toReturn = "IN";
- }
- if ( paramMode == ParamMode.OUT ) {
- toReturn = "OUT";
- }
- if ( paramMode == ParamMode.INOUT ) {
- toReturn = "INOUT";
- }
- return( toReturn );
- }
-
- public TypeClass getTypeClass(){
- XIdlClass xIdlClass = m_xIdlMethod.getReturnType();
- return xIdlClass.getTypeClass();
- }
-
-
- private Object invokeParameterlessMethod(){
- try {
- Object[][] aParamInfo = new Object[1][];
- aParamInfo[0] = new Object[] {};
- return getXIdlMethod().invoke(getUnoObject(), aParamInfo);
- } catch (Exception ex) {
- ex.printStackTrace(System.out);
- return null;
- }}
-
-
- public boolean isPrimitive(){
- return Introspector.isObjectPrimitive(m_xIdlMethod.getClass(), getTypeClass());
- }
-
-
- protected Object invoke(Object _oUnoObject, Object[] oParameters) throws com.sun.star.uno.Exception{
- Object[][] aParams = new Object[1][oParameters.length];
- for ( int i = 0; i < oParameters.length; i++ ) {
- aParams[0][i] = oParameters[i];
- }
- return m_xIdlMethod.invoke(_oUnoObject, aParams);
- }
-}
diff --git a/odk/examples/java/Inspector/UnoNode.java b/odk/examples/java/Inspector/UnoNode.java
deleted file mode 100644
index 50d6ec32..00000000
--- a/odk/examples/java/Inspector/UnoNode.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.frame.FrameSearchFlag;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XFrame;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.reflection.TypeDescriptionSearchDepth;
-import com.sun.star.reflection.XServiceTypeDescription;
-import com.sun.star.reflection.XTypeDescription;
-import com.sun.star.reflection.XTypeDescriptionEnumeration;
-import com.sun.star.reflection.XTypeDescriptionEnumerationAccess;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.TypeClass;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.URL;
-import com.sun.star.util.XURLTransformer;
-import java.util.List;
-import java.util.Vector;
-
-public class UnoNode{
-
- String sPath = null;
- Object m_oUnoObject;
- private XMultiComponentFactory m_xMultiComponentFactory;
- private XComponentContext m_xComponentContext;
- private Object[] m_oParamObjects = null;
- private int m_nNodeType = XUnoNode.nOTHERS;
- private Type aType = null;
- private String sLabel = "";
-
-
-
- /** Creates a new instance of UnoNode */
- public UnoNode(Object _oUnoObject) {
- m_xComponentContext = Introspector.getIntrospector().getXComponentContext();
- m_xMultiComponentFactory = m_xComponentContext.getServiceManager();
- m_oUnoObject = _oUnoObject;
- }
-
- public UnoNode(Object _oUnoObject, Type _aType) {
- this(_oUnoObject);
- aType = _aType;
- m_nNodeType = XUnoNode.nINTERFACE;
- }
-
- public Object getUnoObject(){
- return m_oUnoObject;
- }
-
-
- protected XComponentContext getXComponentContext(){
- return m_xComponentContext;
- }
-
-
- protected XMultiComponentFactory getXMultiComponentFactory(){
- return m_xMultiComponentFactory;
- }
-
-
- private static XTypeDescriptionEnumerationAccess getXTypeDescriptionEnumerationAccess(){
- return Introspector.getIntrospector().getXTypeDescriptionEnumerationAccess();
- }
-
-
- public String getAnchor(){
- return "";
- }
-
- public int getNodeType(){
- return m_nNodeType;
- }
-
- public void setNodeType(int _nNodeType){
- m_nNodeType = _nNodeType;
- }
-
- public String getClassName(){
- String sClassName = "";
- if (m_nNodeType == XUnoNode.nINTERFACE){
- sClassName = aType.getTypeName();
- }
- else if(m_nNodeType == XUnoNode.nSERVICE){
- sClassName = sLabel;
- }
- return sClassName;
- }
-
-
- public Type getUnoType(){
- return aType;
- }
-
- protected void setLabel(String _sLabel){
- sLabel = _sLabel;
- }
-
- public void openIdlDescription(String _sIDLUrl, String _sClassName, String _sAnchor){
- try{
- String sIDLUrl = _sIDLUrl;
- String sAnchor = ""; // TODO find out how the Anchor may be set at the html file; //_sAnchor;
- boolean bExists = Introspector.getIntrospector().getXSimpleFileAccess().exists(sIDLUrl);
- if (sIDLUrl.equals("") || (!bExists)){
- sIDLUrl = "http://api.openoffice.org/" + Inspector.sIDLDOCUMENTSUBFOLDER;
- }
- if (!sIDLUrl.endsWith("/")){
- sIDLUrl += "/";
- }
- if (_sClassName.equals("")){
- sIDLUrl += "com/sun/star/module-ix";
- sAnchor = "";
- }
- else{
- sIDLUrl += _sClassName.replace('.', '/');
- }
- if (sAnchor != null){
- if (!sAnchor.equals("")){
- sIDLUrl += "#" + sAnchor;
- }
- }
- sIDLUrl += ".html";
- URL openHyperlink = getDispatchURL(".uno:OpenHyperlink");
- PropertyValue pv = new PropertyValue();
- pv.Name = "URL";
- pv.Value = sIDLUrl;
- getXDispatcher(openHyperlink).dispatch(openHyperlink, new PropertyValue[] {pv});
- } catch(Exception exception) {
- exception.printStackTrace(System.out);
- }}
-
-
- private com.sun.star.util.URL getDispatchURL(String _sURL){
- try {
- Object oTransformer = getXMultiComponentFactory().createInstanceWithContext("com.sun.star.util.URLTransformer", getXComponentContext());
- XURLTransformer xTransformer = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, oTransformer);
- com.sun.star.util.URL[] oURL = new com.sun.star.util.URL[1];
- oURL[0] = new com.sun.star.util.URL();
- oURL[0].Complete = _sURL;
- xTransformer.parseStrict(oURL);
- return oURL[0];
- } catch (Exception e) {
- e.printStackTrace(System.out);
- }
- return null;
- }
-
-
- private XFrame getCurrentFrame(){
- try{
- Object oDesktop = getXMultiComponentFactory().createInstanceWithContext("com.sun.star.frame.Desktop", getXComponentContext());
- XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop);
- return xDesktop.getCurrentFrame();
- } catch (Exception e) {
- e.printStackTrace(System.out);
- return null;
- }}
-
-
- private XDispatch getXDispatcher(com.sun.star.util.URL oURL) {
- try {
- com.sun.star.util.URL[] oURLArray = new com.sun.star.util.URL[1];
- oURLArray[0] = oURL;
- XDispatchProvider xDispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, getCurrentFrame());
- XDispatch xDispatch = xDispatchProvider.queryDispatch(oURLArray[0], "_top", FrameSearchFlag.ALL); // "_self"
- return xDispatch;
- } catch (Exception e) {
- e.printStackTrace(System.out);
- return null;
- }}
-
-
- private PropertyValue[] loadArgs(String url) {
- PropertyValue pv = new PropertyValue();
- pv.Name = "URL";
- pv.Value = url;
- return new PropertyValue[] {pv};
- }
-
-
-
- public boolean isFilterApplicable(String _sFilter, String _sName){
- boolean bFilterDoesApply = true;
- if (_sFilter.length() > 0){
- if (_sName.indexOf(_sFilter) == -1){
- bFilterDoesApply = false;
- }
- }
- return bFilterDoesApply;
- }
-
-
-// public static String getServiceDescription(Object _oUnoObject){
-// String sClassName = "";
-// XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, _oUnoObject);
-// if (xServiceInfo != null){
-// String[] sChildServiceNames = removeMandatoryServiceNames(xServiceInfo.getSupportedServiceNames());
-// if (sChildServiceNames.length > 0){
-// sClassName = sChildServiceNames[0];
-// }
-// }
-// return sClassName;
-// }
-
-
-
- private static String[] getMandatoryServiceNames(String _sServiceName){
- String[] sMandatoryServiceNames = new String[]{};
- try {
- TypeClass[] eTypeClasses = new com.sun.star.uno.TypeClass[1];
- eTypeClasses[0] = com.sun.star.uno.TypeClass.SERVICE;
- XTypeDescriptionEnumeration xTDEnumeration = getXTypeDescriptionEnumerationAccess().createTypeDescriptionEnumeration(Introspector.getModuleName(_sServiceName), eTypeClasses, TypeDescriptionSearchDepth.INFINITE);
- while (xTDEnumeration.hasMoreElements()) {
- XTypeDescription xTD = xTDEnumeration.nextTypeDescription();
- if (xTD.getName().equals(_sServiceName)){
- XServiceTypeDescription xServiceTypeDescription = (XServiceTypeDescription) UnoRuntime.queryInterface(XServiceTypeDescription.class, xTD);
- XServiceTypeDescription[] xMandatoryServiceTypeDescriptions = xServiceTypeDescription.getMandatoryServices();
- int nlength = xMandatoryServiceTypeDescriptions.length;
- sMandatoryServiceNames = new String[nlength];
- for (int i = 0; i < nlength; i++){
- sMandatoryServiceNames[i] = xMandatoryServiceTypeDescriptions[i].getName();
- }
-
- }
- }
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }
- return sMandatoryServiceNames;
- }
-
-
- private static String[] removeMandatoryServiceNames(String[] _sServiceNames){
- try{
- List aList = java.util.Arrays.asList(_sServiceNames);
- Vector aVector = new Vector(aList);
- for (int n = 0; n < _sServiceNames.length; n++){
- String[] sDelServiceNames = getMandatoryServiceNames(_sServiceNames[n]);
- for (int m = 0; m < sDelServiceNames.length; m++){
- if (aVector.contains(sDelServiceNames[m])){
- int nIndex = aVector.indexOf(sDelServiceNames[m]);
- aVector.remove(nIndex);
- }
- }
- }
- String[] sRetArray = new String[aVector.size()];
- aVector.toArray(sRetArray);
- return sRetArray;
- } catch (java.lang.Exception exception) {
- exception.printStackTrace(System.out);
- }
- return new String[]{};
- }
-
-
- public static String getDisplayValueOfPrimitiveType(Object _objectElement){
- String sValue ="";
- try{
- if (AnyConverter.isString(_objectElement)){
- sValue = AnyConverter.toString(_objectElement);
- }
- else if (AnyConverter.isBoolean(_objectElement)){
- sValue += AnyConverter.toBoolean(_objectElement);
- }
- else if (AnyConverter.isByte(_objectElement)){
- sValue += AnyConverter.toByte(_objectElement);
- }
- else if (AnyConverter.isChar(_objectElement)){
- sValue += AnyConverter.toChar(_objectElement);
- }
- else if (AnyConverter.isDouble(_objectElement)){
- sValue += AnyConverter.toDouble(_objectElement);
- }
- else if (AnyConverter.isFloat(_objectElement)){
- sValue += AnyConverter.toFloat(_objectElement);
- }
- else if (AnyConverter.isInt(_objectElement)){
- sValue += AnyConverter.toInt(_objectElement);
- }
- else if (AnyConverter.isLong(_objectElement)){
- sValue += AnyConverter.toLong(_objectElement);
- }
- else if (AnyConverter.isShort(_objectElement)){
- sValue += AnyConverter.toShort(_objectElement);
- }
- }
- catch( Exception e ) {
- System.err.println( e );
- }
- return sValue;
- }
-
- protected static String[] getDisplayValuesofPrimitiveArray(Object _oUnoObject){
- String[] sDisplayValues = null;
- try{
- Type aType = AnyConverter.getType(_oUnoObject);
- TypeClass aTypeClass = aType.getTypeClass();
- int nTypeValue = aTypeClass.getValue();
- if (nTypeValue == TypeClass.SEQUENCE_value){
- nTypeValue = (sequenceComponentType(aType)).getTypeClass().getValue();
- }
- switch (nTypeValue){
- case TypeClass.BOOLEAN_value:
- boolean[] bBooleans = (boolean[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[bBooleans.length];
- for (int i = 0; i < bBooleans.length; i++){
- sDisplayValues[i] = Boolean.toString(bBooleans[i]);
- }
- break;
- case TypeClass.BYTE_value:
- byte[] bBytes = (byte[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[bBytes.length];
- for (int i = 0; i < bBytes.length; i++){
- sDisplayValues[i] = "" + bBytes[i];
- }
- break;
- case TypeClass.DOUBLE_value:
- double[] fdoubles = (double[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[fdoubles.length];
- for (int i = 0; i < fdoubles.length; i++){
- sDisplayValues[i] = String.valueOf(fdoubles[i]);
- }
- break;
- case TypeClass.FLOAT_value:
- float[] ffloats = (float[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[ffloats.length];
- for (int i = 0; i < ffloats.length; i++){
- sDisplayValues[i] = String.valueOf(ffloats[i]);
- }
- break;
- case TypeClass.LONG_value:
- int[] nints = (int[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[nints.length];
- for (int i = 0; i < nints.length; i++){
- sDisplayValues[i] = String.valueOf(nints[i]);
- }
- break;
- case TypeClass.HYPER_value:
- long[] nlongs = (long[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[nlongs.length];
- for (int i = 0; i < nlongs.length; i++){
- sDisplayValues[i] = String.valueOf(nlongs[i]);
- }
- break;
- case TypeClass.SHORT_value:
- short[] nShorts = (short[]) AnyConverter.toArray(_oUnoObject);
- sDisplayValues = new String[nShorts.length];
- for (int i = 0; i < nShorts.length; i++){
- sDisplayValues[i] = "" + nShorts[i];
- }
- break;
- case TypeClass.CHAR_value:
- break;
- default:
- System.out.println("Value could not be retrieved: " + aType.getTypeClass().getClass().getName());
- }
- return sDisplayValues;
- }
- catch( Exception e ) {
- System.err.println( e );
- return null;
- }}
-
-
- private static Type sequenceComponentType(Type sequenceType) {
-// assert sequenceType.getTypeClass() == TypeClass.SEQUENCE;
- String n = sequenceType.getTypeName();
- final String PREFIX = "[]";
-// assert n.startsWith(PREFIX);
- return new Type(n.substring(PREFIX.length()));
- }
-
-
- public static String getNodeDescription(Object _oUnoObject, int _nIndex){
- return getNodeDescription(_oUnoObject) + "[" + (_nIndex + 1) + "]";
- }
-
-
- public static String getNodeDescription(Object _oUnoObject){
- XServiceInfo xServiceInfo = ( XServiceInfo ) UnoRuntime.queryInterface( XServiceInfo.class, _oUnoObject );
- if ( xServiceInfo != null ) {
- return xServiceInfo.getImplementationName();
- }
- String sClassName = _oUnoObject.getClass().getName();
- if (Introspector.getIntrospector().isObjectPrimitive(_oUnoObject)){ //super.isO{sObjectClassName.equals("java.lang.String"))issClassName.equals("java.lang.String"))
- return _oUnoObject.toString();
- }
- else{
- return _oUnoObject.getClass().getName();
- }
- }
-
- public void setParameterObjects(Object[] _oParamObjects){
- m_oParamObjects = _oParamObjects;
- }
-
- public Object[] getParameterObjects(){
- return m_oParamObjects;
- }
-}
diff --git a/odk/examples/java/Inspector/UnoPropertyNode.java b/odk/examples/java/Inspector/UnoPropertyNode.java
deleted file mode 100644
index e9efe526..00000000
--- a/odk/examples/java/Inspector/UnoPropertyNode.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.reflection.TypeDescriptionSearchDepth;
-import com.sun.star.reflection.XConstantTypeDescription;
-import com.sun.star.reflection.XPropertyTypeDescription;
-import com.sun.star.reflection.XServiceTypeDescription;
-import com.sun.star.reflection.XTypeDescription;
-import com.sun.star.reflection.XTypeDescriptionEnumeration;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.TypeClass;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import javax.swing.tree.DefaultMutableTreeNode;
-
-public class UnoPropertyNode extends UnoNode{
-
- Property aProperty;
- PropertyValue aPropertyValue;
- String m_sPropertyName;
- Object m_oUnoReturnObject;
- private int m_nPropertyType = XUnoPropertyNode.nDEFAULT;
- private String sLabel = "";
-
- private static XConstantTypeDescription[] xPropertyAttributesTypeDescriptions = null;
-
-
- /** Creates a new instance of UnoMethodNode */
- public UnoPropertyNode(Property _aProperty, Object _oUnoObject, Object _oUnoReturnObject) {
- super(_oUnoObject);
- aProperty = _aProperty;
- m_sPropertyName = aProperty.Name;
- m_oUnoReturnObject = _oUnoReturnObject;
- }
-
-
- public UnoPropertyNode(Property _aProperty){
- super(null);
- aProperty = _aProperty;
- m_sPropertyName = aProperty.Name;
- m_oUnoReturnObject = null;
- }
-
- public UnoPropertyNode(PropertyValue _aPropertyValue, Object _oUnoObject, Object _oUnoReturnObject) {
- super(_oUnoObject);
- m_oUnoReturnObject = _oUnoReturnObject;
- aPropertyValue = _aPropertyValue;
- m_sPropertyName = aPropertyValue.Name;
- }
-
-
- public int getPropertyNodeType(){
- return m_nPropertyType;
- }
-
-
- public void setPropertyNodeType(int _nPropertyType){
- m_nPropertyType = _nPropertyType;
- }
-
-
- public String getPropertyName(){
- return m_sPropertyName;
- }
-
- public String getName(){
- return this.m_sPropertyName;
- }
-
-
- public String getClassName(){
- String sClassName = "";
- if (m_oUnoObject != null){
- XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, m_oUnoObject);
- if (xServiceInfo != null){
- String[] sServiceNames = xServiceInfo.getSupportedServiceNames();
- for (int i = 0; i < sServiceNames.length; i++){
- if (doesServiceSupportProperty(sServiceNames[i], m_sPropertyName)){
- sClassName = sServiceNames[i];
- break;
- }
- }
- }
- }
- else{
- sClassName = "com.sun.star.beans.Property";
- }
- return sClassName;
- }
-
-
- public String getAnchor(){
- return m_sPropertyName;
- }
-
-
-
- protected boolean doesServiceSupportProperty(String _sServiceName, String _sPropertyName){
- try {
- XPropertyTypeDescription[] xPropertyTypeDescriptions = Introspector.getIntrospector().getPropertyDescriptionsOfService(_sServiceName);
- for (int i = 0; i < xPropertyTypeDescriptions.length; i++){
- if (xPropertyTypeDescriptions[i].getName().equals(_sServiceName + "." + _sPropertyName)){
- return true;
- }
- }
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }
- return false;
- }
-
-
- public Object getUnoReturnObject(){
- return m_oUnoReturnObject;
- }
-
-
- private boolean isPrimitive(){
- boolean bIsPrimitive = true;
- if (getUnoReturnObject() != null){
- if (getProperty() != null){
- bIsPrimitive = Introspector.isObjectPrimitive(getUnoReturnObject().getClass(), getProperty().Type.getTypeClass());
- }
- else{
- bIsPrimitive = Introspector.isObjectPrimitive(getUnoReturnObject().getClass());
- }
- }
- else{
- bIsPrimitive = Introspector.isObjectPrimitive(aProperty.Type.getTypeClass());
- }
- return bIsPrimitive;
- }
-
-
- protected boolean isFoldable(){
- boolean bIsFoldable = false;
- if (! isPrimitive()){
- String sTypeName = getUnoReturnObject().getClass().getName();
- bIsFoldable = (!sTypeName.equals("com.sun.star.uno.Type"));
- }
- return bIsFoldable;
- }
-
-
- protected String getLabel(){
- if (!sLabel.equals("")){
- if (! isPrimitive()){
- if (isFoldable()){
- sLabel = getPropertyTypeDescription(aProperty, getUnoReturnObject());
- }
- else{
- sLabel = getStandardPropertyDescription(aProperty, getUnoReturnObject());
- }
- }
- else {
- sLabel = getStandardPropertyDescription(aProperty, getUnoReturnObject());
- }
- }
- return sLabel;
- }
-
- public Property getProperty(){
- return aProperty;
- }
-
- protected static String getPropertyTypeDescription(Property _aProperty, Object _oUnoObject){
- return _aProperty.Type.getTypeName() + " " + _aProperty.Name + " = " + _oUnoObject.toString();
- }
-
-
- protected static String getStandardPropertyDescription(Property _aProperty, Object _objectElement){
- if (!Introspector.isObjectPrimitive(_objectElement)){
- return _aProperty.Name + " = (" + _aProperty.Type.getTypeName() + ") ";
- }
- else{
- return _aProperty.Name + " (" + _aProperty.Type.getTypeName() + ") = " + getDisplayValueOfPrimitiveType(_objectElement);
- }
- }
-
-
- protected static String getStandardPropertyValueDescription(PropertyValue _aPropertyValue){
- if (!Introspector.isObjectPrimitive(_aPropertyValue.Value)){
- return _aPropertyValue.Name;
- }
- else{
- return _aPropertyValue.Name + " : " + UnoNode.getDisplayValueOfPrimitiveType(_aPropertyValue.Value);
- }
- }
-}
-
-
diff --git a/odk/examples/java/Inspector/UnoTreeRenderer.java b/odk/examples/java/Inspector/UnoTreeRenderer.java
deleted file mode 100644
index 9c277212..00000000
--- a/odk/examples/java/Inspector/UnoTreeRenderer.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.FontMetrics;
-import java.awt.Graphics;
-import java.awt.SystemColor;
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JTree;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-
-
-
-public class UnoTreeRenderer extends DefaultTreeCellRenderer{
- private Icon m_oMethodIcon;
- private Icon m_oPropertyIcon;
- private Icon m_oContainerIcon;
- private Icon m_oContentIcon;
- private Icon m_oServiceIcon;
- private Icon m_oInterfaceIcon;
- private Icon m_oPropertyValueIcon;
- private boolean bSelected;
- private int nWidth = 0;
-
-
- /** Creates a new instance of UnoTreeRenderer */
- public UnoTreeRenderer(){
- super();
- try {
-
- final ClassLoader loader = ClassLoader.getSystemClassLoader();
- m_oMethodIcon = new ImageIcon(loader.getResource("images/methods_16.png"));
- m_oPropertyIcon = new ImageIcon("images/properties_16.png");
- m_oPropertyValueIcon = new ImageIcon("images/properties_16.png");
- m_oContainerIcon = new ImageIcon("images/containers_16.png");
- m_oServiceIcon = new ImageIcon("images/services_16.png");
- m_oInterfaceIcon = new ImageIcon("images/interfaces_16.png");
- m_oContentIcon = new ImageIcon("images/content_16.png");
- } catch (RuntimeException e) {
- System.out.println("Sorry, could not locate resourecs, treecell icons will not be displayed.");
- }
- }
-
-
- public synchronized Component getTreeCellRendererComponent(JTree tree,Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus){
- try{
- bSelected = sel;
- DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
- Component rc = super.getTreeCellRendererComponent( tree, value, sel,expanded, leaf, row,hasFocus);
- String sLabelText = (String)node.getUserObject();
- if (sLabelText != null){
- if (sLabelText.equals(XUnoFacetteNode.SCONTAINERDESCRIPTION)){
-// setIcon(m_oContainerIcon);
- } else if (sLabelText.equals(XUnoFacetteNode.SCONTENTDESCRIPTION)){
-// setIcon(m_oContentIcon);
- } else if (sLabelText.equals(XUnoFacetteNode.SINTERFACEDESCRIPTION)){
-// setIcon(m_oInterfaceIcon);
- } else if (sLabelText.equals(XUnoFacetteNode.SMETHODDESCRIPTION)){
-// setIcon(m_oMethodIcon);
- } else if (sLabelText.equals(XUnoFacetteNode.SPROPERTYDESCRIPTION)){
-// setIcon(m_oPropertyIcon);
- } else if (sLabelText.startsWith(XUnoFacetteNode.SPROPERTYINFODESCRIPTION)){
-// setIcon(m_oPropertyIcon);
- } else if (sLabelText.equals(XUnoFacetteNode.SPROPERTYVALUEDESCRIPTION)){
-// setIcon(m_oPropertyValueIcon);
- } else if (sLabelText.equals(XUnoFacetteNode.SSERVICEDESCRIPTION)){
-// setIcon(m_oServiceIcon);
- } else{
- setText(sLabelText);
- rc.validate();
- }
- setSize(getPreferredSize()); //fm.stringWidth(sLabelText), (int) getSize().getHeight());
- rc.validate();
-// nWidth = (int) rc.getPreferredSize().getWidth();
- doLayout();
- }
- } catch (RuntimeException e) {
- System.out.println("Sorry, icon for treecell could not be displayed.");
- }
- return this;
- }
-
-
-
- public void paintComponent(Graphics g) {
- FontMetrics fm = getFontMetrics(getFont());
- int x, y;
- y = fm.getAscent() + 2;
- if(getIcon() == null) {
- x = 0;
- } else {
- x = getIcon().getIconWidth() + getIconTextGap();
- }
- g.setColor(getForeground());
-// g.fillRect(x,y,x + fm.stringWidth(getText()),y);
-// System.out.println("Text: " + getText());
- super.paintComponent(g);
- }
-}
-
-
diff --git a/odk/examples/java/Inspector/XDialogProvider.java b/odk/examples/java/Inspector/XDialogProvider.java
deleted file mode 100644
index fdf40627..00000000
--- a/odk/examples/java/Inspector/XDialogProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-public interface XDialogProvider {
-
- public static String SINVOKE = "Invoke";
-
- public static String SADDTOSOURCECODE = "Add to Sourcecode";
-
- public void enablePopupMenuItem(String _sMenuTitle, boolean _bdoEnable);
-
- public void showPopUpMenu(Object invoker, int x, int y) throws java.lang.ClassCastException;
-
- public InspectorPane getSelectedInspectorPage();
-
- public void addInspectorPage(String _sTitle, Object _oContainer);
-
- public InspectorPane getInspectorPage(int _nIndex);
-
- public int getInspectorPageCount();
-
- public void selectInspectorPageByIndex(int nTabIndex);
-
- public void show(int _nPageIndex) throws java.lang.ClassCastException;
-
- public void selectSourceCodeLanguage(int _nLanguage);
-
- public void paint();
-
- // returns one of the constants defined in XLanguageSourceCodeGenerator
- public int getLanguage();
-
- public String getIDLPath();
-}
diff --git a/odk/examples/java/Inspector/XInstanceInspector.idl b/odk/examples/java/Inspector/XInstanceInspector.idl
deleted file mode 100644
index 27495358..00000000
--- a/odk/examples/java/Inspector/XInstanceInspector.idl
+++ /dev/null
@@ -1,56 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_ORG_OPENOFFICE_XINSTANCEINSPECTOR_IDL
-#define INCLUDED_ORG_OPENOFFICE_XINSTANCEINSPECTOR_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
-
-module org { module openoffice {
-
- interface XInstanceInspector {
- /**
- * For a given instance this method displays all services, interfaces,
- * methods, attributes, and contents in a tree. All dependend
- * instances are also inspected and displayed, so the user could browse
- * the tree. If you press the key "F1", the API-documentation from
- * www.openoffice.org for the current instance will be displayed in a
- * new window.
- */
- void inspect( [in] any aInstance, [in] string sTitle );
- };
-
-}; };
-
-#endif
diff --git a/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java b/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java
deleted file mode 100644
index aaf42460..00000000
--- a/odk/examples/java/Inspector/XLanguageSourceCodeGenerator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.uno.TypeClass;
-import java.util.Vector;
-
-public interface XLanguageSourceCodeGenerator {
-
- public static final int nJAVA = 0;
- public static final int nCPLUSPLUS = 1;
- public static final int nBASIC = 2;
-
- public String getHeaderSourceCode(Object _oUnoObject, String _sClassName, TypeClass _aTypeClass);
-
- public String getFinalHeaderStatements();
-
- public void assignqueryInterfaceHeaderSourceCode();
-
- public String getMainMethodSignatureSourceCode(XUnoNode _oUnoNode, String _soReturnObjectDescription);
-
- public String getMethodTerminationSourceCode();
-
- public String getStatementTerminationCharacter();
-
- public boolean needsqueryInterface();
-
- public String getqueryInterfaceSourceCode(String _sReturnValueDescription, String _sClassName, String _sObjectDescription);
-
- public String getPropertyValueGetterSourceCode(String _sPropertyName, String _sReturnVariableName, String _sIncomingObjectName, TypeClass _aTypeClass, String _sTypeName);
-
- public String getStructSourceCode(String _sReturnVariableDescription, String _sObjectDescription, String _sMember);
-
- public String getObjectTypeDescription(String _sClassName, boolean _bAsHeader);
-
- public String getbooleanTypeDescription();
-
- public String getbyteTypeDescription();
-
- public String getshortTypeDescription();
-
- public String getunsignedshortTypeDescription();
-
- public String getlongTypeDescription();
-
- public String getunsignedlongTypeDescription();
-
- public String gethyperTypeDescription();
-
- public String getunsignedhyperTypeDescription();
-
- public String getfloatTypeDescription();
-
- public String getdoubleTypeDescription();
-
- public String getcharTypeDescription();
-
- public String getstringTypeDescription(boolean _bAsHeaderSourceCode);
-
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode);
-
- public String getanyTypeDescription(boolean _bAsHeaderSourceCode);
-
- public String getArrayDeclaration(String sVariableDeclaration);
-
- public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean _bIsArray, TypeClass aTypeClass, boolean _bInitialize);
-
- public String getMethodSeparator();
-
- public String getStringValue(String _sValue);
-
- public String getConvertedSourceCodeValueOfObject(String _sReturnVariableName, String _sObjectDescription, TypeClass _aTypeClass, String _sTypeName);
-
- public String castLiteral(String _sExpression, TypeClass _aTypeClass);
-
- public String getCommentSign();
-}
diff --git a/odk/examples/java/Inspector/XMethodParametersDialog.java b/odk/examples/java/Inspector/XMethodParametersDialog.java
deleted file mode 100644
index d8fcdb13..00000000
--- a/odk/examples/java/Inspector/XMethodParametersDialog.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-public interface XMethodParametersDialog {
-
-}
diff --git a/odk/examples/java/Inspector/XTreeControlProvider.java b/odk/examples/java/Inspector/XTreeControlProvider.java
deleted file mode 100644
index 8f0d951e..00000000
--- a/odk/examples/java/Inspector/XTreeControlProvider.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.beans.Property;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.Type;
-
-public interface XTreeControlProvider {
-
- public static String sTitle = "User defined";
-
- public String enableFilterElements(XUnoNode _oUnoNode);
-
- public void setSourceCode(String _sSourceCode);
-
- public Object inspect(java.lang.Object _oUserDefinedObject, String _sTitle) throws com.sun.star.uno.RuntimeException;
-
- public void nodeInserted(XUnoNode _oParentNode, XUnoNode _oChildNode, int index);
-
- public void nodeChanged(XUnoNode _oNode);
-
- public boolean setNodeVisible(Object node, boolean v);
-
- public XUnoNode getSelectedNode();
-
- public XTreePathProvider getSelectedPath();
-
- public void expandPath(XTreePathProvider xTreePathProvider) throws java.lang.ClassCastException;
-
- public void addTreeExpandListener();
-
- public void addInspectorPane(InspectorPane _oInspectorPane);
-
- public boolean isPropertyNode(XUnoNode _oUnoNode);
-
- public boolean isMethodNode(XUnoNode _oUnoNode);
-
- public boolean isFacetteNode(XUnoNode _oUnoNode);
-
- public XUnoNode addUnoNode(Object _oUnoObject);
-
- public XUnoNode addUnoNode(Object _oUnoObject, Type _aType);
-
- public XUnoFacetteNode addUnoFacetteNode(XUnoNode _oParentNode, String _sNodeDescription, Object _oUnoObject);
-
- public XUnoMethodNode addMethodNode(Object _objectElement, XIdlMethod _xIdlMethod);
-
- public XUnoPropertyNode addUnoPropertyNodeWithName(Property _aProperty);
-
- public XUnoPropertyNode addUnoPropertyNodeWithHandle(Property _aProperty);
-
- public XUnoPropertyNode addUnoPropertyNodeWithType(Property _aProperty);
-
- public XUnoPropertyNode addUnoPropertyNodeWithAttributesDescription(Property _aProperty);
-
- public XUnoPropertyNode addUnoPropertyNode(Object _oUnoObject, Property _aProperty);
-
- public XUnoPropertyNode addUnoPropertyNode(Object _oUnoObject, PropertyValue _aPropertyValue, Object _oReturnObject);
-
- public XUnoPropertyNode addUnoPropertyNode(Object _oUnoObject, Property _aProperty, Object _oUnoReturnObject);
-}
diff --git a/odk/examples/java/Inspector/XTreePathProvider.java b/odk/examples/java/Inspector/XTreePathProvider.java
deleted file mode 100644
index 8a2f1ba5..00000000
--- a/odk/examples/java/Inspector/XTreePathProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * xTreePathProvider.java
- *
- * Created on 12. Dezember 2006, 13:30
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-/**
- *
- * @author bc93774
- */
-public interface XTreePathProvider {
-
- public XUnoNode getLastPathComponent();
-
- public XUnoNode getPathComponent(int i);
-
- public int getPathCount();
-
- public XTreePathProvider getParentPath();
-
- public XTreePathProvider pathByAddingChild(XUnoNode _oUnoNode);
-}
diff --git a/odk/examples/java/Inspector/XUnoFacetteNode.java b/odk/examples/java/Inspector/XUnoFacetteNode.java
deleted file mode 100644
index 9bf091b2..00000000
--- a/odk/examples/java/Inspector/XUnoFacetteNode.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-
-
-public interface XUnoFacetteNode extends XUnoNode {
-
- public static String SMETHODDESCRIPTION = "Methods";
- public static String SPROPERTYDESCRIPTION = "Properties";
- public static String SPROPERTYINFODESCRIPTION = "PropertyInfo";
- public static String SCONTAINERDESCRIPTION = "Container";
- public static String SSERVICEDESCRIPTION = "Services";
- public static String SINTERFACEDESCRIPTION = "Interfaces";
- public static String SCONTENTDESCRIPTION = "Content";
- public static String SPROPERTYVALUEDESCRIPTION = "PropertyValues";
-
-
- public boolean isMethodNode();
-
- public boolean isPropertyNode();
-
- public boolean isContainerNode();
-
- public boolean isServiceNode();
-
- public boolean isInterfaceNode();
-
- public String getFilter();
-
- public void setFilter(String _sFilter);
-
-}
diff --git a/odk/examples/java/Inspector/XUnoMethodNode.java b/odk/examples/java/Inspector/XUnoMethodNode.java
deleted file mode 100644
index 93167840..00000000
--- a/odk/examples/java/Inspector/XUnoMethodNode.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.reflection.XIdlMethod;
-import com.sun.star.uno.TypeClass;
-import java.util.Vector;
-
-
-public interface XUnoMethodNode extends XUnoNode {
-
- public XIdlMethod getXIdlMethod();
-
- public boolean isInvoked();
-
- public Object invoke() throws com.sun.star.uno.Exception;
-
- public Object invoke(Object _oUnoObject, Object[] _oParameters) throws com.sun.star.uno.Exception;
-
- public boolean isInvokable();
-
- public boolean hasParameters();
-
- public Object[] getLastParameterObjects();
-
- public Object getLastUnoReturnObject();
-
- public TypeClass getTypeClass();
-
- public boolean isPrimitive();
-
- public Vector getMethodObjects();
-
- public boolean isFoldable();
-
- public String getStandardMethodDescription();
-
-}
diff --git a/odk/examples/java/Inspector/XUnoNode.java b/odk/examples/java/Inspector/XUnoNode.java
deleted file mode 100644
index a27c0aa3..00000000
--- a/odk/examples/java/Inspector/XUnoNode.java
+++ /dev/null
@@ -1,84 +0,0 @@
-import com.sun.star.uno.Type;
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-
-public interface XUnoNode {
-
- public static final int nINTERFACE = 1;
- public static final int nSERVICE = 2;
- public static final int nOTHERS = 3;
-
- public String getAnchor();
-
- public String getClassName();
-
- public void openIdlDescription(String _sIDLUrl);
-
- public boolean isFilterApplicable(String _sFilter);
-
- public void setVisible(String _sFilter);
-
- public void setParameterObjects(Object[] _oParamObjects);
-
- public Object[] getParameterObjects();
-
- public String getName();
-
- public void setFoldable(boolean _bIsFoldable);
-
- public Object getUnoObject();
-
- public XUnoNode getParentNode();
-
- public void addChildNode(XUnoNode _xUnoNode);
-
- public void setLabel(String _sLabel);
-
- public String getLabel();
-
- public int getChildCount();
-
- public XUnoNode getChild(int _index);
-
- public int getNodeType();
-
- // possible values are nINTERFACE, nSERVICE, nOTHERS
- public void setNodeType(int _nNodeType);
-
- /** delivers only the Uno-Type when the NodeType is set to nINTERFACE
- * otherwise (when the NodeType has not been set returns null
- */
- public Type getUnoType();
-}
diff --git a/odk/examples/java/Inspector/XUnoPropertyNode.java b/odk/examples/java/Inspector/XUnoPropertyNode.java
deleted file mode 100644
index 27d6c502..00000000
--- a/odk/examples/java/Inspector/XUnoPropertyNode.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.beans.Property;
-
-
-public interface XUnoPropertyNode extends XUnoNode {
-
- public static int nDEFAULT = 0;
- public static int nPROPERTYSETINFOTYPE = 1;
- public static int nPROPERTYVALUETYPE = 2;
-
- public Object getUnoReturnObject();
-
- public int getPropertyNodeType();
-
- public void setPropertyNodeType(int _nPropertyType);
-
- public Property getProperty();
-
-}
diff --git a/odk/examples/java/Inspector/images/containers_16.png b/odk/examples/java/Inspector/images/containers_16.png
deleted file mode 100644
index 0b4c62f1..00000000
--- a/odk/examples/java/Inspector/images/containers_16.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/images/content_16.png b/odk/examples/java/Inspector/images/content_16.png
deleted file mode 100644
index 75816926..00000000
--- a/odk/examples/java/Inspector/images/content_16.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/images/interfaces_16.png b/odk/examples/java/Inspector/images/interfaces_16.png
deleted file mode 100644
index cf633ac9..00000000
--- a/odk/examples/java/Inspector/images/interfaces_16.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/images/methods_16.png b/odk/examples/java/Inspector/images/methods_16.png
deleted file mode 100644
index 25cd8b45..00000000
--- a/odk/examples/java/Inspector/images/methods_16.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/images/properties_16.png b/odk/examples/java/Inspector/images/properties_16.png
deleted file mode 100644
index 4e22dd1d..00000000
--- a/odk/examples/java/Inspector/images/properties_16.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/images/services_16.png b/odk/examples/java/Inspector/images/services_16.png
deleted file mode 100644
index 024a16ed..00000000
--- a/odk/examples/java/Inspector/images/services_16.png
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Inspector/manifest.mf b/odk/examples/java/Inspector/manifest.mf
deleted file mode 100755
index 328e8e5b..00000000
--- a/odk/examples/java/Inspector/manifest.mf
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-X-COMMENT: Main-Class will be added automatically by build
-
diff --git a/odk/examples/java/MinimalComponent/BuildMinimalComponent.xml b/odk/examples/java/MinimalComponent/BuildMinimalComponent.xml
deleted file mode 100644
index a296f7f9..00000000
--- a/odk/examples/java/MinimalComponent/BuildMinimalComponent.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- author: Bertram Nolte
- created: 2001-10-11
- revision: 1.0
- -->
-<project name="MinimalComponent" basedir="." default="all">
-
- <target name="init">
- <!--
- In this target you have to change all parts, so that the properties
- fit to your odk installation and to your service
- -->
- <property name="ODKPATH" value="D:/cvs/api/odk"/>
- <property name="OUTPUTPATH" value="D:/cvs/api/odk/WINexample.out"/>
- <property name="PACKAGE_NAME" value="org.OpenOffice."/>
- <property name="JAR_FILE_NAME" value="MinimalComponent"/>
- <property name="INTERFACE_NAME" value="MinimalComponent"/>
- <property name="RDB_NAME" value="MinimalComponent.rdb"/>
- </target>
- <target depends="init" name="unoidl">
-
- <exec dir="${ODKPATH}/WINexample.out/misc/" executable="${ODKPATH}/windows/bin/idlc.exe" timeout="600">
- <arg line="-I. -I${ODKPATH}/idl ${ODKPATH}/examples/java/MinimalComponent/${INTERFACE_NAME}.idl"/>
- </exec>
-
- <exec dir="." executable="${ODKPATH}/windows/bin/regmerge.exe" timeout="600">
- <arg line="./${RDB_NAME} /UCR ./${INTERFACE_NAME}.urd"/>
- </exec>
-
- <exec dir="." executable="${ODKPATH}/windows/bin/regmerge.exe" timeout="600">
- <arg line="./${RDB_NAME} / ${ODKPATH}/windows/bin/applicat.rdb"/>
- </exec>
-
- <exec dir="." executable="${ODKPATH}/windows/bin/javamaker.exe" timeout="600">
- <arg line="-BUCR -O${OUTPUTPATH}/class/${INTERFACE_NAME} -nD ./${RDB_NAME}"/>
-<!--
- <arg line="-BUCR -T${PACKAGE_NAME}${INTERFACE_NAME} -O${OUTPUTPATH}/class/${INTERFACE_NAME} -nD ./${INTERFACE_NAME}.urd"/>
- -->
- </exec>
-
- </target>
-
- <target depends="init,unoidl" name="compile">
- <mkdir dir="classes"/>
- <javac debug="on" destdir="./classes" srcdir="." >
- <classpath>
- <fileset dir="${ODKPATH}/classes/">
- <include name="**/*.jar"/>
- </fileset>
- <pathelement location="./classes"/>
- </classpath>
- </javac>
- </target>
-
- <target depends="compile,init" name="jar">
- <jar basedir="./classes" compress="true" jarfile="${JAR_FILE_NAME}.jar" manifest="Manifest">
- </jar>
- </target>
-
- <target depends="compile,init,jar" name="all">
- <!-- WRITEME -->
- </target>
-</project>
diff --git a/odk/examples/java/MinimalComponent/Makefile b/odk/examples/java/MinimalComponent/Makefile
deleted file mode 100644
index 23530a89..00000000
--- a/odk/examples/java/MinimalComponent/Makefile
+++ /dev/null
@@ -1,205 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java Minimal component example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-
-# we use the sample directory name dor separating this example
-# from others in the output directory
-SAMPLE_NAME=MinimalComponent
-SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
-SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
-
-COMP_NAME=MinimalComponent
-COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME)
-COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME)
-COMP_RDB_NAME=$(COMP_NAME).uno.rdb
-COMP_RDB=$(COMP_GEN_OUT)/$(COMP_RDB_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-APP1_NAME=TestMinimalComponent
-APP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME)
-APP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME)
-APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar
-APP1_JAR_MANIFEST=$(APP1_GEN_OUT)/$(APP1_NAME).mf
-
-IDLFILES = MinimalComponent.idl
-
-# normally the idl file should be stored in a directory tree fitting the module structure,
-# for the example we know the module structure
-PACKAGE = org/openoffice
-
-COMP_JAVAFILES = MinimalComponent.java
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-GEN_CLASSFILES = $(patsubst %.idl,$(SAMPLE_CLASS_OUT)/$(PACKAGE)/%.class,$(IDLFILES))
-GEN_TYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GEN_URDFILES = $(patsubst %.idl,$(SAMPLE_GEN_OUT)/%.urd,$(IDLFILES))
-
-# the generated types are necessary for the component and the application jar
-GEN_CLASSFILENAMES = $(subst $(SAMPLE_CLASS_OUT)/,,$(GEN_CLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT)\
- $(PATH_SEPARATOR)$(APP1_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : JavaMinimalComponentExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMP_GEN_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $*).uno.jar> $@
- @echo RegistrationClassName: $(basename $*)>> $@
-
-$(SAMPLE_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -C -I. -I$(IDL_DIR) -O$(SAMPLE_GEN_OUT) $<
-
-$(COMP_GEN_OUT)/%.rdb : $(GEN_URDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GEN_URDFILES)
-
-$(GEN_CLASSFILES) : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GEN_TYPELIST) -O$(SAMPLE_CLASS_OUT) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-# component as well as application are dependent from the generated types
-# rule for component class files
-$(COMP_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $<
-
-# rule for example application class files
-$(APP1_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $<
-
-# rule for client/example application manifest file
-$(APP1_GEN_OUT)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-# rule for client/example application jar file
-$(APP1_JAR) : $(APP1_JAR_MANIFEST) $(APP1_CLASS_OUT)/$(APP1_NAME).class $(GEN_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) .
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(GEN_CLASSFILENAMES)
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAR) cvfm $@ $< -C $(COMP_CLASS_OUT) .
- +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(GEN_CLASSFILENAMES)
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP)>> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP)>> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP)>> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_NAME).components
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_NAME).components
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(COMP_RDB_NAME)
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-JavaMinimalComponentExample : $(COMP_REGISTERFLAG) $(APP1_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) $(APP1_NAME).run
- @echo ------
- @echo The $(COMP_NAME) component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description.
- @echo --------------------------------------------------------------------------------
-
-%.run: $(SAMPLE_CLASS_OUT)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/java/MinimalComponent/MinimalComponent.components b/odk/examples/java/MinimalComponent/MinimalComponent.components
deleted file mode 100644
index 9e413f2b..00000000
--- a/odk/examples/java/MinimalComponent/MinimalComponent.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="MinimalComponent.uno.jar">
- <implementation name="MinimalComponent$_MinimalComponent">
- <service name="org.openoffice.MinimalComponent"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/java/MinimalComponent/MinimalComponent.idl b/odk/examples/java/MinimalComponent/MinimalComponent.idl
deleted file mode 100644
index 41ee6c53..00000000
--- a/odk/examples/java/MinimalComponent/MinimalComponent.idl
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef _org_openoffice_MinimalComponent_idl_
-#define _org_openoffice_MinimalComponent_idl_
-
-#include <com/sun/star/lang/XServiceInfo.idl>
-
-// org
-module org {
- // openoffice
- module openoffice {
- // example service, XServiceInfo is implemented here for demonstration
- // issues. XServiceInfo must be implemented by all components. But
- // here it is used to show the new code generation feature for services.
- // See the TestMinimalComponent.java how it can be used!
- service MinimalComponent: ::com::sun::star::lang::XServiceInfo;
- };
-};
-
-#endif
diff --git a/odk/examples/java/MinimalComponent/MinimalComponent.java b/odk/examples/java/MinimalComponent/MinimalComponent.java
deleted file mode 100644
index b88d529e..00000000
--- a/odk/examples/java/MinimalComponent/MinimalComponent.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.Type;
-
-/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getComponentFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
- */
-public class MinimalComponent {
- /** This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class _MinimalComponent extends WeakBase
- implements XInitialization, XServiceInfo {
- /** The service name, that must be used to get an instance of this service.
- */
- static private final String __serviceName =
- "org.openoffice.MinimalComponent";
-
- /** The initial component contextr, that gives access to
- * the service manager, supported singletons, ...
- * It's often later used
- */
- private XComponentContext m_cmpCtx;
-
- /** The service manager, that gives access to all registered services.
- * It's often later used
- */
- private XMultiComponentFactory m_xMCF;
-
- /** The constructor of the inner class has a XMultiServiceFactory parameter.
- * @param xmultiservicefactoryInitialization A special service factory
- * could be introduced while initializing.
- */
- public _MinimalComponent(XComponentContext xCompContext) {
- try {
- m_cmpCtx = xCompContext;
- m_xMCF = m_cmpCtx.getServiceManager();
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
-
- /** This method is a member of the interface for initializing an object
- * directly after its creation.
- * @param object This array of arbitrary objects will be passed to the
- * component after its creation.
- * @throws Exception Every exception will not be handled, but will be
- * passed to the caller.
- */
- public void initialize( Object[] object )
- throws com.sun.star.uno.Exception {
- /* The component describes what arguments its expected and in which
- * order!At this point you can read the objects and can intialize
- * your component using these objects.
- */
- }
-
- /** This method returns an array of all supported service names.
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- /** This method is a simple helper function to used in the
- * static component initialisation functions as well as in
- * getSupportedServiceNames.
- */
- public static String[] getServiceNames() {
- String[] sSupportedServiceNames = { __serviceName };
- return sSupportedServiceNames;
- }
-
- /** This method returns true, if the given service will be
- * supported by the component.
- * @param sServiceName Service name.
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService( String sServiceName ) {
- return sServiceName.equals( __serviceName );
- }
-
- /** Return the class name of the component.
- * @return Class name of the component.
- */
- public String getImplementationName() {
- return _MinimalComponent.class.getName();
- }
- }
-
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleComponentFactory</code> for creating
- * the component
- * @param sImplName the name of the implementation for which a
- * service is desired
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory(String sImplName)
- {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplName.equals( _MinimalComponent.class.getName() ) )
- xFactory = Factory.createComponentFactory(_MinimalComponent.class,
- _MinimalComponent.getServiceNames());
-
- return xFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(_MinimalComponent.class.getName(),
-// _MinimalComponent.getServiceNames(),
-// regKey);
-// }
-}
diff --git a/odk/examples/java/MinimalComponent/TestMinimalComponent.java b/odk/examples/java/MinimalComponent/TestMinimalComponent.java
deleted file mode 100644
index 219eea7c..00000000
--- a/odk/examples/java/MinimalComponent/TestMinimalComponent.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.container.XSet;
-import com.sun.star.lang.XServiceInfo;
-
-public class TestMinimalComponent {
- public static void main(String args[]) {
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if( xContext != null )
- System.out.println("Connected to a running office ...");
-
- XServiceInfo xSIMinimalComponent =
- org.openoffice.MinimalComponent.create(xContext);
-
- System.out.println("\nXServiceInfo is used to get the implementation" +
- " name: " +
- xSIMinimalComponent.getImplementationName() +
- "\nOk\n");
- xContext = null;
-
- System.exit(0);
- }
- catch( Exception e ) {
- System.err.println( e );
- e.printStackTrace();
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/NotesAccess/Makefile b/odk/examples/java/NotesAccess/Makefile
deleted file mode 100644
index 87e41d3c..00000000
--- a/odk/examples/java/NotesAccess/Makefile
+++ /dev/null
@@ -1,113 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java NotesAccess example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=NotesAccessExample
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP_NAME=NotesAccess
-APP_JAR=$(OUT_APP_CLASS)/$(APP_NAME).jar
-
-JAVAFILES = \
- NotesAccess.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- JavaNotesAccessExample
-
-include $(SETTINGS)/stdtarget.mk
-
-NotesAPIs :
- @echo --------------------------------------------------------------------------------
- @echo This example uses external APIs from Lotus Notes/Domino. You can download a
- @echo trial version from "$(QM)http://www.lotus.com/downloads$(QM)". After installation
- @echo please do the following:
- @echo 1. Add the install path to the PATH or LD_LIBRARY_PATH of this shell.
- @echo e.g "$(QM)PATH=C:\Program Files\lotus\notes;...$(QM)"
- @echo 2. Add the "$(QM)Notes.jar$(QM)" to your CLASSPATH
- @echo e.g. "$(QM)CLASSPATH=C:\Program Files\lotus\notes\Notes.jar;$(QM)"
- @echo --------------------------------------------------------------------------------
-
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $(JAVAFILES)
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Class-Path: Notes.jar> $@
- @echo Main-Class: com.sun.star.lib.loader.Loader>> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(APP_JAR) : $(OUT_APP_CLASS)/$(APP_NAME).mf $(OUT_APP_CLASS)/$(APP_NAME).class
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(APP_NAME).mf $(APP_NAME).class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-JavaNotesAccessExample : NotesAPIs $(APP_JAR)
- @echo --------------------------------------------------------------------------------
- @echo NOTE: Before you run this example make sure that the exaternal "$(QM)Notes.jar$(QM)" can
- @echo be found besides "$(QM)$(APP_JAR)"$(QM)
- @echo and that the PATH variable includes the Notes installation directory.
- @echo -
- @echo Please use the following command to execute the example!
- @echo -
- @echo $(MAKE) NotesAccess.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(APP_JAR)
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< "$(QM)$(QM)" "$(QM)$(QM)" "$(QM)$(QM)" Stocks.nsf
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst \\,\,$(subst /,$(PS),$(OUT_APP_CLASS)))
diff --git a/odk/examples/java/NotesAccess/NotesAccess.java b/odk/examples/java/NotesAccess/NotesAccess.java
deleted file mode 100644
index e989c9cf..00000000
--- a/odk/examples/java/NotesAccess/NotesAccess.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// Lotus Notes Domino API
-import lotus.domino.NotesThread;
-import lotus.domino.Session;
-import lotus.domino.Database;
-import lotus.domino.DocumentCollection;
-import lotus.domino.Document;
-import lotus.domino.NotesFactory;
-
-// OpenOffice.org API
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.table.XCell;
-
-/** This class creates an OpenOffice.org Calc spreadsheet document and fills it
- * with existing values of documents from a Lotus Notes database.
- */
-public class NotesAccess implements Runnable {
-
- /** Host server of the Domino Directory.
- */
- static String stringHost = "";
-
- /** User in the host's Domino Directory.
- */
- static String stringUser = "";
-
- /** Password for the user in the host's Domino Directory.
- */
- static String stringPassword = "";
-
- /** Database with documents to get data from.
- */
- static String stringDatabase = "";
-
- /** Reading the arguments and constructing the thread.
- * @param argv Holding values for the host, user, and the password of the user.
- */
- public static void main( String args[] ) {
- Thread thread;
-
- if ( args.length < 4 ) {
- System.out.println(
- "usage: java -jar NotesAccess.jar \"<Domino Host>\" \"<User>\" " +
- "\"<Password>\" \"<Database>\"" );
- System.out.println( "\ne.g.:" );
- System.out.println(
- "java -jar NotesAccess.jar \"\" \"\" \"\" \"Stocks.nsf\"" );
- System.exit( 1 );
- }
-
- if ( !args[ 0 ].trim().equals( "" ) ) {
- stringHost = args[ 0 ].trim();
- }
- if ( !args[ 1 ].trim().equals( "" ) ) {
- stringUser = args[ 1 ].trim();
- }
- stringPassword = args[ 2 ].trim();
-
- try {
- java.io.File sourceFile = new java.io.File(args[ 3 ].trim());
- stringDatabase = sourceFile.getCanonicalPath();
- } catch (java.io.IOException e) {
- System.out.println("Error: Please check the name or path to your database file.");
- e.printStackTrace();
- System.exit( 1 );
- }
-
- if ( stringHost.equals( "" ) ) {
- // Initializing.
- NotesAccess notesaccess = new NotesAccess();
-
- // Allowing only local calls to the Domino classes.
- thread = new NotesThread( ( Runnable ) notesaccess );
- }
- else {
- // Extracting the host, user, and password.
- NotesAccess notesaccess = new NotesAccess();
-
- // Allowing remote calls to the Domino classes.
- thread = new Thread( ( Runnable ) notesaccess );
- }
-
- // Starting the thread.
- thread.start();
- }
-
- /** This is the default constructor without arguments.
- */
- public NotesAccess() {
- }
-
- /** Reading all documents from the given database and writing the data to
- * an OpenOffice.org Calc spreadsheet document.
- */
- public void run() {
- try {
- // get the remote office component context
- XComponentContext xContext =
- com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- System.out.println("Connected to a running office ...");
-
- XMultiComponentFactory xMCF = xContext.getServiceManager();
-
- /* A desktop environment contains tasks with one or more
- frames in which components can be loaded. Desktop is the
- environment for components which can instanciate within
- frames. */
- XComponentLoader xLoader = ( XComponentLoader )
- UnoRuntime.queryInterface(XComponentLoader.class,
- xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext));
-
- // Load a Writer document, which will be automaticly displayed
- XComponent xComponent = xLoader.loadComponentFromURL(
- "private:factory/scalc", "_blank", 0,
- new PropertyValue[0] );
-
- // Querying for the interface XSpreadsheetDocument
- XSpreadsheetDocument xSpreadsheetDoc =
- (XSpreadsheetDocument) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, xComponent);
-
- // Getting all sheets from the spreadsheet document.
- XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets() ;
-
- // Querying for the interface XIndexAccess.
- XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, xSpreadsheets);
-
- // Getting the first spreadsheet.
- XSpreadsheet xSpreadsheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, xIndexAccess.getByIndex(0));
-
- Session session;
- if ( !stringHost.equals( "" ) ) {
- // Creating a Notes session for remote calls to the Domino classes.
- session = NotesFactory.createSession(stringHost, stringUser,
- stringPassword);
- }
- else {
- // Creating a Notes session for only local calls to the
- // Domino classes.
- session = NotesFactory.createSession();
- }
-
- // Getting the specified Notes database.
- Database database = session.getDatabase( "", stringDatabase );
-
- // Getting a collection of all documents from the database.
- DocumentCollection documentCollection = database.getAllDocuments();
-
- // Getting the first document from the database
- Document document = documentCollection.getFirstDocument();
-
- // Start to write to cells at this row.
- int intRowToStart = 0;
-
- // The current row.
- int intRow = intRowToStart;
-
- // The current column.
- int intColumn = 0;
-
- // Process all documents
- while ( document != null ) {
- // Getting the name of the stock.
- String stringName = document.getItemValueString("Name");
-
- // Inserting the name to a specified cell.
- insertIntoCell(intColumn, intRow, stringName, xSpreadsheet, "");
-
- // Getting the number of stocks.
- double intNumber = document.getItemValueInteger( "Number" );
-
- // Inserting the number of stocks to a specified cell.
- insertIntoCell( intColumn + 1, intRow, String.valueOf(intNumber),
- xSpreadsheet, "V" );
-
- // Getting current share price.
- double doubleSharePrice = document.getItemValueDouble("SharePrice");
-
- // Inserting the current share price to a specified cell.
- insertIntoCell(intColumn + 2, intRow,
- String.valueOf(doubleSharePrice),
- xSpreadsheet, "V");
-
- // Inserting the total value.
- insertIntoCell(intColumn + 3, intRow, "=B"
- + String.valueOf( intRow + 1 )
- + "*C" + String.valueOf(intRow + 1),
- xSpreadsheet, "");
-
- // Increasing the current row.
- intRow++;
-
- // Getting the next document from the collection.
- document = documentCollection.getNextDocument();
- }
-
- // Summing all specific amounts.
- insertIntoCell(intColumn + 3, intRow, "=sum(D"
- + String.valueOf( intRowToStart + 1 ) + ":D"
- + String.valueOf( intRow ),
- xSpreadsheet, "");
-
- xContext = null;
-
- // Leaving the program.
- System.exit(0);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /** Inserting a value or formula to a cell defined by the row and column.
- * @param intCellX Row.
- * @param intCellY Column.
- * @param stringValue This value will be written to the cell.
- * @param xSpreadsheet Write the value to the cells of this spreadsheet.
- * @param stringFlag If this string contains "V", the value will be written,
- * otherwise the formula.
- */
- public static void insertIntoCell(int intCellX, int intCellY,
- String stringValue,
- XSpreadsheet xSpreadsheet,
- String stringFlag)
- {
- XCell xCell = null;
-
- try {
- xCell = xSpreadsheet.getCellByPosition( intCellX, intCellY );
- } catch ( com.sun.star.lang.IndexOutOfBoundsException exception ) {
- System.out.println( "Could not get Cell" );
- }
- if ( stringFlag.equals( "V" )) {
- xCell.setValue((new Float(stringValue)).floatValue());
- }
- else {
- xCell.setFormula(stringValue);
- }
- }
-}
diff --git a/odk/examples/java/NotesAccess/Stocks.nsf b/odk/examples/java/NotesAccess/Stocks.nsf
deleted file mode 100644
index 10ed138e..00000000
--- a/odk/examples/java/NotesAccess/Stocks.nsf
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/PropertySet/Makefile b/odk/examples/java/PropertySet/Makefile
deleted file mode 100644
index 7a79f340..00000000
--- a/odk/examples/java/PropertySet/Makefile
+++ /dev/null
@@ -1,136 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java PropertySet component example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=PropTest
-COMP_CLASS_OUT=$(OUT_CLASS)/$(COMP_NAME)
-COMP_GEN_OUT=$(OUT_MISC)/$(COMP_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(COMP_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_CLASS_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-COMP_JAVAFILES = PropTest.java
-
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-$(COMP_NAME)_CLASSFILES = $(COMP_NAME).class
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : JavaPropertySetExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMP_CLASS_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo RegistrationClassName: $(basename $(basename $(@F)))> $@
-
-$(COMP_CLASSFILES) : $(COMP_JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $(COMP_JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(COMP_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_NAME).components
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_NAME).components
- cd $(subst /,$(PS),$(COMP_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) META-INF/manifest.xml
-
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-JavaPropertySetExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The PropTest was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo Load the "$(QM)PropertySet.odt$(QM)" document to see how this component works. You can
- @echo use this component inside your office installation, see the example description.
- @echo -
- @echo $(MAKE) PropertySet.odt.load
- @echo --------------------------------------------------------------------------------
-
-PropertySet.odt.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(COMP_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(COMP_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/java/PropertySet/PropTest.components b/odk/examples/java/PropertySet/PropTest.components
deleted file mode 100644
index 320e3511..00000000
--- a/odk/examples/java/PropertySet/PropTest.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="PropTest.uno.jar">
- <implementation name="PropTest">
- <service name="PropTest"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/java/PropertySet/PropTest.java b/odk/examples/java/PropertySet/PropTest.java
deleted file mode 100644
index cbd3042e..00000000
--- a/odk/examples/java/PropertySet/PropTest.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-/*
-This example shows a UNO component that inherits com.sun.star.lib.uno.helper.PropertySet in
-order to provide implementations of these interfaces:
-
- com.sun.star.beans.XPropertySet
- com.sun.star.beans.XMultiPropertySet
- com.sun.star.beans.XFastPropertySet
- com.sun.star.lang.XComponent
- com.sun.star.uno.XWeak
- com.sun.star.lang.XTypeProvider
-*/
-import com.sun.star.lib.uno.helper.PropertySet;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.beans.PropertyAttribute;
-
-/**
- This component contains the followin properties:
- * <table border>
- * <tr>
- * <th> Property Name </th>
- * <th> Type Name </th>
- * <th> PropertyAttribute </th>
- * <tr><td>boolA</td><td>BOOLEAN</td><td> - </td</tr>
- * <tr><td>charA</td><td>CHAR</td><td> - </td></tr>
- * <tr><td>byteA</td><td>BYTE</td><td> - </td></tr>
- * <tr><td>shortA</td><td>SHORT</td><td> - </td></tr>
- * <tr><td>intA</td><td>LONG</td><td> - </td></tr>
- * <tr><td>longA</td><td>HYPER</td><td> - </td></tr>
- * <tr><td>floatA</td><td>FLOAT</td><td> - </td></tr>
- * <tr><td>doubleA</td><td>DOUBLE</td><td> - </td></tr>
- * <tr><td>stringA</td><td>STRING</td><td> - </td></tr>
- * <tr><td>objectA</td><td>ANY</td><td> - </td></tr>
- * <tr><td>anyA</td><td>ANY</td><td> - </td></tr>
- * <tr><td>typeA</td><td>TYPE</td><td> - </td></tr>
- * <tr><td>xinterfaceA</td><td>INTERFACE</td><td> - </td></tr>
- * <tr><td>xtypeproviderA</td><td>INTERFACE</td><td> - </td></tr>
- * <tr><td>arBoolA</td><td>[]boolean</td><td> - </td></tr>
- * <tr><td>arCharA</td><td>[]char</td><td> - </td></tr>
- * <tr><td>arByteA</td><td>[]byte</td><td> - </td></tr>
- * <tr><td>arShortA</td><td>[]short</td><td> - </td></tr>
- * <tr><td>arIntA</td><td>[]long</td><td> - </td></tr>
- * <tr><td>arLongA</td><td>[]hyper</td><td> - </td></tr>
- * <tr><td>arFloatA</td><td>[]float</td><td> - </td></tr>
- * <tr><td>arDoubleA</td><td>[]double</td><td> - </td></tr>
- * <tr><td>arStringA</td><td>[]string</td><td> - </td></tr>
- * <tr><td>arObjectA</td><td>[]any</td><td> - </td></tr>
- * <tr><td>arXinterfaceA</td><td>[]com.sun.star.uno.XInterface</td><td> - </td></tr>
- * <tr><td>ar2BoolA</td><td>[][]boolean</td><td> - </td></tr>
- * <tr><td>boolClassA</td><td>boolean</td><td> - </td></tr>
- * <tr><td>charClassA</td><td>char</td><td> - </td></tr>
- * <tr><td>byteClassA</td><td>byte</td><td> - </td></tr>
- * <tr><td>shortClassA</td><td>short</td><td> - </td></tr>
- * <tr><td>intClassA</td><td>long</td><td> - </td></tr>
- * <tr><td>longClassA</td><td>hyper</td><td> - </td></tr>
- * <tr><td>floatClassA</td><td>float</td><td> - </td></tr>
- * <tr><td>doubleClassA</td><td>double</td><td> - </td></tr>
- * <tr><td>roIntA</td><td>long</td><td>READONLY</td></tr>
- * <tr><td>roIntClassA</td><td>long</td><td>READONLY</td></tr>
- * <tr><td>roObjectA</td><td>any</td><td>READONLY</td></tr>
- * <tr><td>roAnyA</td><td>any</td><td>READONLY</td></tr>
- * <tr><td>bcBoolA</td><td>boolean</td><td>BOUND,CONSTRAINED</td></tr>
- * <tr><td>bcBoolClassA</td><td>boolean</td><td>BOUND,CONSTRAINED</td></tr>
- * <tr><td>bcObjectA</td><td>any</td><td>BOUND,CONSTRAINED</td></tr>
- * <tr><td>bcAnyA</td><td>any</td><td>BOUND,CONSTRAINED</td></tr>
- * <tr><td>mvIntA</td><td>long</td><td>MAYBEVOID</td></tr>
- * <tr><td>mvObjectA</td><td>any</td><td>MAYBEVOID</td></tr>
- * <tr><td>mvAnyA</td><td>any</td><td>MAYBEVOID</td></tr>
- * <tr><td>mvXinterfaceA</td><td>any</td><td>MAYBEVOID</td></tr>
- </table>
-*/
-
-public class PropTest extends PropertySet implements XServiceInfo
-{
-
- public boolean boolA;
- public char charA;
- public byte byteA;
- public short shortA;
- public int intA;
- public long longA;
- public float floatA;
- public double doubleA;
- public String stringA; // MAYBEVOID
- public Object objectA; // MAYBEVOID
- public Any anyA; // MAYBEVOID
- public Type typeA;// MAYBEVOID
- public XInterface xinterfaceA;// MAYBEVOID
- public XTypeProvider xtypeproviderA;// MAYBEVOID
- public boolean[] arBoolA; // MAYBEVOID
- public char[] arCharA; // MAYBEVOID
- public byte[] arByteA; // MAYBEVOID
- public short[] arShortA; // MAYBEVOID
- public int[] arIntA; // MAYBEVOID
- public long[] arLongA; // MAYBEVOID
- public float[] arFloatA; // MAYBEVOID
- public double[] arDoubleA; // MAYBEVOID
- public String[] arStringA; // MAYBEVOID
- public Object[] arObjectA; // MAYBEVOID
- public Any[] arAnyA; // MAYBEVOID
- public XInterface[] arXinterfaceA; // MAYBEVOID
- public boolean[][] ar2BoolA; // MAYBEVOID
- public Boolean boolClassA; // MAYBEVOID
- public Character charClassA; // MAYBEVOID
- public Byte byteClassA; // MAYBEVOID
- public Short shortClassA; // MAYBEVOID
- public Integer intClassA; // MAYBEVOID
- public Long longClassA; // MAYBEVOID
- public Float floatClassA; // MAYBEVOID
- public Double doubleClassA; // MAYBEVOID
-
- // readonly
- public int roIntA= 100;
- public Integer roIntClassA= new Integer(100);
- public Object roObjectA= new Integer(101);
- public Any roAnyA= new Any( new Type(int.class), new Integer(102));
-
- // BOUND & CONSTRAINED
- public boolean bcBoolA;
- public Boolean bcBoolClassA; // MAYBEVOID
- public Object bcObjectA; // MAYBEVOID
- public Any bcAnyA; // MAYBEVOID
-
- // MAYBEVOID
- public Integer mvIntA;
- public Object mvObjectA;
- public Any mvAnyA;
- public XInterface mvXinterfaceA;
-
- public static final String __serviceName="PropTest";
-
- public PropTest() {
- registerProperty("boolA", (short) 0);
- registerProperty("charA", (short) 0);
- registerProperty("byteA", (short) 0);
- registerProperty("shortA", (short) 0);
- registerProperty("intA", (short) 0);
- registerProperty("longA", (short) 0);
- registerProperty("floatA", (short) 0);
- registerProperty("doubleA", (short) 0);
- registerProperty("stringA", PropertyAttribute.MAYBEVOID);
- registerProperty("objectA", PropertyAttribute.MAYBEVOID);
- registerProperty("anyA", PropertyAttribute.MAYBEVOID);
- registerProperty("typeA", PropertyAttribute.MAYBEVOID);
- registerProperty("xinterfaceA", PropertyAttribute.MAYBEVOID);
- registerProperty("xtypeproviderA", PropertyAttribute.MAYBEVOID);
- registerProperty("arBoolA", PropertyAttribute.MAYBEVOID);
- registerProperty("arCharA", PropertyAttribute.MAYBEVOID);
- registerProperty("arByteA", PropertyAttribute.MAYBEVOID);
- registerProperty("arShortA", PropertyAttribute.MAYBEVOID);
- registerProperty("arIntA", PropertyAttribute.MAYBEVOID);
- registerProperty("arLongA", PropertyAttribute.MAYBEVOID);
- registerProperty("arFloatA", PropertyAttribute.MAYBEVOID);
- registerProperty("arDoubleA", PropertyAttribute.MAYBEVOID);
- registerProperty("arStringA", PropertyAttribute.MAYBEVOID);
- registerProperty("arObjectA", PropertyAttribute.MAYBEVOID);
- registerProperty("arAnyA", PropertyAttribute.MAYBEVOID);
- registerProperty("arXinterfaceA", PropertyAttribute.MAYBEVOID);
- registerProperty("ar2BoolA", PropertyAttribute.MAYBEVOID);
- registerProperty("boolClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("charClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("byteClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("shortClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("intClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("longClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("floatClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("doubleClassA", PropertyAttribute.MAYBEVOID);
- registerProperty("roIntA", PropertyAttribute.READONLY);
- registerProperty("roIntClassA", PropertyAttribute.READONLY);
- registerProperty("roObjectA", PropertyAttribute.READONLY);
- registerProperty("roAnyA", PropertyAttribute.READONLY);
- registerProperty("bcBoolA",(short) ( PropertyAttribute.BOUND | PropertyAttribute.CONSTRAINED));
- registerProperty("bcBoolClassA", (short) (PropertyAttribute.BOUND | PropertyAttribute.CONSTRAINED | PropertyAttribute.MAYBEVOID));
- registerProperty("bcObjectA", (short) (PropertyAttribute.BOUND | PropertyAttribute.CONSTRAINED | PropertyAttribute.MAYBEVOID));
- registerProperty("bcAnyA", (short) (PropertyAttribute.BOUND | PropertyAttribute.CONSTRAINED |PropertyAttribute.MAYBEVOID));
- registerProperty("mvIntA", PropertyAttribute.MAYBEVOID);
- registerProperty("mvObjectA", PropertyAttribute.MAYBEVOID);
- registerProperty("mvAnyA", PropertyAttribute.MAYBEVOID);
- registerProperty("mvXinterfaceA", PropertyAttribute.MAYBEVOID);
- }
-
-
- // XServiceName
- public String getImplementationName( )
- {
- return getClass().getName();
- }
-
- // XServiceName
- public boolean supportsService( /*IN*/String name )
- {
- if (name.equals(__serviceName))
- return true;
- return false;
- }
-
- //XServiceName
- public String[] getSupportedServiceNames( )
- {
- String[] retValue= new String[]{__serviceName};
- return retValue;
- }
-
- public static XSingleServiceFactory __getServiceFactory(String implName,
- XMultiServiceFactory multiFactory,
- XRegistryKey regKey)
- {
- XSingleServiceFactory xSingleServiceFactory = null;
-
- if (implName.equals( PropTest.class.getName()) )
- xSingleServiceFactory = FactoryHelper.getServiceFactory( PropTest.class,
- PropTest.__serviceName,
- multiFactory,
- regKey);
-
- return xSingleServiceFactory;
- }
-
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
-// {
-// return FactoryHelper.writeRegistryServiceInfo( PropTest.class.getName(),
-// PropTest.__serviceName, regKey);
-// }
-}
diff --git a/odk/examples/java/PropertySet/PropertySet.odt b/odk/examples/java/PropertySet/PropertySet.odt
deleted file mode 100644
index 31d326e4..00000000
--- a/odk/examples/java/PropertySet/PropertySet.odt
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.components b/odk/examples/java/Spreadsheet/CalcAddins.components
deleted file mode 100644
index c16c4a3a..00000000
--- a/odk/examples/java/Spreadsheet/CalcAddins.components
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="CalcAddins.uno.jar">
- <implementation name="CalcAddins$_CalcAddins">
- <service name="org.openoffice.sheet.addin.CalcAddins"/>
- <service name="com.sun.star.sheet.AddIn"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java b/odk/examples/java/Spreadsheet/CalcAddins.java
deleted file mode 100644
index 63641256..00000000
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-// Template for an Office Calc add-in Java implementation file.
-
-/** You can find more
- * information on the following web page:
- * http://api.openoffice.org/common/ref/com/sun/star/index.html
- */
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XServiceName;
-import com.sun.star.sheet.XAddIn;
-import com.sun.star.lang.Locale;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.uno.Type;
-
-import org.openoffice.sheet.addin.XCalcAddins;
-
-/** This outer class provides an inner class to implement the service
- * description, a method to instantiate the
- * component on demand (__getServiceFactory()), and a method to give
- * information about the component (__writeRegistryServiceInfo()).
- */
-public class CalcAddins {
-
-/** This inner class provides the component as a concrete implementation
- * of the service description. It implements the needed interfaces.
- * @implements XCalcAddins, XAddIn, XServiceName, XServiceInfo, XTypeProvider
- */
- static public class _CalcAddins extends WeakBase implements
- XCalcAddins,
- XAddIn,
- XServiceName,
- XServiceInfo
- {
-
-/** The component will be registered under this name.
- */
- static private final String __serviceName = "org.openoffice.sheet.addin.CalcAddins";
-
- static private final String ADDIN_SERVICE = "com.sun.star.sheet.AddIn";
-
- private Locale aFuncLoc;
-
- private static final String[] stringFunctionName = {
-/** TO DO:
- * You should replace these method names by the method names of your interface.
- */
- "getMyFirstValue",
- "getMySecondValue"
- };
-
- private static final short shortINVALID = -1;
-
-/** TO DO:
- * For each of your methods you should make up a new constant with a different value.
- */
- private static final short shortGETMYFIRSTVALUE = 0;
- private static final short shortGETMYSECONDVALUE = 1;
-
-
-/** TO DO:
- * This is where you implement all methods of your interface. The parameters have to
- * be the same as in your IDL file and their types have to be the correct
- * IDL-to-Java mappings of their types in the IDL file.
- */
- public int getMyFirstValue(
- com.sun.star.beans.XPropertySet xOptions
- ) {
- return (int) 1;
- }
-
- public int getMySecondValue(
- com.sun.star.beans.XPropertySet xOptions,
- int intDummy
- ) {
- return( (int) ( 2 + intDummy ) );
- }
-
-
- // Implement method from interface XServiceName
- public String getServiceName() {
- return( __serviceName );
- }
-
- // Implement methods from interface XServiceInfo
- public boolean supportsService(String stringServiceName) {
- return( stringServiceName.equals( ADDIN_SERVICE ) ||
- stringServiceName.equals( __serviceName ) );
- }
-
- public String getImplementationName() {
- return( _CalcAddins.class.getName() );
- }
-
- public String[] getSupportedServiceNames() {
- String[] stringSupportedServiceNames = { ADDIN_SERVICE, __serviceName };
- return( stringSupportedServiceNames );
- }
-
- // Implement methods from interface XAddIn
- public String getDisplayArgumentName(String stringProgrammaticFunctionName,int intArgument) {
- String stringReturn = "";
-
- switch( this.getFunctionID( stringProgrammaticFunctionName ) ) {
-/** TO DO:
- * You should list all argument names for each of your methods, here.
- */
- case shortGETMYFIRSTVALUE:
- switch( intArgument ) {
- case 0:
- stringReturn = "(internal)";
- break;
- }
- break;
- case shortGETMYSECONDVALUE:
- switch( intArgument ) {
- case 0:
- stringReturn = "(internal)";
- break;
- case 1:
- stringReturn = "intDummy";
- break;
- }
- break;
- }
- return( stringReturn );
- }
-
- public String getDisplayFunctionName(String stringProgrammaticName) {
- String stringReturn = "";
-
- switch( this.getFunctionID( stringProgrammaticName ) ) {
-/** TO DO:
- * Assign the name of each of your methods.
- */
- case shortGETMYFIRSTVALUE:
- stringReturn = "getMyFirstValue";
- break;
- case shortGETMYSECONDVALUE:
- stringReturn = "getMySecondValue";
- break;
- }
-
- return( stringReturn );
- }
-
- public String getProgrammaticCategoryName(String p1) {
- return( "Add-In" );
- }
-
- public String getDisplayCategoryName(String p1) {
- return( "Add-In" );
- }
-
- public String getFunctionDescription(String stringProgrammaticName) {
- String stringReturn = "";
-
- switch( this.getFunctionID( stringProgrammaticName ) ) {
-/** TO DO:
- * Enter a description for each of your methods that office users will understand.
- */
- case shortGETMYFIRSTVALUE:
- stringReturn = "This is your first method.";
- break;
- case shortGETMYSECONDVALUE:
- stringReturn = "This is your second method.";
- break;
- }
-
- return( stringReturn );
- }
-
- public String getArgumentDescription(String stringProgrammaticFunctionName,int intArgument) {
- String stringReturn = "";
-
- switch( this.getFunctionID( stringProgrammaticFunctionName ) ) {
-/** TO DO:
- * Enter a description for every argument of every method. Make them so that office users will understand.
- */
- case shortGETMYFIRSTVALUE:
- switch( intArgument ) {
- case 0:
- stringReturn = "(internal)";
- break;
- }
- break;
- case shortGETMYSECONDVALUE:
- switch( intArgument ) {
- case 0:
- stringReturn = "(internal)";
- break;
- case 1:
- stringReturn = "You can add this value.";
- break;
- }
- break;
- }
- return( stringReturn );
- }
-
- public String getProgrammaticFuntionName(String p1) {
- return( "" );
- }
-
- // Implement methods from interface XLocalizable
- public Locale getLocale() {
- return( aFuncLoc );
- }
-
- public void setLocale(Locale p1) {
- aFuncLoc = p1;
- }
-
- // Auxiliary functions
- private short getFunctionID( String stringProgrammaticName ) {
- for ( int i = 0; i < stringFunctionName.length; i++ ) {
- if ( stringProgrammaticName.equals( stringFunctionName[ i ] ) ) {
- return( ( short ) i );
- }
- }
-
- return( -1 );
- }
- }
-
- /**
- * Returns a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleServiceFactory</code> for creating the component
- * @param implName the name of the implementation for which a service is desired
- * @param multiFactory the service manager to be used if needed
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(String implName,
- XMultiServiceFactory multiFactory,
- XRegistryKey regKey) {
- XSingleServiceFactory xSingleServiceFactory = null;
-
- if (implName.equals(_CalcAddins.class.getName()) )
- xSingleServiceFactory = FactoryHelper.getServiceFactory(_CalcAddins.class,
- _CalcAddins.__serviceName,
- multiFactory,
- regKey);
-
- return xSingleServiceFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return FactoryHelper.writeRegistryServiceInfo(_CalcAddins.class.getName(),
-// _CalcAddins.__serviceName, regKey)
-// && FactoryHelper.writeRegistryServiceInfo(_CalcAddins.class.getName(),
-// _CalcAddins.ADDIN_SERVICE, regKey);
-// }
-}
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.ods b/odk/examples/java/Spreadsheet/CalcAddins.ods
deleted file mode 100644
index 133539d5..00000000
--- a/odk/examples/java/Spreadsheet/CalcAddins.ods
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/Spreadsheet/ChartTypeChange.java b/odk/examples/java/Spreadsheet/ChartTypeChange.java
deleted file mode 100644
index ab4e44bf..00000000
--- a/odk/examples/java/Spreadsheet/ChartTypeChange.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-import com.sun.star.awt.Rectangle;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.chart.XDiagram;
-import com.sun.star.chart.XChartDocument;
-
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XIndexAccess;
-
-import com.sun.star.document.XEmbeddedObjectSupplier;
-
-import com.sun.star.frame.XComponentLoader;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XCellRangeAddressable;
-
-import com.sun.star.table.XTableChart;
-import com.sun.star.table.XTableCharts;
-import com.sun.star.table.XCell;
-import com.sun.star.table.XCellRange;
-import com.sun.star.table.XTableChartsSupplier;
-import com.sun.star.table.CellRangeAddress;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XComponentContext;
-
-
-
-/** This class loads an OpenOffice.org Calc document and changes the type of the
- * embedded chart.
- * @author Bertram Nolte
- */
-public class ChartTypeChange {
-
- /** Table chart, which type will be changed.
- */
- private XTableChart xtablechart = null;
-
- /** Service factory
- */
- private XMultiComponentFactory xMCF = null;
-
- /** Component context
- */
- private XComponentContext xCompContext = null;
-
- /** Beginning of the program.
- * @param args No arguments will be passed to the class.
- */
- public static void main(String args[]) {
- try {
- ChartTypeChange charttypechange = new ChartTypeChange();
-
- // Double array holding all values the chart should be based on.
- String[][] stringValues = {
- { "", "Jan", "Feb", "Mar", "Apr", "Mai" },
- { "Profit", "12.3", "43.2", "5.1", "76", "56.8" },
- { "Rival in business", "12.2", "12.6", "17.7", "20.4", "100" },
- };
-
- // Create the chart with
- charttypechange.getChart( stringValues );
-
- String[] stringChartType = {
- "com.sun.star.chart.LineDiagram",
- "com.sun.star.chart.BarDiagram",
- "com.sun.star.chart.PieDiagram",
- "com.sun.star.chart.NetDiagram",
- "com.sun.star.chart.XYDiagram",
- "com.sun.star.chart.StockDiagram",
- "com.sun.star.chart.AreaDiagram"
- };
-
- for ( int intCounter = 0; intCounter < stringChartType.length;
- intCounter++ ) {
- charttypechange.changeChartType( stringChartType[ intCounter ],
- false );
- Thread.sleep( 3000 );
- }
-
- System.exit(0);
- }
- catch( Exception exception ) {
- System.err.println( exception );
- }
- }
-
- /** The constructor connects to the OpenOffice.org.
- * @param args Parameters for this constructor (connection string).
- * @throws Exception All exceptions are thrown from this method.
- */
- public ChartTypeChange()
- throws Exception {
-
- /* Bootstraps a component context. Component context to be granted
- to a component for running. Arbitrary values can be retrieved
- from the context. */
- xCompContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- /* Gets the service manager instance to be used (or null). This method has
- been added for convenience, because the service manager is a often used
- object. */
- xMCF = xCompContext.getServiceManager();
- }
-
- /** This method will change the type of a specified chart.
- * @param stringType The chart will be converted to this type.
- * @param booleanIs3D If the chart should be displayed in 3D this parameter should be set to true.
- * @throws Exception All exceptions are thrown from this method.
- */
- public void changeChartType( String stringType, boolean booleanIs3D )
- throws Exception {
- XEmbeddedObjectSupplier xEmbeddedObjSupplier = (XEmbeddedObjectSupplier)
- UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, xtablechart);
- XInterface xInterface = xEmbeddedObjSupplier.getEmbeddedObject();
-
- XChartDocument xChartDoc = (XChartDocument)UnoRuntime.queryInterface(
- XChartDocument.class, xInterface);
- XDiagram xDiagram = (XDiagram) xChartDoc.getDiagram();
- XMultiServiceFactory xMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface( XMultiServiceFactory.class, xChartDoc );
- Object object = xMSF.createInstance( stringType );
- xDiagram = (XDiagram) UnoRuntime.queryInterface(XDiagram.class, object);
-
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, xDiagram );
- xPropSet.setPropertyValue( "Dim3D", new Boolean( booleanIs3D ) );
-
- xChartDoc.setDiagram(xDiagram);
- }
-
- /** Loading an OpenOffice.org Calc document and getting a chart by name.
- * @param stringFileName Name of the OpenOffice.org Calc document which should
- * be loaded.
- * @param stringChartName Name of the chart which should get a new chart type.
- */
- public void getChart( String stringFileName, String stringChartName ) {
- try {
- /* A desktop environment contains tasks with one or more
- frames in which components can be loaded. Desktop is the
- environment for components which can instanciate within
- frames. */
- XComponentLoader xComponentloader = (XComponentLoader)
- UnoRuntime.queryInterface( XComponentLoader.class,
- xMCF.createInstanceWithContext("com.sun.star.frame.Desktop",
- xCompContext ) );
-
- // Load a Writer document, which will be automaticly displayed
- XComponent xComponent = xComponentloader.loadComponentFromURL(
- "file:///" + stringFileName, "_blank", 0,
- new PropertyValue[0] );
-
- // Query for the interface XSpreadsheetDocument
- XSpreadsheetDocument xSpreadSheetDocument = ( XSpreadsheetDocument )
- UnoRuntime.queryInterface( XSpreadsheetDocument.class, xComponent );
-
- XSpreadsheets xSpreadsheets = xSpreadSheetDocument.getSheets() ;
-
- XIndexAccess xIndexAccess = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets );
-
- XSpreadsheet xSpreadsheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, xIndexAccess.getByIndex(0));
-
- XTableChartsSupplier xTableChartsSupplier = ( XTableChartsSupplier )
- UnoRuntime.queryInterface( XTableChartsSupplier.class, xSpreadsheet );
-
- xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, xTableChartsSupplier.getCharts() );
-
- this.xtablechart = (XTableChart) UnoRuntime.queryInterface(
- XTableChart.class, xIndexAccess.getByIndex( 0 ) );
- }
- catch( Exception exception ) {
- System.err.println( exception );
- }
- }
-
- /** Creating an empty OpenOffice.org Calc document, inserting data, and getting a
- * chart by name.
- * @param stringValues Double array with the values for the chart.
- */
- public void getChart( String[][] stringValues ) {
- try {
- /* A desktop environment contains tasks with one or more
- frames in which components can be loaded. Desktop is the
- environment for components which can instanciate within
- frames. */
- XComponentLoader xcomponentloader = ( XComponentLoader )
- UnoRuntime.queryInterface( XComponentLoader.class,
- xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop",
- xCompContext ) );
-
- // Create an empty calc document, which will be automaticly displayed
- XComponent xComponent = xcomponentloader.loadComponentFromURL(
- "private:factory/scalc", "_blank", 0,
- new PropertyValue[0] );
-
- // Query for the interface XSpreadsheetDocument
- XSpreadsheetDocument xspreadsheetdocument = ( XSpreadsheetDocument )
- UnoRuntime.queryInterface( XSpreadsheetDocument.class, xComponent );
-
- // Get all sheets of the spreadsheet document.
- XSpreadsheets xspreadsheets = xspreadsheetdocument.getSheets() ;
-
- // Get the index of the spreadsheet document.
- XIndexAccess xindexaccess = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, xspreadsheets );
-
- // Get the first spreadsheet.
- XSpreadsheet xspreadsheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, xindexaccess.getByIndex(0));
-
- // The double array will written to the spreadsheet
- for ( int intY = 0; intY < stringValues.length; intY++ ) {
- for ( int intX = 0; intX < stringValues[ intY ].length;
- intX++ ) {
- // Insert the value to the cell, specified by intY and intX.
- this.insertIntoCell( intY, intX,
- stringValues[ intY ][ intX ], xspreadsheet, "" );
- }
- }
-
- // Create a rectangle, which holds the size of the chart.
- Rectangle rectangle = new Rectangle();
- rectangle.X = 500;
- rectangle.Y = 3000;
- rectangle.Width = 25000;
- rectangle.Height = 11000;
-
- // Get the cell range of the spreadsheet.
- XCellRange xcellrange = ( XCellRange ) UnoRuntime.queryInterface(
- XCellRange.class, xspreadsheet );
-
- // Create the Unicode of the character for the column name.
- char charRectangle = ( char ) ( 65 + stringValues.length - 1 );
-
- // Get maximum length all rows in the double array.
- int intMaximumWidthRow = 0;
- for ( int intRow = 0; intRow < stringValues.length; intRow++ ) {
- if ( stringValues[ intRow ].length > intMaximumWidthRow ) {
- intMaximumWidthRow = stringValues[ intRow ].length;
- }
- }
-
- // Get the cell range of the written values.
- XCellRange xcellrangeChart = xcellrange.getCellRangeByName( "A1:" +
- charRectangle + intMaximumWidthRow );
-
- // Get the addressable cell range.
- XCellRangeAddressable xcellrangeaddressable =
- ( XCellRangeAddressable ) UnoRuntime.queryInterface(
- XCellRangeAddressable.class, xcellrangeChart );
-
- // Get the cell range address.
- CellRangeAddress cellrangeaddress = xcellrangeaddressable.getRangeAddress();
-
- // Create the cell range address for the chart.
- CellRangeAddress[] cellrangeaddressChart =
- new CellRangeAddress[ 1 ];
- cellrangeaddressChart[ 0 ] = cellrangeaddress;
-
- // Get the table charts supplier of the spreadsheet.
- XTableChartsSupplier xtablechartssupplier = ( XTableChartsSupplier )
- UnoRuntime.queryInterface( XTableChartsSupplier.class, xspreadsheet );
-
- // Get all table charts of the spreadsheet.
- XTableCharts xtablecharts = xtablechartssupplier.getCharts();
-
- // Create a table chart with all written values.
- xtablecharts.addNewByName( "Example", rectangle,
- cellrangeaddressChart, true, true );
-
- // Get the created table chart.
- this.xtablechart = ( XTableChart ) UnoRuntime.queryInterface(
- XTableChart.class, (( XNameAccess ) UnoRuntime.queryInterface(
- XNameAccess.class, xtablecharts ) ).getByName( "Example" ));
- }
- catch( Exception exception ) {
- System.err.println( exception );
- }
- }
-
- /** Inserting a given value to a cell, that is specified by the parameters intX
- * and intY.
- * @param intX Column on the spreadsheet.
- * @param intY Row on the spreadsheet.
- * @param stringValue Value to be inserted to a cell.
- * @param xspreadsheet Spreadsheet of the cell, which will be changed.
- * @param stringFlag If the value of stringFlag is "V", the stringValue
- * will be converted to the
- * float type. Otherwise the stringValue will be written as a formula.
- */
- public static void insertIntoCell( int intX, int intY, String stringValue,
- XSpreadsheet xspreadsheet, String stringFlag )
- {
- XCell xcell = null;
-
- try {
- xcell = xspreadsheet.getCellByPosition( intX, intY );
- }
- catch ( com.sun.star.lang.IndexOutOfBoundsException exception ) {
- System.out.println( "Could not get cell." );
- }
- if ( stringFlag.equals( "V" ) ) {
- xcell.setValue( ( new Float( stringValue ) ).floatValue() );
- }
- else {
- xcell.setFormula( stringValue );
- }
- }
-}
diff --git a/odk/examples/java/Spreadsheet/EuroAdaption.java b/odk/examples/java/Spreadsheet/EuroAdaption.java
deleted file mode 100644
index 43c2b47d..00000000
--- a/odk/examples/java/Spreadsheet/EuroAdaption.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the Desktop object from the office
-// Step 2: open an empty Calc document
-// Step 3: enter a example text, set the numberformat to DM
-// Step 4: change the numberformat to EUR (Euro)
-// Step 5: use the DM/EUR factor on each cell with a content
-//***************************************************************************
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.container.XEnumerationAccess;
-
-import com.sun.star.document.XActionLockable;
-
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-
-import com.sun.star.lang.Locale;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-
-import com.sun.star.table.XCell;
-import com.sun.star.table.XCellRange;
-
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.sheet.XSheetCellRanges;
-import com.sun.star.sheet.XCellRangesQuery;
-import com.sun.star.sheet.XCellFormatRangesSupplier;
-import com.sun.star.sheet.XCellRangesQuery;
-import com.sun.star.sheet.XSpreadsheetDocument;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XComponentContext;
-
-import com.sun.star.util.NumberFormat;
-import com.sun.star.util.XNumberFormats;
-import com.sun.star.util.XNumberFormatsSupplier;
-
-
-public class EuroAdaption {
-
- public static void main(String args[]) {
- // You need the desktop to create a document
- // The getDesktop method does the UNO bootstrapping, gets the
- // remote servie manager and the desktop object.
- com.sun.star.frame.XDesktop xDesktop = null;
- xDesktop = getDesktop();
-
- // create a sheet document
- XSpreadsheetDocument xSheetdocument = null;
- xSheetdocument = ( XSpreadsheetDocument ) createSheetdocument( xDesktop );
- System.out.println( "Create a new Spreadsheet" );
-
- // get the collection of all sheets from the document
- XSpreadsheets xSheets = null;
- xSheets = (XSpreadsheets) xSheetdocument.getSheets();
-
- // the Action Interface provides methods to hide actions,
- // like inserting data, on a sheet, that increase the performance
- XActionLockable xActionInterface = null;
- xActionInterface = (XActionLockable) UnoRuntime.queryInterface(
- XActionLockable.class, xSheetdocument );
-
- // lock all actions
- xActionInterface.addActionLock();
-
- com.sun.star.sheet.XSpreadsheet xSheet = null;
- try {
- // get via the index access the first sheet
- XIndexAccess xElements = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, xSheets );
-
- // specify the first sheet from the spreadsheet
- xSheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, xElements.getByIndex( 0 ));
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- // get the interface to apply and create new numberformats
- XNumberFormatsSupplier xNumberFormatSupplier = null;
- xNumberFormatSupplier = (XNumberFormatsSupplier) UnoRuntime.queryInterface(
- XNumberFormatsSupplier.class, xSheetdocument );
- XNumberFormats xNumberFormats = null;
- xNumberFormats = xNumberFormatSupplier.getNumberFormats();
-
- // insert some example data in a sheet
- createExampleData( xSheet, xNumberFormats );
- System.out.println( "Insert example data and use the number format with the currency 'DM'" );
-
- // Change the currency from the cells from DM to Euro
- Convert( xSheet, xNumberFormats, "DM", "EUR", 1.95583f );
- System.out.println( "Change the number format to EUR and divide the values with the factor 1.95583" );
-
- // remove all locks, the user see all changes
- xActionInterface.removeActionLock();
-
- System.out.println("done");
- System.exit(0);
- }
-
-
- public static void Convert( XSpreadsheet xSheet, XNumberFormats xNumberFormats,
- String sOldSymbol, String sNewSymbol,
- float fFactor ) {
- try {
- Locale xLanguage = new Locale();
- xLanguage.Country = "de"; // Germany -> DM
- xLanguage.Language = "de"; // German
-
- // Numberformat string with sNewSymbol
- String sSimple = "0 [$" + sNewSymbol + "]";
- // create a number format key with the sNewSymbol
- int iSimpleKey = NumberFormat( xNumberFormats, sSimple, xLanguage );
-
- // you have to use the FormatSupplier interface to get the
- // CellFormat enumeration
- XCellFormatRangesSupplier xCellFormatSupplier =
- (XCellFormatRangesSupplier)UnoRuntime.queryInterface(
- XCellFormatRangesSupplier.class, xSheet );
-
- // getCellFormatRanges() has the interfaces for the enumeration
- XEnumerationAccess xEnumerationAccess =
- (XEnumerationAccess)UnoRuntime.queryInterface(
- XEnumerationAccess.class,
- xCellFormatSupplier.getCellFormatRanges() );
-
- XEnumeration xRanges = xEnumerationAccess.createEnumeration();
-
- // create an AnyConverter for later use
- AnyConverter aAnyConv = new AnyConverter();
-
- while( xRanges.hasMoreElements() ) {
- // the enumeration returns a cellrange
- XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(
- XCellRange.class, xRanges.nextElement());
-
- // the PropertySet the get and set the properties from the cellrange
- XPropertySet xCellProp = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCellRange );
-
- // getPropertyValue returns an Object, you have to cast it to
- // type that you need
- Object oNumberObject = xCellProp.getPropertyValue( "NumberFormat" );
- int iNumberFormat = aAnyConv.toInt(oNumberObject);
-
- // get the properties from the cellrange numberformat
- XPropertySet xFormat = (XPropertySet)
- xNumberFormats.getByKey(iNumberFormat );
-
- short fType = aAnyConv.toShort(xFormat.getPropertyValue("Type"));
- String sCurrencySymbol = aAnyConv.toString(
- xFormat.getPropertyValue("CurrencySymbol"));
-
- // change the numberformat only on cellranges with a
- // currency numberformat
- if( ( (fType & com.sun.star.util.NumberFormat.CURRENCY) > 0) &&
- ( sCurrencySymbol.compareTo( sOldSymbol ) == 0 ) ) {
- boolean bThousandSep = aAnyConv.toBoolean(
- xFormat.getPropertyValue("ThousandsSeparator"));
- boolean bNegativeRed = aAnyConv.toBoolean(
- xFormat.getPropertyValue("NegativeRed"));
- short fDecimals = aAnyConv.toShort(
- xFormat.getPropertyValue("Decimals"));
- short fLeadingZeros = aAnyConv.toShort(
- xFormat.getPropertyValue("LeadingZeros"));
- Locale oLocale = (Locale) aAnyConv.toObject(
- new com.sun.star.uno.Type(Locale.class),
- xFormat.getPropertyValue("Locale"));
-
- // create a new numberformat string
- String sNew = xNumberFormats.generateFormat( iSimpleKey,
- oLocale, bThousandSep, bNegativeRed,
- fDecimals, fLeadingZeros );
-
- // get the NumberKey from the numberformat
- int iNewNumberFormat = NumberFormat( xNumberFormats,
- sNew, oLocale );
-
- // set the new numberformat to the cellrange DM->EUR
- xCellProp.setPropertyValue( "NumberFormat",
- new Integer( iNewNumberFormat ) );
-
- // interate over all cells from the cellrange with an
- // content and use the DM/EUR factor
- XCellRangesQuery xCellRangesQuery = (XCellRangesQuery)
- UnoRuntime.queryInterface(
- XCellRangesQuery.class, xCellRange );
-
- XSheetCellRanges xSheetCellRanges =
- xCellRangesQuery.queryContentCells(
- (short) com.sun.star.sheet.CellFlags.VALUE );
-
- if( xSheetCellRanges.getCount() > 0 ) {
- XEnumerationAccess xCellEnumerationAccess =
- xSheetCellRanges.getCells();
- XEnumeration xCellEnumeration =
- xCellEnumerationAccess.createEnumeration();
-
- while( xCellEnumeration.hasMoreElements() ) {
- XCell xCell = (XCell) UnoRuntime.queryInterface(
- XCell.class, xCellEnumeration.nextElement());
- xCell.setValue( (double) xCell.getValue() / fFactor );
- }
- }
- }
- }
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
- }
-
-
- public static int NumberFormat( XNumberFormats xNumberFormat, String sFormat,
- com.sun.star.lang.Locale xLanguage ) {
- int nRetKey = 0;
-
- try {
- // exists the numberformat
- nRetKey = xNumberFormat.queryKey( sFormat, xLanguage, true );
-
- // if not, create a new one
- if( nRetKey == -1 ) {
- nRetKey = xNumberFormat.addNew( sFormat, xLanguage );
- if( nRetKey == -1 )
- nRetKey = 0;
- }
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return( nRetKey );
- }
-
-
- public static void createExampleData( XSpreadsheet xSheet,
- XNumberFormats xNumberFormat ) {
-
- // enter in a cellrange numbers and change the numberformat to DM
- XCell xCell = null;
- XCellRange xCellRange = null;
-
- try {
- Locale xLanguage = new Locale();
- xLanguage.Country = "de"; // Germany -> DM
- xLanguage.Language = "de"; // German
-
- // Numberformat string from DM
- String sSimple = "0 [$DM]";
-
- // get the numberformat key
- int iNumberFormatKey = NumberFormat(xNumberFormat, sSimple, xLanguage);
-
- for( int iCounter=1; iCounter < 10; iCounter++ ) {
- // get one cell and insert a number
- xCell = xSheet.getCellByPosition( 2, 1 + iCounter );
- xCell.setValue( (double) iCounter * 2 );
- xCellRange = xSheet.getCellRangeByPosition( 2, 1 + iCounter,
- 2, 1 + iCounter );
-
- // get the ProperySet from the cell, to change the numberformat
- XPropertySet xCellProp = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCellRange );
- xCellProp.setPropertyValue( "NumberFormat",
- new Integer(iNumberFormatKey) );
- }
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
- }
-
- public static XDesktop getDesktop() {
- XDesktop xDesktop = null;
- XMultiComponentFactory xMCF = null;
-
- try {
- XComponentContext xContext = null;
-
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- xMCF = xContext.getServiceManager();
- if( xMCF != null ) {
- System.out.println("Connected to a running office ...");
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
- xDesktop = (XDesktop) UnoRuntime.queryInterface(
- XDesktop.class, oDesktop);
- }
- else
- System.out.println( "Can't create a desktop. No connection, no remote servicemanager available!" );
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- return xDesktop;
- }
-
-
- public static XSpreadsheetDocument createSheetdocument( XDesktop xDesktop ) {
- XSpreadsheetDocument aSheetDocument = null;
-
- try {
- XComponent xComponent = null;
- xComponent = CreateNewDocument( xDesktop, "scalc" );
-
- aSheetDocument = (XSpreadsheetDocument) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, xComponent);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return aSheetDocument;
- }
-
- protected static XComponent CreateNewDocument( XDesktop xDesktop,
- String sDocumentType ) {
- String sURL = "private:factory/" + sDocumentType;
-
- XComponent xComponent = null;
- XComponentLoader xComponentLoader = null;
- PropertyValue xValues[] = new PropertyValue[1];
- PropertyValue xEmptyArgs[] = new PropertyValue[0];
-
- try {
- xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(
- XComponentLoader.class, xDesktop );
-
- xComponent = xComponentLoader.loadComponentFromURL(
- sURL, "_blank", 0, xEmptyArgs);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return xComponent ;
- }
-
-}
diff --git a/odk/examples/java/Spreadsheet/Makefile b/odk/examples/java/Spreadsheet/Makefile
deleted file mode 100644
index 52d73a44..00000000
--- a/odk/examples/java/Spreadsheet/Makefile
+++ /dev/null
@@ -1,215 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java Spreadsheet examples of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=JavaSpreadsheetExamples
-OUT_COMP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-OUT_COMP_GEN = $(OUT_MISC)/$(EXAMPLE_NAME)
-
-APP1_NAME=EuroAdaption
-APP1_JAR=$(OUT_COMP_CLASS)/$(APP1_NAME).jar
-APP2_NAME=SCalc
-APP2_JAR=$(OUT_COMP_CLASS)/$(APP2_NAME).jar
-APP3_NAME=ChartTypeChange
-APP3_JAR=$(OUT_COMP_CLASS)/$(APP3_NAME).jar
-
-COMP_NAME=CalcAddins
-COMP_RDB_NAME=$(COMP_NAME).uno.rdb
-COMP_RDB=$(OUT_COMP_GEN)/$(COMP_RDB_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(OUT_COMP_CLASS)/$(COMP_JAR_NAME)
-COMP_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(OUT_MISC)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-IDLFILES = XCalcAddins.idl
-
-# normally the idl file should be stored in a directory tree fitting the module structure,
-# for the example we know the module structure
-PACKAGE = org/openoffice/sheet/addin
-
-COMPJAVAFILES = CalcAddins.java
-
-#GENJAVAFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/$(PACKAGE)/%.java,$(IDLFILES))
-GENCLASSFILES = $(patsubst %.idl,$(OUT_COMP_CLASS)/$(PACKAGE)/%.class,$(IDLFILES))
-GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GENURDFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/%.urd,$(IDLFILES))
-
-COMPCLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(COMPJAVAFILES))
-#COMPCLASSFILES += $(subst $(OUT_COMP_GEN),$(OUT_COMP_CLASS),$(GENJAVAFILES:.java=.class))
-
-$(COMP_NAME)_CLASSFILES = $(COMP_NAME).class \
- $(COMP_NAME)$(QUOTE)$$_$(COMP_NAME).class
-
-#$(COMP_NAME)_CLASSFILES += $(subst $(OUT_COMP_GEN)/,,$(GENJAVAFILES:.java=.class))
-$(COMP_NAME)_CLASSFILES += $(subst $(OUT_COMP_CLASS)/,,$(GENCLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-# rule for a component manifest file
-$(OUT_COMP_CLASS)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $*).uno.jar> $@
- @echo RegistrationClassName: $(basename $*)>> $@
-
-$(OUT_COMP_GEN)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -C -I. -I$(IDL_DIR) -O$(OUT_COMP_GEN) $<
-
-$(OUT_COMP_GEN)/%.rdb : $(GENURDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GENURDFILES)
-
-#$(OUT_COMP_GEN)/%.java : $(COMP_RDB)
-$(GENCLASSFILES) : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-$(OUT_COMP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $<
-
-# only the component depends on the generated types
-$(COMPCLASSFILES) : $(JAVAFILES) $(GENCLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(COMPJAVAFILES)
-
-# rule for client/example application manifest file
-$(OUT_COMP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-# rule for client/example application jar file
-$(OUT_COMP_CLASS)/%.jar : $(OUT_COMP_CLASS)/%.mf $(OUT_COMP_CLASS)/%.class
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_MANIFESTFILE) $(COMPCLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-# rule for component package manifest
-$(OUT_COMP_CLASS)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_NAME).components
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_CLASS))
- $(SDK_ZIP) $@ -u $(COMP_NAME).components
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
- $(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_COMP_CLASS)/$(<F)))
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-$(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(APP1_NAME).class
-$(APP2_JAR) : $(OUT_COMP_CLASS)/$(APP2_NAME).mf $(OUT_COMP_CLASS)/$(APP2_NAME).class
-$(APP3_JAR) : $(OUT_COMP_CLASS)/$(APP3_NAME).mf $(OUT_COMP_CLASS)/$(APP3_NAME).class
-
-$(EXAMPLE_NAME) : $(COMP_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to execute the examples!
- @echo -
- @echo $(MAKE) EuroAdaption.run
- @echo $(MAKE) SCalc.run
- @echo $(MAKE) ChartTypeChange.run
- @echo --------------------------------------------------------------------------------
- @echo The Calc add-in component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo You can use this component inside your office installation, see the example
- @echo description. You can also load the "$(QM)CalcAddins.ods$(QM)" document to see
- @echo how the add-in functions works.
- @echo -
- @echo $(MAKE) CalcAddins.ods.load
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-CalcAddins.ods.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))
diff --git a/odk/examples/java/Spreadsheet/SCalc.java b/odk/examples/java/Spreadsheet/SCalc.java
deleted file mode 100644
index 1938244f..00000000
--- a/odk/examples/java/Spreadsheet/SCalc.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the remote component context from the office
-// Step 2: open an empty calc document
-// Step 3: create cell styles
-// Step 4: get the sheet an insert some data
-// Step 5: apply the created cell syles
-// Step 6: insert a 3D Chart
-//***************************************************************************
-
-import com.sun.star.awt.Rectangle;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.chart.XDiagram;
-import com.sun.star.chart.XChartDocument;
-
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.container.XNameContainer;
-
-import com.sun.star.document.XEmbeddedObjectSupplier;
-
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XComponentLoader;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XComponentContext;
-
-import com.sun.star.sheet.XCellRangeAddressable;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.sheet.XSpreadsheetDocument;
-
-import com.sun.star.style.XStyleFamiliesSupplier;
-
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.table.XCell;
-import com.sun.star.table.XCellRange;
-import com.sun.star.table.XTableChart;
-import com.sun.star.table.XTableCharts;
-import com.sun.star.table.XTableChartsSupplier;
-
-
-public class SCalc {
-
- public static void main(String args[]) {
-
- //oooooooooooooooooooooooooooStep 1oooooooooooooooooooooooooooooooooooooooooo
- // call UNO bootstrap method and get the remote component context form
- // the a running office (office will be started if necessary)
- //***************************************************************************
- XComponentContext xContext = null;
-
- // get the remote office component context
- try {
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
- } catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
- //oooooooooooooooooooooooooooStep 2oooooooooooooooooooooooooooooooooooooooooo
- // open an empty document. In this case it's a calc document.
- // For this purpose an instance of com.sun.star.frame.Desktop
- // is created. The desktop provides the XComponentLoader interface,
- // which is used to open the document via loadComponentFromURL
- //***************************************************************************
-
- //Open document
-
- //Calc
- XSpreadsheetDocument myDoc = null;
-// XCell oCell = null;
-
- System.out.println("Opening an empty Calc document");
- myDoc = openCalc(xContext);
-
- //***************************************************************************
-
-
- //oooooooooooooooooooooooooooStep 3oooooooooooooooooooooooooooooooooooooooooo
- // create cell styles.
- // For this purpose get the StyleFamiliesSupplier and the the familiy
- // CellStyle. Create an instance of com.sun.star.style.CellStyle and
- // add it to the family. Now change some properties
- //***************************************************************************
-
- try {
- XStyleFamiliesSupplier xSFS = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, myDoc);
- XNameAccess xSF = (XNameAccess) xSFS.getStyleFamilies();
- XNameAccess xCS = (XNameAccess) UnoRuntime.queryInterface(
- XNameAccess.class, xSF.getByName("CellStyles"));
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, myDoc );
- XNameContainer oStyleFamilyNameContainer = (XNameContainer)
- UnoRuntime.queryInterface(
- XNameContainer.class, xCS);
- XInterface oInt1 = (XInterface) oDocMSF.createInstance(
- "com.sun.star.style.CellStyle");
- oStyleFamilyNameContainer.insertByName("My Style", oInt1);
- XPropertySet oCPS1 = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, oInt1 );
- oCPS1.setPropertyValue("IsCellBackgroundTransparent", new Boolean(false));
- oCPS1.setPropertyValue("CellBackColor",new Integer(6710932));
- oCPS1.setPropertyValue("CharColor",new Integer(16777215));
- XInterface oInt2 = (XInterface) oDocMSF.createInstance(
- "com.sun.star.style.CellStyle");
- oStyleFamilyNameContainer.insertByName("My Style2", oInt2);
- XPropertySet oCPS2 = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, oInt2 );
- oCPS2.setPropertyValue("IsCellBackgroundTransparent", new Boolean(false));
- oCPS2.setPropertyValue("CellBackColor",new Integer(13421823));
- } catch (Exception e) {
- e.printStackTrace(System.err);
- }
-
- //***************************************************************************
-
- //oooooooooooooooooooooooooooStep 4oooooooooooooooooooooooooooooooooooooooooo
- // get the sheet an insert some data.
- // Get the sheets from the document and then the first from this container.
- // Now some data can be inserted. For this purpose get a Cell via
- // getCellByPosition and insert into this cell via setValue() (for floats)
- // or setFormula() for formulas and Strings
- //***************************************************************************
-
-
- XSpreadsheet xSheet=null;
-
- try {
- System.out.println("Getting spreadsheet") ;
- XSpreadsheets xSheets = myDoc.getSheets() ;
- XIndexAccess oIndexSheets = (XIndexAccess) UnoRuntime.queryInterface(
- XIndexAccess.class, xSheets);
- xSheet = (XSpreadsheet) UnoRuntime.queryInterface(
- XSpreadsheet.class, oIndexSheets.getByIndex(0));
-
- } catch (Exception e) {
- System.out.println("Couldn't get Sheet " +e);
- e.printStackTrace(System.err);
- }
-
-
-
- System.out.println("Creating the Header") ;
-
- insertIntoCell(1,0,"JAN",xSheet,"");
- insertIntoCell(2,0,"FEB",xSheet,"");
- insertIntoCell(3,0,"MAR",xSheet,"");
- insertIntoCell(4,0,"APR",xSheet,"");
- insertIntoCell(5,0,"MAI",xSheet,"");
- insertIntoCell(6,0,"JUN",xSheet,"");
- insertIntoCell(7,0,"JUL",xSheet,"");
- insertIntoCell(8,0,"AUG",xSheet,"");
- insertIntoCell(9,0,"SEP",xSheet,"");
- insertIntoCell(10,0,"OCT",xSheet,"");
- insertIntoCell(11,0,"NOV",xSheet,"");
- insertIntoCell(12,0,"DEC",xSheet,"");
- insertIntoCell(13,0,"SUM",xSheet,"");
-
-
- System.out.println("Fill the lines");
-
- insertIntoCell(0,1,"Smith",xSheet,"");
- insertIntoCell(1,1,"42",xSheet,"V");
- insertIntoCell(2,1,"58.9",xSheet,"V");
- insertIntoCell(3,1,"-66.5",xSheet,"V");
- insertIntoCell(4,1,"43.4",xSheet,"V");
- insertIntoCell(5,1,"44.5",xSheet,"V");
- insertIntoCell(6,1,"45.3",xSheet,"V");
- insertIntoCell(7,1,"-67.3",xSheet,"V");
- insertIntoCell(8,1,"30.5",xSheet,"V");
- insertIntoCell(9,1,"23.2",xSheet,"V");
- insertIntoCell(10,1,"-97.3",xSheet,"V");
- insertIntoCell(11,1,"22.4",xSheet,"V");
- insertIntoCell(12,1,"23.5",xSheet,"V");
- insertIntoCell(13,1,"=SUM(B2:M2)",xSheet,"");
-
-
- insertIntoCell(0,2,"Jones",xSheet,"");
- insertIntoCell(1,2,"21",xSheet,"V");
- insertIntoCell(2,2,"40.9",xSheet,"V");
- insertIntoCell(3,2,"-57.5",xSheet,"V");
- insertIntoCell(4,2,"-23.4",xSheet,"V");
- insertIntoCell(5,2,"34.5",xSheet,"V");
- insertIntoCell(6,2,"59.3",xSheet,"V");
- insertIntoCell(7,2,"27.3",xSheet,"V");
- insertIntoCell(8,2,"-38.5",xSheet,"V");
- insertIntoCell(9,2,"43.2",xSheet,"V");
- insertIntoCell(10,2,"57.3",xSheet,"V");
- insertIntoCell(11,2,"25.4",xSheet,"V");
- insertIntoCell(12,2,"28.5",xSheet,"V");
- insertIntoCell(13,2,"=SUM(B3:M3)",xSheet,"");
-
- insertIntoCell(0,3,"Brown",xSheet,"");
- insertIntoCell(1,3,"31.45",xSheet,"V");
- insertIntoCell(2,3,"-20.9",xSheet,"V");
- insertIntoCell(3,3,"-117.5",xSheet,"V");
- insertIntoCell(4,3,"23.4",xSheet,"V");
- insertIntoCell(5,3,"-114.5",xSheet,"V");
- insertIntoCell(6,3,"115.3",xSheet,"V");
- insertIntoCell(7,3,"-171.3",xSheet,"V");
- insertIntoCell(8,3,"89.5",xSheet,"V");
- insertIntoCell(9,3,"41.2",xSheet,"V");
- insertIntoCell(10,3,"71.3",xSheet,"V");
- insertIntoCell(11,3,"25.4",xSheet,"V");
- insertIntoCell(12,3,"38.5",xSheet,"V");
- insertIntoCell(13,3,"=SUM(A4:L4)",xSheet,"");
-
- //***************************************************************************
-
- //oooooooooooooooooooooooooooStep 5oooooooooooooooooooooooooooooooooooooooooo
- // apply the created cell style.
- // For this purpose get the PropertySet of the Cell and change the
- // property CellStyle to the appropriate value.
- //***************************************************************************
-
- // change backcolor
- chgbColor( 1 , 0, 13, 0, "My Style", xSheet );
- chgbColor( 0 , 1, 0, 3, "My Style", xSheet );
- chgbColor( 1 , 1, 13, 3, "My Style2", xSheet );
-
- //***************************************************************************
-
- //oooooooooooooooooooooooooooStep 6oooooooooooooooooooooooooooooooooooooooooo
- // insert a 3D chart.
- // get the CellRange which holds the data for the chart and its RangeAddress
- // get the TableChartSupplier from the sheet and then the TableCharts from it.
- // add a new chart based on the data to the TableCharts.
- // get the ChartDocument, which provide the Diagramm. Change the properties
- // Dim3D (3 dimension) and String (the title) of the diagramm.
- //***************************************************************************
-
- // insert a chart
-
- Rectangle oRect = new Rectangle();
- oRect.X = 500;
- oRect.Y = 3000;
- oRect.Width = 25000;
- oRect.Height = 11000;
-
- XCellRange oRange = (XCellRange)UnoRuntime.queryInterface(
- XCellRange.class, xSheet);
- XCellRange myRange = oRange.getCellRangeByName("A1:N4");
- XCellRangeAddressable oRangeAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface(XCellRangeAddressable.class, myRange);
- CellRangeAddress myAddr = oRangeAddr.getRangeAddress();
-
- CellRangeAddress[] oAddr = new CellRangeAddress[1];
- oAddr[0] = myAddr;
- XTableChartsSupplier oSupp = (XTableChartsSupplier)UnoRuntime.queryInterface(
- XTableChartsSupplier.class, xSheet);
-
- XTableChart oChart = null;
-
- System.out.println("Insert Chart");
-
- XTableCharts oCharts = oSupp.getCharts();
- oCharts.addNewByName("Example", oRect, oAddr, true, true);
-
- // get the diagramm and Change some of the properties
-
- try {
- oChart = (XTableChart) (UnoRuntime.queryInterface(
- XTableChart.class, ((XNameAccess)UnoRuntime.queryInterface(
- XNameAccess.class, oCharts)).getByName("Example")));
- XEmbeddedObjectSupplier oEOS = (XEmbeddedObjectSupplier)
- UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, oChart);
- XInterface oInt = oEOS.getEmbeddedObject();
- XChartDocument xChart = (XChartDocument) UnoRuntime.queryInterface(
- XChartDocument.class,oInt);
- XDiagram oDiag = (XDiagram) xChart.getDiagram();
- System.out.println("Change Diagramm to 3D");
- XPropertySet oCPS = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, oDiag );
- oCPS.setPropertyValue("Dim3D", new Boolean(true));
- System.out.println("Change the title");
- Thread.sleep(200);
- XPropertySet oTPS = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xChart.getTitle() );
- oTPS.setPropertyValue("String","The new title");
- //oDiag.Dim3D();
- } catch (Exception e){
- System.err.println("Changin Properties failed "+e);
- e.printStackTrace(System.err);
- }
-
- System.out.println("done");
- System.exit(0);
- }
-
- public static XSpreadsheetDocument openCalc(XComponentContext xContext)
- {
- //define variables
- XMultiComponentFactory xMCF = null;
- XComponentLoader xCLoader;
- XSpreadsheetDocument xSpreadSheetDoc = null;
- XComponent xComp = null;
-
- try {
- // get the servie manager rom the office
- xMCF = xContext.getServiceManager();
-
- // create a new instance of the the desktop
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext );
-
- // query the desktop object for the XComponentLoader
- xCLoader = ( XComponentLoader ) UnoRuntime.queryInterface(
- XComponentLoader.class, oDesktop );
-
- PropertyValue [] szEmptyArgs = new PropertyValue [0];
- String strDoc = "private:factory/scalc";
-
- xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, szEmptyArgs );
- xSpreadSheetDoc = (XSpreadsheetDocument) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, xComp);
-
- } catch(Exception e){
- System.err.println(" Exception " + e);
- e.printStackTrace(System.err);
- }
-
- return xSpreadSheetDoc;
- }
-
-
- public static void insertIntoCell(int CellX, int CellY, String theValue,
- XSpreadsheet TT1, String flag)
- {
- XCell xCell = null;
-
- try {
- xCell = TT1.getCellByPosition(CellX, CellY);
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.err.println("Could not get Cell");
- ex.printStackTrace(System.err);
- }
-
- if (flag.equals("V")) {
- xCell.setValue((new Float(theValue)).floatValue());
- } else {
- xCell.setFormula(theValue);
- }
-
- }
-
- public static void chgbColor( int x1, int y1, int x2, int y2,
- String template, XSpreadsheet TT )
- {
- XCellRange xCR = null;
- try {
- xCR = TT.getCellRangeByPosition(x1,y1,x2,y2);
- } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
- System.err.println("Could not get CellRange");
- ex.printStackTrace(System.err);
- }
-
- XPropertySet xCPS = (XPropertySet)UnoRuntime.queryInterface(
- XPropertySet.class, xCR );
-
- try {
- xCPS.setPropertyValue("CellStyle", template);
- } catch (Exception e) {
- System.err.println("Can't change colors chgbColor" + e);
- e.printStackTrace(System.err);
- }
- }
-
-}
diff --git a/odk/examples/java/Spreadsheet/XCalcAddins.idl b/odk/examples/java/Spreadsheet/XCalcAddins.idl
deleted file mode 100644
index 403c1f13..00000000
--- a/odk/examples/java/Spreadsheet/XCalcAddins.idl
+++ /dev/null
@@ -1,100 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-#ifndef INCLUDED_ORG_OPENOFFICE_SHEET_ADDIN_XCALCADDIN_IDL
-#define INCLUDED_ORG_OPENOFFICE_SHEET_ADDIN_XCALCADDIN_IDL
-
-#include <com/sun/star/beans/XPropertySet.idl>
-#include <com/sun/star/sheet/AddIn.idl>
-
-
-module org {
- module openoffice {
- module sheet {
- module addin {
- /** Interface with your additional methods.
-
- You may declare several methods. Each method may have
- any number of arguments after xOptions.
- Furthermore, you could replace the name of the service and
- the interface, but only if you want to replace this name in all
- your project files. This example will work with tNeccessaryhe default
- names.
- Interface names should start with an X prefix.
- */
- interface XCalcAddins
- {
- /** Declare your methods:
- This is where you could add the declarations of your methods.
- If you want to learn more about
- the IDL syntax including the base types, you could
- visit the following web page:
- http://www.openoffice.org/project/udk/common/man/idl_syntax.html .
- */
- long getMyFirstValue(
- /** Parameters:
- You could insert further arguments after the
- parameter xOptions.
- */
- [in] com::sun::star::beans::XPropertySet xOptions
- );
-
- long getMySecondValue(
- /** Parameters:
- You could insert further arguments after the
- parameter xOptions.
- */
- [in] com::sun::star::beans::XPropertySet xOptions,
- [in] long intDummy
- );
- };
-
- service CalcAddins
- {
- /** Exported interfaces:
- This is where you put all interfaces that this service exports. The service
- supports its main interface only.
- */
- interface XCalcAddins;
-
- /** Necessary base service.
- All add-ins must implement this service
- */
- service com::sun::star::sheet::AddIn;
- };
- };
- };
- };
-};
-
-#endif
diff --git a/odk/examples/java/Storage/Makefile b/odk/examples/java/Storage/Makefile
deleted file mode 100644
index 663f22df..00000000
--- a/odk/examples/java/Storage/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# Builds the Java Storage test example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMPONENT_NAME=JavaStorageTestExample
-OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME)
-
-JAVAFILES = \
- StorageFunctionality.java \
- TestHelper.java \
- StorageTest.java \
- Test01.java \
- Test02.java \
- Test03.java \
- Test04.java \
- Test05.java \
- Test06.java \
- Test07.java \
- Test08.java \
- Test09.java
-
-CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_COMP_CLASS))
-
-
-# Targets
-.PHONY: ALL
-ALL : \
- JavaStorageTestExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(CLASSFILES) : $(JAVAFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
-
-JavaStorageTestExample : $(CLASSFILES)
- @echo --------------------------------------------------------------------------------
- @echo Please use following command to execute the example!
- @echo ------
- @echo $(MAKE) StorageFunctionality.run
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_COMP_CLASS)/%.class
- $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-
diff --git a/odk/examples/java/Storage/StorageFunctionality.java b/odk/examples/java/Storage/StorageFunctionality.java
deleted file mode 100644
index 01708044..00000000
--- a/odk/examples/java/Storage/StorageFunctionality.java
+++ /dev/null
@@ -1,147 +0,0 @@
-import com.sun.star.comp.servicemanager.ServiceManager;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.connection.XConnector;
-import com.sun.star.connection.XConnection;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
-import com.sun.star.uno.XComponentContext;
-
-import com.sun.star.container.*;
-import com.sun.star.beans.*;
-import com.sun.star.lang.*;
-
-import storagetesting.*;
-
-public class StorageFunctionality {
-
- public static void main( String args[] )
- {
- // connect to the office
- String sConnectionString = "uno:socket,host=localhost,port=8100;urp;StarOffice.NamingService";
-
- // It is possible to use a different connection string, passed as argument
- if ( args.length == 1 ) {
- sConnectionString = args[0];
- }
-
- XMultiServiceFactory xMSF = null;
-
- // create connection(s) and get multiservicefactory
- try {
- xMSF = connect( sConnectionString );
-
- if ( xMSF == null )
- {
- System.out.println( "Error: Couldn't get MSF!" );
- return;
- }
- } catch( Exception e ) {
- System.out.println( "Error: Couldn't get MSF, exception: " + e );
- return;
- }
-
- XSingleServiceFactory xStorageFactory = null;
- try
- {
- Object oStorageFactory = xMSF.createInstance( "com.sun.star.embed.StorageFactory" );
- xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface( XSingleServiceFactory.class,
- oStorageFactory );
-
- if ( xStorageFactory == null )
- {
- System.out.println( "Error: Can not get storage factory!" );
- return;
- }
- }
- catch ( Exception e )
- {
- System.out.println( "Error: Can't get storage factory, exception: " + e + "!" );
- return;
- }
-
- boolean bTestsPassed = true;
-
- final int nNumTests = 9;
- StorageTest pTests[] = new StorageTest[nNumTests];
- pTests[0] = (StorageTest) new Test01( xMSF, xStorageFactory );
- pTests[1] = (StorageTest) new Test02( xMSF, xStorageFactory );
- pTests[2] = (StorageTest) new Test03( xMSF, xStorageFactory );
- pTests[3] = (StorageTest) new Test04( xMSF, xStorageFactory );
- pTests[4] = (StorageTest) new Test05( xMSF, xStorageFactory );
- pTests[5] = (StorageTest) new Test06( xMSF, xStorageFactory );
- pTests[6] = (StorageTest) new Test07( xMSF, xStorageFactory );
- pTests[7] = (StorageTest) new Test08( xMSF, xStorageFactory );
- pTests[8] = (StorageTest) new Test09( xMSF, xStorageFactory );
-
- System.out.println( "\nstart testing\n" );
-
- for ( int nInd = 0; nInd < nNumTests; nInd++ )
- {
- String sTestName = "Test" + ( ( nInd < 9 ) ? "0" : "" ) + ( nInd + 1 );
-
- System.out.println( "======= Storage test " + sTestName + " started!" );
- if ( pTests[nInd].test() )
- System.out.println( "======= Storage test " + sTestName + " passed!" );
- else
- {
- System.out.println( "======= Storage test " + sTestName + " failed!" );
- bTestsPassed = false;
- }
- }
-
- if ( bTestsPassed )
- System.out.println( "\ntesting passed" );
- else
- System.out.println( "\ntesting failed" );
-
- System.out.println( "done" );
-
- System.exit( 0 );
- }
-
-
- public static XMultiServiceFactory connect( String sConnectStr )
- throws com.sun.star.uno.Exception,
- com.sun.star.uno.RuntimeException,
- Exception
- {
- // Get component context
- XComponentContext xComponentContext =
- com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(
- null );
-
- // initial serviceManager
- XMultiComponentFactory xLocalServiceManager =
- xComponentContext.getServiceManager();
-
- // create a connector, so that it can contact the office
- Object oUrlResolver = xLocalServiceManager.createInstanceWithContext(
- "com.sun.star.bridge.UnoUrlResolver", xComponentContext );
- XUnoUrlResolver xUrlResolver = (XUnoUrlResolver)UnoRuntime.queryInterface(
- XUnoUrlResolver.class, oUrlResolver );
-
- Object oInitialObject = xUrlResolver.resolve( sConnectStr );
- XNamingService xName = (XNamingService)UnoRuntime.queryInterface(
- XNamingService.class, oInitialObject );
-
- XMultiServiceFactory xMSF = null;
- if( xName != null ) {
- System.err.println( "got the remote naming service !" );
- Object oMSF = xName.getRegisteredObject("StarOffice.ServiceManager" );
-
- xMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface( XMultiServiceFactory.class, oMSF );
- }
- else
- System.out.println( "Error: Can't get XNamingService interface from url resolver!" );
-
- return xMSF;
- }
-
-}
-
diff --git a/odk/examples/java/Storage/StorageTest.java b/odk/examples/java/Storage/StorageTest.java
deleted file mode 100644
index 3d748d04..00000000
--- a/odk/examples/java/Storage/StorageTest.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package storagetesting;
-
-public interface StorageTest
-{
- boolean test();
-}
-
diff --git a/odk/examples/java/Storage/Test01.java b/odk/examples/java/Storage/Test01.java
deleted file mode 100644
index 7c9de41c..00000000
--- a/odk/examples/java/Storage/Test01.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test01 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test01( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test01: " );
- }
-
- public boolean test()
- {
- try
- {
- String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
- {
- m_aTestHelper.Error( "No valid temporary file was created!" );
- return false;
- }
-
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- // open a new substorage
- XStorage xTempSubStorage = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage, "SubStream1", "MediaType1", true, pBytes1 ) )
- return false;
-
- byte pBytes2[] = { 2, 2, 2, 2, 2 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage, "SubStream2", "MediaType2", false, pBytes2 ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempStorage,
- "MediaType3",
- true,
- ElementModes.ELEMENT_READWRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage,
- "MediaType4",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // create temporary storage based on a previously created temporary file
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
- if ( xTempFileStorage == null )
- {
- m_aTestHelper.Error( "Can't create storage based on temporary file!" );
- return false;
- }
-
- // copy xTempStorage to xTempFileStorage
- // xTempFileStorage will be automatically commited
- if ( !m_aTestHelper.copyStorage( xTempStorage, xTempFileStorage ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xTempStorage ) || !m_aTestHelper.disposeStorage( xTempFileStorage ) )
- return false;
-
- // ================================================
- // now check all the written and copied information
- // ================================================
-
- // the temporary file must not be locked any more after storage disposing
- pArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
- Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
- if ( xResultStorage == null )
- {
- m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultStorage, "MediaType3", true, ElementModes.ELEMENT_READWRITE ) )
- return false;
-
- // open existing substorage
- XStorage xResultSubStorage = m_aTestHelper.openSubStorage( xResultStorage,
- "SubStorage1",
- ElementModes.ELEMENT_READ );
- if ( xResultSubStorage == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultSubStorage, "MediaType4", false, ElementModes.ELEMENT_READ ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResultSubStorage, "SubStream1", "MediaType1", pBytes1 ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResultSubStorage, "SubStream2", "MediaType2", pBytes2 ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xResultStorage ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test02.java b/odk/examples/java/Storage/Test02.java
deleted file mode 100644
index b258f10c..00000000
--- a/odk/examples/java/Storage/Test02.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.io.XStream;
-import com.sun.star.io.XInputStream;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test02 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test02( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test02: " );
- }
-
- public boolean test()
- {
- try
- {
- XStream xTempFileStream = m_aTestHelper.CreateTempFileStream( m_xMSF );
- if ( xTempFileStream == null )
- return false;
-
- // create storage based on the temporary stream
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) xTempFileStream;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- // open a new substorage
- XStorage xTempSubStorage = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage, "SubStream1", "MediaType1", true, pBytes1 ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempStorage,
- "MediaType2",
- true,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage,
- "MediaType3",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // commit substorage first
- if ( !m_aTestHelper.commitStorage( xTempSubStorage ) )
- return false;
-
- // commit the root storage so the contents must be stored now
- if ( !m_aTestHelper.commitStorage( xTempStorage ) )
- return false;
-
- // dispose used storage to free resources
- // the substorage dispose will be triggered by this call
- if ( !m_aTestHelper.disposeStorage( xTempStorage ) )
- return false;
-
-
- // ================================================
- // now check all the written information
- // ================================================
-
- // close the output part of the temporary stream
- // the output part must present since we already wrote to the stream
- if ( !m_aTestHelper.closeOutput( xTempFileStream ) )
- return false;
-
- XInputStream xTempInStream = m_aTestHelper.getInputStream( xTempFileStream );
- if ( xTempInStream == null )
- return false;
-
-
- // open input stream
- // since no mode is provided the result storage must be opened readonly
- Object pOneArg[] = new Object[1];
- pOneArg[0] = (Object) xTempInStream;
-
- Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pOneArg );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
- if ( xResultStorage == null )
- {
- m_aTestHelper.Error( "Can't open storage based on input stream!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultStorage, "MediaType2", true, ElementModes.ELEMENT_READ ) )
- return false;
-
- // open existing substorage
- XStorage xResultSubStorage = m_aTestHelper.openSubStorage( xResultStorage,
- "SubStorage1",
- ElementModes.ELEMENT_READ );
- if ( xResultSubStorage == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultSubStorage, "MediaType3", false, ElementModes.ELEMENT_READ ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResultSubStorage, "SubStream1", "MediaType1", pBytes1 ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test03.java b/odk/examples/java/Storage/Test03.java
deleted file mode 100644
index f1d5d415..00000000
--- a/odk/examples/java/Storage/Test03.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.embed.*;
-import com.sun.star.container.XNameAccess;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test03 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test03( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test03: " );
- }
-
- public boolean test()
- {
- try
- {
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- // open a new substorage
- XStorage xTempSubStorage = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempStorage, "SubStream1", "MediaType1", true, pBytes1 ) )
- return false;
-
- byte pBytes2[] = { 2, 2, 2, 2, 2 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage, "SubStream2", "MediaType2", false, pBytes2 ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage,
- "MediaType3",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- if ( !m_aTestHelper.commitStorage( xTempSubStorage ) )
- return false;
-
- if ( !m_aTestHelper.disposeStorage( xTempSubStorage ) )
- return false;
-
- // ================================================
- // check storage hyerarchy tree
- // ================================================
-
- // check that isStorageElement() and isStreamElement reacts to nonexisting object correctly
- try {
- xTempStorage.isStorageElement( "does not exist" );
- m_aTestHelper.Error( "Nonexisting element doesn't detected by isStorageElement() call!" );
- return false;
- }
- catch( com.sun.star.container.NoSuchElementException ne )
- {
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception is thrown by isStorageElement() call: " + e );
- return false;
- }
-
- try {
- xTempStorage.isStreamElement( "does not exist" );
- m_aTestHelper.Error( "Nonexisting element doesn't detected by isStreamElement() call!" );
- return false;
- }
- catch( com.sun.star.container.NoSuchElementException ne )
- {
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception is thrown by isStreamElement() call: " + e );
- return false;
- }
-
- XNameAccess xRootNameAccess = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, xTempStorage );
- if ( xRootNameAccess == null )
- {
- m_aTestHelper.Error( "Root storage doesn't support XNameAccess!" );
- return false;
- }
-
- try {
- if ( !xTempStorage.isStorageElement( "SubStorage1" ) || xTempStorage.isStreamElement( "SubStorage1" ) )
- {
- m_aTestHelper.Error( "Child 'SubStorage1' can not be detected as storage!" );
- return false;
- }
-
- if ( xTempStorage.isStorageElement( "SubStream1" ) || !xTempStorage.isStreamElement( "SubStream1" ) )
- {
- m_aTestHelper.Error( "Child 'SubStream1' can not be detected as stream!" );
- return false;
- }
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Child's type can not be detected, exception: " + e );
- return false;
- }
-
-
- // check that root storage contents are represented correctly
- String sRootCont[] = xRootNameAccess.getElementNames();
-
- if ( sRootCont.length != 2 )
- {
- m_aTestHelper.Error( "Root storage contains wrong amount of children!" );
- return false;
- }
-
- if ( !( sRootCont[0].equals( "SubStorage1" ) && sRootCont[1].equals( "SubStream1" )
- || sRootCont[0].equals( "SubStream1" ) && sRootCont[1].equals( "SubStorage1" ) )
- || !( xRootNameAccess.hasByName( "SubStream1" ) && xRootNameAccess.hasByName( "SubStorage1" ) ) )
- {
- m_aTestHelper.Error( "Root storage contains wrong list of children!" );
- return false;
- }
-
- // get storage through XNameAccess
- XStorage xResultSubStorage = getStorageFromNameAccess( xRootNameAccess, "SubStorage1" );
- if ( xResultSubStorage == null )
- return false;
-
- if ( !m_aTestHelper.checkStorageProperties( xResultSubStorage, "MediaType3", false, ElementModes.ELEMENT_READ ) )
- return false;
-
- XNameAccess xChildAccess = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, xResultSubStorage );
- if ( xChildAccess == null )
- {
- m_aTestHelper.Error( "Child storage doesn't support XNameAccess!" );
- return false;
- }
-
- if ( !xChildAccess.hasByName( "SubStream2" )
- || !xResultSubStorage.isStreamElement( "SubStream2" )
- || xResultSubStorage.isStorageElement( "SubStream2" ) )
- {
- m_aTestHelper.Error( "'SubStream2' can not be detected as child stream element of 'SubStorage1'!" );
- return false;
- }
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
- public XStorage getStorageFromNameAccess( XNameAccess xAccess, String sName )
- {
- try
- {
- Object oStorage = xAccess.getByName( sName );
- XStorage xResult = (XStorage) UnoRuntime.queryInterface( XStorage.class, oStorage );
-
- if ( xResult != null )
- return xResult;
- else
- m_aTestHelper.Error( "Can't retrieve substorage '" + sName + "' through XNameAccess!" );
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Can't retrieve substorage '" + sName + "' through XNameAccess, exception: " + e );
- }
-
- return null;
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test04.java b/odk/examples/java/Storage/Test04.java
deleted file mode 100644
index 943fcfff..00000000
--- a/odk/examples/java/Storage/Test04.java
+++ /dev/null
@@ -1,273 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.DisposedException;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.container.XNameAccess;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test04 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test04( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test04: " );
- }
-
- public boolean test()
- {
- try
- {
- String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
- {
- m_aTestHelper.Error( "No valid temporary file was created!" );
- return false;
- }
-
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- // open substorages and create streams there
-
- // first substorage of the root storage
- XStorage xTempSubStorage1 = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage1 == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage1, "SubStream1", "MediaType1", true, pBytes1 ) )
- return false;
-
- // second substorage of the root storage
- XStorage xTempSubStorage2 = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage2",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage2 == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- byte pBytes2[] = { 2, 2, 2, 2, 2 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xTempSubStorage2, "SubStream2", "MediaType2", false, pBytes2 ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempStorage,
- "MediaType3",
- true,
- ElementModes.ELEMENT_READWRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage1,
- "MediaType4",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage2,
- "MediaType5",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // create temporary storage based on a previously created temporary file
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
- if ( xTempFileStorage == null )
- {
- m_aTestHelper.Error( "Can't create storage based on temporary file!" );
- return false;
- }
-
- if ( !m_aTestHelper.copyElementTo( xTempStorage, "SubStorage1", xTempFileStorage ) )
- return false;
-
- // if storage is not commited before disposing all the changes will be lost
- if ( !m_aTestHelper.commitStorage( xTempSubStorage2 ) )
- return false;
-
- // a storage must be disposed before moving/removing otherwise the access will be denied
- if ( !m_aTestHelper.disposeStorage( xTempSubStorage2 ) )
- return false;
-
- if ( !m_aTestHelper.moveElementTo( xTempStorage, "SubStorage2", xTempFileStorage ) )
- return false;
-
- // SubStorage2 must be removed and disposed now
- try
- {
- xTempSubStorage2.isStreamElement( "SubStream2" );
- m_aTestHelper.Error( "SubStorage2 must be disposed already!" );
- return false;
- }
- catch( com.sun.star.lang.DisposedException de )
- {
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception in case of disposed storage, exception: " + e );
- return false;
- }
-
- if ( !m_aTestHelper.copyElementTo( xTempSubStorage1, "SubStream1", xTempFileStorage ) )
- return false;
-
- if ( !m_aTestHelper.renameElement( xTempFileStorage, "SubStream1", "SubStream1_copy" ) )
- return false;
-
- if ( !m_aTestHelper.moveElementTo( xTempSubStorage1, "SubStream1", xTempFileStorage ) )
- return false;
-
- if ( !m_aTestHelper.commitStorage( xTempFileStorage ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xTempStorage ) || !m_aTestHelper.disposeStorage( xTempFileStorage ) )
- return false;
-
- // ================================================
- // now check all the written and copied information
- // ================================================
-
- // the temporary file must not be locked any more after storage disposing
- pArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
- Object oResStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResStorage );
- if ( xResStorage == null )
- {
- m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
- return false;
- }
-
- // open and check SubStorage1
- XStorage xResSubStorage1 = m_aTestHelper.openSubStorage( xResStorage,
- "SubStorage1",
- ElementModes.ELEMENT_READ );
- if ( xResSubStorage1 == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResSubStorage1, "MediaType4", false, ElementModes.ELEMENT_READ ) )
- return false;
-
-
- // open and check SubStorage2
- XStorage xResSubStorage2 = m_aTestHelper.openSubStorage( xResStorage,
- "SubStorage2",
- ElementModes.ELEMENT_READ );
- if ( xResSubStorage2 == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResSubStorage2, "MediaType5", false, ElementModes.ELEMENT_READ ) )
- return false;
-
-
- // check all the result streams
-
- if ( !m_aTestHelper.checkStream( xResStorage, "SubStream1", "MediaType1", pBytes1 ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResStorage, "SubStream1_copy", "MediaType1", pBytes1 ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResSubStorage1, "SubStream1", "MediaType1", pBytes1 ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResSubStorage2, "SubStream2", "MediaType2", pBytes2 ) )
- return false;
-
- // the storage must be disposed before removing
- if ( !m_aTestHelper.disposeStorage( xResSubStorage2 ) )
- return false;
-
- // remove element and check that it was removed completelly
- if ( !m_aTestHelper.removeElement( xResStorage, "SubStorage2" ) )
- return false;
-
- try
- {
- XNameAccess xResAccess = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class, xResStorage );
- if ( xResAccess.hasByName( "SubStorage2" ) )
- m_aTestHelper.Error( "SubStorage2 must be removed already!" );
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Can't get access to root storage, exception: " + e );
- return false;
- }
-
- try
- {
- xResSubStorage2.isStreamElement( "SubStream2" );
-
- m_aTestHelper.Error( "SubStorage2 must be disposed already!" );
- return false;
- }
- catch( com.sun.star.lang.DisposedException de )
- {
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception in case of disposed storage, exception: " + e );
- return false;
- }
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xResStorage ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test05.java b/odk/examples/java/Storage/Test05.java
deleted file mode 100644
index 263e2d25..00000000
--- a/odk/examples/java/Storage/Test05.java
+++ /dev/null
@@ -1,268 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.io.XStream;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test05 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test05( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test05: " );
- }
-
- public boolean test()
- {
- try
- {
- String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
- {
- m_aTestHelper.Error( "No valid temporary file was created!" );
- return false;
- }
-
- // create temporary storage based on a previously created temporary file
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
- if ( xTempFileStorage == null )
- {
- m_aTestHelper.Error( "Can't create storage based on temporary file!" );
- return false;
- }
-
- // open a new substorage
- XStorage xTempSubStorage = m_aTestHelper.openSubStorage( xTempFileStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- // open a new substorage
- XStorage xSubSubStorage = m_aTestHelper.openSubStorage( xTempSubStorage,
- "SubSubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xSubSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
-
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xSubSubStorage, "SubStream1", "MediaType1", true, pBytes1 ) )
- return false;
-
- byte pBytes2[] = { 2, 2, 2, 2, 2 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToSubstream( xSubSubStorage, "SubStream2", "MediaType2", false, pBytes2 ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempFileStorage,
- "MediaType3",
- true,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage,
- "MediaType4",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xSubSubStorage,
- "MediaType5",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
-
- // commit all the storages
- if ( !m_aTestHelper.commitStorage( xSubSubStorage ) )
- return false;
-
- if ( !m_aTestHelper.commitStorage( xTempSubStorage ) )
- return false;
-
- if ( !m_aTestHelper.commitStorage( xTempFileStorage ) )
- return false;
-
- // try to open an opened substorage, open call must fail
- if ( !m_aTestHelper.cantOpenStorage( xTempFileStorage, "SubStorage1" ) )
- return false;
-
-
- // reopen created streams
- XStream xSubStream1 = m_aTestHelper.OpenStream( xSubSubStorage,
- "SubStream1",
- ElementModes.ELEMENT_READWRITE | ElementModes.ELEMENT_NOCREATE );
- XStream xSubStream2 = m_aTestHelper.OpenStream( xSubSubStorage,
- "SubStream2",
- ElementModes.ELEMENT_READ | ElementModes.ELEMENT_NOCREATE );
- if ( xSubStream1 == null || xSubStream2 == null )
- return false;
-
- // it should be possible to have more then one copy of stream for reading
- XStream xSubStream2clone = m_aTestHelper.OpenStream( xSubSubStorage,
- "SubStream2",
- ElementModes.ELEMENT_READ | ElementModes.ELEMENT_NOCREATE );
- if ( xSubStream2 == null )
- return false;
-
-
- // so now the first stream can not be open neither for reading nor for writing
- if ( !m_aTestHelper.cantOpenStream( xSubSubStorage, "SubStream1", ElementModes.ELEMENT_WRITE )
- || !m_aTestHelper.cantOpenStream( xSubSubStorage, "SubStream1", ElementModes.ELEMENT_READ ) )
- return false;
-
- // the second stream can not be open for writing
- if ( !m_aTestHelper.cantOpenStream( xSubSubStorage, "SubStream2", ElementModes.ELEMENT_WRITE ) )
- return false;
-
-
- // dispose xTestSubStorage, all the subtree must be disposed
- if ( !m_aTestHelper.disposeStorage( xTempSubStorage ) )
- return false;
-
- // check that subtree was disposed correctly
- try
- {
- xSubSubStorage.isStreamElement( "SubStream1" );
- m_aTestHelper.Error( "Substorage was not disposed!" );
- return false;
- }
- catch ( com.sun.star.lang.DisposedException de )
- {}
- catch ( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception is thrown by disposed storage: " + e );
- return false;
- }
-
- try
- {
- xSubStream1.getInputStream();
- m_aTestHelper.Error( "Writeable substream was not disposed!" );
- return false;
- }
- catch ( com.sun.star.lang.DisposedException de )
- {}
- catch ( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception is thrown by disposed stream: " + e );
- return false;
- }
-
- try
- {
- xSubStream2.getInputStream();
- m_aTestHelper.Error( "Readonly substream was not disposed!" );
- return false;
- }
- catch ( com.sun.star.lang.DisposedException de )
- {}
- catch ( Exception e )
- {
- m_aTestHelper.Error( "Wrong exception is thrown by disposed stream: " + e );
- return false;
- }
-
-
- // dispose root storage
- if ( !m_aTestHelper.disposeStorage( xTempFileStorage ) )
- return false;
-
-
- // ================================================
- // now check all the written and copied information
- // ================================================
-
- pArgs[1] = new Integer( ElementModes.ELEMENT_READ );
- Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
- if ( xResultStorage == null )
- {
- m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultStorage, "MediaType3", true, ElementModes.ELEMENT_READ ) )
- return false;
-
- // open existing substorage
- XStorage xResSubStorage = m_aTestHelper.openSubStorage( xResultStorage,
- "SubStorage1",
- ElementModes.ELEMENT_READ );
- if ( xResSubStorage == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage 'SubSubStorage'!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResSubStorage, "MediaType4", false, ElementModes.ELEMENT_READ ) )
- return false;
-
- // open existing substorage
- XStorage xResSubSubStorage = m_aTestHelper.openSubStorage( xResSubStorage,
- "SubSubStorage1",
- ElementModes.ELEMENT_READ );
- if ( xResSubSubStorage == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage 'SubSubStorage'!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResSubSubStorage, "MediaType5", false, ElementModes.ELEMENT_READ ) )
- return false;
-
- // check substreams
- if ( !m_aTestHelper.checkStream( xResSubSubStorage, "SubStream1", "MediaType1", pBytes1 ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResSubSubStorage, "SubStream2", "MediaType2", pBytes2 ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xResultStorage ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test06.java b/odk/examples/java/Storage/Test06.java
deleted file mode 100644
index 7ee3a832..00000000
--- a/odk/examples/java/Storage/Test06.java
+++ /dev/null
@@ -1,278 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.lang.IllegalArgumentException;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.container.ElementExistException;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test06 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test06( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test06: " );
- }
-
- public boolean test()
- {
- try
- {
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- try
- {
- xTempStorage.copyToStorage( null );
- m_aTestHelper.Error( "The method must throw an exception because of illegal parameter!" );
- return false;
- }
- catch( com.sun.star.lang.IllegalArgumentException iae )
- {}
- catch( com.sun.star.uno.Exception ue )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion because of illegal parameter : " + e );
- return false;
- }
-
- // open new substorages
- XStorage xTempSubStorage1 = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- XStorage xTempSubStorage2 = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage2",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage1 == null || xTempSubStorage2 == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- // in case stream is open for reading it must exist
- try
- {
- xTempSubStorage1.openStreamElement( "NonExistingStream", ElementModes.ELEMENT_READ );
- m_aTestHelper.Error( "The method must throw an exception in case of try to open nonexistent stream for reading!" );
- return false;
- }
- catch( com.sun.star.uno.Exception ue )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of try to open nonexistent stream for reading : " + e );
- return false;
- }
-
- // in case a storage is open for reading it must exist
- try
- {
- xTempSubStorage1.openStreamElement( "NonExistingStorage", ElementModes.ELEMENT_READ );
- m_aTestHelper.Error( "The method must throw an exception in case of try to open nonexistent storage for reading!" );
- return false;
- }
- catch( com.sun.star.uno.Exception ue )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of try to open nonexistent storage for reading : " + e );
- return false;
- }
-
- // in case of removing nonexistent element an exception must be thrown
- try
- {
- xTempSubStorage1.removeElement( "NonExistingElement" );
- m_aTestHelper.Error( "An exception must be thrown in case of removing nonexistent element!" );
- return false;
- }
- catch( com.sun.star.container.NoSuchElementException ne )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of try to remove nonexistent element : " + e );
- return false;
- }
-
- // in case of renaming of nonexistent element an exception must be thrown
- try
- {
- xTempSubStorage1.renameElement( "NonExistingElement", "NewName" );
- m_aTestHelper.Error( "An exception must be thrown in case of renaming nonexistent element!" );
- return false;
- }
- catch( com.sun.star.container.NoSuchElementException ne )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of try to rename nonexistent element : " + e );
- return false;
- }
-
- // in case of renaming to a name of existent element an exception must be thrown
- try
- {
- xTempStorage.renameElement( "SubStorage1", "SubStorage2" );
- m_aTestHelper.Error( "An exception must be thrown in case of renaming to the name of existent element!" );
- return false;
- }
- catch( com.sun.star.container.ElementExistException ee )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of try to rename to the name of existent element : " + e );
- return false;
- }
-
- // in case of copying target storage must be provided
- try
- {
- xTempStorage.copyElementTo( "SubStorage1", null, "SubStorage1" );
- m_aTestHelper.Error( "An exception must be thrown in case empty reference is provided as target for copying!" );
- return false;
- }
- catch( com.sun.star.lang.IllegalArgumentException iae )
- {}
- catch( com.sun.star.uno.Exception ue )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case empty reference is provieded as target for copying : " + e );
- return false;
- }
-
- // in case of moving target storage must be provided
- try
- {
- xTempStorage.moveElementTo( "SubStorage1", null, "SubStorage1" );
- m_aTestHelper.Error( "An exception must be thrown in case empty reference is provided as target for moving!" );
- return false;
- }
- catch( com.sun.star.lang.IllegalArgumentException iae )
- {}
- catch( com.sun.star.uno.Exception ue )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case empty reference is provieded as target for moving : " + e );
- return false;
- }
-
-
- // prepare target for further testings
-
- // create new temporary storage based on arbitrary medium
- Object oTargetStorage = m_xStorageFactory.createInstance();
- XStorage xTargetStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTargetStorage );
- if ( xTargetStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- // open a new substorage
- XStorage xTargetSubStorage = m_aTestHelper.openSubStorage( xTargetStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTargetSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- // in case of copying of nonexistent element an exception must be thrown
- try
- {
- xTempStorage.copyElementTo( "Nonexistent element", xTargetStorage, "Target" );
- m_aTestHelper.Error( "An exception must be thrown in case of copying of nonexisting element!" );
- return false;
- }
- catch( com.sun.star.container.NoSuchElementException ne )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of copying of nonexistent element: " + e );
- return false;
- }
-
- // in case of moving of nonexistent element an exception must be thrown
- try
- {
- xTempStorage.moveElementTo( "Nonexistent element", xTargetStorage, "Target" );
- m_aTestHelper.Error( "An exception must be thrown in case of moving of nonexisting element!" );
- return false;
- }
- catch( com.sun.star.container.NoSuchElementException ne )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case of moving of nonexistent element: " + e );
- return false;
- }
-
- // in case target for copying already exists an exception must be thrown
- try
- {
- xTempStorage.copyElementTo( "SubStorage1", xTargetStorage, "SubStorage1" );
- m_aTestHelper.Error( "An exception must be thrown in case target for copying already exists!" );
- return false;
- }
- catch( com.sun.star.container.ElementExistException ee )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case target for copying already exists: " + e );
- return false;
- }
-
- // in case target for moving already exists an exception must be thrown
- try
- {
- xTempStorage.moveElementTo( "SubStorage1", xTargetStorage, "SubStorage1" );
- m_aTestHelper.Error( "An exception must be thrown in case target for moving already exists!" );
- return false;
- }
- catch( com.sun.star.container.ElementExistException ee )
- {}
- catch( Exception e )
- {
- m_aTestHelper.Error( "Unexpected excepion in case target for moving already exists: " + e );
- return false;
- }
-
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test07.java b/odk/examples/java/Storage/Test07.java
deleted file mode 100644
index 25e3fedf..00000000
--- a/odk/examples/java/Storage/Test07.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test07 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test07( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test07: " );
- }
-
- public boolean test()
- {
- try
- {
- String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
- {
- m_aTestHelper.Error( "No valid temporary file was created!" );
- return false;
- }
-
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
- byte pPass1[] = { 1, 2, 3, 4, 5 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToEncrSubstream( xTempStorage, "SubStream1", "MediaType1", true, pBytes1, pPass1 ) )
- return false;
-
- byte pBytes2[] = { 2, 2, 2, 2, 2 };
- byte pPass2[] = { 5, 4, 3, 2, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- if ( !m_aTestHelper.WriteBytesToEncrSubstream( xTempStorage, "SubStream2", "MediaType2", false, pBytes2, pPass2 ) )
- return false;
-
- // create temporary storage based on a previously created temporary file
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
- if ( xTempFileStorage == null )
- {
- m_aTestHelper.Error( "Can't create storage based on temporary file!" );
- return false;
- }
-
- // copy xTempStorage to xTempFileStorage
- // xTempFileStorage will be automatically commited
- if ( !m_aTestHelper.copyStorage( xTempStorage, xTempFileStorage ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xTempStorage ) || !m_aTestHelper.disposeStorage( xTempFileStorage ) )
- return false;
-
- // ================================================
- // now check all the written and copied information
- // ================================================
-
- // the temporary file must not be locked any more after storage disposing
- pArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
- Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
- if ( xResultStorage == null )
- {
- m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
- return false;
- }
-
- Object o2CopyStorage = m_xStorageFactory.createInstance();
- XStorage x2CopyStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, o2CopyStorage );
- if ( x2CopyStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- if ( !m_aTestHelper.copyStorage( xResultStorage, x2CopyStorage ) )
- return false;
-
- if ( !m_aTestHelper.checkEncrStream( xResultStorage, "SubStream1", "MediaType1", pBytes1, pPass1 ) )
- return false;
-
- if ( !m_aTestHelper.checkEncrStream( xResultStorage, "SubStream2", "MediaType2", pBytes2, pPass2 ) )
- return false;
-
- if ( !m_aTestHelper.checkEncrStream( x2CopyStorage, "SubStream1", "MediaType1", pBytes1, pPass1 ) )
- return false;
-
- if ( !m_aTestHelper.checkEncrStream( x2CopyStorage, "SubStream2", "MediaType2", pBytes2, pPass2 ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xResultStorage ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-
-}
-
diff --git a/odk/examples/java/Storage/Test08.java b/odk/examples/java/Storage/Test08.java
deleted file mode 100644
index 147f5726..00000000
--- a/odk/examples/java/Storage/Test08.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test08 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test08( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test08: " );
- }
-
- public boolean test()
- {
- try
- {
-
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- // set the global password for the root storage
- XEncryptionProtectedSource xTempStorageEncryption =
- (XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xTempStorage );
-
- if ( xTempStorageEncryption == null )
- {
- m_aTestHelper.Message( "Optional interface XEncryptionProtectedSource is not implemented, feature can not be tested!" );
- return true;
- }
-
- byte pPass1[] = { 1, 2, 3 };
- byte pPass2[] = { 3, 2, 1 };
-
- try {
- xTempStorageEncryption.setEncryptionKey( pPass1 );
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Can't set a common encryption key for the storage, exception:" + e );
- return false;
- }
-
- // open a new substorage
- XStorage xTempSubStorage = m_aTestHelper.openSubStorage( xTempStorage,
- "SubStorage1",
- ElementModes.ELEMENT_WRITE );
- if ( xTempSubStorage == null )
- {
- m_aTestHelper.Error( "Can't create substorage!" );
- return false;
- }
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- // the stream will be encrypted with common password
- byte pBytes1[] = { 1, 1, 1, 1, 1 };
- if ( !m_aTestHelper.WBToSubstrOfEncr( xTempSubStorage, "SubStream1", "MediaType1", true, pBytes1, true ) )
- return false;
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- // the stream will not be encrypted
- byte pBytes2[] = { 2, 2, 2, 2, 2 };
- if ( !m_aTestHelper.WBToSubstrOfEncr( xTempSubStorage, "SubStream2", "MediaType2", false, pBytes2, false ) )
- return false;
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- // the stream will be compressed with own password
- byte pBytes3[] = { 3, 3, 3, 3, 3 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- // the stream will not be encrypted
- if ( !m_aTestHelper.WriteBytesToEncrSubstream( xTempSubStorage, "SubStream3", "MediaType3", false, pBytes3, pPass2 ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempStorage,
- "MediaType4",
- true,
- ElementModes.ELEMENT_READWRITE ) )
- return false;
-
- // set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly
- if ( !m_aTestHelper.setStorageTypeAndCheckProps( xTempSubStorage,
- "MediaType5",
- false,
- ElementModes.ELEMENT_WRITE ) )
- return false;
-
- // create temporary file
- String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
- {
- m_aTestHelper.Error( "No valid temporary file was created!" );
- return false;
- }
-
- // create temporary storage based on a previously created temporary file
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
- if ( xTempFileStorage == null )
- {
- m_aTestHelper.Error( "Can't create storage based on temporary file!" );
- return false;
- }
-
- // copy xTempStorage to xTempFileStorage
- // xTempFileStorage will be automatically commited
- if ( !m_aTestHelper.copyStorage( xTempStorage, xTempFileStorage ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xTempStorage ) || !m_aTestHelper.disposeStorage( xTempFileStorage ) )
- return false;
-
- // ================================================
- // now check all the written and copied information
- // ================================================
-
- // the temporary file must not be locked any more after storage disposing
- pArgs[1] = new Integer( ElementModes.ELEMENT_READ );
- Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
- if ( xResultStorage == null )
- {
- m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultStorage, "MediaType4", true, ElementModes.ELEMENT_READ ) )
- return false;
-
- // open existing substorage
- XStorage xResultSubStorage = m_aTestHelper.openSubStorage( xResultStorage,
- "SubStorage1",
- ElementModes.ELEMENT_READ );
- if ( xResultSubStorage == null )
- {
- m_aTestHelper.Error( "Can't open existing substorage!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkStorageProperties( xResultSubStorage, "MediaType5", false, ElementModes.ELEMENT_READ ) )
- return false;
-
- // set the global password for the root storage
- XEncryptionProtectedSource xResultStorageEncryption =
- (XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xResultStorage );
-
- if ( xResultStorageEncryption == null )
- {
- m_aTestHelper.Error( "XEncryptionProtectedSource was successfully used already, so it must be supported!" );
- return false;
- }
-
- try {
- xResultStorageEncryption.setEncryptionKey( pPass2 );
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Can't set a common encryption key for the storage, exception:" + e );
- return false;
- }
-
- if ( !m_aTestHelper.checkEncrStream( xResultSubStorage, "SubStream1", "MediaType1", pBytes1, pPass1 ) )
- return false;
-
- if ( !m_aTestHelper.checkStream( xResultSubStorage, "SubStream2", "MediaType2", pBytes2 ) )
- return false;
-
- // the common root storage password should allow to open this stream
- if ( !m_aTestHelper.checkStream( xResultSubStorage, "SubStream3", "MediaType3", pBytes3 ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xResultStorage ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-}
-
diff --git a/odk/examples/java/Storage/Test09.java b/odk/examples/java/Storage/Test09.java
deleted file mode 100644
index f4ae8ee8..00000000
--- a/odk/examples/java/Storage/Test09.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.XInterface;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-
-import com.sun.star.bridge.XUnoUrlResolver;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-import com.sun.star.embed.*;
-
-import storagetesting.TestHelper;
-import storagetesting.StorageTest;
-
-public class Test09 implements StorageTest {
-
- XMultiServiceFactory m_xMSF;
- XSingleServiceFactory m_xStorageFactory;
- TestHelper m_aTestHelper;
-
- public Test09( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory )
- {
- m_xMSF = xMSF;
- m_xStorageFactory = xStorageFactory;
- m_aTestHelper = new TestHelper( "Test09: " );
- }
-
- public boolean test()
- {
- try
- {
-
- // create temporary storage based on arbitrary medium
- // after such a storage is closed it is lost
- Object oTempStorage = m_xStorageFactory.createInstance();
- XStorage xTempStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oTempStorage );
- if ( xTempStorage == null )
- {
- m_aTestHelper.Error( "Can't create temporary storage representation!" );
- return false;
- }
-
- byte pPass1[] = { 1, 2, 3 };
- byte pPass2[] = { 3, 2, 1 };
- byte pBytes[] = { 1, 1, 1, 1, 1 };
-
- // open a new substream, set "MediaType" and "Compressed" properties to it and write some bytes
- // the stream will not be encrypted
- if ( !m_aTestHelper.WriteBytesToEncrSubstream( xTempStorage, "SubStream1", "MediaType1", false, pBytes, pPass1 ) )
- return false;
-
- // create temporary file
- String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
- {
- m_aTestHelper.Error( "No valid temporary file was created!" );
- return false;
- }
-
- // create temporary storage based on a previously created temporary file
- Object pArgs[] = new Object[2];
- pArgs[0] = (Object) sTempFileURL;
- pArgs[1] = new Integer( ElementModes.ELEMENT_WRITE );
-
- Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xTempFileStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oTempFileStorage );
- if ( xTempFileStorage == null )
- {
- m_aTestHelper.Error( "Can't create storage based on temporary file!" );
- return false;
- }
-
- // copy xTempStorage to xTempFileStorage
- // xTempFileStorage will be automatically commited
- if ( !m_aTestHelper.copyStorage( xTempStorage, xTempFileStorage ) )
- return false;
-
- // change password of the substream of new storage based on file
- int nResult = m_aTestHelper.ChangeStreamPass( xTempFileStorage, "SubStream1", pPass1, pPass2 );
- if ( nResult == 0 )
- return false; // test failed
- else if ( nResult == -1 )
- return true; // tested optional feature is not supported
-
- if ( !m_aTestHelper.commitStorage( xTempFileStorage ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xTempStorage ) || !m_aTestHelper.disposeStorage( xTempFileStorage ) )
- return false;
-
- // ================================================
- // now check all the written and copied information
- // ================================================
-
- // the temporary file must not be locked any more after storage disposing
- pArgs[1] = new Integer( ElementModes.ELEMENT_READ );
- Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
- XStorage xResultStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oResultStorage );
- if ( xResultStorage == null )
- {
- m_aTestHelper.Error( "Can't reopen storage based on temporary file!" );
- return false;
- }
-
- if ( !m_aTestHelper.checkEncrStream( xResultStorage, "SubStream1", "MediaType1", pBytes, pPass2 ) )
- return false;
-
- // dispose used storages to free resources
- if ( !m_aTestHelper.disposeStorage( xResultStorage ) )
- return false;
-
- return true;
- }
- catch( Exception e )
- {
- m_aTestHelper.Error( "Exception: " + e );
- return false;
- }
- }
-}
-
diff --git a/odk/examples/java/Storage/TestHelper.java b/odk/examples/java/Storage/TestHelper.java
deleted file mode 100644
index 2868de48..00000000
--- a/odk/examples/java/Storage/TestHelper.java
+++ /dev/null
@@ -1,864 +0,0 @@
-package storagetesting;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.AnyConverter;
-
-import com.sun.star.lang.*;
-import com.sun.star.embed.*;
-import com.sun.star.packages.*;
-import com.sun.star.io.*;
-import com.sun.star.beans.*;
-
-public class TestHelper {
-
- String m_sTestPrefix;
-
- public TestHelper( String sTestPrefix )
- {
- m_sTestPrefix = sTestPrefix;
- }
-
- public boolean WriteBytesToStream( XStream xStream,
- String sStreamName,
- String sMediaType,
- boolean bCompressed,
- byte[] pBytes )
- {
- // get output stream of substream
- XOutputStream xOutput = xStream.getOutputStream();
- if ( xOutput == null )
- {
- Error( "Can't get XOutputStream implementation from substream '" + sStreamName + "'!" );
- return false;
- }
-
- // get XTrucate implementation from output stream
- XTruncate xTruncate = (XTruncate) UnoRuntime.queryInterface( XTruncate.class, xOutput );
- if ( xTruncate == null )
- {
- Error( "Can't get XTruncate implementation from substream '" + sStreamName + "'!" );
- return false;
- }
-
- // write requested byte sequence
- try
- {
- xTruncate.truncate();
- xOutput.writeBytes( pBytes );
- }
- catch( Exception e )
- {
- Error( "Can't write to stream '" + sStreamName + "', exception: " + e );
- return false;
- }
-
- // get access to the XPropertySet interface
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xStream );
- if ( xPropSet == null )
- {
- Error( "Can't get XPropertySet implementation from substream '" + sStreamName + "'!" );
- return false;
- }
-
- // set properties to the stream
- try
- {
- xPropSet.setPropertyValue( "MediaType", sMediaType );
- xPropSet.setPropertyValue( "Compressed", new Boolean( bCompressed ) );
- }
- catch( Exception e )
- {
- Error( "Can't set properties to substream '" + sStreamName + "', exception: " + e );
- return false;
- }
-
- // check size property of the stream
- try
- {
- int nSize = AnyConverter.toInt( xPropSet.getPropertyValue( "Size" ) );
- if ( nSize != pBytes.length )
- {
- Error( "The 'Size' property of substream '" + sStreamName + "' contains wrong value!" );
- return false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't get 'Size' property from substream '" + sStreamName + "', exception: " + e );
- return false;
- }
-
- // free the stream resources, garbage collector may remove the object too late
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface( XComponent.class, xStream );
- if ( xComponent == null )
- {
- Error( "Can't get XComponent implementation from substream '" + sStreamName + "'!" );
- return false;
- }
- xComponent.dispose();
-
- return true;
- }
-
-
- public boolean WriteBytesToSubstream( XStorage xStorage,
- String sStreamName,
- String sMediaType,
- boolean bCompressed,
- byte[] pBytes )
- {
- // open substream element
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xStorage.openStreamElement( sStreamName, ElementModes.ELEMENT_WRITE );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- {
- Error( "Can't create substream '" + sStreamName + "'!" );
- return false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't create substream '" + sStreamName + "', exception : " + e + "!" );
- return false;
- }
-
- return WriteBytesToStream( xSubStream, sStreamName, sMediaType, bCompressed, pBytes );
- }
-
- public boolean WriteBytesToEncrSubstream( XStorage xStorage,
- String sStreamName,
- String sMediaType,
- boolean bCompressed,
- byte[] pBytes,
- byte[] pPass )
- {
- // open substream element
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xStorage.openEncryptedStreamElement( sStreamName, ElementModes.ELEMENT_WRITE, pPass );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- {
- Error( "Can't create substream '" + sStreamName + "'!" );
- return false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't create substream '" + sStreamName + "', exception : " + e + "!" );
- return false;
- }
-
- return WriteBytesToStream( xSubStream, sStreamName, sMediaType, bCompressed, pBytes );
- }
-
- public boolean WBToSubstrOfEncr( XStorage xStorage,
- String sStreamName,
- String sMediaType,
- boolean bCompressed,
- byte[] pBytes,
- boolean bEncrypted )
- {
- // open substream element
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xStorage.openStreamElement( sStreamName, ElementModes.ELEMENT_WRITE );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- {
- Error( "Can't create substream '" + sStreamName + "'!" );
- return false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't create substream '" + sStreamName + "', exception : " + e + "!" );
- return false;
- }
-
- // get access to the XPropertySet interface
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xSubStream );
- if ( xPropSet == null )
- {
- Error( "Can't get XPropertySet implementation from substream '" + sStreamName + "'!" );
- return false;
- }
-
- // set properties to the stream
- try
- {
- xPropSet.setPropertyValue( "Encrypted", new Boolean( bEncrypted ) );
- }
- catch( Exception e )
- {
- Error( "Can't set 'Encrypted' property to substream '" + sStreamName + "', exception: " + e );
- return false;
- }
-
- return WriteBytesToStream( xSubStream, sStreamName, sMediaType, bCompressed, pBytes );
- }
-
- public int ChangeStreamPass( XStorage xStorage,
- String sStreamName,
- byte[] pOldPass,
- byte[] pNewPass )
- {
- // open substream element
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xStorage.openEncryptedStreamElement( sStreamName, ElementModes.ELEMENT_WRITE, pOldPass );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- {
- Error( "Can't open substream '" + sStreamName + "'!" );
- return 0;
- }
- }
- catch( Exception e )
- {
- Error( "Can't open substream '" + sStreamName + "', exception : " + e + "!" );
- return 0;
- }
-
-
- // change the password for the stream
- XEncryptionProtectedSource xStreamEncryption =
- (XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xSubStream );
-
- if ( xStreamEncryption == null )
- {
- Message( "Optional interface XEncryptionProtectedSource is not implemented, feature can not be tested!" );
- return -1;
- }
-
- try {
- xStreamEncryption.setEncryptionKey( pNewPass );
- }
- catch( Exception e )
- {
- Error( "Can't change encryption key of the substream '" + sStreamName + "', exception:" + e );
- return 0;
- }
-
- // free the stream resources, garbage collector may remove the object too late
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface( XComponent.class, xSubStream );
- if ( xComponent == null )
- {
- Error( "Can't get XComponent implementation from substream '" + sStreamName + "'!" );
- return 0;
- }
- xComponent.dispose();
-
- return 1;
- }
-
- public boolean setStorageTypeAndCheckProps( XStorage xStorage, String sMediaType, boolean bIsRoot, int nMode )
- {
- boolean bOk = false;
-
- // get access to the XPropertySet interface
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xStorage );
- if ( xPropSet != null )
- {
- try
- {
- // set "MediaType" property to the stream
- xPropSet.setPropertyValue( "MediaType", sMediaType );
-
- // get "IsRoot" and "OpenMode" properties and control there values
- boolean bPropIsRoot = AnyConverter.toBoolean( xPropSet.getPropertyValue( "IsRoot" ) );
- int nPropMode = AnyConverter.toInt( xPropSet.getPropertyValue( "OpenMode" ) );
-
- bOk = true;
- if ( bPropIsRoot != bIsRoot )
- {
- Error( "'IsRoot' property contains wrong value!" );
- bOk = false;
- }
-
- if ( ( bIsRoot && ( nPropMode | ElementModes.ELEMENT_READ ) != ( nMode | ElementModes.ELEMENT_READ ) )
- || ( !bIsRoot && ( nPropMode & nMode ) != nMode ) )
- {
- Error( "'OpenMode' property contains wrong value!" );
- bOk = false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't control properties of substorage, exception: " + e );
- }
- }
- else
- {
- Error( "Can't get XPropertySet implementation from storage!" );
- }
-
- return bOk;
- }
-
- public boolean checkStorageProperties( XStorage xStorage, String sMediaType, boolean bIsRoot, int nMode )
- {
- boolean bOk = false;
-
- // get access to the XPropertySet interface
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xStorage );
- if ( xPropSet != null )
- {
- try
- {
- // get "MediaType", "IsRoot" and "OpenMode" properties and control there values
- String sPropMediaType = AnyConverter.toString( xPropSet.getPropertyValue( "MediaType" ) );
- boolean bPropIsRoot = AnyConverter.toBoolean( xPropSet.getPropertyValue( "IsRoot" ) );
- int nPropMode = AnyConverter.toInt( xPropSet.getPropertyValue( "OpenMode" ) );
-
- bOk = true;
- if ( !sPropMediaType.equals( sMediaType ) )
- {
- Error( "'MediaType' property contains wrong value, expected '"
- + sMediaType + "', set '" + sPropMediaType + "' !" );
- bOk = false;
- }
-
- if ( bPropIsRoot != bIsRoot )
- {
- Error( "'IsRoot' property contains wrong value!" );
- bOk = false;
- }
-
- if ( ( bIsRoot && ( nPropMode | ElementModes.ELEMENT_READ ) != ( nMode | ElementModes.ELEMENT_READ ) )
- || ( !bIsRoot && ( nPropMode & nMode ) != nMode ) )
- {
- Error( "'OpenMode' property contains wrong value!" );
- bOk = false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't get properties of substorage, exception: " + e );
- }
- }
- else
- {
- Error( "Can't get XPropertySet implementation from storage!" );
- }
-
- return bOk;
- }
-
- public boolean InternalCheckStream( XStream xStream,
- String sName,
- String sMediaType,
- byte[] pBytes )
- {
- // get input stream of substream
- XInputStream xInput = xStream.getInputStream();
- if ( xInput == null )
- {
- Error( "Can't get XInputStream implementation from substream '" + sName + "'!" );
- return false;
- }
-
- byte pContents[][] = new byte[1][]; // ???
-
- // read contents
- try
- {
- xInput.readBytes( pContents, pBytes.length + 1 );
- }
- catch( Exception e )
- {
- Error( "Can't read from stream '" + sName + "', exception: " + e );
- return false;
- }
-
- // check size of stream data
- if ( pContents.length == 0 )
- {
- Error( "SubStream '" + sName + "' reading produced disaster!" );
- return false;
- }
-
- if ( pBytes.length != pContents[0].length )
- {
- Error( "SubStream '" + sName + "' contains wrong amount of data! (" + pContents[0].length + "/" + pBytes.length + ")" );
- return false;
- }
-
- // check stream data
- for ( int ind = 0; ind < pBytes.length; ind++ )
- {
- if ( pBytes[ind] != pContents[0][ind] )
- {
- Error( "SubStream '" + sName + "' contains wrong data!" );
- return false;
- }
- }
-
-
- // check properties
- boolean bOk = false;
-
- // get access to the XPropertySet interface
- XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xStream );
- if ( xPropSet != null )
- {
- try
- {
- // get "MediaType" and "Size" properties and control there values
- String sPropMediaType = AnyConverter.toString( xPropSet.getPropertyValue( "MediaType" ) );
- int nPropSize = AnyConverter.toInt( xPropSet.getPropertyValue( "Size" ) );
-
- bOk = true;
- if ( !sPropMediaType.equals( sMediaType ) )
- {
- Error( "'MediaType' property contains wrong value for stream '" + sName + "',\nexpected: '"
- + sMediaType + "', set: '" + sPropMediaType + "'!" );
- bOk = false;
- }
-
- if ( nPropSize != pBytes.length )
- {
- Error( "'Size' property contains wrong value for stream'" + sName + "'!" );
- bOk = false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't get properties of substream '" + sName + "', exception: " + e );
- }
- }
- else
- {
- Error( "Can't get XPropertySet implementation from stream '" + sName + "'!" );
- }
-
- return bOk;
- }
-
- public boolean checkStream( XStorage xParentStorage,
- String sName,
- String sMediaType,
- byte[] pBytes )
- {
- // open substream element first
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xParentStorage.openStreamElement( sName, ElementModes.ELEMENT_READ );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- {
- Error( "Can't open substream '" + sName + "'!" );
- return false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't open substream '" + sName + "', exception : " + e + "!" );
- return false;
- }
-
- return InternalCheckStream( xSubStream, sName, sMediaType, pBytes );
- }
-
- public boolean checkEncrStream( XStorage xParentStorage,
- String sName,
- String sMediaType,
- byte[] pBytes,
- byte[] pPass )
- {
- // Important: a common password for any of parent storage should not be set or
- // should be different from pPass
-
- if ( pPass.length == 0 )
- {
- Error( "Wrong password is used in the test!" );
- return false;
- }
-
- try
- {
- Object oSubStream = xParentStorage.openStreamElement( sName, ElementModes.ELEMENT_READ );
- Error( "Encrypted stream '" + sName + "' was opened without password!" );
- return false;
- }
- catch( WrongPasswordException wpe )
- {}
- catch( Exception e )
- {
- Error( "Unexpected exception in case of opening of encrypted stream '" + sName + "' without password: " + e + "!" );
- return false;
- }
-
- byte pWrongPass[] = { 1, 1 };
- pWrongPass[0] += pPass[0];
- try
- {
- Object oSubStream = xParentStorage.openEncryptedStreamElement( sName, ElementModes.ELEMENT_READ, pWrongPass );
- Error( "Encrypted stream '" + sName + "' was opened with wrong password!" );
- return false;
- }
- catch( WrongPasswordException wpe )
- {}
- catch( Exception e )
- {
- Error( "Unexpected exception in case of opening of encrypted stream '" + sName + "' with wrong password: " + e + "!" );
- return false;
- }
-
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xParentStorage.openEncryptedStreamElement( sName, ElementModes.ELEMENT_READ, pPass );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- {
- Error( "Can't open encrypted substream '" + sName + "'!" );
- return false;
- }
- }
- catch( Exception e )
- {
- Error( "Can't open encrypted substream '" + sName + "', exception : " + e + "!" );
- return false;
- }
-
- return InternalCheckStream( xSubStream, sName, sMediaType, pBytes );
- }
-
- public boolean copyStorage( XStorage xSourceStorage, XStorage xDestStorage )
- {
- // copy xSourceStorage to xDestStorage
- try
- {
- xSourceStorage.copyToStorage( xDestStorage );
- }
- catch( Exception e )
- {
- Error( "Storage copying failed, exception: " + e );
- return false;
- }
-
- return true;
- }
-
- public boolean commitStorage( XStorage xStorage )
- {
- // XTransactedObject must be supported by storages
- XTransactedObject xTransact = (XTransactedObject) UnoRuntime.queryInterface( XTransactedObject.class, xStorage );
- if ( xTransact == null )
- {
- Error( "Storage doesn't implement transacted access!" );
- return false;
- }
-
- try
- {
- xTransact.commit();
- }
- catch( Exception e )
- {
- Error( "Storage commit failed, exception:" + e );
- return false;
- }
-
- return true;
- }
-
- public boolean disposeStorage( XStorage xStorage )
- {
- // dispose the storage
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface( XComponent.class, xStorage );
- if ( xComponent == null )
- {
- Error( "Can't retrieve XComponent implementation from storage!" );
- return false;
- }
-
- try
- {
- xComponent.dispose();
- }
- catch( Exception e )
- {
- Error( "Storage disposing failed!" );
- return false;
- }
-
- return true;
- }
-
- public XInputStream getInputStream( XStream xStream )
- {
- XInputStream xInTemp = null;
- try
- {
- xInTemp = xStream.getInputStream();
- if ( xInTemp == null )
- Error( "Can't get the input part of a stream!" );
- }
- catch ( Exception e )
- {
- Error( "Can't get the input part of a stream, exception :" + e );
- }
-
- return xInTemp;
- }
-
- public boolean closeOutput( XStream xStream )
- {
- XOutputStream xOutTemp = null;
- try
- {
- xOutTemp = xStream.getOutputStream();
- if ( xOutTemp == null )
- {
- Error( "Can't get the output part of a stream!" );
- return false;
- }
- }
- catch ( Exception e )
- {
- Error( "Can't get the output part of a stream, exception :" + e );
- return false;
- }
-
- try
- {
- xOutTemp.closeOutput();
- }
- catch ( Exception e )
- {
- Error( "Can't close output part of a stream, exception :" + e );
- return false;
- }
-
- return true;
- }
-
- public XStorage openSubStorage( XStorage xStorage, String sName, int nMode )
- {
- // open existing substorage
- try
- {
- Object oSubStorage = xStorage.openStorageElement( sName, nMode );
- XStorage xSubStorage = (XStorage) UnoRuntime.queryInterface( XStorage.class, oSubStorage );
- return xSubStorage;
- }
- catch( Exception e )
- {
- Error( "Can't open substorage '" + sName + "', exception: " + e );
- }
-
- return null;
- }
-
- public XStream CreateTempFileStream( XMultiServiceFactory xMSF )
- {
- // try to get temporary file representation
- XStream xTempFileStream = null;
- try
- {
- Object oTempFile = xMSF.createInstance( "com.sun.star.io.TempFile" );
- xTempFileStream = (XStream)UnoRuntime.queryInterface( XStream.class, oTempFile );
- }
- catch( Exception e )
- {}
-
- if ( xTempFileStream == null )
- Error( "Can't create temporary file!" );
-
- return xTempFileStream;
- }
-
- public String CreateTempFile( XMultiServiceFactory xMSF )
- {
- String sResult = null;
-
- // try to get temporary file representation
- XPropertySet xTempFileProps = null;
- try
- {
- Object oTempFile = xMSF.createInstance( "com.sun.star.io.TempFile" );
- xTempFileProps = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, oTempFile );
- }
- catch( Exception e )
- {}
-
- if ( xTempFileProps != null )
- {
- try
- {
- xTempFileProps.setPropertyValue( "RemoveFile", new Boolean( false ) );
- sResult = AnyConverter.toString( xTempFileProps.getPropertyValue( "Uri" ) );
- }
- catch( Exception e )
- {
- Error( "Can't control TempFile properties, exception: " + e );
- }
- }
- else
- {
- Error( "Can't create temporary file representation!" );
- }
-
- // close temporary file explicitly
- try
- {
- XStream xStream = (XStream)UnoRuntime.queryInterface( XStream.class, xTempFileProps );
- if ( xStream != null )
- {
- XOutputStream xOut = xStream.getOutputStream();
- if ( xOut != null )
- xOut.closeOutput();
-
- XInputStream xIn = xStream.getInputStream();
- if ( xIn != null )
- xIn.closeInput();
- }
- else
- Error( "Can't close TempFile!" );
- }
- catch( Exception e )
- {
- Error( "Can't close TempFile, exception: " + e );
- }
-
- return sResult;
- }
-
- public boolean copyElementTo( XStorage xSource, String sName, XStorage xDest )
- {
- // copy element with name sName from xSource to xDest
- try
- {
- xSource.copyElementTo( sName, xDest, sName );
- }
- catch( Exception e )
- {
- Error( "Element copying failed, exception: " + e );
- return false;
- }
-
- return true;
- }
-
- public boolean moveElementTo( XStorage xSource, String sName, XStorage xDest )
- {
- // move element with name sName from xSource to xDest
- try
- {
- xSource.moveElementTo( sName, xDest, sName );
- }
- catch( Exception e )
- {
- Error( "Element moving failed, exception: " + e );
- return false;
- }
-
- return true;
- }
-
- public boolean renameElement( XStorage xStorage, String sOldName, String sNewName )
- {
- // rename element with name sOldName to sNewName
- try
- {
- xStorage.renameElement( sOldName, sNewName );
- }
- catch( Exception e )
- {
- Error( "Element renaming failed, exception: " + e );
- return false;
- }
-
- return true;
- }
-
- public boolean removeElement( XStorage xStorage, String sName )
- {
- // remove element with name sName
- try
- {
- xStorage.removeElement( sName );
- }
- catch( Exception e )
- {
- Error( "Element removing failed, exception: " + e );
- return false;
- }
-
- return true;
- }
-
- public XStream OpenStream( XStorage xStorage,
- String sStreamName,
- int nMode )
- {
- // open substream element
- XStream xSubStream = null;
- try
- {
- Object oSubStream = xStorage.openStreamElement( sStreamName, nMode );
- xSubStream = (XStream) UnoRuntime.queryInterface( XStream.class, oSubStream );
- if ( xSubStream == null )
- Error( "Can't create substream '" + sStreamName + "'!" );
- }
- catch( Exception e )
- {
- Error( "Can't create substream '" + sStreamName + "', exception : " + e + "!" );
- }
-
- return xSubStream;
- }
-
- public boolean cantOpenStorage( XStorage xStorage, String sName )
- {
- // try to open an opened substorage, open call must fail
- try
- {
- Object oDummyStorage = xStorage.openStorageElement( sName, ElementModes.ELEMENT_READ );
- Error( "The trying to reopen opened substorage '" + sName + "' must fail!" );
- }
- catch( Exception e )
- {
- return true;
- }
-
- return false;
- }
-
- public boolean cantOpenStream( XStorage xStorage, String sName, int nMode )
- {
- // try to open the substream with specified mode must fail
- try
- {
- Object oDummyStream = xStorage.openStreamElement( sName, nMode );
- Error( "The trying to open substoream '" + sName + "' must fail!" );
- }
- catch( Exception e )
- {
- return true;
- }
-
- return false;
- }
-
- public void Error( String sError )
- {
- System.out.println( m_sTestPrefix + "Error: " + sError );
- }
-
- public void Message( String sError )
- {
- System.out.println( m_sTestPrefix + sError );
- }
-}
-
diff --git a/odk/examples/java/Text/BookmarkInsertion.java b/odk/examples/java/Text/BookmarkInsertion.java
deleted file mode 100644
index 03c9cb24..00000000
--- a/odk/examples/java/Text/BookmarkInsertion.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the Desktop object from the office
-// Step 2: open an empty text document
-// Step 3: enter a example text
-// Step 4: insert some bookmarks
-//
-// Chapter 5.1.1.4 Inserting bookmarks
-//***************************************************************************
-
-import com.sun.star.uno.UnoRuntime;
-
-public class BookmarkInsertion {
-
- public static void main(String args[]) {
- // You need the desktop to create a document
- // The getDesktop method does the UNO bootstrapping, gets the
- // remote servie manager and the desktop object.
- com.sun.star.frame.XDesktop xDesktop = null;
- xDesktop = getDesktop();
-
- // create text document
- com.sun.star.text.XTextDocument xTextDocument = null;
- xTextDocument = createTextdocument(xDesktop);
-
- // put example text in document
- createExampleData(xTextDocument);
-
-
- String mOffending[] = { "negro(e|es)?","bor(ed|ing)?",
- "bloody?", "bleed(ing)?" };
- String mBad[] = { "possib(le|ilit(y|ies))", "real(ly)+", "brilliant" };
-
- String sOffendPrefix = "Offending";
- String sBadPrefix = "BadStyle";
-
- markList(xTextDocument, mOffending, sOffendPrefix);
- markList(xTextDocument, mBad, sBadPrefix);
-
- System.out.println("Done");
-
- System.exit(0);
- }
-
- public static void markList(com.sun.star.text.XTextDocument xTextDocument,
- String mList[], String sPrefix) {
- int iCounter=0;
- com.sun.star.uno.XInterface xSearchInterface = null;
- com.sun.star.text.XTextRange xSearchTextRange = null;
-
- try {
- for( iCounter = 0; iCounter < mList.length; iCounter++ ) {
- // the findfirst returns a XInterface
- xSearchInterface = (com.sun.star.uno.XInterface)FindFirst(
- xTextDocument, mList[ iCounter ] );
-
- if( xSearchInterface != null ) {
- // get the TextRange form the XInterface
- xSearchTextRange = (com.sun.star.text.XTextRange)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class, xSearchInterface);
-
- InsertBookmark(xTextDocument, xSearchTextRange,
- sPrefix + iCounter);
- }
- }
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-
-
- public static void InsertBookmark(com.sun.star.text.XTextDocument xTextDocument,
- com.sun.star.text.XTextRange xTextRange,
- String sBookName) {
- // create a bookmark on a TextRange
- try {
- // get the MultiServiceFactory from the text document
- com.sun.star.lang.XMultiServiceFactory xDocMSF;
- xDocMSF = (com.sun.star.lang.XMultiServiceFactory)
- UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xTextDocument);
-
- // the bookmark service is a context dependend service, you need
- // the MultiServiceFactory from the document
- Object xObject = xDocMSF.createInstance("com.sun.star.text.Bookmark");
-
- // set the name from the bookmark
- com.sun.star.container.XNamed xNameAccess = null;
- xNameAccess = (com.sun.star.container.XNamed)
- UnoRuntime.queryInterface(
- com.sun.star.container.XNamed.class, xObject);
-
- xNameAccess.setName(sBookName);
-
- // create a XTextContent, for the method 'insertTextContent'
- com.sun.star.text.XTextContent xTextContent = null;
- xTextContent = (com.sun.star.text.XTextContent)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class, xNameAccess);
-
- // insertTextContent need a TextRange not a cursor to specify the
- // position from the bookmark
- xTextDocument.getText().insertTextContent(xTextRange, xTextContent, true);
-
- System.out.println("Insert bookmark: " + sBookName);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
- }
-
- protected static com.sun.star.uno.XInterface FindFirst(
- com.sun.star.text.XTextDocument xTextDocument, String sSearchString)
- {
- com.sun.star.util.XSearchDescriptor xSearchDescriptor = null;
- com.sun.star.util.XSearchable xSearchable = null;
- com.sun.star.uno.XInterface xSearchInterface = null;
-
- try {
- xSearchable = (com.sun.star.util.XSearchable)
- UnoRuntime.queryInterface(
- com.sun.star.util.XSearchable.class, xTextDocument);
- xSearchDescriptor = (com.sun.star.util.XSearchDescriptor)
- xSearchable.createSearchDescriptor();
-
- xSearchDescriptor.setSearchString(sSearchString);
-
- com.sun.star.beans.XPropertySet xPropertySet = null;
- xPropertySet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xSearchDescriptor);
-
- xPropertySet.setPropertyValue("SearchRegularExpression",
- new Boolean( true ) );
-
- xSearchInterface = (com.sun.star.uno.XInterface)
- xSearchable.findFirst(xSearchDescriptor);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return xSearchInterface;
- }
-
- protected static void createExampleData(
- com.sun.star.text.XTextDocument xTextDocument )
- {
- com.sun.star.text.XTextCursor xTextCursor = null;
-
- try {
- xTextCursor = (com.sun.star.text.XTextCursor)
- xTextDocument.getText().createTextCursor();
-
- xTextCursor.setString( "He heard quiet steps behind him. That didn't bode well. Who could be following him this late at night and in this deadbeat part of town? And at this particular moment, just after he pulled off the big time and was making off with the greenbacks. Was there another crook who'd had the same idea, and was now watching him and waiting for a chance to grab the fruit of his labor?" );
- xTextCursor.collapseToEnd();
- xTextCursor.setString( "Or did the steps behind him mean that one of many bloody officers in town was on to him and just waiting to pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the alley. Like lightening he darted off to the left and disappeared between the two warehouses almost falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the way he had come" );
- xTextCursor.collapseToEnd();
- xTextCursor.setString( "The steps got louder and louder, he saw the black outline of a figure coming around the corner. Is this the end of the line? he thought pressing himself back against the wall trying to make himself invisible in the dark, was all that planning and energy wasted? He was dripping with sweat now, cold and wet, he could smell the brilliant fear coming off his clothes. Suddenly next to him, with a barely noticeable squeak, a door swung quietly to and fro in the night's breeze." );
-
- xTextCursor.gotoStart(false);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- }
-
- public static com.sun.star.frame.XDesktop getDesktop() {
- com.sun.star.frame.XDesktop xDesktop = null;
- com.sun.star.lang.XMultiComponentFactory xMCF = null;
-
- try {
- com.sun.star.uno.XComponentContext xContext = null;
-
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- xMCF = xContext.getServiceManager();
- if( xMCF != null ) {
- System.out.println("Connected to a running office ...");
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
- xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
- com.sun.star.frame.XDesktop.class, oDesktop);
- }
- else
- System.out.println( "Can't create a desktop. No connection, no remote office servicemanager available!" );
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- return xDesktop;
- }
-
- public static com.sun.star.text.XTextDocument createTextdocument(
- com.sun.star.frame.XDesktop xDesktop )
- {
- com.sun.star.text.XTextDocument aTextDocument = null;
-
- try {
- com.sun.star.lang.XComponent xComponent = CreateNewDocument(xDesktop,
- "swriter");
- aTextDocument = (com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComponent);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return aTextDocument;
- }
-
-
- protected static com.sun.star.lang.XComponent CreateNewDocument(
- com.sun.star.frame.XDesktop xDesktop,
- String sDocumentType )
- {
- String sURL = "private:factory/" + sDocumentType;
-
- com.sun.star.lang.XComponent xComponent = null;
- com.sun.star.frame.XComponentLoader xComponentLoader = null;
- com.sun.star.beans.PropertyValue xValues[] =
- new com.sun.star.beans.PropertyValue[1];
- com.sun.star.beans.PropertyValue xEmptyArgs[] =
- new com.sun.star.beans.PropertyValue[0];
-
- try {
- xComponentLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- xComponent = xComponentLoader.loadComponentFromURL(
- sURL, "_blank", 0, xEmptyArgs);
- }
- catch( Exception e) {
- e.printStackTrace(System.out);
- }
-
- return xComponent ;
- }
-}
diff --git a/odk/examples/java/Text/GraphicsInserter.java b/odk/examples/java/Text/GraphicsInserter.java
deleted file mode 100644
index a42ccaab..00000000
--- a/odk/examples/java/Text/GraphicsInserter.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-import java.io.PrintWriter;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
-
-
-public class GraphicsInserter {
- public static void main(String args[]) {
- if ( args.length < 1 )
- {
- System.out.println(
- "usage: java -jar GraphicsInserter.jar \"<Graphic URL|path>\"" );
- System.out.println( "\ne.g.:" );
- System.out.println(
- "java -jar GraphicsInserter.jar \"file:///f:/TestGraphics.gif\"" );
- System.exit( 1 );
- }
-
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
-
- // bootstrap UNO and get the remote component context. The context can
- // be used to get the service manager
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- /* A desktop environment contains tasks with one or more
- frames in which components can be loaded. Desktop is the
- environment for components which can instanciate within
- frames. */
- com.sun.star.frame.XDesktop xDesktop = (com.sun.star.frame.XDesktop)
- UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class,
- xMCF.createInstanceWithContext("com.sun.star.frame.Desktop",
- xContext ) );
-
- com.sun.star.frame.XComponentLoader xCompLoader =
- (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- // Load a Writer document, which will be automaticly displayed
- com.sun.star.lang.XComponent xComp = xCompLoader.loadComponentFromURL(
- "private:factory/swriter", "_blank", 0,
- new com.sun.star.beans.PropertyValue[0]);
-
- // Querying for the interface XTextDocument on the xcomponent
- com.sun.star.text.XTextDocument xTextDoc =
- (com.sun.star.text.XTextDocument)UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComp);
-
- // Querying for the interface XMultiServiceFactory on the xtextdocument
- com.sun.star.lang.XMultiServiceFactory xMSFDoc =
- (com.sun.star.lang.XMultiServiceFactory)UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xTextDoc);
-
- // Providing a log file for output
- PrintWriter printwriterLog = new PrintWriter(
- new BufferedWriter( new FileWriter("log.txt") ) );
-
- Object oGraphic = null;
- try {
- // Creating the service GraphicObject
- oGraphic =
- xMSFDoc.createInstance("com.sun.star.text.TextGraphicObject");
- }
- catch ( Exception exception ) {
- System.out.println( "Could not create instance" );
- exception.printStackTrace( printwriterLog );
- }
-
- // Getting the text
- com.sun.star.text.XText xText = xTextDoc.getText();
-
- // Getting the cursor on the document
- com.sun.star.text.XTextCursor xTextCursor = xText.createTextCursor();
-
- // Querying for the interface XTextContent on the GraphicObject
- com.sun.star.text.XTextContent xTextContent =
- (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class, oGraphic );
-
- // Printing information to the log file
- printwriterLog.println( "inserting graphic" );
- try {
- // Inserting the content
- xText.insertTextContent(xTextCursor, xTextContent, true);
- } catch ( Exception exception ) {
- System.out.println( "Could not insert Content" );
- exception.printStackTrace(System.err);
- }
-
- // Printing information to the log file
- printwriterLog.println( "adding graphic" );
-
- // Querying for the interface XPropertySet on GraphicObject
- com.sun.star.beans.XPropertySet xPropSet =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, oGraphic);
- try {
- // Creating a string for the graphic url
- java.io.File sourceFile = new java.io.File(args[0]);
- StringBuffer sUrl = new StringBuffer("file:///");
- sUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
- System.out.println( "insert graphic \"" + sUrl + "\"");
-
- // Setting the anchor type
- xPropSet.setPropertyValue("AnchorType",
- com.sun.star.text.TextContentAnchorType.AT_PARAGRAPH );
-
- // Setting the graphic url
- xPropSet.setPropertyValue( "GraphicURL", sUrl.toString() );
-
- // Setting the horizontal position
- xPropSet.setPropertyValue( "HoriOrientPosition",
- new Integer( 5500 ) );
-
- // Setting the vertical position
- xPropSet.setPropertyValue( "VertOrientPosition",
- new Integer( 4200 ) );
-
- // Setting the width
- xPropSet.setPropertyValue( "Width", new Integer( 4400 ) );
-
- // Setting the height
- xPropSet.setPropertyValue( "Height", new Integer( 4000 ) );
- } catch ( Exception exception ) {
- System.out.println( "Couldn't set property 'GraphicURL'" );
- exception.printStackTrace( printwriterLog );
- }
-
- xContext = null;
-
- System.exit(0);
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/Text/HardFormatting.java b/odk/examples/java/Text/HardFormatting.java
deleted file mode 100644
index 7d8bf94f..00000000
--- a/odk/examples/java/Text/HardFormatting.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the Desktop object from the office
-// Step 2: open an empty text document
-// Step 3: enter a example text
-// Step 4: get some text attributes
-// Step 5: check the PropertyState from the selection
-//
-// Chapter 4.1.4 Hard formatting
-//***************************************************************************
-
-import com.sun.star.uno.UnoRuntime;
-
-public class HardFormatting {
-
- public static void main(String args[]) {
- // You need the desktop to create a document
- // The getDesktop method does the UNO bootstrapping, gets the
- // remote servie manager and the desktop object.
- com.sun.star.frame.XDesktop xDesktop = null;
- xDesktop = getDesktop();
-
- try {
- // create text document
- com.sun.star.text.XTextDocument xTextDocument = null;
- xTextDocument = createTextdocument(xDesktop);
-
- // the text interface contains all methods and properties to
- // manipulate the content from a text document
- com.sun.star.text.XText xText = null;
- xText = xTextDocument.getText();
-
- String sMyText = "A very short paragraph for illustration only";
-
- // you can travel with the cursor throught the text document.
- // you travel only at the model, not at the view. The cursor that you can
- // see on the document doesn't change the position
- com.sun.star.text.XTextCursor xTextCursor = null;
- xTextCursor = (com.sun.star.text.XTextCursor)
- xTextDocument.getText().createTextCursor();
-
- xText.insertString( xTextCursor, "Headline", false );
- xText.insertControlCharacter(xTextCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false);
-
- xText.insertString(xTextCursor, sMyText, false);
-
- com.sun.star.text.XTextRange xTextRange = null;
- com.sun.star.beans.XPropertySet xPropertySet = null;
-
- // BEGIN: 'Hard formating'
- // the text range not the cursor contains the 'parastyle' property
- xTextRange = xText.getEnd();
- xPropertySet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextRange);
-
- // create a paragraph cursor to travel throught the paragraphs
- com.sun.star.text.XParagraphCursor xParagraphCursor = null;
- xParagraphCursor = (com.sun.star.text.XParagraphCursor)
- UnoRuntime.queryInterface(
- com.sun.star.text.XParagraphCursor.class, xTextRange);
-
- xParagraphCursor.gotoStart( false );
- xParagraphCursor.gotoEndOfParagraph( true );
- xTextRange = xParagraphCursor.getText().getStart();
-
- // create a WordCursor to travel into the paragraph
- com.sun.star.text.XWordCursor xWordCursor = null;
- xWordCursor = (com.sun.star.text.XWordCursor) UnoRuntime.queryInterface(
- com.sun.star.text.XWordCursor.class, xTextRange);
-
- // the PropertySet from the cursor contains the text attributes
- xPropertySet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xWordCursor);
- System.out.println(
- "Parastyle : "
- +xPropertySet.getPropertyValue("ParaStyleName").toString()
- + "\nFontname : "
- + xPropertySet.getPropertyValue("CharFontName").toString()
- + "\nWeight : "
- + xPropertySet.getPropertyValue("CharWeight").toString() );
-
- xWordCursor.gotoNextWord(false);
- xWordCursor.gotoNextWord(false);
- xWordCursor.gotoEndOfWord(true);
-
- xPropertySet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xWordCursor);
- xPropertySet.setPropertyValue("CharWeight",
- new Float(com.sun.star.awt.FontWeight.BOLD));
- xPropertySet.setPropertyValue("CharColor", new Integer( 255 ) );
-
- System.out.println(
- "Parastyle : "
- + xPropertySet.getPropertyValue("ParaStyleName").toString()
- + "\nFontname : "
- + xPropertySet.getPropertyValue("CharFontName").toString()
- + "\nWeight : "
- + xPropertySet.getPropertyValue("CharWeight").toString() );
-
- // the PropertyState contains information where the attribute is set,
- // is a text part hard formated or not.
- com.sun.star.beans.XPropertyState xPropertyState = null;
- xPropertyState = (com.sun.star.beans.XPropertyState)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertyState.class, xWordCursor);
-
- com.sun.star.beans.PropertyState xPropertyStateValue =
- xPropertyState.getPropertyState("CharWeight");
-
- checkPropertyState( xWordCursor, xPropertyStateValue );
-
- xWordCursor.goRight( (short) 3 , true );
- xPropertyStateValue = xPropertyState.getPropertyState("CharWeight");
-
- System.out.println("Increase the selection with three characters");
- checkPropertyState(xWordCursor, xPropertyStateValue);
-
- xPropertyState.setPropertyToDefault("CharWeight");
-
- System.out.println("Set the default value on the selection");
- xPropertyStateValue = xPropertyState.getPropertyState("CharWeight");
- checkPropertyState(xWordCursor, xPropertyStateValue);
-
- // END: 'Hard formating' Section from the Cookbook
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- System.out.println("Done");
-
- System.exit(0);
-
- }
-
-
- public static void checkPropertyState(
- com.sun.star.text.XWordCursor xWordCursor,
- com.sun.star.beans.PropertyState xPropertyStateValue )
- {
- switch( xPropertyStateValue.getValue() ) {
- case com.sun.star.beans.PropertyState.DIRECT_VALUE_value: {
- System.out.println( "-> The selection '"
- + xWordCursor.getString()
- + "' completly hard formated" );
- break;
- }
-
- case com.sun.star.beans.PropertyState.DEFAULT_VALUE_value: {
- System.out.println( "-> The selection '"
- + xWordCursor.getString()
- + "' isn't hard formated" );
- break;
- }
-
- case com.sun.star.beans.PropertyState.AMBIGUOUS_VALUE_value: {
- System.out.println( "-> The selection '"
- + xWordCursor.getString()
- + "' isn't completly hard formated" );
- break;
- }
-
- default:
- System.out.println( "No PropertyState found" );
- }
- }
-
- public static com.sun.star.frame.XDesktop getDesktop() {
- com.sun.star.frame.XDesktop xDesktop = null;
- com.sun.star.lang.XMultiComponentFactory xMCF = null;
-
- try {
- com.sun.star.uno.XComponentContext xContext = null;
-
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- xMCF = xContext.getServiceManager();
- if( xMCF != null ) {
- System.out.println("Connected to a running office ...");
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
- xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
- com.sun.star.frame.XDesktop.class, oDesktop);
- }
- else
- System.out.println( "Can't create a desktop. No connection, no remote office servicemanager available!" );
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- return xDesktop;
- }
-
- public static com.sun.star.text.XTextDocument createTextdocument(
- com.sun.star.frame.XDesktop xDesktop )
- {
- com.sun.star.text.XTextDocument aTextDocument = null;
-
- try {
- com.sun.star.lang.XComponent xComponent = CreateNewDocument(xDesktop,
- "swriter");
- aTextDocument = (com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComponent);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return aTextDocument;
- }
-
-
- protected static com.sun.star.lang.XComponent CreateNewDocument(
- com.sun.star.frame.XDesktop xDesktop,
- String sDocumentType )
- {
- String sURL = "private:factory/" + sDocumentType;
-
- com.sun.star.lang.XComponent xComponent = null;
- com.sun.star.frame.XComponentLoader xComponentLoader = null;
- com.sun.star.beans.PropertyValue xValues[] =
- new com.sun.star.beans.PropertyValue[1];
- com.sun.star.beans.PropertyValue xEmptyArgs[] =
- new com.sun.star.beans.PropertyValue[0];
-
- try {
- xComponentLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- xComponent = xComponentLoader.loadComponentFromURL(
- sURL, "_blank", 0, xEmptyArgs);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return xComponent ;
- }
-}
diff --git a/odk/examples/java/Text/Makefile b/odk/examples/java/Text/Makefile
deleted file mode 100644
index 9fb4b622..00000000
--- a/odk/examples/java/Text/Makefile
+++ /dev/null
@@ -1,136 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java Text examples of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-EXAMPLE_NAME=JavaTextExamples
-OUT_APP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-
-APP1_NAME=BookmarkInsertion
-APP1_JAR=$(OUT_APP_CLASS)/$(APP1_NAME).jar
-APP2_NAME=HardFormatting
-APP2_JAR=$(OUT_APP_CLASS)/$(APP2_NAME).jar
-APP3_NAME=StyleCreation
-APP3_JAR=$(OUT_APP_CLASS)/$(APP3_NAME).jar
-APP4_NAME=StyleInitialization
-APP4_JAR=$(OUT_APP_CLASS)/$(APP4_NAME).jar
-APP5_NAME=SWriter
-APP5_JAR=$(OUT_APP_CLASS)/$(APP5_NAME).jar
-APP6_NAME=TextDocumentStructure
-APP6_JAR=$(OUT_APP_CLASS)/$(APP6_NAME).jar
-APP7_NAME=TextReplace
-APP7_JAR=$(OUT_APP_CLASS)/$(APP7_NAME).jar
-APP8_NAME=WriterSelector
-APP8_JAR=$(OUT_APP_CLASS)/$(APP8_NAME).jar
-APP9_NAME=GraphicsInserter
-APP9_JAR=$(OUT_APP_CLASS)/$(APP9_NAME).jar
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(OUT_APP_CLASS))
-
-# Targets
-.PHONY: ALL
-ALL : \
- $(EXAMPLE_NAME)
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_APP_CLASS)/%.class : %.java
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_APP_CLASS) $<
-
-$(OUT_APP_CLASS)/%.mf :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo Main-Class: com.sun.star.lib.loader.Loader> $@
- $(ECHOLINE)>> $@
- @echo Name: com/sun/star/lib/loader/Loader.class>> $@
- @echo Application-Class: $*>> $@
-
-$(OUT_APP_CLASS)/%.jar : $(OUT_APP_CLASS)/%.mf $(OUT_APP_CLASS)/%.class
- -$(MKDIR) $(subst /,$(PS),$(@D))
- +cd $(subst /,$(PS),$(OUT_APP_CLASS)) && $(SDK_JAR) cvfm $(@F) $*.mf $*.class
- +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-
-
-$(APP1_JAR) : $(OUT_APP_CLASS)/$(APP1_NAME).mf $(OUT_APP_CLASS)/$(APP1_NAME).class
-$(APP2_JAR) : $(OUT_APP_CLASS)/$(APP2_NAME).mf $(OUT_APP_CLASS)/$(APP2_NAME).class
-$(APP3_JAR) : $(OUT_APP_CLASS)/$(APP3_NAME).mf $(OUT_APP_CLASS)/$(APP3_NAME).class
-$(APP4_JAR) : $(OUT_APP_CLASS)/$(APP4_NAME).mf $(OUT_APP_CLASS)/$(APP4_NAME).class
-$(APP5_JAR) : $(OUT_APP_CLASS)/$(APP5_NAME).mf $(OUT_APP_CLASS)/$(APP5_NAME).class
-$(APP6_JAR) : $(OUT_APP_CLASS)/$(APP6_NAME).mf $(OUT_APP_CLASS)/$(APP6_NAME).class
-$(APP7_JAR) : $(OUT_APP_CLASS)/$(APP7_NAME).mf $(OUT_APP_CLASS)/$(APP7_NAME).class
-$(APP8_JAR) : $(OUT_APP_CLASS)/$(APP8_NAME).mf $(OUT_APP_CLASS)/$(APP8_NAME).class
-$(APP9_JAR) : $(OUT_APP_CLASS)/$(APP9_NAME).mf $(OUT_APP_CLASS)/$(APP9_NAME).class
-
-$(EXAMPLE_NAME) : $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) $(APP4_JAR) $(APP5_JAR) $(APP6_JAR) $(APP7_JAR) $(APP8_JAR) $(APP9_JAR)
- @echo --------------------------------------------------------------------------------
- @echo The GraphicsInserter example loads the graphic "$(QM)./oo_smiley.gif$(QM)" into a
- @echo new document.
- @echo -
- @echo Please use one of the following commands to execute the examples!
- @echo ------
- @echo $(MAKE) BookmarkInsertion.run
- @echo $(MAKE) HardFormatting.run
- @echo $(MAKE) StyleCreation.run
- @echo $(MAKE) StyleInitialization.run
- @echo $(MAKE) SWriter.run
- @echo $(MAKE) TextDocumentStructure.run
- @echo $(MAKE) TextReplace.run
- @echo $(MAKE) WriterSelector.run
- @echo $(MAKE) GraphicsInserter.run
- @echo --------
- @echo The GraphicsInserter needs parameters. Please use the following command to
- @echo start the demo if you do not want the default parameters specified in the
- @echo this makefile. Starting without parameters print a command line help:
- @echo --- GraphicsInserter ---
- @echo java -jar GraphicsInserter.jar "$(QM)graphic Url|path$(QM)"
- @echo --------------------------------------------------------------------------------
-
-%.run: $(OUT_APP_CLASS)/%.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-
-GraphicsInserter.run: $(OUT_APP_CLASS)/GraphicsInserter.jar
- $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< oo_smiley.gif
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_APP_CLASS))
diff --git a/odk/examples/java/Text/SWriter.java b/odk/examples/java/Text/SWriter.java
deleted file mode 100644
index ca7696b4..00000000
--- a/odk/examples/java/Text/SWriter.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: bootstrap UNO and get the remote component context
-// Step 2: open an empty text document
-// Step 3: enter some text
-// Step 4: insert a text table
-// Step 5: insert colored text
-// Step 6: insert a text frame
-//***************************************************************************
-
-import com.sun.star.uno.UnoRuntime;
-
-public class SWriter {
-
- public static void main(String args[]) {
-
-
- //oooooooooooooooooooooooooooStep 1oooooooooooooooooooooooooooooooooooooooo
- // bootstrap UNO and get the remote component context. The context can
- // be used to get the service manager
- //*************************************************************************
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- if( xContext != null )
- System.out.println("Connected to a running office ...");
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
- //oooooooooooooooooooooooooooStep 2oooooooooooooooooooooooooooooooooooooooo
- // open an empty document. In this case it's a writer document.
- // For this purpose an instance of com.sun.star.frame.Desktop
- // is created. It's interface XDesktop provides the XComponentLoader,
- // which is used to open the document via loadComponentFromURL
- //*************************************************************************
-
- //Open Writer document
-
- System.out.println("Opening an empty Writer document");
- com.sun.star.text.XTextDocument myDoc = openWriter(xContext);
-
- //*************************************************************************
-
-
- //oooooooooooooooooooooooooooStep 3oooooooooooooooooooooooooooooooooooooooo
- // insert some text.
- // For this purpose get the Text-Object of the document an create the
- // cursor. Now it is possible to insert a text at the cursor-position
- // via insertString
- //*************************************************************************
-
-
- //getting the text object
- com.sun.star.text.XText xText = myDoc.getText();
-
- //create a cursor object
- com.sun.star.text.XTextCursor xTCursor = xText.createTextCursor();
-
- //inserting some Text
- xText.insertString( xTCursor, "The first line in the newly created text document.\n", false );
-
- //inserting a second line
- xText.insertString( xTCursor, "Now we're in the second line\n", false );
-
- //*************************************************************************
-
-
- //oooooooooooooooooooooooooooStep 4oooooooooooooooooooooooooooooooooooooooo
- // insert a text table.
- // For this purpose get MultiServiceFactory of the document, create an
- // instance of com.sun.star.text.TextTable and initialize it. Now it can
- // be inserted at the cursor position via insertTextContent.
- // After that some properties are changed and some data is inserted.
- //*************************************************************************
-
- //inserting a text table
- System.out.println("Inserting a text table");
-
- //getting MSF of the document
- com.sun.star.lang.XMultiServiceFactory xDocMSF =
- (com.sun.star.lang.XMultiServiceFactory) UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, myDoc);
-
- //create instance of a text table
- com.sun.star.text.XTextTable xTT = null;
-
- try {
- Object oInt = xDocMSF.createInstance("com.sun.star.text.TextTable");
- xTT = (com.sun.star.text.XTextTable)
- UnoRuntime.queryInterface(com.sun.star.text.XTextTable.class,oInt);
- } catch (Exception e) {
- System.err.println("Couldn't create instance "+ e);
- e.printStackTrace(System.err);
- }
-
- //initialize the text table with 4 columns an 4 rows
- xTT.initialize(4,4);
-
- com.sun.star.beans.XPropertySet xTTRowPS = null;
-
- //insert the table
- try {
- xText.insertTextContent(xTCursor, xTT, false);
- // get first Row
- com.sun.star.container.XIndexAccess xTTRows = xTT.getRows();
- xTTRowPS = (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTTRows.getByIndex(0));
-
- } catch (Exception e) {
- System.err.println("Couldn't insert the table " + e);
- e.printStackTrace(System.err);
- }
-
-
- // get the property set of the text table
-
- com.sun.star.beans.XPropertySet xTTPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xTT);
-
- // Change the BackColor
- try {
- xTTPS.setPropertyValue("BackTransparent", new Boolean(false));
- xTTPS.setPropertyValue("BackColor",new Integer(13421823));
- xTTRowPS.setPropertyValue("BackTransparent", new Boolean(false));
- xTTRowPS.setPropertyValue("BackColor",new Integer(6710932));
-
- } catch (Exception e) {
- System.err.println("Couldn't change the color " + e);
- e.printStackTrace(System.err);
- }
-
- // write Text in the Table headers
- System.out.println("Write text in the table headers");
-
- insertIntoCell("A1","FirstColumn", xTT);
- insertIntoCell("B1","SecondColumn", xTT) ;
- insertIntoCell("C1","ThirdColumn", xTT) ;
- insertIntoCell("D1","SUM", xTT) ;
-
-
- //Insert Something in the text table
- System.out.println("Insert something in the text table");
-
- (xTT.getCellByName("A2")).setValue(22.5);
- (xTT.getCellByName("B2")).setValue(5615.3);
- (xTT.getCellByName("C2")).setValue(-2315.7);
- (xTT.getCellByName("D2")).setFormula("sum <A2:C2>");
-
- (xTT.getCellByName("A3")).setValue(21.5);
- (xTT.getCellByName("B3")).setValue(615.3);
- (xTT.getCellByName("C3")).setValue(-315.7);
- (xTT.getCellByName("D3")).setFormula("sum <A3:C3>");
-
- (xTT.getCellByName("A4")).setValue(121.5);
- (xTT.getCellByName("B4")).setValue(-615.3);
- (xTT.getCellByName("C4")).setValue(415.7);
- (xTT.getCellByName("D4")).setFormula("sum <A4:C4>");
-
-
- //oooooooooooooooooooooooooooStep 5oooooooooooooooooooooooooooooooooooooooo
- // insert a colored text.
- // Get the propertySet of the cursor, change the CharColor and add a
- // shadow. Then insert the Text via InsertString at the cursor position.
- //*************************************************************************
-
- // get the property set of the cursor
- com.sun.star.beans.XPropertySet xTCPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
- xTCursor);
-
- Object oldValue = null;
-
- // Change the CharColor and add a Shadow
- try {
- xTCPS.setPropertyValue("CharColor",new Integer(255));
- xTCPS.setPropertyValue("CharShadowed", new Boolean(true));
- } catch (Exception e) {
- System.err.println("Couldn't change the color " + e);
- e.printStackTrace(System.err);
- }
-
- //create a paragraph break
- try {
- xText.insertControlCharacter(xTCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false);
-
- } catch (Exception e) {
- System.err.println("Couldn't insert break "+ e);
- e.printStackTrace(System.err);
- }
-
- //inserting colored Text
- System.out.println("Inserting colored Text");
-
- xText.insertString(xTCursor, " This is a colored Text - blue with shadow\n",
- false );
-
- //create a paragraph break
- try {
- xText.insertControlCharacter(xTCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false);
-
- } catch (Exception e) {
- System.err.println("Couldn't insert break "+ e);
- e.printStackTrace(System.err);
- }
-
- //oooooooooooooooooooooooooooStep 6oooooooooooooooooooooooooooooooooooooooo
- // insert a text frame.
- // create an instance of com.sun.star.text.TextFrame using the MSF of the
- // document. Change some properties an insert it.
- // Now get the text-Object of the frame an the corresponding cursor.
- // Insert some text via insertString.
- //*************************************************************************
-
- // Create a TextFrame
- com.sun.star.text.XTextFrame xTF = null;
- com.sun.star.drawing.XShape xTFS = null;
-
- try {
- Object oInt = xDocMSF.createInstance("com.sun.star.text.TextFrame");
- xTF = (com.sun.star.text.XTextFrame) UnoRuntime.queryInterface(
- com.sun.star.text.XTextFrame.class,oInt);
- xTFS = (com.sun.star.drawing.XShape) UnoRuntime.queryInterface(
- com.sun.star.drawing.XShape.class,oInt);
-
- com.sun.star.awt.Size aSize = new com.sun.star.awt.Size();
- aSize.Height = 400;
- aSize.Width = 15000;
-
- xTFS.setSize(aSize);
- } catch (Exception e) {
- System.err.println("Couldn't create instance "+ e);
- e.printStackTrace(System.err);
- }
-
- // get the property set of the text frame
- com.sun.star.beans.XPropertySet xTFPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xTF);
-
- // Change the AnchorType
- try {
- xTFPS.setPropertyValue("AnchorType",
- com.sun.star.text.TextContentAnchorType.AS_CHARACTER);
- } catch (Exception e) {
- System.err.println("Couldn't change the color " + e);
- e.printStackTrace(System.err);
- }
-
- //insert the frame
- System.out.println("Insert the text frame");
-
- try {
- xText.insertTextContent(xTCursor, xTF, false);
- } catch (Exception e) {
- System.err.println("Couldn't insert the frame " + e);
- e.printStackTrace(System.err);
- }
-
- //getting the text object of Frame
- com.sun.star.text.XText xTextF = xTF.getText();
-
- //create a cursor object
- com.sun.star.text.XTextCursor xTCF = xTextF.createTextCursor();
-
- //inserting some Text
- xTextF.insertString(xTCF,
- "The first line in the newly created text frame.", false);
-
-
- xTextF.insertString(xTCF,
- "\nWith this second line the height of the frame raises.", false);
-
- //insert a paragraph break
- try {
- xText.insertControlCharacter(xTCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false );
-
- } catch (Exception e) {
- System.err.println("Couldn't insert break "+ e);
- e.printStackTrace(System.err);
- }
-
- // Change the CharColor and add a Shadow
- try {
- xTCPS.setPropertyValue("CharColor",new Integer(65536));
- xTCPS.setPropertyValue("CharShadowed", new Boolean(false));
- } catch (Exception e) {
- System.err.println("Couldn't change the color " + e);
- e.printStackTrace(System.err);
- }
-
- xText.insertString(xTCursor, " That's all for now !!", false );
-
- System.out.println("done");
-
- System.exit(0);
- }
-
-
- public static com.sun.star.text.XTextDocument openWriter(
- com.sun.star.uno.XComponentContext xContext)
- {
- //define variables
- com.sun.star.frame.XComponentLoader xCLoader;
- com.sun.star.text.XTextDocument xDoc = null;
- com.sun.star.lang.XComponent xComp = null;
-
- try {
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- xCLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
- oDesktop);
- com.sun.star.beans.PropertyValue [] szEmptyArgs =
- new com.sun.star.beans.PropertyValue [0];
- String strDoc = "private:factory/swriter";
- xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, szEmptyArgs);
- xDoc = (com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
- xComp);
-
- } catch(Exception e){
- System.err.println(" Exception " + e);
- e.printStackTrace(System.err);
- }
- return xDoc;
- }
-
- public static void insertIntoCell(String CellName, String theText,
- com.sun.star.text.XTextTable xTTbl) {
-
- com.sun.star.text.XText xTableText = (com.sun.star.text.XText)
- UnoRuntime.queryInterface(com.sun.star.text.XText.class,
- xTTbl.getCellByName(CellName));
-
- //create a cursor object
- com.sun.star.text.XTextCursor xTC = xTableText.createTextCursor();
-
- com.sun.star.beans.XPropertySet xTPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xTC);
-
- try {
- xTPS.setPropertyValue("CharColor",new Integer(16777215));
- } catch (Exception e) {
- System.err.println(" Exception " + e);
- e.printStackTrace(System.err);
- }
-
- //inserting some Text
- xTableText.setString( theText );
-
- }
-}
diff --git a/odk/examples/java/Text/StyleCreation.java b/odk/examples/java/Text/StyleCreation.java
deleted file mode 100644
index 362604af..00000000
--- a/odk/examples/java/Text/StyleCreation.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the Desktop object from the office
-// Step 2: open an empty text document
-// Step 3: create a new Paragraph style
-// Step 4: apply the Paragraph style
-//
-// Chapter 4.1.3 Defining Your Own Style
-//***************************************************************************
-
-import com.sun.star.uno.UnoRuntime;
-
-
-public class StyleCreation {
- public static void main(String args[]) {
- // You need the desktop to create a document
- // The getDesktop method does the UNO bootstrapping, gets the
- // remote servie manager and the desktop object.
- com.sun.star.frame.XDesktop xDesktop = null;
- xDesktop = getDesktop();
-
- try {
- // create text document
- com.sun.star.text.XTextDocument xTextDocument = null;
- xTextDocument = createTextdocument(xDesktop);
-
- // the service '..ParagraphStyle' is context dependend, you need
- // the multi service factory from the document to use the service
- com.sun.star.lang.XMultiServiceFactory xDocMSF =
- (com.sun.star.lang.XMultiServiceFactory)UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, xTextDocument);
-
- // use the service 'com.sun.star.style.ParagraphStyle'
- com.sun.star.uno.XInterface xInterface = (com.sun.star.uno.XInterface)
- xDocMSF.createInstance("com.sun.star.style.ParagraphStyle");
-
- // create a supplier to get the Style family collection
- com.sun.star.style.XStyleFamiliesSupplier xSupplier =
- (com.sun.star.style.XStyleFamiliesSupplier)UnoRuntime.queryInterface(
- com.sun.star.style.XStyleFamiliesSupplier.class, xTextDocument );
-
- // get the NameAccess interface from the Style family collection
- com.sun.star.container.XNameAccess xNameAccess =
- xSupplier.getStyleFamilies();
-
- // select the Paragraph styles, you get the Paragraph style collection
- com.sun.star.container.XNameContainer xParaStyleCollection =
- (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(
- com.sun.star.container.XNameContainer.class,
- xNameAccess.getByName("ParagraphStyles"));
-
- // create a PropertySet to set the properties for the new Paragraphstyle
- com.sun.star.beans.XPropertySet xPropertySet =
- (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xInterface );
- System.out.println( "create a PropertySet to set the properties for the new Paragraphstyle" );
-
- // set some properties from the Paragraph style
- xPropertySet.setPropertyValue("CharFontName", new String( "Helvetica" ) );
- System.out.println( "set name of the font to 'Helvetica'" );
-
- xPropertySet.setPropertyValue("CharHeight", new Float( 36 ) );
- System.out.println( "Change the height of th font to 36" );
-
- xPropertySet.setPropertyValue("CharWeight",
- new Float( com.sun.star.awt.FontWeight.BOLD ) );
- System.out.println( "set the font attribute 'Bold'" );
-
- xPropertySet.setPropertyValue("CharAutoKerning", new Boolean( true ) );
- System.out.println( "set the paragraph attribute 'AutoKerning'" );
- xPropertySet.setPropertyValue("ParaAdjust",
- new Integer( com.sun.star.style.ParagraphAdjust.CENTER_value ) );
- System.out.println( "set the paragraph adjust to LEFT" );
-
- xPropertySet.setPropertyValue("ParaFirstLineIndent", new Integer( 0 ) );
- System.out.println( "set the first line indent to 0 cm" );
-
- xPropertySet.setPropertyValue("BreakType",
- com.sun.star.style.BreakType.PAGE_AFTER );
- System.out.println( "set the paragraph attribute Breaktype to PageAfter" );
-
- // insert the new Paragraph style in the Paragraph style collection
- xParaStyleCollection.insertByName( "myheading", xPropertySet );
- System.out.println( "create new paragraph style, with the values from the Propertyset");
-
- // get the Textrange from the document
- com.sun.star.text.XTextRange xTextRange =
- xTextDocument.getText().getStart();
-
- // get the PropertySet from the current paragraph
- com.sun.star.beans.XPropertySet xParagraphPropertySet =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextRange );
- // change the value from the property 'ParaStyle' to apply the
- // Paragraph style
- // To run the sample with StarOffice 5.2 you'll have to change
- // 'ParaStyleName' to 'ParaStyle' in the next line
- xParagraphPropertySet.setPropertyValue("ParaStyleName",
- new String( "myheading" ) );
- System.out.println( "apply the new paragraph style");
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
- System.out.println("done");
-
- System.exit(0);
- }
-
-
- public static com.sun.star.frame.XDesktop getDesktop() {
- com.sun.star.frame.XDesktop xDesktop = null;
- com.sun.star.lang.XMultiComponentFactory xMCF = null;
-
- try {
- com.sun.star.uno.XComponentContext xContext = null;
-
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- xMCF = xContext.getServiceManager();
- if( xMCF != null ) {
- System.out.println("Connected to a running office ...");
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
- xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
- com.sun.star.frame.XDesktop.class, oDesktop);
- }
- else
- System.out.println( "Can't create a desktop. No connection, no remote office servicemanager available!" );
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- return xDesktop;
- }
-
- public static com.sun.star.text.XTextDocument createTextdocument(
- com.sun.star.frame.XDesktop xDesktop )
- {
- com.sun.star.text.XTextDocument aTextDocument = null;
-
- try {
- com.sun.star.lang.XComponent xComponent = CreateNewDocument(xDesktop,
- "swriter");
- aTextDocument = (com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComponent);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return aTextDocument;
- }
-
-
- protected static com.sun.star.lang.XComponent CreateNewDocument(
- com.sun.star.frame.XDesktop xDesktop,
- String sDocumentType )
- {
- String sURL = "private:factory/" + sDocumentType;
-
- com.sun.star.lang.XComponent xComponent = null;
- com.sun.star.frame.XComponentLoader xComponentLoader = null;
- com.sun.star.beans.PropertyValue xValues[] =
- new com.sun.star.beans.PropertyValue[1];
- com.sun.star.beans.PropertyValue xEmptyArgs[] =
- new com.sun.star.beans.PropertyValue[0];
-
- try {
- xComponentLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- xComponent = xComponentLoader.loadComponentFromURL(
- sURL, "_blank", 0, xEmptyArgs);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return xComponent ;
- }
-}
-
diff --git a/odk/examples/java/Text/StyleInitialization.java b/odk/examples/java/Text/StyleInitialization.java
deleted file mode 100644
index 22d8eb4d..00000000
--- a/odk/examples/java/Text/StyleInitialization.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the Desktop object from the office
-// Step 2: open an empty text document
-// Step 3: enter a example text
-// Step 4: use the paragraph collection
-// Step 5: apply a different paragraph style on the paragraphs
-//***************************************************************************
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.AnyConverter;
-
-public class StyleInitialization {
-
- public static void main(String args[]) {
- // You need the desktop to create a document
- // The getDesktop method does the UNO bootstrapping, gets the
- // remote servie manager and the desktop object.
- com.sun.star.frame.XDesktop xDesktop = null;
- xDesktop = getDesktop();
-
- try {
- // BEGIN: 'Style basics' Section from the Tutorial
-
- // create text document
- com.sun.star.text.XTextDocument xTextDocument = null;
- xTextDocument = createTextdocument( xDesktop );
-
- // the text interface contains all methods and properties to
- // manipulate the content from a text document
- com.sun.star.text.XText xText = null;
- xText = xTextDocument.getText();
-
- String sMyText = "A very short paragraph for illustration only";
-
- // you can travel with the cursor throught the text document.
- // you travel only at the model, not at the view. The cursor that you can
- // see on the document doesn't change the position
- com.sun.star.text.XTextCursor xTextCursor = null;
- xTextCursor = (com.sun.star.text.XTextCursor)
- xTextDocument.getText().createTextCursor();
-
- com.sun.star.beans.XPropertySet oCPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextCursor);
- try {
- oCPS.setPropertyValue("CharFontName","Helvetica");
- }
- catch (Exception ex) {
-
- }
-
- xText.insertString( xTextCursor, "Headline", false );
-
- try {
- oCPS.setPropertyValue("CharFontName","Times");
- }
- catch (Exception ex) {
-
- }
- xText.insertControlCharacter(xTextCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false);
-
- xText.insertString( xTextCursor, sMyText, false );
-
- com.sun.star.text.XTextRange xTextRange = null;
- com.sun.star.beans.XPropertySet xPropertySet = null;
-
- // the text range not the cursor contains the 'parastyle' property
- xTextRange = xText.getEnd();
- xPropertySet = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextRange );
-
- // To run the sample with StarOffice 5.2 you'll have to change
- // 'ParaStyleName' to 'ParaStyle' in the next line
- System.out.println( "Current Parastyle : "
- + xPropertySet.getPropertyValue("ParaStyleName") );
-
- // END: 'Style basics' Section from the Tutorial
-
- // There are two way to travel throught the paragraphs, with a
- // paragraph cursor, or a enumeration.
- // You find both ways in this example
-
- // The first way, with the paragraph cursor
- com.sun.star.text.XParagraphCursor xParagraphCursor = null;
- xParagraphCursor = (com.sun.star.text.XParagraphCursor)
- UnoRuntime.queryInterface(
- com.sun.star.text.XParagraphCursor.class, xTextRange );
-
- xParagraphCursor.gotoStart( false );
- xParagraphCursor.gotoEndOfParagraph( true );
-
- // The second way, with the paragraph enumeration
- com.sun.star.container.XEnumerationAccess xEnumerationAccess = null;
- xEnumerationAccess = (com.sun.star.container.XEnumerationAccess)
- UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xText );
-
- // the enumeration contains all paragraph form the document
- com.sun.star.container.XEnumeration xParagraphEnumeration = null;
- xParagraphEnumeration = xEnumerationAccess.createEnumeration();
-
- com.sun.star.text.XTextContent xParagraph = null;
- com.sun.star.text.XTextRange xWord = null;
-
- com.sun.star.container.XEnumerationAccess xParaEnumerationAccess = null;
- com.sun.star.container.XEnumeration xPortionEnumeration = null;
-
- // check if a paragraph is available
- while ( xParagraphEnumeration.hasMoreElements() ) {
- // get the next paragraph
- xParagraph = (com.sun.star.text.XTextContent)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class,
- xParagraphEnumeration.nextElement());
-
- // you need the method getAnchor to a TextRange -> to manipulate
- // the paragraph
- String sText = xParagraph.getAnchor().getString();
-
- // create a cursor from this paragraph
- com.sun.star.text.XTextCursor xParaCursor = null;
- xParaCursor = xParagraph.getAnchor().getText().createTextCursor();
-
- // goto the start and end of the paragraph
- xParaCursor.gotoStart( false );
- xParaCursor.gotoEnd( true );
-
- // The enumeration from the paragraphs contain parts from the
- // paragraph with a different attributes.
- xParaEnumerationAccess = (com.sun.star.container.XEnumerationAccess)
- UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xParagraph);
- xPortionEnumeration = xParaEnumerationAccess.createEnumeration();
-
- while ( xPortionEnumeration.hasMoreElements() ) {
- // output of all parts from the paragraph with different attributes
- xWord = (com.sun.star.text.XTextRange) UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class,
- xPortionEnumeration.nextElement());
- String sWordString = xWord.getString();
- System.out.println( "Content of the paragraph : " + sWordString );
- }
- }
-
- // BEGIN: 'Finding a suitable style' Section from the Tutorial
-
- // craete a supplier to get the styles-collection
- com.sun.star.style.XStyleFamiliesSupplier xSupplier = null;
- xSupplier = ( com.sun.star.style.XStyleFamiliesSupplier ) UnoRuntime.queryInterface(
- com.sun.star.style.XStyleFamiliesSupplier.class, xTextDocument );
-
- // use the name access from the collection
- com.sun.star.container.XNameAccess xNameAccess = null;
- xNameAccess = xSupplier.getStyleFamilies();
-
- com.sun.star.container.XNameContainer xParaStyleCollection = null;
- xParaStyleCollection = (com.sun.star.container.XNameContainer) UnoRuntime.queryInterface(
- com.sun.star.container.XNameContainer.class, xNameAccess.getByName( "ParagraphStyles" ));
-
- // create a array from strings with the name of all paragraph styles from the text document
- String[] sElementNames = xParaStyleCollection.getElementNames();
- int iElementCount = sElementNames.length;
-
- for( int iCounter = 0; iCounter < iElementCount; iCounter++ ) {
- // specify one paragraph style
- com.sun.star.style.XStyle xStyle = null;
- xStyle = (com.sun.star.style.XStyle) UnoRuntime.queryInterface(
- com.sun.star.style.XStyle.class,
- xParaStyleCollection.getByName( sElementNames[iCounter] ));
-
- // create a property set of all properties from the style
- xPropertySet = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xStyle );
-
- AnyConverter aAnyConv = new AnyConverter();
- String sFontname = aAnyConv.toString(xPropertySet.getPropertyValue("CharFontName"));
- sFontname = sFontname.toLowerCase();
-
- // if the style use the font 'Albany', apply it to the current paragraph
- if( sFontname.compareTo("albany") == 0 ) {
- // create a property set from the current paragraph, to change the paragraph style
- xPropertySet = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextRange );
-
- // To run the sample with StarOffice 5.2 you'll have to change 'ParaStyleName'
- // to 'ParaStyle' in the next line
- xPropertySet.setPropertyValue("ParaStyleName", new String( sElementNames[iCounter] ) );
- System.out.println( "Apply the paragraph style : " + sElementNames[iCounter] );
- break;
- }
- }
- // END: 'Finding a suitable style' Section from the Tutorial
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
-
- System.out.println("Done");
-
- System.exit(0);
-
- }
-
- public static com.sun.star.frame.XDesktop getDesktop() {
- com.sun.star.frame.XDesktop xDesktop = null;
- com.sun.star.lang.XMultiComponentFactory xMCF = null;
-
- try {
- com.sun.star.uno.XComponentContext xContext = null;
-
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- xMCF = xContext.getServiceManager();
- if( xMCF != null ) {
- System.out.println("Connected to a running office ...");
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
- xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
- com.sun.star.frame.XDesktop.class, oDesktop);
- }
- else
- System.out.println( "Can't create a desktop. No connection, no remote office servicemanager available!" );
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- return xDesktop;
- }
-
- public static com.sun.star.text.XTextDocument createTextdocument(
- com.sun.star.frame.XDesktop xDesktop )
- {
- com.sun.star.text.XTextDocument aTextDocument = null;
-
- try {
- com.sun.star.lang.XComponent xComponent = CreateNewDocument(xDesktop,
- "swriter");
- aTextDocument = (com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComponent);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return aTextDocument;
- }
-
-
- protected static com.sun.star.lang.XComponent CreateNewDocument(
- com.sun.star.frame.XDesktop xDesktop,
- String sDocumentType )
- {
- String sURL = "private:factory/" + sDocumentType;
-
- com.sun.star.lang.XComponent xComponent = null;
- com.sun.star.frame.XComponentLoader xComponentLoader = null;
- com.sun.star.beans.PropertyValue xValues[] =
- new com.sun.star.beans.PropertyValue[1];
- com.sun.star.beans.PropertyValue xEmptyArgs[] =
- new com.sun.star.beans.PropertyValue[0];
-
- try {
- xComponentLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- xComponent = xComponentLoader.loadComponentFromURL(
- sURL, "_blank", 0, xEmptyArgs);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return xComponent ;
- }
-}
diff --git a/odk/examples/java/Text/TextDocumentStructure.java b/odk/examples/java/Text/TextDocumentStructure.java
deleted file mode 100644
index 1d91f6f1..00000000
--- a/odk/examples/java/Text/TextDocumentStructure.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: bootstrap UNO and get the remote component context
-// Step 2: open an empty text document
-// Step 3: create an enumeration of all paragraphs
-// Step 4: create an enumeration of all text portions
-//***************************************************************************
-
-import com.sun.star.uno.UnoRuntime;
-
-public class TextDocumentStructure {
-
- public static void main(String args[]) {
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the rmeote service manger
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- // create a new instance of the desktop
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
-
- // get the component laoder from the desktop to create a new
- // text document
- com.sun.star.frame.XComponentLoader xCLoader =
- (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class,oDesktop);
- com.sun.star.beans.PropertyValue [] szEmptyArgs =
- new com.sun.star.beans.PropertyValue [0];
- String strDoc = "private:factory/swriter";
-
- System.out.println("create new text document");
-
- com.sun.star.lang.XComponent xComp = xCLoader.loadComponentFromURL(
- strDoc, "_blank", 0, szEmptyArgs);
-
- // query the new document for the XTextDocument interface
- com.sun.star.text.XTextDocument xTextDocument =
- (com.sun.star.text.XTextDocument)UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComp);
-
- // create some example data
- com.sun.star.text.XText xText = xTextDocument.getText();
- createExampleData( xText );
-
- // Begin section 'The structure of text documents' of the Tutorial
-
- com.sun.star.container.XEnumeration xParagraphEnumeration = null;
- com.sun.star.container.XEnumerationAccess xParaEnumerationAccess = null;
- com.sun.star.container.XEnumeration xPortionEnumeration = null;
- com.sun.star.container.XEnumeration xTextPortionEnum;
- com.sun.star.text.XTextContent xTextElement = null;
-
- System.out.println("create an enumeration of all paragraphs");
- // create an enumeration access of all paragraphs of a document
- com.sun.star.container.XEnumerationAccess xEnumerationAccess =
- (com.sun.star.container.XEnumerationAccess)
- UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xText);
- xParagraphEnumeration = xEnumerationAccess.createEnumeration();
-
- // Loop through all paragraphs of the document
- while ( xParagraphEnumeration.hasMoreElements() ) {
- xTextElement = (com.sun.star.text.XTextContent)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class,
- xParagraphEnumeration.nextElement());
- com.sun.star.lang.XServiceInfo xServiceInfo =
- (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
- com.sun.star.lang.XServiceInfo.class, xTextElement);
-
- // check ifs the current paragraph really a paragraph or an
- // anchor of a frame or picture
- if( xServiceInfo.supportsService("com.sun.star.text.Paragraph") ) {
- com.sun.star.text.XTextRange xTextRange =
- xTextElement.getAnchor();
- System.out.println( "This is a Paragraph" );
-
- // create another enumeration to get all text portions of
- // the paragraph
- xParaEnumerationAccess =
- (com.sun.star.container.XEnumerationAccess)
- UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class,
- xTextElement);
- xTextPortionEnum = xParaEnumerationAccess.createEnumeration();
-
- while ( xTextPortionEnum.hasMoreElements() ) {
- com.sun.star.text.XTextRange xTextPortion =
- (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class,
- xTextPortionEnum.nextElement());
- System.out.println( "Text from the portion : "
- + xTextPortion.getString() );
-
- com.sun.star.beans.XPropertySet xPropertySet =
- (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class,
- xTextPortion);
- System.out.println( "Name of the font : "
- + xPropertySet.getPropertyValue( "CharFontName" ) );
-
- // PropertyState status of each text portion.
- com.sun.star.beans.XPropertyState xPropertyState =
- (com.sun.star.beans.XPropertyState)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertyState.class,
- xTextPortion);
-
- if( xPropertyState.getPropertyState("CharWeight").equals(
- com.sun.star.beans.PropertyState.AMBIGUOUS_VALUE) )
- System.out.println( "- The text range contains more than one different attributes" );
-
- if( xPropertyState.getPropertyState( "CharWeight" ).equals(
- com.sun.star.beans.PropertyState.DIRECT_VALUE ) )
- System.out.println( " - The text range contains hard formats" );
-
- if( xPropertyState.getPropertyState( "CharWeight" ).equals(
- com.sun.star.beans.PropertyState.DEFAULT_VALUE ) )
- System.out.println( " - The text range doesn't contains hard formats" );
- }
- }
- else
- System.out.println( "The text portion isn't a text paragraph" );
- // End section 'The structure of text documents' of the Tutorial
- }
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
- System.out.println("done");
- System.exit(0);
- }
-
- public static void createExampleData( com.sun.star.text.XText xText ) {
-
- try {
- xText.setString( "This is an example sentence" );
-
- com.sun.star.text.XWordCursor xWordCursor =
- (com.sun.star.text.XWordCursor)UnoRuntime.queryInterface(
- com.sun.star.text.XWordCursor.class, xText.getStart());
-
- xWordCursor.gotoNextWord(false);
- xWordCursor.gotoNextWord(false);
- xWordCursor.gotoEndOfWord(true);
-
- com.sun.star.beans.XPropertySet xPropertySet =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xWordCursor );
- xPropertySet.setPropertyValue("CharWeight",
- new Float( com.sun.star.awt.FontWeight.BOLD ));
-
- System.out.println("create example data");
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
-
- }
-}
diff --git a/odk/examples/java/Text/TextReplace.java b/odk/examples/java/Text/TextReplace.java
deleted file mode 100644
index 0194d79b..00000000
--- a/odk/examples/java/Text/TextReplace.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-//***************************************************************************
-// comment: Step 1: get the Desktop object from the office
-// Step 2: open an empty text document
-// Step 3: enter a example text
-// Step 4: replace some english spelled words with US spelled
-//***************************************************************************
-
-
-import com.sun.star.uno.UnoRuntime;
-
-public class TextReplace {
-
- public static void main(String args[]) {
- // You need the desktop to create a document
- // The getDesktop method does the UNO bootstrapping, gets the
- // remote servie manager and the desktop object.
- com.sun.star.frame.XDesktop xDesktop = null;
- xDesktop = getDesktop();
-
- com.sun.star.text.XTextDocument xTextDocument =
- createTextdocument( xDesktop );
-
- createExampleData( xTextDocument );
-
- String mBritishWords[] = {"colour", "neighbour", "centre", "behaviour",
- "metre", "through" };
- String mUSWords[] = { "color", "neighbor", "center", "behavior",
- "meter", "thru" };
-
- try {
- com.sun.star.util.XReplaceDescriptor xReplaceDescr = null;
- com.sun.star.util.XSearchDescriptor xSearchDescriptor = null;
- com.sun.star.util.XReplaceable xReplaceable = null;
-
- xReplaceable = (com.sun.star.util.XReplaceable)
- UnoRuntime.queryInterface(
- com.sun.star.util.XReplaceable.class, xTextDocument);
-
- // You need a descriptor to set properies for Replace
- xReplaceDescr = (com.sun.star.util.XReplaceDescriptor)
- xReplaceable.createReplaceDescriptor();
-
- System.out.println("Change all occurrences of ...");
- for( int iArrayCounter = 0; iArrayCounter < mBritishWords.length;
- iArrayCounter++ )
- {
- System.out.println(mBritishWords[iArrayCounter] +
- " -> " + mUSWords[iArrayCounter]);
- // Set the properties the replace method need
- xReplaceDescr.setSearchString(mBritishWords[iArrayCounter] );
- xReplaceDescr.setReplaceString(mUSWords[iArrayCounter] );
-
- // Replace all words
- xReplaceable.replaceAll( xReplaceDescr );
- }
-
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- System.out.println("Done");
-
- System.exit(0);
-
- }
-
- protected static void createExampleData(
- com.sun.star.text.XTextDocument xTextDocument )
- {
- // Create textdocument and insert example text
- com.sun.star.text.XTextCursor xTextCursor = null;
-
- try {
- xTextCursor = (com.sun.star.text.XTextCursor)
- xTextDocument.getText().createTextCursor();
- com.sun.star.text.XText xText = (com.sun.star.text.XText)
- xTextDocument.getText();
-
- xText.insertString( xTextCursor,
- "He nervously looked all around. Suddenly he saw his ", false );
-
- xText.insertString( xTextCursor, "neighbour ", true );
- com.sun.star.beans.XPropertySet xCPS = (com.sun.star.beans.XPropertySet)
- UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextCursor);
- // Set the word blue
- xCPS.setPropertyValue( "CharColor", new Integer( 255 ) );
- // Go to last character
- xTextCursor.gotoEnd(false);
- xCPS.setPropertyValue( "CharColor", new Integer( 0 ) );
-
- xText.insertString( xTextCursor, "in the alley. Like lightening he darted off to the left and disappeared between the two warehouses almost falling over the trash can lying in the ", false );
-
- xText.insertString( xTextCursor, "centre ", true );
- xCPS = (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, xTextCursor);
- // Set the word blue
- xCPS.setPropertyValue( "CharColor", new Integer( 255 ) );
- // Go to last character
- xTextCursor.gotoEnd(false);
- xCPS.setPropertyValue( "CharColor", new Integer( 0 ) );
-
- xText.insertString( xTextCursor, "of the sidewalk.", false );
-
- xText.insertControlCharacter( xTextCursor,
- com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false );
- xText.insertString( xTextCursor, "He tried to nervously tap his way along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the way he had come.", false );
-
- xTextCursor.gotoStart(false);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- }
-
- public static com.sun.star.frame.XDesktop getDesktop() {
- com.sun.star.frame.XDesktop xDesktop = null;
- com.sun.star.lang.XMultiComponentFactory xMCF = null;
-
- try {
- com.sun.star.uno.XComponentContext xContext = null;
-
- // get the remote office component context
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
-
- // get the remote office service manager
- xMCF = xContext.getServiceManager();
- if( xMCF != null ) {
- System.out.println("Connected to a running office ...");
-
- Object oDesktop = xMCF.createInstanceWithContext(
- "com.sun.star.frame.Desktop", xContext);
- xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
- com.sun.star.frame.XDesktop.class, oDesktop);
- }
- else
- System.out.println( "Can't create a desktop. No connection, no remote office servicemanager available!" );
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
-
-
- return xDesktop;
- }
-
- public static com.sun.star.text.XTextDocument createTextdocument(
- com.sun.star.frame.XDesktop xDesktop )
- {
- com.sun.star.text.XTextDocument aTextDocument = null;
-
- try {
- com.sun.star.lang.XComponent xComponent = CreateNewDocument(xDesktop,
- "swriter");
- aTextDocument = (com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextDocument.class, xComponent);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return aTextDocument;
- }
-
-
- protected static com.sun.star.lang.XComponent CreateNewDocument(
- com.sun.star.frame.XDesktop xDesktop,
- String sDocumentType )
- {
- String sURL = "private:factory/" + sDocumentType;
-
- com.sun.star.lang.XComponent xComponent = null;
- com.sun.star.frame.XComponentLoader xComponentLoader = null;
- com.sun.star.beans.PropertyValue xValues[] =
- new com.sun.star.beans.PropertyValue[1];
- com.sun.star.beans.PropertyValue xEmptyArgs[] =
- new com.sun.star.beans.PropertyValue[0];
-
- try {
- xComponentLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- xComponent = xComponentLoader.loadComponentFromURL(
- sURL, "_blank", 0, xEmptyArgs);
- }
- catch( Exception e) {
- e.printStackTrace(System.err);
- }
-
- return xComponent ;
- }
-}
diff --git a/odk/examples/java/Text/WriterSelector.java b/odk/examples/java/Text/WriterSelector.java
deleted file mode 100644
index 5c90aabc..00000000
--- a/odk/examples/java/Text/WriterSelector.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.uno.UnoRuntime;
-
-/** This class gives you information on the selected objects (text range, text
- * frame, or graphics) at an OpenOffice.org Server. The Office must be started in
- * advance and you must have selected something (text, graphics, ...)
- */
-public class WriterSelector {
- /**
- * @param args No arguments.
- */
- public static void main(String args[]) {
- com.sun.star.uno.XComponentContext xContext = null;
-
- try {
-
- // bootstrap UNO and get the remote component context. The context can
- // be used to get the service manager
- xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
- System.out.println("Connected to a running office ...");
-
- // get the remote office service manager
- com.sun.star.lang.XMultiComponentFactory xMCF =
- xContext.getServiceManager();
-
- // get a new instance of the desktop
- com.sun.star.frame.XDesktop xDesktop = (com.sun.star.frame.XDesktop)
- UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class,
- xMCF.createInstanceWithContext("com.sun.star.frame.Desktop",
- xContext ) );
-
- com.sun.star.frame.XComponentLoader xCompLoader =
- (com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(
- com.sun.star.frame.XComponentLoader.class, xDesktop);
-
- com.sun.star.lang.XComponent xComponent =
- xCompLoader.loadComponentFromURL("private:factory/swriter",
- "_blank", 0, new com.sun.star.beans.PropertyValue[0]);
- {
- com.sun.star.text.XTextDocument xDoc =(com.sun.star.text.XTextDocument)
- UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
- xComponent);
- xDoc.getText().setString("Please select something in this text and press then \"return\" in the shell where you have started the example.\n");
-
- // ensure that the document content is optimal visible
- com.sun.star.frame.XModel xModel =
- (com.sun.star.frame.XModel)UnoRuntime.queryInterface(
- com.sun.star.frame.XModel.class, xDoc);
-
- com.sun.star.view.XViewSettingsSupplier xViewSettings =
- (com.sun.star.view.XViewSettingsSupplier)UnoRuntime.queryInterface(
- com.sun.star.view.XViewSettingsSupplier.class, xModel.getCurrentController());
- xViewSettings.getViewSettings().setPropertyValue(
- "ZoomType", new Short((short)0));
- }
- // test document will be closed later
-
- System.out.println("\nPlease select something in the test document and press then \"return\" to continues the example ...");
- char c = 'X';
- do{
- c = (char) System.in.read();
- }while ((c != 13) && (c != 10));
-
- // Getting the current frame from the OpenOffice.org Server.
- com.sun.star.frame.XFrame xframe = xDesktop.getCurrentFrame();
-
- // Getting the controller.
- com.sun.star.frame.XController xController = xframe.getController();
-
- com.sun.star.view.XSelectionSupplier xSelSupplier =
- (com.sun.star.view.XSelectionSupplier)UnoRuntime.queryInterface(
- com.sun.star.view.XSelectionSupplier.class, xController );
-
- Object oSelection = xSelSupplier.getSelection();
-
- com.sun.star.lang.XServiceInfo xServInfo =
- (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
- com.sun.star.lang.XServiceInfo.class, oSelection );
-
- if ( xServInfo.supportsService("com.sun.star.text.TextRanges") )
- {
- com.sun.star.container.XIndexAccess xIndexAccess =
- (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XIndexAccess.class, oSelection);
-
- int count = xIndexAccess.getCount();
- com.sun.star.text.XTextRange xTextRange = null;
- for ( int i = 0; i < count; i++ ) {
- xTextRange = (com.sun.star.text.XTextRange)
- UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class,
- xIndexAccess.getByIndex(i));
-
- System.out.println( "You have selected a text range: \""
- + xTextRange.getString() + "\"." );
- }
- }
-
- if ( xServInfo.supportsService("com.sun.star.text.TextGraphicObject") )
- {
- System.out.println( "You have selected a graphics." );
- }
-
- if ( xServInfo.supportsService("com.sun.star.text.TextTableCursor") )
- {
- System.out.println( "You have selected a text table." );
- }
-
-
- // close test document
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class,
- xComponent );
-
- if (xCloseable != null ) {
- xCloseable.close(false);
- } else
- {
- xComponent.dispose();
- }
-
- System.exit(0);
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- System.exit(1);
- }
- }
-}
diff --git a/odk/examples/java/Text/oo_smiley.gif b/odk/examples/java/Text/oo_smiley.gif
deleted file mode 100644
index f9fc08d5..00000000
--- a/odk/examples/java/Text/oo_smiley.gif
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/ToDo/Makefile b/odk/examples/java/ToDo/Makefile
deleted file mode 100644
index d597e969..00000000
--- a/odk/examples/java/ToDo/Makefile
+++ /dev/null
@@ -1,168 +0,0 @@
-#*************************************************************************
-#
-# The Contents of this file are made available subject to the terms of
-# the BSD license.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#**************************************************************************
-
-# Builds the Java Calc Addin example of the SDK.
-
-PRJ=../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-
-# Define non-platform/compiler specific settings
-COMP_NAME=ToDo
-COMP_CLASS_OUT=$(OUT_CLASS)/$(COMP_NAME)
-COMP_GEN_OUT=$(OUT_MISC)/$(COMP_NAME)
-COMP_RDB_NAME=$(COMP_NAME).uno.rdb
-COMP_RDB=$(COMP_GEN_OUT)/$(COMP_RDB_NAME)
-COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
-COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
-COMP_JAR_NAME=$(COMP_NAME).uno.jar
-COMP_JAR=$(COMP_CLASS_OUT)/$(COMP_JAR_NAME)
-COMP_JAR_MANIFEST=$(COMP_CLASS_OUT)/$(COMP_NAME).uno.Manifest
-COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
-COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
-COMP_COMPONENTS=$(COMP_NAME).components
-
-IDLFILES = XToDo.idl \
- ToDo.idl
-
-# normally the idl file should be stored in a directory tree fitting the module
-# structure, for the example we know the module structure
-PACKAGE = org/openoffice
-
-COMP_JAVAFILES = ToDo.java
-COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES))
-
-GEN_CLASSFILES = $(patsubst %.idl,$(COMP_CLASS_OUT)/$(PACKAGE)/%.class,$(IDLFILES))
-GEN_TYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(IDLFILES)))
-GEN_URDFILES = $(patsubst %.idl,$(COMP_GEN_OUT)/%.urd,$(IDLFILES))
-
-
-$(COMP_NAME)_CLASSFILES = $(COMP_NAME).class \
- $(COMP_NAME)$(QUOTE)$$$(COMP_NAME)Impl.class
-
-$(COMP_NAME)_CLASSFILES += $(subst $(COMP_CLASS_OUT)/,,$(GEN_CLASSFILES))
-
-SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
- $(PATH_SEPARATOR)$(COMP_CLASS_OUT))
-
-
-# Targets
-.PHONY: ALL
-ALL : JavaToDoExample
-
-include $(SETTINGS)/stdtarget.mk
-
-$(COMP_CLASS_OUT)/%.Manifest :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo UNO-Type-Path: $(basename $*).uno.jar> $@
- @echo RegistrationClassName: $(basename $(basename $(@F)))>> $@
-
-$(COMP_GEN_OUT)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -C -I. -I$(IDL_DIR) -O$(COMP_GEN_OUT) $<
-
-$(COMP_GEN_OUT)/%.rdb : $(GEN_URDFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GEN_URDFILES)
-
-$(GEN_CLASSFILES) : $(COMP_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GEN_TYPELIST) -O$(COMP_CLASS_OUT) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
-
-$(COMP_CLASSFILES) : $(COMP_JAVAFILES) $(GEN_CLASSFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $(COMP_JAVAFILES)
-
-# rule for component jar file
-$(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(COMP_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
-# rule for component package manifest
-$(COMP_GEN_OUT)/%/manifest.xml :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
- @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
- @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_MISC)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
- @echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-
-# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_NAME).components
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_ZIP) $@ $(COMP_NAME).components
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME)
- cd $(subst /,$(PS),$(COMP_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME)
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) META-INF/manifest.xml
-
-$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
-ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
- @echo flagged > $(subst /,$(PS),$@)
-else
- @echo --------------------------------------------------------------------------------
- @echo If you want to install your component automatically, please set the environment
- @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
- @echo possible if no office instance is running.
- @echo --------------------------------------------------------------------------------
-endif
-
-JavaToDoExample : $(COMP_REGISTERFLAG)
- @echo --------------------------------------------------------------------------------
- @echo The $(COMP_NAME) Java component was installed if SDK_AUTO_DEPLOYMENT = YES.
- @echo Please load the "$(QM)ToDo.ods$(QM)" document to see how this component works, see
- @echo the example description.
- @echo -
- @echo $(MAKE) ToDo.ods.load
- @echo --------------------------------------------------------------------------------
-
-ToDo.ods.load : $(COMP_REGISTERFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(COMP_CLASS_OUT))
- -$(DELRECURSIVE) $(subst /,$(PS),$(COMP_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/java/ToDo/ToDo.components b/odk/examples/java/ToDo/ToDo.components
deleted file mode 100644
index 0b667b96..00000000
--- a/odk/examples/java/ToDo/ToDo.components
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Java2" uri="ToDo.uno.jar">
- <implementation name="ToDo$ToDoImpl">
- <service name="org.openoffice.ToDo"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/java/ToDo/ToDo.idl b/odk/examples/java/ToDo/ToDo.idl
deleted file mode 100644
index 317671d1..00000000
--- a/odk/examples/java/ToDo/ToDo.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_ORG_OPENOFFICE_TODO_IDL
-#define INCLUDED_ORG_OPENOFFICE_TODO_IDL
-
-#include <XToDo.idl>
-
-/// org
-module org {
- /// openoffice
- module openoffice {
-
- /// example service
- service ToDo: XToDo;
- };
-};
-
-#endif
diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java
deleted file mode 100644
index 3649dcac..00000000
--- a/odk/examples/java/ToDo/ToDo.java
+++ /dev/null
@@ -1,969 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-import com.sun.star.lib.uno.helper.Factory;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XWeak;
-import com.sun.star.uno.XComponentContext;
-import org.openoffice.*;
-
-// addintional interfaces used by the implementation
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XCellRangeMovement;
-import com.sun.star.sheet.XFunctionAccess;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.table.XCellRange;
-import com.sun.star.table.XCell;
-import com.sun.star.table.CellAddress;
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.table.XColumnRowRange;
-import com.sun.star.table.XTableRows;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.text.XTextRange;
-import com.sun.star.text.XSimpleText;
-import com.sun.star.text.XTextCursor;
-import com.sun.star.text.XText;
-import com.sun.star.text.XTextField;
-
-import java.util.GregorianCalendar;
-import java.util.Calendar;
-import java.util.Vector;
-import java.util.Arrays;
-
-/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
- */
-public class ToDo {
-
- /** This class implements the component. At least the interfaces
- * XInterface, XTypeProvider, and XWeak implemented by the helper class
- * WeakBase and XServiceInfo should be provided by the service.
- */
- public static class ToDoImpl extends WeakBase implements XServiceInfo, XToDo {
-
- /** The service name, that must be used to get an instance of this service.
- */
- private static final String __serviceName = "org.openoffice.ToDo";
-
- /** The initial component contextr, that gives access to
- * the service manager, supported singletons, ...
- * It's often later used
- */
- private XComponentContext m_cmpCtx;
-
- /** The service manager, that gives access to all registered services.
- * It's often later used
- */
- private XMultiComponentFactory m_xMCF;
-
- // Implementation helper variables
- static private final int INT_COLUMN_FEATURE = 0;
- static private final int INT_COLUMN_COMMENT = 1;
- static private final int INT_COLUMN_NEEDEDDAYS = 2;
- static private final int INT_COLUMN_STARTDATE = 3;
- static private final int INT_COLUMN_START_DAY_OF_WEEK = 4;
- static private final int INT_COLUMN_ENDDATE = 5;
- static private final int INT_COLUMN_END_DAY_OF_WEEK = 6;
- static private final int INT_COLUMN_DUEDATE = 7;
- static private final int INT_COLUMN_STATUS = 8;
-
- static private final int INT_ROW_FROM = 14; // 8
-
- static private final int INT_ROW_HOLIDAYS_START = 4;
- static private final int INT_COLUMN_HOLIDAYS_START = 7; // 10
-
- static private final String STRING_SEPARATOR = "/";
-
-
- /** The constructor of the inner class has a XComponenContext parameter.
- * @param xCompContext the initial component context
- */
- public ToDoImpl(XComponentContext xCompContext) {
- try {
- m_cmpCtx = xCompContext;
- m_xMCF = m_cmpCtx.getServiceManager();
- }
- catch( Exception e ) {
- e.printStackTrace(System.err);
- }
- }
-
- /** This method returns an array of all supported service names.
- * @return Array of supported service names.
- */
- public String[] getSupportedServiceNames() {
- return getServiceNames();
- }
-
- public static String[] getServiceNames() {
- String[] sSupportedServiceNames = { __serviceName };
- return sSupportedServiceNames;
- }
-
- /** This method returns true, if the given service will be
- * supported by the component.
- * @param sService Service name.
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService(String sServiceName) {
- return sServiceName.equals( __serviceName );
- }
-
- /** Return the class name of the component.
- * @return Class name of the component.
- */
- public String getImplementationName() {
- return ToDoImpl.class.getName();
- }
-
- /** For every bug/feature listed in a spreadsheet document this method
- * calculates the start date, day of week of the start date, the end date
- * and the day of week of the end date. All calculations are dependent
- * on the values of "Needed Days", "Due Date" and "Status". The columns
- * "Needed Days" and "Status" are mandatory. The first feature/bug should
- * be placed in row nine. The date to start the calculation should be
- * placed in cell C6. The private holidays should be placed in cell K4/K5
- * and below. All rows will be calculated up to the first empty cell in
- * the first column. If a cell in the column "Due Date" will be colored
- * red, you should take a look at your entries.
- * @param aInstance Spreadsheet document.
- * @throws com.sun.star.uno.RuntimeException This exception could occur
- * at every interface method.
- */
- public void recalc( java.lang.Object aInstance )
- throws com.sun.star.uno.RuntimeException {
- try {
- // Querying for the interface XSpreadsheetDocument
- XSpreadsheetDocument xspreadsheetdocument =
- ( XSpreadsheetDocument ) UnoRuntime.queryInterface(
- XSpreadsheetDocument.class, aInstance );
-
- // Querying for the interface XIndexAccess
- XIndexAccess xindexaccess = ( XIndexAccess )
- UnoRuntime.queryInterface( XIndexAccess.class,
- xspreadsheetdocument.getSheets() );
-
- // Getting the first XSpreadsheet
- XSpreadsheet xspreadsheet = (XSpreadsheet)UnoRuntime.queryInterface(
- XSpreadsheet.class, xindexaccess.getByIndex( 0 ));
-
- // Querying for the interface XCellRange on the XSpeadsheet
- XCellRange xcellrange = ( XCellRange )
- UnoRuntime.queryInterface( XCellRange.class, xspreadsheet );
-
- /* Getting the gregorian calendar with the date on which to start
- the calculation */
- GregorianCalendar gregCalAbsoluteStartDate =
- this.getGregorianCalendarFromString(this.getStringFromCell(
- xcellrange, 5, 2 ) );
- gregCalAbsoluteStartDate.add( Calendar.DATE, -1 );
-
- // Set the start date with the absolute start date
- GregorianCalendar gregCalStartDate =
- (GregorianCalendar) gregCalAbsoluteStartDate.clone();
-
- /* Creating the service FunctionAccess, which allows generic
- access to all spreadsheet functions */
- Object objectFunctionAccess =
- m_xMCF.createInstanceWithContext(
- "com.sun.star.sheet.FunctionAccess", m_cmpCtx );
-
- // Querying for the interface XFunctionAccess on service
- // FunctionAccess
- XFunctionAccess xfunctionaccess = (XFunctionAccess)
- UnoRuntime.queryInterface(XFunctionAccess.class,
- objectFunctionAccess );
-
- // Creating vector for holidays
- Vector vectorHolidays = new Vector();
-
- // Get the Official Holidays
- this.getOfficialHolidays( vectorHolidays, xcellrange,
- xfunctionaccess,
- gregCalStartDate.get(
- Calendar.YEAR ) );
-
- // Get the private holidays
- this.getPrivateHolidays(vectorHolidays, xcellrange,
- xfunctionaccess);
-
- // Getting the object array of holidays
- Object[] objectSortedHolidays = vectorHolidays.toArray();
-
- // Sorting the holidays
- Arrays.sort( objectSortedHolidays );
-
- // Collect the Official Holidays and the private holidays
- Object [][]objectHolidays =
- new Object[][] { objectSortedHolidays };
-
- // Row index
- int intRowTo = this.INT_ROW_FROM - 1;
-
- // Getting the feature of the first cell
- String sFeature = this.getStringFromCell(xcellrange,
- intRowTo + 1,
- this.INT_COLUMN_FEATURE);
-
- // Determine the last row with an entry in the first column
- while ( ( sFeature != null ) &&
- ( !sFeature.equals( "" ) ) ) {
- intRowTo++;
- sFeature = this.getStringFromCell( xcellrange,
- intRowTo + 1, this.INT_COLUMN_FEATURE );
- }
-
- // Setting the last row to be calculated
- final int INT_ROW_TO = intRowTo + 1;
-
- // Deleting cells which will be recalculated
- for ( int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO + 5;
- intRow++ ) {
- for ( int intColumn = this.INT_COLUMN_STARTDATE;
- intColumn <= this.INT_COLUMN_END_DAY_OF_WEEK;
- intColumn++ ) {
- this.setStringToCell(xcellrange, intRow, intColumn, "");
- }
- }
-
- /* Clearing the background color of the due date cells and setting
- the hyperlink to the bugtracker */
- for (int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++)
- {
- // Querying for the interface XPropertySet for the cell
- // providing the due date
- XPropertySet xpropertyset = ( XPropertySet )
- UnoRuntime.queryInterface(XPropertySet.class,
- xcellrange.getCellByPosition(
- this.INT_COLUMN_DUEDATE,
- intRow ));
-
- // Changing the background color of the cell to white
- xpropertyset.setPropertyValue( "CellBackColor",
- new Integer( 16777215 ) );
-
- // Getting the cell of the bug id
- XCell xcell = xcellrange.getCellByPosition(
- this.INT_COLUMN_FEATURE, intRow );
-
- // Querying for the interface XSimpleText
- XSimpleText xsimpletext = ( XSimpleText )
- UnoRuntime.queryInterface( XSimpleText.class, xcell );
-
- // Getting the text cursor
- XTextCursor xtextcursor = xsimpletext.createTextCursor();
-
- // Querying for the interface XTextRange
- XTextRange xtextrange = ( XTextRange )
- UnoRuntime.queryInterface( XTextRange.class, xtextcursor );
-
- // Getting the bug ID from the cell
- String sBugID = xtextrange.getString();
- if ( !sBugID.startsWith(
- "http://www.openoffice.org/issues/show_bug.cgi?id=") ) {
- String sBugIDLink =
- "http://www.openoffice.org/issues/show_bug.cgi?id=" + sBugID;
-
- // Querying for the interface XMultiServiceFactory
- XMultiServiceFactory xMSFTextField =
- (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, aInstance );
-
- // Creating an instance of the text field URL
- Object objectTextField =
- xMSFTextField.createInstance(
- "com.sun.star.text.TextField.URL" );
-
- // Querying for the interface XTextField
- XTextField xtextfield = ( XTextField )
- UnoRuntime.queryInterface( XTextField.class,
- objectTextField );
-
- // Querying for the interface XPropertySet
- XPropertySet xpropertysetTextField = ( XPropertySet )
- UnoRuntime.queryInterface( XPropertySet.class,
- xtextfield );
-
- // Setting the URL
- xpropertysetTextField.setPropertyValue( "URL",
- sBugIDLink );
-
- // Setting the representation of the URL
- xpropertysetTextField.setPropertyValue( "Representation",
- sBugID );
-
- // Querying for the interface XText
- XText xtext = ( XText )UnoRuntime.queryInterface(
- XText.class, xcell );
-
- // Delete cell content
- xtextrange.setString( "" );
-
- // Inserting the text field URL to the cell
- xtext.insertTextContent( xtextrange, xtextfield, false );
- }
- }
-
- // Processing all features/bugs in the table
- for (int intRow = this.INT_ROW_FROM; intRow < INT_ROW_TO; intRow++)
- {
- // Getting the cell of the column "Needed Days" in the
- // current row
- XCell xcell = xcellrange.getCellByPosition(
- INT_COLUMN_NEEDEDDAYS, intRow );
-
- // Getting the number of needed days to perform the feature
- int intNeededDays = (int) Math.round( xcell.getValue() );
-
- // Getting the content of a specified cell
- String sStatus = this.getStringFromCell( xcellrange,
- intRow, this.INT_COLUMN_STATUS );
-
- /* Testing if the number of needed days is greater than
- zero and if
- the status is not "done" */
- if ( ( intNeededDays > 0 )
- && !( sStatus.toLowerCase().trim().equals("done")) ) {
- // Getting the start date after a specified number of
- // workdays
- gregCalStartDate = this.getWorkday(
- gregCalStartDate, 1, objectHolidays,
- xfunctionaccess );
-
- // Getting a string with the date format jjjj-mm-dd from
- // the gregorian calendar
- String sDate = this.getStringFromGregorianCalendar(
- gregCalStartDate );
-
- // Set the start date in the specified cell of the table
- this.setStringToCell(xcellrange, intRow,
- this.INT_COLUMN_STARTDATE, sDate);
-
- // For the start day set the day of week in the specified
- // cell of the table
- this.setDayOfWeek( gregCalStartDate,
- xcellrange, intRow,
- this.INT_COLUMN_START_DAY_OF_WEEK );
-
- // Getting the end date after a specified number of workdays
- GregorianCalendar gregCalEndDate =
- this.getWorkday( gregCalStartDate,
- intNeededDays - 1,
- objectHolidays, xfunctionaccess );
-
- // Creating a string with the date format jjjj-mm-dd
- sDate = this.getStringFromGregorianCalendar(
- gregCalEndDate );
-
- // Set the end date in the specified cell of the table
- this.setStringToCell( xcellrange, intRow,
- this.INT_COLUMN_ENDDATE, sDate );
-
- // For the end day set the day of week in the specified
- // cell of the table
- this.setDayOfWeek(gregCalEndDate, xcellrange,
- intRow, this.INT_COLUMN_END_DAY_OF_WEEK);
-
- // Set the initial date for the next loop
- gregCalStartDate = ( GregorianCalendar )
- gregCalEndDate.clone();
-
- // Get the due date from the table
- String sDueDate = this.getStringFromCell(
- xcellrange, intRow, this.INT_COLUMN_DUEDATE );
-
- // Testing if the due date is not empty
- if ( !sDueDate.equals( "" ) ) {
- GregorianCalendar gregCalDueDate =
- this.getGregorianCalendarFromString(sDueDate);
-
- // Testing if the due date is before the calculated
- // end date
- if ( gregCalDueDate.before(
- gregCalEndDate ) ) {
- /* Getting the date when the processing of the
- feature/bug should
- be started at the latest */
- GregorianCalendar gregCalLatestDateToStart =
- this.getWorkday(gregCalDueDate,
- -( intNeededDays - 1 ),
- objectHolidays,
- xfunctionaccess);
-
- // Begin with the current row
- int intRowToInsert = intRow;
-
- // Get the start date for the feature/bug in the
- // current row
- GregorianCalendar gregCalPreviousStartDate =
- this.getGregorianCalendarFromString(
- this.getStringFromCell(
- xcellrange, intRowToInsert,
- this.INT_COLUMN_STARTDATE ) );
-
- // Testing if we have to search for an earlier date
- // to begin
- while ((gregCalLatestDateToStart.before(
- gregCalPreviousStartDate)) &&
- (INT_ROW_FROM != intRowToInsert)) {
- // Decrease the row
- intRowToInsert--;
-
- // Get the start date for the feature/bug in
- // the current row
- String sStartDate = this.getStringFromCell(
- xcellrange, intRowToInsert,
- this.INT_COLUMN_STARTDATE );
-
- // Search until a valid start date is found
- while ( sStartDate.equals( "" ) ) {
- // Decrease the row
- intRowToInsert--;
-
- // Get the start date for the feature/bug
- // in the current row
- sStartDate = this.getStringFromCell(
- xcellrange, intRowToInsert,
- this.INT_COLUMN_STARTDATE );
- }
-
- // Get the GregorianCalender format for the
- // start date
- gregCalPreviousStartDate =
- this.getGregorianCalendarFromString(
- sStartDate );
- }
-
- // Getting the cell of the column "Needed Days"
- // in the row where to insert
- XCell xcellNeededDaysWhereToInsert =
- xcellrange.getCellByPosition(
- INT_COLUMN_NEEDEDDAYS, intRowToInsert );
- // Getting the number of needed days to perform
- // the feature
- int intNeededDaysWhereToInsert = (int)
- Math.round(
- xcellNeededDaysWhereToInsert.getValue());
-
- GregorianCalendar gregCalPreviousNewEndDate =
- this.getWorkday(gregCalPreviousStartDate,
- intNeededDays - 1 +
- intNeededDaysWhereToInsert,
- objectHolidays,
- xfunctionaccess);
- String sPreviousDueDate = this.getStringFromCell(
- xcellrange, intRowToInsert,
- this.INT_COLUMN_DUEDATE );
-
- GregorianCalendar gregCalPreviousDueDate = null;
-
- if ( !sPreviousDueDate.equals( "" ) ) {
- gregCalPreviousDueDate =
- this.getGregorianCalendarFromString(
- sPreviousDueDate );
- }
-
- if ( ( intRowToInsert == intRow ) ||
- ( gregCalPreviousNewEndDate.after(
- gregCalPreviousDueDate ) ) ) {
- // Querying for the interface XPropertySet for
- // the cell providing the due date
- XPropertySet xpropertyset = ( XPropertySet )
- UnoRuntime.queryInterface(
- XPropertySet.class,
- xcellrange.getCellByPosition(
- this.INT_COLUMN_DUEDATE,
- intRow ) );
-
- // Changing the background color of the cell
- // to red
- xpropertyset.setPropertyValue(
- "CellBackColor", new Integer( 16711680 ) );
- } else {
- // Querying for the interface XColumnRowRange
- // on the XCellRange
- XColumnRowRange xcolumnrowrange =
- ( XColumnRowRange)UnoRuntime.queryInterface(
- XColumnRowRange.class, xcellrange );
- // Inserting one row to the table
- XTableRows xTableRows =
- xcolumnrowrange.getRows();
- xTableRows.insertByIndex( intRowToInsert, 1 );
-
- // Querying for the interface
- // XCellRangeMovement on XCellRange
- XCellRangeMovement xcellrangemovement =
- (XCellRangeMovement)UnoRuntime.queryInterface(
- XCellRangeMovement.class, xcellrange );
-
- // Creating the cell address of the destination
- CellAddress celladdress = new CellAddress();
- celladdress.Sheet = 0;
- celladdress.Column = 0;
- celladdress.Row = intRowToInsert;
-
- // Creating the cell range of the source
- CellRangeAddress cellrangeaddress =
- new CellRangeAddress();
- cellrangeaddress.Sheet = 0;
- cellrangeaddress.StartColumn = 0;
- cellrangeaddress.StartRow = intRow + 1;
- cellrangeaddress.EndColumn = 8;
- cellrangeaddress.EndRow = intRow + 1;
-
- // Moves the cell range to another position in
- // the document
- xcellrangemovement.moveRange(celladdress,
- cellrangeaddress);
-
- // Removing the row not needed anymore
- xcolumnrowrange.getRows().removeByIndex(intRow
- + 1, 1);
-
- // Set the current row, because we want to
- // recalculate all rows below
- intRow = intRowToInsert - 1;
-
- // Tests at which line we want to insert
- if ( intRow >= this.INT_ROW_FROM ) {
- // Get the start date
- gregCalStartDate =
- this.getGregorianCalendarFromString(
- this.getStringFromCell( xcellrange,
- intRow,this.INT_COLUMN_ENDDATE));
- }
- else {
- // Set the start date with the absolute s
- // tart date
- gregCalStartDate = (GregorianCalendar)
- gregCalAbsoluteStartDate.clone();
- }
- }
- }
- }
- }
- }
- }
- catch( Exception exception ) {
- showExceptionMessage( exception );
- }
- }
-
- /** Getting a string from a gregorian calendar.
- * @param gregCal Date to be converted.
- * @return string (converted gregorian calendar).
- */
- public String getStringFromGregorianCalendar( GregorianCalendar gregCal ) {
- String sDate = ( gregCal.get( Calendar.MONTH ) + 1 )
- + STRING_SEPARATOR + gregCal.get( Calendar.DATE )
-// + STRING_SEPARATOR + ( gregCal.get( Calendar.MONTH ) + 1 )
- + STRING_SEPARATOR + gregCal.get( Calendar.YEAR );
-
- return sDate;
- }
-
- /** Getting a GregorianCalendar from a string.
- * @param sDate String to be converted.
- * @return The result of the converting of the string.
- */
- public GregorianCalendar getGregorianCalendarFromString( String sDate ) {
- int []intDateValue = this.getDateValuesFromString( sDate );
-
- return( new GregorianCalendar( intDateValue[ 2 ], intDateValue[ 0 ],
- intDateValue[ 1 ] ) );
- }
-
- /** Getting the day, month and year from a string.
- * @param sDate String to be parsed.
- * @return Returns an array of integer variables.
- */
- public int[] getDateValuesFromString( String sDate) {
- int[] intDateValues = new int[ 3 ];
-
- int intPositionFirstTag = sDate.indexOf( STRING_SEPARATOR );
- int intPositionSecondTag = sDate.indexOf(STRING_SEPARATOR,
- intPositionFirstTag + 1);
-
- // Getting the value of the month
- intDateValues[ 0 ] = Integer.parseInt(
- sDate.substring(0, intPositionFirstTag)) - 1;
- // Getting the value of the day
- intDateValues[ 1 ] = Integer.parseInt(
- sDate.substring(intPositionFirstTag + 1, intPositionSecondTag));
- // Getting the value of the year
- intDateValues[ 2 ] = Integer.parseInt(
- sDate.substring(intPositionSecondTag + 1, sDate.length()));
-
- return intDateValues;
- }
-
- /** Getting a content from a specified cell.
- * @param xcellrange Providing access to cells.
- * @param intRow Number of row.
- * @param intColumn Number of column.
- * @return String from the specified cell.
- */
- public String getStringFromCell( XCellRange xcellrange, int intRow,
- int intColumn ) {
- XTextRange xtextrangeStartDate = null;
-
- try {
- // Getting the cell holding the information about the start date
- XCell xcellStartDate = xcellrange.getCellByPosition(intColumn,
- intRow);
- // Querying for the interface XTextRange on the XCell
- xtextrangeStartDate = (XTextRange)
- UnoRuntime.queryInterface(XTextRange.class, xcellStartDate);
- }
- catch( Exception exception ) {
- this.showExceptionMessage( exception );
- }
-
- // Getting the start date
- return xtextrangeStartDate.getString().trim();
- }
-
- /** Writing a specified string to a specified cell.
- * @param xcellrange Providing access to the cells.
- * @param intRow Number of row.
- * @param intColumn Number of column.
- * @param sDate Date to write to the cell.
- */
- public void setStringToCell( XCellRange xcellrange, int intRow,
- int intColumn, String sDate ) {
- try {
- // Getting the cell holding the information on the day to start
- XCell xcellStartDate = xcellrange.getCellByPosition(intColumn,
- intRow);
- // Querying for the interface XTextRange on the XCell
- XTextRange xtextrange = (XTextRange)
- UnoRuntime.queryInterface(XTextRange.class, xcellStartDate);
- // Setting the new start date
- xtextrange.setString( sDate );
- }
- catch( Exception exception ) {
- this.showExceptionMessage( exception );
- }
- }
-
- /** Calculates the week of day and calls the method "setStringToCell".
- * @param gregCal Day to be written to the cell.
- * @param xcellrange Providing access to the cells.
- * @param intRow Number of row.
- * @param intColumn Number of column.
- */
- public void setDayOfWeek( GregorianCalendar gregCal,
- XCellRange xcellrange, int intRow,
- int intColumn) {
- int intDayOfWeek = gregCal.get( Calendar.DAY_OF_WEEK );
- String sDayOfWeek = "";
- if ( intDayOfWeek == Calendar.MONDAY ) {
- sDayOfWeek = "MON";
- } else if ( intDayOfWeek == Calendar.TUESDAY ) {
- sDayOfWeek = "TUE";
- } else if ( intDayOfWeek == Calendar.WEDNESDAY ) {
- sDayOfWeek = "WED";
- } else if ( intDayOfWeek == Calendar.THURSDAY ) {
- sDayOfWeek = "THU";
- } else if ( intDayOfWeek == Calendar.FRIDAY ) {
- sDayOfWeek = "FRI";
- }
-
- this.setStringToCell( xcellrange, intRow, intColumn,
- sDayOfWeek );
- }
-
- /** Calculates the dates of the official holidays with help of Calc
- * functions.
- * @param vectorHolidays Holding all holidays.
- * @param xcellrange Providing the cells.
- * @param xfunctionaccess Provides access to functions of the Calc.
- * @param intYear Year to calculate the official holidays.
- */
- public void getOfficialHolidays(
- Vector vectorHolidays,
- XCellRange xcellrange,
- XFunctionAccess xfunctionaccess,
- int intYear ) {
- try {
- // Official Holidays for how many years?
- final int intHowManyYears = 2;
-
- // Get the Official Holiday for two years
- for ( int intNumberOfYear = 0;
- intNumberOfYear <= ( intHowManyYears - 1 );
- intNumberOfYear++ ) {
- intYear += intNumberOfYear;
-
- // Getting the Easter sunday
- Double dEasterSunday = ( Double )
- xfunctionaccess.callFunction(
- "EASTERSUNDAY", new Object[] { new Integer(intYear) });
-
- int intEasterSunday = (int)Math.round(
- dEasterSunday.doubleValue());
-
- // New-year
- vectorHolidays.addElement( xfunctionaccess.callFunction(
- "DATE",
- new Object[] {
- new Integer( intYear ),
- new Integer( 1 ),
- new Integer( 1 ) } ));
-
- // Good Friday
- vectorHolidays.addElement(
- new Double( intEasterSunday - 2 ) );
-
- // Easter monday
- vectorHolidays.addElement(
- new Double( intEasterSunday + 1 ) );
-
- // Labour Day
- vectorHolidays.addElement( xfunctionaccess.callFunction(
- "DATE",
- new Object[] {
- new Integer( intYear ),
- new Integer( 5 ),
- new Integer( 1 ) } ));
-
- // Ascension Day
- vectorHolidays.addElement(new Double(intEasterSunday + 39 ));
-
- // Pentecost monday
- vectorHolidays.addElement(new Double(intEasterSunday + 50 ));
-
- // German Unification
- vectorHolidays.addElement( xfunctionaccess.callFunction(
- "DATE",
- new Object[] {
- new Integer( intYear ),
- new Integer( 10 ),
- new Integer( 3 ) } ));
-
- // Christmas Day First
- vectorHolidays.addElement( xfunctionaccess.callFunction(
- "DATE",
- new Object[] {
- new Integer( intYear ),
- new Integer( 12 ),
- new Integer( 25 ) } ));
-
- // Christmas Day Second
- vectorHolidays.addElement( xfunctionaccess.callFunction(
- "DATE",
- new Object[] {
- new Integer( intYear ),
- new Integer( 12 ),
- new Integer( 26 ) } ));
- }
- }
- catch( Exception exception ) {
- this.showExceptionMessage( exception );
- }
- }
-
- /** Returns the serial number of the date before or after a specified
- * number of workdays.
- * @param gregCalStartDate Date to start with the calculation.
- * @param intDays Number of workdays (e.g. 5 or -3).
- * @param objectHolidays Private and public holidays to take into account.
- * @param xfunctionaccess Allows to call functions from the Calc.
- * @return The gregorian date before or after a specified number of
- * workdays.
- */
- public GregorianCalendar getWorkday(
- GregorianCalendar gregCalStartDate,
- int intDays, Object[][] objectHolidays,
- XFunctionAccess xfunctionaccess ) {
- GregorianCalendar gregCalWorkday = null;
-
- try {
- // Getting the value of the start date
- Double dDate = ( Double ) xfunctionaccess.callFunction(
- "DATE",
- new Object[] {
- new Integer( gregCalStartDate.get( Calendar.YEAR ) ),
- new Integer( gregCalStartDate.get( Calendar.MONTH ) + 1 ),
- new Integer( gregCalStartDate.get( Calendar.DATE ) )
- } );
-
- Double dWorkday = ( Double ) xfunctionaccess.callFunction(
- "com.sun.star.sheet.addin.Analysis.getWorkday",
- new Object[] { dDate, new Integer( intDays ), objectHolidays } );
-
- Double dYear = ( Double ) xfunctionaccess.callFunction(
- "YEAR", new Object[] { dWorkday } );
- Double dMonth = ( Double ) xfunctionaccess.callFunction(
- "MONTH", new Object[] { dWorkday } );
- Double dDay = ( Double ) xfunctionaccess.callFunction(
- "DAY", new Object[] { dWorkday } );
-
- gregCalWorkday = new GregorianCalendar(
- dYear.intValue(),
- dMonth.intValue() - 1,
- dDay.intValue() );
- }
- catch( Exception exception ) {
- this.showExceptionMessage( exception );
- }
-
- return gregCalWorkday;
- }
-
- /** Getting the holidays from the spreadsheet.
- * @param vectorHolidays Holding all holidays.
- * @param xcellrange Providing the cells.
- * @param xfunctionaccess Provides the access to functions of the Calc.
- */
- public void getPrivateHolidays( Vector vectorHolidays,
- XCellRange xcellrange,
- XFunctionAccess xfunctionaccess ) {
- try {
- int intRow = this.INT_ROW_HOLIDAYS_START;
- int intColumn = this.INT_COLUMN_HOLIDAYS_START;
-
- double dHolidayStart = xcellrange.getCellByPosition(
- intColumn, intRow ).getValue();
-
- double dHolidayEnd = xcellrange.getCellByPosition(
- intColumn + 1, intRow ).getValue();
-
- while ( dHolidayStart != 0 ) {
- if ( dHolidayEnd == 0 ) {
- vectorHolidays.addElement(
- new Integer( (int) Math.round(
- dHolidayStart ) ) );
- }
- else {
- for ( int intHoliday = (int) Math.round(
- dHolidayStart );
- intHoliday <= (int) Math.round( dHolidayEnd );
- intHoliday++ ) {
- vectorHolidays.addElement( new Double( intHoliday ) );
- }
- }
-
- intRow++;
- dHolidayStart = xcellrange.getCellByPosition(
- intColumn, intRow).getValue();
- dHolidayEnd = xcellrange.getCellByPosition(
- intColumn + 1, intRow).getValue();
- }
- }
- catch( Exception exception ) {
- this.showExceptionMessage( exception );
- }
- }
-
- /** Showing the stack trace in a JOptionPane.
- * @param sMessage The message to show.
- */
- public void showMessage( String sMessage ) {
- javax.swing.JFrame jframe = new javax.swing.JFrame();
- jframe.setLocation(100, 100);
- jframe.setSize(300, 200);
- jframe.setVisible(true);
- javax.swing.JOptionPane.showMessageDialog(
- jframe, sMessage, "Debugging information",
- javax.swing.JOptionPane.INFORMATION_MESSAGE);
- jframe.dispose();
- }
-
- /** Writing the stack trace from an exception to a string and calling
- * the method showMessage() with this string.
- * @param exception The occurred exception.
- * @see showMessage
- */
- public void showExceptionMessage( Exception exception ) {
- java.io.StringWriter swriter = new java.io.StringWriter();
- java.io.PrintWriter printwriter =
- new java.io.PrintWriter( swriter );
- exception.printStackTrace( printwriter);
- System.err.println( exception );
- this.showMessage( swriter.getBuffer().substring(0) );
- }
- }
-
- /**
- * Gives a factory for creating the service.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns a <code>XSingleComponentFactory</code> for creating
- * the component
- * @param sImplName the name of the implementation for which a
- * service is desired
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleComponentFactory __getComponentFactory(String sImplName) {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplName.equals( ToDoImpl.class.getName() ) )
- xFactory = Factory.createComponentFactory(ToDoImpl.class,
- ToDoImpl.getServiceNames());
-
- return xFactory;
- }
-
- /**
- * Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>
- * <p>
- * @return returns true if the operation succeeded
- * @param regKey the registryKey
- * @see com.sun.star.comp.loader.JavaLoader
- */
- // This method not longer necessary since OOo 3.4 where the component registration
- // was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-
-// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
-// return Factory.writeRegistryServiceInfo(ToDoImpl.class.getName(),
-// ToDoImpl.getServiceNames(), regKey);
-// }
-}
-
diff --git a/odk/examples/java/ToDo/ToDo.ods b/odk/examples/java/ToDo/ToDo.ods
deleted file mode 100644
index 344a5c2e..00000000
--- a/odk/examples/java/ToDo/ToDo.ods
+++ /dev/null
Binary files differ
diff --git a/odk/examples/java/ToDo/XToDo.idl b/odk/examples/java/ToDo/XToDo.idl
deleted file mode 100644
index 10d592f7..00000000
--- a/odk/examples/java/ToDo/XToDo.idl
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * the BSD license.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *************************************************************************/
-
-#ifndef INCLUDED_ORG_OPENOFFICE_XTODO_IDL
-#define INCLUDED_ORG_OPENOFFICE_XTODO_IDL
-
-
-/// org
-module org {
- /// openoffice
- module openoffice {
- /// example interface
- interface XToDo {
- void recalc( [in] any aInstance );
- };
- };
-};
-
-#endif
diff --git a/odk/examples/java/makefile.mk b/odk/examples/java/makefile.mk
deleted file mode 100644
index 564b615e..00000000
--- a/odk/examples/java/makefile.mk
+++ /dev/null
@@ -1,155 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-#----------------------------------------------------
-# this makefile is only used for copying the example
-# files into the SDK
-#----------------------------------------------------
-
-DRAWING_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/Drawing$/SDraw.java \
- $(DESTDIRJAVAEXAMPLES)$/Drawing$/Makefile
-
-SPREADSHEET_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/SCalc.java \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/EuroAdaption.java \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/ChartTypeChange.java \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/CalcAddins.java \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/CalcAddins.ods \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/XCalcAddins.idl \
- $(DESTDIRJAVAEXAMPLES)$/Spreadsheet$/Makefile
-
-TEXT_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/Text$/SWriter.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/StyleInitialization.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/TextDocumentStructure.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/TextReplace.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/BookmarkInsertion.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/HardFormatting.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/StyleCreation.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/WriterSelector.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/GraphicsInserter.java \
- $(DESTDIRJAVAEXAMPLES)$/Text$/oo_smiley.gif \
- $(DESTDIRJAVAEXAMPLES)$/Text$/Makefile
-
-DOCUMENTHANDLING_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/DocumentHandling$/DocumentConverter.java \
- $(DESTDIRJAVAEXAMPLES)$/DocumentHandling$/DocumentLoader.java \
- $(DESTDIRJAVAEXAMPLES)$/DocumentHandling$/DocumentPrinter.java \
- $(DESTDIRJAVAEXAMPLES)$/DocumentHandling$/DocumentSaver.java \
- $(DESTDIRJAVAEXAMPLES)$/DocumentHandling$/Makefile \
- $(DESTDIRJAVAEXAMPLES)$/DocumentHandling$/test$/test1.odt
-
-CONVERTERSERVLET_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/ConverterServlet$/ConverterServlet.html \
- $(DESTDIRJAVAEXAMPLES)$/ConverterServlet$/ConverterServlet.java \
- $(DESTDIRJAVAEXAMPLES)$/ConverterServlet$/web.xml \
- $(DESTDIRJAVAEXAMPLES)$/ConverterServlet$/Makefile \
- $(DESTDIRJAVAEXAMPLES)$/ConverterServlet$/README
-
-EMBEDDEDOBJECT_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/EmbedDocument$/EmbeddedObject$/EmbeddedObject.xcu \
- $(DESTDIRJAVAEXAMPLES)$/EmbedDocument$/EmbeddedObject$/OwnEmbeddedObject.java \
- $(DESTDIRJAVAEXAMPLES)$/EmbedDocument$/EmbeddedObject$/EditorFrame.java \
- $(DESTDIRJAVAEXAMPLES)$/EmbedDocument$/EmbeddedObject$/Makefile \
- $(DESTDIRJAVAEXAMPLES)$/EmbedDocument$/EmbeddedObject$/OwnEmbeddedObjectFactory.java
-
-INSPECTOR_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/Inspector.jpg \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/InspectorThumbnail.jpg \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/Inspector.uno.xml \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/Inspector.java \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/Makefile \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/TestInspector.java \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/XInstanceInspector.idl \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/InstanceInspector.idl \
- $(DESTDIRJAVAEXAMPLES)$/Inspector$/InstanceInspectorTest.odt
-
-NOTESACCESS_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/NotesAccess$/NotesAccess.java \
- $(DESTDIRJAVAEXAMPLES)$/NotesAccess$/Makefile \
- $(DESTDIRJAVAEXAMPLES)$/NotesAccess$/Stocks.nsf
-
-TODO_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/ToDo$/ToDo.java \
- $(DESTDIRJAVAEXAMPLES)$/ToDo$/ToDo.ods \
- $(DESTDIRJAVAEXAMPLES)$/ToDo$/ToDo.uno.xml \
- $(DESTDIRJAVAEXAMPLES)$/ToDo$/ToDo.idl \
- $(DESTDIRJAVAEXAMPLES)$/ToDo$/XToDo.idl \
- $(DESTDIRJAVAEXAMPLES)$/ToDo$/Makefile
-
-MINIMALCOMPONENT_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/MinimalComponent$/MinimalComponent.idl \
- $(DESTDIRJAVAEXAMPLES)$/MinimalComponent$/MinimalComponent.java\
- $(DESTDIRJAVAEXAMPLES)$/MinimalComponent$/MinimalComponent.uno.xml \
- $(DESTDIRJAVAEXAMPLES)$/MinimalComponent$/TestMinimalComponent.java\
- $(DESTDIRJAVAEXAMPLES)$/MinimalComponent$/Makefile
-
-PROPERTYSET_FILES= \
- $(DESTDIRJAVAEXAMPLES)$/PropertySet$/PropTest.java \
- $(DESTDIRJAVAEXAMPLES)$/PropertySet$/PropertySet.odt \
- $(DESTDIRJAVAEXAMPLES)$/PropertySet$/Makefile
-
-DIR_FILE_LIST= \
- $(DRAWING_FILES) \
- $(SPREADSHEET_FILES) \
- $(TEXT_FILES) \
- $(DOCUMENTHANDLING_FILES) \
- $(CONVERTERSERVLET_FILES) \
- $(EMBEDDEDOBJECT_FILES) \
- $(INSPECTOR_FILES) \
- $(NOTESACCESS_FILES) \
- $(TODO_FILES) \
- $(MINIMALCOMPONENT_FILES) \
- $(PROPERTYSET_FILES)
-
-DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG=$(MISC)$/ex_java_dirs_created.txt
-DIR_FILE_FLAG=$(MISC)$/ex_java_files.txt
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-all : \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG)
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
-
-
diff --git a/odk/inc/makefile.mk b/odk/inc/makefile.mk
deleted file mode 100644
index c22fda1d..00000000
--- a/odk/inc/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-
diff --git a/odk/inc/pch/precompiled_odk.cxx b/odk/inc/pch/precompiled_odk.cxx
deleted file mode 100644
index 1002adaa..00000000
--- a/odk/inc/pch/precompiled_odk.cxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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_odk.hxx"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/inc/pch/precompiled_odk.hxx b/odk/inc/pch/precompiled_odk.hxx
deleted file mode 100644
index 82f2d4a9..00000000
--- a/odk/inc/pch/precompiled_odk.hxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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:49:53.545647
-
-#ifdef PRECOMPILED_HEADERS
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/index.html b/odk/index.html
deleted file mode 100644
index 6490e235..00000000
--- a/odk/index.html
+++ /dev/null
@@ -1,203 +0,0 @@
-<html>
-<head>
- <title>OpenOffice.org %PRODUCT_RELEASE% SDK - Overview</title>
- <link rel="stylesheet" type="text/css" href="docs/sdk_styles.css">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="author" content="J&uuml;rgen Schmidt">
- <meta name="created" content="2004-12-14">
-</head>
-<body class="sdkbody">
-
-<table class="table1" cellpadding=0>
- <tr style="background-image:url(docs/images/sdk_head-2.png)">
- <td colspan="3" align="left"><img src="docs/images/sdk_head-1.png" width="800" height="120" usemap="#Map" border="0"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing30" src="docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3">
- <table class="table2">
- <tr>
- <td><img class="nothing8" src="docs/images/nada.gif"></td>
- <td>
- <p>OpenOffice.org %PRODUCT_RELEASE% software is a complete, feature-rich
- office productivity suite that provides, in combination with this
- SDK, all the essential tools for building and deploying custom
- solutions that build on, or integrate with, the OpenOffice.org %PRODUCT_RELEASE% suite
- of products.</p>
- <p>The SDK is a development kit for OpenOffice.org %PRODUCT_RELEASE%, which
- eases the development of office components. It provides a set of
- libraries, binaries, header, and IDL files which have final API's
- and can only be extended with new functionality. This set of libraries
- and binaries is the minimum set of functions needed to use system
- abstraction for base functionality and for using UNO (Universal
- Network Objects) component technology. The UNO component model is the
- base of the whole Office API. The SDK provides everything necessary
- to use the Office API from external programs (e.g. Java, C++) or to
- extend the Office functionality with new components (e.g. new filter
- components, CalcAddin functions). It is compatible over several
- versions because the API remains unaffected and will only be extended
- with new functions.</p>
- <p>The SDK provides the basic building blocks for external developers
- to develop components in any language for which a binding exists.
- Currently, there are language bindings for OpenOffice.org %PRODUCT_RELEASE% Basic, Java,
- and different C++ compilers on different platforms, for OpenOffice.org %PRODUCT_RELEASE%,
- thus covering the two most commonly used programming languages. There
- will be no limit for office automation in heterogeneous environments.
- Currently supported platforms of the SDK are Linux, Solaris (sparc,
- x86), and Windows.</p>
- <p>The SDK also contains <a href="docs/common/ref/com/sun/star/module-ix.html" title="link to the IDL reference documentation"> reference</a> documentation
- for the API and a complete <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide" title="link to the Developer's Guide in the Wiki">Developer's Guide</a> is availbale online in the OpenOffice.org Wiki, with
- lots of examples, which introduce the API, explain the concepts behind
- it, and make it possible for all users to quickly get started with
- the Office API.</p>
- </td>
- <td><img class="nothing8" src="docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td><img class="nothing8" src="docs/images/nada.gif"></td>
- <td><img class="line" src="docs/images/sdk_line-1.gif"></td>
- <td><img class="nothing8" src="docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td><img class="nothing8" src="docs/images/nada.gif"></td>
- <td>
- <table class="table3">
- <tr valign="top">
- <td colspan="4" class="head1">Content</td>
- </tr>
- <tr>
- <td colspan="4"><img class="nothing8" src="docs/images/nada.gif"></td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="docs/install.html" title="link to the installation guide">Installation Guide</a></td>
- <td class="content70">An overview of all necessary
- installation steps (e.g. environment variables) to use this SDK.</td>
- </tr>
- <tr valign="middle">
- <td><img class="nothing10" src="docs/images/nada.gif"></td>
- <td colspan="3"><img class="line" src="docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide" title="link to the Developer's Guide in the Wiki">Developer's Guide</a></td>
- <td class="content70">Detailed documentation, explaining the OpenOffice.org %PRODUCT_RELEASE%
- API and the concepts behind it, with a rich set of examples,
- implemented mainly in Java. This documentation is online in the
- OpenOffice.org Wiki.</td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="docs/common/ref/com/sun/star/module-ix.html" title="link to the IDL reference documentation">IDL Reference</a></td>
- <td class="content70">Complete OpenOffice.org %PRODUCT_RELEASE% API reference.</td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="docs/java/ref/index.html" title="link to the Java UNO runtime API reference documentation">Java UNO Runtime Reference </a></td>
- <td class="content70">Reference documentation of the Java UNO runtime API.</td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="docs/cpp/ref/names/index.html" title="link to the C++ API reference documentation">C++ Reference</a></td>
- <td class="content70">Reference documentation of the C++ UNO runtime and a
- set of C/C++ base and helper functions and classes to abstract from
- the system layer.</td>
- </tr>
- <tr valign="middle">
- <td><img class="nothing10" src="docs/images/nada.gif"></td>
- <td colspan="3"><img class="line" src="docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="docs/tools.html" title="link to the tools overview page">Development Tools</a></td>
- <td class="content70">Overview and a short description of the UNO
- development tools.</td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="examples/examples.html" title="link to the examples overview page">Examples</a></td>
- <td class="content70">A collection of examples in different
- programming languages (Java, C++, Basic, OLE, CLI).</td>
- </tr>
- <tr valign="middle">
- <td><img class="nothing10" src="docs/images/nada.gif"></td>
- <td colspan="3"><img class="line" src="docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office" title="link to the OASIS Open Office XML Format TC (online)">OASIS Open Document Format for Office Applications (OpenDocument) TC</a></td>
- <td class="content70">Link to the OASIS Open Document Format for
- Office Applications (OpenDocument) Technical Committee where you
- can find the latest information about the OASIS Open Document XML
- file format which is the default document format
- for OpenOffice.org %PRODUCT_RELEASE%.</td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="http://xml.openoffice.org/xml_specification.pdf" title="link to the OpenOffice.org XML File Format Specification">OpenOffice.org XML File Format</a></td>
- <td class="content70">Specification of the initial OpenOffice.org
- XML File Format.</td>
- </tr>
- <tr valign="middle">
- <td><img class="nothing10" src="docs/images/nada.gif"></td>
- <td colspan="3"><img class="line" src="docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td class="content4"><img src="docs/images/arrow-1.gif"></td>
- <td colspan="2"><a href="share/readme/LICENSE_en-US.html" title="link to the SDK license file">License</a></td>
- <td class="content70">The license for the OpenOffice.org %PRODUCT_RELEASE% SDK.</td>
- </tr>
- <tr valign="middle">
- <td><img class="nothing10" src="docs/images/nada.gif"></td>
- <td colspan="3"><img class="line" src="docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr valign="top">
- <td colspan="4"><img class="nothing8" src="docs/images/nada.gif"></td>
- </tr>
- <tr valign="top">
- <td colspan="4" class="head1">Additional Resources</td>
- </tr>
- <tr valign="top">
- <td colspan="4"><img class="nothing8" src="docs/images/nada.gif"></td>
- </tr>
- <tr valign="middle">
- <td class="content4"><img class="arrow" src="docs/images/arrow-1.gif"</td>
- <td width="5%"><a target="_blank" href="http://www.oracle.com/us/products/applications/open-office" title="link to the Oracle Open Office homepage (online)"><img class="appicon" src="docs/images/orc-main-app_32.png"></a></td>
- <td width="21%"><a target="_blank" href="http://www.oracle.com/us/products/applications/open-office" title="link to the Oracle Open Office homepage (online)">Oracle Open Office&#153</a></td>
- <td class="content70">Full-featured suite of office productivity tools.</td>
- </tr>
- <tr valign="middle">
- <td class="content4"><img class="arrow" src="docs/images/arrow-1.gif"</td>
- <td width="5%"><a target="_blank" href="http://www.openoffice.org/" title="link to the OpenOffice.org homepage (online)"><img class="appicon" src="docs/images/ooo-main-app_32.png"></a></td>
- <td width="21%"><a target="_blank" href="http://www.openoffice.org/" title="link to the OpenOffice.org homepage (online)">OpenOffice.org&#153</a></td>
- <td class="content70">Open Source community project of office-productivity software.</td>
- </tr>
- </table>
- </td>
- <td><img class="nothing8" src="docs/images/nada.gif"></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="3"><img class="nothing30" src="docs/images/nada.gif"></td>
- </tr>
- <tr>
- <td colspan="3"><img class="line" src="docs/images/sdk_line-1.gif"></td>
- </tr>
- <tr>
- <td colspan="3">
- <div class="centertext">
- <p><img class="oraclelogo" src="docs/images/odk-footer-logo.gif" title="Sponsored by Oracle" alt="Oracle Logo" />
- Copyright &copy; 2010, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.<p>
- </div>
- </td>
- </tr>
-</table>
-<map name="Map">
- <area shape="rect" coords="10,68,93,105" href="http://www.oracle.com">
-</map>
-</body>
-</html>
diff --git a/odk/no_localization b/odk/no_localization
deleted file mode 100644
index 3ce3aa0e..00000000
--- a/odk/no_localization
+++ /dev/null
@@ -1 +0,0 @@
-Touch me to prevent that the localisation process extracts strings #i85733#
diff --git a/odk/pack/checkbin/makefile.mk b/odk/pack/checkbin/makefile.mk
deleted file mode 100644
index 52c744c6..00000000
--- a/odk/pack/checkbin/makefile.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=checkbin
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-.IF "$(L10N_framework)"==""
-
-ODKCHECKFILE=$(MISC)$/$(TARGET).txt
-
-all: $(ODKCHECKFILE)
-
-$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
- @echo "" > $(ODKCHECKFILE)
-# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS
- $(PERL) $(PRJ)$/util$/check.pl $(DESTDIR) $(DESTPLATFROM) "$(EXEPOSTFIX)" $(ODKCHECKFILE)
-# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
- cat $(ODKCHECKFILE)
-
-.ELSE
-pseudo:
-
-.ENDIF
diff --git a/odk/pack/checkidl/makefile.mk b/odk/pack/checkidl/makefile.mk
deleted file mode 100644
index f585bb3c..00000000
--- a/odk/pack/checkidl/makefile.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=checkidl
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-.IF "$(L10N_framework)"==""
-ODKCHECKFILE=$(MISC)$/$(TARGET).txt
-
-all : $(ODKCHECKFILE)
-
-$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
- @echo "" > $(ODKCHECKFILE)
-# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS
- -diff -br $(DESTDIRIDL) $(SOLARIDLDIR) $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
-# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
- cat $(ODKCHECKFILE)
-
-.ELSE
-pseudo:
-
-.ENDIF
diff --git a/odk/pack/checkinc/makefile.mk b/odk/pack/checkinc/makefile.mk
deleted file mode 100644
index f8c092da..00000000
--- a/odk/pack/checkinc/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=checkinc
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-.IF "$(L10N_framework)"==""
-ODKCHECKFILE=$(MISC)$/$(TARGET).txt
-
-all : $(ODKCHECKFILE)
-
-$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
- @echo "" > $(ODKCHECKFILE)
-# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS
- -diff -br $(DESTDIRINC)$/osl $(SOLARINCDIR)$/osl $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/rtl $(SOLARINCDIR)$/rtl $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/sal $(SOLARINCDIR)$/sal $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/store $(SOLARINCDIR)$/store $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
-# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
- cat $(ODKCHECKFILE)
-.ELSE
-pseudo:
-
-.ENDIF
diff --git a/odk/pack/checkinc2/makefile.mk b/odk/pack/checkinc2/makefile.mk
deleted file mode 100644
index 78e0aa35..00000000
--- a/odk/pack/checkinc2/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=checkinc2
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-.IF "$(L10N_framework)"==""
-ODKCHECKFILE=$(MISC)$/$(TARGET).txt
-
-all : $(ODKCHECKFILE)
-
-$(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
- @echo "" > $(ODKCHECKFILE)
-# THE PERL SCRIPT DELETES THE CHECK FILE, WHEN AN ERROR OCCURS
- -diff -br $(DESTDIRINC)$/typelib $(SOLARINCDIR)$/typelib $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/uno $(SOLARINCDIR)$/uno $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/bridges $(SOLARINCDIR)$/bridges $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/cppu $(SOLARINCDIR)$/cppu $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/com$/sun$/star$/uno $(SOLARINCDIR)$/com$/sun$/star$/uno $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
- -diff -br $(DESTDIRINC)$/cppuhelper $(SOLARINCDIR)$/cppuhelper $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
-# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
- cat $(ODKCHECKFILE)
-.ELSE
-pseudo:
-
-.ENDIF
diff --git a/odk/pack/copying/addsym-macosx.sh b/odk/pack/copying/addsym-macosx.sh
deleted file mode 100755
index d3bac6e5..00000000
--- a/odk/pack/copying/addsym-macosx.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# This script is needed in the process of generating exported
-# symbols list on Mac OS X
-
-# Please note that the awk expression expects to get the output of 'nm -gx'!
-# On Panther we have to filter out symbols with a value "1f" otherwise external
-# symbols will erroneously be added to the generated export symbols list file.
-awk -v SYMBOLSREGEXP="^__ZTI.*$|^__ZTS.*$" '
-match ($6,SYMBOLSREGEXP) > 0 && $6 !~ /_GLOBAL_/ { if (($2 != 1) && ( $2 != "1f" ) ) print $6 }'
-
diff --git a/odk/pack/copying/dk.mk b/odk/pack/copying/dk.mk
deleted file mode 100644
index 4cbe5b1a..00000000
--- a/odk/pack/copying/dk.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# OpenOffice.org @@RELEASE@@ SDK dependent settings
-SDKVERSION=@@RELEASE@@
-BUILDID=@@BUILDID@@
diff --git a/odk/pack/copying/idl_chapter_refs.txt b/odk/pack/copying/idl_chapter_refs.txt
deleted file mode 100644
index 58d93cce..00000000
--- a/odk/pack/copying/idl_chapter_refs.txt
+++ /dev/null
@@ -1,7555 +0,0 @@
-LINK:Documentation/DevGuide/AppendixC/The_File_Content_Provider#Commands_and_Properties
-DESCR:AppendixC - The File Content Provider - Commands and Properties
-REF:
-com.sun.star.ucb.XContent
-com.sun.star.lang.XServiceInfo
-com.sun.star.ucb.XContentCreator
-com.sun.star.lang.XComponent
-com.sun.star.container.XChild
-com.sun.star.ucb.XCommandInfoChangeNotifier
-com.sun.star.beans.XPropertySetInfoChangeNotifier
-com.sun.star.beans.XPropertiesChangeNotifier
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XCharacterClassification
-DESCR:OfficeDev - Implementing a New Locale - XCharacterClassification
-REF:
-com.sun.star.i18n.XCharacterClassification
-TOPIC:
-com.sun.star.i18n.XCharacterClassification
-
-LINK:Documentation/DevGuide/ProUNO/Service_Manager_and_Component_Context
-DESCR:ProUNO - Service Manager and Component Context
-REF:
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.lang.XMultiComponentFactory
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/ProUNO/C++/Mapping_of_Singletons
-DESCR:ProUNO - C++ - Mapping of Singletons
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.uno.DeploymentException
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XNumberFormatCode
-DESCR:OfficeDev - Overview and Using the API - XNumberFormatCode
-REF:
-com.sun.star.i18n.XLocaleData
-com.sun.star.i18n.XNumberFormatCode
-TOPIC:
-com.sun.star.i18n.XNumberFormatCode
-
-LINK:Documentation/DevGuide/ProUNO/C++/Exception_Handling_in_C++
-DESCR:ProUNO - C++ - Exception Handling in C++
-REF:
-com.sun.star.bridge.XUnoUrlResolver
-TOPIC:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-
-LINK:Documentation/DevGuide/Charts/Data_Access
-DESCR:Charts - Data Access
-REF:
-com.sun.star.chart.XChartDataArray
-com.sun.star.chart.ChartDataRowSource
-com.sun.star.table.CellRange
-com.sun.star.chart.XChartData
-com.sun.star.chart.XChartDocument
-com.sun.star.chart.XChartDataChangeEventListener
-com.sun.star.chart.ChartDataArray
-com.sun.star.lang.XEventListener
-TOPIC:
-com.sun.star.chart.XChartDataArray
-com.sun.star.chart.XChartData
-com.sun.star.chart.ChartDataArray
-com.sun.star.chart.ChartData
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XBreakIterator
-DESCR:OfficeDev - Implementing a New Locale - XBreakIterator
-REF:
-com.sun.star.i18n.XBreakIterator
-TOPIC:
-com.sun.star.i18n.XBreakIterator
-
-LINK:Documentation/DevGuide/Spreadsheets/Named_Ranges
-DESCR:Spreadsheets - Named Ranges
-REF:
-com.sun.star.sheet.XNamedRanges
-com.sun.star.sheet.NamedRangeFlag
-com.sun.star.container.XNamed
-com.sun.star.sheet.XNamedRange
-com.sun.star.sheet.Border
-com.sun.star.sheet.XCellRangeReferrer
-com.sun.star.sheet.NamedRange
-TOPIC:
-com.sun.star.sheet.XNamedRanges
-
-LINK:Documentation/DevGuide/Database/Moving_the_Result_Set_Cursor
-DESCR:Database - Moving the Result Set Cursor
-REF:
-com.sun.star.sdbc.XResultSet
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Preprocessing
-DESCR:WritingUNO - Preprocessing
-REF:
-com.sun.star.lang.IllegalArgumentException
-com.sun.star.connection.NoConnectException
-com.sun.star.connection.ConnectionSetupException
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/First_Contact#Getting_Started
-DESCR:FirstSteps - First Contact - Getting Started
-REF:
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XMultiComponentFactory
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/Database/Handling_Unsupported_Functionality
-DESCR:Database - Handling Unsupported Functionality
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-com.sun.star.sdbc.SQLException
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Document_Events
-DESCR:OfficeDev - Document Events
-REF:
-com.sun.star.document.EventObject
-com.sun.star.frame.GlobalEventBroadcaster
-com.sun.star.container.NoSuchElementException
-com.sun.star.lang.XComponent
-com.sun.star.document.OfficeDocument
-com.sun.star.document.XEventBroadcaster
-com.sun.star.lang.EventObject
-com.sun.star.beans.PropertyValue
-com.sun.star.document.XEventsSupplier
-com.sun.star.document.Events
-com.sun.star.container.XNameReplace
-com.sun.star.document.XEventListener
-TOPIC:
-com.sun.star.document.EventObject
-com.sun.star.document.XEventBroadcaster
-com.sun.star.lang.EventObject
-com.sun.star.document.Events
-
-LINK:Documentation/DevGuide/GUI/Radio_Button
-DESCR:GUI - Radio Button
-REF:
-com.sun.star.awt.UnoControlRadioButtonModel
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleExtendedComponent
-DESCR:Accessibility - XAccessibleExtendedComponent
-REF:
-com.sun.star.accessibility.XAccessibleComponent
-com.sun.star.accessibility.XAccessibleExtendedComponent
-TOPIC:
-com.sun.star.accessibility.XAccessibleExtendedComponent
-
-LINK:Documentation/DevGuide/WritingUNO/Disable_Commands#Disabling_Commands_at_Runtime
-DESCR:WritingUNO - Disable Commands - Disabling Commands at Runtime
-REF:
-TOPIC:
-com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.util.XChangesBatch
-
-LINK:Documentation/DevGuide/Database/Catalog_Service
-DESCR:Database - Catalog Service
-REF:
-com.sun.star.sdbcx.XDataDefinitionSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Handling_Text_Document_Files#Creating_and_Loading_Text_Documents
-DESCR:Text - Handling Text Document Files - Creating and Loading Text Documents
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.lang.XComponent
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.Desktop
-TOPIC:
-com.sun.star.frame.XComponentLoader
-
-LINK:Documentation/DevGuide/Text/Overall_Document_Features#Paragraph_Styles
-DESCR:Text - Overall Document Features - Styles - Paragraph Styles
-REF:
-com.sun.star.style.ConditionalParagraphStyle
-com.sun.star.style.ParagraphProperties
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.style.ParagraphPropertiesAsian
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Redline
-DESCR:Text - Redline
-REF:
-com.sun.star.text.RedlinePortion
-com.sun.star.beans.XPropertySet
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XText
-com.sun.star.document.XRedlinesSupplier
-TOPIC:
-com.sun.star.document.XRedlinesSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/Properties_of_a_Type
-DESCR:OfficeDev - Properties of a Type
-REF:
-com.sun.star.document.TypeDetection
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleRelationSet
-DESCR:Accessibility - XAccessibleRelationSet
-REF:
-com.sun.star.accessibility.XAccessibleRelationSet
-com.sun.star.accessibility.AccessibleRelation
-com.sun.star.accessibility.AccessibleRelationType
-TOPIC:
-com.sun.star.accessibility.XAccessibleRelationSet
-com.sun.star.accessibility.AccessibleRelation
-com.sun.star.accessibility.AccessibleRelationType
-
-LINK:Documentation/DevGuide/OfficeDev/Java_Window_Integration#A_Hack
-DESCR:OfficeDev - Java Window Integration - Using the Window Handle - A Hack
-REF:
-com.sun.star.awt.XSystemDependentWindowPeer
-com.sun.star.awt.XWindow
-com.sun.star.awt.XWindowPeer
-com.sun.star.frame.XFrame
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Text_Field
-DESCR:Basic - Text Field
-REF:
-com.sun.star.awt.UnoControlEdit
-com.sun.star.awt.XTextComponent
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Intercepting_Context_Menus#Changing_a_Menu
-DESCR:WritingUNO - Intercepting Context Menus - Writing an Interceptor - Changing a Menu
-REF:
-com.sun.star.ui.ContextMenuExecuteEvent
-com.sun.star.ui.ActionTriggerContainer
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.ui.ActionTriggerSeparator
-com.sun.star.ui.ActionTrigger
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Properties_of_Cell_Ranges
-DESCR:Spreadsheets - Properties of Cell Ranges
-REF:
-com.sun.star.table.CellRange
-com.sun.star.sheet.SheetCellRange
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Cursor#Cursor_Movement
-DESCR:Spreadsheets - Cell Cursor - Cursor Movement
-REF:
-com.sun.star.table.XCellCursor
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.table.XCellRange
-com.sun.star.table.CellCursor
-com.sun.star.sheet.XSheetCellCursor
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XCalendar
-DESCR:OfficeDev - Implementing a New Locale - XCalendar
-REF:
-com.sun.star.i18n.XCalendar
-TOPIC:
-com.sun.star.i18n.XCalendar
-
-LINK:Documentation/DevGuide/Spreadsheets/Querying_for_Cells_with_Specific_Properties
-DESCR:Spreadsheets - Querying for Cells with Specific Properties
-REF:
-com.sun.star.sheet.XCellRangesQuery
-com.sun.star.sheet.CellFlags
-com.sun.star.sheet.XSheetCellRanges
-com.sun.star.sheet.XFormulaQuery
-com.sun.star.sheet.FormulaResult
-com.sun.star.sheet.SheetRangesQuery
-TOPIC:
-com.sun.star.sheet.XCellRangesQuery
-com.sun.star.sheet.XFormulaQuery
-com.sun.star.sheet.SheetRangesQuery
-
-LINK:Documentation/DevGuide/Text/Embedded_Objects
-DESCR:Text - Embedded Objects
-REF:
-com.sun.star.text.TextEmbeddedObject
-com.sun.star.text.BaseFrame
-com.sun.star.document.XEmbeddedObjectSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/Implementing_Accessible_Objects#Implementation_Rules
-DESCR:Accessibility - Implementing Accessible Objects - Implementation Rules
-REF:
-com.sun.star.accessibility.XAccessibleTable
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Column_and_Row_Access
-DESCR:Spreadsheets - Column and Row Access
-REF:
-com.sun.star.table.XTableColumns
-com.sun.star.table.XColumnRowRange
-com.sun.star.table.XTableRows
-TOPIC:
-com.sun.star.table.XColumnRowRange
-
-LINK:Documentation/DevGuide/OfficeDev/Path_Settings
-DESCR:OfficeDev - Path Settings
-REF:
-com.sun.star.util.PathSettings
-TOPIC:
-com.sun.star.util.PathSettings
-
-LINK:Documentation/DevGuide/Spreadsheets/Printing_Spreadsheet_Documents#Page_Breaks_and_Scaling_for_Printout
-DESCR:Spreadsheets - Printing Spreadsheet Documents - Page Breaks and Scaling for Printout
-REF:
-com.sun.star.style.XStyleFamiliesSupplier
-com.sun.star.table.TableColumn
-com.sun.star.table.TableRow
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Formatting#Cell_Formatting
-DESCR:Spreadsheets - Formatting - Cell Formatting
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.table.BorderLine
-com.sun.star.table.CellProperties
-com.sun.star.table.TableBorder
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Implementing_without_Helpers#XComponent
-DESCR:WritingUNO - Implementing without Helpers - XComponent
-REF:
-com.sun.star.lang.XEventListener
-com.sun.star.lang.DisposedException
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Forms_Container
-DESCR:Forms - Forms Container
-REF:
-com.sun.star.form.Forms
-com.sun.star.drawing.DrawPage
-com.sun.star.form.FormComponent
-com.sun.star.form.FormComponents
-com.sun.star.form.XFormsSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Extensions/Location_of_Installed_Extensions
-DESCR:Extensions - Location of Installed Extensions
-REF:
-com.sun.star.deployment.XPackageInformationProvider
-com.sun.star.deployment.PackageInformationProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Structs
-DESCR:ProUNO - Structs
-REF:
-com.sun.star.beans.Optional
-com.sun.star.beans.Ambiguous
-com.sun.star.beans.Defaulted
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Lifetime_of_UNO_objects
-DESCR:ProUNO - Lifetime of UNO objects
-REF:
-TOPIC:
-com.sun.star.lang.XComponent
-com.sun.star.uno.XInterface
-com.sun.star.uno.XWeak
-
-LINK:Documentation/DevGuide/Scripting/Writing_Macros#Creating_dialogs_from_macros
-DESCR:Scripting - Writing Macros - Creating dialogs from macros
-REF:
-com.sun.star.awt.XDialogProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Java_Window_Integration
-DESCR:OfficeDev - Java Window Integration
-REF:
-TOPIC:
-com.sun.star.awt.XToolkit
-com.sun.star.awt.Toolkit
-com.sun.star.awt.XWindowPeer
-
-LINK:Documentation/DevGuide/GUI/The_Toolkit_Service
-DESCR:GUI - The Toolkit Service
-REF:
-com.sun.star.awt.XToolkit
-com.sun.star.awt.XWindow
-com.sun.star.awt.Toolkit
-com.sun.star.frame.XFrame
-com.sun.star.awt.WindowClass
-com.sun.star.frame.XLayoutManager
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/A_Hierarchy_of_Models
-DESCR:Forms - A Hierarchy of Models
-REF:
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XChild
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#Document_Specific_Features
-DESCR:OfficeDev - Component - Models - Document Specific Features
-REF:
-com.sun.star.sheet.SpreadsheetDocument
-com.sun.star.lang.XServiceInfo
-com.sun.star.drawing.DrawingDocument
-com.sun.star.chart.ChartDocument
-com.sun.star.formula.FormulaProperties
-com.sun.star.text.TextDocument
-com.sun.star.presentation.PresentationDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Indexes_and_Index_Marks#Indexes
-DESCR:Text - Indexes and Index Marks - Indexes
-REF:
-com.sun.star.text.BibliographyDataType
-com.sun.star.text.BibliographyDataField
-com.sun.star.text.IllustrationIndex
-com.sun.star.beans.XPropertySet
-com.sun.star.container.XIndexReplace
-com.sun.star.text.Bibliography
-com.sun.star.text.BaseIndex
-com.sun.star.container.XNameAccess
-com.sun.star.text.DocumentIndexLevelFormat
-com.sun.star.text.ContentIndex
-com.sun.star.text.XDocumentIndex
-com.sun.star.text.UserIndex
-com.sun.star.text.TextContent
-com.sun.star.container.XNamed
-com.sun.star.text.ObjectIndex
-com.sun.star.text.TableIndex
-com.sun.star.text.XDocumentIndexesSupplier
-com.sun.star.beans.PropertyValues
-com.sun.star.text.DocumentIndex
-com.sun.star.container.XIndexAccess
-com.sun.star.text.ChapterFormat
-com.sun.star.beans.PropertyValue
-com.sun.star.text.DocumentIndexes
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Forms
-DESCR:Forms - Forms
-REF:
-com.sun.star.form
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/The_Service_Manager_Component#Instantiation
-DESCR:ProUNO - Bridge - The Service Manager Component - Instantiation
-REF:
-TOPIC:
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/WritingUNO/Implementing_without_Helpers#XInterface
-DESCR:WritingUNO - Implementing without Helpers - XInterface
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Usage
-DESCR:Database - Usage
-REF:
-com.sun.star.sdbcx.Privilege
-com.sun.star.sdbc.ResultSetType
-com.sun.star.sdbc.TransactionIsolation
-com.sun.star.sdbc.XConnection
-com.sun.star.sdb.RowSet
-com.sun.star.sdbc.RowSet
-com.sun.star.sdb.ResultSet
-com.sun.star.beans.XPropertyChangeListener
-com.sun.star.sdb.CommandType
-com.sun.star.sdbc.XRowSet
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Instantiating_UNO_Services
-DESCR:ProUNO - Basic - Instantiating UNO Services
-REF:
-com.sun.star.ucb.SimpleFileAccess
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.frame.Desktop
-com.sun.star.lang.ServiceManager
-TOPIC:
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/Text/Shape_Objects_in_Text
-DESCR:Text - Shape Objects in Text
-REF:
-TOPIC:
-com.sun.star.text.TextEmbeddedObject
-com.sun.star.text.BaseFrame
-com.sun.star.text.Shape
-com.sun.star.text.TextGraphicObject
-com.sun.star.text.TextFrame
-
-LINK:Documentation/DevGuide/Forms/Automatic_Key_Generation
-DESCR:Forms - Automatic Key Generation
-REF:
-com.sun.star.sdb.XRowSetApproveBroadcaster
-TOPIC:
-com.sun.star.sdb.XRowSetApproveBroadcaster
-
-LINK:Documentation/DevGuide/ProUNO/Java/Getting_a_Service_Manager
-DESCR:ProUNO - Java - Getting a Service Manager
-REF:
-com.sun.star.loader.Java
-com.sun.star.lang.MultiServiceFactory
-com.sun.star.loader.Java2
-com.sun.star.connection.Acceptor
-com.sun.star.connection.Connector
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.bridge.BridgeFactory
-com.sun.star.frame.Desktop
-com.sun.star.lang.ServiceManager
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.bridge.XUnoUrlResolver
-com.sun.star.lang.DisposedException
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.lang.XMultiComponentFactory
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/Drawings/Shapes
-DESCR:Drawings - Shapes
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.drawing.RectangleShape
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Component_Context#ComponentContext_API
-DESCR:ProUNO - Component Context - ComponentContext API
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XMultiComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Implementing_without_Helpers#XTypeProvider
-DESCR:WritingUNO - Implementing without Helpers - XTypeProvider
-REF:
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/AppendixC/The_WebDAV_Content_Provider#Creation_of_New_DCP_Contents
-DESCR:AppendixC - The WebDAV Content Provider - Creation of New DCP Contents
-REF:
-com.sun.star.ucb.XContentCreator
-TOPIC:
-com.sun.star.ucb.XContentCreator
-
-LINK:Documentation/DevGuide/Database/Database_Design#Determining_Feature_Support
-DESCR:Database - Database Design - Retrieving Information about a Database - Determining Feature Support
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Writing_the_Filtering_Component
-DESCR:OfficeDev - Writing the Filtering Component
-REF:
-com.sun.star.xml.XMLExportFilter
-com.sun.star.xml.ImportFilter
-com.sun.star.xml.ExportFilter
-com.sun.star.xml.sax.XDocumentHandler
-com.sun.star.xml.XMLImportFilter
-TOPIC:
-com.sun.star.xml.ImportFilter
-com.sun.star.xml.ExportFilter
-com.sun.star.xml.sax.XDocumentHandler
-com.sun.star.xml.XMLImportFilter
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Using_Automation_Objects_from_UNO#Properties_with_Arguments
-DESCR:ProUNO - Bridge - Using Automation Objects from UNO - Instantiation - Properties with Arguments
-REF:
-com.sun.star.bridge.oleautomation.PropertyPutArgument
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Command_Line_Registry_Tools#Component_Registration_Tool
-DESCR:WritingUNO - Command Line Registry Tools - Component Registration Tool
-REF:
-com.sun.star.loader.SharedLibrary
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Implementation
-DESCR:WritingUNO - Implementation
-REF:
-com.sun.star.frame.ProtocolHandler
-com.sun.star.lang.XInitialization
-com.sun.star.frame.XNotifyingDispatch
-com.sun.star.frame.XDispatchProvider
-com.sun.star.frame.Frame
-com.sun.star.frame.XFrame
-com.sun.star.frame.XDispatch
-com.sun.star.frame.XStatusListener
-TOPIC:
-com.sun.star.frame.ProtocolHandler
-com.sun.star.frame.XDispatchProvider
-
-LINK:Documentation/DevGuide/Forms/Data_Validation
-DESCR:Forms - Data Validation
-REF:
-com.sun.star.form.validation.XValidator
-com.sun.star.sdb.RowChangeAction
-com.sun.star.form.XUpdateListener
-com.sun.star.sdb.XRowSetApproveListener
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/The_Exporter#Exporter_Filtering
-DESCR:OfficeDev - The Exporter - Exporter Filtering
-REF:
-com.sun.star.xml.sax.XDocumentHandler
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/General_Structure
-DESCR:Basic - General Structure
-REF:
-com.sun.star.io.XInputStreamProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Using_Services#Using_Properties
-DESCR:FirstSteps - Using Services - Using Properties
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-com.sun.star.beans.XPropertySet
-
-LINK:Documentation/DevGuide/Drawings/Storing
-DESCR:Drawings - Storing
-REF:
-com.sun.star.frame.XStorable
-TOPIC:
-com.sun.star.frame.XStorable
-
-LINK:Documentation/DevGuide/Charts/Prerequisites
-DESCR:Charts - Prerequisites
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.lang.XInitialization
-com.sun.star.lang.XServiceName
-com.sun.star.util.XRefreshable
-com.sun.star.chart.Diagram
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Writing_the_Filtering_Component#XImportFilter
-DESCR:OfficeDev - Writing the Filtering Component - XImportFilter
-REF:
-com.sun.star.xml.XMLImportFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Data_Types
-DESCR:ProUNO - Data Types
-REF:
-TOPIC:
-com.sun.star.uno.TypeClass
-
-LINK:Documentation/DevGuide/UCB/Services_and_Interfaces
-DESCR:UCB - Services and Interfaces
-REF:
-com.sun.star.ucb.XContentProviderManager
-com.sun.star.ucb.XContent
-com.sun.star.ucb.Content
-com.sun.star.ucb.XContentCreator
-com.sun.star.ucb.XContentProvider
-com.sun.star.ucb.ContentProvider
-com.sun.star.container.XChild
-com.sun.star.ucb.XCommandProcessor2
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor
-com.sun.star.ucb.UniversalContentBroker
-TOPIC:
-com.sun.star.ucb.XContent
-com.sun.star.ucb.Content
-com.sun.star.ucb.XContentCreator
-com.sun.star.container.XChild
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor2
-com.sun.star.ucb.XCommandProcessor
-
-LINK:Documentation/DevGuide/Spreadsheets/Function_Descriptions
-DESCR:Spreadsheets - Function Descriptions
-REF:
-com.sun.star.sheet.XAddIn
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Creating_Frames_Manually#Frame_Creation
-DESCR:OfficeDev - Creating Frames Manually - Frame Creation
-REF:
-com.sun.star.frame.Frame
-TOPIC:
-com.sun.star.frame.Frame
-com.sun.star.frame.XFrame
-
-LINK:Documentation/DevGuide/GUI/Font-specific_Properties
-DESCR:GUI - Font-specific Properties
-REF:
-com.sun.star.awt.FontUnderline
-com.sun.star.awt.FontType
-com.sun.star.awt.FontPitch
-com.sun.star.awt.FontStrikeout
-com.sun.star.awt.FontFamily
-com.sun.star.awt.FontDescriptor
-com.sun.star.awt.FontSlant
-com.sun.star.awt.FontEmphasisMark
-com.sun.star.awt.CharSet
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/Accessibility_Tree
-DESCR:Accessibility - Accessibility Tree
-REF:
-com.sun.star.accessibility.XAccessibleContext
-com.sun.star.lang.IndexOutOfBoundsException
-com.sun.star.accessibility.XAccessible
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Indexed_Cells_and_Cell_Ranges
-DESCR:Text - Indexed Cells and Cell Ranges
-REF:
-com.sun.star.table.XCell
-com.sun.star.text.XText
-com.sun.star.table.XCellRange
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Defining_an_Exception
-DESCR:WritingUNO - Defining an Exception
-REF:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_C++_Bridges#Binary_UNO_Interfaces
-DESCR:AdvUNO - UNO C++ Bridges - Binary UNO Interfaces
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/The_XComponent_Interface
-DESCR:ProUNO - The XComponent Interface
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.lang.XEventListener
-com.sun.star.lang.DisposedException
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/File_IO
-DESCR:Basic - File IO
-REF:
-com.sun.star.io.XActiveDataSource
-com.sun.star.io.XStream
-com.sun.star.io.XInputStream
-com.sun.star.io.XActiveDataSink
-com.sun.star.io.TextInputStream
-com.sun.star.ucb.SimpleFileAccess
-com.sun.star.io.XTextOutputStream
-com.sun.star.io.XTextInputStream
-com.sun.star.io.TextOutputStream
-com.sun.star.io.XOutputStream
-com.sun.star.ucb.XSimpleFileAccess2
-com.sun.star.ucb.XSimpleFileAccess
-com.sun.star.io.XSeekable
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XViewDataSupplier
-DESCR:OfficeDev - Component - Models - XViewDataSupplier
-REF:
-com.sun.star.document.XViewDataSupplier
-com.sun.star.container.XIndexAccess
-com.sun.star.beans.PropertyValue
-TOPIC:
-com.sun.star.document.XViewDataSupplier
-
-LINK:Documentation/DevGuide/Charts/Accessing_Existing_Chart_Documents
-DESCR:Charts - Accessing Existing Chart Documents
-REF:
-com.sun.star.table.XTableChartsSupplier
-com.sun.star.container.XIndexAccess
-com.sun.star.drawing.XDrawPage
-com.sun.star.sheet.Spreadsheet
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/Accessing_a_UCB_Content
-DESCR:UCB - Accessing a UCB Content
-REF:
-com.sun.star.ucb.XContentProvider
-com.sun.star.ucb.XContentIdentifierFactory
-TOPIC:
-com.sun.star.ucb.XContentProvider
-com.sun.star.ucb.XContentIdentifierFactory
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XTextConversion
-DESCR:OfficeDev - Implementing a New Locale - XTextConversion
-REF:
-com.sun.star.linguistic2.XConversionDictionary
-com.sun.star.i18n.XTextConversion
-com.sun.star.i18n.TextConversion
-TOPIC:
-com.sun.star.i18n.XTextConversion
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XCalendar
-DESCR:OfficeDev - Overview and Using the API - XCalendar
-REF:
-com.sun.star.i18n.XLocaleData
-com.sun.star.i18n.Calendar
-com.sun.star.i18n.XCalendar
-TOPIC:
-com.sun.star.i18n.XCalendar
-
-LINK:Documentation/DevGuide/UCB/Copying%2C_Moving_and_Linking
-DESCR:UCB - Copying, Moving and Linking
-REF:
-com.sun.star.ucb.GlobalTransferCommandArgument
-com.sun.star.ucb.XCommandProcessor
-com.sun.star.ucb.UniversalContentBroker
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Handling_Drawing_Document_Files#Creating_and_Loading_Drawing_Documents
-DESCR:Drawings - Handling Drawing Document Files - Creating and Loading Drawing Documents
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.lang.XComponent
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.Desktop
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Pattern_Field
-DESCR:GUI - Pattern Field
-REF:
-com.sun.star.awt.UnoControlPatternField
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Named_Table_Cells_in_Rows%2C_Columns_and_the_Table_Cursor
-DESCR:Text - Named Table Cells in Rows, Columns and the Table Cursor
-REF:
-com.sun.star.table.XTableColumns
-com.sun.star.text.TableColumnSeparator
-com.sun.star.table.XCell
-com.sun.star.text.TextTableRow
-com.sun.star.text.TextTableCursor
-com.sun.star.style.ParagraphProperties
-com.sun.star.beans.XPropertySet
-com.sun.star.text.XTextTableCursor
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.style.CharacterProperties
-com.sun.star.table.XTableRows
-com.sun.star.style.GraphicLocation
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XText
-com.sun.star.style.CharacterPropertiesComplex
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/3-D_Charts
-DESCR:Charts - 3-D Charts
-REF:
-com.sun.star.chart.BarDiagram
-com.sun.star.chart.Dim3DDiagram
-com.sun.star.chart.Chart3DBarProperties
-com.sun.star.chart.ChartSolidType
-TOPIC:
-com.sun.star.chart.Dim3DDiagram
-com.sun.star.chart.Chart3DBarProperties
-
-LINK:Documentation/DevGuide/OfficeDev/Frames#Components_in_Frames
-DESCR:OfficeDev - Frames - Components in Frames
-REF:
-com.sun.star.frame.Controller
-com.sun.star.frame.XController
-com.sun.star.lang.XComponent
-com.sun.star.awt.XWindow
-com.sun.star.frame.XDispatchProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Controllers#Document_Specific_Controller_Services
-DESCR:OfficeDev - Component - Controllers - Document Specific Controller Services
-REF:
-com.sun.star.frame.Controller
-com.sun.star.sheet.SpreadsheetViewSettings
-com.sun.star.lang.XServiceInfo
-com.sun.star.sdb.DataSourceBrowser
-com.sun.star.presentation.XPresentationSupplier
-com.sun.star.text.TextDocumentView
-com.sun.star.presentation.PresentationView
-com.sun.star.drawing.DrawingDocumentDrawView
-com.sun.star.sheet.SpreadsheetViewPane
-TOPIC:
-com.sun.star.frame.Controller
-com.sun.star.sdb.DataSourceBrowser
-com.sun.star.text.TextDocumentView
-com.sun.star.drawing.DrawingDocumentDrawView
-com.sun.star.sheet.SpreadsheetView
-
-LINK:Documentation/DevGuide/Text/Navigating#Locating_Text_Contents
-DESCR:Text - Navigating - Locating Text Contents
-REF:
-com.sun.star.text.XTextTablesSupplier
-com.sun.star.text.XTextSectionsSupplier
-com.sun.star.text.XBookmarksSupplier
-com.sun.star.text.XTextGraphicObjectsSupplier
-com.sun.star.text.XTextEmbeddedObjectsSupplier
-com.sun.star.text.XTextFramesSupplier
-com.sun.star.text.XDocumentIndexesSupplier
-com.sun.star.text.XTextFieldsSupplier
-com.sun.star.text.XReferenceMarksSupplier
-com.sun.star.text.XTextContent
-com.sun.star.text.XFootnotesSupplier
-com.sun.star.text.XEndnotesSupplier
-com.sun.star.document.XRedlinesSupplier
-TOPIC:
-com.sun.star.text.XTextContent
-
-LINK:Documentation/DevGuide/Spreadsheets/Handling_Array_Formulas
-DESCR:Spreadsheets - Handling Array Formulas
-REF:
-com.sun.star.table.XCell
-com.sun.star.sheet.XArrayFormulaRange
-TOPIC:
-com.sun.star.sheet.XArrayFormulaRange
-
-LINK:Documentation/DevGuide/OfficeDev/Filtering_Process
-DESCR:OfficeDev - Filtering Process
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.document.FilterFactory
-com.sun.star.document.TypeDetection
-com.sun.star.frame.SynchronousFrameLoader
-com.sun.star.document.ExtendedTypeDetection
-com.sun.star.frame.XFrameLoader
-com.sun.star.document.ImportFilter
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.FrameLoader
-com.sun.star.document.ExportFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Events#Paint_Listener
-DESCR:GUI - Events - Paint Listener
-REF:
-com.sun.star.awt.XPaintListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Models_and_Views_for_Form_Controls
-DESCR:Forms - Models and Views for Form Controls
-REF:
-com.sun.star.form.component
-com.sun.star.awt.UnoControlModel
-com.sun.star.awt.UnoControl
-com.sun.star.form.control
-com.sun.star.awt
-TOPIC:
-com.sun.star.awt.UnoControlModel
-com.sun.star.awt.UnoControl
-
-LINK:Documentation/DevGuide/OfficeDev/Common_Application_Features#Clipboard
-DESCR:OfficeDev - Common Application Features - Clipboard
-REF:
-com.sun.star.datatransfer.clipboard.SystemClipboard
-com.sun.star.datatransfer.XTransferable
-com.sun.star.datatransfer.DataFlavor
-TOPIC:
-com.sun.star.datatransfer.clipboard.SystemClipboard
-com.sun.star.datatransfer.clipboard.XClipboard
-
-LINK:Documentation/DevGuide/Text/Shape_Objects_in_Text#Drawing_Shapes
-DESCR:Text - Shape Objects in Text - null - Drawing Shapes
-REF:
-com.sun.star.drawing.XDrawPageSupplier
-com.sun.star.text.Shape
-com.sun.star.text.XTextContent
-com.sun.star.drawing.Shape
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Custom_Path_Variables#Rules
-DESCR:OfficeDev - Custom Path Variables - Rules
-REF:
-com.sun.star.util.XStringSubstitution
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Control_Models_and_Shapes
-DESCR:Forms - Control Models and Shapes
-REF:
-com.sun.star.drawing.ControlShape
-TOPIC:
-com.sun.star.drawing.ControlShape
-
-LINK:Documentation/DevGuide/Database/Driver_Specifics#Driver_Specifics
-DESCR:Database - Driver Specifics - Driver Specifics
-REF:
-com.sun.star.sdbc.Driver
-com.sun.star.sdbcx.Driver
-TOPIC:
-com.sun.star.sdbcx.Driver
-
-LINK:Documentation/DevGuide/FirstSteps/Objects%2C_Interfaces%2C_and_Services#Services
-DESCR:FirstSteps - Objects, Interfaces, and Services - Services
-REF:
-com.sun.star.drawing.DrawingDocument
-com.sun.star.bridge.XUnoUrlResolver
-com.sun.star.document.OfficeDocument
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XMultiPropertySet
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.Desktop
-com.sun.star.frame.Frame
-com.sun.star.text.TextDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/How_Add-Ins_Work
-DESCR:Charts - How Add-Ins Work
-REF:
-com.sun.star.lang.XInitialization
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.util.XRefreshable
-TOPIC:
-com.sun.star.util.XRefreshable
-
-LINK:Documentation/DevGuide/FirstSteps/Using_Services
-DESCR:FirstSteps - Using Services
-REF:
-com.sun.star.document.OfficeDocument
-com.sun.star.text.TextDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XLocaleData
-DESCR:OfficeDev - Overview and Using the API - XLocaleData
-REF:
-com.sun.star.i18n.XLocaleData
-TOPIC:
-com.sun.star.i18n.XLocaleData
-
-LINK:Documentation/DevGuide/Text/Link_Targets
-DESCR:Text - Link Targets
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.document.XLinkTargetSupplier
-com.sun.star.container.XNameAccess
-com.sun.star.awt.XBitmap
-TOPIC:
-com.sun.star.document.XLinkTargetSupplier
-
-LINK:Documentation/DevGuide/WritingUNO/Defining_an_Interface
-DESCR:WritingUNO - Defining an Interface
-REF:
-com.sun.star.document.XFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Function_Handling#Recently_Used_Functions
-DESCR:Spreadsheets - Function Handling - Recently Used Functions
-REF:
-com.sun.star.sheet.FunctionDescriptions
-com.sun.star.sheet.RecentFunctions
-com.sun.star.sheet.XRecentFunctions
-TOPIC:
-com.sun.star.sheet.RecentFunctions
-
-LINK:Documentation/DevGuide/Database/Connection_Pooling
-DESCR:Database - Connection Pooling
-REF:
-com.sun.star.sdb.Connection
-com.sun.star.sdbc.XDriverManager
-com.sun.star.sdbc.XConnection
-com.sun.star.sdbc.XPooledConnection
-com.sun.star.sdbc.ConnectionPool
-TOPIC:
-com.sun.star.sdbc.XPooledConnection
-com.sun.star.sdbc.ConnectionPool
-
-LINK:Documentation/DevGuide/ProUNO/Interfaces
-DESCR:ProUNO - Interfaces
-REF:
-com.sun.star.uno.XInterface
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/External_List_Sources
-DESCR:Forms - External List Sources
-REF:
-com.sun.star.form.binding.XListEntrySource
-com.sun.star.form.binding.XListEntrySink
-com.sun.star.table.CellRangeListSource
-com.sun.star.form.binding.ListEntrySource
-TOPIC:
-com.sun.star.form.binding.XListEntrySink
-com.sun.star.form.binding.XListEntrySource
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Using_Automation_Objects_from_UNO#Instantiation
-DESCR:ProUNO - Bridge - Using Automation Objects from UNO - Instantiation
-REF:
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.bridge.oleautomation.Factory
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XTextConversion
-DESCR:OfficeDev - Overview and Using the API - XTextConversion
-REF:
-com.sun.star.i18n.XTextConversion
-TOPIC:
-com.sun.star.i18n.XTextConversion
-
-LINK:Documentation/DevGuide/GUI/Text_Field
-DESCR:GUI - Text Field
-REF:
-com.sun.star.awt.UnoControlEdit
-com.sun.star.awt.LineEndFormat
-com.sun.star.awt.XTextComponent
-com.sun.star.awt.UnoControlEditModel
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Services#Referencing_other_Services
-DESCR:ProUNO - Services - Referencing other Services
-REF:
-com.sun.star.text.TextContent
-com.sun.star.text.Paragraph
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleEventBroadcaster
-DESCR:Accessibility - XAccessibleEventBroadcaster
-REF:
-com.sun.star.accessibility.XAccessibleEventBroadcaster
-com.sun.star.lang.DisposedException
-com.sun.star.lang.IndexOutOfBoundsException
-TOPIC:
-com.sun.star.accessibility.XAccessibleEventBroadcaster
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#Introspection
-DESCR:AdvUNO - UNO Reflection API - CoreReflection Service - Introspection
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameAccess
-com.sun.star.beans.XIntrospection
-com.sun.star.beans.XIntrospectionAccess
-com.sun.star.beans.Introspection
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XComponent#Disposing_of_an_XComponent
-DESCR:WritingUNO - XComponent - Disposing of an XComponent
-REF:
-com.sun.star.lang.DisposedException
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Getting_Information_about_UNO_Objects#Inspecting_interfaces_during_debugging
-DESCR:ProUNO - Basic - Getting Information about UNO Objects - Inspecting interfaces during debugging
-REF:
-com.sun.star.container.XElementAccess
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XSet
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Multiple_Operations
-DESCR:Spreadsheets - Multiple Operations
-REF:
-TOPIC:
-com.sun.star.sheet.XMultipleOperation
-
-LINK:Documentation/DevGuide/Basic/HorizontalVertical_Line
-DESCR:Basic - HorizontalVertical Line
-REF:
-com.sun.star.awt.UnoControlFixedLine
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Class_Definition_with_Helper_Template_Classes
-DESCR:WritingUNO - C++ - Class Definition with Helper Template Classes
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.lang.XComponent
-com.sun.star.lang.XInitialization
-com.sun.star.uno.XInterface
-com.sun.star.uno.XWeak
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Using_Dialogs_in_Components#Accept_events_created_by_dialog_controls
-DESCR:WritingUNO - Using Dialogs in Components - Accept events created by dialog controls
-REF:
-com.sun.star.test.XTestDialogHandler
-com.sun.star.awt.XActionListener
-com.sun.star.awt.ActionEvent
-com.sun.star.awt.XDialogEventHandler
-com.sun.star.lang.XTypeProvider
-com.sun.star.beans.Introspection
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/C++/C++_Component
-DESCR:WritingUNO - C++ - C++ Component
-REF:
-com.sun.star.lang.XInitialization
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Frames#Frame_Actions
-DESCR:OfficeDev - Component - Frames - XFrame - Frame Actions
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.frame.FrameActionEvent
-com.sun.star.awt.XWindow
-com.sun.star.frame.XFrameLoader
-com.sun.star.frame.XFrameActionListener
-com.sun.star.frame.XSynchronousFrameLoader
-com.sun.star.frame.Desktop
-com.sun.star.frame.FrameLoader
-com.sun.star.frame.XFrame
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Currency_Field
-DESCR:Basic - Currency Field
-REF:
-com.sun.star.awt.UnoControlCurrencyField
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Implementation
-DESCR:WritingUNO - Jobs - Implementation
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.awt.Toolkit
-com.sun.star.task.Job
-com.sun.star.task.AsyncJob
-com.sun.star.util.XCloseable
-TOPIC:
-com.sun.star.task.XAsyncJob
-com.sun.star.task.XJob
-com.sun.star.task.Job
-com.sun.star.task.AsyncJob
-
-LINK:Documentation/DevGuide/UCB/Preconfigured_UCBs
-DESCR:UCB - Preconfigured UCBs
-REF:
-com.sun.star.ucb.UniversalContentBroker
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Modules
-DESCR:ProUNO - Modules
-REF:
-com.sun.star.table
-com.sun.star.sheet
-com.sun.star.document
-com.sun.star.text
-com.sun.star.style
-com.sun.star.drawing
-com.sun.star.uno
-TOPIC:
-
-LINK:Documentation/DevGuide/Scripting/How_the_Scripting_Framework_Works
-DESCR:Scripting - How the Scripting Framework Works
-REF:
-com.sun.star.script.provider.LanguageScriptProvider
-com.sun.star.script.provider.XScript
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Example:_Adding_a_New_Spreadsheet
-DESCR:Spreadsheets - Example: Adding a New Spreadsheet
-REF:
-com.sun.star.lang.XComponent
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Intercepting_Context_Menus#Querying_a_Menu_Structure
-DESCR:WritingUNO - Intercepting Context Menus - Writing an Interceptor - Querying a Menu Structure
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.beans.XPropertySet
-com.sun.star.ui.ActionTriggerContainer
-com.sun.star.ui.ActionTriggerSeparatorType
-com.sun.star.ui.ActionTriggerSeparator
-com.sun.star.ui.ActionTrigger
-com.sun.star.container.XIndexContainer
-com.sun.star.awt.XBitmap
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Using_Prepared_Statements#Supplying_Values_for_PreparedStatement_Parameters
-DESCR:Database - Using Prepared Statements - Supplying Values for PreparedStatement Parameters
-REF:
-com.sun.star.sdbc.XParameters
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Driver_Statements#PreparedStatement
-DESCR:Database - Driver Statements - PreparedStatement
-REF:
-com.sun.star.sdbc.XParameters
-com.sun.star.sdbc.XResultSetMetaDataSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Settings
-DESCR:Spreadsheets - Settings
-REF:
-com.sun.star.sheet.GlobalSheetSettings
-com.sun.star.beans.XPropertySet
-TOPIC:
-com.sun.star.sheet.GlobalSheetSettings
-
-LINK:Documentation/DevGuide/WritingUNO/XWeak
-DESCR:WritingUNO - XWeak
-REF:
-TOPIC:
-com.sun.star.uno.XWeak
-
-LINK:Documentation/DevGuide/GUI/Graphical_User_Interfaces#Basic_Concepts
-DESCR:GUI - Graphical User Interfaces - Basic Concepts
-REF:
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Events#Focus_Listener
-DESCR:GUI - Events - Focus Listener
-REF:
-com.sun.star.awt.XFocusListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Loadable_Forms
-DESCR:Forms - Loadable Forms
-REF:
-com.sun.star.sdbc.XRowSetListener
-com.sun.star.form.XLoadable
-com.sun.star.form.XLoadListener
-com.sun.star.sdbc.XRowSet
-TOPIC:
-com.sun.star.form.XLoadable
-com.sun.star.form.XLoadListener
-
-LINK:Documentation/DevGuide/Database/The_SDBC_Driver_for_dBase
-DESCR:Database - The SDBC Driver for dBase
-REF:
-com.sun.star.sdbcx.Driver
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Graphic_Objects
-DESCR:Text - Graphic Objects
-REF:
-com.sun.star.awt.Size
-com.sun.star.text.BaseFrame
-com.sun.star.drawing.ColorMode
-com.sun.star.text.TextGraphicObject
-com.sun.star.drawing.PointSequenceSequence
-com.sun.star.container.XIndexContainer
-com.sun.star.text.GraphicCrop
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Overall_Document_Features#Numbering_Styles
-DESCR:Text - Overall Document Features - Styles - Numbering Styles
-REF:
-com.sun.star.text.NumberingStyle
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/PreparedStatement_From_DataSource_Queries
-DESCR:Database - PreparedStatement From DataSource Queries
-REF:
-com.sun.star.sdb.XCommandPreparation
-com.sun.star.sdb.DataSource
-com.sun.star.sdb.CommandType
-TOPIC:
-com.sun.star.sdb.XCommandPreparation
-com.sun.star.sdb.CommandType
-
-LINK:Documentation/DevGuide/Accessibility/Overview
-DESCR:Accessibility - Overview
-REF:
-com.sun.star.awt.XExtendedToolkit
-com.sun.star.awt.XWindow
-com.sun.star.accessibility.XAccessibleContext
-com.sun.star.accessibility.XAccessible
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Settings#Creating_Document_Settings
-DESCR:Text - Settings - Creating Document Settings
-REF:
-com.sun.star.document.Settings
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Any
-DESCR:FirstSteps - Any
-REF:
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/Implementing_UNO_Language_Bindings#UNO_Bridge
-DESCR:AdvUNO - Implementing UNO Language Bindings - Overview of Language Bindings and Bridges - UNO Bridge
-REF:
-com.sun.star.reflection.CoreReflection
-com.sun.star.script.XInvocation
-com.sun.star.script.Converter
-com.sun.star.script.Invocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Data_Aware_Controls
-DESCR:Forms - Data Aware Controls
-REF:
-com.sun.star.form.DataAwareControlModel
-TOPIC:
-com.sun.star.form.DataAwareControlModel
-
-LINK:Documentation/DevGuide/Database/Queries
-DESCR:Database - Queries
-REF:
-com.sun.star.sdb.XCommandPreparation
-com.sun.star.sdb.RowSet
-com.sun.star.sdb.QueryDefinition
-TOPIC:
-com.sun.star.sdb.QueryDefinition
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Exception_Handling
-DESCR:ProUNO - Basic - Exception Handling
-REF:
-com.sun.star.container.XNameAccess
-TOPIC:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-
-LINK:Documentation/DevGuide/ProUNO/Differences_Between_the_Lifetime_of_C++_and_Java_Objects
-DESCR:ProUNO - Differences Between the Lifetime of C++ and Java Objects
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Shape_Objects_in_Text#Base_Frames
-DESCR:Text - Shape Objects in Text - Base Frames
-REF:
-com.sun.star.awt.Size
-com.sun.star.text.TextEmbeddedObjects
-com.sun.star.beans.XPropertySet
-com.sun.star.text.XTextFrame
-com.sun.star.container.XNameAccess
-com.sun.star.text.XTextEmbeddedObjectsSupplier
-com.sun.star.text.TextContent
-com.sun.star.text.XTextFramesSupplier
-com.sun.star.table.ShadowFormat
-com.sun.star.container.XIndexAccess
-com.sun.star.text.TextFrames
-com.sun.star.document.XEventsSupplier
-com.sun.star.text.TextFrame
-com.sun.star.drawing.XShape
-com.sun.star.text.TextEmbeddedObject
-com.sun.star.container.XContainer
-com.sun.star.text.XTextGraphicObjectsSupplier
-com.sun.star.text.RelOrientation
-com.sun.star.text.TextGraphicObjects
-com.sun.star.text.BaseFrame
-com.sun.star.container.XNamed
-com.sun.star.style.GraphicLocation
-com.sun.star.text.TextGraphicObject
-com.sun.star.table.BorderLine
-com.sun.star.text.BaseFrameProperties
-com.sun.star.text.HoriOrientation
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Common_Parts_of_all_Chart_Types#Data_Series_and_Data_Points
-DESCR:Charts - Common Parts of all Chart Types - Data Series and Data Points
-REF:
-com.sun.star.chart.XYDiagram
-com.sun.star.chart.XDiagram
-com.sun.star.chart.LineDiagram
-com.sun.star.drawing.FillProperties
-com.sun.star.drawing.LineProperties
-com.sun.star.style.CharacterProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Grouping%2C_Combining_and_Binding
-DESCR:Drawings - Grouping, Combining and Binding
-REF:
-com.sun.star.drawing.XShapeBinder
-com.sun.star.drawing.GroupShape
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.drawing.ShapeCollection
-com.sun.star.drawing.XShapeGroup
-com.sun.star.drawing.XShapeGrouper
-com.sun.star.drawing.XShapeCombiner
-com.sun.star.drawing.XShape
-com.sun.star.drawing.Shape
-com.sun.star.drawing.XShapes
-TOPIC:
-com.sun.star.drawing.GroupShape
-com.sun.star.drawing.ShapeCollection
-com.sun.star.drawing.XShapeGrouper
-com.sun.star.drawing.XShapeCombiner
-
-LINK:Documentation/DevGuide/GUI/Common_Workflow_to_add_Controls
-DESCR:GUI - Common Workflow to add Controls
-REF:
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Common_Types#Enum_Types_and_Groups_of_Constants
-DESCR:FirstSteps - Common Types - Enum Types and Groups of Constants
-REF:
-com.sun.star.table.CellVertJustify
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/View_Settings
-DESCR:Spreadsheets - View Settings
-REF:
-com.sun.star.sheet.SpreadsheetViewSettings
-com.sun.star.beans.XPropertySet
-TOPIC:
-com.sun.star.sheet.SpreadsheetViewSettings
-
-LINK:Documentation/DevGuide/OfficeDev/Common_Application_Features#Becoming_a_Clipboard_Viewer
-DESCR:OfficeDev - Common Application Features - Clipboard - Using the Clipboard - Becoming a Clipboard Viewer
-REF:
-com.sun.star.datatransfer.clipboard.XClipboardListener
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Window_Interfaces#XWindowPeer
-DESCR:OfficeDev - Component - Window Interfaces - XWindowPeer
-REF:
-com.sun.star.awt.XWindowPeer
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Area_Links
-DESCR:Spreadsheets - Cell Area Links
-REF:
-com.sun.star.sheet.XAreaLink
-com.sun.star.beans.XPropertySet
-com.sun.star.sheet.XAreaLinks
-com.sun.star.sheet.CellAreaLink
-com.sun.star.table.CellAddress
-com.sun.star.util.XRefreshable
-TOPIC:
-com.sun.star.sheet.XAreaLink
-com.sun.star.sheet.XAreaLinks
-
-LINK:Documentation/DevGuide/ProUNO/Properties
-DESCR:ProUNO - Properties
-REF:
-com.sun.star.beans.XPropertyAccess
-com.sun.star.beans.XPropertyState
-com.sun.star.beans.PropertyAttribute
-com.sun.star.beans.XPropertySet
-com.sun.star.view.PrintOptions
-com.sun.star.beans.XPropertySetInfo
-com.sun.star.beans.XFastPropertySet
-com.sun.star.beans.PropertyValue
-com.sun.star.beans.XMultiPropertySet
-com.sun.star.document.MediaDescriptor
-com.sun.star.beans.XPropertyContainer
-com.sun.star.beans.XPropertyChangeListener
-TOPIC:
-com.sun.star.beans.XPropertyState
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XPropertySetInfo
-com.sun.star.beans.XFastPropertySet
-com.sun.star.beans.XMultiPropertySet
-
-LINK:Documentation/DevGuide/Drawings/Layer_Handling
-DESCR:Drawings - Layer Handling
-REF:
-com.sun.star.drawing.XLayerSupplier
-com.sun.star.drawing.DrawingDocument
-com.sun.star.drawing.XLayerManager
-TOPIC:
-com.sun.star.drawing.XLayerManager
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#Invocation
-DESCR:AdvUNO - UNO Reflection API - CoreReflection Service - Invocation
-REF:
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.script.Converter
-com.sun.star.script.XInvocation
-com.sun.star.script.InvocationInfo
-com.sun.star.script.XInvocation2
-com.sun.star.script.Invocation
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_Hyphenator
-DESCR:OfficeDev - Implementing a Hyphenator
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.linguistic2.XHyphenator
-com.sun.star.lang.XComponent
-com.sun.star.linguistic2.XLinguServiceEventBroadcaster
-com.sun.star.linguistic2.XSpellChecker
-com.sun.star.lang.XInitialization
-com.sun.star.lang.XServiceDisplayName
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Text_Documents
-DESCR:Text - Text Documents
-REF:
-TOPIC:
-com.sun.star.text.TextDocument
-
-LINK:Documentation/DevGuide/Spreadsheets/Modifying_a_DataPilot_Table
-DESCR:Spreadsheets - Modifying a DataPilot Table
-REF:
-com.sun.star.sheet.DataPilotTable
-com.sun.star.sheet.XDataPilotTable
-com.sun.star.container.XNameAccess
-com.sun.star.sheet.XDataPilotDescriptor
-com.sun.star.sheet.DataPilotTables
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleContext
-DESCR:Accessibility - XAccessibleContext
-REF:
-com.sun.star.accessibility.XAccessibleContext
-com.sun.star.accessibility.AccessibleRole
-com.sun.star.accessibility.XAccessible
-TOPIC:
-com.sun.star.accessibility.XAccessibleContext
-
-LINK:Documentation/DevGuide/Spreadsheets/Other_Table_Operations#Scenarios
-DESCR:Spreadsheets - Other Table Operations - Scenarios
-REF:
-com.sun.star.sheet.Spreadsheet
-com.sun.star.sheet.Scenarios
-com.sun.star.sheet.XScenario
-com.sun.star.sheet.ScenariosEnumeration
-com.sun.star.sheet.XScenariosSupplier
-com.sun.star.sheet.XScenarios
-TOPIC:
-com.sun.star.sheet.XScenarios
-
-LINK:Documentation/DevGuide/FirstSteps/Common_Mechanisms_for_Text%2C_Tables_and_Drawings
-DESCR:FirstSteps - Common Mechanisms for Text, Tables and Drawings
-REF:
-com.sun.star.table.XCell
-com.sun.star.drawing.LineShape
-com.sun.star.style.ParagraphProperties
-com.sun.star.text.XTextRange
-com.sun.star.text.XSimpleText
-com.sun.star.drawing.TextShape
-com.sun.star.table.CellProperties
-com.sun.star.drawing.TextProperties
-com.sun.star.drawing.LineProperties
-com.sun.star.drawing.PolyPolygonBezierShape
-com.sun.star.style.CharacterProperties
-com.sun.star.drawing.ConnectorShape
-com.sun.star.drawing.Shape
-com.sun.star.drawing.Text
-com.sun.star.table.XCellRange
-com.sun.star.drawing.RectangleShape
-com.sun.star.drawing.CaptionShape
-com.sun.star.drawing.MeasureShape
-com.sun.star.drawing.FillProperties
-com.sun.star.drawing.XShape
-com.sun.star.drawing.EllipseShape
-com.sun.star.text.TextTableCursor
-com.sun.star.drawing.PolyPolygonBezierDescriptor
-com.sun.star.drawing.PolyPolygonShape
-com.sun.star.drawing.RotationDescriptor
-com.sun.star.sheet.SheetCellCursor
-com.sun.star.drawing.ShadowProperties
-com.sun.star.drawing.ClosedBezierShape
-com.sun.star.presentation.Shape
-com.sun.star.text.XText
-com.sun.star.text.TextTable
-com.sun.star.drawing.PolyLineShape
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Printing_Drawing_Documents#Printer_and_Print_Job_Settings
-DESCR:Drawings - Printing Drawing Documents - Printer and Print Job Settings
-REF:
-com.sun.star.awt.Size
-com.sun.star.view.PaperOrientation
-com.sun.star.view.PrintOptions
-com.sun.star.view.PrinterDescriptor
-com.sun.star.view.XPrintable
-com.sun.star.view.PaperFormat
-TOPIC:
-com.sun.star.view.PrintOptions
-com.sun.star.view.PrinterDescriptor
-com.sun.star.view.XPrintable
-
-LINK:Documentation/DevGuide/JavaBean/OfficeConnection_Interface
-DESCR:JavaBean - OfficeConnection Interface
-REF:
-com.sun.star.uno.XComponentContext
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleEditableText
-DESCR:Accessibility - XAccessibleEditableText
-REF:
-com.sun.star.accessibility.XAccessibleEditableText
-com.sun.star.accessibility.XAccessibleText
-TOPIC:
-com.sun.star.accessibility.XAccessibleEditableText
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Mapping_of_Simple_Types
-DESCR:ProUNO - Basic - Mapping of Simple Types
-REF:
-com.sun.star.reflection.XIdlClass
-com.sun.star.container.XNameContainer
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Creating_Dialogs_at_Runtime
-DESCR:Basic - Creating Dialogs at Runtime
-REF:
-com.sun.star.awt.XDialog
-com.sun.star.awt.UnoControlDialogModel
-com.sun.star.awt.XDialogProvider
-com.sun.star.awt.UnoControlDialog
-com.sun.star.awt.XActionListener
-com.sun.star.beans.XPropertySet
-com.sun.star.lang.XEventListener
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.task.XJobExecutor
-com.sun.star.container.XNameContainer
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Filtering_Process#FrameLoader
-DESCR:OfficeDev - Filtering Process - FrameLoader
-REF:
-com.sun.star.frame.Controller
-com.sun.star.frame.SynchronousFrameLoader
-com.sun.star.document.OfficeDocument
-com.sun.star.awt.XWindow
-com.sun.star.frame.FrameLoaderFactory
-com.sun.star.frame.FrameLoader
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Scroll_Bar
-DESCR:GUI - Scroll Bar
-REF:
-com.sun.star.awt.UnoControlScrollBar
-com.sun.star.awt.XAdjustmentListener
-com.sun.star.awt.UnoControlScrollBarModel
-com.sun.star.awt.XScrollBar
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Number_Formats
-DESCR:OfficeDev - Number Formats
-REF:
-TOPIC:
-com.sun.star.util.XNumberFormatTypes
-com.sun.star.util.XNumberFormatter
-com.sun.star.util.XNumberFormatPreviewer
-com.sun.star.util.XNumberFormats
-com.sun.star.util.NumberFormats
-com.sun.star.util.NumberFormatter
-com.sun.star.util.XNumberFormatsSupplier
-
-LINK:Documentation/DevGuide/WritingUNO/Providing_a_Single_Factory_Using_a_Helper_Method
-DESCR:WritingUNO - Providing a Single Factory Using a Helper Method
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Config/Configuration_Management#Architecture
-DESCR:Config - Configuration Management - Architecture
-REF:
-com.sun.star.beans.NamedValue
-com.sun.star.beans.PropertyValue
-com.sun.star.configuration.ConfigurationProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Navigating#Cursors
-DESCR:Text - Navigating - Cursors
-REF:
-com.sun.star.text.TextViewCursor
-com.sun.star.text.TextCursor
-com.sun.star.text.TextLayoutCursor
-com.sun.star.text.XTextRange
-com.sun.star.text.XTextCursor
-TOPIC:
-com.sun.star.text.TextCursor
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Frames#XFramesSupplier
-DESCR:OfficeDev - Component - Frames - XFramesSupplier
-REF:
-com.sun.star.frame.XFrames
-com.sun.star.container.XIndexAccess
-com.sun.star.frame.XFramesSupplier
-com.sun.star.frame.XFrame
-TOPIC:
-com.sun.star.frame.XFramesSupplier
-
-LINK:Documentation/DevGuide/Spreadsheets/Other_Table_Operations#Data_Validation
-DESCR:Spreadsheets - Other Table Operations - Data Validation
-REF:
-com.sun.star.sheet.ValidationAlertStyle
-com.sun.star.sheet.XSheetCondition
-com.sun.star.beans.XPropertySet
-com.sun.star.sheet.ValidationType
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.sheet.TableValidation
-TOPIC:
-com.sun.star.sheet.TableValidation
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XIndexEntrySupplier
-DESCR:OfficeDev - Overview and Using the API - XIndexEntrySupplier
-REF:
-com.sun.star.i18n.XIndexEntrySupplier
-TOPIC:
-com.sun.star.i18n.XIndexEntrySupplier
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Cursor
-DESCR:Spreadsheets - Cell Cursor
-REF:
-com.sun.star.sheet.XSheetCellRange
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.table.CellCursor
-com.sun.star.sheet.XSheetCellCursor
-com.sun.star.sheet.SheetCellCursor
-TOPIC:
-com.sun.star.sheet.XSheetCellCursor
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Window_Interfaces#XWindow
-DESCR:OfficeDev - Component - Window Interfaces - XWindow
-REF:
-com.sun.star.awt.XWindowListener
-com.sun.star.awt.WindowEvent
-com.sun.star.awt.XWindow
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Image_Control
-DESCR:GUI - Image Control
-REF:
-com.sun.star.awt.UnoControlImageControlModel
-com.sun.star.awt.UnoControlImageControl
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/List_Box
-DESCR:GUI - List Box
-REF:
-com.sun.star.awt.UnoControlListBox
-com.sun.star.awt.XItemListener
-com.sun.star.awt.XActionListener
-com.sun.star.awt.UnoControlListBoxModel
-com.sun.star.awt.XListBox
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Common_Parts_of_all_Chart_Types#Axis
-DESCR:Charts - Common Parts of all Chart Types - Axis
-REF:
-com.sun.star.chart.BarDiagram
-com.sun.star.chart.ChartTwoAxisXSupplier
-com.sun.star.chart.PieDiagram
-com.sun.star.chart.XYDiagram
-com.sun.star.drawing.LineProperties
-com.sun.star.style.CharacterProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Using_Automation_Objects_from_UNO#Named_Arguments
-DESCR:ProUNO - Bridge - Using Automation Objects from UNO - Instantiation - Named Arguments
-REF:
-com.sun.star.script.XInvocation
-com.sun.star.bridge.oleautomation.NamedArgument
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Filtering
-DESCR:Spreadsheets - Filtering
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.sheet.SheetFilterDescriptor
-com.sun.star.sheet.XSheetFilterDescriptor
-com.sun.star.sheet.TableFilterField
-com.sun.star.sheet.XSheetFilterableEx
-com.sun.star.sheet.XSheetFilterable
-TOPIC:
-com.sun.star.sheet.SheetFilterDescriptor
-com.sun.star.sheet.XSheetFilterableEx
-com.sun.star.sheet.XSheetFilterable
-
-LINK:Documentation/DevGuide/OfficeDev/Closing_Documents#Reacting_Upon_Closing
-DESCR:OfficeDev - Closing Documents - Reacting Upon Closing
-REF:
-com.sun.star.util.XCloseListener
-com.sun.star.lang.XComponent
-com.sun.star.lang.XEventListener
-com.sun.star.util.CloseVetoException
-com.sun.star.util.XCloseable
-com.sun.star.uno.XWeak
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Implementing_without_Helpers#XInterface_Implementation
-DESCR:WritingUNO - C++ - Implementing without Helpers - XInterface Implementation
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Process#Dispatching_a_Command
-DESCR:OfficeDev - Dispatch Process - Dispatching a Command
-REF:
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet#Naming
-DESCR:Spreadsheets - Spreadsheet - Naming
-REF:
-com.sun.star.container.XNamed
-com.sun.star.sheet.CellInsertMode
-com.sun.star.sheet.XCellRangeMovement
-com.sun.star.sheet.CellDeleteMode
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Element_Access#Enumeration_Access
-DESCR:FirstSteps - Element Access - Enumeration Access
-REF:
-com.sun.star.sheet.XCellRangesQuery
-com.sun.star.sheet.XSheetCellRanges
-com.sun.star.sheet.CellFlags
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XEnumeration
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Path_Settings#Accessing_Path_Settings
-DESCR:OfficeDev - Path Settings - Accessing Path Settings
-REF:
-com.sun.star.lang.IllegalArgumentException
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XFastPropertySet
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/DataPilot_Sources
-DESCR:Spreadsheets - DataPilot Sources
-REF:
-com.sun.star.sheet.XLevelsSupplier
-com.sun.star.sheet.XHierarchiesSupplier
-com.sun.star.sheet.DataPilotSourceHierarchies
-com.sun.star.sheet.DataPilotSource
-com.sun.star.sheet.XMembersSupplier
-com.sun.star.sheet.DataPilotSourceDimensions
-com.sun.star.container.XNameAccess
-com.sun.star.sheet.DataPilotSourceLevels
-com.sun.star.sheet.DataPilotSourceMembers
-com.sun.star.sheet.XDimensionsSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Automation_Objects_with_UNO_Interfaces#Requirements
-DESCR:ProUNO - Bridge - Automation Objects with UNO Interfaces - Requirements
-REF:
-com.sun.star.uno.XInterface
-com.sun.star.script.XInvocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/List_Box
-DESCR:Basic - List Box
-REF:
-com.sun.star.awt.UnoControlListBox
-com.sun.star.awt.XListBox
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Configuration
-DESCR:WritingUNO - Jobs - Configuration
-REF:
-com.sun.star.task.Job
-com.sun.star.task.JobExecutor
-com.sun.star.task.AsyncJob
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Resolving_Path_Variables
-DESCR:OfficeDev - Resolving Path Variables
-REF:
-com.sun.star.container.NoSuchElementException
-com.sun.star.util.XStringSubstitution
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet_Services_-_Overview
-DESCR:Spreadsheets - Spreadsheet Services - Overview
-REF:
-com.sun.star.sheet.SheetCell
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.sheet.SheetCellRange
-com.sun.star.sheet.Spreadsheet
-com.sun.star.table.TableColumn
-com.sun.star.table.TableRow
-TOPIC:
-com.sun.star.sheet.SheetCell
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.sheet.SheetCellRange
-com.sun.star.sheet.Spreadsheet
-com.sun.star.table.TableColumn
-com.sun.star.table.TableRow
-
-LINK:Documentation/DevGuide/Extensions/File_Format#Extension_Tooltip_Description
-DESCR:Extensions - File Format - Extension Tooltip Description
-REF:
-com.sun.star.util.MacroExpander
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Using_SDBCX_to_Access_the_Database_Design#The_Extension_Layer_SDBCX
-DESCR:Database - Using SDBCX to Access the Database Design - The Extension Layer SDBCX
-REF:
-com.sun.star.sdbcx.Container
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Filtering_Process#MediaDescriptor
-DESCR:OfficeDev - Filtering Process - MediaDescriptor
-REF:
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Properties_of_a_Filter
-DESCR:OfficeDev - Properties of a Filter
-REF:
-com.sun.star.document.FilterFactory
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.beans.PropertyValue
-com.sun.star.container.XNameAccess
-com.sun.star.document.ImportFilter
-com.sun.star.document.ExportFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/DataPilot_Tables
-DESCR:Spreadsheets - DataPilot Tables
-REF:
-com.sun.star.sheet.DataPilotSource
-com.sun.star.sheet.XDataPilotTables
-com.sun.star.sheet.XDataPilotTablesSupplier
-com.sun.star.sheet.DataPilotTables
-TOPIC:
-com.sun.star.sheet.DataPilotTables
-
-LINK:Documentation/DevGuide/Spreadsheets/Overall_Document_Features#Cell_Styles
-DESCR:Spreadsheets - Overall Document Features - Styles - Cell Styles
-REF:
-com.sun.star.container.XNamed
-com.sun.star.sheet.XSpreadsheetDocument
-com.sun.star.sheet.TableCellStyle
-TOPIC:
-com.sun.star.sheet.TableCellStyle
-
-LINK:Documentation/DevGuide/Basic/Programming_Dialogs_and_Dialog_Controls
-DESCR:Basic - Programming Dialogs and Dialog Controls
-REF:
-com.sun.star.awt.XWindow
-com.sun.star.beans.XPropertySet
-com.sun.star.awt.UnoControl
-com.sun.star.awt.UnoControlModel
-com.sun.star.awt.UnoControlEditModel
-com.sun.star.awt.XControl
-com.sun.star.awt.XView
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cells
-DESCR:Spreadsheets - Cells
-REF:
-com.sun.star.sheet.SheetCell
-com.sun.star.table.Cell
-TOPIC:
-com.sun.star.sheet.SheetCell
-
-LINK:Documentation/DevGuide/AdvUNO/Advanced_UNO#Java
-DESCR:AdvUNO - Advanced UNO - Choosing an Implementation Language - Supported Programming Environments - Java
-REF:
-com.sun.star.beans.XPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Managing_Number_Formats#XNumberFormats
-DESCR:OfficeDev - Managing Number Formats - NumberFormats Service - XNumberFormats
-REF:
-com.sun.star.util.XNumberFormats
-com.sun.star.util.NumberFormatProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Navigating#Search_and_Replace
-DESCR:Text - Navigating - Search and Replace
-REF:
-com.sun.star.util.XPropertyReplace
-com.sun.star.style.ParagraphProperties
-com.sun.star.container.XIndexAccess
-com.sun.star.uno.XInterface
-com.sun.star.beans.PropertyValue
-com.sun.star.util.SearchDescriptor
-com.sun.star.util.XReplaceable
-com.sun.star.util.XSearchable
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.style.CharacterProperties
-TOPIC:
-com.sun.star.util.SearchDescriptor
-com.sun.star.util.XReplaceable
-com.sun.star.util.XSearchable
-
-LINK:Documentation/DevGuide/Basic/Accessing_the_UNO_API#ThisComponent
-DESCR:Basic - Accessing the UNO API - ThisComponent
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.util.XModifiable
-com.sun.star.document.XViewDataSupplier
-com.sun.star.sheet
-com.sun.star.text
-com.sun.star.beans.XPropertySet
-com.sun.star.document.XEventBroadcaster
-com.sun.star.document.XLinkTargetSupplier
-com.sun.star.drawing
-com.sun.star.lang.XEventListener
-com.sun.star.sheet.SpreadsheetDocumentSettings
-com.sun.star.view.XPrintable
-com.sun.star.text.TextDocument
-com.sun.star.frame.XModel
-com.sun.star.sheet.SpreadsheetDocument
-com.sun.star.lang.XServiceInfo
-com.sun.star.text.XTextDocument
-com.sun.star.drawing.DrawingDocument
-com.sun.star.style.XStyleFamiliesSupplier
-com.sun.star.document.OfficeDocument
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.container.XChild
-com.sun.star.document.XEventsSupplier
-com.sun.star.document.XDocumentInfoSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/The_Example_Listings
-DESCR:GUI - The Example Listings
-REF:
-com.sun.star.container.ElementExistException
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Zooming
-DESCR:Drawings - Zooming
-REF:
-com.sun.star.awt.Rectangle
-com.sun.star.view.DocumentZoomType
-com.sun.star.drawing.DrawingDocumentDrawView
-com.sun.star.awt.Point
-TOPIC:
-com.sun.star.drawing.DrawingDocumentDrawView
-
-LINK:Documentation/DevGuide/Database/Document_Links
-DESCR:Database - Document Links
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.sdb.DefinitionContainer
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameContainer
-com.sun.star.sdb.XBookmarksSupplier
-com.sun.star.frame.Desktop
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/ResultSetMetaData
-DESCR:Database - ResultSetMetaData
-REF:
-com.sun.star.sdbc.XResultSetMetaData
-com.sun.star.sdbc.DataType
-TOPIC:
-com.sun.star.sdbc.XResultSetMetaData
-
-LINK:Documentation/DevGuide/WritingUNO/Storing_the_Service_Manager_for_Further_Use
-DESCR:WritingUNO - Storing the Service Manager for Further Use
-REF:
-com.sun.star.uno.XComponentContext
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Key_Service
-DESCR:Database - Key Service
-REF:
-com.sun.star.sdbc.KeyRule
-com.sun.star.sdbcx.KeyType
-TOPIC:
-com.sun.star.sdbcx.KeyType
-
-LINK:Documentation/DevGuide/Text/Auto_Text
-DESCR:Text - Auto Text
-REF:
-com.sun.star.text.AutoTextGroup
-com.sun.star.text.AutoTextContainer
-com.sun.star.text.AutoTextEntry
-TOPIC:
-com.sun.star.text.AutoTextGroup
-com.sun.star.text.AutoTextContainer
-com.sun.star.text.AutoTextEntry
-
-LINK:Documentation/DevGuide/Scripting/Writing_Macros#The_HelloWorld_macro
-DESCR:Scripting - Writing Macros - The HelloWorld macro
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.frame.XDesktop
-com.sun.star.frame.XModel
-com.sun.star.script.provider.XScriptContext
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Class_Definition_with_Helper_Class
-DESCR:WritingUNO - Class Definition with Helper Class
-REF:
-com.sun.star.lang.XServiceInfo
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Using_Services#Using_Interfaces
-DESCR:FirstSteps - Using Services - Using Interfaces
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.lang.XComponent
-com.sun.star.frame.Frame
-com.sun.star.frame.Desktop
-TOPIC:
-com.sun.star.uno.XInterface
-
-LINK:Documentation/DevGuide/Text/Text_Sections
-DESCR:Text - Text Sections
-REF:
-com.sun.star.text.XTextSectionsSupplier
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameAccess
-com.sun.star.text.TextSection
-TOPIC:
-com.sun.star.text.TextSection
-
-LINK:Documentation/DevGuide/GUI/Message_Box
-DESCR:GUI - Message Box
-REF:
-com.sun.star.awt.Toolkit
-com.sun.star.awt.XMessageBoxFactory
-com.sun.star.awt.MessageBoxButtons
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleText#Text_type
-DESCR:Accessibility - XAccessibleText - Text type
-REF:
-com.sun.star.accessibility.XAccessibleEditableText
-com.sun.star.accessibility.AccessibleTextType
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Integrating_Import_and_Export_Filters
-DESCR:OfficeDev - Integrating Import and Export Filters
-REF:
-TOPIC:
-com.sun.star.document.FilterFactory
-com.sun.star.document.TypeDetection
-com.sun.star.frame.SynchronousFrameLoader
-com.sun.star.frame.XComponentLoader
-com.sun.star.document.ExtendedTypeDetection
-com.sun.star.document.ImportFilter
-com.sun.star.frame.FrameLoader
-com.sun.star.document.ExportFilter
-
-LINK:Documentation/DevGuide/Spreadsheets/Working_With_Spreadsheet_Documents#Spreadsheet_Document
-DESCR:Spreadsheets - Working With Spreadsheet Documents - Document Structure - Spreadsheet Document
-REF:
-com.sun.star.sheet.SpreadsheetDocument
-com.sun.star.container.XNameContainer
-com.sun.star.container.XIndexAccess
-com.sun.star.sheet.XSpreadsheetDocument
-com.sun.star.sheet.Spreadsheets
-com.sun.star.container.XNameAccess
-com.sun.star.sheet.XSpreadsheets
-com.sun.star.container.XNameReplace
-com.sun.star.sheet.SpreadsheetsEnumeration
-TOPIC:
-com.sun.star.sheet.SpreadsheetDocument
-com.sun.star.sheet.Spreadsheets
-
-LINK:Documentation/DevGuide/Database/Column_Service
-DESCR:Database - Column Service
-REF:
-com.sun.star.sdbcx.IndexColumn
-com.sun.star.sdbcx.Column
-com.sun.star.sdbcx.XDataDescriptorFactory
-com.sun.star.sdbc.DataType
-com.sun.star.sdbc.ColumnValue
-com.sun.star.sdbcx.KeyColumn
-TOPIC:
-com.sun.star.sdbcx.IndexColumn
-com.sun.star.sdbcx.Column
-com.sun.star.sdbcx.KeyColumn
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Window_Interfaces
-DESCR:OfficeDev - Component - Window Interfaces
-REF:
-TOPIC:
-com.sun.star.awt.XWindow
-com.sun.star.awt.XWindowPeer
-com.sun.star.awt.XTopWindow
-
-LINK:Documentation/DevGuide/Charts/Handling_Chart_Documents#Creating_Charts
-DESCR:Charts - Handling Chart Documents - Creating Charts
-REF:
-com.sun.star.chart.XChartDataArray
-com.sun.star.table.XTableChartsSupplier
-com.sun.star.sheet.Spreadsheet
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/General_Drawing_Properties
-DESCR:Drawings - General Drawing Properties
-REF:
-com.sun.star.style.LineSpacing
-com.sun.star.drawing.TextFitToSizeType
-com.sun.star.style.ParagraphProperties
-com.sun.star.style.TabStop
-com.sun.star.drawing.TextAnimationDirection
-com.sun.star.drawing.LineStyle
-com.sun.star.drawing.LineDash
-com.sun.star.awt.FontSlant
-com.sun.star.awt.Gradient
-com.sun.star.drawing.TextProperties
-com.sun.star.drawing.LineProperties
-com.sun.star.style.CharacterProperties
-com.sun.star.drawing.RectanglePoint
-com.sun.star.drawing.Hatch
-com.sun.star.lang.Locale
-com.sun.star.drawing.PolyPolygonBezierCoords
-com.sun.star.drawing.TextVerticalAdjust
-com.sun.star.style.CharacterPropertiesComplex
-com.sun.star.style.ParagraphPropertiesAsian
-com.sun.star.drawing.FillProperties
-com.sun.star.awt.XBitmap
-com.sun.star.text.WritingMode
-com.sun.star.drawing.LineJoint
-com.sun.star.container.XIndexReplace
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.drawing.ShadowProperties
-com.sun.star.drawing.BitmapMode
-com.sun.star.drawing.FillStyle
-com.sun.star.uno.XInterface
-com.sun.star.drawing.TextHorizontalAdjust
-com.sun.star.drawing.TextAnimationKind
-TOPIC:
-com.sun.star.drawing.TextProperties
-com.sun.star.drawing.FillProperties
-com.sun.star.drawing.LineProperties
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Ranges_and_Cells_Container#Properties_of_SheetCellRanges
-DESCR:Spreadsheets - Cell Ranges and Cells Container - Properties of SheetCellRanges
-REF:
-com.sun.star.sheet.SheetCellRanges
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Source_Object
-DESCR:Spreadsheets - Source Object
-REF:
-com.sun.star.sheet.DataResult
-com.sun.star.sheet.DataResultFlags
-com.sun.star.sheet.XDataPilotResults
-com.sun.star.beans.XPropertySet
-com.sun.star.lang.XInitialization
-com.sun.star.sheet.DataPilotSource
-com.sun.star.util.XRefreshable
-TOPIC:
-com.sun.star.sheet.DataPilotSource
-
-LINK:Documentation/DevGuide/Drawings/Printing_Presentation_Documents
-DESCR:Drawings - Printing Presentation Documents
-REF:
-com.sun.star.presentation.DocumentSettings
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XEventsSupplier
-DESCR:OfficeDev - Component - Models - XEventsSupplier
-REF:
-com.sun.star.document.XEventBroadcaster
-com.sun.star.document.XEventsSupplier
-TOPIC:
-com.sun.star.document.XEventsSupplier
-
-LINK:Documentation/DevGuide/Database/Events_and_Other_Notifications
-DESCR:Database - Events and Other Notifications
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.sdb.XRowSetApproveBroadcaster
-com.sun.star.sdbc.XRowSetListener
-com.sun.star.lang.EventObject
-com.sun.star.sdb.XRowSetApproveListener
-com.sun.star.sdbc.XRowSet
-TOPIC:
-com.sun.star.sdb.XRowSetApproveBroadcaster
-com.sun.star.sdbc.XRowSetListener
-com.sun.star.lang.EventObject
-com.sun.star.sdb.XRowSetApproveListener
-
-LINK:Documentation/DevGuide/Forms/Form_Control_Models
-DESCR:Forms - Form Control Models
-REF:
-com.sun.star.form.FormComponent
-com.sun.star.form.FormComponents
-com.sun.star.form.FormControlModel
-TOPIC:
-com.sun.star.form.FormControlModel
-
-LINK:Documentation/DevGuide/OfficeDev/The_Exporter#Evaluating_XExportFilter_Parameters
-DESCR:OfficeDev - The Exporter - Evaluating XExportFilter Parameters
-REF:
-com.sun.star.xml.sax.XDocumentHandler
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Numeric_Field
-DESCR:Basic - Numeric Field
-REF:
-com.sun.star.awt.UnoControlNumericField
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Services#Including_Properties
-DESCR:ProUNO - Services - Including Properties
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XPropertyChangeListener
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Deployment_Options_for_Components#Component_Registration
-DESCR:WritingUNO - Deployment Options for Components - null - Component Registration
-REF:
-com.sun.star.loader.SharedLibrary
-com.sun.star.io.Pipe
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/Content_Provider_Proxies
-DESCR:UCB - Content Provider Proxies
-REF:
-com.sun.star.ucb.XContentProviderManager
-TOPIC:
-com.sun.star.ucb.XContentProviderManager
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_Thesaurus
-DESCR:OfficeDev - Implementing a Thesaurus
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.linguistic2.XThesaurus
-com.sun.star.lang.XComponent
-com.sun.star.lang.XInitialization
-com.sun.star.lang.XServiceDisplayName
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XModel
-DESCR:OfficeDev - Component - Models - XModel
-REF:
-com.sun.star.view.XSelectionSupplier
-com.sun.star.lang.XComponent
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.XModel
-
-LINK:Documentation/DevGuide/FirstSteps/Sequence
-DESCR:FirstSteps - Sequence
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.document.MediaDescriptor
-com.sun.star.container.XEnumeration
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Page_Formatting
-DESCR:Drawings - Page Formatting
-REF:
-com.sun.star.view.PaperOrientation
-com.sun.star.drawing.GenericDrawPage
-TOPIC:
-com.sun.star.drawing.GenericDrawPage
-
-LINK:Documentation/DevGuide/Database/The_SDBC_Driver_for_Flat_File_Formats
-DESCR:Database - The SDBC Driver for Flat File Formats
-REF:
-com.sun.star.sdbc.FLATConnectionProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Setting_Dialog_Properties
-DESCR:GUI - Setting Dialog Properties
-REF:
-com.sun.star.awt.UnoControlDialogModel
-com.sun.star.beans.XPropertySet
-com.sun.star.awt.UnoControlDialogElement
-com.sun.star.awt.UnoControlModel
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Custom_Slide_Show
-DESCR:Drawings - Custom Slide Show
-REF:
-com.sun.star.presentation.CustomPresentation
-com.sun.star.container.XNamed
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.presentation.CustomPresentationAccess
-com.sun.star.presentation.XCustomPresentationSupplier
-com.sun.star.container.XNameContainer
-com.sun.star.container.XIndexContainer
-TOPIC:
-com.sun.star.presentation.CustomPresentationAccess
-com.sun.star.presentation.XCustomPresentationSupplier
-
-LINK:Documentation/DevGuide/Config/Using_a_Data_Source
-DESCR:Config - Using a Data Source
-REF:
-com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.ConfigurationAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Property_Propagation_Between_Model_and_Control
-DESCR:GUI - Property Propagation Between Model and Control
-REF:
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Stock_Charts
-DESCR:Charts - Stock Charts
-REF:
-com.sun.star.chart.StockDiagram
-TOPIC:
-com.sun.star.chart.StockDiagram
-
-LINK:Documentation/DevGuide/Text/Editing_Text#Control_Characters
-DESCR:Text - Editing Text - Control Characters
-REF:
-com.sun.star.text.ControlCharacter
-TOPIC:
-com.sun.star.text.ControlCharacter
-
-LINK:Documentation/DevGuide/OfficeDev/Frames#Linking_Components_and_Windows
-DESCR:OfficeDev - Frames - Linking Components and Windows
-REF:
-com.sun.star.frame.XFrames
-com.sun.star.frame.XController
-com.sun.star.awt.XWindow
-com.sun.star.awt.XTopWindow
-com.sun.star.frame.XFramesSupplier
-TOPIC:
-com.sun.star.frame.XFrames
-com.sun.star.awt.XWindow
-com.sun.star.awt.XTopWindow
-com.sun.star.frame.Frame
-com.sun.star.frame.XFrame
-
-LINK:Documentation/DevGuide/Config/Connecting_to_a_Data_Source
-DESCR:Config - Connecting to a Data Source
-REF:
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.lang.ServiceManager
-TOPIC:
-com.sun.star.configuration.ConfigurationProvider
-
-LINK:Documentation/DevGuide/Spreadsheets/Creating_a_New_DataPilot_Table
-DESCR:Spreadsheets - Creating a New DataPilot Table
-REF:
-com.sun.star.table.CellRangeAddress
-com.sun.star.sheet.DataPilotFieldOrientation
-com.sun.star.sheet.SheetFilterDescriptor
-com.sun.star.sheet.DataPilotDescriptor
-com.sun.star.sheet.DataPilotFields
-com.sun.star.sheet.XDataPilotDescriptor
-com.sun.star.sheet.XDataPilotTables
-com.sun.star.sheet.DataPilotField
-TOPIC:
-com.sun.star.sheet.DataPilotFieldOrientation
-com.sun.star.sheet.DataPilotDescriptor
-com.sun.star.sheet.DataPilotField
-
-LINK:Documentation/DevGuide/Spreadsheets/Range_Selection
-DESCR:Spreadsheets - Range Selection
-REF:
-com.sun.star.sheet.XRangeSelectionListener
-com.sun.star.sheet.XRangeSelectionChangeListener
-com.sun.star.sheet.RangeSelectionEvent
-com.sun.star.sheet.XRangeSelection
-com.sun.star.sheet.RangeSelectionArguments
-TOPIC:
-com.sun.star.sheet.XRangeSelectionChangeListener
-com.sun.star.sheet.XRangeSelection
-com.sun.star.sheet.RangeSelectionArguments
-
-LINK:Documentation/DevGuide/Text/Overall_Document_Features#Character_Styles
-DESCR:Text - Overall Document Features - Styles - Character Styles
-REF:
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.style.CharacterProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Page_Layout
-DESCR:Text - Page Layout
-REF:
-com.sun.star.style.PageProperties
-com.sun.star.style.PageStyleLayout
-com.sun.star.text.Text
-TOPIC:
-com.sun.star.style.PageProperties
-
-LINK:Documentation/DevGuide/GUI/Combo_Box
-DESCR:GUI - Combo Box
-REF:
-com.sun.star.awt.XTextListener
-com.sun.star.awt.UnoControlEdit
-com.sun.star.awt.UnoControlComboBoxModel
-com.sun.star.awt.UnoControlComboBox
-com.sun.star.awt.XComboBox
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Columns
-DESCR:Text - Columns
-REF:
-com.sun.star.text.TextColumns
-com.sun.star.text.TextColumn
-com.sun.star.text.XTextColumns
-TOPIC:
-com.sun.star.text.TextColumns
-
-LINK:Documentation/DevGuide/Database/The_DataSource_Service
-DESCR:Database - The DataSource Service
-REF:
-com.sun.star.document.OfficeDocument
-com.sun.star.sdb.XCompletedConnection
-com.sun.star.sdb.XQueryDefinitionsSupplier
-com.sun.star.sdb.XReportDocumentsSupplier
-com.sun.star.sdb.XFormDocumentsSupplier
-com.sun.star.sdb.DataSource
-com.sun.star.util.XFlushable
-com.sun.star.sdb.XBookmarksSupplier
-com.sun.star.sdb.OfficeDatabaseDocument
-com.sun.star.util.XNumberFormatsSupplier
-TOPIC:
-com.sun.star.sdb.DataSource
-
-LINK:Documentation/DevGuide/Accessibility/Content_Information
-DESCR:Accessibility - Content Information
-REF:
-com.sun.star.accessibility.XAccessible
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Java/Mapping_of_Exception_Types
-DESCR:ProUNO - Java - Mapping of Exception Types
-REF:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-TOPIC:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-
-LINK:Documentation/DevGuide/GUI/Group_Box
-DESCR:GUI - Group Box
-REF:
-com.sun.star.awt.UnoControlGroupBox
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/XInvocation_Bridge#Implementing_UNO_objects
-DESCR:AdvUNO - XInvocation Bridge - Implementing UNO objects
-REF:
-com.sun.star.loader.XImplementationLoader
-com.sun.star.script.InvocationAdapterFactory
-com.sun.star.io.XInputStream
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Defining_an_Interface#Methods
-DESCR:WritingUNO - Defining an Interface - Methods
-REF:
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Storing_Documents
-DESCR:OfficeDev - Storing Documents
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.util.XModifiable
-com.sun.star.drawing.XDrawPagesSupplier
-com.sun.star.text.XTextDocument
-com.sun.star.document.OfficeDocument
-com.sun.star.sheet.XSpreadsheetDocument
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.XStorable
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Storing_the_Service_Manager_for_Further_Use
-DESCR:WritingUNO - C++ - Storing the Service Manager for Further Use
-REF:
-com.sun.star.uno.XComponentContext
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XPrintable
-DESCR:OfficeDev - Component - Models - XPrintable
-REF:
-com.sun.star.view.XPrintable
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Graphical_User_Interfaces
-DESCR:GUI - Graphical User Interfaces
-REF:
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/AppendixC/The_FTP_Content_Provider#Creation_of_New_FTP_Content
-DESCR:AppendixC - The FTP Content Provider - Creation of New FTP Content
-REF:
-com.sun.star.ucb.XContentCreator
-com.sun.star.io.XInputStream
-TOPIC:
-com.sun.star.ucb.XContentCreator
-
-LINK:Documentation/DevGuide/OfficeDev/Using_Thesaurus
-DESCR:OfficeDev - Using Thesaurus
-REF:
-com.sun.star.linguistic2.XThesaurus
-com.sun.star.linguistic2.LinguProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Roadmap_Control
-DESCR:GUI - Roadmap Control
-REF:
-com.sun.star.awt.UnoControlRoadmapModel
-com.sun.star.awt.RoadmapItem
-com.sun.star.awt.UnoControlRoadmap
-com.sun.star.container.XIndexContainer
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Java_Window_Integration#More_Remote_Problems
-DESCR:OfficeDev - Java Window Integration - More Remote Problems - Resizing
-REF:
-com.sun.star.lang.DisposedException
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleHyperlink
-DESCR:Accessibility - XAccessibleHyperlink
-REF:
-com.sun.star.accessibility.XAccessibleHyperlink
-com.sun.star.accessibility.XAccessibleAction
-TOPIC:
-com.sun.star.accessibility.XAccessibleHyperlink
-
-LINK:Documentation/DevGuide/UCB/Setting_Content_Properties
-DESCR:UCB - Setting Content Properties
-REF:
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XServiceInfo
-DESCR:WritingUNO - XServiceInfo
-REF:
-com.sun.star.lang.XServiceInfo
-TOPIC:
-com.sun.star.lang.XServiceInfo
-
-LINK:Documentation/DevGuide/Database/Stored_Procedures
-DESCR:Database - Stored Procedures
-REF:
-com.sun.star.sdbc.XRow
-com.sun.star.sdbc.XOutParameters
-com.sun.star.sdbc.XConnection
-com.sun.star.sdbc.DataType
-com.sun.star.sdbc.CallableStatement
-com.sun.star.sdbcx.PreparedStatement
-TOPIC:
-com.sun.star.sdbc.XOutParameters
-
-LINK:Documentation/DevGuide/Database/Connections#Operation_on_Application_Level
-DESCR:Database - Connections - Understanding Connections - Operation on Application Level
-REF:
-com.sun.star.sdb.XSQLQueryComposerFactory
-com.sun.star.sdb.XCommandPreparation
-com.sun.star.container.XChild
-com.sun.star.sdb.DataSource
-com.sun.star.sdb.XQueriesSupplier
-com.sun.star.sdb.CommandType
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Frames#XStatusIndicatorFactory
-DESCR:OfficeDev - Component - Frames - XStatusIndicatorFactory
-REF:
-com.sun.star.task.XStatusIndicator
-com.sun.star.task.XStatusIndicatorFactory
-TOPIC:
-com.sun.star.task.XStatusIndicatorFactory
-
-LINK:Documentation/DevGuide/Spreadsheets/Saving_Spreadsheet_Documents#Storing
-DESCR:Spreadsheets - Saving Spreadsheet Documents - Storing
-REF:
-com.sun.star.frame.XStorable
-TOPIC:
-com.sun.star.frame.XStorable
-
-LINK:Documentation/DevGuide/Text/Overall_Document_Features#Frame_Styles
-DESCR:Text - Overall Document Features - Styles - Frame Styles
-REF:
-com.sun.star.text.BaseFrame
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.text.BaseFrameProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Necessary_Steps
-DESCR:OfficeDev - Necessary Steps
-REF:
-com.sun.star.document.ExtendedTypeDetection
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/XInvocation_Bridge#Exception_Handling
-DESCR:AdvUNO - XInvocation Bridge - Scripting Existing UNO Objects - Exception Handling
-REF:
-com.sun.star.script.CannotConvertException
-com.sun.star.reflection.InvocationTargetException
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Custom_Functions
-DESCR:Spreadsheets - Custom Functions
-REF:
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Intercepting_Context_Menus#Notification
-DESCR:WritingUNO - Intercepting Context Menus - Writing an Interceptor - Notification
-REF:
-com.sun.star.view.XSelectionSupplier
-com.sun.star.ui.ContextMenuExecuteEvent
-com.sun.star.ui.XContextMenuInterceptor
-com.sun.star.awt.XWindow
-com.sun.star.ui.ActionTriggerContainer
-com.sun.star.container.XIndexContainer
-com.sun.star.awt.Point
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Roadmap_Control#Roadmap_Item
-DESCR:GUI - Roadmap Control - Roadmap Item
-REF:
-com.sun.star.awt.RoadmapItem
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Java/Mapping_of_Services
-DESCR:ProUNO - Java - Mapping of Services
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.uno.DeploymentException
-com.sun.star.lang.XMultiComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Event_Model
-DESCR:ProUNO - Event Model
-REF:
-com.sun.star.lang.XEventListener
-com.sun.star.lang.EventObject
-TOPIC:
-com.sun.star.lang.XEventListener
-
-LINK:Documentation/DevGuide/Text/Iterating_over_Text
-DESCR:Text - Iterating over Text
-REF:
-com.sun.star.container.XContentEnumerationAccess
-com.sun.star.text.TextField
-com.sun.star.text.ControlCharacter
-com.sun.star.text.Text
-com.sun.star.container.XEnumerationAccess
-com.sun.star.text.Paragraph
-com.sun.star.text.TextPortion
-com.sun.star.text.TextTable
-com.sun.star.text.XTextContent
-com.sun.star.container.XEnumeration
-com.sun.star.text.TextRange
-TOPIC:
-com.sun.star.container.XContentEnumerationAccess
-com.sun.star.container.XEnumerationAccess
-com.sun.star.text.Paragraph
-com.sun.star.text.TextPortion
-
-LINK:Documentation/DevGuide/Spreadsheets/Database_Operations
-DESCR:Spreadsheets - Database Operations
-REF:
-TOPIC:
-com.sun.star.sheet.DatabaseRange
-com.sun.star.sheet.DatabaseRanges
-
-LINK:Documentation/DevGuide/Spreadsheets/Properties_of_SheetCell
-DESCR:Spreadsheets - Properties of SheetCell
-REF:
-com.sun.star.sheet.SheetCell
-com.sun.star.table.Cell
-com.sun.star.sheet.FormulaResult
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Java/Mapping_of_Interface_Types
-DESCR:ProUNO - Java - Mapping of Interface Types
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Closing_Documents
-DESCR:OfficeDev - Closing Documents
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.lang.XEventListener
-TOPIC:
-com.sun.star.util.XCloseListener
-com.sun.star.lang.XComponent
-com.sun.star.util.XCloseable
-
-LINK:Documentation/DevGuide/Forms/Committing_Controls
-DESCR:Forms - Committing Controls
-REF:
-com.sun.star.form.FormController
-com.sun.star.form.XUpdateBroadcaster
-com.sun.star.form.XBoundComponent
-TOPIC:
-com.sun.star.form.XBoundComponent
-
-LINK:Documentation/DevGuide/OfficeDev/Using_Spellchecker
-DESCR:OfficeDev - Using Spellchecker
-REF:
-com.sun.star.linguistic2.XSpellChecker
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Creating_Statements
-DESCR:Database - Creating Statements
-REF:
-com.sun.star.sdbc.XMultipleResults
-com.sun.star.sdbc.XConnection
-com.sun.star.sdbc.XStatement
-com.sun.star.sdbc.Statement
-TOPIC:
-com.sun.star.sdbc.Statement
-
-LINK:Documentation/DevGuide/Database/Connections#Understanding_Connections
-DESCR:Database - Connections - Understanding Connections
-REF:
-com.sun.star.sdb.XSQLQueryComposerFactory
-com.sun.star.sdbc.Connection
-com.sun.star.sdb.Connection
-com.sun.star.sdb.XCommandPreparation
-com.sun.star.container.XChild
-com.sun.star.sdbcx.DatabaseDefinition
-com.sun.star.sdb.XQueriesSupplier
-TOPIC:
-com.sun.star.sdb.Connection
-
-LINK:Documentation/DevGuide/ProUNO/C++/Type_Mappings#Mapping_of_Type
-DESCR:ProUNO - C++ - Type Mappings - Mapping of Simple Types - Mapping of Type
-REF:
-com.sun.star.uno.TypeClass
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet#Page_Breaks
-DESCR:Spreadsheets - Spreadsheet - Page Breaks
-REF:
-com.sun.star.sheet.TablePageBreakData
-com.sun.star.sheet.XSheetPageBreak
-com.sun.star.table.TableColumn
-com.sun.star.table.TableRow
-TOPIC:
-com.sun.star.sheet.TablePageBreakData
-com.sun.star.sheet.XSheetPageBreak
-
-LINK:Documentation/DevGuide/Config/Configuration_Data_Sources
-DESCR:Config - Configuration Data Sources
-REF:
-com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.configuration.ConfigurationAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Removing_a_DataPilot_Table
-DESCR:Spreadsheets - Removing a DataPilot Table
-REF:
-com.sun.star.sheet.XDataPilotTables
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Indexes_and_Index_Marks#Index_marks
-DESCR:Text - Indexes and Index Marks - Index marks
-REF:
-com.sun.star.text.DocumentIndexMark
-com.sun.star.text.TextContent
-com.sun.star.beans.XPropertySet
-com.sun.star.text.UserIndexMark
-com.sun.star.text.XDocumentIndexMark
-com.sun.star.text.ContentIndexMark
-com.sun.star.text.BaseIndexMark
-TOPIC:
-com.sun.star.text.XDocumentIndexMark
-com.sun.star.text.BaseIndexMark
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XTransliteration
-DESCR:OfficeDev - Implementing a New Locale - XTransliteration
-REF:
-com.sun.star.i18n.XTransliteration
-com.sun.star.i18n.TransliterationModulesNew
-com.sun.star.i18n.TransliterationModules
-TOPIC:
-com.sun.star.i18n.TransliterationModulesNew
-com.sun.star.i18n.TransliterationModules
-
-LINK:Documentation/DevGuide/WritingUNO/Protocol_Handler#Overview
-DESCR:WritingUNO - Protocol Handler - Overview
-REF:
-com.sun.star.frame.ContentHandler
-com.sun.star.frame.FrameLoader
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Special_Service_Manager_Configurations
-DESCR:WritingUNO - Special Service Manager Configurations
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.container.XSet
-com.sun.star.lang.XSingleComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/UCP_Registration_Information
-DESCR:UCB - UCP Registration Information
-REF:
-com.sun.star.ucb.XContentIdentifier
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Dialogs_and_Controls
-DESCR:GUI - Dialogs and Controls
-REF:
-com.sun.star.awt.XWindow2
-com.sun.star.awt.XWindow
-com.sun.star.beans.XPropertySet
-com.sun.star.awt.XWindowPeer
-com.sun.star.awt.UnoControl
-com.sun.star.awt.UnoControlModel
-com.sun.star.awt.UnoControlEditModel
-com.sun.star.awt.XControl
-com.sun.star.awt.XView
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Check_Box
-DESCR:GUI - Check Box
-REF:
-com.sun.star.awt.XItemListener
-com.sun.star.awt.UnoControlCheckBoxModel
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Rotating_and_Shearing
-DESCR:Drawings - Rotating and Shearing
-REF:
-com.sun.star.drawing.RotationDescriptor
-TOPIC:
-com.sun.star.drawing.RotationDescriptor
-
-LINK:Documentation/DevGuide/Drawings/Moving_and_Scaling
-DESCR:Drawings - Moving and Scaling
-REF:
-com.sun.star.drawing.XShape
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XLocaleData
-DESCR:OfficeDev - Implementing a New Locale - XLocaleData
-REF:
-com.sun.star.i18n.Calendar
-com.sun.star.i18n.Currency
-com.sun.star.i18n.ForbiddenCharacters
-com.sun.star.i18n.LanguageCountryInfo
-com.sun.star.i18n.XLocaleData
-com.sun.star.i18n.reservedWords
-com.sun.star.i18n.FormatElement
-com.sun.star.beans.PropertyValues
-com.sun.star.i18n.NumberFormatIndex
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XDefaultNumberingProvider
-com.sun.star.i18n.LocaleDataItem
-com.sun.star.i18n.Implementation
-TOPIC:
-com.sun.star.i18n.XLocaleData
-
-LINK:Documentation/DevGuide/UCB/Unconfigured_UCBs
-DESCR:UCB - Unconfigured UCBs
-REF:
-com.sun.star.ucb.XContentProviderManager
-com.sun.star.ucb.ContentProviderInfo
-com.sun.star.ucb.UniversalContentBroker
-TOPIC:
-com.sun.star.ucb.XContentProviderManager
-
-LINK:Documentation/DevGuide/Database/Adding_a_Group
-DESCR:Database - Adding a Group
-REF:
-com.sun.star.sdbcx.GroupDescriptor
-TOPIC:
-com.sun.star.sdbcx.GroupDescriptor
-
-LINK:Documentation/DevGuide/AdvUNO/XInvocation_Bridge#Property_Support
-DESCR:AdvUNO - XInvocation Bridge - Scripting Existing UNO Objects - Property Support
-REF:
-com.sun.star.script.Invocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Using_Prepared_Statements
-DESCR:Database - Using Prepared Statements
-REF:
-com.sun.star.sdbc.Statement
-TOPIC:
-
-LINK:Documentation/DevGuide/AppendixC/The_Package_Content_Provider#Commands_and_Properties
-DESCR:AppendixC - The Package Content Provider - Commands and Properties
-REF:
-com.sun.star.ucb.XContent
-com.sun.star.lang.XServiceInfo
-com.sun.star.ucb.XContentCreator
-com.sun.star.lang.XComponent
-com.sun.star.container.XChild
-com.sun.star.ucb.XCommandInfoChangeNotifier
-com.sun.star.beans.XPropertySetInfoChangeNotifier
-com.sun.star.beans.XPropertiesChangeNotifier
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Settings#Document_Properties
-DESCR:Text - Settings - Document Properties
-REF:
-com.sun.star.document.RedlineDisplayType
-com.sun.star.lang.Locale
-com.sun.star.beans.XPropertySet
-com.sun.star.i18n.ForbiddenCharacters
-com.sun.star.text.TextDocument
-TOPIC:
-com.sun.star.text.TextDocument
-
-LINK:Documentation/DevGuide/GUI/Horizontal_Vertical_Line_Control
-DESCR:GUI - Horizontal Vertical Line Control
-REF:
-com.sun.star.awt.UnoControlFixedLine
-com.sun.star.awt.UnoControlFixedLineModel
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/XDatabaseMetaData_Interface
-DESCR:Database - XDatabaseMetaData Interface
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-TOPIC:
-com.sun.star.sdbc.XDatabaseMetaData
-
-LINK:Documentation/DevGuide/OfficeDev/Managing_Number_Formats#NumberFormats_Service
-DESCR:OfficeDev - Managing Number Formats - NumberFormats Service
-REF:
-com.sun.star.util.XNumberFormatTypes
-com.sun.star.util.XNumberFormats
-com.sun.star.util.NumberFormats
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Managing_Number_Formats#XNumberFormatTypes
-DESCR:OfficeDev - Managing Number Formats - NumberFormats Service - XNumberFormatTypes
-REF:
-com.sun.star.util.NumberFormat
-com.sun.star.util.XNumberFormatTypes
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Inserting_Tables
-DESCR:Text - Inserting Tables
-REF:
-com.sun.star.text.XTextTable
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.text.XText
-com.sun.star.text.XTextContent
-TOPIC:
-
-LINK:Documentation/DevGuide/JavaBean/API_Overview
-DESCR:JavaBean - API Overview
-REF:
-com.sun.star.frame.Controller
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.frame.XDesktop
-com.sun.star.frame.Frame
-com.sun.star.model.OfficeDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Dialog_Controls
-DESCR:GUI - Dialog Controls
-REF:
-com.sun.star.awt.Size
-com.sun.star.beans.XPropertySet
-com.sun.star.awt.UnoControlDialogElement
-com.sun.star.awt.UnoControlModel
-com.sun.star.awt.XLayoutConstrains
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Creating_Frames_Manually#Assigning_Windows_to_Frames
-DESCR:OfficeDev - Creating Frames Manually - Assigning Windows to Frames
-REF:
-com.sun.star.awt.XWindow
-com.sun.star.awt.Toolkit
-com.sun.star.awt.XTopWindow
-com.sun.star.awt.WindowDescriptor
-com.sun.star.frame.Frame
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Label_Field
-DESCR:Basic - Label Field
-REF:
-com.sun.star.awt.UnoControlFixedText
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Events
-DESCR:OfficeDev - Events
-REF:
-com.sun.star.linguistic2.DictionaryListEvent
-com.sun.star.linguistic2.XLinguServiceEventListener
-com.sun.star.linguistic2.XDictionaryListEventListener
-com.sun.star.linguistic2.XLinguServiceEventBroadcaster
-com.sun.star.linguistic2.LinguServiceEvent
-com.sun.star.linguistic2.XDictionary
-com.sun.star.linguistic2.DictionaryEvent
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Understanding_the_API_Reference
-DESCR:ProUNO - Understanding the API Reference
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.text.TextFrame
-com.sun.star.text.TextDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XEventBroadcaster
-DESCR:OfficeDev - Component - Models - XEventBroadcaster
-REF:
-com.sun.star.document.EventObject
-com.sun.star.document.XEventBroadcaster
-com.sun.star.document.Events
-TOPIC:
-com.sun.star.document.XEventBroadcaster
-
-LINK:Documentation/DevGuide/AppendixA/Events#Usage
-DESCR:AppendixA - Events - null - Usage
-REF:
-com.sun.star.lang.XEventListener
-com.sun.star.lang.EventObject
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Editing_Text#Strings
-DESCR:Text - Editing Text - Strings
-REF:
-com.sun.star.text.XSentenceCursor
-com.sun.star.text.XWordCursor
-com.sun.star.text.XParagraphCursor
-TOPIC:
-com.sun.star.text.XSimpleText
-
-LINK:Documentation/DevGuide/Basic/Check_Box
-DESCR:Basic - Check Box
-REF:
-com.sun.star.awt.XCheckBox
-com.sun.star.awt.UnoControlCheckBox
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XModifiable
-DESCR:OfficeDev - Component - Models - XModifiable
-REF:
-com.sun.star.util.XModifiable
-TOPIC:
-com.sun.star.util.XModifiable
-
-LINK:Documentation/DevGuide/Drawings/Bezier_Shapes
-DESCR:Drawings - Bezier Shapes
-REF:
-com.sun.star.drawing.PolyPolygonBezierDescriptor
-com.sun.star.drawing.PolyPolygonBezierCoords
-com.sun.star.drawing.PolygonKind
-TOPIC:
-com.sun.star.drawing.PolyPolygonBezierDescriptor
-
-LINK:Documentation/DevGuide/OfficeDev/Filtering_Process#ExtendedTypeDetection
-DESCR:OfficeDev - Filtering Process - ExtendedTypeDetection
-REF:
-com.sun.star.document.ExtendedTypeDetection
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XExtendedIndexEntrySupplier
-DESCR:OfficeDev - Overview and Using the API - XExtendedIndexEntrySupplier
-REF:
-com.sun.star.i18n.XIndexEntrySupplier
-com.sun.star.i18n.XInputSequenceChecker
-com.sun.star.i18n.XExtendedIndexEntrySupplier
-TOPIC:
-com.sun.star.i18n.XInputSequenceChecker
-com.sun.star.i18n.XExtendedIndexEntrySupplier
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/The_Bridge_Services
-DESCR:ProUNO - Bridge - The Bridge Services
-REF:
-com.sun.star.bridge.XBridgeSupplier2
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-com.sun.star.bridge.oleautomation.Factory
-com.sun.star.bridge.oleautomation.BridgeSupplier
-com.sun.star.bridge.oleautomation.ApplicationRegistration
-
-LINK:Documentation/DevGuide/Config/Reading_Configuration_Data
-DESCR:Config - Reading Configuration Data
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.container.XContainer
-com.sun.star.beans.XMultiHierarchicalPropertySet
-com.sun.star.beans.XHierarchicalPropertySet
-com.sun.star.container.XNameAccess
-com.sun.star.configuration.ConfigurationAccess
-com.sun.star.container.XHierarchicalName
-com.sun.star.util.XChangesNotifier
-com.sun.star.container.XNamed
-com.sun.star.configuration.XTemplateContainer
-com.sun.star.container.XChild
-com.sun.star.container.XHierarchicalNameAccess
-com.sun.star.beans.XPropertySetInfo
-com.sun.star.beans.XMultiPropertySet
-TOPIC:
-com.sun.star.configuration.ConfigurationAccess
-
-LINK:Documentation/DevGuide/Drawings/Other_Drawing_Specific_View_Settings
-DESCR:Drawings - Other Drawing Specific View Settings
-REF:
-com.sun.star.document.XViewDataSupplier
-com.sun.star.drawing.XDrawPage
-com.sun.star.beans.PropertyValue
-com.sun.star.drawing.DrawingDocumentDrawView
-TOPIC:
-com.sun.star.document.XViewDataSupplier
-com.sun.star.drawing.DrawingDocumentDrawView
-
-LINK:Documentation/DevGuide/Spreadsheets/Dimensions
-DESCR:Spreadsheets - Dimensions
-REF:
-com.sun.star.sheet.DataPilotSourceDimension
-com.sun.star.container.XNamed
-com.sun.star.beans.XPropertySet
-com.sun.star.util.XCloneable
-com.sun.star.sheet.DataPilotFieldOrientation
-com.sun.star.sheet.DataPilotSourceDimensions
-TOPIC:
-com.sun.star.sheet.DataPilotSourceDimensions
-
-LINK:Documentation/DevGuide/Text/Text_Fields
-DESCR:Text - Text Fields
-REF:
-com.sun.star.text.BibliographyDataField
-com.sun.star.text.textfield.User
-com.sun.star.text.textfield.docinfo.EditTime
-com.sun.star.text.textfield.ReferencePageSet
-com.sun.star.container.XNameAccess
-com.sun.star.text.textfield.Annotation
-com.sun.star.text.textfield.docinfo.PrintAuthor
-com.sun.star.text.textfield.GraphicObjectCount
-com.sun.star.text.textfield.Database
-com.sun.star.text.textfield.docinfo.CreateDateTime
-com.sun.star.text.textfield.ConditionalText
-com.sun.star.text.TextFields
-com.sun.star.text.textfield.Bibliography
-com.sun.star.text.textfield.Chapter
-com.sun.star.text.textfield.Input
-com.sun.star.text.textfield.SetExpression
-com.sun.star.text.FieldMaster.Database
-com.sun.star.text.FieldMaster.User
-com.sun.star.text.textfield.ReferencePageGet
-com.sun.star.text.textfield.ParagraphCount
-com.sun.star.text.textfield.Author
-com.sun.star.text.textfield.DatabaseNumberOfSet
-com.sun.star.text.textfield.docinfo.Info2
-com.sun.star.text.XTextFieldsSupplier
-com.sun.star.text.XDependentTextField
-com.sun.star.text.textfield.InputUser
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.text.textfield.HiddenParagraph
-com.sun.star.text.XTextField
-com.sun.star.text.textfield.docinfo.ChangeAuthor
-com.sun.star.text.textfield.DateTime
-com.sun.star.text.textfield.docinfo.Title
-com.sun.star.text.textfield.docinfo.Info0
-com.sun.star.text.textfield.Macro
-com.sun.star.container.XEnumerationAccess
-com.sun.star.text.TextFieldMasters
-com.sun.star.text.textfield.EmbeddedObjectCount
-com.sun.star.text.textfield.DatabaseName
-com.sun.star.text.textfield.docinfo.Info3
-com.sun.star.util.XUpdatable
-com.sun.star.text.TextContent
-com.sun.star.text.textfield.DatabaseSetNumber
-com.sun.star.text.FieldMaster.SetExpression
-com.sun.star.text.textfield.ExtendedUser
-com.sun.star.text.FieldMaster.DDE
-com.sun.star.text.textfield.docinfo.CreateAuthor
-com.sun.star.text.textfield.docinfo.Subject
-com.sun.star.text.textfield.PageNumber
-com.sun.star.text.textfield.TableFormula
-com.sun.star.text.textfield.docinfo.Keywords
-com.sun.star.text.FieldMaster.Bibliography
-com.sun.star.text.textfield.GetReference
-com.sun.star.text.textfield.WordCount
-com.sun.star.text.textfield.DDE
-com.sun.star.text.textfield.docinfo.Revision
-com.sun.star.text.textfield.GetExpression
-com.sun.star.text.textfield.Script
-com.sun.star.util.XRefreshable
-com.sun.star.text.textfield.TableCount
-com.sun.star.text.textfield.CharacterCount
-com.sun.star.text.textfield.TemplateName
-com.sun.star.text.textfield.docinfo.ChangeDateTime
-com.sun.star.text.textfield.FileName
-com.sun.star.text.textfield.CombinedCharacters
-com.sun.star.text.textfield.JumpEdit
-com.sun.star.text.textfield.PageCount
-com.sun.star.text.textfield.HiddenText
-com.sun.star.text.textfield.docinfo.Description
-com.sun.star.text.textfield.docinfo.Info1
-com.sun.star.text.textfield.DatabaseNextSet
-com.sun.star.text.textfield.docinfo.PrintDateTime
-TOPIC:
-com.sun.star.text.FieldMaster
-com.sun.star.text.TextField
-com.sun.star.text.XTextField
-
-LINK:Documentation/DevGuide/Forms/Model-View_Interaction
-DESCR:Forms - Model-View Interaction
-REF:
-com.sun.star.form.component.TextField
-com.sun.star.beans.XPropertyChangeListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Option_Button
-DESCR:Basic - Option Button
-REF:
-com.sun.star.awt.UnoControlRadioButton
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Using_Spellchecker#Relevant_properties
-DESCR:OfficeDev - Using Spellchecker - Relevant properties
-REF:
-com.sun.star.linguistic2.XSpellAlternatives
-com.sun.star.linguistic2.LinguProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Using_UNO_Interfaces
-DESCR:ProUNO - Using UNO Interfaces
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.drawing.Text
-com.sun.star.bridge.XUnoUrlResolver
-com.sun.star.uno.XInterface
-com.sun.star.bridge.UnoUrlResolver
-TOPIC:
-com.sun.star.uno.XInterface
-
-LINK:Documentation/DevGuide/Database/Piggyback_Connections
-DESCR:Database - Piggyback Connections
-REF:
-com.sun.star.sdb.RowSet
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Service_Names
-DESCR:Spreadsheets - Service Names
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.sheet.AddIn
-com.sun.star.lang.XServiceName
-TOPIC:
-com.sun.star.lang.XServiceInfo
-
-LINK:Documentation/DevGuide/Text/Editing_Text#Text_Contents_Other_Than_Strings
-DESCR:Text - Editing Text - Text Contents Other Than Strings
-REF:
-com.sun.star.text.TextContent
-com.sun.star.lang.XComponent
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.text.textfield.JumpEdit
-com.sun.star.lang.XEventListener
-com.sun.star.text.XTextRange
-com.sun.star.text.XText
-com.sun.star.text.TextContentAnchorType
-com.sun.star.text.WrapTextMode
-com.sun.star.text.XTextContent
-TOPIC:
-com.sun.star.text.TextContent
-com.sun.star.text.XText
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Implementing_without_Helpers#Providing_a_Single_Factory
-DESCR:WritingUNO - C++ - Implementing without Helpers - Providing a Single Factory
-REF:
-com.sun.star.uno.XComponentContext
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XInitialization
-DESCR:WritingUNO - XInitialization
-REF:
-com.sun.star.lang.XInitialization
-TOPIC:
-com.sun.star.lang.XInitialization
-
-LINK:Documentation/DevGuide/AppendixC/The_Hierarchy_Content_Provider#Creation_of_New_HCP_Content
-DESCR:AppendixC - The Hierarchy Content Provider - Creation of New HCP Content
-REF:
-com.sun.star.ucb.XContentCreator
-TOPIC:
-com.sun.star.ucb.XContentCreator
-
-LINK:Documentation/DevGuide/Text/Accessing_Existing_Tables
-DESCR:Text - Accessing Existing Tables
-REF:
-com.sun.star.text.XTextTablesSupplier
-com.sun.star.text.TextTables
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Forms_as_Row_Sets
-DESCR:Forms - Forms as Row Sets
-REF:
-com.sun.star.sdb.RowSet
-com.sun.star.form.component.DataForm
-TOPIC:
-com.sun.star.sdb.RowSet
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleSelection
-DESCR:Accessibility - XAccessibleSelection
-REF:
-com.sun.star.accessibility.XAccessibleTable
-com.sun.star.accessibility.XAccessibleContext
-com.sun.star.accessibility.XAccessibleText
-com.sun.star.accessibility.XAccessibleSelection
-TOPIC:
-com.sun.star.accessibility.XAccessibleSelection
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#XTypeDescription
-DESCR:AdvUNO - UNO Reflection API - CoreReflection Service - XTypeDescription
-REF:
-com.sun.star.reflection.XEnumTypeDescription
-com.sun.star.reflection.TypeDescriptionManager
-com.sun.star.reflection.XInterfaceMemberTypeDescription
-com.sun.star.reflection.XInterfaceTypeDescription
-com.sun.star.reflection.XInterfaceMethodTypeDescription
-com.sun.star.reflection.XIndirectTypeDescription
-com.sun.star.reflection.XUnionTypeDescription
-com.sun.star.reflection.TypeDescriptionProvider
-com.sun.star.reflection.XInterfaceAttributeTypeDescription
-com.sun.star.reflection.XTypeDescription
-com.sun.star.reflection.XCompoundTypeDescription
-com.sun.star.container.XHierarchicalNameAccess
-com.sun.star.reflection.XArrayTypeDescription
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Controllers#XSelectionSupplier
-DESCR:OfficeDev - Component - Controllers - XSelectionSupplier
-REF:
-com.sun.star.view.XSelectionSupplier
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.view.XSelectionSupplier
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleComponent
-DESCR:Accessibility - XAccessibleComponent
-REF:
-com.sun.star.accessibility.XAccessibleComponent
-com.sun.star.accessibility.XAccessibleContext
-TOPIC:
-com.sun.star.accessibility.XAccessibleComponent
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Getting_Information_about_UNO_Objects#Inspecting_properties_during_debugging
-DESCR:ProUNO - Basic - Getting Information about UNO Objects - Inspecting properties during debugging
-REF:
-com.sun.star.beans.XPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Control_Models_as_Bound_Components
-DESCR:Forms - Control Models as Bound Components
-REF:
-com.sun.star.form.component.TextField
-com.sun.star.form.component.NumericField
-com.sun.star.form.component.DataForm
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Capabilities_of_SheetCellRanges_Container
-DESCR:Spreadsheets - Capabilities of SheetCellRanges Container
-REF:
-com.sun.star.sheet.XSheetCellRangeContainer
-com.sun.star.sheet.XCellRangesQuery
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.container.XNameContainer
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameAccess
-com.sun.star.sheet.SheetRangesQuery
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Database_Import
-DESCR:Spreadsheets - Database Import
-REF:
-com.sun.star.util.XImportable
-TOPIC:
-com.sun.star.sheet.DatabaseImportDescriptor
-
-LINK:Documentation/DevGuide/AppendixA/Special_Cases#Collection_Interfaces
-DESCR:AppendixA - Special Cases - Collection Interfaces
-REF:
-com.sun.star.text.TextDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Variable_Results
-DESCR:Spreadsheets - Variable Results
-REF:
-com.sun.star.sheet.XVolatileResult
-com.sun.star.sheet.VolatileResult
-com.sun.star.sheet.ResultEvent
-com.sun.star.sheet.XResultListener
-TOPIC:
-com.sun.star.sheet.XVolatileResult
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#Converter_Service
-DESCR:AdvUNO - UNO Reflection API - Converter Service
-REF:
-com.sun.star.script.XTypeConverter
-com.sun.star.uno.TypeClass
-com.sun.star.script.Converter
-com.sun.star.script.CannotConvertException
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/The_SQLQueryComposer
-DESCR:Database - The SQLQueryComposer
-REF:
-com.sun.star.sdb.SingleSelectQueryComposer
-com.sun.star.sdb.XSQLQueryComposerFactory
-com.sun.star.sdb.Connection
-com.sun.star.sdbcx.XTablesSupplier
-com.sun.star.sdb.DataColumn
-com.sun.star.sdbcx.XColumnsSupplier
-com.sun.star.sdb.XSQLQueryComposer
-com.sun.star.sdb.SQLQueryComposer
-TOPIC:
-com.sun.star.sdb.SQLQueryComposer
-
-LINK:Documentation/DevGuide/GUI/Roadmap_Control#Roadmap
-DESCR:GUI - Roadmap Control - null - Roadmap
-REF:
-com.sun.star.awt.XItemEventBroadcaster
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Absolute_Address
-DESCR:Spreadsheets - Absolute Address
-REF:
-com.sun.star.sheet.XCellRangeAddressable
-com.sun.star.table.CellRangeAddress
-TOPIC:
-com.sun.star.sheet.XCellRangeAddressable
-
-LINK:Documentation/DevGuide/AppendixC/The_FTP_Content_Provider#Commands_and_Properties
-DESCR:AppendixC - The FTP Content Provider - Commands and Properties
-REF:
-com.sun.star.ucb.XContent
-com.sun.star.lang.XServiceInfo
-com.sun.star.ucb.XContentCreator
-com.sun.star.lang.XComponent
-com.sun.star.container.XChild
-com.sun.star.ucb.XCommandInfoChangeNotifier
-com.sun.star.beans.XPropertySetInfoChangeNotifier
-com.sun.star.beans.XPropertiesChangeNotifier
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Manipulating_the_Data
-DESCR:Database - Manipulating the Data
-REF:
-com.sun.star.sdb.RowSet
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XNativeNumberSupplier
-DESCR:OfficeDev - Overview and Using the API - XNativeNumberSupplier
-REF:
-com.sun.star.i18n.XNativeNumberSupplier
-TOPIC:
-com.sun.star.i18n.XNativeNumberSupplier
-
-LINK:Documentation/DevGuide/Database/Retrieving_Values_from_Result_Sets
-DESCR:Database - Retrieving Values from Result Sets
-REF:
-com.sun.star.sdb.RowSet
-com.sun.star.sdb.ResultSet
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleStateSet
-DESCR:Accessibility - XAccessibleStateSet
-REF:
-com.sun.star.accessibility.AccessibleStateType
-com.sun.star.accessibility.XAccessibleStateSet
-TOPIC:
-com.sun.star.accessibility.AccessibleStateType
-com.sun.star.accessibility.XAccessibleStateSet
-
-LINK:Documentation/DevGuide/Database/Database_Design#Retrieving_Information_about_a_Database
-DESCR:Database - Database Design - Retrieving Information about a Database
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-TOPIC:
-com.sun.star.sdbc.XDatabaseMetaData
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Ranges
-DESCR:Spreadsheets - Cell Ranges
-REF:
-com.sun.star.sheet.SheetCellRange
-TOPIC:
-com.sun.star.sheet.SheetCellRange
-
-LINK:Documentation/DevGuide/WritingUNO/Writing_the_Specification
-DESCR:WritingUNO - Writing the Specification
-REF:
-com.sun.star.bridge.XUnoUrlResolver
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Connecting_Through_a_DataSource
-DESCR:Database - Connecting Through a DataSource
-REF:
-com.sun.star.sdbc.XDataSource
-com.sun.star.sdb.InteractionHandler
-com.sun.star.sdb.XCompletedConnection
-TOPIC:
-com.sun.star.sdbc.XDataSource
-
-LINK:Documentation/DevGuide/GUI/Date_Field
-DESCR:GUI - Date Field
-REF:
-com.sun.star.awt.UnoControlDateField
-com.sun.star.awt.UnoControlDateFieldModel
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Opening_a_Connection
-DESCR:ProUNO - Opening a Connection
-REF:
-com.sun.star.connection.Acceptor
-com.sun.star.connection.Connector
-com.sun.star.connection.XConnector
-com.sun.star.connection.XConnection
-com.sun.star.connection.XAcceptor
-TOPIC:
-com.sun.star.connection.Acceptor
-com.sun.star.bridge.XBridgeFactory
-com.sun.star.connection.Connector
-com.sun.star.connection.XConnector
-com.sun.star.bridge.BridgeFactory
-com.sun.star.connection.XAcceptor
-
-LINK:Documentation/DevGuide/Database/Connection_Service
-DESCR:Database - Connection Service
-REF:
-com.sun.star.sdbc.Connection
-com.sun.star.sdbc.XDatabaseMetaData
-com.sun.star.sdbc.PreparedStatement
-com.sun.star.sdbc.XWarningsSupplier
-com.sun.star.lang.XComponent
-com.sun.star.sdbc.XConnection
-com.sun.star.sdbc.CallableStatement
-com.sun.star.sdbc.Statement
-TOPIC:
-com.sun.star.sdbc.Connection
-
-LINK:Documentation/DevGuide/OfficeDev/Managing_Number_Formats
-DESCR:OfficeDev - Managing Number Formats
-REF:
-com.sun.star.sdb.DatabaseEnvironment
-com.sun.star.beans.XPropertySet
-com.sun.star.awt.UnoControlFormattedFieldModel
-com.sun.star.sdb.DataSource
-com.sun.star.util.NumberFormats
-com.sun.star.sdb.DatabaseAccess
-com.sun.star.util.XNumberFormatsSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Bookmarks
-DESCR:Text - Bookmarks
-REF:
-com.sun.star.text.TextContent
-com.sun.star.container.XNamed
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.text.XTextRange
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XBookmarksSupplier
-com.sun.star.text.XTextContent
-com.sun.star.container.XNameAccess
-com.sun.star.text.Bookmarks
-TOPIC:
-com.sun.star.text.Bookmark
-
-LINK:Documentation/DevGuide/Database/Connections#Communication
-DESCR:Database - Connections - Understanding Connections - Communication
-REF:
-com.sun.star.sdbc.Connection
-com.sun.star.sdbc.SQLWarning
-com.sun.star.sdbc.XWarningsSupplier
-com.sun.star.sdbc.XConnection
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XExtendedCalendar
-DESCR:OfficeDev - Overview and Using the API - XExtendedCalendar
-REF:
-com.sun.star.i18n.XExtendedCalendar
-com.sun.star.i18n.XCalendar
-TOPIC:
-com.sun.star.i18n.XExtendedCalendar
-
-LINK:Documentation/DevGuide/Drawings/Glue_Points_and_Connectors
-DESCR:Drawings - Glue Points and Connectors
-REF:
-com.sun.star.drawing.ConnectorShape
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Columns_and_Rows
-DESCR:Spreadsheets - Columns and Rows
-REF:
-com.sun.star.table.XTableColumns
-com.sun.star.container.XNamed
-com.sun.star.beans.XPropertySet
-com.sun.star.table.XTableRows
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.table.XCellRange
-com.sun.star.container.XNameAccess
-com.sun.star.table.TableColumns
-com.sun.star.table.TableColumn
-com.sun.star.table.TableRow
-com.sun.star.table.TableRows
-TOPIC:
-com.sun.star.table.TableColumns
-com.sun.star.table.TableRows
-
-LINK:Documentation/DevGuide/Database/User_Service
-DESCR:Database - User Service
-REF:
-com.sun.star.sdbcx.XAuthorizable
-com.sun.star.sdbcx.User
-com.sun.star.sdbcx.XUser
-TOPIC:
-com.sun.star.sdbcx.XUser
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Exceptions_and_Errorcodes
-DESCR:ProUNO - Bridge - Exceptions and Errorcodes
-REF:
-com.sun.star.lang.IllegalArgumentException
-com.sun.star.beans.UnknownPropertyException
-com.sun.star.uno.RuntimeException
-com.sun.star.script.CannotConvertException
-com.sun.star.reflection.InvocationTargetException
-com.sun.star.script.Invocation
-TOPIC:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-com.sun.star.script.CannotConvertException
-com.sun.star.reflection.InvocationTargetException
-
-LINK:Documentation/DevGuide/OfficeDev/Desktop_Environment
-DESCR:OfficeDev - Desktop Environment
-REF:
-com.sun.star.document.TypeDetection
-com.sun.star.lang.XComponent
-com.sun.star.frame.XDesktop
-com.sun.star.frame.Desktop
-TOPIC:
-com.sun.star.frame.Desktop
-
-LINK:Documentation/DevGuide/GUI/Roadmap_Control#Roadmap_Controlmodel
-DESCR:GUI - Roadmap Control - null - Roadmap Controlmodel
-REF:
-com.sun.star.awt.UnoControlRoadmapModel
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/C++/Using_Weak_References
-DESCR:ProUNO - C++ - Using Weak References
-REF:
-com.sun.star.lang.XEventListener
-com.sun.star.uno.XWeak
-TOPIC:
-com.sun.star.uno.XWeak
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Getting_Information_about_UNO_Objects#Inspecting_Methods_During_Debugging
-DESCR:ProUNO - Basic - Getting Information about UNO Objects - Inspecting Methods During Debugging
-REF:
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Formatted_Field
-DESCR:Basic - Formatted Field
-REF:
-com.sun.star.awt.UnoControlFormattedField
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/Implementing_UNO_Language_Bindings#Bootstrapping
-DESCR:AdvUNO - Implementing UNO Language Bindings - Overview of Language Bindings and Bridges - Bootstrapping
-REF:
-com.sun.star.bridge.UnoUrlResolver
-TOPIC:
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/AppendixA/Services#Naming
-DESCR:AppendixA - Services - Naming
-REF:
-com.sun.star.text.TextDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Default_Mappings
-DESCR:ProUNO - Bridge - Default Mappings
-REF:
-com.sun.star.bridge.oleautomation.SCode
-com.sun.star.uno.XInterface
-com.sun.star.script.XInvocation
-com.sun.star.bridge.oleautomation.Date
-com.sun.star.bridge.oleautomation.Currency
-com.sun.star.bridge.oleautomation.Decimal
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Validation
-DESCR:Forms - Validation
-REF:
-com.sun.star.form.component.TextField
-com.sun.star.form.validation.XValidator
-com.sun.star.xforms
-com.sun.star.form.validation.XValidatable
-com.sun.star.form.validation.ValidatableControlModel
-com.sun.star.xforms.Binding
-com.sun.star.form.validation.XValidatableFormComponent
-com.sun.star.form.validation.XFormComponentValidityListener
-com.sun.star.form.component.DateField
-TOPIC:
-com.sun.star.form.validation.XValidatable
-
-LINK:Documentation/DevGuide/Forms/Form_Components
-DESCR:Forms - Form Components
-REF:
-com.sun.star.form
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Image_Control
-DESCR:Basic - Image Control
-REF:
-com.sun.star.awt.UnoControlImageControl
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/C++/Establishing_Interprocess_Connections
-DESCR:ProUNO - C++ - Establishing Interprocess Connections
-REF:
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.bridge.XUnoUrlResolver
-com.sun.star.lang.DisposedException
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.lang.XMultiComponentFactory
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/WritingUNO/Intercepting_Context_Menus#Register_and_Remove_an_Interceptor
-DESCR:WritingUNO - Intercepting Context Menus - Register and Remove an Interceptor
-REF:
-com.sun.star.ui.XContextMenuInterception
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Understanding_the_API_Reference#Object_Composition
-DESCR:ProUNO - Understanding the API Reference - Object Composition
-REF:
-com.sun.star.uno.XInterface
-com.sun.star.text.XText
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Using_Hyphenator
-DESCR:OfficeDev - Using Hyphenator
-REF:
-com.sun.star.linguistic2.XHyphenator
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Conditional_Formats
-DESCR:Spreadsheets - Conditional Formats
-REF:
-com.sun.star.sheet.XSheetConditionalEntry
-com.sun.star.sheet.XSheetCondition
-com.sun.star.sheet.ConditionOperator
-com.sun.star.sheet.XSheetConditionalEntries
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.beans.PropertyValue
-com.sun.star.sheet.TableConditionalFormat
-com.sun.star.table.CellAddress
-com.sun.star.sheet.TableConditionalEntry
-TOPIC:
-com.sun.star.sheet.ConditionOperator
-com.sun.star.sheet.XSheetConditionalEntries
-com.sun.star.sheet.TableConditionalFormat
-
-LINK:Documentation/DevGuide/UCB/Creating
-DESCR:UCB - Creating
-REF:
-com.sun.star.ucb.XContentCreator
-com.sun.star.ucb.ContentInfo
-com.sun.star.ucb.InsertCommandArgument
-TOPIC:
-com.sun.star.ucb.XContentCreator
-com.sun.star.ucb.ContentInfo
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Mapping_of_Interfaces_and_Structures
-DESCR:ProUNO - Bridge - Mapping of Interfaces and Structures
-REF:
-com.sun.star.script.XInvocation
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Capabilities_of_SheetCellRange
-DESCR:Spreadsheets - Capabilities of SheetCellRange
-REF:
-com.sun.star.sheet.XCellRangesQuery
-com.sun.star.table.XColumnRowRange
-com.sun.star.sheet.XSheetCellRange
-com.sun.star.sheet.XCellRangeData
-com.sun.star.table.CellRangeAddress
-com.sun.star.sheet.XCellSeries
-com.sun.star.util.XImportable
-com.sun.star.sheet.XUniqueCellFormatRangesSupplier
-com.sun.star.sheet.XSheetFilterableEx
-com.sun.star.sheet.XArrayFormulaRange
-com.sun.star.sheet.SheetRangesQuery
-com.sun.star.util.XMergeable
-com.sun.star.util.XIndent
-com.sun.star.chart.XChartDataArray
-com.sun.star.sheet.XCellFormatRangesSupplier
-com.sun.star.sheet.SheetCellRange
-com.sun.star.sheet.XSheetOperation
-com.sun.star.sheet.XSubTotalCalculatable
-com.sun.star.util.XSortable
-com.sun.star.util.XSearchable
-com.sun.star.sheet.XMultipleOperation
-com.sun.star.table.XAutoFormattable
-com.sun.star.sheet.XSheetFilterable
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Frames#Frame_Setup
-DESCR:OfficeDev - Component - Frames - XFrame - Frame Setup
-REF:
-com.sun.star.frame.XFrame
-TOPIC:
-com.sun.star.frame.XFrame
-
-LINK:Documentation/DevGuide/Drawings/Setting_the_Current_Page
-DESCR:Drawings - Setting the Current Page
-REF:
-com.sun.star.view.XSelectionSupplier
-com.sun.star.frame.XController
-com.sun.star.drawing.XDrawView
-com.sun.star.beans.XPropertySet
-com.sun.star.frame.XDispatchProvider
-com.sun.star.ui.XContextMenuInterception
-com.sun.star.task.XStatusIndicatorSupplier
-com.sun.star.drawing.DrawingDocumentDrawView
-TOPIC:
-com.sun.star.view.XSelectionSupplier
-com.sun.star.drawing.DrawingDocumentDrawView
-
-LINK:Documentation/DevGuide/Spreadsheets/Sheet_Outline
-DESCR:Spreadsheets - Sheet Outline
-REF:
-com.sun.star.sheet.XSheetOutline
-com.sun.star.table.TableOrientation
-TOPIC:
-com.sun.star.sheet.XSheetOutline
-
-LINK:Documentation/DevGuide/Text/Example:_Visible_Cursor_Position
-DESCR:Text - Example: Visible Cursor Position
-REF:
-com.sun.star.frame.Desktop
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Driver_Service
-DESCR:Database - Driver Service
-REF:
-com.sun.star.sdbc.XDriver
-com.sun.star.sdbc.Driver
-TOPIC:
-com.sun.star.sdbc.Driver
-
-LINK:Documentation/DevGuide/Database/The_Descriptor_Pattern
-DESCR:Database - The Descriptor Pattern
-REF:
-com.sun.star.sdbcx.XDataDescriptorFactory
-com.sun.star.sdbcx.TableDescriptor
-com.sun.star.beans.XPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Sheet_Links
-DESCR:Spreadsheets - Sheet Links
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.sheet.SheetLink
-com.sun.star.sheet.SheetLinkMode
-com.sun.star.container.XNameAccess
-com.sun.star.sheet.SheetLinks
-com.sun.star.sheet.XSheetLinkable
-com.sun.star.util.XRefreshable
-TOPIC:
-com.sun.star.sheet.SheetLink
-com.sun.star.sheet.SheetLinks
-com.sun.star.sheet.XSheetLinkable
-
-LINK:Documentation/DevGuide/Spreadsheets/Levels
-DESCR:Spreadsheets - Levels
-REF:
-com.sun.star.sheet.MemberResultFlags
-com.sun.star.sheet.GeneralFunction
-com.sun.star.sheet.MemberResult
-com.sun.star.beans.XPropertySet
-com.sun.star.sheet.DataPilotSourceLevel
-com.sun.star.sheet.XDataPilotMemberResults
-TOPIC:
-com.sun.star.sheet.DataPilotSourceLevel
-
-LINK:Documentation/DevGuide/Forms/Form_Layer_Views#Locating_Controls
-DESCR:Forms - Form Layer Views - Locating Controls
-REF:
-com.sun.star.view.XControlAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Java/Mapping_of_Singletons
-DESCR:ProUNO - Java - Mapping of Singletons
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.uno.DeploymentException
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/First_Contact#Failed_Connections
-DESCR:FirstSteps - First Contact - Getting Started - Failed Connections
-REF:
-com.sun.star.lang.DisposedException
-TOPIC:
-com.sun.star.lang.DisposedException
-
-LINK:Documentation/DevGuide/Spreadsheets/Fill_Series
-DESCR:Spreadsheets - Fill Series
-REF:
-com.sun.star.sheet.FillDateMode
-com.sun.star.sheet.XCellSeries
-com.sun.star.sheet.FillDirection
-com.sun.star.sheet.FillMode
-TOPIC:
-com.sun.star.sheet.XCellSeries
-
-LINK:Documentation/DevGuide/ProUNO/Exceptions
-DESCR:ProUNO - Exceptions
-REF:
-com.sun.star.uno.Exception
-com.sun.star.uno.XInterface
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Other_Table_Operations#Charts
-DESCR:Spreadsheets - Other Table Operations - Charts
-REF:
-com.sun.star.table.XTableCharts
-com.sun.star.container.XNamed
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.table.TableCharts
-com.sun.star.document.XEmbeddedObjectSupplier
-com.sun.star.table.XTableChart
-com.sun.star.table.TableChart
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Inserting_a_Paragraph_where_no_Cursor_can_go
-DESCR:Text - Inserting a Paragraph where no Cursor can go
-REF:
-com.sun.star.text.Text
-com.sun.star.text.Paragraph
-com.sun.star.text.TextTable
-com.sun.star.text.TextSection
-com.sun.star.text.XRelativeTextContentInsert
-TOPIC:
-com.sun.star.text.XRelativeTextContentInsert
-
-LINK:Documentation/DevGuide/WritingUNO/Create_Instance_with_Arguments
-DESCR:WritingUNO - Create Instance with Arguments
-REF:
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.lang.XInitialization
-com.sun.star.lang.XSingleComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Value_Bindings
-DESCR:Forms - Value Bindings
-REF:
-com.sun.star.form.binding.XBindableValue
-com.sun.star.form.binding.XValueBinding
-com.sun.star.util.XModifyListener
-com.sun.star.form.binding.IncompatibleTypesException
-com.sun.star.util.XModifyBroadcaster
-com.sun.star.form.binding.ValueBinding
-com.sun.star.beans.XPropertyChangeListener
-TOPIC:
-com.sun.star.form.binding.XBindableValue
-com.sun.star.form.binding.XValueBinding
-
-LINK:Documentation/DevGuide/Scripting/Integration_with_Extension_Manager
-DESCR:Scripting - Integration with Extension Manager
-REF:
-com.sun.star.deployment.PackageRegistryBackend
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Logical_Forms
-DESCR:Forms - Logical Forms
-REF:
-com.sun.star.form.FormComponent
-com.sun.star.form.FormComponents
-com.sun.star.form.component.Form
-TOPIC:
-com.sun.star.form.component.Form
-
-LINK:Documentation/DevGuide/AdvUNO/XInvocation_Bridge#Argument_Conversion
-DESCR:AdvUNO - XInvocation Bridge - Scripting Existing UNO Objects - Argument Conversion
-REF:
-com.sun.star.beans.XMaterialHolder
-com.sun.star.reflection.CoreReflection
-com.sun.star.script.Invocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Protecting_Spreadsheets
-DESCR:Spreadsheets - Protecting Spreadsheets
-REF:
-com.sun.star.util.XProtectable
-com.sun.star.document.XActionLockable
-TOPIC:
-com.sun.star.util.XProtectable
-com.sun.star.document.XActionLockable
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleValue
-DESCR:Accessibility - XAccessibleValue
-REF:
-com.sun.star.accessibility.XAccessibleValue
-TOPIC:
-com.sun.star.accessibility.XAccessibleValue
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Controllers#XContextMenuInterception
-DESCR:OfficeDev - Component - Controllers - XContextMenuInterception
-REF:
-com.sun.star.ui.XContextMenuInterception
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/HTML_Forms
-DESCR:Forms - HTML Forms
-REF:
-com.sun.star.form.XReset
-com.sun.star.form.XSubmit
-com.sun.star.form.component.HTMLForm
-TOPIC:
-com.sun.star.form.component.HTMLForm
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_and_Cell_Range_Access
-DESCR:Spreadsheets - Cell and Cell Range Access
-REF:
-com.sun.star.sheet.XSheetCellRange
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.table.XCellRange
-TOPIC:
-com.sun.star.sheet.XSheetCellRange
-com.sun.star.sheet.SheetCellRange
-com.sun.star.table.XCellRange
-
-LINK:Documentation/DevGuide/ProUNO/CLI/Important_Interfaces_and_Implementations
-DESCR:ProUNO - CLI - Important Interfaces and Implementations
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.beans.XPropertySet
-com.sun.star.lang.XEventListener
-com.sun.star.uno.XWeak
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Printing_Text_Documents#Printer_and_Print_Job_Settings
-DESCR:Text - Printing Text Documents - Printer and Print Job Settings
-REF:
-com.sun.star.awt.Size
-com.sun.star.view.PaperOrientation
-com.sun.star.view.PrintOptions
-com.sun.star.view.PrinterDescriptor
-com.sun.star.view.XPrintable
-com.sun.star.view.PaperFormat
-TOPIC:
-com.sun.star.view.XPrintable
-
-LINK:Documentation/DevGuide/Forms/Control_Models_Forms
-DESCR:Forms - Control Models Forms
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.form.XFormComponent
-com.sun.star.form.FormControlModel
-com.sun.star.form.component.Form
-com.sun.star.form.XForm
-com.sun.star.awt.XTabControllerModel
-com.sun.star.form.component.DataForm
-com.sun.star.form.component.HTMLForm
-TOPIC:
-com.sun.star.form.component.Form
-com.sun.star.form.XForm
-com.sun.star.awt.XTabControllerModel
-com.sun.star.form.component.HTMLForm
-
-LINK:Documentation/DevGuide/GUI/Events#Mouse_Listeners
-DESCR:GUI - Events - Mouse Listeners
-REF:
-com.sun.star.awt.XMouseListener
-com.sun.star.awt.XMouseMotionListener
-com.sun.star.awt.MenuEvent
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#InvocationAdapterFactory
-DESCR:AdvUNO - UNO Reflection API - CoreReflection Service - InvocationAdapterFactory
-REF:
-com.sun.star.script.XInvocationAdapterFactory2
-com.sun.star.script.XInvocationAdapterFactory
-com.sun.star.script.InvocationAdapterFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Merging_Cell_Ranges_into_a_Single_Cell
-DESCR:Spreadsheets - Merging Cell Ranges into a Single Cell
-REF:
-com.sun.star.util.XMergeable
-TOPIC:
-com.sun.star.util.XMergeable
-
-LINK:Documentation/DevGuide/Database/Group_Service
-DESCR:Database - Group Service
-REF:
-com.sun.star.sdbcx.XAuthorizable
-com.sun.star.sdbcx.Group
-com.sun.star.sdbcx.XUsersSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Table_Service
-DESCR:Database - Table Service
-REF:
-com.sun.star.sdbcx.XDataDescriptorFactory
-com.sun.star.sdbcx.XKeysSupplier
-com.sun.star.sdbcx.XColumnsSupplier
-com.sun.star.sdbcx.XIndexesSupplier
-com.sun.star.sdbcx.XAlterTable
-com.sun.star.sdbcx.XRename
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Accessing_Dialogs
-DESCR:WritingUNO - Accessing Dialogs
-REF:
-com.sun.star.awt.XDialogProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Handling_Documents#Target_Frame
-DESCR:OfficeDev - Handling Documents - Loading Documents - Target Frame
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.lang.XComponent
-com.sun.star.frame.FrameSearchFlag
-com.sun.star.frame.XFrame
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.FrameSearchFlag
-
-LINK:Documentation/DevGuide/GUI/Instantiation_of_a_Dialog
-DESCR:GUI - Instantiation of a Dialog
-REF:
-com.sun.star.awt.XControlContainer
-com.sun.star.container.XNameContainer
-com.sun.star.awt.XControl
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Operations
-DESCR:Spreadsheets - Operations
-REF:
-com.sun.star.sheet.GeneralFunction
-com.sun.star.sheet.CellFlags
-com.sun.star.sheet.XSheetOperation
-TOPIC:
-com.sun.star.sheet.XSheetOperation
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Controllers#XDispatchProvider
-DESCR:OfficeDev - Component - Controllers - XDispatchProvider
-REF:
-com.sun.star.frame.XDispatchProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/FormComponents_Service
-DESCR:Forms - FormComponents Service
-REF:
-com.sun.star.form.FormComponents
-TOPIC:
-com.sun.star.form.FormComponents
-
-LINK:Documentation/DevGuide/Spreadsheets/Compatibility_Names
-DESCR:Spreadsheets - Compatibility Names
-REF:
-com.sun.star.sheet.XCompatibilityNames
-TOPIC:
-com.sun.star.sheet.XCompatibilityNames
-
-LINK:Documentation/DevGuide/Text/Printing_Text_Documents#Printing_Multiple_Pages_on_one_Page
-DESCR:Text - Printing Text Documents - Printing Multiple Pages on one Page
-REF:
-com.sun.star.text.XPagePrintable
-com.sun.star.beans.PropertyValue
-com.sun.star.text.PagePrintSettings
-TOPIC:
-com.sun.star.text.XPagePrintable
-
-LINK:Documentation/DevGuide/Database/Database_Design#SQL_Objects_and_their_Attributes
-DESCR:Database - Database Design - Retrieving Information about a Database - SQL Objects and their Attributes
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Intercepting_Context_Menus
-DESCR:WritingUNO - Intercepting Context Menus
-REF:
-com.sun.star.frame.Controller
-com.sun.star.ui.XContextMenuInterception
-TOPIC:
-com.sun.star.ui.XContextMenuInterception
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#XTypeProvider_Interface
-DESCR:AdvUNO - UNO Reflection API - XTypeProvider Interface
-REF:
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/XInvocation_Bridge#Proxying_a_UNO_Object
-DESCR:AdvUNO - XInvocation Bridge - Scripting Existing UNO Objects - Proxying a UNO Object
-REF:
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.script.XInvocation
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.script.Invocation
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/Folders#Accessing_the_Children_of_a_Folder
-DESCR:UCB - Folders - Accessing the Children of a Folder
-REF:
-com.sun.star.sdbc.XRow
-com.sun.star.ucb.XContentAccess
-com.sun.star.ucb.OpenCommandArgument2
-com.sun.star.ucb.DynamicResultSet
-com.sun.star.beans.Property
-com.sun.star.ucb.XDynamicResultSet
-com.sun.star.sdbc.XResultSet
-TOPIC:
-com.sun.star.ucb.OpenCommandArgument2
-com.sun.star.ucb.DynamicResultSet
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Returning_Results
-DESCR:WritingUNO - Jobs - Returning Results
-REF:
-com.sun.star.beans.NamedValue
-com.sun.star.frame.DispatchResultEvent
-com.sun.star.task.XJobListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Line_Numbering_and_Outline_Numbering#Number_Formats
-DESCR:Text - Line Numbering and Outline Numbering - Number Formats
-REF:
-com.sun.star.util.XNumberFormatsSupplier
-TOPIC:
-com.sun.star.util.XNumberFormatsSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/XML_Based_Filter_Development#Introduction
-DESCR:OfficeDev - XML Based Filter Development - Introduction
-REF:
-com.sun.star.document.XFilter
-com.sun.star.xml.sax.XDocumentHandler
-TOPIC:
-com.sun.star.document.XFilter
-
-LINK:Documentation/DevGuide/ProUNO/Collections_and_Containers
-DESCR:ProUNO - Collections and Containers
-REF:
-com.sun.star.container.XContainer
-com.sun.star.container
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XElementAccess
-com.sun.star.container.XIndexReplace
-com.sun.star.container.XNameAccess
-com.sun.star.container.XContainerListener
-com.sun.star.container.XIndexContainer
-TOPIC:
-com.sun.star.container.XNameContainer
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameAccess
-com.sun.star.container.XIndexContainer
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Create_Instance_with_Arguments
-DESCR:WritingUNO - C++ - Create Instance with Arguments
-REF:
-com.sun.star.lang.XInitialization
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Date_Field
-DESCR:Basic - Date Field
-REF:
-com.sun.star.awt.UnoControlDateField
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/UNO_Interprocess_Connections
-DESCR:ProUNO - UNO Interprocess Connections
-REF:
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.bridge.XUnoUrlResolver
-com.sun.star.lang.DisposedException
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.lang.XMultiComponentFactory
-com.sun.star.lang.ServiceManager
-
-LINK:Documentation/DevGuide/OfficeDev/Writing_the_Filtering_Component#XExportFilter
-DESCR:OfficeDev - Writing the Filtering Component - XExportFilter
-REF:
-com.sun.star.xml.XExportFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/Implementation_Loader#Shared_Library_Loader
-DESCR:AdvUNO - Implementation Loader - Shared Library Loader
-REF:
-com.sun.star.loader.SharedLibrary
-TOPIC:
-com.sun.star.loader.SharedLibrary
-
-LINK:Documentation/DevGuide/Database/The_SDBC_Driver_for_ADO
-DESCR:Database - The SDBC Driver for ADO
-REF:
-com.sun.star.sdbcx.Driver
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Closing_a_Connection
-DESCR:ProUNO - Closing a Connection
-REF:
-com.sun.star.lang.XEventListener
-com.sun.star.lang.DisposedException
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Hierarchies
-DESCR:Spreadsheets - Hierarchies
-REF:
-com.sun.star.sheet.DataPilotSourceDimension
-com.sun.star.sheet.DataPilotSourceHierarchy
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Properties_of_a_FrameLoader
-DESCR:OfficeDev - Properties of a FrameLoader
-REF:
-com.sun.star.document.FilterFactory
-com.sun.star.frame.SynchronousFrameLoader
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.container.XNameAccess
-com.sun.star.frame.FrameLoaderFactory
-com.sun.star.frame.FrameLoader
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Connecting_Using_the_DriverManager_and_a_Database_URL
-DESCR:Database - Connecting Using the DriverManager and a Database URL
-REF:
-com.sun.star.sdbc.XDriverManager
-com.sun.star.sdbc.DriverManager
-com.sun.star.beans.PropertyValue
-TOPIC:
-com.sun.star.sdbc.DriverManager
-
-LINK:Documentation/DevGuide/UCB/Obtaining_Content_Properties
-DESCR:UCB - Obtaining Content Properties
-REF:
-com.sun.star.sdbc.XRow
-com.sun.star.ucb.Command
-com.sun.star.beans.Property
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Defining_an_Interface#Attributes
-DESCR:WritingUNO - Defining an Interface - Attributes
-REF:
-com.sun.star.awt.Size
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Usage_of_Types#Structs
-DESCR:ProUNO - Bridge - Usage of Types - Structs
-REF:
-com.sun.star.reflection.XIdlClass
-com.sun.star.reflection.CoreReflection
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Getting_the_Dialog_Model
-DESCR:Basic - Getting the Dialog Model
-REF:
-com.sun.star.awt.XControl
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Overall_Document_Features#Page_Styles
-DESCR:Text - Overall Document Features - Styles - Page Styles
-REF:
-com.sun.star.style.PageStyle
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Common_Properties
-DESCR:GUI - Common Properties
-REF:
-com.sun.star.awt.XWindow
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/Using_the_Accessibility_API
-DESCR:Accessibility - Using the Accessibility API
-REF:
-com.sun.star.accessibility.XAccessibleEventListener
-com.sun.star.awt.XTopWindowListener
-com.sun.star.awt.XExtendedToolkit
-com.sun.star.accessibility.AccessibleEventObject
-com.sun.star.accessibility.XAccessibleContext
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Ranges_and_Cells_Container
-DESCR:Spreadsheets - Cell Ranges and Cells Container
-REF:
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.sheet.SheetRangesQuery
-TOPIC:
-com.sun.star.sheet.SheetCellRanges
-
-LINK:Documentation/DevGuide/Drawings/Presentation_Settings
-DESCR:Drawings - Presentation Settings
-REF:
-com.sun.star.presentation.Presentation
-com.sun.star.presentation.XPresentation
-com.sun.star.presentation.XPresentationSupplier
-TOPIC:
-com.sun.star.presentation.XPresentation
-
-LINK:Documentation/DevGuide/WritingUNO/XComponent
-DESCR:WritingUNO - XComponent
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.lang.XEventListener
-TOPIC:
-com.sun.star.lang.XComponent
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Controllers#XController
-DESCR:OfficeDev - Component - Controllers - XController
-REF:
-com.sun.star.frame.XController
-com.sun.star.lang.XComponent
-com.sun.star.frame.XFrame
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.Controller
-
-LINK:Documentation/DevGuide/Spreadsheets/Overall_Document_Features#Styles
-DESCR:Spreadsheets - Overall Document Features - Styles
-REF:
-com.sun.star.style.XStyleFamiliesSupplier
-TOPIC:
-com.sun.star.style.XStyleFamiliesSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/Command_URL
-DESCR:OfficeDev - Command URL
-REF:
-com.sun.star.util.URL
-TOPIC:
-com.sun.star.util.URL
-
-LINK:Documentation/DevGuide/AppendixA/General_Design_Rules#Inheritance
-DESCR:AppendixA - General Design Rules - Inheritance
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Process#Getting_a_Dispatch_Object
-DESCR:OfficeDev - Dispatch Process - Getting a Dispatch Object
-REF:
-com.sun.star.frame.XDispatchProvider
-com.sun.star.frame.XDispatch
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Weak_Objects_and_References
-DESCR:ProUNO - Weak Objects and References
-REF:
-com.sun.star.uno.XAdapter
-com.sun.star.uno.XReference
-com.sun.star.uno.XWeak
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Indexes_and_Index_Marks
-DESCR:Text - Indexes and Index Marks
-REF:
-TOPIC:
-com.sun.star.text.BaseIndex
-com.sun.star.text.XDocumentIndex
-
-LINK:Documentation/DevGuide/WritingUNO/The_UNO_Executable
-DESCR:WritingUNO - The UNO Executable
-REF:
-com.sun.star.lang.XMain
-TOPIC:
-com.sun.star.lang.XMain
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Window_Interfaces#XTopWindow
-DESCR:OfficeDev - Component - Window Interfaces - XTopWindow
-REF:
-com.sun.star.awt.WindowEvent
-com.sun.star.awt.XMenuBar
-com.sun.star.awt.XTopWindow
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Progress_Bar
-DESCR:Basic - Progress Bar
-REF:
-com.sun.star.awt.UnoControlProgressBar
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Processing_Chain
-DESCR:OfficeDev - Processing Chain
-REF:
-com.sun.star.frame.FeatureStateEvent
-com.sun.star.frame.XDispatchProviderInterception
-com.sun.star.frame.XDispatchProvider
-com.sun.star.util.URL
-com.sun.star.util.URLTransformer
-com.sun.star.frame.XDispatch
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Filtering_Process#TypeDetection
-DESCR:OfficeDev - Filtering Process - TypeDetection
-REF:
-com.sun.star.document.TypeDetection
-com.sun.star.frame.FrameLoaderFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Update
-DESCR:Database - Update
-REF:
-com.sun.star.sdbc.XRowUpdate
-com.sun.star.sdbc.XResultSetUpdate
-TOPIC:
-com.sun.star.sdbc.XRowUpdate
-
-LINK:Documentation/DevGuide/Spreadsheets/Equally_Formatted_Cell_Ranges#Cell_Format_Ranges
-DESCR:Spreadsheets - Equally Formatted Cell Ranges - Cell Format Ranges
-REF:
-com.sun.star.sheet.CellFormatRanges
-TOPIC:
-com.sun.star.sheet.CellFormatRanges
-
-LINK:Documentation/DevGuide/Database/Creating_a_User
-DESCR:Database - Creating a User
-REF:
-com.sun.star.sdbcx.UserDescriptor
-com.sun.star.sdbcx.XDataDescriptorFactory
-TOPIC:
-com.sun.star.sdbcx.UserDescriptor
-
-LINK:Documentation/DevGuide/Database/The_DataSource_Service#Adding_and_Editing_Datasources
-DESCR:Database - The DataSource Service - Adding and Editing Datasources
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.beans.XPropertySet
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.container.XContainer
-com.sun.star.container.XNameAccess
-com.sun.star.uno.XNamingService
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Predefined_Variables
-DESCR:OfficeDev - Predefined Variables
-REF:
-com.sun.star.util.PathSubstitution
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/Listeners_and_Broadcasters
-DESCR:Accessibility - Listeners and Broadcasters
-REF:
-com.sun.star.accessibility.XAccessibleEventListener
-com.sun.star.accessibility.XAccessibleEventBroadcaster
-com.sun.star.accessibility.AccessibleEventObject
-com.sun.star.accessibility.AccessibleEventId
-TOPIC:
-com.sun.star.accessibility.XAccessibleEventListener
-com.sun.star.accessibility.XAccessibleEventBroadcaster
-
-LINK:Documentation/DevGuide/GUI/Label_Field
-DESCR:GUI - Label Field
-REF:
-com.sun.star.awt.UnoControlFixedTextModel
-com.sun.star.awt.UnoControlFixedText
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Working_with_Presentation_Documents
-DESCR:Drawings - Working with Presentation Documents
-REF:
-com.sun.star.presentation.DrawPage
-com.sun.star.drawing.XDrawPagesSupplier
-com.sun.star.presentation.XPresentation
-TOPIC:
-com.sun.star.presentation.DrawPage
-com.sun.star.presentation.XPresentation
-
-LINK:Documentation/DevGuide/OfficeDev/Filter
-DESCR:OfficeDev - Filter
-REF:
-com.sun.star.document.FilterFactory
-com.sun.star.document.XFilter
-com.sun.star.container.XNamed
-com.sun.star.document.XImporter
-com.sun.star.lang.XInitialization
-com.sun.star.beans.PropertyValue
-com.sun.star.document.ImportFilter
-com.sun.star.document.XExporter
-com.sun.star.document.ExportFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Linguistics
-DESCR:OfficeDev - Linguistics
-REF:
-TOPIC:
-com.sun.star.linguistic2.Hyphenator
-com.sun.star.linguistic2.SpellChecker
-com.sun.star.linguistic2.LinguServiceManager
-com.sun.star.linguistic2.DictionaryList
-com.sun.star.linguistic2.LinguProperties
-com.sun.star.linguistic2.Thesaurus
-
-LINK:Documentation/DevGuide/WritingUNO/Write_Registration_Info_Using_a_Helper_Method
-DESCR:WritingUNO - Write Registration Info Using a Helper Method
-REF:
-com.sun.star.registry.XRegistryKey
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/The_SDBC_Driver_for_ODBC
-DESCR:Database - The SDBC Driver for ODBC
-REF:
-com.sun.star.sdbc.ODBCConnectionProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Using_Dialogs_in_Components#Instantiate_and_display_a_dialog
-DESCR:WritingUNO - Using Dialogs in Components - Instantiate and display a dialog
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.awt.XDialog
-com.sun.star.awt.XDialogProvider2
-com.sun.star.awt.DialogProvider2
-com.sun.star.awt.DialogProvider
-com.sun.star.frame.XModel
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Handling_Documents#Loading_Documents
-DESCR:OfficeDev - Handling Documents - Loading Documents
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.Desktop
-TOPIC:
-com.sun.star.frame.XComponentLoader
-
-LINK:Documentation/DevGuide/Spreadsheets/Function_Handling#Calculating_Function_Results
-DESCR:Spreadsheets - Function Handling - Calculating Function Results
-REF:
-com.sun.star.sheet.XFunctionAccess
-com.sun.star.sheet.FunctionAccess
-TOPIC:
-com.sun.star.sheet.FunctionAccess
-
-LINK:Documentation/DevGuide/GUI/File_Control
-DESCR:GUI - File Control
-REF:
-com.sun.star.awt.UnoControlEdit
-com.sun.star.awt.UnoControlFileControl
-com.sun.star.ui.dialogs.FilePicker
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Other_Common_Properties
-DESCR:GUI - Other Common Properties
-REF:
-com.sun.star.util.Color
-com.sun.star.awt.VisualEffect
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/The_RowSet_Service
-DESCR:Database - The RowSet Service
-REF:
-com.sun.star.sdb.RowSet
-com.sun.star.sdb.ResultSet
-TOPIC:
-com.sun.star.sdb.RowSet
-
-LINK:Documentation/DevGuide/Spreadsheets/Indentation
-DESCR:Spreadsheets - Indentation
-REF:
-com.sun.star.util.XIndent
-TOPIC:
-com.sun.star.util.XIndent
-
-LINK:Documentation/DevGuide/GUI/Displaying_Dialogs
-DESCR:GUI - Displaying Dialogs
-REF:
-com.sun.star.awt.XDialog
-com.sun.star.awt.XWindow
-com.sun.star.awt.XWindowPeer
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Result_Sets
-DESCR:Database - Result Sets
-REF:
-com.sun.star.sdbcx.Container
-com.sun.star.sdbc.XRow
-com.sun.star.sdbcx.Column
-com.sun.star.sdbcx.ResultSet
-com.sun.star.sdbc.ResultSet
-com.sun.star.sdb.ColumnSettings
-com.sun.star.sdbcx.XColumnsSupplier
-com.sun.star.sdbcx.XRowLocate
-com.sun.star.sdb.ResultSet
-com.sun.star.sdb.ResultColumn
-com.sun.star.sdbcx.XDeleteRows
-TOPIC:
-com.sun.star.sdbcx.ResultSet
-com.sun.star.sdbc.ResultSet
-com.sun.star.sdb.ResultSet
-
-LINK:Documentation/DevGuide/Basic/Command_Button
-DESCR:Basic - Command Button
-REF:
-com.sun.star.awt.XButton
-com.sun.star.awt.UnoControlButton
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Slide_Transition
-DESCR:Drawings - Slide Transition
-REF:
-com.sun.star.presentation.DrawPage
-com.sun.star.presentation.AnimationSpeed
-com.sun.star.presentation.FadeEffect
-TOPIC:
-com.sun.star.presentation.DrawPage
-com.sun.star.presentation.FadeEffect
-
-LINK:Documentation/DevGuide/ProUNO/Services#Referencing_Interfaces
-DESCR:ProUNO - Services - Referencing Interfaces
-REF:
-com.sun.star.text.TextDocument
-TOPIC:
-
-LINK:Documentation/DevGuide/Glossary/Glossary
-DESCR:Glossary - Glossary
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.sdbc.XDriverManager
-com.sun.star.lang.XComponent
-com.sun.star.lang.XInitialization
-com.sun.star.lang.EventObject
-com.sun.star.uno.XInterface
-com.sun.star.container.XEnumerationAccess
-com.sun.star.bridge.UnoUrlResolver
-com.sun.star.text.HoriOrientation
-com.sun.star.container.XEnumeration
-com.sun.star.awt
-com.sun.star.lang.ServiceManager
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Setting_the_Chart_Type
-DESCR:Charts - Setting the Chart Type
-REF:
-com.sun.star.chart.XChartDocument
-com.sun.star.chart.XYDiagram
-TOPIC:
-com.sun.star.chart.XYDiagram
-com.sun.star.chart.Diagram
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleImage
-DESCR:Accessibility - XAccessibleImage
-REF:
-com.sun.star.accessibility.XAccessibleImage
-com.sun.star.accessibility.XAccessibleContext
-TOPIC:
-com.sun.star.accessibility.XAccessibleImage
-
-LINK:Documentation/DevGuide/GUI/Time_Field
-DESCR:GUI - Time Field
-REF:
-com.sun.star.awt.UnoControlTimeFieldModel
-com.sun.star.awt.UnoControlTimeField
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/View_Service
-DESCR:Database - View Service
-REF:
-com.sun.star.sdbcx.CheckOption
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Working_With_Charts#Document_Structure
-DESCR:Charts - Working With Charts - Document Structure
-REF:
-com.sun.star.chart.XChartDocument
-com.sun.star.lang.XComponent
-com.sun.star.chart
-com.sun.star.beans.XPropertySet
-com.sun.star.chart.ChartDataArray
-com.sun.star.chart.ChartData
-com.sun.star.chart.ChartArea
-com.sun.star.chart.ChartDocument
-com.sun.star.drawing.XShape
-TOPIC:
-com.sun.star.table.XTableChartsSupplier
-com.sun.star.chart.ChartDataArray
-com.sun.star.chart.ChartData
-com.sun.star.drawing.OLE2Shape
-com.sun.star.chart.ChartDocument
-
-LINK:Documentation/DevGuide/ProUNO/C++/Mapping_of_Services
-DESCR:ProUNO - C++ - Mapping of Services
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.uno.DeploymentException
-com.sun.star.lang.XMultiComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Showing_a_Dialog
-DESCR:Basic - Showing a Dialog
-REF:
-com.sun.star.awt.XDialog
-com.sun.star.io.XInputStreamProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/File_Control
-DESCR:Basic - File Control
-REF:
-com.sun.star.awt.UnoControlFileControl
-com.sun.star.ui.dialogs.FilePicker
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Accessing_Libraries_from_Basic#Library_Container_API
-DESCR:Basic - Accessing Libraries from Basic - Library Container API
-REF:
-com.sun.star.script.XLibraryContainer2
-com.sun.star.container.XNameContainer
-com.sun.star.script.XLibraryContainer
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Object_Identity
-DESCR:ProUNO - Object Identity
-REF:
-com.sun.star.lang.XComponent
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleKeyBinding
-DESCR:Accessibility - XAccessibleKeyBinding
-REF:
-com.sun.star.accessibility.XAccessibleKeyBinding
-com.sun.star.awt.KeyStroke
-TOPIC:
-com.sun.star.accessibility.XAccessibleKeyBinding
-
-LINK:Documentation/DevGuide/FirstSteps/Element_Access#Name_Access
-DESCR:FirstSteps - Element Access - Name Access
-REF:
-com.sun.star.sheet.XSpreadsheets
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Character_and_Paragraph_Format
-DESCR:Spreadsheets - Character and Paragraph Format
-REF:
-com.sun.star.table.XCell
-com.sun.star.style.ParagraphProperties
-com.sun.star.style.CharacterPropertiesComplex
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.style.CharacterProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Frames#Communication_through_Dispatch_Framework
-DESCR:OfficeDev - Frames - Communication through Dispatch Framework
-REF:
-com.sun.star.frame.XDispatchProvider
-com.sun.star.frame.XFrame
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet#Properties_of_Spreadsheet
-DESCR:Spreadsheets - Spreadsheet - Properties of Spreadsheet
-REF:
-com.sun.star.sheet.Spreadsheet
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Configuration
-DESCR:WritingUNO - Configuration
-REF:
-com.sun.star.frame.ProtocolHandler
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Using_DBMS_Features#Transaction_Handling
-DESCR:Database - Using DBMS Features - Transaction Handling
-REF:
-com.sun.star.sdbc.TransactionIsolation
-com.sun.star.sdbc.XConnection
-TOPIC:
-com.sun.star.sdbc.TransactionIsolation
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Automation_Objects_with_UNO_Interfaces
-DESCR:ProUNO - Bridge - Automation Objects with UNO Interfaces
-REF:
-TOPIC:
-com.sun.star.lang.XEventListener
-
-LINK:Documentation/DevGuide/ProUNO/Exception_Handling
-DESCR:ProUNO - Exception Handling
-REF:
-com.sun.star.uno.Exception
-TOPIC:
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-
-LINK:Documentation/DevGuide/ProUNO/Java/Mapping_of_Enum_Types
-DESCR:ProUNO - Java - Mapping of Enum Types
-REF:
-com.sun.star.uno.TypeClass
-TOPIC:
-
-LINK:Documentation/DevGuide/AppendixC/The_Hierarchy_Content_Provider#Commands_and_Properties
-DESCR:AppendixC - The Hierarchy Content Provider - Commands and Properties
-REF:
-com.sun.star.ucb.XContent
-com.sun.star.lang.XServiceInfo
-com.sun.star.ucb.XContentCreator
-com.sun.star.lang.XComponent
-com.sun.star.container.XChild
-com.sun.star.ucb.XCommandInfoChangeNotifier
-com.sun.star.beans.XPropertySetInfoChangeNotifier
-com.sun.star.beans.XPropertiesChangeNotifier
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Tables#Table_Architecture
-DESCR:Text - Tables - Table Architecture
-REF:
-com.sun.star.chart.XChartDataArray
-com.sun.star.text.XTextTable
-com.sun.star.text.TextContent
-com.sun.star.container.XNamed
-com.sun.star.table.XCellRange
-com.sun.star.text.TextTable
-com.sun.star.text.XTextContent
-com.sun.star.util.XSortable
-com.sun.star.table.XAutoFormattable
-TOPIC:
-com.sun.star.text.TextTable
-
-LINK:Documentation/DevGuide/Drawings/Exporting
-DESCR:Drawings - Exporting
-REF:
-com.sun.star.document.XFilter
-com.sun.star.document.XMimeTypeInfo
-com.sun.star.drawing.GraphicExportFilter
-com.sun.star.document.XExporter
-TOPIC:
-com.sun.star.drawing.GraphicExportFilter
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Getting_Frames%2C_Controllers_and_Models_from_Each_Other
-DESCR:OfficeDev - Component - Getting Frames, Controllers and Models from Each Other
-REF:
-com.sun.star.frame.XController
-com.sun.star.lang.XComponent
-com.sun.star.awt.XWindow
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.XController
-com.sun.star.frame.XFrame
-com.sun.star.frame.XModel
-
-LINK:Documentation/DevGuide/Database/Adding_and_Editing_Predefined_Queries
-DESCR:Database - Adding and Editing Predefined Queries
-REF:
-com.sun.star.sdb.DefinitionContainer
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.sdb.XQueryDefinitionsSupplier
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XNameContainer
-com.sun.star.sdb.QueryDefinition
-com.sun.star.util.XRefreshable
-TOPIC:
-com.sun.star.sdb.DefinitionContainer
-
-LINK:Documentation/DevGuide/Database/Clones_of_the_RowSet_Service
-DESCR:Database - Clones of the RowSet Service
-REF:
-com.sun.star.sdb.XResultSetAccess
-com.sun.star.sdb.ResultSet
-TOPIC:
-com.sun.star.sdb.XResultSetAccess
-com.sun.star.sdb.ResultSet
-
-LINK:Documentation/DevGuide/OfficeDev/Using_the_Desktop
-DESCR:OfficeDev - Using the Desktop
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.frame.XComponentLoader
-com.sun.star.util.XModifiable
-com.sun.star.document.EventObject
-com.sun.star.frame.XFrames
-com.sun.star.document.XEventBroadcaster
-com.sun.star.container.XEnumerationAccess
-com.sun.star.frame.XFramesSupplier
-com.sun.star.frame.XTerminateListener
-com.sun.star.document.Events
-com.sun.star.frame.XModel
-com.sun.star.frame.XDispatchProviderInterception
-com.sun.star.lang.XComponent
-com.sun.star.frame.XDispatchProvider
-com.sun.star.container.XIndexAccess
-com.sun.star.frame.XDesktop
-com.sun.star.frame.Desktop
-com.sun.star.frame.Frame
-com.sun.star.frame.XFrame
-TOPIC:
-com.sun.star.frame.XComponentLoader
-com.sun.star.frame.XFrames
-com.sun.star.document.XEventBroadcaster
-com.sun.star.frame.XDesktop
-com.sun.star.frame.Desktop
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Process#Listening_for_Context_Changes
-DESCR:OfficeDev - Dispatch Process - Listening for Context Changes
-REF:
-com.sun.star.frame.FrameActionEvent
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/The_Service_Manager_Component#From_UNO_Objects_to_Automation_Objects
-DESCR:ProUNO - Bridge - The Service Manager Component - From UNO Objects to Automation Objects
-REF:
-com.sun.star.bridge.oleautomation.BridgeSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Filter_Options
-DESCR:Drawings - Filter Options
-REF:
-com.sun.star.document.MediaDescriptor
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Inserting_Text_Files
-DESCR:Text - Inserting Text Files
-REF:
-com.sun.star.document.MediaDescriptor
-com.sun.star.document.XDocumentInsertable
-TOPIC:
-com.sun.star.document.XDocumentInsertable
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XCollator
-DESCR:OfficeDev - Implementing a New Locale - XCollator
-REF:
-com.sun.star.i18n.XCollator
-TOPIC:
-com.sun.star.i18n.XCollator
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Using_Automation_Objects_from_UNO
-DESCR:ProUNO - Bridge - Using Automation Objects from UNO
-REF:
-com.sun.star.script.XInvocation
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/acquire()_and_release()
-DESCR:ProUNO - acquire() and release()
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Settings#Creating_Default_Settings
-DESCR:Text - Settings - Creating Default Settings
-REF:
-com.sun.star.text.Defaults
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-com.sun.star.text.Defaults
-
-LINK:Documentation/DevGuide/Database/Using_DDL_to_Change_the_Database_Design
-DESCR:Database - Using DDL to Change the Database Design
-REF:
-com.sun.star.sdbc.XStatement
-com.sun.star.sdbc.DataType
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/CLI/Writing_Client_Programs
-DESCR:ProUNO - CLI - Writing Client Programs
-REF:
-com.sun.star.bridge.UnoUrlResolver
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Storing_Documents#Printing_Documents
-DESCR:OfficeDev - Storing Documents - Printing Documents
-REF:
-com.sun.star.view.XPrintable
-TOPIC:
-com.sun.star.view.XPrintable
-
-LINK:Documentation/DevGuide/Drawings/Ordering
-DESCR:Drawings - Ordering
-REF:
-com.sun.star.drawing.Shape
-TOPIC:
-
-LINK:Documentation/DevGuide/AppendixC/The_File_Content_Provider#Creation_of_New_File_Contents
-DESCR:AppendixC - The File Content Provider - Creation of New File Contents
-REF:
-com.sun.star.ucb.XContentCreator
-com.sun.star.io.XInputStream
-TOPIC:
-com.sun.star.ucb.XContentCreator
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Mapping_of_Hyper_and_Decimal
-DESCR:ProUNO - Bridge - Mapping of Hyper and Decimal
-REF:
-com.sun.star.bridge.oleautomation.Decimal
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/DDE_Links
-DESCR:Spreadsheets - DDE Links
-REF:
-com.sun.star.sheet.XDDELink
-com.sun.star.sheet.DDELink
-com.sun.star.container.XNameAccess
-com.sun.star.util.XRefreshable
-TOPIC:
-com.sun.star.sheet.DDELink
-
-LINK:Documentation/DevGuide/Basic/Dialog_Properties
-DESCR:Basic - Dialog Properties
-REF:
-com.sun.star.awt.XDialog
-com.sun.star.beans.XPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Detective
-DESCR:Spreadsheets - Detective
-REF:
-com.sun.star.sheet.XSheetAuditing
-TOPIC:
-com.sun.star.sheet.XSheetAuditing
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Initialization
-DESCR:WritingUNO - Jobs - Initialization
-REF:
-com.sun.star.beans.NamedValue
-com.sun.star.frame.XFrame
-com.sun.star.frame.XModel
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Closing_Documents#XCloseable
-DESCR:OfficeDev - Closing Documents - XCloseable
-REF:
-com.sun.star.frame.XStorable
-com.sun.star.util.XCloseListener
-com.sun.star.util.XModifiable
-com.sun.star.frame.XController
-com.sun.star.util.XCloseBroadcaster
-com.sun.star.util.CloseVetoException
-com.sun.star.util.XCloseable
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XBreakIterator
-DESCR:OfficeDev - Overview and Using the API - XBreakIterator
-REF:
-com.sun.star.i18n.XLocaleData
-com.sun.star.linguistic2.XHyphenator
-com.sun.star.i18n.XBreakIterator
-TOPIC:
-com.sun.star.i18n.XBreakIterator
-
-LINK:Documentation/DevGuide/Basic/Technical_Background
-DESCR:Basic - Technical Background
-REF:
-com.sun.star.resource
-com.sun.star.resource.StringResource
-com.sun.star.resource.XStringResourceSupplier
-com.sun.star.resource.XStringResourceResolver
-com.sun.star.resource.XStringResourceManager
-com.sun.star.resource.StringResourceWithStorage
-com.sun.star.resource.StringResourceWithLocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Scripting/Writing_a_LanguageScriptProvider_UNO_Component_From_Scratch
-DESCR:Scripting - Writing a LanguageScriptProvider UNO Component From Scratch
-REF:
-com.sun.star.script.provider.LanguageScriptProvider
-com.sun.star.script.browse.BrowseNode
-com.sun.star.script.provider.XScript
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/C++/Transparent_Use_of_Office_UNO_Components
-DESCR:ProUNO - C++ - Transparent Use of Office UNO Components
-REF:
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XMultiComponentFactory
-
-LINK:Documentation/DevGuide/Text/Table_Naming%2C_Sorting%2C_Charting_and_Autoformatting
-DESCR:Text - Table Naming, Sorting, Charting and Autoformatting
-REF:
-com.sun.star.chart.XChartDataArray
-com.sun.star.chart.XChartData
-com.sun.star.container.XNamed
-com.sun.star.text.TextSortDescriptor
-com.sun.star.beans.PropertyValue
-com.sun.star.sheet.TableAutoFormats
-com.sun.star.table.XAutoFormattable
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Printing_Spreadsheet_Documents#Print_Areas
-DESCR:Spreadsheets - Printing Spreadsheet Documents - Print Areas
-REF:
-com.sun.star.sheet.XPrintAreas
-com.sun.star.table.CellRangeAddress
-TOPIC:
-com.sun.star.sheet.XPrintAreas
-
-LINK:Documentation/DevGuide/Spreadsheets/Equally_Formatted_Cell_Ranges#Unique_Cell_Format_Ranges
-DESCR:Spreadsheets - Equally Formatted Cell Ranges - Unique Cell Format Ranges
-REF:
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.sheet.UniqueCellFormatRanges
-com.sun.star.sheet.CellFormatRanges
-TOPIC:
-com.sun.star.sheet.UniqueCellFormatRanges
-
-LINK:Documentation/DevGuide/GUI/Numeric_Field
-DESCR:GUI - Numeric Field
-REF:
-com.sun.star.awt.UnoControlNumericField
-com.sun.star.awt.UnoControlNumericFieldModel
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Text_Document_Controller
-DESCR:Text - Text Document Controller
-REF:
-com.sun.star.frame.XController
-com.sun.star.ui.XContextMenuInterceptor
-com.sun.star.frame.XDispatchProvider
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.Controller
-com.sun.star.document.XViewDataSupplier
-com.sun.star.frame.XModel
-
-LINK:Documentation/DevGuide/Database/Example:_Querying_the_Bibliography_Database
-DESCR:Database - Example: Querying the Bibliography Database
-REF:
-com.sun.star.sdb.RowSet
-TOPIC:
-com.sun.star.sdb.RowSet
-
-LINK:Documentation/DevGuide/ProUNO/Children_of_the_XEventListener_Interface
-DESCR:ProUNO - Children of the XEventListener Interface
-REF:
-com.sun.star.lang.XEventListener
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XUnoTunnel
-DESCR:WritingUNO - XUnoTunnel
-REF:
-com.sun.star.lang.XUnoTunnel
-TOPIC:
-com.sun.star.lang.XUnoTunnel
-
-LINK:Documentation/DevGuide/OfficeDev/General_Notes
-DESCR:OfficeDev - General Notes
-REF:
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Navigating
-DESCR:Drawings - Navigating
-REF:
-com.sun.star.container.XNamed
-TOPIC:
-com.sun.star.container.XNamed
-
-LINK:Documentation/DevGuide/Forms/Scripting_and_Events
-DESCR:Forms - Scripting and Events
-REF:
-com.sun.star.awt.XItemListener
-com.sun.star.script.XEventAttacherManager
-com.sun.star.awt.XRadioButton
-com.sun.star.script.ScriptEventDescriptor
-com.sun.star.script.XScriptListener
-com.sun.star.form.FormComponents
-com.sun.star.awt.XCheckBox
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/Implementing_Accessible_Objects#Services
-DESCR:Accessibility - Implementing Accessible Objects - Services
-REF:
-com.sun.star.accessibility.XAccessibleEventBroadcaster
-com.sun.star.accessibility.Accessible
-com.sun.star.accessibility.AccessibleContext
-com.sun.star.accessibility.XAccessibleContext
-com.sun.star.accessibility.XAccessible
-TOPIC:
-com.sun.star.accessibility.AccessibleContext
-com.sun.star.accessibility.XAccessible
-
-LINK:Documentation/DevGuide/Text/TextViewCursor
-DESCR:Text - TextViewCursor
-REF:
-com.sun.star.view.XViewCursor
-com.sun.star.text.TextViewCursor
-com.sun.star.beans.XPropertySet
-com.sun.star.view.XLineCursor
-com.sun.star.text.XPageCursor
-com.sun.star.text.XTextViewCursorSupplier
-com.sun.star.view.XScreenCursor
-TOPIC:
-com.sun.star.text.TextViewCursor
-
-LINK:Documentation/DevGuide/GUI/Progress_Bar
-DESCR:GUI - Progress Bar
-REF:
-com.sun.star.awt.XReschedule
-com.sun.star.awt.XProgressBar
-com.sun.star.awt.UnoControlProgressBar
-com.sun.star.awt.UnoControlProgressBarModel
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Applying_Number_Formats#XNumberformatPreviewer
-DESCR:OfficeDev - Applying Number Formats - NumberFormatter Service - XNumberformatPreviewer
-REF:
-com.sun.star.util.XNumberFormatPreviewer
-com.sun.star.util.NumberFormats
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Service_Manager
-DESCR:ProUNO - Service Manager
-REF:
-com.sun.star.lang.ServiceManager
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Overall_Document_Features#Page_Styles
-DESCR:Spreadsheets - Overall Document Features - Styles - Page Styles
-REF:
-com.sun.star.style.PageStyle
-com.sun.star.sheet.HeaderFooterContent
-com.sun.star.text.XText
-com.sun.star.sheet.XHeaderFooterContent
-com.sun.star.sheet.TablePageStyle
-TOPIC:
-com.sun.star.sheet.TablePageStyle
-
-LINK:Documentation/DevGuide/Basic/Group_Box
-DESCR:Basic - Group Box
-REF:
-com.sun.star.awt.UnoControlGroupBox
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Parameters
-DESCR:Forms - Parameters
-REF:
-com.sun.star.sdbc.XParameters
-com.sun.star.sdb.RowSet
-com.sun.star.form.XDatabaseParameterListener
-com.sun.star.form.XDatabaseParameterBroadcaster
-com.sun.star.form.component.DataForm
-TOPIC:
-com.sun.star.form.XDatabaseParameterListener
-com.sun.star.form.XDatabaseParameterBroadcaster
-
-LINK:Documentation/DevGuide/WritingUNO/XInterface
-DESCR:WritingUNO - XInterface
-REF:
-com.sun.star.uno.TypeClass
-com.sun.star.uno.XInterface
-TOPIC:
-com.sun.star.uno.XInterface
-
-LINK:Documentation/DevGuide/FirstSteps/Objects%2C_Interfaces%2C_and_Services#Interfaces
-DESCR:FirstSteps - Objects, Interfaces, and Services - Interfaces
-REF:
-com.sun.star.resource.XResourceBundle
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Applying_Number_Formats#XNumberformatter
-DESCR:OfficeDev - Applying Number Formats - NumberFormatter Service - XNumberformatter
-REF:
-com.sun.star.util.XNumberFormatter
-TOPIC:
-
-LINK:Documentation/DevGuide/Config/Object_Model
-DESCR:Config - Object Model
-REF:
-com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.configuration.ConfigurationAccess
-TOPIC:
-com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.configuration.ConfigurationAccess
-
-LINK:Documentation/DevGuide/Text/Formatting
-DESCR:Text - Formatting
-REF:
-com.sun.star.style.LineSpacing
-com.sun.star.style.CaseMap
-com.sun.star.table.CellRange
-com.sun.star.style.ParagraphProperties
-com.sun.star.beans.XPropertySet
-com.sun.star.style.TabStop
-com.sun.star.text.Shape
-com.sun.star.awt.FontSlant
-com.sun.star.style.CharacterProperties
-com.sun.star.beans.XVetoableChangeListener
-com.sun.star.lang.Locale
-com.sun.star.table.ShadowFormat
-com.sun.star.text.TextCursor
-com.sun.star.awt.FontFamily
-com.sun.star.beans.PropertyValue
-com.sun.star.style.CharacterPropertiesComplex
-com.sun.star.text.FontEmphasis
-com.sun.star.style.ParagraphPropertiesAsian
-com.sun.star.beans.XPropertyChangeListener
-com.sun.star.awt.FontWeight
-com.sun.star.util.Color
-com.sun.star.text.TextTableCursor
-com.sun.star.awt.FontType
-com.sun.star.awt.FontPitch
-com.sun.star.awt.FontStrikeout
-com.sun.star.container.XIndexReplace
-com.sun.star.style.BreakType
-com.sun.star.text.TextDocument
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.awt.FontUnderline
-com.sun.star.style.GraphicLocation
-com.sun.star.text.XLineNumberingProperties
-com.sun.star.text.Paragraph
-com.sun.star.container.XNameContainer
-com.sun.star.text.TextPortion
-com.sun.star.awt.CharSet
-com.sun.star.style.DropCapFormat
-TOPIC:
-com.sun.star.text.TextTableCursor
-com.sun.star.text.TextCursor
-com.sun.star.style.ParagraphProperties
-com.sun.star.text.Paragraph
-com.sun.star.text.TextPortion
-com.sun.star.text.Shape
-com.sun.star.style.CharacterPropertiesComplex
-com.sun.star.style.BreakType
-com.sun.star.text.TextDocument
-com.sun.star.style.CharacterPropertiesAsian
-com.sun.star.style.CharacterProperties
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Handling_UNO_Objects#Accessing_UNO_Services
-DESCR:ProUNO - Basic - Handling UNO Objects - Accessing UNO Services
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.container.XNameContainer
-com.sun.star.container.XNameAccess
-com.sun.star.container.XNameReplace
-com.sun.star.beans.Introspection
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Initializing_Bound_Controls
-DESCR:Forms - Initializing Bound Controls
-REF:
-com.sun.star.form.XReset
-com.sun.star.form.component.DateField
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Element_Access
-DESCR:FirstSteps - Element Access
-REF:
-com.sun.star.container.XNameContainer
-com.sun.star.sheet.Spreadsheets
-com.sun.star.sheet.XSpreadsheetDocument
-com.sun.star.sheet.XSpreadsheets
-com.sun.star.container.XEnumeration
-com.sun.star.container.XIndexContainer
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Saving_Text_Documents#Storing
-DESCR:Text - Saving Text Documents - Storing
-REF:
-com.sun.star.frame.XStorable
-TOPIC:
-com.sun.star.frame.XStorable
-
-LINK:Documentation/DevGuide/Drawings/Working_with_Drawing_Documents#Document_Structure
-DESCR:Drawings - Working with Drawing Documents - Document Structure
-REF:
-com.sun.star.drawing.DrawPage
-com.sun.star.drawing.Layer
-com.sun.star.drawing.LayerManager
-com.sun.star.drawing.MasterPage
-TOPIC:
-com.sun.star.drawing.DrawPage
-
-LINK:Documentation/DevGuide/Drawings/Settings
-DESCR:Drawings - Settings
-REF:
-com.sun.star.beans.PropertySet
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.presentation.DocumentSettings
-com.sun.star.document.Settings
-com.sun.star.drawing.DocumentSettings
-TOPIC:
-com.sun.star.beans.PropertySet
-
-LINK:Documentation/DevGuide/OfficeDev/Handling_Documents#URL_Parameter
-DESCR:OfficeDev - Handling Documents - Loading Documents - URL Parameter
-REF:
-TOPIC:
-com.sun.star.util.URLTransformer
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Using_Automation_Objects_from_UNO#Accessing_Automation_Objects
-DESCR:ProUNO - Bridge - Using Automation Objects from UNO - Instantiation - Accessing Automation Objects
-REF:
-com.sun.star.script.XInvocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Extensions/Adding_a_Leaf_to_an_Existing_Node
-DESCR:Extensions - Adding a Leaf to an Existing Node
-REF:
-com.sun.star.container.XHierarchicalNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/TextView
-DESCR:Text - TextView
-REF:
-com.sun.star.text.ViewSettings
-com.sun.star.text.XRubySelection
-com.sun.star.view.XSelectionSupplier
-com.sun.star.view.XViewSettingsSupplier
-com.sun.star.text.XTextViewCursorSupplier
-com.sun.star.drawing.ShapeCollection
-com.sun.star.uno.XInterface
-com.sun.star.container.XIndexAccess
-com.sun.star.view.XControlAccess
-com.sun.star.view.DocumentZoomType
-TOPIC:
-com.sun.star.view.XSelectionSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XCharacterClassification
-DESCR:OfficeDev - Overview and Using the API - XCharacterClassification
-REF:
-com.sun.star.i18n.XLocaleData
-com.sun.star.i18n.XCharacterClassification
-TOPIC:
-com.sun.star.i18n.XCharacterClassification
-
-LINK:Documentation/DevGuide/Text/Ruby
-DESCR:Text - Ruby
-REF:
-com.sun.star.text.XRubySelection
-com.sun.star.style.CharacterProperties
-TOPIC:
-com.sun.star.text.XRubySelection
-com.sun.star.style.CharacterProperties
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Execution_Environment
-DESCR:WritingUNO - Jobs - Execution Environment
-REF:
-com.sun.star.util.XCloseListener
-com.sun.star.document.OfficeDocument
-com.sun.star.frame.Frame
-com.sun.star.frame.Desktop
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Exception_Handling#Runtime_Exceptions
-DESCR:ProUNO - Exception Handling - Runtime Exceptions
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.uno.Exception
-com.sun.star.uno.RuntimeException
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Windows
-DESCR:OfficeDev - Windows
-REF:
-com.sun.star.awt.XWindow
-com.sun.star.awt.XWindowPeer
-TOPIC:
-com.sun.star.awt.XWindow
-com.sun.star.awt.XWindowPeer
-com.sun.star.awt.XTopWindow
-
-LINK:Documentation/DevGuide/OfficeDev/Path_Variables
-DESCR:OfficeDev - Path Variables
-REF:
-com.sun.star.util.PathSubstitution
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Creating_a_Chart_OLE_Object_in_Draw_and_Impress
-DESCR:Charts - Creating a Chart OLE Object in Draw and Impress
-REF:
-com.sun.star.drawing.XDrawPagesSupplier
-com.sun.star.drawing.XDrawPageSupplier
-com.sun.star.container.XIndexAccess
-com.sun.star.sheet.Spreadsheet
-TOPIC:
-com.sun.star.drawing.XDrawPagesSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/XML_Filter_Detection
-DESCR:OfficeDev - XML Filter Detection
-REF:
-com.sun.star.document.ExtendedTypeDetection
-TOPIC:
-com.sun.star.document.ExtendedTypeDetection
-
-LINK:Documentation/DevGuide/JavaBean/OfficeWindow_Interface
-DESCR:JavaBean - OfficeWindow Interface
-REF:
-com.sun.star.awt.XWindowPeer
-TOPIC:
-com.sun.star.awt.XWindowPeer
-
-LINK:Documentation/DevGuide/ProUNO/Services#Service_Constructors
-DESCR:ProUNO - Services - Service Constructors
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.uno.DeploymentException
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XMain
-DESCR:WritingUNO - XMain
-REF:
-com.sun.star.lang.XMain
-TOPIC:
-com.sun.star.lang.XMain
-
-LINK:Documentation/DevGuide/Drawings/Shape_Types
-DESCR:Drawings - Shape Types
-REF:
-com.sun.star.drawing.LineShape
-com.sun.star.drawing.CircleKind
-com.sun.star.drawing.GroupShape
-com.sun.star.drawing.TextShape
-com.sun.star.drawing.XShapeGroup
-com.sun.star.drawing.PolyPolygonBezierShape
-com.sun.star.drawing.TextProperties
-com.sun.star.drawing.LineProperties
-com.sun.star.drawing.PluginShape
-com.sun.star.frame.XModel
-com.sun.star.drawing.ConnectorShape
-com.sun.star.drawing.Shape
-com.sun.star.drawing.PageShape
-com.sun.star.drawing.Text
-com.sun.star.drawing.XControlShape
-com.sun.star.drawing.ColorMode
-com.sun.star.drawing.ControlShape
-com.sun.star.drawing.MeasureProperties
-com.sun.star.beans.PropertyValue
-com.sun.star.drawing.RectangleShape
-com.sun.star.drawing.MeasureShape
-com.sun.star.drawing.GraphicObjectShape
-com.sun.star.drawing.FillProperties
-com.sun.star.drawing.XShape
-com.sun.star.drawing.XShapes
-com.sun.star.drawing.EllipseShape
-com.sun.star.awt.XBitmap
-com.sun.star.drawing.PolyPolygonBezierDescriptor
-com.sun.star.drawing.ConnectorProperties
-com.sun.star.drawing.PolyPolygonShape
-com.sun.star.drawing.OpenBezierShape
-com.sun.star.drawing.RotationDescriptor
-com.sun.star.drawing
-com.sun.star.container.XIndexContainer
-com.sun.star.awt.Point
-com.sun.star.drawing.ShadowProperties
-com.sun.star.drawing.PolyPolygonDescriptor
-com.sun.star.drawing.ClosedBezierShape
-com.sun.star.text.XText
-com.sun.star.drawing.PolyLineShape
-com.sun.star.drawing.OLE2Shape
-TOPIC:
-com.sun.star.drawing.Shape
-
-LINK:Documentation/DevGuide/UCB/Universal_Content_Broker#Capabilities
-DESCR:UCB - Universal Content Broker - Capabilities
-REF:
-com.sun.star.frame.Desktop
-TOPIC:
-com.sun.star.frame.Desktop
-com.sun.star.ucb.UniversalContentBroker
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Implementing_without_Helpers#XTypeProvider_Implementation
-DESCR:WritingUNO - C++ - Implementing without Helpers - XTypeProvider Implementation
-REF:
-com.sun.star.uno.XInterface
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Interception
-DESCR:OfficeDev - Dispatch Interception
-REF:
-com.sun.star.frame.FeatureStateEvent
-com.sun.star.frame.XDispatchProviderInterception
-com.sun.star.frame.XDispatchProviderInterceptor
-com.sun.star.frame.XDispatchProvider
-com.sun.star.frame.XDispatch
-TOPIC:
-com.sun.star.frame.XDispatchProviderInterceptor
-
-LINK:Documentation/DevGuide/GUI/Creating_Menus#Accessibility
-DESCR:GUI - Creating Menus - Accessibility
-REF:
-com.sun.star.awt.XVclWindowPeer
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Subtotals
-DESCR:Spreadsheets - Subtotals
-REF:
-com.sun.star.sheet.SubTotalColumn
-com.sun.star.sheet.SubTotalDescriptor
-com.sun.star.container.XIndexAccess
-com.sun.star.sheet.XSubTotalCalculatable
-com.sun.star.sheet.XSubTotalDescriptor
-com.sun.star.sheet.XSubTotalField
-TOPIC:
-com.sun.star.sheet.SubTotalColumn
-com.sun.star.sheet.SubTotalDescriptor
-com.sun.star.sheet.SubTotalField
-com.sun.star.sheet.XSubTotalCalculatable
-
-LINK:Documentation/DevGuide/FirstSteps/How_do_I_know_Which_Type_I_Have?
-DESCR:FirstSteps - How do I know Which Type I Have?
-REF:
-com.sun.star.lang.XComponent
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Modifiable_Result_Sets
-DESCR:Database - Modifiable Result Sets
-REF:
-com.sun.star.sdbc.XRowUpdate
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Members
-DESCR:Spreadsheets - Members
-REF:
-com.sun.star.beans.XPropertySet
-com.sun.star.sheet.DataPilotSourceMember
-TOPIC:
-com.sun.star.sheet.DataPilotSourceMember
-
-LINK:Documentation/DevGuide/OfficeDev/Linguistics#Services_Overview
-DESCR:OfficeDev - Linguistics - Services Overview
-REF:
-com.sun.star.linguistic2.XSupportedLocales
-com.sun.star.linguistic2.Hyphenator
-com.sun.star.linguistic2.SpellChecker
-com.sun.star.linguistic2.LinguServiceManager
-com.sun.star.linguistic2.DictionaryList
-com.sun.star.linguistic2.LinguProperties
-com.sun.star.linguistic2.XLinguServiceManager
-com.sun.star.linguistic2.Thesaurus
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XCollator
-DESCR:OfficeDev - Overview and Using the API - XCollator
-REF:
-com.sun.star.i18n.XLocaleData
-com.sun.star.i18n.XTransliteration
-com.sun.star.i18n.XCollator
-TOPIC:
-com.sun.star.i18n.XCollator
-
-LINK:Documentation/DevGuide/Database/Tables_and_Columns
-DESCR:Database - Tables and Columns
-REF:
-com.sun.star.sdb.Connection
-com.sun.star.sdbcx.Column
-com.sun.star.sdbcx.Privilege
-com.sun.star.beans.XPropertySet
-com.sun.star.util.XNumberFormatter
-com.sun.star.sdb.XCommandPreparation
-com.sun.star.sdb.ColumnSettings
-com.sun.star.sdbcx.XColumnsSupplier
-com.sun.star.sdbc.DataType
-com.sun.star.sdbcx.Container
-com.sun.star.sdbcx.XTablesSupplier
-com.sun.star.sdb.Column
-com.sun.star.sdbc.XColumnLocate
-com.sun.star.sdbc.XResultSetMetaData
-com.sun.star.sdb.RowSet
-com.sun.star.sdbcx.Table
-com.sun.star.sdbc.ColumnValue
-com.sun.star.awt.FontDescriptor
-com.sun.star.sdb.Table
-com.sun.star.sdb.DataSettings
-TOPIC:
-com.sun.star.sdb.Column
-com.sun.star.sdb.Table
-
-LINK:Documentation/DevGuide/ProUNO/CLI/Type_Mappings#XInterface
-DESCR:ProUNO - CLI - Type Mappings - XInterface
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/The_Toolkit_Service#Dockable_Windows
-DESCR:GUI - The Toolkit Service - Dockable Windows
-REF:
-com.sun.star.awt.XDockableWindow
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Example:_Editing_Spreadsheet_Cells
-DESCR:Spreadsheets - Example: Editing Spreadsheet Cells
-REF:
-com.sun.star.table.XCellRange
-com.sun.star.sheet.XSpreadsheet
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Handling_Spreadsheet_Documents_Files#Creating_and_Loading_Spreadsheet_Documents
-DESCR:Spreadsheets - Handling Spreadsheet Documents Files - Creating and Loading Spreadsheet Documents
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.lang.XComponent
-com.sun.star.document.MediaDescriptor
-com.sun.star.frame.Desktop
-TOPIC:
-com.sun.star.frame.XComponentLoader
-
-LINK:Documentation/DevGuide/GUI/File_Picker
-DESCR:GUI - File Picker
-REF:
-com.sun.star.ui.dialogs.FilePicker
-com.sun.star.ui.dialogs.FolderPicker
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Connections#Data_Definition
-DESCR:Database - Connections - Understanding Connections - Data Definition
-REF:
-com.sun.star.sdbcx.DatabaseDefinition
-TOPIC:
-com.sun.star.sdbcx.DatabaseDefinition
-
-LINK:Documentation/DevGuide/GUI/Graphical_User_Interfaces#Implementation_Details
-DESCR:GUI - Graphical User Interfaces - Implementation Details
-REF:
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/CLI/Lifetime_Management_and_Obtaining_Interfaces
-DESCR:ProUNO - CLI - Lifetime Management and Obtaining Interfaces
-REF:
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Core_Interfaces_to_Implement
-DESCR:WritingUNO - Core Interfaces to Implement
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.uno.XAggregation
-com.sun.star.lang.XComponent
-com.sun.star.lang.XInitialization
-com.sun.star.uno.XInterface
-com.sun.star.lang.XUnoTunnel
-com.sun.star.lang.XMain
-com.sun.star.uno.XWeak
-com.sun.star.lang.XTypeProvider
-TOPIC:
-com.sun.star.lang.XServiceInfo
-com.sun.star.uno.XAggregation
-com.sun.star.lang.XComponent
-com.sun.star.lang.XInitialization
-com.sun.star.uno.XInterface
-com.sun.star.lang.XUnoTunnel
-com.sun.star.lang.XMain
-com.sun.star.uno.XWeak
-com.sun.star.lang.XTypeProvider
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet_Document_Controller#Spreadsheet_View
-DESCR:Spreadsheets - Spreadsheet Document Controller - Spreadsheet View
-REF:
-com.sun.star.frame.Controller
-com.sun.star.sheet.SheetCell
-com.sun.star.frame.XController
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.sheet.XSpreadsheetView
-com.sun.star.ui.XContextMenuInterception
-com.sun.star.sheet.XViewSplitable
-com.sun.star.drawing.Shapes
-com.sun.star.sheet.XRangeSelection
-com.sun.star.sheet.SpreadsheetViewPane
-com.sun.star.sheet.SpreadsheetView
-com.sun.star.drawing.Shape
-com.sun.star.view.XSelectionSupplier
-com.sun.star.sheet.SheetCellRange
-com.sun.star.sheet.XViewFreezable
-com.sun.star.frame.XDispatchProvider
-com.sun.star.container.XIndexAccess
-TOPIC:
-com.sun.star.sheet.SpreadsheetView
-
-LINK:Documentation/DevGuide/WritingUNO/Defining_a_Struct
-DESCR:WritingUNO - Defining a Struct
-REF:
-com.sun.star.lang.EventObject
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Applying_Number_Formats#NumberFormatter_Service
-DESCR:OfficeDev - Applying Number Formats - NumberFormatter Service
-REF:
-com.sun.star.util.XNumberFormatter
-com.sun.star.util.XNumberFormatPreviewer
-com.sun.star.util.NumberFormatter
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Validation_and_Bindings
-DESCR:Forms - Validation and Bindings
-REF:
-com.sun.star.form.binding.XBindableValue
-com.sun.star.form.binding.XValueBinding
-com.sun.star.form.validation.ValidatableControlModel
-com.sun.star.form.binding.BindableControlModel
-com.sun.star.form.validation.ValidatableBindableControlModel
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Time_Field
-DESCR:Basic - Time Field
-REF:
-com.sun.star.awt.UnoControlDateField
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Example:_Fields_in_a_Template
-DESCR:Text - Example: Fields in a Template
-REF:
-com.sun.star.text.textfield.User
-com.sun.star.text.XTextFieldsSupplier
-com.sun.star.text.XTextRange
-com.sun.star.text.XBookmarksSupplier
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Standalone_Use_Case
-DESCR:WritingUNO - Standalone Use Case
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XInitialization
-com.sun.star.bridge.XBridge
-com.sun.star.lang.XMain
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Filter_Options
-DESCR:OfficeDev - Filter Options
-REF:
-com.sun.star.beans.XPropertyAccess
-com.sun.star.ui.dialogs.FilterOptionsDialog
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Using_Hyphenator#Relevant_properties
-DESCR:OfficeDev - Using Hyphenator - Relevant properties
-REF:
-com.sun.star.linguistic2.XHyphenatedWord
-com.sun.star.linguistic2.XPossibleHyphens
-com.sun.star.linguistic2.LinguProperties
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XIndexEntrySupplier
-DESCR:OfficeDev - Implementing a New Locale - XIndexEntrySupplier
-REF:
-com.sun.star.i18n.XIndexEntrySupplier
-TOPIC:
-com.sun.star.i18n.XIndexEntrySupplier
-
-LINK:Documentation/DevGuide/Extensions/Saving_and_Reading_Data_for_the_Options_Page
-DESCR:Extensions - Saving and Reading Data for the Options Page
-REF:
-com.sun.star.awt.XWindow
-com.sun.star.awt.XContainerWindowEventHandler
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Scrollable_Result_Sets
-DESCR:Database - Scrollable Result Sets
-REF:
-com.sun.star.sdbc.ResultSetType
-com.sun.star.sdbc.ResultSetConcurrency
-com.sun.star.sdbc.XResultSet
-TOPIC:
-com.sun.star.sdbc.XResultSet
-
-LINK:Documentation/DevGuide/Spreadsheets/Capabilities_of_Spreadsheet
-DESCR:Spreadsheets - Capabilities of Spreadsheet
-REF:
-com.sun.star.table.XTableChartsSupplier
-com.sun.star.sheet.XSheetPageBreak
-com.sun.star.drawing.XDrawPageSupplier
-com.sun.star.sheet.Spreadsheet
-com.sun.star.sheet.XCellRangeMovement
-com.sun.star.sheet.XSheetAuditing
-com.sun.star.util.XProtectable
-com.sun.star.container.XNamed
-com.sun.star.sheet.SheetCellRange
-com.sun.star.sheet.XSheetAnnotationsSupplier
-com.sun.star.sheet.XPrintAreas
-com.sun.star.sheet.XSheetOutline
-com.sun.star.sheet.XScenariosSupplier
-com.sun.star.sheet.XDataPilotTablesSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Server_Use_Case
-DESCR:WritingUNO - Server Use Case
-REF:
-com.sun.star.io.Pipe
-com.sun.star.io.XInputStream
-com.sun.star.io.XOutputStream
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Required_Files
-DESCR:WritingUNO - Required Files
-REF:
-com.sun.star.lang.XMain
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API
-DESCR:AdvUNO - UNO Reflection API
-REF:
-TOPIC:
-com.sun.star.reflection.CoreReflection
-com.sun.star.script.Converter
-com.sun.star.script.InvocationAdapterFactory
-com.sun.star.beans.XIntrospection
-com.sun.star.reflection.XTypeDescription
-com.sun.star.script.Invocation
-com.sun.star.beans.Introspection
-com.sun.star.lang.XTypeProvider
-
-LINK:Documentation/DevGuide/ProUNO/C++/Mapping_of_Struct_Types
-DESCR:ProUNO - C++ - Mapping of Struct Types
-REF:
-com.sun.star.beans.Optional
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Text_Table_Properties
-DESCR:Text - Text Table Properties
-REF:
-com.sun.star.text.TableColumnSeparator
-com.sun.star.table.ShadowFormat
-com.sun.star.style.GraphicLocation
-com.sun.star.text.TextTable
-com.sun.star.text.HoriOrientation
-com.sun.star.style.BreakType
-com.sun.star.table.TableBorder
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Building_and_Testing_C++_Components#Test_Registration_and_Use
-DESCR:WritingUNO - C++ - Building and Testing C++ Components - Test Registration and Use
-REF:
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/External_Value_Suppliers
-DESCR:Forms - External Value Suppliers
-REF:
-com.sun.star.form.binding
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/Documents#Reading_a_Document_Content
-DESCR:UCB - Documents - Reading a Document Content
-REF:
-com.sun.star.ucb.OpenCommandArgument2
-com.sun.star.io.XInputStream
-com.sun.star.io.XOutputStream
-com.sun.star.io.XActiveDataSink
-TOPIC:
-
-LINK:Documentation/DevGuide/Scripting/Writing_a_LanguageScriptProvider_UNO_Component_using_the_Java_Helper_Classes
-DESCR:Scripting - Writing a LanguageScriptProvider UNO Component using the Java Helper Classes
-REF:
-com.sun.star.script.provider.XScript
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Text_Frames
-DESCR:Text - Text Frames
-REF:
-com.sun.star.text.BaseFrame
-com.sun.star.text.Text
-com.sun.star.text.XTextFrame
-com.sun.star.text.XTextRangeMover
-com.sun.star.text.ChainedTextFrame
-com.sun.star.text.XTextContent
-com.sun.star.text.TextFrame
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/Pattern_Field
-DESCR:Basic - Pattern Field
-REF:
-com.sun.star.awt.UnoControlPatternField
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cells_Absolute_Address
-DESCR:Spreadsheets - Cells Absolute Address
-REF:
-com.sun.star.sheet.XCellAddressable
-com.sun.star.table.CellAddress
-TOPIC:
-com.sun.star.sheet.XCellAddressable
-
-LINK:Documentation/DevGuide/ProUNO/Service_Manager#XContentEnumerationAccess_Interface
-DESCR:ProUNO - Service Manager - XContentEnumerationAccess Interface
-REF:
-com.sun.star.container.XContentEnumerationAccess
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.container.XEnumeration
-TOPIC:
-com.sun.star.container.XContentEnumerationAccess
-
-LINK:Documentation/DevGuide/Database/Runtime_Settings_For_Predefined_Queries
-DESCR:Database - Runtime Settings For Predefined Queries
-REF:
-com.sun.star.sdbcx.Container
-com.sun.star.sdb.Query
-com.sun.star.sdb.Column
-com.sun.star.sdbcx.XDataDescriptorFactory
-com.sun.star.sdbcx.XColumnsSupplier
-com.sun.star.sdb.RowSet
-com.sun.star.sdbcx.XAppend
-com.sun.star.awt.FontDescriptor
-com.sun.star.sdb.QueryDefinition
-com.sun.star.sdb.XQueriesSupplier
-com.sun.star.sdbcx.XRename
-com.sun.star.sdb.DataSettings
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Applying_Number_Formats
-DESCR:OfficeDev - Applying Number Formats
-REF:
-com.sun.star.util.XNumberFormatter
-com.sun.star.util.NumberFormatter
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Access_to_Formulas%2C_Values_and_Errors
-DESCR:Spreadsheets - Access to Formulas, Values and Errors
-REF:
-com.sun.star.table.XCell
-com.sun.star.table.CellContentType
-com.sun.star.table.XCellRange
-TOPIC:
-
-LINK:Documentation/DevGuide/GUI/Formatted_Field
-DESCR:GUI - Formatted Field
-REF:
-com.sun.star.awt.XSpinListener
-com.sun.star.awt.UnoControlFormattedField
-com.sun.star.awt.UnoControlFormattedFieldModel
-com.sun.star.util.XNumberFormatsSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Line_Numbering_and_Outline_Numbering#Line_Numbering
-DESCR:Text - Line Numbering and Outline Numbering - Line Numbering
-REF:
-com.sun.star.text.XLineNumberingProperties
-com.sun.star.text.LineNumberingProperties
-TOPIC:
-com.sun.star.text.LineNumberingProperties
-
-LINK:Documentation/DevGuide/Scripting/Implementation
-DESCR:Scripting - Implementation
-REF:
-com.sun.star.script.provider.XScriptProvider
-com.sun.star.script.browse.BrowseNodeTypes
-com.sun.star.script.provider.LanguageScriptProvider
-com.sun.star.beans.XPropertySet
-com.sun.star.script.browse.BrowseNode
-com.sun.star.script.XInvocation
-com.sun.star.script.browse.XBrowseNode
-com.sun.star.script.provider.XScript
-com.sun.star.script.provider.XScriptContext
-TOPIC:
-
-LINK:Documentation/DevGuide/FirstSteps/Element_Access#Index_Access
-DESCR:FirstSteps - Element Access - Index Access
-REF:
-com.sun.star.container.XIndexAccess
-com.sun.star.sheet.Spreadsheet
-com.sun.star.sheet.XSpreadsheets
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Pie_Charts
-DESCR:Charts - Pie Charts
-REF:
-com.sun.star.chart.ChartPieSegmentProperties
-TOPIC:
-com.sun.star.chart.ChartPieSegmentProperties
-
-LINK:Documentation/DevGuide/GUI/Creating_Menus
-DESCR:GUI - Creating Menus
-REF:
-com.sun.star.awt.XMenu
-com.sun.star.awt.XMenuBar
-com.sun.star.awt.XTopWindow
-com.sun.star.awt.MenuItemStyle
-com.sun.star.awt.MenuEvent
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Form_Layer_Views#Focusing_Controls
-DESCR:Forms - Form Layer Views - Focusing Controls
-REF:
-com.sun.star.awt.XWindow
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet_Add-Ins
-DESCR:Spreadsheets - Spreadsheet Add-Ins
-REF:
-com.sun.star.sheet.AddIn
-TOPIC:
-com.sun.star.sheet.AddIn
-
-LINK:Documentation/DevGuide/GUI/Creating_Menus#Rendering
-DESCR:GUI - Creating Menus - Rendering
-REF:
-com.sun.star.awt.XDevice
-com.sun.star.awt.RasterOperation
-com.sun.star.awt.XRegion
-com.sun.star.awt.XFont
-com.sun.star.awt.XGraphics
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/FormComponent_Service
-DESCR:Forms - FormComponent Service
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.form.FormComponent
-com.sun.star.container.XChild
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XTypeProvider
-DESCR:WritingUNO - XTypeProvider
-REF:
-com.sun.star.lang.XTypeProvider
-TOPIC:
-com.sun.star.lang.XTypeProvider
-
-LINK:Documentation/DevGuide/AdvUNO/XInvocation_Bridge#Scripting_Existing_UNO_Objects
-DESCR:AdvUNO - XInvocation Bridge - Scripting Existing UNO Objects
-REF:
-com.sun.star.script.Invocation
-TOPIC:
-com.sun.star.script.Invocation
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Mapping_of_Enums_and_Constant_Groups
-DESCR:ProUNO - Basic - Mapping of Enums and Constant Groups
-REF:
-com.sun.star.beans.PropertyState
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.PropertyConcept
-TOPIC:
-
-LINK:Documentation/DevGuide/AppendixC/The_WebDAV_Content_Provider#Commands_and_Properties
-DESCR:AppendixC - The WebDAV Content Provider - Commands and Properties
-REF:
-com.sun.star.ucb.XContent
-com.sun.star.lang.XServiceInfo
-com.sun.star.ucb.XContentCreator
-com.sun.star.lang.XComponent
-com.sun.star.container.XChild
-com.sun.star.ucb.XCommandInfoChangeNotifier
-com.sun.star.beans.XPropertySetInfoChangeNotifier
-com.sun.star.beans.XPropertiesChangeNotifier
-com.sun.star.beans.XPropertyContainer
-com.sun.star.ucb.XCommandProcessor
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Config/Updating_Configuration_Data
-DESCR:Config - Updating Configuration Data
-REF:
-com.sun.star.beans.NamedValue
-com.sun.star.beans.XPropertyState
-com.sun.star.configuration.SetAccess
-com.sun.star.sdb.DatabaseContext
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XPropertyWithState
-com.sun.star.configuration.SetUpdate
-com.sun.star.beans.XMultiHierarchicalPropertySet
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.container.XNameReplace
-com.sun.star.beans.XMultiPropertyStates
-com.sun.star.configuration.ConfigurationAccess
-com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.beans.XPropertySetInfo
-com.sun.star.container.XNameContainer
-com.sun.star.configuration.GroupUpdate
-com.sun.star.configuration.SetElement
-com.sun.star.util.XChangesBatch
-com.sun.star.beans.Property
-TOPIC:
-com.sun.star.configuration.ConfigurationUpdateAccess
-
-LINK:Documentation/DevGuide/Text/Line_Numbering_and_Outline_Numbering#Paragraph_and_Outline_Numbering
-DESCR:Text - Line Numbering and Outline Numbering - Paragraph and Outline Numbering
-REF:
-com.sun.star.text.NumberingRules
-com.sun.star.style.ParagraphProperties
-com.sun.star.text.VertOrientation
-com.sun.star.beans.PropertyValue
-com.sun.star.container.XIndexReplace
-com.sun.star.text.ChapterNumberingRule
-com.sun.star.text.NumberingLevel
-com.sun.star.style.NumberingType
-com.sun.star.text.HoriOrientation
-com.sun.star.text.XChapterNumberingSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Handling_Presentation_Document_Files#Creating_and_Loading_Presentation_Documents
-DESCR:Drawings - Handling Presentation Document Files - Creating and Loading Presentation Documents
-REF:
-com.sun.star.document.MediaDescriptor
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/Implementation_Loader
-DESCR:AdvUNO - Implementation Loader
-REF:
-com.sun.star.registry.ImplementationRegistration
-com.sun.star.loader.XImplementationLoader
-com.sun.star.lang.XSingleComponentFactory
-com.sun.star.lang.ServiceManager
-TOPIC:
-com.sun.star.loader.XImplementationLoader
-
-LINK:Documentation/DevGuide/OfficeDev/Writing_the_Filtering_Component#XDocumentHandler
-DESCR:OfficeDev - Writing the Filtering Component - XDocumentHandler
-REF:
-com.sun.star.xml.sax.XDocumentHandler
-TOPIC:
-com.sun.star.xml.sax.XDocumentHandler
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_Spell_Checker
-DESCR:OfficeDev - Implementing a Spell Checker
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.lang.XComponent
-com.sun.star.linguistic2.LinguServiceEvent
-com.sun.star.linguistic2.XLinguServiceEventBroadcaster
-com.sun.star.lang.XInitialization
-com.sun.star.linguistic2.XSpellChecker
-com.sun.star.lang.XServiceDisplayName
-com.sun.star.linguistic2.SpellFailure
-com.sun.star.lang.XTypeProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Service_Manager#XSet_Interface
-DESCR:ProUNO - Service Manager - XSet Interface
-REF:
-com.sun.star.lang.XServiceInfo
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.container.XSet
-com.sun.star.lang.XSingleComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/Executing_Content_Commands
-DESCR:UCB - Executing Content Commands
-REF:
-com.sun.star.ucb.Content
-com.sun.star.ucb.XCommandEnvironment
-com.sun.star.ucb.Command
-com.sun.star.task.XInteractionHandler
-com.sun.star.ucb.XCommandProcessor
-TOPIC:
-com.sun.star.ucb.Command
-com.sun.star.ucb.XCommandProcessor
-
-LINK:Documentation/DevGuide/OfficeDev/Handling_Documents#MediaDescriptor
-DESCR:OfficeDev - Handling Documents - Loading Documents - MediaDescriptor
-REF:
-com.sun.star.document.TypeDetection
-com.sun.star.task.XStatusIndicator
-com.sun.star.frame.XStorable
-com.sun.star.document.XViewDataSupplier
-com.sun.star.task.InteractionHandler
-com.sun.star.document.MacroExecMode
-com.sun.star.document.ExtendedTypeDetection
-com.sun.star.io.IOException
-com.sun.star.document.UpdateDocMode
-com.sun.star.beans.PropertyValue
-com.sun.star.io.XSeekable
-com.sun.star.document.MediaDescriptor
-TOPIC:
-com.sun.star.document.MediaDescriptor
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Jobs
-DESCR:WritingUNO - Jobs - Jobs
-REF:
-com.sun.star.task.JobExecutor
-TOPIC:
-com.sun.star.task.JobExecutor
-
-LINK:Documentation/DevGuide/Database/Data_Sources_in_OpenOffice.org_API#DatabaseContext
-DESCR:Database - Data Sources in OpenOffice.org API - DatabaseContext
-REF:
-com.sun.star.sdb.Connection
-com.sun.star.sdb.DatabaseContext
-com.sun.star.sdb.XCompletedConnection
-com.sun.star.sdb.DataSource
-com.sun.star.container.XNameAccess
-com.sun.star.container.XEnumeration
-TOPIC:
-com.sun.star.sdb.DatabaseContext
-
-LINK:Documentation/DevGuide/Text/Working_with_Text_Documents#Word_Processing
-DESCR:Text - Working with Text Documents - Word Processing
-REF:
-com.sun.star.text.Text
-TOPIC:
-com.sun.star.text.Text
-
-LINK:Documentation/DevGuide/Database/Forms_and_Reports
-DESCR:Database - Forms and Reports
-REF:
-com.sun.star.frame.XComponentLoader
-com.sun.star.container.XHierarchicalNameContainer
-com.sun.star.sdb.XFormDocumentsSupplier
-com.sun.star.container.XEnumerationAccess
-com.sun.star.sdb.DataSource
-com.sun.star.text.TextDocument
-com.sun.star.sdbcx.XRename
-com.sun.star.sdb.Forms
-com.sun.star.sdb.DocumentDefinition
-com.sun.star.sdb.DocumentContainer
-com.sun.star.sdbc.XConnection
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.sdb.XReportDocumentsSupplier
-com.sun.star.container.XNameContainer
-com.sun.star.container.XHierarchicalNameAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.beans.PropertyValue
-com.sun.star.sdb.Reports
-TOPIC:
-com.sun.star.sdb.XReportDocumentsSupplier
-com.sun.star.sdb.XFormDocumentsSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/Document_API_Filter_Development#Introduction
-DESCR:OfficeDev - Document API Filter Development - Introduction
-REF:
-com.sun.star.document.MediaDescriptor
-com.sun.star.document.ImportFilter
-com.sun.star.document.ExportFilter
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XDocumentInfoSupplier
-DESCR:OfficeDev - Component - Models - XDocumentInfoSupplier
-REF:
-com.sun.star.document.XDocumentInfoSupplier
-TOPIC:
-com.sun.star.document.XDocumentInfoSupplier
-
-LINK:Documentation/DevGuide/FirstSteps/Struct
-DESCR:FirstSteps - Struct
-REF:
-com.sun.star.reflection.CoreReflection
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Automation_Objects_with_UNO_Interfaces#Examples
-DESCR:ProUNO - Bridge - Automation Objects with UNO Interfaces - null - Examples
-REF:
-com.sun.star.lang.XEventListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleTable
-DESCR:Accessibility - XAccessibleTable
-REF:
-com.sun.star.accessibility.XAccessibleTable
-com.sun.star.accessibility.XAccessibleContext
-TOPIC:
-com.sun.star.accessibility.XAccessibleTable
-
-LINK:Documentation/DevGuide/Forms/The_Model-View_Paradigm
-DESCR:Forms - The Model-View Paradigm
-REF:
-com.sun.star.beans.XPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/C++/Class_Definition_with_Helper_Template_Classes#XServiceInfo
-DESCR:WritingUNO - C++ - Class Definition with Helper Template Classes - XServiceInfo
-REF:
-com.sun.star.lang.XServiceInfo
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Process#Listening_for_Status_Information
-DESCR:OfficeDev - Dispatch Process - Listening for Status Information
-REF:
-com.sun.star.frame.FeatureStateEvent
-com.sun.star.frame.XStatusListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Working_with_Drawing_Documents#Page_Handling
-DESCR:Drawings - Working with Drawing Documents - Page Handling
-REF:
-com.sun.star.drawing.XDrawPagesSupplier
-com.sun.star.drawing.XMasterPageTarget
-com.sun.star.drawing.XDrawPages
-com.sun.star.drawing.XDrawPageDuplicator
-com.sun.star.container.XIndexAccess
-TOPIC:
-com.sun.star.drawing.XDrawPages
-com.sun.star.drawing.XDrawPageDuplicator
-
-LINK:Documentation/DevGuide/Spreadsheets/Table_Auto_Formats
-DESCR:Spreadsheets - Table Auto Formats
-REF:
-com.sun.star.sheet.TableAutoFormatField
-com.sun.star.container.XIndexAccess
-com.sun.star.sheet.TableAutoFormat
-com.sun.star.sheet.TableAutoFormats
-com.sun.star.table.XAutoFormattable
-TOPIC:
-com.sun.star.sheet.TableAutoFormatField
-com.sun.star.sheet.TableAutoFormat
-com.sun.star.table.XAutoFormattable
-
-LINK:Documentation/DevGuide/Database/Using_the_getXXX_Methods
-DESCR:Database - Using the getXXX Methods
-REF:
-com.sun.star.sdbc.XRow
-com.sun.star.util.Date
-com.sun.star.sdbc.DataType
-TOPIC:
-com.sun.star.sdbc.XRow
-
-LINK:Documentation/DevGuide/AppendixA/Exceptions#Naming
-DESCR:AppendixA - Exceptions - Naming
-REF:
-com.sun.star.lang.IllegalArgumentException
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleHypertext
-DESCR:Accessibility - XAccessibleHypertext
-REF:
-com.sun.star.accessibility.XAccessibleHypertext
-com.sun.star.accessibility.XAccessibleHyperlink
-com.sun.star.accessibility.XAccessibleText
-TOPIC:
-com.sun.star.accessibility.XAccessibleHypertext
-
-LINK:Documentation/DevGuide/WritingUNO/Intercepting_Context_Menus#Finishing_Interception
-DESCR:WritingUNO - Intercepting Context Menus - Writing an Interceptor - Finishing Interception
-REF:
-com.sun.star.ui.XContextMenuInterceptor
-com.sun.star.ui.ContextMenuInterceptorAction
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Java_Window_Integration#Legal_Solution
-DESCR:OfficeDev - Java Window Integration - Using the Window Handle - Legal Solution
-REF:
-com.sun.star.awt.XWindow
-com.sun.star.awt.Toolkit
-com.sun.star.awt.XSystemChildFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Access_to_Text_Content
-DESCR:Spreadsheets - Access to Text Content
-REF:
-com.sun.star.text.Text
-com.sun.star.text.XTextFieldsSupplier
-com.sun.star.container.XEnumerationAccess
-com.sun.star.text.XText
-com.sun.star.text.textfield.URL
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Framework
-DESCR:OfficeDev - Dispatch Framework
-REF:
-com.sun.star.frame.XDispatchProviderInterception
-com.sun.star.frame.XDispatchProvider
-TOPIC:
-com.sun.star.frame.XDispatchProvider
-
-LINK:Documentation/DevGuide/OfficeDev/Common_Application_Features#Copying_Data
-DESCR:OfficeDev - Common Application Features - Clipboard - Using the Clipboard - Copying Data
-REF:
-com.sun.star.datatransfer.XTransferable
-com.sun.star.datatransfer.clipboard.XClipboardOwner
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Importing_a_UNO_Object
-DESCR:ProUNO - Importing a UNO Object
-REF:
-com.sun.star.bridge.XUnoUrlResolver
-com.sun.star.bridge.UnoUrlResolver
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/Deployment_Options_for_Components
-DESCR:WritingUNO - Deployment Options for Components
-REF:
-com.sun.star.reflection.TypeDescriptionProvider
-com.sun.star.registry.SimpleRegistry
-TOPIC:
-
-LINK:Documentation/DevGuide/Database/Adding_an_Index
-DESCR:Database - Adding an Index
-REF:
-com.sun.star.sdbcx.XDataDescriptorFactory
-com.sun.star.sdbc.SQLException
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Ranges_and_Cells_Container#Access_to_Single_Cell_Ranges_in_SheetCellRanges_Container
-DESCR:Spreadsheets - Cell Ranges and Cells Container - Access to Single Cell Ranges in SheetCellRanges Container
-REF:
-com.sun.star.sheet.XSheetCellRangeContainer
-com.sun.star.chart.XChartDataArray
-com.sun.star.sheet.XSheetCellRanges
-com.sun.star.container.XNameContainer
-com.sun.star.container.XIndexAccess
-com.sun.star.container.XEnumerationAccess
-com.sun.star.sheet.XSheetOperation
-com.sun.star.util.XReplaceable
-com.sun.star.sheet.SheetRangesQuery
-com.sun.star.sheet.Cells
-com.sun.star.util.XIndent
-TOPIC:
-com.sun.star.sheet.Cells
-
-LINK:Documentation/DevGuide/OfficeDev/XML_Filter_Detection#The_ExtendedTypeDetection_Service_Implementation
-DESCR:OfficeDev - XML Filter Detection - The ExtendedTypeDetection Service Implementation
-REF:
-com.sun.star.document.XExtendedFilterDetection
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models
-DESCR:OfficeDev - Component - Models
-REF:
-com.sun.star.document.OfficeDocument
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.frame.XModel
-
-LINK:Documentation/DevGuide/Spreadsheets/Data_Array
-DESCR:Spreadsheets - Data Array
-REF:
-com.sun.star.sheet.XCellRangeData
-TOPIC:
-com.sun.star.sheet.XCellRangeData
-
-LINK:Documentation/DevGuide/GUI/Events
-DESCR:GUI - Events
-REF:
-com.sun.star.awt.MouseEvent
-com.sun.star.awt.FocusEvent
-com.sun.star.awt.XWindow
-com.sun.star.lang.XEventListener
-com.sun.star.lang.EventObject
-com.sun.star.awt.XControl
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Control_Models
-DESCR:Forms - Control Models
-REF:
-com.sun.star.form.component.TextField
-com.sun.star.lang.XServiceInfo
-com.sun.star.beans.XPropertyState
-com.sun.star.form.FormComponentType
-com.sun.star.form.FormComponent
-com.sun.star.form.component.FormattedField
-com.sun.star.awt.UnoControlModel
-com.sun.star.awt.XControlModel
-com.sun.star.form.FormControlModel
-com.sun.star.awt
-TOPIC:
-com.sun.star.beans.XPropertyState
-com.sun.star.form.FormComponent
-com.sun.star.awt.UnoControlModel
-com.sun.star.form.FormControlModel
-
-LINK:Documentation/DevGuide/Basic/Dialog_as_Control_Container
-DESCR:Basic - Dialog as Control Container
-REF:
-com.sun.star.awt.UnoControlDialogModel
-com.sun.star.awt.XControlContainer
-com.sun.star.awt.UnoControlDialog
-com.sun.star.container.XNameContainer
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Label_Ranges
-DESCR:Spreadsheets - Label Ranges
-REF:
-com.sun.star.sheet.LabelRanges
-com.sun.star.sheet.XLabelRanges
-com.sun.star.sheet.XLabelRange
-com.sun.star.sheet.LabelRange
-TOPIC:
-com.sun.star.sheet.LabelRanges
-
-LINK:Documentation/DevGuide/WritingUNO/Defining_a_Service
-DESCR:WritingUNO - Defining a Service
-REF:
-com.sun.star.document.XFilter
-com.sun.star.beans.XPropertySet
-com.sun.star.beans.XPropertySetInfo
-com.sun.star.beans.PropertyValue
-com.sun.star.document.MediaDescriptor
-com.sun.star.text.TextDocument
-com.sun.star.beans.XPropertyContainer
-com.sun.star.beans.XPropertyChangeListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Annotations
-DESCR:Spreadsheets - Cell Annotations
-REF:
-com.sun.star.sheet.CellAnnotations
-com.sun.star.sheet.CellAnnotation
-com.sun.star.sheet.XSheetAnnotationsSupplier
-com.sun.star.sheet.XSheetAnnotations
-com.sun.star.container.XEnumerationAccess
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XSimpleText
-com.sun.star.container.XChild
-com.sun.star.sheet.XSheetAnnotation
-com.sun.star.sheet.CellAnnotationsEnumeration
-com.sun.star.sheet.XSheetAnnotationAnchor
-TOPIC:
-com.sun.star.sheet.CellAnnotation
-com.sun.star.sheet.XSheetAnnotation
-com.sun.star.sheet.XSheetAnnotationAnchor
-
-LINK:Documentation/DevGuide/OfficeDev/Using_the_Dispatch_Framework
-DESCR:OfficeDev - Using the Dispatch Framework
-REF:
-TOPIC:
-com.sun.star.frame.XDispatchProviderInterceptor
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Calling_Functions_and_Accessing_Properties
-DESCR:ProUNO - Bridge - Calling Functions and Accessing Properties
-REF:
-com.sun.star.beans.XPropertySet
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Footnotes_and_Endnotes
-DESCR:Text - Footnotes and Endnotes
-REF:
-com.sun.star.text.TextContent
-com.sun.star.beans.XPropertySet
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XFootnote
-com.sun.star.text.XText
-com.sun.star.text.XTextContent
-com.sun.star.text.Footnote
-com.sun.star.text.XFootnotesSupplier
-com.sun.star.text.FootnoteSettings
-com.sun.star.text.XEndnotesSupplier
-TOPIC:
-com.sun.star.text.Footnote
-
-LINK:Documentation/DevGuide/Charts/Creating_and_Adding_a_Chart_to_a_Spreadsheet
-DESCR:Charts - Creating and Adding a Chart to a Spreadsheet
-REF:
-com.sun.star.table.XTableChartsSupplier
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.sheet.Spreadsheet
-TOPIC:
-com.sun.star.table.XTableChartsSupplier
-
-LINK:Documentation/DevGuide/Spreadsheets/Cell_Cursor#Used_Area
-DESCR:Spreadsheets - Cell Cursor - Used Area
-REF:
-com.sun.star.sheet.XSpreadsheet
-com.sun.star.sheet.XUsedAreaCursor
-TOPIC:
-com.sun.star.sheet.XUsedAreaCursor
-
-LINK:Documentation/DevGuide/Spreadsheets/Database_Ranges
-DESCR:Spreadsheets - Database Ranges
-REF:
-com.sun.star.sheet.XDatabaseRanges
-com.sun.star.sheet.SpreadsheetDocument
-com.sun.star.sheet.XDatabaseRange
-com.sun.star.sheet.DatabaseRange
-com.sun.star.table.CellRangeAddress
-com.sun.star.sheet.XCellRangeReferrer
-com.sun.star.container.XNameAccess
-TOPIC:
-com.sun.star.sheet.XDatabaseRanges
-
-LINK:Documentation/DevGuide/Database/Seeing_Changes_in_Result_Sets
-DESCR:Database - Seeing Changes in Result Sets
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-TOPIC:
-
-LINK:Documentation/DevGuide/Forms/Programmatic_Assignment_of_Scripts_to_Events
-DESCR:Forms - Programmatic Assignment of Scripts to Events
-REF:
-com.sun.star.awt.XItemListener
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/CLI/Type_Mappings#exception
-DESCR:ProUNO - CLI - Type Mappings - exception
-REF:
-com.sun.star.uno.Exception
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Capabilities_of_Columns_and_Rows
-DESCR:Spreadsheets - Capabilities of Columns and Rows
-REF:
-com.sun.star.table.XTableColumns
-com.sun.star.table.XColumnRowRange
-com.sun.star.table.XTableRows
-com.sun.star.container.XNameAccess
-com.sun.star.table.TableColumns
-com.sun.star.table.TableColumn
-com.sun.star.table.TableRow
-com.sun.star.table.TableRows
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/Example_Python_Bridge_PyUNO
-DESCR:AdvUNO - Example Python Bridge PyUNO
-REF:
-com.sun.star.script.Converter
-com.sun.star.script.Invocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Printing_Spreadsheet_Documents#Printer_and_Print_Job_Settings
-DESCR:Spreadsheets - Printing Spreadsheet Documents - Printer and Print Job Settings
-REF:
-com.sun.star.awt.Size
-com.sun.star.view.PaperOrientation
-com.sun.star.view.PrintOptions
-com.sun.star.view.PrinterDescriptor
-com.sun.star.view.XPrintable
-com.sun.star.view.PaperFormat
-TOPIC:
-com.sun.star.view.PrintOptions
-com.sun.star.view.PrinterDescriptor
-com.sun.star.view.XPrintable
-
-LINK:Documentation/DevGuide/WritingUNO/XServiceInfo#Supported_Service_Names
-DESCR:WritingUNO - XServiceInfo - Supported Service Names
-REF:
-com.sun.star.container.XContentEnumerationAccess
-com.sun.star.lang.XSingleServiceFactory
-com.sun.star.lang.XSingleComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Animations_and_Interactions
-DESCR:Drawings - Animations and Interactions
-REF:
-com.sun.star.presentation.AnimationSpeed
-com.sun.star.presentation.Shape
-com.sun.star.presentation.ClickAction
-com.sun.star.presentation.AnimationEffect
-TOPIC:
-com.sun.star.presentation.Shape
-com.sun.star.presentation.AnimationEffect
-
-LINK:Documentation/DevGuide/GUI/Events#Keyboard_Listener
-DESCR:GUI - Events - Keyboard Listener
-REF:
-com.sun.star.awt.XKeyListener
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Using_the_Component_Framework
-DESCR:OfficeDev - Using the Component Framework
-REF:
-com.sun.star.frame.Controller
-com.sun.star.lang.XComponent
-com.sun.star.document.OfficeDocument
-com.sun.star.drawing.DrawingDocumentDrawView
-com.sun.star.sheet.SpreadsheetView
-com.sun.star.frame.XModel
-TOPIC:
-com.sun.star.lang.XComponent
-
-LINK:Documentation/DevGuide/Text/Settings#General_Document_Information
-DESCR:Text - Settings - General Document Information
-REF:
-com.sun.star.document.DocumentInfo
-com.sun.star.document.XDocumentInfoSupplier
-TOPIC:
-com.sun.star.document.XDocumentInfoSupplier
-
-LINK:Documentation/DevGuide/Text/Sorting_Text
-DESCR:Text - Sorting Text
-REF:
-com.sun.star.text.TextSortDescriptor
-com.sun.star.beans.PropertyValue
-com.sun.star.util.XSortable
-TOPIC:
-com.sun.star.util.XSortable
-
-LINK:Documentation/DevGuide/ProUNO/Java/Mapping_of_Struct_Types
-DESCR:ProUNO - Java - Mapping of Struct Types
-REF:
-com.sun.star.beans.Optional
-com.sun.star.beans.Ambiguous
-com.sun.star.uno.XInterface
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/UCB/Instantiating_the_UCB
-DESCR:UCB - Instantiating the UCB
-REF:
-com.sun.star.ucb.UniversalContentBroker
-TOPIC:
-com.sun.star.ucb.UniversalContentBroker
-
-LINK:Documentation/DevGuide/AppendixC/The_Package_Content_Provider#Creation_of_New_PCP_Contents
-DESCR:AppendixC - The Package Content Provider - Creation of New PCP Contents
-REF:
-com.sun.star.ucb.XContentCreator
-com.sun.star.io.XInputStream
-TOPIC:
-com.sun.star.ucb.XContentCreator
-
-LINK:Documentation/DevGuide/Text/Overall_Document_Features#Styles
-DESCR:Text - Overall Document Features - Styles
-REF:
-com.sun.star.style.Style
-com.sun.star.container.XNamed
-com.sun.star.style.XStyleFamiliesSupplier
-com.sun.star.style.StyleFamilies
-com.sun.star.container.XNameContainer
-com.sun.star.container.XIndexAccess
-com.sun.star.style.XStyle
-com.sun.star.container.XNameAccess
-com.sun.star.uno.RuntimeException
-com.sun.star.style.XStyleLoader
-com.sun.star.style.StyleFamily
-TOPIC:
-com.sun.star.style.Style
-com.sun.star.style.StyleFamilies
-com.sun.star.style.XStyle
-com.sun.star.style.StyleFamily
-
-LINK:Documentation/DevGuide/Basic/Combo_Box
-DESCR:Basic - Combo Box
-REF:
-com.sun.star.awt.UnoControlComboBox
-com.sun.star.awt.XComboBox
-TOPIC:
-
-LINK:Documentation/DevGuide/Extensions/Creating_the_GUI_of_the_Options_Page
-DESCR:Extensions - Creating the GUI of the Options Page
-REF:
-com.sun.star.awt.ContainerWindowProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Function_Handling#Information_about_Functions
-DESCR:Spreadsheets - Function Handling - Information about Functions
-REF:
-com.sun.star.sheet.FunctionArgument
-com.sun.star.sheet.FunctionDescriptions
-com.sun.star.sheet.RecentFunctions
-com.sun.star.sheet.XFunctionDescriptions
-com.sun.star.container.XIndexAccess
-com.sun.star.sheet.FunctionAccess
-com.sun.star.beans.PropertyValue
-com.sun.star.container.XNameAccess
-com.sun.star.sheet.FunctionDescription
-TOPIC:
-com.sun.star.sheet.FunctionDescriptions
-com.sun.star.sheet.FunctionDescription
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Models#XStorable
-DESCR:OfficeDev - Component - Models - XStorable
-REF:
-com.sun.star.frame.XStorable
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleAction
-DESCR:Accessibility - XAccessibleAction
-REF:
-com.sun.star.accessibility.XAccessibleKeyBinding
-com.sun.star.accessibility.XAccessibleAction
-TOPIC:
-com.sun.star.accessibility.XAccessibleAction
-
-LINK:Documentation/DevGuide/Text/Editing_Text
-DESCR:Text - Editing Text
-REF:
-com.sun.star.text.XText
-TOPIC:
-com.sun.star.text.XText
-
-LINK:Documentation/DevGuide/Database/The_SingleSelectQueryComposer
-DESCR:Database - The SingleSelectQueryComposer
-REF:
-com.sun.star.sdb.SingleSelectQueryAnalyzer
-com.sun.star.sdb.SingleSelectQueryComposer
-com.sun.star.sdb.Connection
-com.sun.star.sdbcx.XTablesSupplier
-com.sun.star.sdb.DataColumn
-com.sun.star.sdbcx.XColumnsSupplier
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.sdb.XParametersSupplier
-com.sun.star.sdb.XSingleSelectQueryAnalyzer
-com.sun.star.sdb.SQLQueryComposer
-TOPIC:
-com.sun.star.sdb.SingleSelectQueryComposer
-
-LINK:Documentation/DevGuide/OfficeDev/Closing_Documents#How_to_Trigger_Closing
-DESCR:OfficeDev - Closing Documents - How to Trigger Closing
-REF:
-com.sun.star.util.XModifiable
-com.sun.star.util.XCloseable
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Chart_Document_Controller
-DESCR:Charts - Chart Document Controller
-REF:
-com.sun.star.frame.XModel
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale#XNativeNumberSupplier
-DESCR:OfficeDev - Implementing a New Locale - XNativeNumberSupplier
-REF:
-com.sun.star.i18n.NativeNumberMode
-com.sun.star.i18n.XNativeNumberSupplier
-TOPIC:
-com.sun.star.i18n.XNativeNumberSupplier
-
-LINK:Documentation/DevGuide/OfficeDev/Creating_Frames_Manually#Setting_Components_into_Frame_Hierarchies
-DESCR:OfficeDev - Creating Frames Manually - Setting Components into Frame Hierarchies
-REF:
-TOPIC:
-com.sun.star.frame.XFramesSupplier
-
-LINK:Documentation/DevGuide/Spreadsheets/Sorting#Table_Sort_Descriptor
-DESCR:Spreadsheets - Sorting - Table Sort Descriptor
-REF:
-com.sun.star.sheet.GlobalSheetSettings
-com.sun.star.sheet.SheetSortDescriptor2
-com.sun.star.table.TableSortDescriptor2
-com.sun.star.table.TableSortField
-com.sun.star.util.SortDescriptor2
-com.sun.star.util.XSortable
-com.sun.star.i18n.Collator
-TOPIC:
-com.sun.star.sheet.SheetSortDescriptor2
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Frames#XDispatchProvider_and_XDispatchProviderInterception
-DESCR:OfficeDev - Component - Frames - XDispatchProvider and XDispatchProviderInterception
-REF:
-com.sun.star.frame.XDispatchProviderInterception
-com.sun.star.frame.XDispatchProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Case_Sensitivity
-DESCR:ProUNO - Basic - Case Sensitivity
-REF:
-com.sun.star.container.XNameAccess
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Drawing_Shapes
-DESCR:Text - Drawing Shapes
-REF:
-com.sun.star.drawing.HomogenMatrix
-com.sun.star.text.XTextRange
-com.sun.star.text.XTextFrame
-com.sun.star.container.XNameContainer
-com.sun.star.text.TextContentAnchorType
-com.sun.star.text.Shape
-com.sun.star.style.XStyle
-com.sun.star.drawing.Shape
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Overview_and_Using_the_API#XTransliteration
-DESCR:OfficeDev - Overview and Using the API - XTransliteration
-REF:
-com.sun.star.i18n.XLocaleData
-com.sun.star.i18n.XTransliteration
-TOPIC:
-com.sun.star.i18n.XTransliteration
-
-LINK:Documentation/DevGuide/Drawings/Working_with_Drawing_Documents#Page_Partitioning
-DESCR:Drawings - Working with Drawing Documents - Page Partitioning
-REF:
-com.sun.star.view.PaperOrientation
-com.sun.star.drawing.GenericDrawPage
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Basic/Listeners
-DESCR:ProUNO - Basic - Listeners
-REF:
-com.sun.star.container.ContainerEvent
-com.sun.star.lang.XEventListener
-com.sun.star.lang.EventObject
-com.sun.star.container.XContainerListener
-TOPIC:
-com.sun.star.lang.XEventListener
-
-LINK:Documentation/DevGuide/Spreadsheets/Filter_Options
-DESCR:Spreadsheets - Filter Options
-REF:
-com.sun.star.beans.PropertyValue
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Framework_API
-DESCR:OfficeDev - Framework API
-REF:
-com.sun.star.awt
-TOPIC:
-
-LINK:Documentation/DevGuide/Basic/HorizontalVertical_Scroll_Bar
-DESCR:Basic - HorizontalVertical Scroll Bar
-REF:
-com.sun.star.awt.UnoControlScrollBar
-com.sun.star.awt.AdjustmentEvent
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Controllers
-DESCR:OfficeDev - Controllers
-REF:
-com.sun.star.frame.XController
-com.sun.star.sheet.XSpreadsheetView
-com.sun.star.text.XTextViewCursorSupplier
-TOPIC:
-com.sun.star.frame.Controller
-com.sun.star.frame.XController
-
-LINK:Documentation/DevGuide/AppendixC/The_Help_Content_Provider#Module_Content
-DESCR:AppendixC - The Help Content Provider - Properties and Commands - Module Content
-REF:
-com.sun.star.ucb.XDynamicResultSet
-TOPIC:
-
-LINK:Documentation/DevGuide/AdvUNO/UNO_Reflection_API#CoreReflection_Service
-DESCR:AdvUNO - UNO Reflection API - CoreReflection Service
-REF:
-com.sun.star.reflection.XIdlClass
-com.sun.star.reflection.CoreReflection
-com.sun.star.reflection.XIdlReflection
-com.sun.star.reflection.XIdlField2
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet
-DESCR:Spreadsheets - Spreadsheet
-REF:
-com.sun.star.sheet.Spreadsheet
-TOPIC:
-
-LINK:Documentation/DevGuide/Text/Reference_Marks
-DESCR:Text - Reference Marks
-REF:
-com.sun.star.container.XNamed
-com.sun.star.text.textfield.GetReference
-com.sun.star.container.XIndexAccess
-com.sun.star.text.XReferenceMarksSupplier
-com.sun.star.container.XNameAccess
-com.sun.star.text.ReferenceMarks
-com.sun.star.text.XTextContent
-TOPIC:
-com.sun.star.text.ReferenceMark
-
-LINK:Documentation/DevGuide/Database/Database_Design#Retrieving_General_Information
-DESCR:Database - Database Design - Retrieving Information about a Database - Retrieving General Information
-REF:
-com.sun.star.sdbc.XDatabaseMetaData
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Service_Manager#XMultiServiceFactory_Interface
-DESCR:ProUNO - Service Manager - XMultiServiceFactory Interface
-REF:
-com.sun.star.lang.XInitialization
-com.sun.star.lang.XMultiServiceFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Bridge/Type_Mappings
-DESCR:ProUNO - Bridge - Type Mappings
-REF:
-com.sun.star.script.XInvocation
-TOPIC:
-
-LINK:Documentation/DevGuide/Drawings/Overall_Document_Features#Graphics_Styles
-DESCR:Drawings - Overall Document Features - Styles - Graphics Styles
-REF:
-com.sun.star.drawing.ShadowProperties
-com.sun.star.drawing.ConnectorProperties
-com.sun.star.style.XStyleFamiliesSupplier
-com.sun.star.style.ParagraphProperties
-com.sun.star.drawing.MeasureProperties
-com.sun.star.container.XNameContainer
-com.sun.star.style.XStyle
-com.sun.star.container.XNameAccess
-com.sun.star.drawing.TextProperties
-com.sun.star.drawing.LineProperties
-com.sun.star.drawing.FillProperties
-com.sun.star.style.CharacterProperties
-TOPIC:
-com.sun.star.style.XStyle
-
-LINK:Documentation/DevGuide/WritingUNO/Jobs/Using_the_vnd.sun.star.jobs:_URL_Schema
-DESCR:WritingUNO - Jobs - Using the vnd.sun.star.jobs: URL Schema
-REF:
-com.sun.star.task.XAsyncJob
-com.sun.star.task.XJob
-com.sun.star.task.Job
-com.sun.star.task.AsyncJob
-TOPIC:
-
-LINK:Documentation/DevGuide/WritingUNO/XAggregation
-DESCR:WritingUNO - XAggregation
-REF:
-com.sun.star.uno.XAggregation
-TOPIC:
-com.sun.star.uno.XAggregation
-
-LINK:Documentation/DevGuide/OfficeDev/Component/Frames#Frame_Hierarchies
-DESCR:OfficeDev - Component - Frames - XFrame - Frame Hierarchies
-REF:
-com.sun.star.frame.XFrames
-com.sun.star.frame.FrameSearchFlag
-com.sun.star.frame.XFramesSupplier
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Component_Context#Compatibility_Issues_and_Migration_Path
-DESCR:ProUNO - Component Context - Compatibility Issues and Migration Path
-REF:
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.lang.XMultiComponentFactory
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Java/Handling_Interfaces
-DESCR:ProUNO - Java - Handling Interfaces
-REF:
-com.sun.star.lang.XMultiServiceFactory
-com.sun.star.uno.XInterface
-TOPIC:
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleEventListener
-DESCR:Accessibility - XAccessibleEventListener
-REF:
-com.sun.star.accessibility.XAccessibleEventListener
-com.sun.star.accessibility.AccessibleEventObject
-com.sun.star.accessibility.XAccessibleContext
-com.sun.star.accessibility.AccessibleEventId
-com.sun.star.accessibility.XAccessible
-TOPIC:
-com.sun.star.accessibility.XAccessibleEventListener
-
-LINK:Documentation/DevGuide/ProUNO/Java/Transparent_Use_of_Office_UNO_Components
-DESCR:ProUNO - Java - Transparent Use of Office UNO Components
-REF:
-TOPIC:
-com.sun.star.uno.XComponentContext
-com.sun.star.lang.XMultiComponentFactory
-
-LINK:Documentation/DevGuide/GUI/Command_Button
-DESCR:GUI - Command Button
-REF:
-com.sun.star.awt.XActionListener
-com.sun.star.awt.PushButtonType
-com.sun.star.awt.ImageAlign
-com.sun.star.awt.UnoControlButton
-com.sun.star.awt.UnoControlButtonModel
-TOPIC:
-
-LINK:Documentation/DevGuide/ProUNO/Singletons
-DESCR:ProUNO - Singletons
-REF:
-com.sun.star.uno.XComponentContext
-com.sun.star.uno.DeploymentException
-TOPIC:
-
-LINK:Documentation/DevGuide/Charts/Common_Parts_of_all_Chart_Types#Diagram
-DESCR:Charts - Common Parts of all Chart Types - Diagram
-REF:
-com.sun.star.chart.ChartStatistics
-com.sun.star.chart.BarDiagram
-com.sun.star.chart.Dim3DDiagram
-com.sun.star.chart.StackableDiagram
-com.sun.star.chart.PieDiagram
-com.sun.star.chart.LineDiagram
-com.sun.star.chart.AreaDiagram
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/View_Panes
-DESCR:Spreadsheets - View Panes
-REF:
-com.sun.star.sheet.XViewPane
-com.sun.star.table.CellRangeAddress
-com.sun.star.sheet.XCellRangeReferrer
-com.sun.star.view.XControlAccess
-com.sun.star.sheet.SpreadsheetViewPane
-TOPIC:
-com.sun.star.sheet.SpreadsheetViewPane
-
-LINK:Documentation/DevGuide/ProUNO/Creating_the_Bridge
-DESCR:ProUNO - Creating the Bridge
-REF:
-com.sun.star.lang.XComponent
-com.sun.star.bridge.XBridgeFactory
-com.sun.star.lang.XEventListener
-com.sun.star.bridge.XBridge
-com.sun.star.bridge.BridgeFactory
-com.sun.star.bridge.XInstanceProvider
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Dispatch_Results
-DESCR:OfficeDev - Dispatch Results
-REF:
-com.sun.star.frame.DispatchResultEvent
-com.sun.star.frame.XNotifyingDispatch
-com.sun.star.frame.XDispatchResultListener
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Search_and_Replace
-DESCR:Spreadsheets - Search and Replace
-REF:
-com.sun.star.util.XReplaceable
-com.sun.star.util.XReplaceDescriptor
-com.sun.star.util.XSearchable
-TOPIC:
-com.sun.star.util.XReplaceable
-
-LINK:Documentation/DevGuide/Forms/Form_Controls_accepting_Value_Bindings
-DESCR:Forms - Form Controls accepting Value Bindings
-REF:
-com.sun.star.form.DataAwareControlModel
-com.sun.star.table.CellValueBinding
-com.sun.star.form.binding.BindableControlModel
-com.sun.star.form.binding.BindableDataAwareControlModel
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Spreadsheet_Documents
-DESCR:Spreadsheets - Spreadsheet Documents
-REF:
-com.sun.star.sheet.SheetCell
-com.sun.star.table
-com.sun.star.sheet
-com.sun.star.sheet.SheetCellRanges
-com.sun.star.table.CellRange
-com.sun.star.sheet.SheetCellRange
-com.sun.star.table.Cell
-com.sun.star.table.CellCursor
-com.sun.star.sheet.SheetCellCursor
-com.sun.star.sheet.Cells
-TOPIC:
-com.sun.star.sheet.SpreadsheetDocument
-
-LINK:Documentation/DevGuide/GUI/Currency_Field
-DESCR:GUI - Currency Field
-REF:
-com.sun.star.awt.UnoControlNumericField
-com.sun.star.awt.UnoControlCurrencyField
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Capabilities_of_SheetCell
-DESCR:Spreadsheets - Capabilities of SheetCell
-REF:
-com.sun.star.sheet.SheetCell
-com.sun.star.table.XCell
-com.sun.star.sheet.SheetCellRange
-com.sun.star.table.Cell
-com.sun.star.text.Text
-com.sun.star.text.XTextFieldsSupplier
-com.sun.star.text.XText
-com.sun.star.document.XActionLockable
-com.sun.star.table.CellAddress
-com.sun.star.sheet.XSheetAnnotationAnchor
-TOPIC:
-
-LINK:Documentation/DevGuide/OfficeDev/Frame-Controller-Model_Paradigm_in_OpenOffice.org
-DESCR:OfficeDev - Frame-Controller-Model Paradigm in OpenOffice.org
-REF:
-TOPIC:
-com.sun.star.frame.XController
-com.sun.star.frame.XFrame
-com.sun.star.frame.XModel
-
-LINK:Documentation/DevGuide/UCB/Documents#Storing_a_Document_Content
-DESCR:UCB - Documents - Storing a Document Content
-REF:
-com.sun.star.io.XInputStream
-com.sun.star.ucb.InsertCommandArgument
-TOPIC:
-
-LINK:Documentation/DevGuide/Spreadsheets/Other_Table_Operations#Data_Consolidation
-DESCR:Spreadsheets - Other Table Operations - Data Consolidation
-REF:
-com.sun.star.sheet.GeneralFunction
-com.sun.star.sheet.ConsolidationDescriptor
-com.sun.star.sheet.XConsolidatable
-com.sun.star.table.CellRangeAddress
-com.sun.star.sheet.XConsolidationDescriptor
-com.sun.star.table.CellAddress
-TOPIC:
-com.sun.star.sheet.XConsolidatable
-com.sun.star.sheet.XConsolidationDescriptor
-
-LINK:Documentation/DevGuide/Accessibility/XAccessibleText
-DESCR:Accessibility - XAccessibleText
-REF:
-com.sun.star.accessibility.XAccessibleText
-TOPIC:
-com.sun.star.accessibility.XAccessibleText
-
-LINK:Documentation/DevGuide/Scripting/Integration_with_Extension_Manager#Implementation_of_LanguageScriptProvider_with_support_for_Package_Manager
-DESCR:Scripting - Integration with Extension Manager - Overview of how ScriptingFramework integrates with the Extension Manager API - Implementation of LanguageScriptProvider with support for Package Manager
-REF:
-com.sun.star.deployment.XPackage
-com.sun.star.container.XNameContainer
-com.sun.star.container.XNameAccess
-TOPIC:
-
diff --git a/odk/pack/copying/makefile.mk b/odk/pack/copying/makefile.mk
deleted file mode 100644
index 0feafee7..00000000
--- a/odk/pack/copying/makefile.mk
+++ /dev/null
@@ -1,250 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=copying
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)/util/makefile.pmk
-#----------------------------------------------------------------
-
-IDLLIST:={$(subst,/,/ $(shell @$(FIND) $(IDLOUT)/com -type f))}
-DESTIDLLIST={$(subst,$(IDLOUT),$(DESTDIRIDL) $(IDLLIST))}
-
-DESTINCLUDELIST={$(subst,$(SOLARINCDIR),$(DESTDIRINC) $(INCLUDELIST))}
-DESTINCLUDELIST+=$(DESTDIRINC)/udkversion.mk
-
-DESTINCDIRLIST={$(subst,$(INCOUT),$(DESTDIRINC) $(INCLUDEDIRLIST))}
-
-IDL_DOCU_INDEX_FILE = $(DESTDIRGENIDLREF)/module-ix.html
-IDL_DOCU_CLEANUP_FLAG = $(MISC)/idl_docu_cleanup.flag
-
-IDL_CHAPTER_REFS=idl_chapter_refs.txt
-
-EXELIST = \
- $(DESTDIRBIN)/cppumaker$(EXEPOSTFIX) \
- $(DESTDIRBIN)/regcompare$(EXEPOSTFIX) \
- $(DESTDIRBIN)/idlcpp$(EXEPOSTFIX) \
- $(DESTDIRBIN)/idlc$(EXEPOSTFIX) \
- $(DESTDIRBIN)/javamaker$(EXEPOSTFIX) \
- $(DESTDIRBIN)/autodoc$(EXEPOSTFIX) \
- $(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) \
- $(DESTDIRBIN)/uno-skeletonmaker$(EXEPOSTFIX)
-
-.IF "$(GUI)"=="WNT"
-EXELIST += \
- $(DESTDIRBIN)/climaker$(EXEPOSTFIX)
-.ENDIF
-
-.IF "$(GUI)"=="WNT"
-CLILIST = \
- $(DESTDIRCLI)/cli_basetypes.dll \
- $(DESTDIRCLI)/cli_uretypes.dll \
- $(DESTDIRCLI)/cli_oootypes.dll \
- $(DESTDIRCLI)/cli_ure.dll \
- $(DESTDIRCLI)/cli_cppuhelper.dll
-.ENDIF
-
-
-.IF "$(GUI)"=="WNT"
-LIBLIST = \
- $(DESTDIRLIB)/istore.lib \
- $(DESTDIRLIB)/ireg.lib \
- $(DESTDIRLIB)/isal.lib \
- $(DESTDIRLIB)/isalhelper.lib \
- $(DESTDIRLIB)/icppu.lib \
- $(DESTDIRLIB)/icppuhelper.lib \
- $(DESTDIRLIB)/irmcxt.lib \
- $(DESTDIRLIB)/ipurpenvhelper3MSC.lib
-.ENDIF
-
-.IF "$(OS)"=="LINUX"
- LIBLIST = $(DESTDIRLIB)/libsalcpprt.a
-.ENDIF
-
-# note, that inner class files are copied implicitly
-DESTCLASSESLIST= \
- $(DESTDIRJAR)/com/sun/star/lib/loader/Loader.class \
- $(DESTDIRJAR)/com/sun/star/lib/loader/InstallationFinder.class \
- $(DESTDIRJAR)/com/sun/star/lib/loader/WinRegKey.class \
- $(DESTDIRJAR)/com/sun/star/lib/loader/WinRegKeyException.class
-# $(DESTDIRJAR)/com/sun/star/lib/loader/Loader$$CustomURLClassLoader.class \
-# $(DESTDIRJAR)/com/sun/star/lib/loader/InstallationFinder$$StreamGobbler.class \
-
-SETTINGSLIST= \
- $(DESTDIRSETTINGS)/settings.mk \
- $(DESTDIRSETTINGS)/std.mk \
- $(DESTDIRSETTINGS)/stdtarget.mk \
- $(DESTDIRSETTINGS)/dk.mk
-
-
-.IF "$(GUI)"=="WNT"
-SETTINGSLIST+=$(DESTDIRSETTINGS)/component.uno.def
-.ENDIF
-
-.IF "$(GUI)"=="UNX"
-SETTINGSLIST+=$(DESTDIRSETTINGS)/component.uno.map
-.ENDIF
-
-
-DOCUHTMLFILES+= \
- $(DESTDIR)/index.html \
- $(DESTDIRDOCU)/tools.html \
- $(DESTDIRDOCU)/notsupported.html \
- $(DESTDIRDOCU)/install.html \
- $(DESTDIREXAMPLES)/examples.html \
- $(DESTDIREXAMPLES)/DevelopersGuide/examples.html
-
-DOCUFILES= \
- $(DOCUHTMLFILES) \
- $(DESTDIRDOCU)/sdk_styles.css \
- $(DESTDIRGENIDLREF)/idl.css \
- $(DESTDIRDOCUIMAGES)/nada.gif \
- $(DESTDIRDOCUIMAGES)/arrow-2.gif \
- $(DESTDIRDOCUIMAGES)/bluball.gif \
- $(DESTDIRDOCUIMAGES)/orc-main-app_32.png \
- $(DESTDIRDOCUIMAGES)/ooo-main-app_32.png \
- $(DESTDIRDOCUIMAGES)/odk-footer-logo.gif \
- $(DESTDIRDOCUIMAGES)/arrow-1.gif \
- $(DESTDIRDOCUIMAGES)/arrow-3.gif \
- $(DESTDIRDOCUIMAGES)/bg_table.png \
- $(DESTDIRDOCUIMAGES)/bg_table2.png \
- $(DESTDIRDOCUIMAGES)/bg_table3.png \
- $(DESTDIRDOCUIMAGES)/nav_down.png \
- $(DESTDIRDOCUIMAGES)/nav_home.png \
- $(DESTDIRDOCUIMAGES)/nav_left.png \
- $(DESTDIRDOCUIMAGES)/nav_right.png \
- $(DESTDIRDOCUIMAGES)/nav_up.png \
- $(DESTDIRDOCUIMAGES)/sdk_head-1.png \
- $(DESTDIRDOCUIMAGES)/sdk_head-2.png \
- $(DESTDIRDOCUIMAGES)/sdk_line-1.gif \
- $(DESTDIRDOCUIMAGES)/sdk_line-2.gif
-
-.IF "$(GUI)"=="UNX"
-INSTALLSCRIPT= \
- $(DESTDIR)/config.guess \
- $(DESTDIR)/config.sub \
- $(DESTDIR)/configure.pl \
- $(DESTDIR)/setsdkenv_unix \
- $(DESTDIR)/setsdkenv_unix.sh.in \
- $(DESTDIR)/setsdkenv_unix.csh.in
-.ELSE
-INSTALLSCRIPT= \
- $(DESTDIR)/setsdkenv_windows.bat \
- $(DESTDIR)/setsdkenv_windows.template \
- $(DESTDIR)/setsdkname.bat \
- $(DESTDIR)/cfgWin.js
-.ENDIF
-
-DIR_FILE_LIST=\
- $(EXELIST) \
- $(CLILIST) \
- $(LIBLIST) \
- $(SETTINGSLIST) \
- $(DOCUFILES) \
- $(INSTALLSCRIPT) \
- $(DESTIDLLIST) \
- $(DESTINCLUDELIST) \
- $(DESTCLASSESLIST) \
- $(IDL_DOCU_INDEX_FILE) \
- $(CONVERTTAGFLAG)
-
-.IF "$(OS)"=="MACOSX"
-DIR_FILE_LIST += $(DESTDIRBIN)/addsym-macosx.sh
-.ENDIF
-
-.IF "$(SOLAR_JAVA)" != ""
-DIR_FILE_LIST += $(DESTDIRJAR)/win/unowinreg.dll
-.ENDIF
-
-DIR_DIRECTORY_LIST:=$(uniq $(DIR_FILE_LIST:d))
-DIR_CREATE_FLAG:=$(MISC)/copying_dirs_created.txt
-DIR_FILE_FLAG:=$(MISC)/copying_files.txt
-
-.IF "$(SOLAR_JAVA)" != ""
-# Special work for simple uno bootstrap mechanism
-# zip uno loader class files and winreg helper library for later
-# use in the build process (e.g. helper tools)
-MYZIPTARGET=$(BIN)/uno_loader_classes.zip
-MYZIPFLAGS=-u -r
-MYZIPDIR=$(DESTDIRJAR)
-MYZIPLIST=com/* win/*
-
-.ENDIF
-
-#--------------------------------------------------
-# TARGETS
-#--------------------------------------------------
-
-.IF "$(L10N_framework)"==""
-
-all : CLEAN_DKVERSION_CHECK \
- $(DIR_FILE_LIST) \
- $(DIR_FILE_FLAG) \
-
-.ENDIF
-
-#--------------------------------------------------
-# use global rules
-#--------------------------------------------------
-.INCLUDE: $(PRJ)/util/odk_rules.pmk
-
-
-CLEANUP_DKVERSION_FILE=$(DESTDIRSETTINGS)/dk.mk
-
-
-CLEAN_DKVERSION_CHECK:
- @@-rm -f $(CLEANUP_DKVERSION_FILE)
-
-$(DESTDIRBIN)/addsym-macosx.sh : addsym-macosx.sh
- @@-rm -f $@
- $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $< $(MY_TEXTCOPY_TARGETPRE) $@
- -chmod 755 $@
-
-$(DESTDIRSETTINGS)/dk.mk : dk.mk
- @@-rm -f $@
- -$(MKDIRHIER) $(@:d)
- tr -d "\015" < dk.mk | sed -e 's/@@RELEASE@@/$(PRODUCT_RELEASE)/' -e 's/@@BUILDID@@/$(RSCREVISION)/'> $@
-
-$(IDL_DOCU_CLEANUP_FLAG) : $(IDL_CHAPTER_REFS) $(PRJ)/docs/common/ref/idl.css $(DESTIDLLIST)
- @@-$(MY_DELETE_RECURSIVE) $(DESTDIRGENIDLREF)
- $(TOUCH) $@
-
-$(IDL_DOCU_INDEX_FILE) : $(IDL_DOCU_CLEANUP_FLAG)
- -$(MKDIRHIER) $(@:d)
- $(MY_AUTODOC) -html $(DESTDIRGENIDLREF) -dvgroot "http://wiki.services.openoffice.org/wiki" \
- -name $(IDLDOCREFNAME) -lg idl -dvgfile $(IDL_CHAPTER_REFS) -t $(DESTDIRIDL)
- -rm $(@:d)/idl.css
- $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)/docs/common/ref/idl.css $(MY_TEXTCOPY_TARGETPRE) $(@:d:d)/idl.css
-
-
-.IF "$(SOLAR_JAVA)" != ""
-$(MYZIPTARGET) : $(BIN)/unowinreg.dll $(DESTCLASSESLIST)
- cd $(MYZIPDIR) && zip $(MYZIPFLAGS) ../../../bin/$(MYZIPTARGET:b) $(MYZIPLIST)
-.ENDIF
diff --git a/odk/pack/gendocu/java/package-list b/odk/pack/gendocu/java/package-list
deleted file mode 100644
index fecd4d4f..00000000
--- a/odk/pack/gendocu/java/package-list
+++ /dev/null
@@ -1,135 +0,0 @@
-java.applet
-java.awt
-java.awt.color
-java.awt.datatransfer
-java.awt.dnd
-java.awt.event
-java.awt.font
-java.awt.geom
-java.awt.im
-java.awt.im.spi
-java.awt.image
-java.awt.image.renderable
-java.awt.print
-java.beans
-java.beans.beancontext
-java.io
-java.lang
-java.lang.ref
-java.lang.reflect
-java.math
-java.net
-java.nio
-java.nio.channels
-java.nio.channels.spi
-java.nio.charset
-java.nio.charset.spi
-java.rmi
-java.rmi.activation
-java.rmi.dgc
-java.rmi.registry
-java.rmi.server
-java.security
-java.security.acl
-java.security.cert
-java.security.interfaces
-java.security.spec
-java.sql
-java.text
-java.util
-java.util.jar
-java.util.logging
-java.util.prefs
-java.util.regex
-java.util.zip
-javax.accessibility
-javax.crypto
-javax.crypto.interfaces
-javax.crypto.spec
-javax.imageio
-javax.imageio.event
-javax.imageio.metadata
-javax.imageio.plugins.jpeg
-javax.imageio.spi
-javax.imageio.stream
-javax.naming
-javax.naming.directory
-javax.naming.event
-javax.naming.ldap
-javax.naming.spi
-javax.net
-javax.net.ssl
-javax.print
-javax.print.attribute
-javax.print.attribute.standard
-javax.print.event
-javax.rmi
-javax.rmi.CORBA
-javax.security.auth
-javax.security.auth.callback
-javax.security.auth.kerberos
-javax.security.auth.login
-javax.security.auth.spi
-javax.security.auth.x500
-javax.security.cert
-javax.sound.midi
-javax.sound.midi.spi
-javax.sound.sampled
-javax.sound.sampled.spi
-javax.sql
-javax.swing
-javax.swing.border
-javax.swing.colorchooser
-javax.swing.event
-javax.swing.filechooser
-javax.swing.plaf
-javax.swing.plaf.basic
-javax.swing.plaf.metal
-javax.swing.plaf.multi
-javax.swing.table
-javax.swing.text
-javax.swing.text.html
-javax.swing.text.html.parser
-javax.swing.text.rtf
-javax.swing.tree
-javax.swing.undo
-javax.transaction
-javax.transaction.xa
-javax.xml.parsers
-javax.xml.transform
-javax.xml.transform.dom
-javax.xml.transform.sax
-javax.xml.transform.stream
-org.ietf.jgss
-org.omg.CORBA
-org.omg.CORBA.DynAnyPackage
-org.omg.CORBA.ORBPackage
-org.omg.CORBA.TypeCodePackage
-org.omg.CORBA.portable
-org.omg.CORBA_2_3
-org.omg.CORBA_2_3.portable
-org.omg.CosNaming
-org.omg.CosNaming.NamingContextExtPackage
-org.omg.CosNaming.NamingContextPackage
-org.omg.Dynamic
-org.omg.DynamicAny
-org.omg.DynamicAny.DynAnyFactoryPackage
-org.omg.DynamicAny.DynAnyPackage
-org.omg.IOP
-org.omg.IOP.CodecFactoryPackage
-org.omg.IOP.CodecPackage
-org.omg.Messaging
-org.omg.PortableInterceptor
-org.omg.PortableInterceptor.ORBInitInfoPackage
-org.omg.PortableServer
-org.omg.PortableServer.CurrentPackage
-org.omg.PortableServer.POAManagerPackage
-org.omg.PortableServer.POAPackage
-org.omg.PortableServer.ServantLocatorPackage
-org.omg.PortableServer.portable
-org.omg.SendingContext
-org.omg.stub.java.rmi
-org.w3c.dom
-org.xml.sax
-org.xml.sax.ext
-org.xml.sax.helpers
diff --git a/odk/pack/gendocu/makefile.mk b/odk/pack/gendocu/makefile.mk
deleted file mode 100644
index fc9abf18..00000000
--- a/odk/pack/gendocu/makefile.mk
+++ /dev/null
@@ -1,122 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=gendocu
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-.IF "$(L10N_framework)"==""
-
-CPPDOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) C/C++ API Reference"
-JAVADOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) Java API Reference"
-
-CPP_DOCU_INDEX_FILE = $(DESTDIRGENCPPREF)$/index.html
-JAVA_DOCU_INDEX_FILE = $(DESTDIRGENJAVAREF)$/index.html
-
-CPP_DOCU_CLEANUP_FLAG = $(MISC)$/cpp_docu_cleanup.flag
-
-JAVA_SRC_DIR=$(MISC)$/java_src
-JAVA_PACKAGES=\
- com.sun.star.comp.helper \
- com.sun.star.lib.uno.helper \
- com.sun.star.lib.unoloader \
- com.sun.star.uno \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/lib$/util$/UrlToFileMapper.java
-# com.sun.star.beans \
-
-JAVA_SRC_FILES=\
- $(JAVA_SRC_DIR)$/jurt_src.zip \
- $(JAVA_SRC_DIR)$/juh_src.zip \
- $(JAVA_SRC_DIR)$/ridl_src.zip \
- $(JAVA_SRC_DIR)$/unoloader_src.zip
-
-JAVA_BEAN_SRC_FILES=\
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/ContainerFactory.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/JavaWindowPeerFake.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/LocalOfficeConnection.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/LocalOfficeWindow.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/NativeConnection.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/NativeService.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/OfficeConnection.java \
- $(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/OfficeWindow.java
-
-AUTODOCPARAMS= -lg c++ \
- -p sal $(INCOUT) -t sal -t osl -t rtl \
- -p store $(INCOUT) -t store \
- -p registry $(INCOUT) -t registry \
- -p cppu $(INCOUT) -t cppu -t com -t typelib -t uno \
- -p cppuhelper $(INCOUT) -t cppuhelper \
- -p salhelper $(INCOUT) -t salhelper \
- -p bridges $(INCOUT) -t bridges
-
-JAVADOCPARAMS= -use -splitindex -windowtitle "Java UNO Runtime Reference" -header $(JAVADOCREFNAME) -d $(DESTDIRGENJAVAREF) -sourcepath $(JAVA_SRC_DIR) -classpath $(SOLARBINDIR)$/ridl.jar -linkoffline ../../common/ref ./uno -linkoffline http://java.sun.com/j2se/1.4.1/docs/api ./java $(JAVA_PACKAGES)
-
-JAVADOCLOG = $(MISC)$/javadoc_log.txt
-
-.IF "$(SOLAR_JAVA)"!=""
-all: \
- $(CPP_DOCU_INDEX_FILE) \
- $(JAVA_DOCU_INDEX_FILE)
-
-.ELSE
-all: $(CPP_DOCU_INDEX_FILE)
-.ENDIF
-
-
-$(CPP_DOCU_CLEANUP_FLAG) : $(INCLUDELIST) $(PRJ)$/docs$/cpp$/ref$/cpp.css
- @@-$(MY_DELETE_RECURSIVE) $(DESTDIRGENCPPREF)
- $(TOUCH) $@
-
-$(CPP_DOCU_INDEX_FILE) : $(CPP_DOCU_CLEANUP_FLAG)
- -$(MKDIRHIER) $(@:d)
- $(MY_AUTODOC) -html $(DESTDIRGENCPPREF) -name $(CPPDOCREFNAME) $(AUTODOCPARAMS)
- -rm $(@:d:d)$/cpp.css
- $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)$/docs$/cpp$/ref$/cpp.css $(MY_TEXTCOPY_TARGETPRE) $(@:d:d)$/cpp.css
-
-$(JAVA_SRC_FILES) : $(SOLARCOMMONBINDIR)$/$$(@:f)
- -$(MKDIRHIER) $(@:d)
- $(MY_COPY) $< $@
- cd $(JAVA_SRC_DIR) && unzip -quo $(@:f)
-
-#$(JAVA_SRC_DIR)$/com$/sun$/star$/beans$/%.java : $(PRJ)$/source$/bean$/com$/sun$/star$/beans$/%.java
-# -$(MKDIRHIER) $(@:d)
-# $(MY_COPY) $< $@
-
-#$(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES) $(JAVA_BEAN_SRC_FILES)
-.IF "$(SOLAR_JAVA)"!=""
-$(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES)
- -$(MKDIRHIER) $(@:d)
- $(JAVADOC) -J-Xmx120m $(JAVADOCPARAMS) > $(JAVADOCLOG)
-.ENDIF
-
-.ELSE
-pseudo:
-.ENDIF
diff --git a/odk/pack/gendocu/uno/package-list b/odk/pack/gendocu/uno/package-list
deleted file mode 100644
index 0e6766d9..00000000
--- a/odk/pack/gendocu/uno/package-list
+++ /dev/null
@@ -1,53 +0,0 @@
-com.sun.star.apitest
-com.sun.star.awt
-com.sun.star.beans
-com.sun.star.bridge
-com.sun.star.chart
-com.sun.star.configuration
-com.sun.star.connection
-com.sun.star.container
-com.sun.star.corba
-com.sun.star.datatransfer
-com.sun.star.document
-com.sun.star.drawing
-com.sun.star.form
-com.sun.star.formula
-com.sun.star.frame
-com.sun.star.i18n
-com.sun.star.installation
-com.sun.star.io
-com.sun.star.java
-com.sun.star.lang
-com.sun.star.linguistic2
-com.sun.star.loader
-com.sun.star.mozilla
-com.sun.star.plugin
-com.sun.star.presentation
-com.sun.star.qadev
-com.sun.star.reflection
-com.sun.star.registry
-com.sun.star.resource
-com.sun.star.scanner
-com.sun.star.script
-com.sun.star.sdb
-com.sun.star.sdbc
-com.sun.star.sdbcx
-com.sun.star.security
-com.sun.star.setup
-com.sun.star.sheet
-com.sun.star.stoc
-com.sun.star.style
-com.sun.star.svg
-com.sun.star.sync
-com.sun.star.sync2
-com.sun.star.system
-com.sun.star.table
-com.sun.star.task
-com.sun.star.test
-com.sun.star.text
-com.sun.star.ucb
-com.sun.star.ui
-com.sun.star.uno
-com.sun.star.util
-com.sun.star.view
-com.sun.star.xml
diff --git a/odk/pack/unzip_udk/deltree.txt b/odk/pack/unzip_udk/deltree.txt
deleted file mode 100644
index e69de29b..00000000
--- a/odk/pack/unzip_udk/deltree.txt
+++ /dev/null
diff --git a/odk/pack/unzip_udk/makefile.mk b/odk/pack/unzip_udk/makefile.mk
deleted file mode 100644
index 1a06dd2b..00000000
--- a/odk/pack/unzip_udk/makefile.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=unzip_udk
-
-#----------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-#----------------------------------------------------------------
-
-all: ..$/misc$/deltree.txt
-
-..$/misc$/deltree.txt .SETDIR=$(OUT)$/bin : $(PRJ)$/pack$/unzip_udk$/deltree.txt
- @@-$(MY_DELETE_RECURSIVE) $(PRODUCT_NAME)
- @@-rm -f $(PRODUCT_NAME).zip
- @@-$(MY_DELETE_RECURSIVE) $(PRODUCT_NAME2)
- @@-rm -f odkidl.zip
- @@-rm -f odk_ooidl.zip
- @echo "" > ..$/misc$/deltree.txt
-
diff --git a/odk/prj/build.lst b/odk/prj/build.lst
deleted file mode 100644
index 78ea3149..00000000
--- a/odk/prj/build.lst
+++ /dev/null
@@ -1,15 +0,0 @@
-od odk :: cppuhelper jurt javaunohelper udkapi ridljar offapi autodoc DESKTOP:unodevtools external NULL
-od odk usr1 - all od_mkout NULL
-od odk\inc nmake - all od_inc NULL
-od odk\source\com\sun\star\lib\loader nmake - all od_loader od_inc NULL
-od odk\source\unoapploader\win nmake - n od_unoapploaderwin od_inc NULL
-od odk\source\unoapploader\unx nmake - u od_unoapploaderunx od_inc NULL
-od odk\source\unowinreg\win nmake - all od_unowinreg od_inc NULL
-od odk\pack\unzip_udk nmake - all od_unzip_udk NULL
-od odk\pack\copying nmake - all od_copying od_unzip_udk od_loader od_unoapploaderwin.n od_unoapploaderunx.u od_unowinreg NULL
-od odk\pack\checkinc nmake - all od_checkinc od_copying NULL
-od odk\pack\checkinc2 nmake - all od_checkinc2 od_copying NULL
-od odk\pack\checkidl nmake - all od_checkidl od_copying NULL
-od odk\pack\gendocu nmake - all od_gendocu od_copying NULL
-od odk\pack\checkbin nmake - all od_checkbin od_copying od_gendocu NULL
-od odk\util nmake - all od_util od_checkbin od_checkinc od_checkinc2 od_checkidl NULL
diff --git a/odk/prj/d.lst b/odk/prj/d.lst
deleted file mode 100644
index a9337ad2..00000000
--- a/odk/prj/d.lst
+++ /dev/null
@@ -1,5 +0,0 @@
-..\%__SRC%\bin\odkcommon.zip %_DEST%\bin\odkcommon.zip
-
-..\%__SRC%\bin\uno_loader_classes.zip %_DEST%\bin\uno_loader_classes.zip
-
-..\%__SRC%\bin\odkexamples.zip %COMMON_DEST%\bin\odkexamples.zip
diff --git a/odk/setsdkenv_unix b/odk/setsdkenv_unix
deleted file mode 100644
index 6b0dd7c1..00000000
--- a/odk/setsdkenv_unix
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /bin/sh
-
-OSTYPE=`uname -s`
-HOSTNAME=`hostname`
-CURRENTDIR=`/bin/pwd`
-SDKTMPDIR=`dirname $0`
-OO_SDK_HOME=`(cd $SDKTMPDIR && pwd && cd $CURRENTDIR) | head -n 1`
-OOVERSION=`cat $OO_SDK_HOME/settings/dk.mk | tail -2 | head -n 1 | cut -d"=" -f2 | cut -d"." -f1,2`
-if [ "$OSTYPE" = "Darwin" ]
-then
- OO_SDK_NAME=`basename $OO_SDK_HOME`
-else
- OO_SDK_NAME=libreoffice${OOVERSION}_sdk
-fi
-
-export OO_SDK_HOME
-
-if [ "$1" = "--force-configure" ]
-then
- if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh ]
- then
- rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
- fi
- if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.csh ]
- then
- rm $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.csh
- fi
- shift
-elif [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ -n "$1" ]
-then
- echo
- echo " using: setsdkenv_unix [options]"
- echo ""
- echo " options:"
- echo " --force-configure : force a new configuration of your SDK environment."
- echo " Alternatively can you edit your SDK environment scripts directly:"
- echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.sh"
- echo " $HOME/$OO_SDK_NAME/setsdkenv_unix.csh"
- echo " -h, --help : print this help and exit"
- echo
- exit 1
-fi
-
-# source the prepared environment and start a new shell
-if [ -r $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh ]
-then
- . $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
-else
- echo
- echo " ************************************************************************"
- echo " *"
- echo " * You have to configure your SDK environment first before you can"
- echo " * can use it! The configuration has to be done only once."
- echo " *"
- echo " ************************************************************************"
- echo
-
- perl $OO_SDK_HOME/configure.pl $HOSTNAME $OO_SDK_HOME $OO_SDK_NAME
-
- . $HOME/$OO_SDK_NAME/$HOSTNAME/setsdkenv_unix.sh
-fi
-
-"$SHELL" "$@"
-echo Shell terminated.
-
-TERMHEAD=$HOSTNAME
-echo "]2;$TERMHEAD"
diff --git a/odk/setsdkenv_unix.csh.in b/odk/setsdkenv_unix.csh.in
deleted file mode 100644
index f48be7b6..00000000
--- a/odk/setsdkenv_unix.csh.in
+++ /dev/null
@@ -1,293 +0,0 @@
-#! /bin/csh
-
-# This script sets all enviroment variables, which are necessary for building
-# the examples of the Office Development Kit.
-# The Script was developed for the operating systems Solaris, Linux and MacOS.
-
-# The SDK name
-setenv OO_SDK_NAME @OO_SDK_NAME@
-
-# Installation directory of the Software Development Kit.
-# Example: setenv OO_SDK_HOME /opt/libreoffice/basis3.4/sdk
-setenv OO_SDK_HOME '@OO_SDK_HOME@'
-
-# Office installation directory.
-# Example: set OFFICE_HOME=/opt/libreoffice
-setenv OFFICE_HOME '@OFFICE_HOME@'
-
-# URE installation directory.
-# Example: setenv OO_SDK_URE_HOME /opt/libreoffice/ure
-setenv OO_SDK_URE_HOME '@OO_SDK_URE_HOME@'
-
-# Directory of the make command.
-# Example: setenv OO_SDK_MAKE_HOME /usr/bin
-setenv OO_SDK_MAKE_HOME @OO_SDK_MAKE_HOME@
-
-# Directory of the zip command.
-# Example: setenv OO_SDK_ZIP_HOME /usr/bin
-setenv OO_SDK_ZIP_HOME @OO_SDK_ZIP_HOME@
-
-# Directory of the C++ compiler.
-# Example: setenv OO_SDK_CPP_HOME /usr/bin
-setenv OO_SDK_CPP_HOME @OO_SDK_CPP_HOME@
-
-# Solaris only
-setenv OO_SDK_CC_55_OR_HIGHER @OO_SDK_CC_55_OR_HIGHER@
-
-# Directory of the Java SDK.
-# Example: setenv OO_SDK_JAVA_HOME "/usr/jdk/jdk1.6.0_10"
-setenv OO_SDK_JAVA_HOME @OO_SDK_JAVA_HOME@
-
-# Special output directory
-# Example: setenv OO_SDK_OUTPUT_DIR "$HOME"
-setenv OO_SDK_OUTPUT_DIR @OO_SDK_OUTPUT_DIR@
-
-# Environment variable to enable auto deployment of example components
-# Example: set SDK_AUTO_DEPLOYMENT=YES
-setenv SDK_AUTO_DEPLOYMENT @SDK_AUTO_DEPLOYMENT@
-
-# Get the operating system.
-set sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`
-
-# Set the directory name.
-set programdir=program
-set javadir=bin
-switch (${sdk_platform})
- case "darwin*":
- set programdir="Contents/MacOS"
- set javacdir=Commands
- breaksw
-endsw
-
-
-# Set office program path.
-if ( "${OFFICE_HOME}" != "" ) then
- setenv OFFICE_PROGRAM_PATH "${OFFICE_HOME}/${programdir}"
-endif
-
-# Set office base program path.
-if ( "${OFFICE_BASE_HOME}" != "" ) then
- setenv OFFICE_BASE_PROGRAM_PATH "${OFFICE_BASE_HOME}/program"
-endif
-
-
-# Set UNO path, necessary to ensure that the cpp examples using the
-# new UNO bootstrap mechanism use the configured office installation.
-if ( ${?OFFICE_PROGRAM_PATH} ) then
- setenv UNO_PATH "${OFFICE_PROGRAM_PATH}"
-endif
-
-if ( "${OO_SDK_URE_HOME}" != "" ) then
- setenv OO_SDK_URE_BIN_DIR "${OO_SDK_URE_HOME}/bin"
- setenv OO_SDK_URE_LIB_DIR "${OO_SDK_URE_HOME}/lib"
- setenv OO_SDK_URE_JAVA_DIR "${OO_SDK_URE_HOME}/share/java"
-else
- setenv OO_SDK_URE_BIN_DIR "${OFFICE_PROGRAM_PATH}"
- setenv OO_SDK_URE_LIB_DIR "${OFFICE_BASE_PROGRAM_PATH}"
- setenv OO_SDK_URE_JAVA_DIR "${OFFICE_BASE_PROGRAM_PATH}/classes"
-endif
-
-# Set SDK example output directory
-setenv OO_SDK_OUT ${OO_SDK_HOME}
-if ( $?OO_SDK_OUTPUT_DIR ) then
- setenv OO_SDK_OUT ${OO_SDK_OUTPUT_DIR}/${OO_SDK_NAME}
-endif
-
-# check platform and set appropriate variables
-switch (`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`)
- case "solaris*":
- if ( `${OO_SDK_HOME}/config.guess | cut -d"-" -f1` == "sparc" ) then
- set directoryname=solsparc
- set platform=Solaris Sparc
- else
- set directoryname=solintel
- set platform=Solaris Intel
- endif
- set comid=C52
- set pltfrm=sunpro
- set soext=so
- set exampleout=SOLARISexample.out
-
- # set LD_LIBRARY_PATH
- if ( $?LD_LIBARY_PATH == 0) then
- setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.
- else
- setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH}
- endif
- breaksw
-
- case "linux-gnu":
- if ( $?OO_SDK_CPP_HOME == 0) then
- set sdk_gxx_include_path=`echo "#include <cstring>" | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path}
- endif
-
- set directoryname=linux
- set comid=gcc3
- set pltfrm=gcc
- set soext=so
- set exampleout=LINUXexample.out
- set platform=Linux
-
- # set LD_LIBRARY_PATH
- if ( $?LD_LIBARY_PATH == 0) then
- setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.
- else
- setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH}
- endif
- breaksw
-
- case "darwin*":
- if ( $?OO_SDK_CPP_HOME == 0) then
- set sdk_gxx_include_path=`echo "#include <cstring>" | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path}
- endif
-
- set directoryname=macosx
- set comid=gcc3
- set pltfrm=gcc
- set soext=dylib
- set exampleout=MACOSXexample.out
- set platform=MacOSX
-
- # set DYLD_LIBRARY_PATH
- if ( $?DYLD_LIBRARY_PATH == 0) then
- setenv DYLD_LIBRARY_PATH ${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.
- else
- setenv DYLD_LIBRARY_PATH ${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${DYLD_LIBRARY_PATH}
- endif
- breaksw
-
- case "freebsd*":
- if ( $?OO_SDK_CPP_HOME == 0) then
- set sdk_gxx_include_path=`echo "#include <cstring>" | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path}
- endif
-
- set directoryname=freebsd
- set comid=gcc3
- set pltfrm=gcc
- set soext=so
- set exampleout=FREEBSDexample.out
- set platform=FreeBSD
-
- # set LD_LIBRARY_PATH
- if ( $?LD_LIBARY_PATH == 0) then
- setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.
- else
- setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH}
- endif
-
- if ( -e "/sbin/sysctl" ) then
- set OSVERSION=`/sbin/sysctl -n kern.osreldate`
- else
- set OSVERSION=`/usr/sbin/sysctl -n kern.osreldate`
- endif
-
- if ( ${OSVERSION} < 500016 ) then
- setenv PTHREAD_CFLAGS -D_THREAD_SAFE
- setenv PTHREAD_LIBS -pthread
- else if ( ${OSVERSION} < 502102 ) then
- setenv PTHREAD_CFLAGS -D_THREAD_SAFE
- setenv PTHREAD_LIBS -lc_r
- else
- setenv PTHREAD_LIBS -pthread
- endif
- breaksw
-endsw
-
-# set PATH
-if ( $?PATH == 0) then
- setenv PATH ${OO_SDK_ZIP_HOME}:${OO_SDK_MAKE_HOME}:${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}:${OO_SDK_URE_BIN_DIR}:.
-else
- setenv PATH ${OO_SDK_ZIP_HOME}:${OO_SDK_MAKE_HOME}:${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}:${OO_SDK_URE_BIN_DIR}:.:${PATH}
-endif
-
-# Set CLASSPATH
-if ( ${?OFFICE_PROGRAM_PATH} ) then
- if ( ${?CLASSPATH} == 0 ) then
- setenv CLASSPATH "${OFFICE_PROGRAM_PATH}/classes/unoil.jar"
- else
- setenv CLASSPATH "${OFFICE_PROGRAM_PATH}/classes/unoil.jar:${CLASSPATH}"
- endif
-endif
-if ( $?CLASSPATH == 0) then
- setenv CLASSPATH "${OO_SDK_URE_JAVA_DIR}/juh.jar:${OO_SDK_URE_JAVA_DIR}/jurt.jar:${OO_SDK_URE_JAVA_DIR}/ridl.jar:${OO_SDK_URE_JAVA_DIR}/unoloader.jar"
-else
- setenv CLASSPATH "${OO_SDK_URE_JAVA_DIR}/juh.jar:${OO_SDK_URE_JAVA_DIR}/jurt.jar:${OO_SDK_URE_JAVA_DIR}/ridl.jar:${OO_SDK_URE_JAVA_DIR}/unoloader.jar:${CLASSPATH}"
-endif
-
-if ( $?OO_SDK_CPP_HOME == 0) then
- setenv PATH ${OO_SDK_CPP_HOME}:${PATH}
-endif
-
-if ( $?OO_SDK_JAVA_HOME == 0) then
- setenv PATH ${OO_SDK_JAVA_HOME}:${PATH}
-endif
-
-
-if ( "${platform}" == "MacOSX" ) then
-# For URE, prepare symbolic links for libraries:
-# Only necessary on MacOSX, on other Unix systems the links are already prepared
-# in the SDK installation.
-
-# cleanup potential old links first
- rm -f "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.so" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}"
-
- if ( "${OO_SDK_URE_HOME}" != "" ) then
- mkdir -p "${OO_SDK_OUT}/${directoryname}/lib"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_purpenvhelper${comid}.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}"
- endif
-endif
-
-
-echo
-echo " ************************************************************************"
-echo " *"
-echo " * SDK environment is prepared for ${platform}"
-echo " *"
-echo " * SDK = ${OO_SDK_HOME}"
-echo " * Office = ${OFFICE_HOME}"
-echo " * Office Base = ${OFFICE_BASE_HOME}"
-echo " * URE = ${OO_SDK_URE_HOME}"
-echo " * Make = ${OO_SDK_MAKE_HOME}"
-echo " * Zip = ${OO_SDK_ZIP_HOME}"
-if ( $?OO_SDK_CPP_HOME == 0) then
-echo " * C++ Compiler = "
-else
-echo " * C++ Compiler = ${OO_SDK_CPP_HOME}"
-endif
-if ( $?OO_SDK_JAVA_HOME == 0) then
-echo " * Java = "
-else
-echo " * Java = ${OO_SDK_JAVA_HOME}"
-endif
-if ( $?OO_SDK_OUTPUT_DIR == 0) then
-echo " * Special Output directory = "
-else
-echo " * SDK Output directory = ${OO_SDK_OUT}"
-endif
-echo " * Auto deployment = ${SDK_AUTO_DEPLOYMENT}"
-echo " *"
-echo " ************************************************************************"
-
-unset sdkdir
-unset directoryname
-unset comid
-unset exampleout
-unset platform
-
-echo "]2;Shell prepared with the SDK environment"
diff --git a/odk/setsdkenv_unix.sh.in b/odk/setsdkenv_unix.sh.in
deleted file mode 100644
index 91bf164b..00000000
--- a/odk/setsdkenv_unix.sh.in
+++ /dev/null
@@ -1,322 +0,0 @@
-#! /bin/sh
-
-# This script starts a new shell and sets all enviroment variables, which
-# are necessary for building the examples of the Office Development Kit.
-# The Script was developed for the operating systems Solaris, Linux and MacOS.
-
-# The SDK name
-OO_SDK_NAME=@OO_SDK_NAME@
-export OO_SDK_NAME
-
-# Installation directory of the Software Development Kit.
-# Example: OO_SDK_HOME=/opt/libreoffice/basis3.4/sdk
-OO_SDK_HOME='@OO_SDK_HOME@'
-
-# Office installation directory.
-# Example: OFFICE_HOME=/opt/libreoffice
-OFFICE_HOME='@OFFICE_HOME@'
-OFFICE_BASE_HOME='@OFFICE_BASE_HOME@'
-
-# URE installation directory.
-# Example: OO_SDK_URE_HOME=/opt/libreoffice/ure
-OO_SDK_URE_HOME='@OO_SDK_URE_HOME@'
-export OO_SDK_URE_HOME
-
-# Directory of the make command.
-# Example: OO_SDK_MAKE_HOME=/usr/bin
-OO_SDK_MAKE_HOME=@OO_SDK_MAKE_HOME@
-
-# Directory of the zip command.
-# Example: OO_SDK_ZIP_HOME=/usr/bin
-OO_SDK_ZIP_HOME=@OO_SDK_ZIP_HOME@
-
-# Directory of the C++ compiler.
-# Example: OO_SDK_CPP_HOME=/usr/bin
-OO_SDK_CPP_HOME=@OO_SDK_CPP_HOME@
-
-# Solaris only
-OO_SDK_CC_55_OR_HIGHER=@OO_SDK_CC_55_OR_HIGHER@
-
-# Directory of the Java SDK.
-# Example: OO_SDK_JAVA_HOME=/usr/jdk/jdk1.6.0_10
-OO_SDK_JAVA_HOME=@OO_SDK_JAVA_HOME@
-
-# Special output directory
-# Example: OO_SDK_OUTPUT_DIR=$HOME
-OO_SDK_OUTPUT_DIR=@OO_SDK_OUTPUT_DIR@
-
-# Environment variable to enable auto deployment of example components
-# Example: SDK_AUTO_DEPLOYMENT=YES
-SDK_AUTO_DEPLOYMENT=@SDK_AUTO_DEPLOYMENT@
-export SDK_AUTO_DEPLOYMENT
-
-# Check installation path for the OpenOffice Development Kit.
-if [ -z "${OO_SDK_HOME}" ]
-then
- echo Error: Please insert a correct value for the variable OO_SDK_HOME.
- exit 0
-fi
-
-export OO_SDK_HOME
-
-# Check installation path for the office.
-if [ -z "${OFFICE_HOME}" ] && [ -z "${OO_SDK_URE_HOME}" ]
-then
- echo 'Error: Please set either the environment variable OFFICE_HOME or the'
- echo 'environment variable OO_SDK_URE_HOME.'
- exit 0
-fi
-
-# Get the operating system.
-sdk_platform=`${OO_SDK_HOME}/config.guess | cut -d"-" -f3,4`
-
-# Set the directory name.
-programdir=program
-javadir=bin
-case ${sdk_platform} in
- darwin*)
- programdir="Contents/MacOS"
- javacdir=Commands
- ;;
-esac
-
-# Set office program path (only set when using an Office).
-if [ "${OFFICE_HOME}" ]
-then
- OFFICE_PROGRAM_PATH=${OFFICE_HOME}/${programdir}
- export OFFICE_PROGRAM_PATH
-fi
-
-# Set office program path (only set when using an Office).
-if [ "${OFFICE_BASE_HOME}" ]
-then
- OFFICE_BASE_PROGRAM_PATH=${OFFICE_BASE_HOME}/program
- export OFFICE_BASE_PROGRAM_PATH
-fi
-
-
-# Set UNO path, necessary to ensure that the cpp examples using the
-# new UNO bootstrap mechanism use the configured office installation (only set
-# when using an Office).
-if [ "${OFFICE_HOME}" ]
-then
- UNO_PATH=${OFFICE_PROGRAM_PATH}
- export UNO_PATH
-fi
-
-if [ "${OO_SDK_URE_HOME}" ]
-then
- OO_SDK_URE_BIN_DIR=${OO_SDK_URE_HOME}/bin
- OO_SDK_URE_LIB_DIR=${OO_SDK_URE_HOME}/lib
- OO_SDK_URE_JAVA_DIR=${OO_SDK_URE_HOME}/share/java
-else
- OO_SDK_URE_BIN_DIR=${OFFICE_PROGRAM_PATH}
- OO_SDK_URE_LIB_DIR=${OFFICE_BASE_PROGRAM_PATH}
- OO_SDK_URE_JAVA_DIR=${OFFICE_BASE_PROGRAM_PATH}/classes
-fi
-export OO_SDK_URE_BIN_DIR
-export OO_SDK_URE_LIB_DIR
-export OO_SDK_URE_JAVA_DIR
-
-OO_SDK_OUT=$OO_SDK_HOME
-# Prepare appropriate output directory.
-if [ -n "${OO_SDK_OUTPUT_DIR}" ]
-then
- OO_SDK_OUT=${OO_SDK_OUTPUT_DIR}/${OO_SDK_NAME}
- export OO_SDK_OUT
-fi
-
-# Set the directory name.
-case ${sdk_platform} in
- solaris*)
- sdk_proctype=`${OO_SDK_HOME}/config.guess | cut -d"-" -f1`
- if [ "${sdk_proctype}" = "sparc" ]
- then
- directoryname=solsparc
- platform='Solaris Sparc'
- else
- directoryname=solintel
- platform='Solaris x86'
- fi
- comid=C52
- pltfrm=sunpro
- soext=so
- exampleout=SOLARISexample.out
- LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH}
- export LD_LIBRARY_PATH
- ;;
-
- darwin*)
- if [ -n "$OO_SDK_CPP_HOME" ]
- then
- SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- export SDK_GXX_INCLUDE_PATH
- fi
-
- directoryname=macosx
- comid=gcc3
- pltfrm=gcc
- soext=dylib
- exampleout=MACOSXexample.out
- platform=MacOSX
- DYLD_LIBRARY_PATH=${OO_SDK_OUT}/${directoryname}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${DYLD_LIBRARY_PATH}
- export DYLD_LIBRARY_PATH
- ;;
-
- linux-gnu)
- if [ -n "$OO_SDK_CPP_HOME" ]
- then
- SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- export SDK_GXX_INCLUDE_PATH
- fi
-
- directoryname=linux
- comid=gcc3
- pltfrm=gcc
- soext=so
- exampleout=LINUXexample.out
- platform=Linux
- LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH}
- export LD_LIBRARY_PATH
- ;;
-
- freebsd*)
- if [ -n "$OO_SDK_CPP_HOME" ]
- then
- SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- export SDK_GXX_INCLUDE_PATH
- fi
-
- directoryname=freebsd
- comid=gcc3
- pltfrm=gcc
- soext=so
- exampleout=FREEBSDexample.out
- platform=FreeBSD
- LD_LIBRARY_PATH=${OO_SDK_HOME}/lib:${OO_SDK_OUT}/${exampleout}/lib:${OO_SDK_URE_LIB_DIR}:.:${LD_LIBRARY_PATH}
- export LD_LIBRARY_PATH
-
- if [ -e "/sbin/sysctl" ]
- then
- OSVERSION=`/sbin/sysctl -n kern.osreldate`
- else
- OSVERSION=`/usr/sbin/sysctl -n kern.osreldate`
- fi
- if [ $OSVERSION -lt 500016 ]
- then
- PTHREAD_CFLAGS=-D_THREAD_SAFE
- PTHREAD_LIBS=-pthread
- export PTHREAD_CFLAGS
- export PTHREAD_LIBS
- elif [ $OSVERSION -lt 502102 ]
- then
- PTHREAD_CFLAGS=-D_THREAD_SAFE
- PTHREAD_LIBS=-lc_r
- export PTHREAD_CFLAGS
- export PTHREAD_LIBS
- else
- PTHREAD_LIBS=-pthread
- export PTHREAD_LIBS
- fi
- ;;
-esac
-
-# Add directory of the SDK tools to the path.
-PATH=${OO_SDK_HOME}/bin:${OO_SDK_OUT}/${exampleout}/bin:${OO_SDK_URE_BIN_DIR}:${OFFICE_PROGRAM_PATH}:.:${PATH}
-
-# Set the classpath
-CLASSPATH=${OO_SDK_URE_JAVA_DIR}/juh.jar:${OO_SDK_URE_JAVA_DIR}/jurt.jar:${OO_SDK_URE_JAVA_DIR}/ridl.jar:${OO_SDK_URE_JAVA_DIR}/unoloader.jar:${OFFICE_BASE_PROGRAM_PATH}/classes/unoil.jar:${CLASSPATH}
-export CLASSPATH
-
-
-# Add directory of the command make to the path, if necessary.
-if [ -n "${OO_SDK_MAKE_HOME}" ]
-then
- PATH=${OO_SDK_MAKE_HOME}:${PATH}
- export OO_SDK_MAKE_HOME
-fi
-
-# Add directory of the zip tool to the path, if necessary.
-if [ -n "${OO_SDK_ZIP_HOME}" ]
-then
- PATH=${OO_SDK_ZIP_HOME}:${PATH}
- export OO_SDK_ZIP_HOME
-fi
-
-# Add directory of the C++ tools to the path, if necessary.
-if [ -n "${OO_SDK_CPP_HOME}" ]
-then
- PATH=${OO_SDK_CPP_HOME}:${PATH}
- export OO_SDK_CPP_HOME
-
- if [ -n "${OO_SDK_CC_55_OR_HIGHER}" ]
- then
- export OO_SDK_CC_55_OR_HIGHER
- fi
-fi
-
-# Add directory of the Java tools to the path, if necessary.
-if [ -n "${OO_SDK_JAVA_HOME}" ]
-then
- PATH=${OO_SDK_JAVA_HOME}/${javadir}:${PATH}
-# JAVA_HOME=${OO_SDK_JAVA_HOME}
-# export JAVA_HOME
- export OO_SDK_JAVA_HOME
-
- export PATH
-fi
-
-export PATH
-
-if [ "${platform}" = "MacOSX" ]
-then
-# For URE, prepare symbolic links for libraries:
-# Only necessary on MacOSX, on other Unix systems the links are already prepared
-# in the SDK installation.
-
-# cleanup potential old links first
- rm -f "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}"
-
-# prepare links
- if [ "${OO_SDK_URE_HOME}" ]
- then
- mkdir -p "${OO_SDK_OUT}/${directoryname}/lib"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppu.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppu.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_cppuhelper${comid}.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_cppuhelper${comid}.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_sal.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_sal.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_salhelper${comid}.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_salhelper${comid}.${soext}"
- ln -s "${OO_SDK_URE_LIB_DIR}/libuno_purpenvhelper${comid}.${soext}.3" \
- "${OO_SDK_OUT}/${directoryname}/lib/libuno_purpenvhelper${comid}.${soext}"
- fi
-fi
-
-
-# Prepare shell with all necessary environment variables.
-echo
-echo " ************************************************************************"
-echo " *"
-echo " * SDK environment is prepared for ${platform}"
-echo " *"
-echo " * SDK = $OO_SDK_HOME"
-echo " * Office = $OFFICE_HOME"
-echo " * Office Base = $OFFICE_BASE_HOME"
-echo " * URE = $OO_SDK_URE_HOME"
-echo " * Make = $OO_SDK_MAKE_HOME"
-echo " * Zip = $OO_SDK_ZIP_HOME"
-echo " * C++ Compiler = $OO_SDK_CPP_HOME"
-echo " * Java = $OO_SDK_JAVA_HOME"
-echo " * SDK Output directory = $OO_SDK_OUT"
-echo " * Auto deployment = $SDK_AUTO_DEPLOYMENT"
-echo " *"
-echo " ************************************************************************"
-
-echo "]2;Shell prepared with the SDK environment"
-
diff --git a/odk/setsdkenv_windows.bat b/odk/setsdkenv_windows.bat
deleted file mode 100755
index a6b7ea75..00000000
--- a/odk/setsdkenv_windows.bat
+++ /dev/null
@@ -1,64 +0,0 @@
-@echo off
-
-set SDK_DIR_TMP=%~dp0
-set SDK_DIR=%SDK_DIR_TMP:~0,-1%
-
-if "%@RIGHT[5,%SDK_DIR%]" EQU "~0,-1" (
- set SDK_DIR=%@FULL[%0]
- set /A LENGTH=%@LEN[%SDK_DIR%] - 22
- set SDK_DIR=%@LEFT[%LENGTH%,%SDK_DIR%]
- unset LENGTH
-)
-
-set OO_SDK_NAME=__SDKNAME__
-
-set OO_USER_SDK_DIR=%APPDATA%\%OO_SDK_NAME%
-set OO_USER_SDKENV_SCRIPT=%OO_USER_SDK_DIR%\setsdkenv_windows.bat
-
-if "%1" EQU "--force-configure" (
- if exist "%OO_USER_ENV_SCRIPT%". (
- del "%OO_USER_SDKENV_SCRIPT%"
- )
- goto start
-)
-
-if "%1" EQU "-h" goto printhelp
-if "%1" EQU "--help" goto printhelp
-if "%1" NEQ "" goto printhelp
-
-:start
-cls
-
-if not exist "%OO_USER_SDKENV_SCRIPT%". (
- echo.
- echo ******************************************************************
- echo *
- echo * You have to configure your SDK environment first before you can
- echo * can use it! The configuration has to be done only once.
- echo *
- echo ******************************************************************
- echo.
-
- cscript //I //Nologo "%SDK_DIR%\cfgWin.js"
- goto setenv
-)
-
-goto setenv
-
-:printhelp
-echo.
-echo using: setsdkenv_windows.bat [options]
-echo.
-echo options:
-echo --force-configure : force a new configuration of your SDK environment.
-echo Alternatively can you edit your SDK environment script directly:
-echo "%OO_USER_SDKENV_SCRIPT%"
-echo -h, --help : print this help and exit
-echo.
-goto end
-
-
-:setenv
-call "%OO_USER_SDKENV_SCRIPT%"
-
-:end \ No newline at end of file
diff --git a/odk/setsdkenv_windows.template b/odk/setsdkenv_windows.template
deleted file mode 100755
index fbe09f91..00000000
--- a/odk/setsdkenv_windows.template
+++ /dev/null
@@ -1,177 +0,0 @@
-@echo off
-REM This script sets all enviroment variables, which
-REM are necessary for building the examples of the Office Development Kit.
-REM The Script was developed for the operating systems Windows.
-REM The SDK name
-REM Example: set OO_SDK_NAME=libreoffice3.4_sdk
-set OO_SDK_NAME=libreoffice3.4_sdk
-
-REM Installation directory of the Software Development Kit.
-REM Example: set OO_SDK_HOME=C:\Program Files\LibreOffice 3\Basis\sdk
-set OO_SDK_HOME=
-
-REM Office installation directory.
-REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3
-set OFFICE_HOME=
-
-REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3\Basis
-set OFFICE_BASE_HOME=
-
-REM URE installation directory.
-REM Example: set OO_SDK_URE_HOME=C:\Program Files\LibreOffice 3\URE
-set OO_SDK_URE_HOME=
-
-REM Directory of the make command.
-REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make
-set OO_SDK_MAKE_HOME=
-
-REM Directory of the zip tool.
-REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin
-set OO_SDK_ZIP_HOME=
-
-REM Directory of the C++ compiler.
-REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
-REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\
-set OO_SDK_CPP_HOME=
-set CPP_VC8=
-set CPP_WINDOWS_SDK=
-
-REM Directory of the C# and VB.NET compilers.
-REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705
-set OO_SDK_CLI_HOME=
-
-REM Java SDK installation directory.
-REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
-set OO_SDK_JAVA_HOME=
-
-REM Special output directory
-REM Example: set OO_SDK_OUT=C:\Program Files\Libreoffice 3\Basis\sdk
-set OO_SDK_OUT=
-
-REM Automatic deployment
-REM Example: set SDK_AUTO_DEPLOYMENT=YES
-set SDK_AUTO_DEPLOYMENT=YES
-
-REM Check installation path for the StarOffice Development Kit.
-if not defined OO_SDK_HOME (
- echo Error: the variable OO_SDK_HOME is missing!
- goto :error
- )
-
-REM Check installation path for the office.
-REM if not defined OFFICE_HOME (
-REM if not defined OO_SDK_URE_HOME (
-REM echo Error: either of the variables OFFICE_HOME and
-REM echo OO_SDK_URE_HOME is missing!
-REM goto :error
-REM )
-REM )
-
-REM Check installation path for GNU make.
-if not defined OO_SDK_MAKE_HOME (
- echo Error: the variable OO_SDK_MAKE_HOME is missing!
- goto :error
- )
-
-REM Check installation path for the zip tool.
-if not defined OO_SDK_ZIP_HOME (
- echo Error: the variable OO_SDK_ZIP_HOME is missing!
- goto :error
- )
-
-REM Set library path.
-set LIB=%OO_SDK_HOME%\lib;%LIB%
-if defined CPP_WINDOWS_SDK (
- set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
- )
-
-REM Set office program path.
-if defined OFFICE_HOME (
- set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
- )
-
-REM Set office program path.
-if defined OFFICE_BASE_HOME (
- set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\program
- )
-
-REM Set UNO path, necessary to ensure that the cpp examples using the
-REM new UNO bootstrap mechanism use the configured office installation
-REM (only set when using an Office).
-if defined OFFICE_HOME (
- set UNO_PATH=%OFFICE_PROGRAM_PATH%
- )
-
-REM if defined OO_SDK_URE_HOME (
-set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin
-set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin
-set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java
-REM ) else (
-set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
-set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%
-set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\classes
-REM )
-
-REM Set classpath
-set CLASSPATH=%OO_SDK_URE_JAVA_DIR%\juh.jar;%OO_SDK_URE_JAVA_DIR%\jurt.jar;%OO_SDK_URE_JAVA_DIR%\ridl.jar;%OO_SDK_URE_JAVA_DIR%\unoloader.jar;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
-REM if defined OFFICE_HOME (
-REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
-REM )
-
-REM Add directory of the SDK tools to the path.
-set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH%
-
-REM Set PATH appropriate to the output directory
-if defined OO_SDK_OUT (
- set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%
- ) else (
- set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
- )
-
-REM Add directory of the command make to the path, if necessary.
-if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%
-
-REM Add directory of the zip tool to the path, if necessary.
-if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%
-
-REM Add directory of the C++ compiler to the path, if necessary.
-if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%
-
-REM Add directory of the C# and VB.NET compilers to the path, if necessary.
-if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%
-
-REM Add directory of the Java tools to the path, if necessary.
-if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%
-
-REM Set environment for C++ compiler tools, if necessary.
-if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
-
-REM Set tilte to identify the prepared shell.
-title Shell prepared for SDK
-
-REM Prepare shell with all necessary environment variables.
-echo.
-echo ******************************************************************
-echo *
-echo * SDK environment is prepared for Windows
-echo *
-echo * SDK = %OO_SDK_HOME%
-echo * Office = %OFFICE_HOME%
-echo * Office Base = %OFFICE_BASE_HOME%
-echo * URE = %OO_SDK_URE_HOME%
-echo * Make = %OO_SDK_MAKE_HOME%
-echo * Zip = %OO_SDK_ZIP_HOME%
-echo * C++ Compiler = %OO_SDK_CPP_HOME%
-echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
-echo * Java = %OO_SDK_JAVA_HOME%
-echo * Special Output directory = %OO_SDK_OUT%
-echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
-echo *
-echo ******************************************************************
-echo.
-goto end
-
- :error
-Error: Please insert the necessary environment variables into the batch file.
-
- :end
diff --git a/odk/setsdkname.bat b/odk/setsdkname.bat
deleted file mode 100755
index 24047081..00000000
--- a/odk/setsdkname.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-
-set OO_SDK_NAME=%~n1
diff --git a/odk/settings/component.uno.def b/odk/settings/component.uno.def
deleted file mode 100644
index 0c35f9aa..00000000
--- a/odk/settings/component.uno.def
+++ /dev/null
@@ -1,2 +0,0 @@
-EXPORTS
-component_getFactory
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
deleted file mode 100644
index e4fc05ad..00000000
--- a/odk/settings/settings.mk
+++ /dev/null
@@ -1,605 +0,0 @@
-# Global settings file for the minimal build environment of the SDK
-# This file have to updated/extended for other platforms.
-
-# test for the platform
-PLATFORM := $(shell $(PRJ)/config.guess | cut -d"-" -f3,4)
-
-# config.guess is missing for windows. We rely on getting "" in this case.
-ifeq "$(PLATFORM)" ""
-PLATFORM = windows
-endif
-
-# debug option, default is no debug
-DEBUG=no
-ifeq "$(MAKECMDGOALS)" "debug"
-DEBUG=yes
-endif
-
-###########################################################################
-#
-# Java settings
-#
-###########################################################################
-JAVAC_FLAGS=
-
-ifeq "$(DEBUG)" "yes"
-JAVAC_FLAGS+=-g
-endif
-
-JAVABIN=bin
-
-###########################################################################
-#
-# Windows specific settings
-#
-###########################################################################
-ifeq "$(PLATFORM)" "windows"
-# Settings for Windows using Microsoft compiler/linker
-
-OS=WIN
-PS=\\
-ICL=$$
-CC=cl
-LINK=link
-BUILDLIB=lib
-ECHO=@echo
-MKDIR=mkdir
-MV=move
-CAT=type
-OBJ_EXT=obj
-EXE_EXT=.exe
-COPY=copy
-SHAREDLIB_EXT=dll
-SHAREDLIB_OUT=$(OUT_BIN)
-PACKAGE_LIB_DIR=windows.plt
-UNOPKG_PLATFORM=Windows
-
-OSEP=^<
-CSEP=^>
-QUOTE=
-QM=
-SQM=
-ECHOLINE=@echo.
-P2BG=
-
-DEL=del
-DELRECURSIVE=rd /S /Q
-URLPREFIX=file:///
-
-SALLIB=isal.lib
-CPPULIB=icppu.lib
-CPPUHELPERLIB=icppuhelper.lib
-SALHELPERLIB=isalhelper.lib
-REGLIB=ireg.lib
-STORELIB=istore.lib
-
-BLANK=
-EMPTYSTRING=
-PATH_SEPARATOR=;
-
-# use this for release version
-CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
-CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
-ifeq "$(CPP_MANIFEST)" "true"
-LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
-else
-LINK_MANIFEST=
-endif
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS_JNI+=-Zi
-CC_FLAGS+=-Zi
-endif
-
-CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
-SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32"
-
-# define for used compiler necessary for UNO
-# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
-
-CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
-CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
-CC_OUTPUT_SWITCH=-Fo
-
-LIBRARY_LINK_FLAGS=/MD /DLL /DEBUGTYPE:cv
-COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def
-EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /MD msvcrt.lib kernel32.lib
-ifeq "$(DEBUG)" "yes"
-LIBRARY_LINK_FLAGS+=/DEBUG
-EXE_LINK_FLAGS+=/DEBUG
-endif
-
-LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib"
-
-ifneq "$(OO_SDK_URE_HOME)" ""
-URE_MISC=$(OO_SDK_URE_HOME)\misc
-endif
-
-# use this for release version
-#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000
-#LIBRARY_LINK_FLAGS=/MD /DLL
-endif
-
-
-
-###########################################################################
-#
-# Solaris specific settings
-#
-###########################################################################
-ifneq (,$(findstring solaris,$(PLATFORM)))
-# Settings for Solaris using Sun Workshop compiler
-
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)$(shell /usr/ccs/bin/elfdump -e "$(OO_SDK_URE_HOME)/lib/libuno_sal.so.3" | /usr/xpg4/bin/grep -q -w ELFCLASS64 && echo 64)
-
-ifeq "$(PROCTYPE)" "sparc"
-PLATFORM=solsparc
-PACKAGE_LIB_DIR=solaris_sparc.plt
-UNOPKG_PLATFORM=Solaris_SPARC
-JAVA_PROC_TYPE=sparc
-else
-ifeq "$(PROCTYPE)" "sparc64"
-PLATFORM=solsparc
-PACKAGE_LIB_DIR=solaris_sparc64.plt
-UNOPKG_PLATFORM=Solaris_SPARC64
-JAVA_PROC_TYPE=sparcv9
-else
-PLATFORM=solintel
-PACKAGE_LIB_DIR=solaris_x86.plt
-UNOPKG_PLATFORM=Solaris_x86
-JAVA_PROC_TYPE=i386
-endif
-endif
-
-OS=SOLARIS
-PS=/
-ICL=\$$
-CC=CC
-LINK=CC
-LIB=CC
-ECHO=@echo
-MKDIR=mkdir -p
-CAT=cat
-OBJ_EXT=o
-SHAREDLIB_EXT=so
-SHAREDLIB_PRE=lib
-SHAREDLIB_OUT=$(OUT_LIB)
-
-OSEP=\<
-CSEP=\>
-QUOTE=$(subst S,\,S)
-QM=\"
-SQM='
-ECHOLINE=@echo
-P2BG=&
-
-DEL=rm -f
-DELRECURSIVE=rm -rf
-COPY=cp
-URLPREFIX=file://
-
-# Include UDK version numbers
-include $(PRJ)/include/udkversion.mk
-
-SALLIB=-luno_sal
-CPPULIB=-luno_cppu
-CPPUHELPERLIB=-luno_cppuhelperC52
-SALHELPERLIB=-luno_salhelperC52
-REGLIB=-lreg
-STORELIB=-lstore
-
-EMPTYSTRING=
-PATH_SEPARATOR=:
-
-CC_FLAGS_JNI=-c -KPIC
-CC_FLAGS=-c -KPIC -xldscope=hidden
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS_JNI+=-g
-CC_FLAGS+=-g
-endif
-CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
-SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
-
-# define for used compiler necessary for UNO
-# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel
-
-CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5
-CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE
-CC_OUTPUT_SWITCH=-o
-
-LIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
-# means if used CC is lower then version 5.5 use option -instance=static
-ifeq ($(OO_SDK_CC_55_OR_HIGHER),)
-LIBRARY_LINK_FLAGS+=-instances=static
-endif
-#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -M $(PRJ)/settings/component.uno.map
-COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
-
-EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs
-LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
-LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
-
-ifeq "$(PROCTYPE)" "sparc64"
-CC_FLAGS+=-m64
-LIBRARY_LINK_FLAGS+=-m64
-EXE_LINK_FLAGS+=-m64
-endif
-
-ifneq "$(OO_SDK_URE_HOME)" ""
-URE_MISC=$(OO_SDK_URE_HOME)/share/misc
-endif
-
-endif
-
-
-
-###########################################################################
-#
-# Linux specific settings
-#
-###########################################################################
-ifneq (,$(findstring linux,$(PLATFORM)))
-# Settings for Linux using gcc compiler
-
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/')
-PLATFORM=linux
-
-PACKAGE_LIB_DIR=linux_$(PROCTYPE).plt
-UNOPKG_PLATFORM=Linux_$(PROCTYPE)
-JAVA_PROC_TYPE=$(PROCTYPE)
-
-ifeq "$(PROCTYPE)" "i386"
-PACKAGE_LIB_DIR=linux_x86.plt
-UNOPKG_PLATFORM=Linux_x86
-JAVA_PROC_TYPE=i386
-endif
-
-ifeq "$(PROCTYPE)" "powerpc"
-PACKAGE_LIB_DIR=linux_powerpc.plt
-UNOPKG_PLATFORM=Linux_PowerPC
-JAVA_PROC_TYPE=ppc
-endif
-
-ifeq "$(PROCTYPE)" "sparc"
-PACKAGE_LIB_DIR=linux_sparc.plt
-UNOPKG_PLATFORM=Linux_SPARC
-JAVA_PROC_TYPE=sparc
-endif
-
-ifeq "$(PROCTYPE)" "x86_64"
-JAVA_PROC_TYPE=amd64
-endif
-
-ifeq "$(PROCTYPE)" "powerpc64"
-JAVA_PROC_TYPE=ppc64
-endif
-
-OS=LINUX
-PS=/
-ICL=\$$
-CC=gcc
-LINK=g++
-LIB=g++
-ECHO=@echo
-MKDIR=mkdir -p
-CAT=cat
-OBJ_EXT=o
-SHAREDLIB_EXT=so
-SHAREDLIB_PRE=lib
-SHAREDLIB_OUT=$(OUT_LIB)
-
-GCC_VERSION=$(shell $(CC) -dumpversion)
-
-COMID=gcc3
-CPPU_ENV=gcc3
-
-OSEP=\<
-CSEP=\>
-QUOTE=$(subst S,\,S)
-QM=\"
-SQM='
-ECHOLINE=@echo
-P2BG=&
-
-DEL=rm -f
-DELRECURSIVE=rm -rf
-COPY=cp
-URLPREFIX=file://
-
-# Include UDK version numbers
-include $(PRJ)/include/udkversion.mk
-
-SALLIB=-luno_sal
-CPPULIB=-luno_cppu
-CPPUHELPERLIB=-luno_cppuhelper$(COMID)
-SALHELPERLIB=-luno_salhelper$(COMID)
-REGLIB=-lreg
-STORELIB=-lstore
-
-EMPTYSTRING=
-PATH_SEPARATOR=:
-
-CC_FLAGS_JNI=-c -fpic
-CC_FLAGS=-c -fpic -fvisibility=hidden
-# -O is necessary for inlining (see gcc documentation)
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS_JNI+=-g
-CC_FLAGS+=-g
-else
-CC_FLAGS_JNI+=-O
-CC_FLAGS+=-O
-endif
-
-ifeq "$(PROCTYPE)" "ppc"
-CC_FLAGS+=-fPIC
-endif
-
-SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
-CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
-CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
-CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
-
-# define for used compiler necessary for UNO
-#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95
-#-DCPPU_ENV=gcc3 -- gcc3 3.0
-
-CC_OUTPUT_SWITCH=-o
-
-LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN'
-
-ifeq "$(PROCTYPE)" "ppc"
-LIBRARY_LINK_FLAGS+=-fPIC
-endif
-#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
-COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
-
-EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
-LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
-LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
-
-ifneq "$(OO_SDK_URE_HOME)" ""
-URE_MISC=$(OO_SDK_URE_HOME)/share/misc
-endif
-
-endif
-
-###########################################################################
-#
-# MacOSX/Darwin specific settings
-#
-###########################################################################
-ifneq (,$(findstring darwin,$(PLATFORM)))
-# Settings for MacOSX using gcc 4.0.1 compiler
-
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
-
-# Default is MacOSX on a Intel machine
-PLATFORM=macosx
-
-ifeq "$(PROCTYPE)" "i386"
-PACKAGE_LIB_DIR=macosx_x86.plt
-UNOPKG_PLATFORM=MacOSX_x86
-JAVA_PROC_TYPE=x86
-else
-ifeq "$(PROCTYPE)" "x86_64"
-PACKAGE_LIB_DIR=macosx_x86.plt
-UNOPKG_PLATFORM=MacOSX_x86
-JAVA_PROC_TYPE=x86
-else
-PACKAGE_LIB_DIR=macosx_ppc.plt
-UNOPKG_PLATFORM=MacOSX_PowerPC
-JAVA_PROC_TYPE=ppc
-endif
-endif
-JAVABIN=Commands
-
-GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2)
-ifeq "$(GCC_VERSION)" "4.2"
-GCC_ARCH_OPTION=-arch i386
-endif
-
-OS=MACOSX
-PS=/
-ICL=\$$
-CC=gcc-$(GCC_VERSION)
-LINK=g++-$(GCC_VERSION)
-LIB=g++-$(GCC_VERSION)
-ECHO=@echo
-MKDIR=mkdir -p
-CAT=cat
-OBJ_EXT=o
-SHAREDLIB_EXT=dylib
-SHAREDLIB_PRE=lib
-SHAREDLIB_OUT=$(OUT_LIB)
-
-COMID=gcc3
-CPPU_ENV=gcc3
-
-OSEP=\<
-CSEP=\>
-QUOTE=$(subst S,\,S)
-QM=\"
-SQM='
-ECHOLINE=@echo
-P2BG=&
-
-DEL=rm -f
-DELRECURSIVE=rm -rf
-COPY=cp
-URLPREFIX=file://
-
-# Include UDK version numbers
-include $(PRJ)/include/udkversion.mk
-
-SALLIB=-luno_sal
-CPPULIB=-luno_cppu
-CPPUHELPERLIB=-luno_cppuhelper$(COMID)
-SALHELPERLIB=-luno_salhelper$(COMID)
-REGLIB=-lreg
-STORELIB=-lstore
-
-SALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_sal.dylib'
-CPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_cppu.dylib'
-CPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper'$(COMID).dylib.3:$(OO_SDK_URE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib'
-SALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_salhelper$(COMID).dylib'
-REGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libreg.dylib'
-STOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libstore.dylib'
-
-INSTALL_NAME_URELIBS=install_name_tool -change @__________________________________________________URELIB/libuno_sal.dylib.3 @executable_path/urelibs/libuno_sal.dylib.3 -change @__________________________________________________URELIB/libuno_cppu.dylib.3 @executable_path/urelibs/libuno_cppu.dylib.3 -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID).dylib.3 @executable_path/urelibs/libuno_cppuhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3 @executable_path/urelibs/libuno_salhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libreg.dylib.3 @executable_path/urelibs/libreg.dylib.3 -change @__________________________________________________URELIB/libstore.dylib.3 @executable_path/urelibs/libstore.dylib.3
-
-INSTALL_NAME_URELIBS_BIN=install_name_tool -change @__________________________________________________URELIB/libuno_sal.dylib.3 libuno_sal.dylib.3 -change @__________________________________________________URELIB/libuno_cppu.dylib.3 libuno_cppu.dylib.3 -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID).dylib.3 libuno_cppuhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3 libuno_salhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libreg.dylib.3 libreg.dylib.3 -change @__________________________________________________URELIB/libstore.dylib.3 libstore.dylib.3
-
-EMPTYSTRING=
-PATH_SEPARATOR=:
-
-CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION)
-CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden
-# -O is necessary for inlining (see gcc documentation)
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS_JNI+=-g
-CC_FLAGS+=-g
-else
-CC_FLAGS_JNI+=-O
-CC_FLAGS+=-O
-endif
-
-SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
-CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
-CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
-CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
-
-CC_OUTPUT_SWITCH=-o
-
-LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION)
-#-fPIC -fno-common
-
-# install_name '@executable_path$/(@:f)'
-#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE)
-COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
-
-EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress
-LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)"
-LINK_JAVA_LIBS=-framework JavaVM
-#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries"
-
-ifneq "$(OO_SDK_URE_HOME)" ""
-URE_MISC=$(OO_SDK_URE_HOME)/share/misc
-endif
-
-endif
-
-###########################################################################
-#
-# FreeBSD specific settings
-#
-###########################################################################
-ifneq (,$(findstring freebsd,$(PLATFORM)))
-# Settings for FreeBSD using gcc compiler
-
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
-
-ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
-PLATFORM=kfreebsd
-ifeq "$(PROCTYPE)" "x86_64"
-PACKAGE_LIB_DIR=kfreebsd_x86_64.plt
-UNOPKG_PLATFORM=kFreeBSD_x86_64
-else
-PACKAGE_LIB_DIR=kfreebsd_x86.plt
-UNOPKG_PLATFORM=kFreeBSD_x86
-endif
-else
-PLATFORM=freebsd
-ifeq "$(PROCTYPE)" "x86_64"
-PACKAGE_LIB_DIR=freebsd_x86_64.plt
-UNOPKG_PLATFORM=FreeBSD_x86_64
-else
-PACKAGE_LIB_DIR=freebsd_x86.plt
-UNOPKG_PLATFORM=FreeBSD_x86
-endif
-endif
-
-ifeq "$(PROCTYPE)" "x86_64"
-JAVA_PROC_TYPE=amd64
-else
-JAVA_PROC_TYPE=i386
-endif
-
-ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
-OS=LINUX
-else
-OS=FREEBSD
-endif
-PS=/
-ICL=\$$
-CC=gcc
-LINK=g++
-LIB=g++
-ECHO=@echo
-MKDIR=mkdir -p
-CAT=cat
-OBJ_EXT=o
-SHAREDLIB_EXT=so
-SHAREDLIB_PRE=lib
-SHAREDLIB_OUT=$(OUT_LIB)
-
-GCC_VERSION=$(shell $(CC) -dumpversion)
-
-COMID=gcc3
-CPPU_ENV=gcc3
-
-OSEP=\<
-CSEP=\>
-QUOTE=$(subst S,\,S)
-QM=\"
-SQM='
-ECHOLINE=@echo
-P2BG=&
-
-DEL=rm -f
-DELRECURSIVE=rm -rf
-COPY=cp
-URLPREFIX=file://
-
-# Include UDK version numbers
-include $(PRJ)/include/udkversion.mk
-
-SALLIB=-luno_sal
-CPPULIB=-luno_cppu
-CPPUHELPERLIB=-luno_cppuhelper$(COMID)
-SALHELPERLIB=-luno_salhelper$(COMID)
-REGLIB=-lreg
-STORELIB=-lstore
-
-EMPTYSTRING=
-PATH_SEPARATOR=:
-
-CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS)
-CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden
-# -O is necessary for inlining (see gcc documentation)
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS_JNI+=-g
-CC_FLAGS+=-g
-else
-CC_FLAGS_JNI+=-O
-CC_FLAGS+=-O
-endif
-
-SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
-CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
-CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
-CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
-
-CC_OUTPUT_SWITCH=-o
-
-LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN'
-#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
-COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
-
-EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
-LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS)
-LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
-
-ifneq "$(OO_SDK_URE_HOME)" ""
-URE_MISC=$(OO_SDK_URE_HOME)/share/misc
-endif
-
-endif
diff --git a/odk/settings/std.mk b/odk/settings/std.mk
deleted file mode 100644
index 6deb065f..00000000
--- a/odk/settings/std.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-ifneq "$(OO_SDK_OUT)" ""
-OUT=$(subst \,/,$(OO_SDK_OUT))/$(OS)example.out
-else
-OUT=$(PRJ)/$(OS)example.out
-endif
-
-UNOPKG_EXT=uno.pkg
-UNOOXT_EXT=oxt
-
-OUT_BIN=$(OUT)/bin
-OUT_INC=$(OUT)/inc
-OUT_SLO=$(OUT)/slo
-OUT_LIB=$(OUT)/lib
-OUT_SLB=$(OUT)/slb
-OUT_MISC=$(OUT)/misc
-OUT_OBJ=$(OUT)/obj
-OUT_CLASS=$(OUT)/class
-IDL_DIR=$(PRJ)/idl
-BIN_DIR=$(PRJ)/bin
-CLASSES_DIR=$(PRJ)/classes
-URE_CLASSES_DIR=$(subst \,/,$(OO_SDK_URE_JAVA_DIR))
-OFFICE_CLASSES_DIR=$(subst \,/,$(OFFICE_BASE_PROGRAM_PATH))/classes
-COMP_PACKAGE_DIR=$(subst /,$(PS),$(OUT_BIN))
-
-SDKTYPEFLAG=$(OUT_MISC)/oosdk_cpp_types.flag
-
-URE_TYPES="$(subst \,/,$(URE_MISC)$(PS)types.rdb)"
-URE_SERVICES=$(subst \\,\,$(URE_MISC)$(PS)services.rdb)
-
-OFFICE_TYPES="$(subst \,/,$(OFFICE_BASE_PROGRAM_PATH)$(PS)offapi.rdb)"
-OFFICE_SERVICES=$(subst \\,\,$(OFFICE_BASE_PROGRAM_PATH)$(PS)services.rdb)
-
-OFFICE_TYPE_LIBRARY="$(OFFICE_TYPES)"
-
-JAVA_OPTIONS=
-ifneq "$(OO_SDK_JAVA_HOME)" ""
-JAVA_BITS := $(shell $(OO_SDK_JAVA_HOME)/$(JAVABIN)/java -version 2>&1 | tail -1 | cut -d " " -f3)
-ifeq "$(JAVA_BITS)" "64-Bit"
-JAVA_OPTIONS=-d32
-endif
-endif
-
-DEPLOYTOOL="$(OFFICE_PROGRAM_PATH)$(PS)unopkg" add -f
-SDK_JAVA="$(OO_SDK_JAVA_HOME)/$(JAVABIN)/java" $(JAVA_OPTIONS)
-SDK_JAVAC="$(OO_SDK_JAVA_HOME)/$(JAVABIN)/javac"
-SDK_JAR="$(OO_SDK_JAVA_HOME)/$(JAVABIN)/jar"
-SDK_ZIP="$(OO_SDK_ZIP_HOME)/zip"
-IDLC="$(OO_SDK_HOME)/bin/idlc"
-CPPUMAKER="$(OO_SDK_HOME)/bin/cppumaker"
-JAVAMAKER="$(OO_SDK_HOME)/bin/javamaker"
-REGMERGE="$(OO_SDK_URE_HOME)/bin/regmerge"
-REGCOMP="$(OO_SDK_URE_HOME)/bin/regcomp"
-
-SDK_JAVA_UNO_BOOTSTRAP_FILES=\
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$Drain.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$CustomURLClassLoader.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader$$Drain.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/InstallationFinder.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/InstallationFinder$$StreamGobbler.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKey.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKeyException.class$(SQM) \
- -C $(CLASSES_DIR) $(SQM)win/unowinreg.dll$(SQM)
diff --git a/odk/settings/stdtarget.mk b/odk/settings/stdtarget.mk
deleted file mode 100644
index 938ab342..00000000
--- a/odk/settings/stdtarget.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-.SUFFIXES:
-
-.SECONDARY:
-
-ifeq "$(DEBUG)" "yes"
-debug : ALL
-endif
-
-.PHONY: install
-install: $(REGISTERFLAG)
-
-$(SDKTYPEFLAG): #$(URE_TYPES) $(OFFICE_TYPES)
-# This is a makefile for a standard Make, so must be TABs below
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SDKTYPEFLAG)))
- $(CPPUMAKER) -Gc -BUCR -O$(OUT_INC) $(URE_TYPES) $(OFFICE_TYPES)
- echo flagged > $@
diff --git a/odk/source/com/sun/star/lib/loader/InstallationFinder.java b/odk/source/com/sun/star/lib/loader/InstallationFinder.java
deleted file mode 100644
index b0903f35..00000000
--- a/odk/source/com/sun/star/lib/loader/InstallationFinder.java
+++ /dev/null
@@ -1,584 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-package com.sun.star.lib.loader;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-/**
- * This class finds a UNO installation on the system.
- *
- * <p>A UNO installation can be specified by the user by either setting the
- * com.sun.star.lib.loader.unopath system property or by setting the
- * UNO_PATH environment variable to the program directory of a UNO
- * installation.
- * Note, that Java 1.3.1 and Java 1.4 don't support environment variables
- * (System.getenv() throws java.lang.Error) and therefore setting the UNO_PATH
- * enviroment variable won't work with those Java versions.
- * If no UNO installation is specified by the user, the default installation
- * on the system will be returned.</p>
- *
- * <p>On the Windows platform the default installation is read from the Windows
- * Registry.</p>
- *
- * <p>On the Unix/Linux platforms the default installation is found from the
- * PATH environment variable. Note, that for Java 1.3.1 and Java 1.4 the
- * default installation is found by using the 'which' command, because
- * environment variables are not supported with those Java versions.
- * Both methods require that the 'soffice' executable or a symbolic
- * link is in one of the directories listed in the PATH environment variable.
- * For older versions than OOo 2.0 the above described methods may fail.
- * In this case the default installation is taken from the .sversionrc file in
- * the user's home directory. Note, that the .sversionrc file will be omitted
- * for OOo 2.0</p>
- */
-final class InstallationFinder {
-
- private static final String SYSPROP_NAME =
- "com.sun.star.lib.loader.unopath";
- private static final String ENVVAR_NAME = "UNO_PATH";
- private static final String SOFFICE = "libreoffice"; // Unix/Linux only
-
- private InstallationFinder() {} // do not instantiate
-
- /**
- * Gets the path of a UNO installation.
- *
- * @return the installation path or <code>null</code>, if no installation
- * was specified or found, or if an error occurred
- */
- public static String getPath() {
-
- String path = null;
-
- // get the installation path from the Java system property
- // com.sun.star.lib.loader.unopath
- // (all platforms)
- path = getPathFromProperty( SYSPROP_NAME );
- if ( path == null ) {
- // get the installation path from the UNO_PATH environment variable
- // (all platforms, not working for Java 1.3.1 and Java 1.4)
- path = getPathFromEnvVar( ENVVAR_NAME );
- if ( path == null ) {
- String osname = null;
- try {
- osname = System.getProperty( "os.name" );
- } catch ( SecurityException e ) {
- // if a SecurityException was thrown,
- // return <code>null</code>
- return null;
- }
- if ( osname != null ) {
- if ( osname.startsWith( "Windows" ) ) {
- // get the installation path from the Windows Registry
- // (Windows platform only)
- path = getPathFromWindowsRegistry();
- } else {
- // get the installation path from the PATH environment
- // variable (Unix/Linux platforms only, not working for
- // Java 1.3.1 and Java 1.4)
- path = getPathFromPathEnvVar();
- if ( path == null ) {
- // get the installation path from the 'which'
- // command (Unix/Linux platforms only)
- path = getPathFromWhich();
- if ( path == null ) {
- // get the installation path from the
- // .sversionrc file (Unix/Linux platforms only,
- // for older versions than OOo 2.0)
- path = getPathFromSVersionFile();
- }
- }
- }
- }
- }
- }
-
- return path;
- }
-
- /**
- * Gets the installation path from a Java system property.
- *
- * <p>This method is called on all platforms.
- * The Java system property can be passed into the application by using
- * the -D flag, e.g.
- * java -D<property name>=<installation path> -jar application.jar.</p>
- *
- * @return the installation path or <code>null</code>, if no installation
- * was specified in the Java system property or if an error occurred
- */
- private static String getPathFromProperty( String prop ) {
-
- String path = null;
-
- try {
- path = System.getProperty( prop );
- } catch ( SecurityException e ) {
- // if a SecurityException was thrown, return <code>null</code>
- }
-
- return path;
- }
-
- /**
- * Gets the installation path from an environment variable.
- *
- * <p>This method is called on all platforms.
- * Note, that in Java 1.3.1 and Java 1.4 System.getenv() throws
- * java.lang.Error and therefore this method returns null for those
- * Java versions.</p>
- *
- * @return the installation path or <code>null</code>, if no installation
- * was specified in the environment variable or if an error occurred
- */
- private static String getPathFromEnvVar( String var ) {
-
- String path = null;
-
- try {
- path = System.getenv( var );
- } catch ( SecurityException e ) {
- // if a SecurityException was thrown, return <code>null</code>
- } catch ( java.lang.Error err ) {
- // System.getenv() throws java.lang.Error in Java 1.3.1 and
- // Java 1.4
- }
-
- return path;
- }
-
- /**
- * Gets the installation path from the Windows Registry.
- *
- * <p>This method is called on the Windows platform only.</p>
- *
- * @return the installation path or <code>null</code>, if no installation
- * was found or if an error occurred
- */
- private static String getPathFromWindowsRegistry() {
-
- final String SUBKEYNAME = "Software\\LibreOffice\\UNO\\InstallPath";
-
- String path = null;
-
- try {
- // read the key's default value from HKEY_CURRENT_USER
- WinRegKey key = new WinRegKey( "HKEY_CURRENT_USER", SUBKEYNAME );
- path = key.getStringValue( "" ); // default
- } catch ( WinRegKeyException e ) {
- try {
- // read the key's default value from HKEY_LOCAL_MACHINE
- WinRegKey key = new WinRegKey( "HKEY_LOCAL_MACHINE",
- SUBKEYNAME );
- path = key.getStringValue( "" ); // default
- } catch ( WinRegKeyException we ) {
- System.err.println( "com.sun.star.lib.loader." +
- "InstallationFinder::getPathFromWindowsRegistry: " +
- "reading key from Windows Registry failed: " + we );
- }
- }
-
- return path;
- }
-
- /**
- * Gets the installation path from the PATH environment variable.
- *
- * <p>This method is called on Unix/Linux platforms only.
- * An installation is found, if the executable 'soffice' or a symbolic link
- * is in one of the directories listed in the PATH environment variable.
- * Note, that in Java 1.3.1 and Java 1.4 System.getenv() throws
- * java.lang.Error and therefore this method returns null for those
- * Java versions.</p>
- *
- * @return the installation path or <code>null</code>, if no installation
- * was found or if an error occurred
- */
- private static String getPathFromPathEnvVar() {
-
- final String PATH_ENVVAR_NAME = "PATH";
-
- String path = null;
- String str = null;
-
- try {
- str = System.getenv( PATH_ENVVAR_NAME );
- } catch ( SecurityException e ) {
- // if a SecurityException was thrown, return <code>null</code>
- return null;
- } catch ( java.lang.Error err ) {
- // System.getenv() throws java.lang.Error in Java 1.3.1 and
- // Java 1.4
- return null;
- }
-
- if ( str != null ) {
- StringTokenizer tokens = new StringTokenizer(
- str, File.pathSeparator );
- while ( tokens.hasMoreTokens() ) {
- File file = new File( tokens.nextToken(), SOFFICE );
- try {
- if ( file.exists() ) {
- try {
- // resolve symlink
- path = file.getCanonicalFile().getParent();
- if ( path != null )
- break;
- } catch ( IOException e ) {
- // if an I/O exception is thrown, ignore this
- // path entry and try the next one
- System.err.println( "com.sun.star.lib.loader." +
- "InstallationFinder::getPathFromEnvVar: " +
- "bad path: " + e );
- }
- }
- } catch ( SecurityException e ) {
- // if a SecurityException was thrown, ignore this path
- // entry and try the next one
- }
- }
- }
-
- return path;
- }
-
- /**
- * Gets the installation path from the 'which' command on Unix/Linux
- * platforms.
- *
- * <p>This method is called on Unix/Linux platforms only.
- * An installation is found, if the executable 'soffice' or a symbolic link
- * is in one of the directories listed in the PATH environment variable.</p>
- *
- * @return the installation path or <code>null</code>, if no installation
- * was found or if an error occurred
- */
- private static String getPathFromWhich() {
-
- final String WHICH = "which";
-
- String path = null;
-
- // start the which process
- String[] cmdArray = new String[2];
- cmdArray[0] = WHICH;
- cmdArray[1] = SOFFICE;
- Process proc = null;
- Runtime rt = Runtime.getRuntime();
- try {
- proc = rt.exec( cmdArray );
- } catch ( SecurityException e ) {
- return null;
- } catch ( IOException e ) {
- // if an I/O exception is thrown, return <code>null</null>
- System.err.println( "com.sun.star.lib.loader." +
- "InstallationFinder::getPathFromWhich: " +
- "which command failed: " + e );
- return null;
- }
-
- // empty standard error stream in a seperate thread
- StreamGobbler gobbler = new StreamGobbler( proc.getErrorStream() );
- gobbler.start();
-
- // read the which output from standard input stream
- BufferedReader br = new BufferedReader(
- new InputStreamReader( proc.getInputStream() ) );
- String line = null;
- try {
- while ( ( line = br.readLine() ) != null ) {
- if ( path == null ) {
- // get the path from the which output
- int index = line.lastIndexOf( SOFFICE );
- if ( index != -1 ) {
- int end = index + SOFFICE.length();
- for ( int i = 0; i <= index; i++ ) {
- File file = new File( line.substring( i, end ) );
- try {
- if ( file.exists() ) {
- // resolve symlink
- path = file.getCanonicalFile().getParent();
- if ( path != null )
- break;
- }
- } catch ( SecurityException e ) {
- return null;
- }
- }
- }
- }
- }
- } catch ( IOException e ) {
- // if an I/O exception is thrown, return <code>null</null>
- System.err.println( "com.sun.star.lib.loader." +
- "InstallationFinder::getPathFromWhich: " +
- "reading which command output failed: " + e );
- return null;
- } finally {
- if ( br != null ) {
- try {
- br.close();
- } catch ( IOException e ) {
- // closing standard input stream failed, ignore
- }
- }
- }
-
- try {
- // wait until the which process has terminated
- proc.waitFor();
- } catch ( InterruptedException e ) {
- // the current thread was interrupted by another thread,
- // kill the which process
- proc.destroy();
- // set the interrupted status
- Thread.currentThread().interrupt();
- }
-
- return path;
- }
-
- /**
- * Gets the installation path from the .sverionrc file in the user's home
- * directory.
- *
- * <p>This method is called on Unix/Linux platforms only.
- * The .sversionrc file is written during setup and will be omitted for
- * OOo 2.0.</p>
- *
- * @return the installation path or <code>null</code>, if no installation
- * was found or if an error occurred
- */
- private static String getPathFromSVersionFile() {
-
- final String SVERSION = ".sversionrc"; // Unix/Linux only
- final String VERSIONS = "[Versions]";
-
- String path = null;
-
- try {
- File fSVersion = new File(
- System.getProperty( "user.home" ) ,SVERSION );
- if ( fSVersion.exists() ) {
- Vector lines = new Vector();
- BufferedReader br = null;
- try {
- br = new BufferedReader( new InputStreamReader(
- new FileInputStream( fSVersion ), "UTF-8" ) );
- String line = null;
- while ( ( line = br.readLine() ) != null &&
- ( line.equals( VERSIONS ) ) != true ) {
- // read lines until [Versions] is found
- }
- while ( ( line = br.readLine() ) != null &&
- line.length() != 0 ) {
- if ( !line.startsWith( ";" ) )
- lines.add( line );
- }
- } catch ( IOException e ) {
- // if an I/O exception is thrown, try to analyze the lines
- // read so far
- System.err.println( "com.sun.star.lib.loader." +
- "InstallationFinder::getPathFromSVersionFile: " +
- "reading .sversionrc file failed: " + e );
- } finally {
- if ( br != null ) {
- try {
- br.close();
- } catch ( IOException e ) {
- // closing .sversionrc failed, ignore
- }
- }
- }
- for ( int i = lines.size() - 1; i >= 0; i-- ) {
- StringTokenizer tokens = new StringTokenizer(
- (String)lines.elementAt( i ), "=" );
- if ( tokens.countTokens() != 2 )
- continue;
- String key = tokens.nextToken();
- String url = tokens.nextToken();
- path = getCanonicalPathFromFileURL( url );
- if ( path != null )
- break;
- }
- }
- } catch ( SecurityException e ) {
- return null;
- }
-
- return path;
- }
-
- /**
- * Translates an OOo-internal absolute file URL reference (encoded using
- * UTF-8) into a Java canonical pathname.
- *
- * @param oooUrl any URL reference; any fragment part is ignored
- *
- * @return if the given URL is a valid absolute, local (that is, the host
- * part is empty or equal to "localhost", ignoring case) file URL, it is
- * converted into an absolute canonical pathname; otherwise,
- * <code>null</code> is returned
- */
- private static String getCanonicalPathFromFileURL( String oooUrl ) {
-
- String prefix = "file://";
- if (oooUrl.length() < prefix.length()
- || !oooUrl.substring(0, prefix.length()).toLowerCase().equals(
- prefix))
- {
- return null;
- }
- StringBuffer buf = new StringBuffer(prefix);
- int n = oooUrl.indexOf('/', prefix.length());
- if (n < 0) {
- n = oooUrl.length();
- }
- String host = oooUrl.substring(prefix.length(), n);
- if (host.length() != 0 && !host.toLowerCase().equals("localhost")) {
- return null;
- }
- buf.append(host);
- if (n == oooUrl.length()) {
- buf.append('/');
- } else {
- loop:
- while (n < oooUrl.length()) {
- buf.append('/');
- ++n;
- int n2 = oooUrl.indexOf('/', n);
- if (n2 < 0) {
- n2 = oooUrl.length();
- }
- while (n < n2) {
- char c = oooUrl.charAt(n);
- switch (c) {
- case '%':
- byte[] bytes = new byte[(n2 - n) / 3];
- int len = 0;
- while (oooUrl.length() - n > 2
- && oooUrl.charAt(n) == '%')
- {
- int d1 = Character.digit(oooUrl.charAt(n + 1), 16);
- int d2 = Character.digit(oooUrl.charAt(n + 2), 16);
- if (d1 < 0 || d2 < 0) {
- break;
- }
- int d = 16 * d1 + d2;
- if (d == '/') {
- return null;
- }
- bytes[len++] = (byte) d;
- n += 3;
- }
- String s;
- try {
- s = new String(bytes, 0, len, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- return null;
- }
- buf.append(s);
- break;
-
- case '#':
- break loop;
-
- default:
- buf.append(c);
- ++n;
- break;
- }
- }
- }
- }
- URL url;
- try {
- url = new URL(buf.toString());
- } catch (MalformedURLException e) {
- return null;
- }
- String path = url.getFile();
- String fragment = url.getRef();
- if (fragment != null) {
- path += '#' + fragment;
- }
- String ret = null;
- File file = new File( path, SOFFICE );
- try {
- if ( file.isAbsolute() && file.exists() ) {
- try {
- // resolve symlink
- ret = file.getCanonicalFile().getParent();
- } catch ( IOException e ) {
- return null;
- }
- }
- } catch ( SecurityException e ) {
- return null;
- }
-
- return ret;
- }
-
- /**
- This class is used for emptying any stream which is passed into it in
- a separate thread.
- */
- private static final class StreamGobbler extends Thread {
-
- InputStream m_istream;
-
- StreamGobbler( InputStream istream ) {
- m_istream = istream;
- }
-
- public void run() {
- try {
- BufferedReader br = new BufferedReader(
- new InputStreamReader( m_istream ) );
- // read from input stream
- while ( br.readLine() != null ) {
- // don't handle line content
- }
- br.close();
- } catch ( IOException e ) {
- // stop reading from input stream
- }
- }
- }
-}
diff --git a/odk/source/com/sun/star/lib/loader/Loader.java b/odk/source/com/sun/star/lib/loader/Loader.java
deleted file mode 100644
index 64bc7819..00000000
--- a/odk/source/com/sun/star/lib/loader/Loader.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-package com.sun.star.lib.loader;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.JarURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Enumeration;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-/**
- * This class can be used as a loader for application classes which use UNO.
- *
- * <p>The Loader class detects a UNO installation on the system and adds the
- * UNO jar files to the search path of a customized class loader, which is used
- * for loading the application classes.</p>
- */
-public final class Loader {
-
- private static ClassLoader m_Loader = null;
-
- /**
- * do not instantiate
- */
- private Loader() {}
-
- /**
- * The main method instantiates a customized class loader with the
- * UNO jar files added to the search path and loads the application class,
- * which is specified in the Main-Class attribute of the
- * com/sun/star/lib/Loader.class entry of the manifest file or
- * as first parameter in the argument list.
- */
- public static void main( String[] arguments ) throws Exception {
-
- // get the name of the class to be loaded from the manifest
- String className = null;
- Class clazz = Loader.class;
- ClassLoader loader = clazz.getClassLoader();
- Vector res = new Vector();
- try {
- Enumeration en = loader.getResources( "META-INF/MANIFEST.MF" );
- while ( en.hasMoreElements() ) {
- res.add( (URL) en.nextElement() );
- }
- // the jarfile with the com/sun/star/lib/loader/Loader.class
- // per-entry attribute is most probably the last resource in the
- // list, therefore search backwards
- for ( int i = res.size() - 1; i >= 0; i-- ) {
- URL jarurl = (URL) res.elementAt( i );
- try {
- JarURLConnection jarConnection =
- (JarURLConnection) jarurl.openConnection();
- Manifest mf = jarConnection.getManifest();
- Attributes attrs = (Attributes) mf.getAttributes(
- "com/sun/star/lib/loader/Loader.class" );
- if ( attrs != null ) {
- className = attrs.getValue( "Application-Class" );
- if ( className != null )
- break;
- }
- } catch ( IOException e ) {
- // if an I/O error occurs when opening a new
- // JarURLConnection, ignore this manifest file
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "main: bad manifest file: " + e );
- }
- }
- } catch ( IOException e ) {
- // if an I/O error occurs when getting the manifest resources,
- // try to get the name of the class to be loaded from the argument
- // list
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "main: cannot get manifest resources: " + e );
- }
-
- // if no manifest entry was found, get the name of the class
- // to be loaded from the argument list
- String[] args;
- if ( className == null ) {
- if ( arguments.length > 0 ) {
- className = arguments[0];
- args = new String[arguments.length - 1];
- System.arraycopy( arguments, 1, args, 0, args.length );
- } else {
- throw new IllegalArgumentException(
- "The name of the class to be loaded must be either " +
- "specified in the Main-Class attribute of the " +
- "com/sun/star/lib/loader/Loader.class entry " +
- "of the manifest file or as a command line argument." );
- }
- } else {
- args = arguments;
- }
-
- // load the class with the customized class loader and
- // invoke the main method
- if ( className != null ) {
- ClassLoader cl = getCustomLoader();
- Thread.currentThread().setContextClassLoader(cl);
- Class c = cl.loadClass( className );
- Method m = c.getMethod( "main", new Class[] { String[].class } );
- m.invoke( null, new Object[] { args } );
- }
- }
-
- /**
- * Gets the customized class loader with the UNO jar files added to the
- * search path.
- *
- * @return the customized class loader
- */
- public static synchronized ClassLoader getCustomLoader() {
-
- final String CLASSESDIR = "classes";
- final String JUHJAR = "juh.jar";
-
- if ( m_Loader == null ) {
-
- // get the urls from which to load classes and resources
- // from the class path
- Vector vec = new Vector();
- String classpath = null;
- try {
- classpath = System.getProperty( "java.class.path" );
- } catch ( SecurityException e ) {
- // don't add the class path entries to the list of class
- // loader URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: cannot get system property " +
- "java.class.path: " + e );
- }
- if ( classpath != null ) {
- addUrls(vec, classpath, File.pathSeparator);
- }
-
- // get the urls from which to load classes and resources
- // from the UNO installation
- String path = InstallationFinder.getPath();
- if ( path != null ) {
- File fClassesDir = new File( path, CLASSESDIR );
- File fJuh = new File( fClassesDir, JUHJAR );
- if ( fJuh.exists() ) {
- URL[] clurls = new URL[1];
- try {
- clurls[0] = fJuh.toURI().toURL();
- ClassLoader cl = new CustomURLClassLoader( clurls );
- Class c = cl.loadClass(
- "com.sun.star.comp.helper.UnoInfo" );
- Method m = c.getMethod( "getJars", (Class[]) null );
- URL[] jarurls = (URL[]) m.invoke(
- null, (Object[]) null );
- for ( int i = 0; i < jarurls.length; i++ ) {
- vec.add( jarurls[i] );
- }
- } catch ( MalformedURLException e ) {
- // don't add the UNO jar files to the list of class
- // loader URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: cannot add UNO jar files: " + e );
- } catch ( ClassNotFoundException e ) {
- // don't add the UNO jar files to the list of class
- // loader URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: cannot add UNO jar files: " + e );
- } catch ( NoSuchMethodException e ) {
- // don't add the UNO jar files to the list of class
- // loader URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: cannot add UNO jar files: " + e );
- } catch ( IllegalAccessException e ) {
- // don't add the UNO jar files to the list of class
- // loader URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: cannot add UNO jar files: " + e );
- } catch ( InvocationTargetException e ) {
- // don't add the UNO jar files to the list of class
- // loader URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: cannot add UNO jar files: " + e );
- }
- } else {
- callUnoinfo(path, vec);
- }
- } else {
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: no UNO installation found!" );
- }
-
- // copy urls to array
- URL[] urls = new URL[vec.size()];
- vec.toArray( urls );
-
- // instantiate class loader
- m_Loader = new CustomURLClassLoader( urls );
- }
-
- return m_Loader;
- }
-
- private static void addUrls(Vector urls, String data, String delimiter) {
- StringTokenizer tokens = new StringTokenizer( data, delimiter );
- while ( tokens.hasMoreTokens() ) {
- try {
- urls.add( new File( tokens.nextToken() ).toURI().toURL() );
- } catch ( MalformedURLException e ) {
- // don't add this class path entry to the list of class loader
- // URLs
- System.err.println( "com.sun.star.lib.loader.Loader::" +
- "getCustomLoader: bad pathname: " + e );
- }
- }
- }
-
- private static void callUnoinfo(String path, Vector urls) {
- Process p;
- try {
- p = Runtime.getRuntime().exec(
- new String[] { new File(path, "unoinfo").getPath(), "java" });
- } catch (IOException e) {
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader: exec" +
- " unoinfo: " + e);
- return;
- }
- new Drain(p.getErrorStream()).start();
- int code;
- byte[] buf = new byte[1000];
- int n = 0;
- try {
- InputStream s = p.getInputStream();
- code = s.read();
- for (;;) {
- if (n == buf.length) {
- if (n > Integer.MAX_VALUE / 2) {
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader:" +
- " too much unoinfo output");
- return;
- }
- byte[] buf2 = new byte[2 * n];
- for (int i = 0; i < n; ++i) {
- buf2[i] = buf[i];
- }
- buf = buf2;
- }
- int k = s.read(buf, n, buf.length - n);
- if (k == -1) {
- break;
- }
- n += k;
- }
- } catch (IOException e) {
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader: reading" +
- " unoinfo output: " + e);
- return;
- }
- int ev;
- try {
- ev = p.waitFor();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader: waiting for" +
- " unoinfo: " + e);
- return;
- }
- if (ev != 0) {
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader: unoinfo"
- + " exit value " + n);
- return;
- }
- String s;
- if (code == '0') {
- s = new String(buf);
- } else if (code == '1') {
- try {
- s = new String(buf, "UTF-16LE");
- } catch (UnsupportedEncodingException e) {
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader:" +
- " transforming unoinfo output: " + e);
- return;
- }
- } else {
- System.err.println(
- "com.sun.star.lib.loader.Loader::getCustomLoader: bad unoinfo"
- + " output");
- return;
- }
- addUrls(urls, s, "\0");
- }
-
- private static final class Drain extends Thread {
- public Drain(InputStream stream) {
- super("unoinfo stderr drain");
- this.stream = stream;
- }
-
- public void run() {
- try {
- while (stream.read() != -1) {}
- } catch (IOException e) { /* ignored */ }
- }
-
- private final InputStream stream;
- }
-
- /**
- * A customized class loader which is used to load classes and resources
- * from a search path of user-defined URLs.
- */
- private static final class CustomURLClassLoader extends URLClassLoader {
-
- public CustomURLClassLoader( URL[] urls ) {
- super( urls );
- }
-
- protected Class findClass( String name ) throws ClassNotFoundException {
- // This is only called via this.loadClass -> super.loadClass ->
- // this.findClass, after this.loadClass has already called
- // super.findClass, so no need to call super.findClass again:
- throw new ClassNotFoundException( name );
- }
-
- protected Class loadClass( String name, boolean resolve )
- throws ClassNotFoundException
- {
- Class c = findLoadedClass( name );
- if ( c == null ) {
- try {
- c = super.findClass( name );
- } catch ( ClassNotFoundException e ) {
- return super.loadClass( name, resolve );
- } catch ( SecurityException e ) {
- // A SecurityException "Prohibited package name: java.lang"
- // may occur when the user added the JVM's rt.jar to the
- // java.class.path:
- return super.loadClass( name, resolve );
- }
- }
- if ( resolve ) {
- resolveClass( c );
- }
- return c;
- }
- }
-}
diff --git a/odk/source/com/sun/star/lib/loader/WinRegKey.java b/odk/source/com/sun/star/lib/loader/WinRegKey.java
deleted file mode 100644
index b68a87a3..00000000
--- a/odk/source/com/sun/star/lib/loader/WinRegKey.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-package com.sun.star.lib.loader;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-
-
-/**
- * This class provides functionality for reading string values from the
- * Windows Registry. It requires the native library unowinreg.dll.
- */
-final class WinRegKey {
-
- private String m_rootKeyName;
- private String m_subKeyName;
-
- // native methods to access the windows registry
- private static native boolean winreg_RegOpenClassesRoot( long[] hkresult );
- private static native boolean winreg_RegOpenCurrentConfig(
- long[] hkresult );
- private static native boolean winreg_RegOpenCurrentUser( long[] hkresult );
- private static native boolean winreg_RegOpenLocalMachine( long[] hkresult );
- private static native boolean winreg_RegOpenUsers( long[] hkresult );
- private static native boolean winreg_RegOpenKeyEx( long parent, String name,
- long[] hkresult );
- private static native boolean winreg_RegCloseKey( long hkey );
- private static native boolean winreg_RegQueryValueEx(
- long hkey, String value, long[] type,
- byte[] data, long[] size );
- private static native boolean winreg_RegQueryInfoKey(
- long hkey, long[] subkeys, long[] maxSubkeyLen,
- long[] values, long[] maxValueNameLen,
- long[] maxValueLen, long[] secDescriptor );
-
- // load the native library unowinreg.dll
- static {
- try {
- ClassLoader cl = WinRegKey.class.getClassLoader();
- InputStream is = cl.getResourceAsStream( "win/unowinreg.dll" );
- if ( is != null ) {
- // generate a temporary name for lib file and write to temp
- // location
- BufferedInputStream istream = new BufferedInputStream( is );
- File libfile = File.createTempFile( "unowinreg", ".dll" );
- libfile.deleteOnExit(); // ensure deletion
- BufferedOutputStream ostream = new BufferedOutputStream(
- new FileOutputStream( libfile ) );
- int bsize = 2048; int n = 0;
- byte[] buffer = new byte[bsize];
- while ( ( n = istream.read( buffer, 0, bsize ) ) != -1 ) {
- ostream.write( buffer, 0, n );
- }
- istream.close();
- ostream.close();
- // load library
- System.load( libfile.getPath() );
- } else {
- // If the library cannot be found as a class loader resource,
- // try the global System.loadLibrary(). The JVM will look for
- // it in the java.library.path.
- System.loadLibrary( "unowinreg" );
- }
- } catch ( java.lang.Exception e ) {
- System.err.println( "com.sun.star.lib.loader.WinRegKey: " +
- "loading of native library failed!" + e );
- }
- }
-
- /**
- * Constructs a <code>WinRegKey</code>.
- */
- public WinRegKey( String rootKeyName, String subKeyName ) {
- m_rootKeyName = rootKeyName;
- m_subKeyName = subKeyName;
- }
-
- /**
- * Reads a string value for the specified value name.
- */
- public String getStringValue( String valueName ) throws WinRegKeyException {
- byte[] data = getValue( valueName );
- // remove terminating null character
- return new String( data, 0, data.length - 1 );
- }
-
- /**
- * Reads a value for the specified value name.
- */
- private byte[] getValue( String valueName ) throws WinRegKeyException {
-
- byte[] result = null;
- long[] hkey = {0};
-
- // open the specified registry key
- boolean bRet = false;
- long[] hroot = {0};
- if ( m_rootKeyName.equals( "HKEY_CLASSES_ROOT" ) ) {
- bRet = winreg_RegOpenClassesRoot( hroot );
- } else if ( m_rootKeyName.equals( "HKEY_CURRENT_CONFIG" ) ) {
- bRet = winreg_RegOpenCurrentConfig( hroot );
- } else if ( m_rootKeyName.equals( "HKEY_CURRENT_USER" ) ) {
- bRet = winreg_RegOpenCurrentUser( hroot );
- } else if ( m_rootKeyName.equals( "HKEY_LOCAL_MACHINE" ) ) {
- bRet = winreg_RegOpenLocalMachine( hroot );
- } else if ( m_rootKeyName.equals( "HKEY_USERS" ) ) {
- bRet = winreg_RegOpenUsers( hroot );
- } else {
- throw new WinRegKeyException( "unknown root registry key!");
- }
- if ( !bRet ) {
- throw new WinRegKeyException( "opening root registry key " +
- "failed!" );
- }
- if ( !winreg_RegOpenKeyEx( hroot[0], m_subKeyName, hkey ) ) {
- if ( !winreg_RegCloseKey( hroot[0] ) ) {
- throw new WinRegKeyException( "opening registry key and " +
- "releasing root registry key handle failed!" );
- }
- throw new WinRegKeyException( "opening registry key failed!" );
- }
-
- // get the size of the longest data component among the key's values
- long[] subkeys = {0};
- long[] maxSubkeyLen = {0};
- long[] values = {0};
- long[] maxValueNameLen = {0};
- long[] maxValueLen = {0};
- long[] secDescriptor = {0};
- if ( !winreg_RegQueryInfoKey( hkey[0], subkeys, maxSubkeyLen,
- values, maxValueNameLen, maxValueLen, secDescriptor ) ) {
- if ( !winreg_RegCloseKey( hkey[0] ) ||
- !winreg_RegCloseKey( hroot[0] ) ) {
- throw new WinRegKeyException( "retrieving information about " +
- "the registry key and releasing registry key handles " +
- "failed!" );
- }
- throw new WinRegKeyException( "retrieving information about " +
- "the registry key failed!" );
- }
-
- // get the data for the specified value name
- byte[] buffer = new byte[ (int) maxValueLen[0] ];
- long[] size = new long[1];
- size[0] = buffer.length;
- long[] type = new long[1];
- type[0] = 0;
- if ( !winreg_RegQueryValueEx( hkey[0], valueName, type, buffer,
- size ) ) {
- if ( !winreg_RegCloseKey( hkey[0] ) ||
- !winreg_RegCloseKey( hroot[0] ) ) {
- throw new WinRegKeyException( "retrieving data for the " +
- "specified value name and releasing registry key handles " +
- "failed!" );
- }
- throw new WinRegKeyException( "retrieving data for the " +
- "specified value name failed!" );
- }
-
- // release registry key handles
- if ( !winreg_RegCloseKey( hkey[0] ) ||
- !winreg_RegCloseKey( hroot[0] ) ) {
- throw new WinRegKeyException( "releasing registry key handles " +
- "failed!" );
- }
-
- result = new byte[ (int) size[0] ];
- System.arraycopy( buffer, 0, result, 0, (int)size[0] );
-
- return result;
- }
-}
diff --git a/odk/source/com/sun/star/lib/loader/WinRegKeyException.java b/odk/source/com/sun/star/lib/loader/WinRegKeyException.java
deleted file mode 100644
index f476def5..00000000
--- a/odk/source/com/sun/star/lib/loader/WinRegKeyException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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.
- *
- ************************************************************************/
-
-package com.sun.star.lib.loader;
-
-/**
- * WinRegKeyException is a checked exception.
- */
-final class WinRegKeyException extends java.lang.Exception {
-
- /**
- * Constructs a <code>WinRegKeyException</code>.
- */
- public WinRegKeyException() {
- super();
- }
-
- /**
- * Constructs a <code>WinRegKeyException</code> with the specified
- * detail message.
- *
- * @param message the detail message
- */
- public WinRegKeyException( String message ) {
- super( message );
- }
-}
diff --git a/odk/source/com/sun/star/lib/loader/makefile.mk b/odk/source/com/sun/star/lib/loader/makefile.mk
deleted file mode 100644
index f44b6f55..00000000
--- a/odk/source/com/sun/star/lib/loader/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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 = odk
-PACKAGE = com$/sun$/star$/lib$/loader
-TARGET = com_sun_star_lib_loader
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.IF "$(SOLAR_JAVA)"==""
-nojava:
- @echo "Not building javaunohelper because Java is disabled"
-.ENDIF
-
-# Files --------------------------------------------------------
-
-JAVAFILES= \
- Loader.java\
- InstallationFinder.java\
- WinRegKey.java\
- WinRegKeyException.java
-
-JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/odk/source/unoapploader/unx/makefile.mk b/odk/source/unoapploader/unx/makefile.mk
deleted file mode 100644
index 4ba98b13..00000000
--- a/odk/source/unoapploader/unx/makefile.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=unoapploader
-LIBTARGET=NO
-
-LIBSALCPPRT=
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(COM)"=="GCC"
-LINK=$(CC)
-.ENDIF
-
-.IF "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" && "$(OS)"!="DRAGONFLY"
-STDLIB= -ldl
-.ENDIF
-
-
-APP1NOSAL=TRUE
-APP1RPATH=NONE
-
-APP1TARGET= $(TARGET)
-
-APP1OBJS= $(OBJ)$/unoapploader.obj $(SOLARLIBDIR)$/findsofficepath.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/odk/source/unoapploader/unx/unoapploader.c b/odk/source/unoapploader/unx/unoapploader.c
deleted file mode 100644
index 72c6665e..00000000
--- a/odk/source/unoapploader/unx/unoapploader.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#ifdef LINUX
-#define __USE_GNU
-#endif
-#include <dlfcn.h>
-
-#include "cppuhelper/findsofficepath.h"
-#include "rtl/string.h"
-#include "sal/types.h"
-
-char const* getPath();
-char* createCommandName( char* argv0 );
-
-const int SEPARATOR = '/';
-const char* PATHSEPARATOR = ":";
-
-
-/*
- * The main function implements a loader for applications which use UNO.
- *
- * <p>This code runs on the Unix/Linux platforms only.</p>
- *
- * <p>The main function detects a UNO installation on the system and adds the
- * relevant directories of the installation to the LD_LIBRARY_PATH environment
- * variable. After that, the application process is loaded and started, whereby
- * the new process inherits the environment of the calling process, including
- * the modified LD_LIBRARY_PATH environment variable. The application's
- * executable name must be the same as the name of this executable, prefixed
- * by '_'.</p>
- * <p>On MACOSX DYLD_LIBRARY_PATH is used instead of LD_LIBRARY_PATH!<p>
- *
- * <p>A UNO installation can be specified by the user by setting the UNO_PATH
- * environment variable to the program directory of the UNO installation.
- * If no installation is specified by the user, the default installation on
- * the system will be taken. The default installation is found from the
- * PATH environment variable. This requires that the 'soffice' executable or
- * a symbolic link is in one of the directories listed in the PATH environment
- * variable.</p>
- */
-int main( int argc, char *argv[] )
-{
- char const* path;
- char* cmdname;
-
- (void) argc; /* avoid warning about unused parameter */
-
- /* get the path of the UNO installation */
- path = getPath();
-
- if ( path != NULL )
- {
-#if defined(MACOSX)
- static const char* ENVVARNAME = "DYLD_LIBRARY_PATH";
-#elif defined(AIX)
- static const char* ENVVARNAME = "LIBPATH";
-#else
- static const char* ENVVARNAME = "LD_LIBRARY_PATH";
-#endif
- char * libpath;
- int freeLibpath;
-
- char* value;
- char* envstr;
- int size;
-
- size_t pathlen = strlen(path);
- struct stat stat;
- int ret;
- char * unoinfo = malloc(
- pathlen + RTL_CONSTASCII_LENGTH("/unoinfo") + 1);
- /*TODO: overflow */
- if (unoinfo == NULL) {
- fprintf(stderr, "Error: out of memory!\n");
- exit(EXIT_FAILURE);
- }
- strcpy(unoinfo, path);
- strcpy(
- unoinfo + pathlen,
- "/unoinfo" + (pathlen == 0 || path[pathlen - 1] != '/' ? 0 : 1));
- ret = lstat(unoinfo, &stat);
- free(unoinfo);
-
- if (ret == 0) {
- char * cmd = malloc(
- 2 * pathlen + RTL_CONSTASCII_LENGTH("/unoinfo c++") + 1);
- /*TODO: overflow */
- char const * p;
- char * q;
- FILE * f;
- size_t n = 1000;
- size_t old = 0;
- if (cmd == NULL) {
- fprintf(stderr, "Error: out of memory!\n");
- exit(EXIT_FAILURE);
- }
- p = path;
- q = cmd;
- while (*p != '\0') {
- *q++ = '\\';
- *q++ = *p++;
- }
- if (p == path || p[-1] != '/') {
- *q++ = '/';
- }
- strcpy(q, "unoinfo c++");
- f = popen(cmd, "r");
- free(cmd);
- if (f == NULL)
- {
- fprintf(stderr, "Error: calling unoinfo failed!\n");
- exit(EXIT_FAILURE);
- }
- libpath = NULL;
- for (;;) {
- size_t m;
- char * test = realloc(libpath, n);
- if (test == NULL) {
- fprintf(
- stderr,
- "Error: out of memory reading unoinfo output!\n");
- free(libpath);
- exit(EXIT_FAILURE);
- }
- libpath = test;
- m = fread(libpath + old, 1, n - old - 1, f);
- if (m != n - old - 1) {
- if (ferror(f)) {
- fprintf(stderr, "Error: cannot read unoinfo output!\n");
- exit(EXIT_FAILURE);
- }
- libpath[old + m] = '\0';
- break;
- }
- if (n >= SAL_MAX_SIZE / 2) {
- fprintf(
- stderr,
- "Error: out of memory reading unoinfo output!\n");
- exit(EXIT_FAILURE);
- }
- old = n - 1;
- n *= 2;
- }
- if (pclose(f) != 0) {
- fprintf(stderr, "Error: executing unoinfo failed!\n");
- exit(EXIT_FAILURE);
- }
- freeLibpath = 1;
- }
- else
- {
- /* Assume an old OOo 2.x installation without unoinfo: */
- libpath = (char *) path;
- freeLibpath = 0;
- }
-
- value = getenv( ENVVARNAME );
-
- size = strlen( ENVVARNAME ) + strlen( "=" ) + strlen( libpath ) + 1;
- if ( value != NULL )
- size += strlen( PATHSEPARATOR ) + strlen( value );
- envstr = (char*) malloc( size );
- strcpy( envstr, ENVVARNAME );
- strcat( envstr, "=" );
- strcat( envstr, libpath );
- if ( freeLibpath != 0 )
- {
- free( libpath );
- }
- if ( value != NULL )
- {
- strcat( envstr, PATHSEPARATOR );
- strcat( envstr, value );
- }
- putenv( envstr );
- }
- else
- {
- fprintf( stderr, "Warning: no UNO installation found!\n" );
- fflush( stderr );
- }
-
- /* set the executable name for the application process */
- cmdname = createCommandName( argv[0] );
- argv[0] = cmdname;
-
- /*
- * create the application process;
- * if successful, execvp doesn't return to the calling process
- */
- execvp( cmdname, argv );
- fprintf( stderr, "Error: execvp failed!\n" );
- fflush( stderr );
-
- return 0;
-}
-
-/*
- * Gets the path of a UNO installation.
- *
- * @return the installation path or NULL, if no installation was specified or
- * found, or if an error occurred
- */
-char const* getPath()
-{
- char const* path = cppuhelper_detail_findSofficePath();
-
- if ( path == NULL )
- {
- fprintf( stderr, "Warning: getting path from PATH environment "
- "variable failed!\n" );
- fflush( stderr );
- }
-
- return path;
-}
-
-/*
- * Creates the application's executable file name.
- *
- * <p>The application's executable file name is the name of this executable
- * prefixed by '_'.</p>
- *
- * @param argv0 specifies the argv[0] parameter of the main function
- *
- * @return the application's executable file name or NULL, if an error occurred
- */
-char* createCommandName( char* argv0 )
-{
- const char* CMDPREFIX = "_";
- const char* prgname = NULL;
-
- char* cmdname = NULL;
- char* sep = NULL;
-#ifndef AIX
- Dl_info dl_info;
-#endif
-
- /* get the executable file name from argv0 */
- prgname = argv0;
-
-#ifndef AIX
- /*
- * if argv0 doesn't contain an absolute path name, try to get the absolute
- * path name from dladdr; note that this only works for Solaris, not for
- * Linux
- */
- if ( argv0 != NULL && *argv0 != SEPARATOR &&
- dladdr( (void*) &createCommandName, &dl_info ) &&
- dl_info.dli_fname != NULL && *dl_info.dli_fname == SEPARATOR )
- {
- prgname = dl_info.dli_fname;
- }
-#endif
-
- /* prefix the executable file name by '_' */
- if ( prgname != NULL )
- {
- cmdname = (char*) malloc( strlen( prgname ) + strlen( CMDPREFIX ) + 1 );
- sep = strrchr( prgname, SEPARATOR );
- if ( sep != NULL )
- {
- int pos = ++sep - prgname;
- strncpy( cmdname, prgname, pos );
- cmdname[ pos ] = '\0';
- strcat( cmdname, CMDPREFIX );
- strcat( cmdname, sep );
- }
- else
- {
- strcpy( cmdname, CMDPREFIX );
- strcat( cmdname, prgname );
- }
- }
-
- return cmdname;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/source/unoapploader/win/makefile.mk b/odk/source/unoapploader/win/makefile.mk
deleted file mode 100644
index aae10c54..00000000
--- a/odk/source/unoapploader/win/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=unoapploader
-TARGETTYPE=GUI
-LIBTARGET=NO
-
-DYNAMIC_CRT=
-UWINAPILIB=
-NO_DEFAULT_STL=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-APP1NOSAL=TRUE
-APP1RPATH=NONE
-
-APP1TARGET= $(TARGET)
-
-APP1OBJS= $(OBJ)$/unoapploader.obj $(SOLARLIBDIR)$/findsofficepath.obj
-
-APP1STDLIBS=\
- $(ADVAPI32LIB)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/odk/source/unoapploader/win/unoapploader.c b/odk/source/unoapploader/win/unoapploader.c
deleted file mode 100644
index 95228a90..00000000
--- a/odk/source/unoapploader/win/unoapploader.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <process.h>
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include "cppuhelper/findsofficepath.h"
-#include "sal/types.h"
-
-#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
-
-char const* getPath();
-char* createCommandLine( char* lpCmdLine );
-FILE* getErrorFile( int create );
-void writeError( const char* errstr );
-void closeErrorFile();
-
-/*
- * The main function implements a loader for applications which use UNO.
- *
- * <p>This code runs on the Windows platform only.</p>
- *
- * <p>The main function detects a UNO installation on the system and adds the
- * program directory of the UNO installation to the PATH environment variable.
- * After that, the application process is loaded and started, whereby the
- * new process inherits the environment of the calling process, including
- * the modified PATH environment variable. The application's executable name
- * must be the same as the name of this executable, prefixed by '_'.</p>
- *
- * <p>A UNO installation can be specified by the user by setting the UNO_PATH
- * environment variable to the program directory of the UNO installation.
- * If no installation is specified by the user, the default installation on
- * the system will be taken. The default installation is read from the
- * default value of the key "Software\OpenOffice.org\UNO\InstallPath" from the
- * root key HKEY_CURRENT_USER in the Windows Registry. If this key is missing,
- * the key is read from the root key HKEY_LOCAL_MACHINE.</p>
- */
-int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
- LPSTR lpCmdLine, int nCmdShow )
-{
- const char* ENVVARNAME = "PATH";
- const char* PATHSEPARATOR = ";";
-
- char const* path = NULL;
- char path2[MAX_PATH];
- char* value = NULL;
- char* envstr = NULL;
- char* cmdline = NULL;
- int size;
- STARTUPINFO startup_info;
- PROCESS_INFORMATION process_info;
- BOOL bCreate;
-
- (void) hInstance; /* unused */
- (void) hPrevInstance; /* unused */
- (void) nCmdShow; /* unused */
-
- /* get the path of the UNO installation */
- path = getPath();
-
- if ( path != NULL )
- {
- wchar_t cmd[
- MY_LENGTH(L"\"") + MAX_PATH +
- MY_LENGTH(L"\\unoinfo.exe\" c++")];
- /* hopefully does not overflow */
- int pathsize;
- SECURITY_ATTRIBUTES sec;
- HANDLE temp;
- HANDLE stdoutRead;
- HANDLE stdoutWrite;
- STARTUPINFOW startinfo;
- PROCESS_INFORMATION procinfo;
- int ret;
- cmd[0] = L'"';
- pathsize = MultiByteToWideChar(CP_ACP, 0, path, -1, cmd + 1, MAX_PATH);
- if (pathsize == 0) {
- writeError("Error: MultiByteToWideChar failed!\n");
- closeErrorFile();
- return 1;
- }
- if (wcschr(cmd + 1, L'"') != NULL) {
- writeError("Error: bad characters in UNO installation path!\n");
- closeErrorFile();
- return 1;
- }
- wcscpy(
- cmd + pathsize,
- (L"\\unoinfo.exe\" c++" +
- (pathsize == 1 || cmd[pathsize - 1] != L'\\' ? 0 : 1)));
- sec.nLength = sizeof (SECURITY_ATTRIBUTES);
- sec.lpSecurityDescriptor = NULL;
- sec.bInheritHandle = TRUE;
- if (CreatePipe(&temp, &stdoutWrite, &sec, 0) == 0 ||
- DuplicateHandle(
- GetCurrentProcess(), temp, GetCurrentProcess(), &stdoutRead, 0,
- FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS) == 0)
- {
- writeError("Error: CreatePipe/DuplicateHandle failed!\n");
- closeErrorFile();
- return 1;
- }
- memset(&startinfo, 0, sizeof (STARTUPINFOW));
- startinfo.cb = sizeof (STARTUPINFOW);
- startinfo.lpDesktop = L"";
- startinfo.dwFlags = STARTF_USESTDHANDLES;
- startinfo.hStdOutput = stdoutWrite;
- ret = CreateProcessW(
- NULL, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &startinfo, &procinfo);
- if (ret != 0) {
- char * buf = NULL;
- size_t n = 1000;
- size_t k = 0;
- DWORD exitcode;
- int path2size;
- CloseHandle(stdoutWrite);
- CloseHandle(procinfo.hThread);
- for (;;) {
- DWORD m;
- char * test = realloc(buf, n);
- if (test == NULL) {
- writeError(
- "Error: out of memory reading unoinfo output!\n");
- closeErrorFile();
- free(buf);
- return 1;
- }
- buf = test;
- if (!ReadFile(stdoutRead, buf + k, n - k, &m, NULL))
- {
- DWORD err = GetLastError();
- if (err == ERROR_HANDLE_EOF || err == ERROR_BROKEN_PIPE) {
- break;
- }
- writeError("Error: cannot read unoinfo output!\n");
- closeErrorFile();
- return 1;
- }
- if (m == 0) {
- break;
- }
- k += m;
- if (k >= n) {
- if (n >= SAL_MAX_SIZE / 2) {
- writeError(
- "Error: out of memory reading unoinfo output!\n");
- closeErrorFile();
- return 1;
- }
- n *= 2;
- }
- }
- if ((k & 1) == 1) {
- writeError("Error: bad unoinfo output!\n");
- closeErrorFile();
- return 1;
- }
- CloseHandle(stdoutRead);
- if (!GetExitCodeProcess(procinfo.hProcess, &exitcode) ||
- exitcode != 0)
- {
- writeError("Error: executing unoinfo failed!\n");
- closeErrorFile();
- return 1;
- }
- if (k == 0) {
- path2size = 0;
- } else {
- path2size = WideCharToMultiByte(
- CP_ACP, 0, (wchar_t *) buf, k / 2, path2, MAX_PATH - 1,
- NULL, NULL);
- if (path2size == 0) {
- writeError("Error: converting unoinfo output failed!\n");
- closeErrorFile();
- return 1;
- }
- }
- path2[path2size] = '\0';
- path = path2;
- } else {
- if (GetLastError() != ERROR_FILE_NOT_FOUND) {
- writeError("Error: calling unoinfo failed!\n");
- closeErrorFile();
- return 1;
- }
- CloseHandle(stdoutRead);
- CloseHandle(stdoutWrite);
- }
-
- /* get the value of the PATH environment variable */
- value = getenv( ENVVARNAME );
-
- /*
- * add the UNO installation path to the PATH environment variable;
- * note that this only affects the environment variable of the current
- * process, the command processor's environment is not changed
- */
- size = strlen( ENVVARNAME ) + strlen( "=" ) + strlen( path ) + 1;
- if ( value != NULL )
- size += strlen( PATHSEPARATOR ) + strlen( value );
- envstr = (char*) malloc( size );
- strcpy( envstr, ENVVARNAME );
- strcat( envstr, "=" );
- strcat( envstr, path );
- if ( value != NULL )
- {
- strcat( envstr, PATHSEPARATOR );
- strcat( envstr, value );
- }
- _putenv( envstr );
- free( envstr );
- }
- else
- {
- writeError( "Warning: no UNO installation found!\n" );
- }
-
- /* create the command line for the application process */
- cmdline = createCommandLine( lpCmdLine );
- if ( cmdline == NULL )
- {
- writeError( "Error: cannot create command line!\n" );
- closeErrorFile();
- return 1;
- }
-
- /* create the application process */
- memset( &startup_info, 0, sizeof( STARTUPINFO ) );
- startup_info.cb = sizeof( STARTUPINFO );
- bCreate = CreateProcess( NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL,
- &startup_info, &process_info );
- free( cmdline );
- if ( !bCreate )
- {
- writeError( "Error: cannot create process!\n" );
- closeErrorFile();
- return 1;
- }
-
- /* close the error file */
- closeErrorFile();
-
- return 0;
-}
-
-/*
- * Gets the path of a UNO installation.
- *
- * @return the installation path or NULL, if no installation was specified or
- * found, or if an error occurred
- */
-char const* getPath()
-{
- char const* path = cppuhelper_detail_findSofficePath();
-
- if ( path == NULL )
- writeError( "Warning: getting path from Windows Registry failed!\n" );
-
- return path;
-}
-
-/*
- * Creates the command line for the application process including the absolute
- * path of the executable.
- *
- * <p>The application's executable file name is the name of this executable
- * prefixed by '_'.</p>
- *
- * @param appendix specifies the command line for the application excluding
- * the executable name
- *
- * @return the command line for the application process or NULL, if an error
- * occurred
- */
-char* createCommandLine( char* appendix )
-{
- const char* CMDPREFIX = "_";
- const char* DQUOTE = "\"";
- const char* SPACE = " ";
-
- char* cmdline = NULL;
-
- char cmdname[ _MAX_PATH ];
- char drive[ _MAX_DRIVE ];
- char dir[ _MAX_PATH ];
- char base[ _MAX_FNAME ];
- char newbase[ _MAX_FNAME ];
- char ext[ _MAX_EXT ];
-
- /* get the absolute path of the executable file */
- if ( GetModuleFileName( NULL, cmdname, sizeof( cmdname ) ) )
- {
- /* prefix the executable file name by '_' */
- _splitpath( cmdname, drive, dir, base, ext );
- strcpy( newbase, CMDPREFIX );
- strcat( newbase, base );
- _makepath( cmdname, drive, dir, newbase, ext );
-
- /* create the command line */
- cmdline = (char*) malloc( strlen( DQUOTE ) + strlen( cmdname ) +
- strlen ( DQUOTE ) + strlen( SPACE ) + strlen( appendix ) + 1 );
- strcpy( cmdline, DQUOTE );
- strcat( cmdline, cmdname );
- strcat( cmdline, DQUOTE );
- strcat( cmdline, SPACE );
- strcat( cmdline, appendix );
- }
-
- return cmdline;
-}
-
-/*
- * Gets the pointer to the error file.
- *
- * <p>The error file will only be created, if create != 0.</p>
- *
- * <p>The error file has the name <executable file name>-error.log and is
- * created in the same directory as the executable file. If this fails,
- * the error file is created in the directory designated for temporary files.
- * </p>
-
- * @param create specifies, if the error file should be created (create != 0)
- *
- * @return the pointer to the open error file or NULL, if no error file is
- * open or can be created
- */
-FILE* getErrorFile( int create )
-{
- const char* MODE = "w";
- const char* BASEPOSTFIX = "-error";
- const char* EXTENSION = ".log";
-
- static FILE* ferr = NULL;
-
- char fname[ _MAX_PATH ];
- char drive[ _MAX_DRIVE ];
- char dir[ _MAX_PATH ];
- char base[ _MAX_FNAME ];
- char newbase[ _MAX_FNAME ];
- char ext[ _MAX_EXT ];
-
- if ( ferr == NULL && create )
- {
- /* get the absolute path of the executable file */
- if ( GetModuleFileName( NULL, fname, sizeof( fname ) ) )
- {
- /* create error file in the directory of the executable file */
- _splitpath( fname, drive, dir, base, ext );
- strcpy( newbase, base );
- strcat( newbase, BASEPOSTFIX );
- _makepath( fname, drive, dir, newbase, EXTENSION );
- ferr = fopen( fname, MODE );
-
- if ( ferr == NULL )
- {
- /* create error file in the temp directory */
- GetTempPath( sizeof( fname ), fname );
- strcat( fname, newbase );
- strcat( fname, EXTENSION );
- ferr = fopen( fname, MODE );
- }
- }
- }
-
- return ferr;
-}
-
-/*
- * Writes an error message to the error file.
- *
- * @param errstr specifies the error message
- */
-void writeError( const char* errstr )
-{
- FILE* ferr = getErrorFile( 1 );
- if ( ferr != NULL )
- {
- fprintf( ferr, errstr );
- fflush( ferr );
- }
-}
-
-/*
- * Closes the error file.
- */
-void closeErrorFile()
-{
- FILE* ferr = getErrorFile( 0 );
- if ( ferr != NULL )
- fclose( ferr );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/source/unowinreg/win/makefile.mk b/odk/source/unowinreg/win/makefile.mk
deleted file mode 100644
index 605848b3..00000000
--- a/odk/source/unowinreg/win/makefile.mk
+++ /dev/null
@@ -1,114 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=odk
-TARGET=unowinreg
-ENABLE_EXCEPTIONS=TRUE
-
-NO_DEFAULT_STL=TRUE
-NO_BSYMBOLIC=TRUE
-USE_DEFFILE=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-JAVA_INCLUDES:= -I$(JAVA_HOME)/include
-
-# values taken from set_soenv.in
-.IF "$(OS)" == "LINUX"
-JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux
-.ELIF "$(OS)" == "FREEBSD"
-JAVA_INCLUDES+= -I$(JAVA_HOME)/include/freebsd
-JAVA_INCLUDES+= -I$(JAVA_HOME)/include/bsd
-JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux
-.ELIF "$(OS)" == "NETBSD"
-JAVA_INCLUDES+= -I$(JAVA_HOME)/include/netbsd
-.ENDIF
-
-.IF "$(SOLAR_JAVA)"==""
-nojava:
- @echo "Not building javaunohelper because Java is disabled"
-.ENDIF
-
-.IF "$(OS)" != "WNT"
-
-.IF "$(BUILD_UNOWINREG)" == "YES"
-
-$(BIN)$/unowinreg.dll : unowinreg.cxx
- $(MINGWCXX) -Wall -D_JNI_IMPLEMENTATION_ $(JAVA_INCLUDES) \
- -I$(PRJ)/inc/pch -shared -o $(BIN)$/unowinreg.dll unowinreg.cxx \
- -Wl,--kill-at -lkernel32 -ladvapi32
- $(MINGWSTRIP) $(BIN)$/unowinreg.dll
-
-.ELSE
-
-$(BIN)$/unowinreg.dll : $(TARFILE_LOCATION)/185d60944ea767075d27247c3162b3bc-unowinreg.dll
- @@-rm -f $@
- $(GNUCOPY) $< $@
-
-.ENDIF
-
-.ELSE # "$(OS)" != "WNT"
-# Always build unowinreg.dll on windows
-
-# --- Files --------------------------------------------------------
-
-LINKFLAGS+=-MANIFEST:NO
-SLOFILES = \
- $(SLO)$/unowinreg.obj
-SHL1TARGET=$(TARGET)
-SHL1LIBS=$(SLB)$/$(TARGET).lib
-
-#No default libraries
-STDSHL=
-.IF "$(COM)"=="GCC"
-SHL1STDLIBS += -lstdc++
-.IF "$(MINGW_GCCLIB_EH)"=="YES"
-SHL1STDLIBS += -lgcc_eh
-.ENDIF
-SHL1STDLIBS += -lgcc -lmingw32 -lmoldname -lmsvcrt
-.ENDIF
-
-SHL1STDLIBS +=\
- $(KERNEL32LIB)\
- $(ADVAPI32LIB)
-
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME=$(SHL1TARGET)
-DEF1EXPORTFILE=$(TARGET).dxp
-DEF1DES=unowinreg
-
-.ENDIF # "$(OS)" != "WNT"
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/odk/source/unowinreg/win/unowinreg.cxx b/odk/source/unowinreg/win/unowinreg.cxx
deleted file mode 100644
index bab1a3f9..00000000
--- a/odk/source/unowinreg/win/unowinreg.cxx
+++ /dev/null
@@ -1,188 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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_odk.hxx"
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <jni.h>
-
-extern "C" BOOL __stdcall _DllMainCRTStartup(HINSTANCE, DWORD, LPVOID)
-{
- return TRUE;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenClassesRoot(
- JNIEnv *env, jclass, jlongArray hkresult)
-{
- jboolean ret = JNI_FALSE;
- PHKEY phkey = (PHKEY)env->GetLongArrayElements(hkresult, 0);
- if (RegOpenKeyEx(HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, phkey)
- == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseLongArrayElements(hkresult, (jlong *)phkey, 0);
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentConfig(
- JNIEnv *env, jclass, jlongArray hkresult)
-{
- jboolean ret = JNI_FALSE;
- PHKEY phkey = (PHKEY)env->GetLongArrayElements(hkresult, 0);
- if (RegOpenKeyEx(HKEY_CURRENT_CONFIG, NULL, 0, KEY_READ, phkey)
- == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseLongArrayElements(hkresult, (jlong *)phkey, 0);
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentUser(
- JNIEnv *env, jclass, jlongArray hkresult)
-{
- jboolean ret = JNI_FALSE;
- PHKEY phkey = (PHKEY)env->GetLongArrayElements(hkresult, 0);
- if (RegOpenKeyEx(HKEY_CURRENT_USER, NULL, 0, KEY_READ, phkey)
- == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseLongArrayElements(hkresult, (jlong *)phkey, 0);
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenLocalMachine(
- JNIEnv *env, jclass, jlongArray hkresult)
-{
- jboolean ret = JNI_FALSE;
- PHKEY phkey = (PHKEY)env->GetLongArrayElements(hkresult, 0);
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, NULL, 0, KEY_READ, phkey)
- == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseLongArrayElements(hkresult, (jlong *)phkey, 0);
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenUsers(
- JNIEnv *env, jclass, jlongArray hkresult)
-{
- jboolean ret = JNI_FALSE;
- PHKEY phkey = (PHKEY)env->GetLongArrayElements(hkresult, 0);
- if (RegOpenKeyEx(HKEY_USERS, NULL, 0, KEY_READ, phkey) == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseLongArrayElements(hkresult, (jlong *)phkey, 0);
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenKeyEx(
- JNIEnv *env, jclass, jlong parent, jstring name, jlongArray hkresult)
-{
- jboolean ret = JNI_FALSE;
- const char *namestr = env->GetStringUTFChars(name, 0);
- PHKEY phkey = (PHKEY)env->GetLongArrayElements(hkresult, 0);
- if (RegOpenKeyEx((HKEY)parent, namestr, 0, KEY_READ, phkey)
- == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseStringUTFChars(name, namestr);
- env->ReleaseLongArrayElements(hkresult, (jlong *)phkey, 0);
- return ret;
-}
-
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegCloseKey(
- JNIEnv *, jclass, jlong hkey)
-{
- jboolean ret = JNI_FALSE;
- if (RegCloseKey((HKEY)hkey) == ERROR_SUCCESS)
- ret = JNI_TRUE;
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean
- JNICALL Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryValueEx(
- JNIEnv *env, jclass, jlong hkey, jstring value, jlongArray type,
- jbyteArray data, jlongArray size)
-{
- jboolean ret = JNI_FALSE;
- const char* valuestr = env->GetStringUTFChars(value, 0);
- LPDWORD ptype = (LPDWORD)env->GetLongArrayElements(type, 0);
- LPBYTE pdata = (LPBYTE)env->GetByteArrayElements(data, 0);
- LPDWORD psize = (LPDWORD)env->GetLongArrayElements(size, 0);
- if (RegQueryValueEx((HKEY)hkey, valuestr, NULL, ptype, pdata, psize)
- == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseStringUTFChars(value, valuestr);
- env->ReleaseLongArrayElements(type, (jlong *)ptype, 0);
- env->ReleaseByteArrayElements(data, (jbyte *)pdata, 0);
- env->ReleaseLongArrayElements(size, (jlong *)psize, 0);
- return ret;
-}
-
-extern "C" JNIEXPORT jboolean JNICALL
- Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryInfoKey(
- JNIEnv *env, jclass, jlong hkey, jlongArray subkeys,
- jlongArray maxSubkeyLen, jlongArray values, jlongArray maxValueNameLen,
- jlongArray maxValueLen, jlongArray secDescriptor)
-{
- jboolean ret = JNI_FALSE;
- LPDWORD psubkeys = (LPDWORD)env->GetLongArrayElements(subkeys, 0);
- LPDWORD pmaxSubkeyLen =
- (LPDWORD)env->GetLongArrayElements(maxSubkeyLen, 0);
- LPDWORD pvalues = (LPDWORD)env->GetLongArrayElements(values, 0);
- LPDWORD pmaxValueNameLen =
- (LPDWORD)env->GetLongArrayElements(maxValueNameLen, 0);
- LPDWORD pmaxValueLen =
- (LPDWORD)env->GetLongArrayElements(maxValueLen, 0);
- LPDWORD psecDescriptor =
- (LPDWORD)env->GetLongArrayElements(secDescriptor, 0);
- FILETIME ft;
- if (RegQueryInfoKey((HKEY)hkey, NULL, NULL, NULL, psubkeys, pmaxSubkeyLen,
- NULL, pvalues, pmaxValueNameLen, pmaxValueLen,
- psecDescriptor, &ft) == ERROR_SUCCESS)
- ret = JNI_TRUE;
- env->ReleaseLongArrayElements(subkeys, (jlong*)psubkeys, 0);
- env->ReleaseLongArrayElements(maxSubkeyLen, (jlong*)pmaxSubkeyLen, 0);
- env->ReleaseLongArrayElements(values, (jlong*)pvalues, 0);
- env->ReleaseLongArrayElements(maxValueNameLen, (jlong*)pmaxValueNameLen, 0);
- env->ReleaseLongArrayElements(maxValueLen, (jlong*)pmaxValueLen, 0);
- env->ReleaseLongArrayElements(secDescriptor, (jlong*)psecDescriptor, 0);
- return ret;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/source/unowinreg/win/unowinreg.dxp b/odk/source/unowinreg/win/unowinreg.dxp
deleted file mode 100644
index af44919d..00000000
--- a/odk/source/unowinreg/win/unowinreg.dxp
+++ /dev/null
@@ -1,9 +0,0 @@
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenClassesRoot
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentConfig
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenCurrentUser
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenLocalMachine
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenUsers
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegOpenKeyEx
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegCloseKey
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryValueEx
-Java_com_sun_star_lib_loader_WinRegKey_winreg_1RegQueryInfoKey
diff --git a/odk/util/check.pl b/odk/util/check.pl
deleted file mode 100644
index 162d5310..00000000
--- a/odk/util/check.pl
+++ /dev/null
@@ -1,487 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-#
-# check - a perl script to check some files and directories if they exists
-# A first simple check if the SDK was built completely.
-#
-#use IO::File;
-
-$return = 0;
-
-$StartDir = "$ARGV[0]";
-$OperatingSystem = "$ARGV[1]";
-$ExePrefix = "$ARGV[2]";
-
-print "Check for $OperatingSystem\n";
-
-if (-d "$StartDir") {
- # check binaries
- print "check binaries: ";
- if (-d "$StartDir/bin") {
- my @binarylist = ( "idlc","idlcpp","cppumaker","javamaker",
- "regcompare","autodoc",
- "unoapploader", "uno-skeletonmaker" );
-
- foreach $i (@binarylist)
- {
- if (! -e "$StartDir/bin/$i$ExePrefix") {
- $return++;
- print "\nERROR: \"$StartDir/bin/$i$ExePrefix\" is missing\n";
- } else {
- print "+";
- }
- }
-
- if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
- if ($OperatingSystem eq "windows" && ! -e "$StartDir/bin/climaker.exe") {
- $return++;
- print "\nERROR: \"$StartDir/bin/climaker.exe\" is missing\n";
- } else {
- print "+";
- }
- }
- if ($OperatingSystem eq "macosx") {
- if (! -e "$StartDir/bin/addsym-macosx.sh") {
- $return++;
- print "\nERROR: \"$StartDir/bin/addsym-macosx.sh\" is missing\n";
- } else {
- print "+";
- }
- }
- } else {
- $return++;
- }
- print "\n";
-
- # packaging files
- print "check packaging files: ";
- if (-d "$StartDir/docs") {
- my @filelist = ( "install.html",
- "notsupported.html","sdk_styles.css","tools.html",
- "images/arrow-1.gif", "images/arrow-3.gif",
- "images/odk-footer-logo.gif",
- "images/bg_table.png","images/bg_table2.png",
- "images/bg_table3.png", "images/nav_down.png",
- "images/nav_home.png","images/nav_left.png",
- "images/nav_right.png","images/nav_up.png",
- "images/sdk_head-1.png", "images/sdk_head-2.png",
- "images/sdk_line-1.gif", "images/sdk_line-2.gif",
- "common/ref/idl.css", "images/nada.gif",
- "images/arrow-2.gif", "images/bluball.gif",
- "images/orc-main-app_32.png", "images/ooo-main-app_32.png");
-
- foreach $i (@filelist)
- {
- if (! -e "$StartDir/docs/$i") {
- $return++;
- print "\nERROR: \"$StartDir/docs/$i\" is missing\n";
- } else {
- print "+";
- }
- }
- } else {
- $return++;
- }
- print "\n";
-
- #check configure files
- print "check config files: ";
- if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
- if (! -e "$StartDir/setsdkenv_windows.bat") {
- print "\nERROR: \"$StartDir/setsdkenv_windows.bat\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/setsdkenv_windows.template") {
- print "\nERROR: \"$StartDir/setsdkenv_windows.template\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/cfgWin.js") {
- print "\nERROR: \"$StartDir/cfgWin.js\" is missing\n";
- $return++;
- }
- } else {
- if (! -e "$StartDir/configure.pl") {
- print "\nERROR: \"$StartDir/configure.pl\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/config.guess") {
- print "\nERROR: \"$StartDir/config.guess\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/config.sub") {
- print "\nERROR: \"$StartDir/config.sub\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/setsdkenv_unix") {
- print "\nERROR: \"$StartDir/setsdkenv_unix\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/setsdkenv_unix.sh.in") {
- print "\nERROR: \"$StartDir/setsdkenv_unix.sh.in\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/setsdkenv_unix.csh.in") {
- print "\nERROR: \"$StartDir/setsdkenv_unix.csh.in\" is missing\n";
- $return++;
- }
- }
- print "\n";
-
- #check setting files
- print "check setting files: ";
- if (-d "$StartDir/settings") {
- if (! -e "$StartDir/settings/settings.mk") {
- print "\nERROR: \"$StartDir/settings/settings.mk\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/settings/std.mk") {
- print "\nERROR: \"$StartDir/settings/std.mk\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/settings/stdtarget.mk") {
- print "\nERROR: \"$StartDir/settings/stdtarget.mk\" is missing\n";
- $return++;
- }
- } else {
- $return++;
- }
- print "\n";
-
- #check cpp docu, it is only a first and simple check
- # improvement required
- print "check cpp docu: ";
- if (-d "$StartDir/docs/cpp/ref") {
- if (! -e "$StartDir/docs/cpp/ref/index.html") {
- print "\nERROR: \"$StartDir/docs/cpp/ref/index.html\" is missing\n";
- $return++;
- }
- if (! -d "$StartDir/docs/cpp/ref/index-files") {
- print "\nERROR: \"$StartDir/docs/cpp/ref/index-files\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/docs/cpp/ref/index-files/index-10.html") {
- print "\nERROR: \"$StartDir/docs/cpp/ref/index-files/index-10.html\" is missing\n";
- $return++;
- }
-
- my @dir_list = ( "com","com/sun","com/sun/star","com/sun/star/uno",
- "com/sun/star/uno/Any","com/sun/star/uno/Type",
- "com/sun/star/uno/Array","com/sun/star/uno/WeakReferenceHelper",
- "com/sun/star/uno/Reference","com/sun/star/uno/WeakReference",
- "com/sun/star/uno/Environment","com/sun/star/uno/Sequence",
- "com/sun/star/uno/BaseReference","com/sun/star/uno/Mapping",
- "com/sun/star/uno/ContextLayer","com/sun/star/uno/TypeDescription",
- "osl","osl/File","osl/Pipe","osl/FileStatus","osl/FileBase",
- "osl/Guard","osl/Mutex","osl/VolumeInfo","osl/GetGlobalMutex",
- "osl/Security","osl/Profile","osl/DatagramSocket","osl/SocketAddr",
- "osl/StreamPipe","osl/ResettableGuard","osl/AcceptorSocket",
- "osl/ClearableGuard","osl/VolumeDevice","rtl","rtl/Uri","rtl/math",
- "rtl/OUStringHash","rtl/MalformedUriException","rtl/OUStringBuffer",
- "rtl/OUString","rtl/Reference","rtl/ByteSequence","rtl/OLocale",
- "rtl/Logfile","rtl/OString","rtl/IReference","rtl/OStringBuffer",
- "rtl/OStringHash","_typelib_CompoundTypeDescription","cppu",
- "cppu/ContextEntry_Init","cppu/ImplInheritanceHelper10",
- "cppu/ImplInheritanceHelper11","cppu/ImplInheritanceHelper12",
- "cppu/WeakAggImplHelper1","cppu/WeakAggImplHelper2",
- "cppu/WeakAggImplHelper3","cppu/WeakAggImplHelper4",
- "cppu/WeakAggImplHelper5","cppu/WeakAggImplHelper6",
- "cppu/WeakAggImplHelper7","cppu/WeakAggImplHelper8",
- "cppu/WeakAggImplHelper9",
- "cppu/OMultiTypeInterfaceContainerHelperInt32","cppu/AccessControl",
- "cppu/OPropertyArrayHelper","cppu/ImplHelper1","cppu/ImplHelper2",
- "cppu/ImplHelper3","cppu/ImplHelper4","cppu/ImplHelper5",
- "cppu/ImplHelper6","cppu/ImplHelper7","cppu/ImplHelper8",
- "cppu/ImplHelper9","cppu/WeakComponentImplHelper10",
- "cppu/WeakComponentImplHelper11","cppu/WeakComponentImplHelper12",
- "cppu/UnoUrl","cppu/WeakComponentImplHelper1",
- "cppu/WeakComponentImplHelper2","cppu/WeakComponentImplHelper3",
- "cppu/WeakComponentImplHelper4","cppu/WeakComponentImplHelper5",
- "cppu/WeakComponentImplHelper6","cppu/WeakComponentImplHelper7",
- "cppu/WeakComponentImplHelper8","cppu/WeakComponentImplHelper9",
- "cppu/OInterfaceIteratorHelper",
- "cppu/OMultiTypeInterfaceContainerHelper","cppu/UnoUrlDescriptor",
- "cppu/IPropertyArrayHelper","cppu/OBroadcastHelperVar",
- "cppu/OComponentHelper","cppu/OWeakAggObject",
- "cppu/ImplementationEntry","cppu/WeakImplHelper10",
- "cppu/WeakImplHelper11","cppu/WeakImplHelper12",
- "cppu/OPropertySetHelper","cppu/ImplHelper10","cppu/ImplHelper11",
- "cppu/ImplHelper12","cppu/WeakAggImplHelper10",
- "cppu/WeakAggImplHelper11","cppu/WeakAggImplHelper12",
- "cppu/ImplInheritanceHelper1","cppu/ImplInheritanceHelper2",
- "cppu/ImplInheritanceHelper3","cppu/ImplInheritanceHelper4",
- "cppu/ImplInheritanceHelper5","cppu/ImplInheritanceHelper6",
- "cppu/ImplInheritanceHelper7","cppu/ImplInheritanceHelper8",
- "cppu/ImplInheritanceHelper9","cppu/OTypeCollection",
- "cppu/WeakAggComponentImplHelper10",
- "cppu/WeakAggComponentImplHelper11",
- "cppu/WeakAggComponentImplHelper12",
- "cppu/WeakAggComponentImplHelper1",
- "cppu/WeakAggComponentImplHelper2",
- "cppu/WeakAggComponentImplHelper3",
- "cppu/WeakAggComponentImplHelper4",
- "cppu/WeakAggComponentImplHelper5",
- "cppu/WeakAggComponentImplHelper6",
- "cppu/WeakAggComponentImplHelper7",
- "cppu/WeakAggComponentImplHelper8",
- "cppu/WeakAggComponentImplHelper9",
- "cppu/OMultiTypeInterfaceContainerHelperVar",
- "cppu/OInterfaceContainerHelper","cppu/OImplementationId",
- "cppu/AggImplInheritanceHelper1","cppu/AggImplInheritanceHelper2",
- "cppu/AggImplInheritanceHelper3","cppu/AggImplInheritanceHelper4",
- "cppu/AggImplInheritanceHelper5","cppu/AggImplInheritanceHelper6",
- "cppu/AggImplInheritanceHelper7","cppu/AggImplInheritanceHelper8",
- "cppu/AggImplInheritanceHelper9","cppu/AggImplInheritanceHelper10",
- "cppu/AggImplInheritanceHelper11","cppu/AggImplInheritanceHelper12",
- "cppu/WeakImplHelper1","cppu/WeakImplHelper2","cppu/WeakImplHelper3",
- "cppu/WeakImplHelper4","cppu/WeakImplHelper5","cppu/WeakImplHelper6",
- "cppu/WeakImplHelper7","cppu/WeakImplHelper8","cppu/WeakImplHelper9",
- "cppu/OWeakObject","__store_FindData","_rtl_StandardModuleCount",
- "RTUik","RTConstValue","_typelib_TypeDescriptionReference",
- "_typelib_InterfaceMethodTypeDescription","store","RegistryKey",
- "_typelib_Union_Init","_sal_Sequence","_typelib_Parameter_Init",
- "_typelib_TypeDescription","_uno_Environment",
- "_typelib_InterfaceAttributeTypeDescription",
- "_rtl_ModuleCount","_uno_ExtEnvironment",
- "_typelib_IndirectTypeDescription",
- "Registry_Api","_oslFileStatus",
- "_typelib_InterfaceMemberTypeDescription","RegistryValueList",
- "RegistryTypeWriter_Api","_rtl_TextEncodingInfo",
- "namespace_anonymous_1",
- "_oslVolumeInfo","_uno_Interface",
- "_typelib_InterfaceTypeDescription","_uno_Mapping","Registry",
- "RegistryTypeReader_Api","_typelib_Uik",
- "_typelib_ArrayTypeDescription",
- "RegistryKeyArray","RegistryTypeReader","RegistryKeyNames",
- "RTConstValueUnion","_typelib_UnionTypeDescription","_uno_Any",
- "RegistryTypeWriter","_rtl_Locale","_typelib_CompoundMember_Init",
- "_typelib_EnumTypeDescription","_typelib_MethodParameter");
-
- foreach $i (@dir_list)
- {
- if (! -d "$StartDir/docs/cpp/ref/names/$i") {
- $return++;
- print "\nERROR: \"$StartDir/docs/cpp/ref/names/$i\" is missing\n";
- } else {
- print "+";
- }
- }
- } else {
- $return++;
- }
- print "\n";
-
- #check java docu, it is only a first and simple check
- # improvement required
- my $solar_java = $ENV{"SOLAR_JAVA"};
- my $JDK = $ENV{"JDK"};
- if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
- print "check java docu: ";
- if (-d "$StartDir/docs/java/ref") {
- if (! -e "$StartDir/docs/java/ref/index.html") {
- print "\nERROR: \"$StartDir/docs/java/ref/index.html\" is missing\n";
- $return++;
- }
-
- my @dir_list = ( "lib","lib/uno","lib/uno/helper","lib/uno/helper/class-use",
- "uno","uno/class-use","comp","comp/helper",
- "comp/helper/class-use");
-
- foreach $i (@dir_list)
- {
- if (! -d "$StartDir/docs/java/ref/com/sun/star/$i") {
- $return++;
- print "\nERROR: \"$StartDir/docs/java/ref/com/sun/star/$i\" is missing\n";
- } else {
- print "+";
- }
- }
- } else {
- $return++;
- }
- print "\n";
- }
-
- #check idl docu, it is only a first and simple check
- # improvement required
- print "check idl docu: ";
- if (-d "$StartDir/docs/common/ref") {
- if (! -e "$StartDir/docs/common/ref/module-ix.html") {
- print "\nERROR: \"$StartDir/docs/common/ref/module-ix.html\" is missing\n";
- $return++;
- }
- if (! -d "$StartDir/docs/common/ref/index-files") {
- print "\nERROR: \"$StartDir/docs/common/ref/index-files\" is missing\n";
- $return++;
- }
- if (! -e "$StartDir/docs/common/ref/index-files/index-10.html") {
- print "\nERROR: \"$StartDir/docs/common/ref/index-files/index-10.html\" is missing\n";
- $return++;
- }
-
- my @idl_dirlist = ( "accessibility",
- "animations",
- "auth",
- "awt",
- "awt/tab",
- "awt/tree",
- "awt/grid",
- "beans",
- "bridge",
- "bridge/oleautomation",
- "chart",
- "chart2",
- "chart2/data",
- "configuration",
- "configuration/backend",
- "configuration/backend/xml",
- "configuration/bootstrap",
- "connection",
- "container",
- "datatransfer",
- "datatransfer/clipboard",
- "datatransfer/dnd",
- "deployment",
- "deployment/ui",
- "document",
- "drawing",
- "drawing/framework",
- "embed",
- "form",
- "form/binding",
- "form/component",
- "form/control",
- "form/inspection",
- "form/runtime",
- "form/submission",
- "form/validation",
- "formula",
- "frame",
- "frame/status",
- "gallery",
- "geometry",
- "graphic",
- "i18n",
- "image",
- "inspection",
- "installation",
- "io",
- "java",
- "lang",
- "ldap",
- "linguistic2",
- "loader",
- "logging",
- "mail",
- "media",
- "mozilla",
- "packages",
- "packages/manifest",
- "packages/zip",
- "plugin",
- "presentation",
- "reflection",
- "registry",
- "rendering",
- "report",
- "report/inspection",
- "resource",
- "scanner",
- "script",
- "script/browse",
- "script/provider",
- "sdb",
- "sdb/application",
- "sdb/tools",
- "sdbc",
- "sdbcx",
- "security",
- "setup",
- "sheet",
- "smarttags",
- "style",
- "svg",
- "sync",
- "sync2",
- "system",
- "table",
- "task",
- "test",
- "test/bridge",
- "test/performance",
- "text",
- "text/fieldmaster",
- "text/textfield",
- "text/textfield/docinfo",
- "ucb",
- "ui",
- "ui/dialogs",
- "uno",
- "uri",
- "util",
- "util/logging",
- "view",
- "xforms",
- "xml",
- "xml/crypto",
- "xml/crypto/sax",
- "xml/csax",
- "xml/dom",
- "xml/dom/events",
- "xml/dom/views",
- "xml/input",
- "xml/sax",
- "xml/wrapper",
- "xml/xpath",
- "xsd" );
-
- foreach $i (@idl_dirlist)
- {
- if (! -d "$StartDir/docs/common/ref/com/sun/star/$i") {
- $return++;
- print "\nERROR: \"$StartDir/docs/common/ref/com/sun/star/$i\" is missing\n";
- } else {
- print "+";
- }
- }
- } else {
- $return++;
- }
- print "\n";
-
-} else {
- $return++;
-}
-
-if( $return != 0 )
-{
- print "ERROR\n";
- unlink "$ARGV[3]";
-} else {
- print "OK\n";
-}
-exit $return;
diff --git a/odk/util/checkdiff.pl b/odk/util/checkdiff.pl
deleted file mode 100644
index 5574923e..00000000
--- a/odk/util/checkdiff.pl
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-#
-# checkit - a perl script to check the output of 'dircmp'
-#
-
-$return = 0;
-$possible_error = 0;
-$possible_error_descript = "";
-while( <STDIN> )
-{
- if( /^diff/ )
- {
- $possible_error = 1;
- $possible_error_descript = $_;
- }
- elsif( /^Binary/ )
- {
- print STDERR "ERROR : $_";
- $return++;
- }
- elsif( /^[0-9]/ && $possible_error == 1 )
- {
- print STDERR "ERROR : diff ".$possible_error_descript;
- $return++;
- $possible_error = 0;
- }
- else
- {
- $possible_error = 0;
- }
-}
-if( $return != 0 )
-{
- unlink "$ARGV[0]";
-}
-exit $return;
diff --git a/odk/util/delzip b/odk/util/delzip
deleted file mode 100644
index 8b137891..00000000
--- a/odk/util/delzip
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/odk/util/makefile.mk b/odk/util/makefile.mk
deleted file mode 100644
index 7f6517ed..00000000
--- a/odk/util/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-PRJ=..
-PRJNAME=odk
-TARGET=odk
-
-# ------------------------------------------------------------------
-.INCLUDE: settings.mk
-.INCLUDE: makefile.pmk
-# ------------------------------------------------------------------
-.IF "$(L10N_framework)"==""
-
-ZIP1TARGET=odkexamples
-ZIP1FLAGS=-u -r
-ZIP1DIR=$(PRJ)
-ZIP1LIST=examples -x "*.svn*" -x "*CVS*" -x "*makefile.mk" -x "*Inspector*" -x "*Container1*" -x "*Storage*" -x "*register_component*" -x "*examples.html" -x "*ConverterServlet*" -x "*NotesAccess*" -x "*delphi*"
-
-.ENDIF
-
-.INCLUDE : target.mk
-.IF "$(L10N_framework)"==""
-ALLTAR:\
- $(BIN)$/$(PRODUCTZIPFILE)
-# $(BIN)$/odk_oo.zip
-.ENDIF
-
-$(BIN)$/$(PRODUCTZIPFILE) : $(SDK_CONTENT_CHECK_FILES) $(SDK_CHECK_FLAGS)
- cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . $(CHECKZIPRESULT)
- $(PERL) -w $(SOLARENV)$/bin$/cleanzip.pl $@
-# cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . -x "idl/*" $(CHECKZIPRESULT)
-# cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/odkidl.zip idl/* $(CHECKZIPRESULT)
-
-ODK_OO_FILES=\
- $(PRJ)$/index.html \
- $(PRJ)$/docs$/tools.html \
- $(PRJ)$/docs$/notsupported.html \
- $(PRJ)$/docs$/install.html \
- $(PRJ)$/docs$/sdk_styles.css \
- $(PRJ)$/docs$/images$/arrow-1.gif \
- $(PRJ)$/docs$/images$/arrow-3.gif \
- $(PRJ)$/docs$/images$/bg_table.gif \
- $(PRJ)$/docs$/images$/bg_table2.gif \
- $(PRJ)$/docs$/images$/bg_table3.gif \
- $(PRJ)$/docs$/images$/nav_down.png \
- $(PRJ)$/docs$/images$/nav_home.png \
- $(PRJ)$/docs$/images$/nav_left.png \
- $(PRJ)$/docs$/images$/nav_right.png \
- $(PRJ)$/docs$/images$/nav_up.png \
- $(PRJ)$/docs$/images$/sdk_head-1.gif \
- $(PRJ)$/docs$/images$/sdk_head-2.gif \
- $(PRJ)$/docs$/images$/sdk_head-3.gif \
- $(PRJ)$/docs$/images$/sdk_line-1.gif \
- $(PRJ)$/docs$/images$/sdk_line-2.gif \
- $(PRJ)$/examples$/examples.html \
- $(PRJ)$/examples$/DevelopersGuide$/examples.html
-
-
-$(BIN)$/odk_oo.zip : $(ODK_OO_FILES)
- cd $(PRJ) && zip -urq $(subst,$(PRJ)$/, $(BIN)$/odk_oo.zip) $(subst,$(PRJ)$/, $<) $(CHECKZIPRESULT)
-
diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk
deleted file mode 100644
index 2fd708a0..00000000
--- a/odk/util/makefile.pmk
+++ /dev/null
@@ -1,198 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-# used for sdk common files
-PRODUCT_RELEASE=3.4
-OFFICENAME=LibreOffice
-SDKDIRNAME=libreoffice$(PRODUCT_RELEASE)_sdk
-OFFICEPRODUCTNAME=$(OFFICENAME) $(PRODUCT_RELEASE)
-TITLE=$(OFFICENAME) $(PRODUCT_RELEASE) SDK
-IDLDOCREFNAME="$(OFFICENAME) $(PRODUCT_RELEASE) API"
-
-
-PRODUCT_NAME=odkcommon
-PRODUCTZIPFILE=$(PRODUCT_NAME).zip
-
-DESTDIR=$(OUT)/bin/$(PRODUCT_NAME)
-DESTDIRBIN=$(DESTDIR)/bin
-DESTDIRLIB=$(DESTDIR)/lib
-DESTDIRDLL=$(DESTDIRLIB)
-DESTDIRIDL=$(DESTDIR)/idl
-DESTDIRINC=$(DESTDIR)/include
-DESTDIRJAR=$(DESTDIR)/classes
-DESTDIRXML=$(DESTDIR)/xml
-DESTDIRSETTINGS=$(DESTDIR)/settings
-DESTDIREXAMPLES=$(DESTDIR)/examples
-DESTDIRINC=$(DESTDIR)/include
-DESTDIRCLASSES=$(DESTDIR)/classes
-DESTDIRDOCU=$(DESTDIR)/docs
-DESTDIRCOMMONDOCU=$(DESTDIRDOCU)/common
-DESTDIRGENIDLREF=$(DESTDIRCOMMONDOCU)/ref
-DESTDIRDOCUIMAGES=$(DESTDIRDOCU)/images
-DESTDIRCPPDOCU=$(DESTDIRDOCU)/cpp
-DESTDIRGENCPPREF=$(DESTDIRDOCU)/cpp/ref
-DESTDIRJAVADOCU=$(DESTDIRDOCU)/java
-DESTDIRGENJAVAREF=$(DESTDIRDOCU)/java/ref
-
-.IF "$(CROSS_COMPILING)" == "YES"
-BINOUT=$(SOLARVERSION)/$(INPATH)/bin
-.ELSE
-BINOUT=$(SOLARBINDIR)
-.ENDIF
-INCOUT=$(SOLARINCDIR)
-IDLOUT=$(SOLARIDLDIR)
-XMLOUT=$(SOLARXMLDIR)
-LIBOUT=$(SOLARLIBDIR)
-
-MY_AUTODOC=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/autodoc
-
-.IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)"=="MACOSX" || \
- "$(OS)"=="AIX" || "$(OS)"=="DRAGONFLY"
-MY_COPY=$(GNUCOPY)
-MY_COPY_RECURSIVE=$(GNUCOPY) -r
-.ELSE
-MY_COPY=$(GNUCOPY) -u
-MY_COPY_RECURSIVE=$(GNUCOPY) -urf
-.ENDIF
-
-MY_DELETE_RECURSIVE=rm -rf
-MY_TEXTCOPY=@cp
-
-.IF "$(GUI)"=="WNT"
-#--------------------
-# WNT ONLY
-#--------------------
-
-MY_DLLPREFIX=
-MY_DLLPOSTFIX=.dll
-MY_DLLOUT=$(OUT)/bin
-EXEPOSTFIX=.exe
-DLLOUT=$(SOLARBINDIR)
-DESTDIRCPPEXAMPLES=$(DESTDIR)/examples/cpp
-
-.IF "$(COM)"=="GCC"
-DESTPLATFROM=mingw
-.ELSE
-DESTPLATFROM=windows
-.ENDIF
-DESTDIRDLL=$(DESTDIRBIN)
-DESTDIRCLI=$(DESTDIR)/cli
-
-.ELSE
-#--------------------
-
-MY_DLLPREFIX=lib
-.IF "$(OS)"=="MACOSX"
-MY_DLLPOSTFIX=.dylib
-.ELSE
-MY_DLLPOSTFIX=.so
-.ENDIF
-MY_DLLOUT=$(OUT)/lib
-DLLOUT=$(SOLARLIBDIR)
-
-.IF "$(OS)$(CPU)"=="SOLARISS"
-# SOLARIS SPARC
-DESTPLATFROM=solsparc
-
-.ELIF "$(OS)$(CPU)"=="SOLARISU"
-# SOLARIS SPARC 64
-DESTPLATFROM=solsparc64
-
-.ELIF "$(OS)$(CPU)"=="SOLARISI"
-# SOLARIS INTEL
-DESTPLATFROM=solintel
-
-.ELIF "$(OS)"=="LINUX"
-# LINUX
-DESTPLATFROM=linux
-
-.ELIF "$(OS)"=="NETBSD"
-# NETBSD
-DESTPLATFROM=netbsd
-
-.ELIF "$(OS)"=="FREEBSD"
-# FREEBSD
-DESTPLATFROM=freebsd
-
-.ELIF "$(OS)"=="DRAGONFLY"
-DESTPLATFROM=dragonfly
-
-.ELIF "$(OS)"=="MACOSX"
-# MACOSX
-DESTPLATFROM=macosx
-
-.ELIF "$(OS)"=="AIX"
-# MACOSX
-DESTPLATFROM=aix
-
-.ENDIF
-
-.ENDIF
-
-
-INCLUDETOPDIRLIST= \
- $(INCOUT)/sal \
- $(INCOUT)/salhelper \
- $(INCOUT)/rtl \
- $(INCOUT)/osl \
- $(INCOUT)/store \
- $(INCOUT)/typelib \
- $(INCOUT)/uno \
- $(INCOUT)/cppu \
- $(INCOUT)/cppuhelper \
- $(INCOUT)/registry
-
-.IF "$(GUI)"=="WNT"
-INCLUDETOPDIRLIST += $(INCOUT)/systools
-.ENDIF
-
-INCLUDEDIRLIST:={$(subst,/,/ $(shell @$(FIND) $(INCLUDETOPDIRLIST) -type d -print))}
-
-INCLUDEFILELIST=\
- $(INCOUT)/com/sun/star/uno/Any.h \
- $(INCOUT)/com/sun/star/uno/Any.hxx \
- $(INCOUT)/com/sun/star/uno/genfunc.h \
- $(INCOUT)/com/sun/star/uno/genfunc.hxx \
- $(INCOUT)/com/sun/star/uno/Reference.h \
- $(INCOUT)/com/sun/star/uno/Reference.hxx \
- $(INCOUT)/com/sun/star/uno/Sequence.h \
- $(INCOUT)/com/sun/star/uno/Sequence.hxx \
- $(INCOUT)/com/sun/star/uno/Type.h \
- $(INCOUT)/com/sun/star/uno/Type.hxx
-
-INCLUDELIST:=\
- {$(shell @$(FIND) $(INCLUDETOPDIRLIST) -type f ! \( -name "*~" -o -name "*build.lst" -o -name "*deliver.log" \) -print)} \
- $(INCLUDEFILELIST)
-
-SDK_CONTENT_CHECK_FILES= \
- $(MISC)/copying_files.txt
-
-SDK_CHECK_FLAGS= \
- $(MISC)/checkbin.txt \
- $(MISC)/checkidl.txt \
- $(MISC)/checkinc.txt \
- $(MISC)/checkinc2.txt
diff --git a/odk/util/odk_rules.pmk b/odk/util/odk_rules.pmk
deleted file mode 100644
index b28e28c6..00000000
--- a/odk/util/odk_rules.pmk
+++ /dev/null
@@ -1,188 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-
-$(DESTDIRDOCU)/%.html : $(PRJ)/docs/%.html
- @@-rm -f $@
- tr -d "\015" < $< | sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
-
-$(DESTDIREXAMPLES)/%.html : $(PRJ)/examples/%.html
- @@-rm -f $@
- tr -d "\015" < $< | sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
-
-$(DESTDIR)/index.html : $(PRJ)/index.html
- @@-rm -f $@
- tr -d "\015" < $< | sed -e 's/%PRODUCT_RELEASE%/$(PRODUCT_RELEASE)/g' > $@
-
-$(DESTDIRDOCU)/%.css : $(PRJ)/docs/%.css
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRDOCUIMAGES)/% : $(PRJ)/docs/images/%
- @@-rm -f $@
- $(MY_COPY) $< $@
-
-$(DESTDIR)/configure : $(PRJ)/configure
- @@-rm -f $@
- $(MY_TEXTCOPY) $(PRJ)/configure $@
-
-$(DESTDIR)/configure.pl : $(PRJ)/configure.pl
- @@-rm -f $@
- $(MY_TEXTCOPY) $(PRJ)/configure.pl $@
-
-$(DESTDIR)/config.guess : $(SRC_ROOT)/config.guess
- @@-rm -f $@
- $(MY_TEXTCOPY) $(SRC_ROOT)/config.guess $@
-
-$(DESTDIR)/config.sub : $(SRC_ROOT)/config.sub
- @@-rm -f $@
- $(MY_TEXTCOPY) $(SRC_ROOT)/config.sub $@
-
-$(DESTDIR)/setsdkenv_unix : $(PRJ)/setsdkenv_unix
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIR)/setsdkenv_unix.%.in : $(PRJ)/setsdkenv_unix.%.in
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIR)/setsdkenv_windows.bat : $(PRJ)/setsdkenv_windows.bat
- @@-rm -f $@
- $(TYPE) $< | $(SED) 's#__SDKNAME__#$(SDKDIRNAME)#' > $@
-
-$(DESTDIR)/%.bat : $(PRJ)/%.bat
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIR)/setsdkenv_windows.template : $(PRJ)/setsdkenv_windows.template
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIR)/cfgWin.js : $(PRJ)/cfgWin.js
- @@-rm -f $@
- $(MY_TEXTCOPY) $(PRJ)/cfgWin.js $@
-
-$(DESTDIRSETTINGS)/%.mk : $(PRJ)/settings/%.mk
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRXML)/module-description.dtd : $(XMLOUT)/module-description.dtd
- @@-rm -f $@
- $(MY_TEXTCOPY) $(XMLOUT)/module-description.dtd $@
-$(DESTDIRXML)/%.xml : $(XMLOUT)/%.xml
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRBIN)/%$(EXEPOSTFIX) : $(BINOUT)/%$(EXEPOSTFIX)
- @@-rm -f $@
- $(GNUCOPY) $(BINOUT)/$(@:f) $@
-
-$(DESTDIRBIN)/%.bin : $(BINOUT)/%.bin
- @@-rm -f $@
- $(GNUCOPY) $(BINOUT)/$(@:f) $@
-
-$(DESTDIRBIN)/regcomp : $(BINOUT)/regcomp
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) : $(BIN)/unoapploader$(EXEPOSTFIX)
- @@-rm -f $@
- $(GNUCOPY) $(BIN)/$(@:f) $@
-
-# special rule for special Java UNO native library
-# (used for all platforms but built only under windows;
-# otherwise provided in external)
-$(DESTDIRJAR)/win/unowinreg.dll : $(BIN)/unowinreg.dll
- @@-rm -f $@
- $(GNUCOPY) $< $@
-
-$(DESTDIRCLI)/%.dll : $(BINOUT)/%.dll
- @@-rm -f $@
- $(GNUCOPY) $< $@
-
-$(DESTDIRDLL)/%$(MY_DLLPOSTFIX) : $(DLLOUT)/%$(MY_DLLPOSTFIX)
- @@-rm -f $@
- $(GNUCOPY) $(DLLOUT)/$(@:f) $@
-
-$(DESTDIRJAR)/com/sun/star/lib/loader/%.class : $(CLASSDIR)/com/sun/star/lib/loader/%.class
- @@-$(RM) $(@:db).class
- $(COPY) $(<:db).class $(@:d)
-# deal with subclasses
- @@-$(RM) $(@:db)$(EMQ)$$*.class
- -$(COPY) $(<:db)$(EMQ)$$*.class $(@:d)
-
-$(DESTDIRIDL)/% : $(IDLOUT)/%
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRINC)/udkversion.mk :
- @@-rm -f $@
- @echo #UDK version number > $@
- @echo #major >> $@
- @echo UDK_MAJOR=$(UDK_MAJOR) >> $@
- @echo #minor >> $@
- @echo UDK_MINOR=$(UDK_MINOR) >> $@
- @echo #micro >> $@
- @echo UDK_MICRO=$(UDK_MICRO) >> $@
-
-$(DESTDIRINC)/% : $(INCOUT)/%
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRLIB)/%.lib : $(LIBOUT)/%.lib
- @@-rm -f $@
- $(GNUCOPY) $(LIBOUT)/$(@:f) $@
-
-$(DESTDIRLIB)/%.a : $(LIBOUT)/%.a
- @@-rm -f $@
- $(GNUCOPY) $(LIBOUT)/$(@:f) $@
-
-$(DIR_CREATE_FLAG) :
- $(TYPE) $(mktmp $(DIR_DIRECTORY_LIST)) | xargs -n 20 $(MKDIRHIER) && echo "dirs created" > $@ && touch $@
- $(DELAY) 2
-
-$(DESTDIRSETTINGS)/component.uno.def : $(PRJ)/settings/component.uno.def
- @@-rm -f $@
- $(MY_TEXTCOPY) $< $@
-
-$(DESTDIRSETTINGS)/component.uno.map : $(SOLARENV)/bin/addsym.awk $(SOLARENV)/src/component.map
- @@-$(RM) -f $@
-.IF "$(COMID)"=="gcc3"
- tr -d "\015" < $(SOLARENV)/src/component.map | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
-.IF "$(OS)"=="MACOSX"
- tr -d "\015" < $(SOLARENV)/src/component.map | tail -n +3 | head -3 | sed -e 's/.*component/_component/g' -e 's/;[ ]*//' > $@
-.ENDIF
-.ELSE # "$(COMID)"=="gcc3"
- tr -d "\015" < $(SOLARENV)/src/component.map > $@
-.ENDIF # "$(COMID)"=="gcc3"
- @chmod 664 $@
-
-$(DIR_FILE_LIST) : $(DIR_CREATE_FLAG)
-
-$(DIR_FILE_FLAG) : $(DIR_FILE_LIST)
- @echo "must be zipped" > $@
-
-
-
diff --git a/udm/inc/udm/html/htmlitem.hxx b/udm/inc/udm/html/htmlitem.hxx
deleted file mode 100644
index feef0a11..00000000
--- a/udm/inc/udm/html/htmlitem.hxx
+++ /dev/null
@@ -1,359 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSI_HTML_HTMLITEM_HXX
-#define CSI_HTML_HTMLITEM_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <udm/xml/xmlitem.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace csi
-{
-namespace html
-{
-
-/** <BODY>
-*/
-class Body : public csi::xml::AnElement
-{
- public:
- Body()
- : csi::xml::AnElement( "body" ) {}
- private:
- virtual bool LineBreakAfterBeginTag() const;
-};
-
-/** <BR>
-*/
-class HorizontalLine : public xml::XmlCode
-{
- public:
- HorizontalLine()
- : xml::XmlCode("<hr>\n") {}
-};
-
-/** <A name="">
-*/
-class Label : public csi::xml::AnElement
-{
- public:
- Label(
- const ::csv::String & i_sLabel )
- : csi::xml::AnElement("a")
- { *this << new csi::xml::AnAttribute(String("name"), i_sLabel); }
-};
-
-/** <p>
-*/
-class Paragraph : public csi::xml::AnElement
-{
- public:
- Paragraph()
- : csi::xml::AnElement("p") {}
- private:
- virtual bool LineBreakAfterEndTag() const;
-};
-
-/** <H1-6>
-*/
-class Headline : public csi::xml::APureElement
-{
- public:
- Headline(
- int i_nNr )
- : csi::xml::APureElement(sTags[i_nNr-1]) { csv_assert(1 <= i_nNr AND i_nNr < 7); }
- private:
- static const char * sTags[6];
- virtual bool LineBreakAfterEndTag() const;
-};
-
-/** <BR>
-*/
-class LineBreak : public xml::XmlCode
-{
- public:
- LineBreak()
- : xml::XmlCode("<br>\n") {}
-};
-
-/** <b>
-*/
-class Bold : public csi::xml::APureElement
-{
- public:
- Bold()
- : csi::xml::APureElement("b") {}
-};
-
-/** <i>
-*/
-class Italic : public csi::xml::APureElement
-{
- public:
- Italic()
- : csi::xml::APureElement("i") {}
-};
-
-/** <strong>
-*/
-class Strong : public csi::xml::APureElement
-{
- public:
- Strong()
- : csi::xml::APureElement("strong") {}
-};
-
-/** <em>
-*/
-class Emphasized : public csi::xml::APureElement
-{
- public:
- Emphasized()
- : csi::xml::APureElement("em") {}
-};
-
-/** <font>
-*/
-class Font : public csi::xml::AnElement
-{
- public:
- Font()
- : csi::xml::AnElement("font") {}
-};
-
-
-/** <A href="">
-*/
-class Link : public csi::xml::AnElement
-{
- public:
- Link(
- const ::csv::String &i_sDestinaton )
- : csi::xml::AnElement("a")
- { *this << new csi::xml::AnAttribute(String("href"), i_sDestinaton); }
-};
-
-class TableCell : public csi::xml::AnElement
-{
- public:
- TableCell()
- : csi::xml::AnElement("td") {}
- private:
- virtual bool LineBreakAfterEndTag() const;
-};
-
-class TableRow : public csi::xml::AnElement
-{
- public:
- TableRow()
- : csi::xml::AnElement("tr") {}
-
- TableCell & AddCell(
- DYN csi::xml::Item* let_dpItem = 0 );
- private:
- virtual bool LineBreakAfterBeginTag() const;
-};
-
-/** <table ....>
-*/
-class Table : public csi::xml::AnElement
-{
- public:
- Table()
- : csi::xml::AnElement("table") {}
- Table(
- const ::csv::String & i_sBorder,
- const ::csv::String & i_sWidth,
- const ::csv::String & i_sCellPadding,
- const ::csv::String & i_sCellSpacing );
- TableRow & AddRow();
- private:
- virtual bool FinishEmptyTag_XmlStyle() const;
- virtual bool LineBreakAfterBeginTag() const;
-};
-
-
-
-class DefListTerm : public csi::xml::AnElement
-{
- public:
- DefListTerm()
- : csi::xml::AnElement("dt") {}
- private:
- virtual bool LineBreakAfterEndTag() const;
-};
-
-class DefListDefinition : public csi::xml::AnElement
-{
- public:
- DefListDefinition()
- : csi::xml::AnElement("dd") {}
- private:
- virtual bool LineBreakAfterEndTag() const;
-};
-
-/** <DL>
-*/
-class DefList : public csi::xml::AnElement
-{
- public:
- DefList()
- : csi::xml::AnElement("dl") {}
-
- DefListTerm & AddTerm(
- DYN csi::xml::Item* let_dpItem = 0 );
- DefListDefinition & AddDefinition(
- DYN csi::xml::Item* let_dpItem = 0 );
- private:
- virtual bool LineBreakAfterBeginTag() const;
- virtual bool FinishEmptyTag_XmlStyle() const;
-};
-
-
-class ListItem : public csi::xml::AnElement
-{
- public:
- ListItem()
- : csi::xml::AnElement("li") {}
- private:
- virtual bool LineBreakAfterEndTag() const;
-};
-
-/** <OL>
-*/
-class NumeratedList : public csi::xml::AnElement
-{
- public:
- NumeratedList()
- : csi::xml::AnElement("ol") {}
- private:
- virtual bool LineBreakAfterBeginTag() const;
-};
-
-/** <UL>
-*/
-class SimpleList : public csi::xml::AnElement
-{
- public:
- SimpleList()
- : csi::xml::AnElement("ul") {}
-
- ListItem & AddItem(
- DYN csi::xml::Item* let_dpItem = 0 );
- private:
- virtual bool LineBreakAfterBeginTag() const;
-};
-
-
-class ClassAttr : public csi::xml::AnAttribute
-{
- public:
- ClassAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("class"), i_sValue ) {}
-};
-
-class StyleAttr : public csi::xml::AnAttribute
-{
- public:
- StyleAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("style"), i_sValue ) {}
-};
-
-class SizeAttr : public csi::xml::AnAttribute
-{
- public:
- SizeAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("size"), i_sValue ) {}
-};
-
-class ColorAttr : public csi::xml::AnAttribute
-{
- public:
- ColorAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("color"), i_sValue ) {}
-};
-
-class BgColorAttr : public csi::xml::AnAttribute
-{
- public:
- BgColorAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("bgcolor"), i_sValue ) {}
-};
-
-class AlignAttr : public csi::xml::AnAttribute
-{
- public:
- AlignAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("align"), i_sValue ) {}
-};
-
-class VAlignAttr : public csi::xml::AnAttribute
-{
- public:
- VAlignAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("valign"), i_sValue ) {}
-};
-
-class WidthAttr : public csi::xml::AnAttribute
-{
- public:
- WidthAttr(
- const ::csv::String & i_sValue )
- : csi::xml::AnAttribute( String("width"), i_sValue ) {}
-};
-
-
-
-class Sbr : public csi::xml::XmlCode // Sourcefile lineBreak
-{
- public:
- Sbr()
- : csi::xml::XmlCode("\n") {}
-};
-
-
-} // namespace html
-} // namespace csi
-
-namespace Html = csi::html;
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx
deleted file mode 100644
index 3e186fe2..00000000
--- a/udm/inc/udm/xml/xmlitem.hxx
+++ /dev/null
@@ -1,348 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 CSI_XML_XMLITEM_HXX
-#define CSI_XML_XMLITEM_HXX
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <cosv/tpl/swelist.hxx>
-#include <cosv/tpl/dyn.hxx>
- // PARAMETERS
-
-namespace csv
-{
- class bostream;
-}
-
-
-namespace csi
-{
-namespace xml
-{
-
-
-/* Basics:
- Item, Attribute, Element, TextContext
-*/
-
-class Item
-{
- public:
- virtual ~Item() {}
- void WriteOut(
- csv::bostream & io_aFile ) const;
- private:
- virtual void do_WriteOut(
- csv::bostream & io_aFile ) const = 0;
-};
-
-typedef csv::SweList_dyn< Item > ItemList;
-
-class Attribute
-{
- public:
- virtual ~Attribute() {}
-
- void WriteOut(
- csv::bostream & io_aFile ) const;
-
- const ::csv::String& Name() const;
- const ::csv::String& Value() const;
-
- private:
- virtual const ::csv::String &
- inq_Name() const = 0;
- virtual const ::csv::String &
- inq_Value() const = 0;
-};
-
-typedef csv::SweList_dyn< Attribute > AttrList;
-
-
-class Element : public Item
-{
- public:
- Element & operator<<( /// For multiple content items.
- DYN Item * let_dpItem );
- Element & operator<<( /// For multiple content items.
- const ::csv::String& let_drText );
- Element & operator<<( /// For multiple content items.
- const char * let_dpText );
- Element & operator<<(
- DYN Attribute * let_dpAttr );
-
- Element & operator>>( /// For multiple content items. @return the child Element.
- DYN Element & let_drElement );
-
-
- Item * SetContent( /// For only one content item.
- DYN Item * let_dpItem ); /// Replaces previous content. May be 0, then all content is deleted.
- private:
- // Interface Item:
- virtual void do_WriteOut(
- csv::bostream & io_aFile ) const;
- // Local
- virtual void op_streamout(
- DYN Item * let_dpItem ) = 0;
- virtual void op_streamout(
- DYN Attribute * let_dpAttr ) = 0;
-
- virtual void do_SetContent(
- DYN Item * let_dpItem ) = 0;
- // Helpers
- virtual const ::csv::String &
- inq_TagName() const = 0;
- virtual const Item *
- inq_Content() const = 0;
- virtual const AttrList *
- inq_Attrs() const = 0;
-
- virtual bool FinishEmptyTag_XmlStyle() const; /// Defaulted to: true
-
- virtual bool LineBreakAfterBeginTag() const; /// Defaulted to: false
- virtual bool LineBreakAfterEndTag() const; /// Defaulted to: true, if LineBreakAfterBeginTag()
-};
-
-class TextContent : public Item
-{
-};
-
-
-/* Implementation simplifiers:
- EmptyElement, PureElement, SglTag
-*/
-
-class EmptyElement : public Element
-{
- private:
- // Interface Element:
- virtual void op_streamout( /// does nothing
- DYN Item * let_dpItem );
- virtual void op_streamout(
- DYN Attribute * let_dpAttr );
- virtual void do_SetContent( /// does nothing
- DYN Item * let_dpItem );
- virtual const Item *
- inq_Content() const; /// @return 0
- virtual const AttrList *
- inq_Attrs() const;
-
- // Local
- virtual AttrList & inq_RefAttrs() = 0;
-};
-
-class PureElement : public Element
-{
- private:
- // Interface Element:
- virtual void op_streamout(
- DYN Item * let_dpItem );
- virtual void op_streamout( /// does nothing
- DYN Attribute * let_dpAttr );
- virtual void do_SetContent(
- DYN Item * let_dpItem );
- virtual const Item *
- inq_Content() const;
- virtual const AttrList *
- inq_Attrs() const; /// @return 0
- // Local
- virtual Dyn< Item > &
- inq_RefContent() = 0;
-};
-
-class SglTag : public Element
-{
- private:
- // Interface Element:
- virtual void op_streamout( /// does nothing
- DYN Item * let_dpItem );
- virtual void op_streamout( /// does nothing
- DYN Attribute * let_dpAttr );
- virtual void do_SetContent( /// does nothing
- DYN Item * let_dpItem );
- virtual const Item *
- inq_Content() const; /// @return 0
- virtual const AttrList *
- inq_Attrs() const; /// @return 0
-};
-
-
-
-/* Standard Element implementations, if there are not any
- specialized ones.
-*/
-
-class AnElement : public Element
-{
- public:
- AnElement(
- const char * i_sTagName );
- ~AnElement();
- private:
- // Interface Element
- virtual void op_streamout(
- DYN Item * let_dpItem );
- virtual void op_streamout(
- DYN Attribute * let_dpAttr );
- virtual void do_SetContent(
- DYN Item * let_dpItem );
- virtual const ::csv::String &
- inq_TagName() const;
- virtual const Item *
- inq_Content() const;
- virtual const AttrList *
- inq_Attrs() const;
- // DATA
- ::csv::String sTagName;
- Dyn< Item > pContent;
- AttrList aAttrs;
-};
-
-class APureElement : public PureElement
-{
- public:
- APureElement(
- const char * i_sTagName );
- ~APureElement();
- private:
- // Interface Element:
- virtual const ::csv::String &
- inq_TagName() const;
- // Interface PureElement:
- virtual Dyn< Item > &
- inq_RefContent();
- // DATA
- ::csv::String sTagName;
- Dyn< Item > pContent;
-};
-
-/* Standard Attribute implementation
-*/
-class AnAttribute : public Attribute
-{
- public:
- AnAttribute(
- const ::csv::String & i_sName,
- const ::csv::String & i_sValue );
- AnAttribute(
- const char * i_sName,
- const char * i_sValue );
- ~AnAttribute();
- private:
- // Interface Attribute:
- virtual const ::csv::String &
- inq_Name() const;
- virtual const ::csv::String &
- inq_Value() const;
- // DATA
- ::csv::String sName;
- ::csv::String sValue;
-};
-
-
-
-/* Implementations of TextContent:
-
- Text ( reserved characters will be replaced and appear unchanged )
- XmlCode ( reserved characters stay and are interpreted
- by the XML-viewer )
-*/
-class Text : public TextContent
-{
- public:
- Text(
- const ::csv::String & i_sText );
- Text(
- const char * i_sText );
- ~Text();
- private:
- virtual void do_WriteOut(
- csv::bostream & io_aFile ) const;
- // DATA
- ::csv::String sText;
-};
-
-
-class XmlCode : public TextContent
-{
- public:
- XmlCode(
- const ::csv::String & i_sText );
- XmlCode(
- const char * i_sText );
- ~XmlCode();
- private:
- virtual void do_WriteOut(
- csv::bostream & io_aFile ) const;
- // DATA
- ::csv::String sText;
-};
-
-
-
-// IMPLEMENTATION
-
-inline void
-Item::WriteOut( csv::bostream & io_aFile ) const
- { do_WriteOut(io_aFile); }
-
-inline const ::csv::String &
-Attribute::Name() const
- { return inq_Name(); }
-inline const ::csv::String &
-Attribute::Value() const
- { return inq_Value(); }
-
-inline Element &
-Element::operator<<( DYN Item * let_dpItem )
- { op_streamout(let_dpItem); return *this; }
-inline Element &
-Element::operator<<( const ::csv::String & let_drText )
- { op_streamout( new Text(let_drText) ); return *this; }
-inline Element &
-Element::operator<<( const char * let_drText )
- { op_streamout( new Text(let_drText) ); return *this; }
-inline Element &
-Element::operator<<( DYN Attribute * let_dpAttr )
- { op_streamout(let_dpAttr); return *this; }
-inline Element &
-Element::operator>>( DYN Element & let_drElement )
- { op_streamout(&let_drElement); return let_drElement; }
-inline Item *
-Element::SetContent( DYN Item * let_dpItem )
- { do_SetContent(let_dpItem); return let_dpItem; }
-
-
-} // namespace xml
-} // namespace csi
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udm/prj/build.lst b/udm/prj/build.lst
deleted file mode 100644
index 9ff891b8..00000000
--- a/udm/prj/build.lst
+++ /dev/null
@@ -1,12 +0,0 @@
-ud udm : cosv NULL
-ud udm usr1 - all ud_mkout NULL
-ud udm\prj get - all ud_prj NULL
-ud udm\inc get - all ud_inc NULL
-ud udm\inc\udm get - all udi_udm NULL
-ud udm\inc\udm\html get - all udiu_html NULL
-ud udm\inc\udm\xml get - all udiu_xml NULL
-ud udm\source get - all ud_src NULL
-ud udm\source\html nmake - all uds_html NULL
-ud udm\source\xml nmake - all uds_xml NULL
-ud udm\util nmake - all ud_util uds_xml uds_html NULL
-#================================================================================
diff --git a/udm/prj/d.lst b/udm/prj/d.lst
deleted file mode 100644
index 5dfe7a13..00000000
--- a/udm/prj/d.lst
+++ /dev/null
@@ -1,9 +0,0 @@
-mkdir: %_DEST%\inc\udm
-mkdir: %_DEST%\inc\udm\html
-mkdir: %_DEST%\inc\udm\xml
-
-..\%__SRC%\lib\udm.lib %_DEST%\lib\udm.lib
-..\%__SRC%\lib\libudm.a %_DEST%\lib\libudm.a
-..\inc\udm\html\*.hxx %_DEST%\inc\udm\html\*.hxx
-..\inc\udm\xml\*.hxx %_DEST%\inc\udm\xml\*.hxx
-
diff --git a/udm/source/html/htmlitem.cxx b/udm/source/html/htmlitem.cxx
deleted file mode 100644
index 93de036c..00000000
--- a/udm/source/html/htmlitem.cxx
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <udm/html/htmlitem.hxx>
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace csi
-{
-namespace html
-{
-
-using namespace csi::xml;
-
-template <class ELEM>
-inline ELEM &
-PushElem( Element & i_rMain,
- DYN ELEM * let_dpSub,
- DYN Item * let_dpItem )
-{
- i_rMain << let_dpSub;
- if ( let_dpItem != 0 )
- *let_dpSub << let_dpItem;
- return *let_dpSub;
-}
-
-
-bool
-Body::LineBreakAfterBeginTag() const
-{
- return true;
-}
-
-bool
-Paragraph::LineBreakAfterEndTag() const
-{
- return true;
-}
-
-const char *
-Headline::sTags[6] = { "h1", "h2", "h3", "h4", "h5", "h6" };
-
-bool
-Headline::LineBreakAfterEndTag() const
-{
- return true;
-}
-
-bool
-TableCell::LineBreakAfterEndTag() const
-{
- return true;
-}
-
-TableCell &
-TableRow::AddCell( DYN Item * let_dpItem )
-{
- return PushElem( *this, new TableCell, let_dpItem );
-}
-
-bool
-TableRow::LineBreakAfterBeginTag() const
-{
- return true;
-}
-
-
-Table::Table( const String & i_sBorder,
- const String & i_sWidth,
- const String & i_sCellPadding,
- const String & i_sCellSpacing )
- : csi::xml::AnElement("table")
-{
- if ( i_sBorder.length() > 0 )
- *this << new AnAttribute(String("border"),i_sBorder);
- if ( i_sBorder.length() > 0 )
- *this << new AnAttribute(String("width"),i_sWidth);
- if ( i_sBorder.length() > 0 )
- *this << new AnAttribute(String("cellpadding"),i_sCellPadding);
- if ( i_sBorder.length() > 0 )
- *this << new AnAttribute(String("cellspacing"),i_sCellSpacing);
-}
-
-TableRow &
-Table::AddRow()
-{
- TableRow * ret = new TableRow;
- *this << ret;
- return *ret;
-}
-
-bool
-Table::FinishEmptyTag_XmlStyle() const
-{
- return false;
-}
-
-bool
-Table::LineBreakAfterBeginTag() const
-{
- return true;
-}
-
-
-
-bool
-DefListTerm::LineBreakAfterEndTag() const
-{
- return true;
-}
-
-bool
-DefListDefinition::LineBreakAfterEndTag() const
-{
- return true;
-}
-
-
-
-
-
-DefListTerm &
-DefList::AddTerm( DYN csi::xml::Item* let_dpItem )
-{
- return PushElem( *this, new DefListTerm, let_dpItem );
-}
-
-DefListDefinition &
-DefList::AddDefinition( DYN csi::xml::Item* let_dpItem )
-{
- return PushElem( *this, new DefListDefinition, let_dpItem );
-}
-
-bool
-DefList::LineBreakAfterBeginTag() const
-{
- return true;
-}
-
-bool
-DefList::FinishEmptyTag_XmlStyle() const
-{
- return false;
-}
-
-bool
-ListItem::LineBreakAfterEndTag() const
-{
- return true;
-}
-
-bool
-NumeratedList::LineBreakAfterBeginTag() const
-{
- return true;
-}
-
-
-ListItem &
-SimpleList::AddItem( DYN csi::xml::Item* let_dpItem )
-{
- return PushElem( *this, new ListItem, let_dpItem );
-}
-
-bool
-SimpleList::LineBreakAfterBeginTag() const
-{
- return true;
-}
-
-
-
-} // namespace html
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udm/source/html/makefile.mk b/udm/source/html/makefile.mk
deleted file mode 100644
index 73eba36d..00000000
--- a/udm/source/html/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=udm
-TARGET=csi_html
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/htmlitem.obj
-
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/udm/source/inc/precomp.h b/udm/source/inc/precomp.h
deleted file mode 100644
index 98288a71..00000000
--- a/udm/source/inc/precomp.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 UDM_PRECOMP_H
-#define UDM_PRECOMP_H
-
-// For en/disabling csv_assertions:
-#ifndef DEBUG
-#define CSV_NO_ASSERTIONS
-#endif
-
-
-#include <cosv/csv_precomp.h>
-#include <vector>
-#include <map>
-
-
-
-// Shortcuts to access csv::-types:
-using csv::String;
-using csv::StringVector;
-using csv::StreamStr;
-using csv::c_str;
-typedef csv::StreamStrLock StreamLock;
-
-
-
-inline std::ostream &
-Cout() { return std::cout; }
-
-inline std::ostream &
-Cerr() { return std::cerr; }
-
-
-inline csv::F_FLUSHING_FUNC
-Endl() { return csv::Endl; }
-inline csv::F_FLUSHING_FUNC
-Flush() { return csv::Flush; }
-
-
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udm/source/mkinc/fullcpp.mk b/udm/source/mkinc/fullcpp.mk
deleted file mode 100644
index 5faca9c6..00000000
--- a/udm/source/mkinc/fullcpp.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-
-
-# --- Settings -----------------------------------------------------
-# Has to be included AFTER settings.mk !
-
-
-# Precompiled header:
-
-
-.IF "$(GUI)"=="WNT"
-
-# RTTI
-.IF "$(COM)"=="MSC"
-CFLAGS+= -GR
-.ENDIF
-
-.IF "$(NP_LOCALBUILD)"!=""
-
-
-# Precompiled Headers
-PCH_NAME= udm
-.IF "$(DBG_LEVEL)"<"2"
-CFLAGS+= -YX"precomp.h" /Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pch
-.ELSE
-CFLAGS+= -YX"precomp.h" /Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pcd -DNP_LOCALBUILD
-.ENDIF
-
-.ENDIF
-
-.ENDIF
-
-# Or should we simple check for $(COM)==GCC ?
-.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)$(COM)"=="WNTGCC"
-CFLAGSCXX+= -frtti
-.ENDIF
-
diff --git a/udm/source/xml/makefile.mk b/udm/source/xml/makefile.mk
deleted file mode 100644
index a90d71be..00000000
--- a/udm/source/xml/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=udm
-TARGET=csi_xml
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/xmlitem.obj
-
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/udm/source/xml/xmlitem.cxx b/udm/source/xml/xmlitem.cxx
deleted file mode 100644
index 8c3e10d8..00000000
--- a/udm/source/xml/xmlitem.cxx
+++ /dev/null
@@ -1,546 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <precomp.h>
-#include <udm/xml/xmlitem.hxx>
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/file.hxx>
-
-
-namespace csi
-{
-namespace xml
-{
-
-char cReplacable[256] =
- {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 49
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, // ", &
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 50 - 99
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, // <, >
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 100 - 149
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 1 // &nbsp;
- };
-
-
-class MultiItem : public Item
-{
- public:
- MultiItem();
- ~MultiItem();
-
- void Add(
- DYN Item * let_dpDatum )
- { csv_assert( let_dpDatum != 0 );
- aItems.push_back(let_dpDatum); }
- void Erase() { aItems.erase_all(); }
-
- private:
- virtual void do_WriteOut(
- csv::bostream & io_aFile ) const;
- // DATA
- ItemList aItems;
-};
-
-
-void StreamOut(
- Dyn< Item > & o_rContent,
- DYN Item * let_dpItem );
-inline void
-StreamOut( AttrList & o_rAttrs,
- DYN Attribute * let_dpAttr )
-{
- csv_assert( let_dpAttr != 0 );
- o_rAttrs.push_back( let_dpAttr );
-}
-
-
-inline void
-Impl_SetContent( Dyn< Item > & o_rContent,
- DYN Item * let_dpItem )
-{
- o_rContent = let_dpItem;
-}
-
-
-//********************* Attribute ****************************//
-
-const String attrValueBegin("=\"");
-const String attrValueEnd("\"");
-
-void
-Attribute::WriteOut( csv::bostream & io_aFile ) const
-{
- io_aFile.write( Name() );
- if ( Value().length() > 0 )
- {
- io_aFile.write( attrValueBegin );
- io_aFile.write( Value() );
- io_aFile.write( attrValueEnd );
- }
-}
-
-
-
-//************************ Element ****************************//
-
-const String newline("\n");
-const String space(" ");
-const String beginTagBegin("<");
-const String endTagBegin("</");
-const String tagEnd(">");
-const String emptyTagEnd("/>");
-
-void
-Element::do_WriteOut( csv::bostream & io_aFile ) const
-{
- io_aFile.write( beginTagBegin );
- io_aFile.write( inq_TagName() );
-
- const AttrList * pAttrs = inq_Attrs();
- if ( pAttrs != 0 )
- {
- for ( AttrList::iterator it = pAttrs->begin();
- it != pAttrs->end();
- ++it )
- {
-
- io_aFile.write( space );
- (*it)->WriteOut( io_aFile );
- }
- }
-
- const Item * pContent = inq_Content();
- if ( pContent != 0 )
- io_aFile.write( tagEnd );
- else
- {
- if (FinishEmptyTag_XmlStyle())
- io_aFile.write( emptyTagEnd );
- else
- {
- io_aFile.write( tagEnd );
- io_aFile.write( endTagBegin );
- io_aFile.write( inq_TagName() );
- io_aFile.write( tagEnd );
- }
- }
- if ( LineBreakAfterBeginTag() )
- io_aFile.write( newline );
- if ( pContent == 0 )
- return;
-
- pContent->WriteOut( io_aFile );
- io_aFile.write( endTagBegin );
- io_aFile.write( inq_TagName() );
- io_aFile.write( tagEnd );
- if ( LineBreakAfterEndTag() )
- io_aFile.write( newline );
-}
-
-bool
-Element::FinishEmptyTag_XmlStyle() const
-{
- return true;
-}
-
-bool
-Element::LineBreakAfterBeginTag() const
-{
- return false;
-}
-
-bool
-Element::LineBreakAfterEndTag() const
-{
- return LineBreakAfterBeginTag();
-}
-
-
-//************************ EmptyElement ****************************//
-
-void
-EmptyElement::op_streamout( DYN Item * )
-{
- // Does nothing.
-}
-
-void
-EmptyElement::op_streamout( DYN Attribute * let_dpAttr )
-{
- StreamOut( inq_RefAttrs(), let_dpAttr );
-}
-
-void
-EmptyElement::do_SetContent( DYN Item * )
-{
- // Does nothing.
-}
-
-const Item *
-EmptyElement::inq_Content() const
-{
- return 0;
-}
-
-const AttrList *
-EmptyElement::inq_Attrs() const
-{
- return & const_cast< EmptyElement* >(this)->inq_RefAttrs();
-}
-
-
-//************************ PureElement ****************************//
-
-void
-PureElement::op_streamout( DYN Item * let_dpItem )
-{
- StreamOut( inq_RefContent(), let_dpItem );
-}
-
-void
-PureElement::op_streamout( DYN Attribute * )
-{
- // Does nothing.
-}
-
-void
-PureElement::do_SetContent( DYN Item * let_dpItem )
-{
- Impl_SetContent( inq_RefContent(), let_dpItem );
-}
-
-const Item *
-PureElement::inq_Content() const
-{
- return const_cast< PureElement* >(this)->inq_RefContent().Ptr();
-}
-
-const AttrList *
-PureElement::inq_Attrs() const
-{
- return 0;
-}
-
-
-//*************************** SglTag **************************//
-
-void
-SglTag::op_streamout( DYN Item * )
-{
- // Does nothing.
-}
-
-void
-SglTag::op_streamout( DYN Attribute * )
-{
- // Does nothing.
-}
-
-void
-SglTag::do_SetContent( DYN Item *)
-{
- // Does nothing.
-}
-
-const Item *
-SglTag::inq_Content() const
-{
- return 0;
-}
-
-const AttrList *
-SglTag::inq_Attrs() const
-{
- return 0;
-}
-
-
-//*************************** AnElement **************************//
-
-AnElement::AnElement( const char * i_sTagName )
- : sTagName( i_sTagName )
- // pContent,
- // aAttrs
-{
-}
-
-AnElement::~AnElement()
-{
-}
-
-void
-AnElement::op_streamout( DYN Item * let_dpItem )
-{
- StreamOut( pContent, let_dpItem );
-}
-
-void
-AnElement::op_streamout( DYN Attribute * let_dpAttr )
-{
- StreamOut( aAttrs, let_dpAttr );
-}
-
-void
-AnElement::do_SetContent( DYN Item * let_dpItem )
-{
- Impl_SetContent( pContent, let_dpItem );
-}
-
-const String &
-AnElement::inq_TagName() const
-{
- return sTagName;
-}
-
-const Item *
-AnElement::inq_Content() const
-{
- return pContent.Ptr();
-}
-
-const AttrList *
-AnElement::inq_Attrs() const
-{
- return &aAttrs;
-}
-
-//*************************** APureElement **************************//
-
-APureElement::APureElement( const char * i_sTagName )
- : sTagName( i_sTagName )
- // pContent
-{
-}
-
-APureElement::~APureElement()
-{
-}
-
-const String &
-APureElement::inq_TagName() const
-{
- return sTagName;
-}
-
-Dyn< Item > &
-APureElement::inq_RefContent()
-{
- return pContent;
-}
-
-//*************************** AnAttribute **************************//
-AnAttribute::AnAttribute( const String & i_sName,
- const String & i_sValue )
- : sName(i_sName),
- sValue(i_sValue)
-{
-}
-
-AnAttribute::AnAttribute( const char * i_sName,
- const char * i_sValue )
- : sName(i_sName),
- sValue(i_sValue)
-{
-}
-
-AnAttribute::~AnAttribute()
-{
-}
-
-const String &
-AnAttribute::inq_Name() const
-{
- return sName;
-}
-
-const String &
-AnAttribute::inq_Value() const
-{
- return sValue;
-}
-
-
-
-//*************************** Text **************************//
-
-Text::Text( const String & i_sText )
- : sText(i_sText)
-{
-}
-
-Text::Text( const char * i_sText )
- : sText(i_sText)
-{
-}
-
-Text::~Text()
-{
-}
-
-void
-Text::do_WriteOut( csv::bostream & io_aFile ) const
-{
- const unsigned char *
- pStart = reinterpret_cast< const unsigned char* >(sText.c_str());
- const unsigned char *
- pOut = pStart;
-
- for ( ; *pOut != '\0'; ++pOut )
- {
- if ( cReplacable[*pOut] )
- {
- if ( pOut != pStart )
- {
- io_aFile.write( pStart, pOut-pStart );
- }
-
- switch (*pOut)
- {
- case '<': io_aFile.write("&lt;"); break;
- case '>': io_aFile.write("&gt;"); break;
- case '"': io_aFile.write("&quot;"); break;
- case '&': io_aFile.write("&amp;"); break;
- case 255: io_aFile.write("&nbsp;"); break;
- }
-
- pStart = pOut+1;
- } // endif (cReplacable[*pOut])
- } // end for
-
- if ( pOut != pStart )
- {
- io_aFile.write( pStart, pOut-pStart );
- }
-}
-
-
-//*************************** XmlCode **************************//
-
-XmlCode::XmlCode( const String & i_sText )
- : sText(i_sText)
-{
-}
-
-XmlCode::XmlCode( const char * i_sText )
- : sText(i_sText)
-{
-}
-
-XmlCode::~XmlCode()
-{
-}
-
-void
-XmlCode::do_WriteOut( csv::bostream & io_aFile ) const
-{
- io_aFile.write(sText);
-}
-
-
-//*************************** MultiItem **************************//
-
-MultiItem::MultiItem()
-{
-}
-
-MultiItem::~MultiItem()
-{
-}
-
-void
-MultiItem::do_WriteOut( csv::bostream & io_aFile ) const
-{
- ItemList::iterator itEnd = aItems.end();
-
- for ( ItemList::iterator it = aItems.begin();
- it != itEnd;
- ++it )
- {
- (*it)->WriteOut( io_aFile );
- }
-
-}
-
-
-
-//*************************** Helpers **************************//
-
-void
-StreamOut( Dyn< Item > & o_rContent,
- DYN Item * let_dpItem )
-{
- MultiItem * pContent = 0;
- if ( bool(o_rContent) )
- {
- pContent = static_cast< MultiItem* >( o_rContent.MutablePtr() );
- csv_assert( dynamic_cast< MultiItem* >( o_rContent.MutablePtr() ) != 0 );
- }
- else
- {
- pContent = new MultiItem;
- o_rContent = pContent;
- }
-
- csv_assert( let_dpItem != 0 );
- pContent->Add( let_dpItem );
-}
-
-
-
-
-} // namespace xml
-} // namespace csi
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udm/util/makefile.mk b/udm/util/makefile.mk
deleted file mode 100644
index 4acc3f22..00000000
--- a/udm/util/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=udm
-TARGET=udm
-
-ENABLE_EXCEPTIONS=true
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-
-# --- Files --------------------------------------------------------
-
-LIB1FILES= \
- $(LB)$/csi_html.lib \
- $(LB)$/csi_xml.lib
-
-
-# --- Targets ------------------------------------------------------
-
-LIB1TARGET= $(LB)$/$(TARGET).lib
-LIB1ARCHIV= $(LB)$/lib$(TARGET).a
-
-
-.INCLUDE : target.mk
diff --git a/unodevtools/inc/unodevtools/options.hxx b/unodevtools/inc/unodevtools/options.hxx
deleted file mode 100644
index 6457d3bb..00000000
--- a/unodevtools/inc/unodevtools/options.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 INCLUDED_UNODEVTOOLS_OPTIONS_HXX
-#define INCLUDED_UNODEVTOOLS_OPTIONS_HXX
-
-#include <rtl/ustrbuf.hxx>
-
-namespace com { namespace sun { namespace star { namespace uno {
-class RuntimeException;
-} } } }
-
-namespace unodevtools {
-
-//-------------------------------------------------------------------------------
-sal_Bool readOption( rtl::OUString * pValue, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const rtl::OUString & aArg)
- throw (com::sun::star::uno::RuntimeException);
-
-//-------------------------------------------------------------------------------
-sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const rtl::OUString & aArg);
-
-} // end of namespace unodevtools
-
-#endif // INCLUDED_UNODEVTOOLS_OPTIONS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/inc/unodevtools/typemanager.hxx b/unodevtools/inc/unodevtools/typemanager.hxx
deleted file mode 100644
index d2f019e6..00000000
--- a/unodevtools/inc/unodevtools/typemanager.hxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 INCLUDED_UNODEVTOOLS_TYPEMANAGER_HXX
-#define INCLUDED_UNODEVTOOLS_TYPEMANAGER_HXX
-
-#include <codemaker/typemanager.hxx>
-#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-
-#include <boost/unordered_map.hpp>
-#include <vector>
-
-class RegistryKey;
-
-namespace typereg { class Reader; }
-
-typedef boost::unordered_map
-<
- ::rtl::OString, // Typename
- RTTypeClass, // TypeClass
- HashString,
- EqualString
-> T2TypeClassMap;
-
-namespace unodevtools {
-
-struct UnoTypeManagerImpl
-{
- UnoTypeManagerImpl() {}
-
- T2TypeClassMap m_t2TypeClass;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XHierarchicalNameAccess> m_tdmgr;
-};
-
-class UnoTypeManager : public TypeManager
-{
-public:
- UnoTypeManager();
- ~UnoTypeManager();
-
- UnoTypeManager( const UnoTypeManager& value )
- : TypeManager(value)
- , m_pImpl( value.m_pImpl )
- {}
-
- sal_Bool init(const ::std::vector< ::rtl::OUString > registries);
-
- sal_Bool isValidType(const ::rtl::OString& name) const;
- ::rtl::OString getTypeName(RegistryKey& rTypeKey) const;
- typereg::Reader getTypeReader(
- const ::rtl::OString& name, sal_Bool * pIsExtraType = 0 ) const;
- typereg::Reader getTypeReader(RegistryKey& rTypeKey) const;
- RTTypeClass getTypeClass(const ::rtl::OString& name) const;
- RTTypeClass getTypeClass(RegistryKey& rTypeKey) const;
-
-protected:
- void release();
-
- UnoTypeManagerImpl* m_pImpl;
-};
-
-}
-
-#endif // _UNODEVTOOLS_TYPEMANAGER_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/prj/build.lst b/unodevtools/prj/build.lst
deleted file mode 100644
index 37f2ef37..00000000
--- a/unodevtools/prj/build.lst
+++ /dev/null
@@ -1,8 +0,0 @@
-udt unodevtools : DESKTOP:codemaker cppuhelper NULL
-udt unodevtools usr1 - all udt_mkout NULL
-udt unodevtools\inc get - all udt_inc NULL
-udt unodevtools\prj get - all udt_prj NULL
-udt unodevtools\source\unodevtools nmake - all udt_unodevtools NULL
-udt unodevtools\source\skeletonmaker nmake - all udt_skeletonmaker udt_unodevtools NULL
-
-
diff --git a/unodevtools/prj/d.lst b/unodevtools/prj/d.lst
deleted file mode 100644
index f4be609e..00000000
--- a/unodevtools/prj/d.lst
+++ /dev/null
@@ -1,5 +0,0 @@
-..\%__SRC%\bin\uno-skeletonmaker.exe %_DEST%\bin\uno-skeletonmaker.exe
-..\%__SRC%\bin\uno-skeletonmaker.pdb %_DEST%\bin\uno-skeletonmaker.pdb
-
-..\%__SRC%\bin\uno-skeletonmaker %_DEST%\bin\uno-skeletonmaker
-
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
deleted file mode 100644
index 41c229d6..00000000
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ /dev/null
@@ -1,1275 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "codemaker/commoncpp.hxx"
-
-#include "skeletoncommon.hxx"
-#include "skeletoncpp.hxx"
-
-#include <iostream>
-
-using namespace ::rtl;
-using namespace ::codemaker::cpp;
-
-namespace skeletonmaker { namespace cpp {
-
-void generateIncludes(std::ostream & o,
- const boost::unordered_set< OString, OStringHash >& interfaces,
- const AttributeInfo& /*properties*/,
- OString propertyhelper, bool serviceobject,
- bool supportxcomponent)
-{
- o << "#include \"sal/config.h\"\n";
- if (serviceobject) {
- o << "#include \"cppuhelper/factory.hxx\"\n"
- << "#include \"cppuhelper/implementationentry.hxx\"\n";
- } else {
- o << "#include \"com/sun/star/uno/XComponentContext.hpp\"\n";
- }
- if (supportxcomponent) {
- o << "#include \"cppuhelper/compbase" << interfaces.size() << ".hxx\"\n";
- o << "#include \"cppuhelper/basemutex.hxx\"\n";
- } else {
- o << "#include \"cppuhelper/implbase" << interfaces.size() << ".hxx\"\n";
- }
-
- if (propertyhelper.getLength() > 1) {
- if (propertyhelper.equals("_"))
- o << "#include \"cppuhelper/rpopshlp.hxx\"\n";
- else
- o << "#include \"cppuhelper/propertysetmixin.hxx\"\n";
- }
-
- boost::unordered_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
- while (iter != interfaces.end())
- {
- o << "#include \""
- << ((*iter).replace('.', '/').getStr())
- << ".hpp\"\n";
- ++iter;
- }
-}
-
-short generateNamespace(std::ostream & o,
- const OString & implname,
- bool serviceobject,
- OString & nm)
-{
- short count=0;
- sal_Int32 index = implname.lastIndexOf('.');
- if (serviceobject) {
- o << "\n\n// component helper namespace\n";
- } else {
- o << "\n";
- }
- OStringBuffer buf;
- if (index == -1) {
- if (serviceobject) {
- buf.append("comp_");
- buf.append(implname);
- nm = buf.makeStringAndClear();
- o << "namespace comp_" << implname << " {\n\n";
- count=1;
- } else {
- nm = OString();
- }
- } else {
- sal_Int32 nPos=0;
- do {
- OString token(implname.getToken(0, '.', nPos));
- if (nPos < 0 && serviceobject) {
- buf.append("::comp_");
- buf.append(token);
- o << "namespace comp_" << token << " { ";
- count++;
- } else {
- buf.append("::");
- buf.append(token);
- o << "namespace " << token << " { ";
- count++;
- }
- } while( nPos <= index );
- nm = buf.makeStringAndClear();
- o << "\n\n";
- }
- return count;
-}
-
-OString generateCompHelperDeclaration(std::ostream & o,
- const OString & implname)
-{
- OString nm;
- short nbrackets = generateNamespace(o, implname, true, nm);
-
- o << "namespace css = ::com::sun::star;\n\n";
-
- // generate component/service helper functions
- o << "// component and service helper functions:\n"
- "::rtl::OUString SAL_CALL _getImplementationName();\n"
- "css::uno::Sequence< ::rtl::OUString > SAL_CALL "
- "_getSupportedServiceNames();\n"
- "css::uno::Reference< css::uno::XInterface > SAL_CALL _create("
- " css::uno::Reference< css::uno::XComponentContext > const & "
- "context );\n\n";
-
- // close namepsace
- for (short i=0; i < nbrackets; i++)
- o << "} ";
- o << "// closing component helper namespace\n\n";
-
- return nm;
-}
-
-void generateCompHelperDefinition(std::ostream & o,
- const OString & implname,
- const OString & classname,
- const boost::unordered_set< OString, OStringHash >& services)
-{
- OString nm;
- short nbrackets = generateNamespace(o, implname, true, nm);
-
- o << "::rtl::OUString SAL_CALL _getImplementationName() {\n"
- << " return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\n"
- << " \"" << implname << "\"));\n}\n\n";
-
- o << "css::uno::Sequence< ::rtl::OUString > SAL_CALL "
- "_getSupportedServiceNames()\n{\n css::uno::Sequence< "
- << "::rtl::OUString >" << " s(" << services.size() << ");\n";
-
- boost::unordered_set< OString, OStringHash >::const_iterator iter = services.begin();
- short i=0;
- while (iter != services.end())
- {
- o << " s[" << i++ << "] = ::rtl::OUString("
- << "RTL_CONSTASCII_USTRINGPARAM(\n \""
- << (*iter).replace('/','.') << "\"));\n";
- ++iter;
- }
- o << " return s;\n}\n\n";
-
- o << "css::uno::Reference< css::uno::XInterface > SAL_CALL _create("
- << "\n const css::uno::Reference< css::uno::XComponentContext > & "
- << "context)\n SAL_THROW((css::uno::Exception))\n{\n"
- << " return static_cast< ::cppu::OWeakObject * >(new "
- << classname << "(context));\n}\n\n";
-
- // close namepsace
- for (short j=0; j < nbrackets; j++)
- o << "} ";
- o << "// closing component helper namespace\n\n";
-
-}
-
-void generateCompFunctions(std::ostream & o, const OString & nmspace)
-{
- o << "static ::cppu::ImplementationEntry const entries[] = {\n"
- << " { &" << nmspace << "::_create,\n &"
- << nmspace << "::_getImplementationName,\n &"
- << nmspace << "::_getSupportedServiceNames,\n"
- << " &::cppu::createSingleComponentFactory, 0, 0 },\n"
- << " { 0, 0, 0, 0, 0, 0 }\n};\n\n";
-
- o << "extern \"C\" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(\n"
- << " const char * implName, void * serviceManager, void * registryKey)\n{\n"
- << " return ::cppu::component_getFactoryHelper(\n"
- << " implName, serviceManager, registryKey, entries);\n}\n\n";
-
- o << "extern \"C\" sal_Bool SAL_CALL component_writeInfo(\n"
- << " void * serviceManager, void * registryKey)\n{\n"
- << " return ::cppu::component_writeInfoHelper("
- << "serviceManager, registryKey, entries);\n}\n";
-}
-
-void generateXPropertySetBodies(std::ostream& o,
- const OString & classname,
- const OString & propertyhelper)
-{
- o << "// com.sun.star.beans.XPropertySet:\n";
-
- o << "css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL "
- << classname << "getPropertySetInfo() throw ("
- "css::uno::RuntimeException)\n{\n return ::cppu::PropertySetMixin< "
- << propertyhelper
- << " >::getPropertySetInfo();\n}\n\n";
-
- o << "void SAL_CALL " << classname << "setPropertyValue(const ::rtl::OUString"
- " & aPropertyName, const css::uno::Any & aValue) throw ("
- "css::uno::RuntimeException, css::beans::UnknownPropertyException, "
- "css::beans::PropertyVetoException, css::lang::IllegalArgumentException, "
- "css::lang::WrappedTargetException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper << " >::setPropertyValue(aPropertyName, aValue);\n}\n\n";
-
-
- o << "css::uno::Any SAL_CALL " << classname << "getPropertyValue(const "
- "::rtl::OUString & aPropertyName) throw (css::uno::RuntimeException, "
- "css::beans::UnknownPropertyException, css::lang::WrappedTargetException)"
- "\n{\n return ::cppu::PropertySetMixin< "
- << propertyhelper << " >::getPropertyValue(aPropertyName);\n}\n\n";
-
- o << "void SAL_CALL " << classname << "addPropertyChangeListener(const "
- "::rtl::OUString & aPropertyName, const css::uno::Reference< "
- "css::beans::XPropertyChangeListener > & xListener) throw ("
- "css::uno::RuntimeException, css::beans::UnknownPropertyException, "
- "css::lang::WrappedTargetException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper
- << " >::addPropertyChangeListener(aPropertyName, xListener);\n}\n\n";
-
- o << "void SAL_CALL " << classname << "removePropertyChangeListener(const "
- "::rtl::OUString & aPropertyName, const css::uno::Reference< "
- "css::beans::XPropertyChangeListener > & xListener) throw ("
- "css::uno::RuntimeException, css::beans::UnknownPropertyException, "
- "css::lang::WrappedTargetException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper
- << " >::removePropertyChangeListener(aPropertyName, xListener);\n}\n\n";
-
- o << "void SAL_CALL " << classname << "addVetoableChangeListener(const "
- "::rtl::OUString & aPropertyName, const css::uno::Reference< "
- "css::beans::XVetoableChangeListener > & xListener) throw ("
- "css::uno::RuntimeException, css::beans::UnknownPropertyException, "
- "css::lang::WrappedTargetException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper
- << " >::addVetoableChangeListener(aPropertyName, xListener);\n}\n\n";
-
- o << "void SAL_CALL " << classname << "removeVetoableChangeListener(const "
- "::rtl::OUString & aPropertyName, const css::uno::Reference< "
- "css::beans::XVetoableChangeListener > & xListener) throw ("
- "css::uno::RuntimeException, css::beans::UnknownPropertyException, "
- "css::lang::WrappedTargetException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper
- << " >::removeVetoableChangeListener(aPropertyName, xListener);\n}\n\n";
-}
-
-void generateXFastPropertySetBodies(std::ostream& o,
- const OString & classname,
- const OString & propertyhelper)
-{
- o << "// com.sun.star.beans.XFastPropertySet:\n";
-
- o << "void SAL_CALL " << classname << "setFastPropertyValue( ::sal_Int32 "
- "nHandle, const css::uno::Any& aValue ) throw ("
- "css::beans::UnknownPropertyException, css::beans::PropertyVetoException, "
- "css::lang::IllegalArgumentException, css::lang::WrappedTargetException, "
- "css::uno::RuntimeException)\n{\n ::cppu::PropertySetMixin< "
- << propertyhelper << " >::setFastPropertyValue(nHandle, aValue);\n}\n\n";
-
-
- o << "css::uno::Any SAL_CALL " << classname << "getFastPropertyValue( "
- "::sal_Int32 nHandle ) throw (css::beans::UnknownPropertyException, "
- "css::lang::WrappedTargetException, css::uno::RuntimeException)\n{\n"
- " return ::cppu::PropertySetMixin< "
- << propertyhelper << " >::getFastPropertyValue(nHandle);\n}\n\n";
-}
-
-void generateXPropertyAccessBodies(std::ostream& o,
- const OString & classname,
- const OString & propertyhelper)
-{
- o << " // com.sun.star.beans.XPropertyAccess:\n";
-
- o << "css::uno::Sequence< css::beans::PropertyValue > SAL_CALL "
- << classname << "getPropertyValues( ) throw ("
- "::com::sun::star::uno::RuntimeException)\n{\n"
- " return ::cppu::PropertySetMixin< "
- << propertyhelper << " >::getPropertyValues();\n}\n\n";
-
- o << "void SAL_CALL " << classname << "setPropertyValues( const "
- "css::uno::Sequence< css::beans::PropertyValue >& aProps ) throw ("
- "css::beans::UnknownPropertyException, css::beans::PropertyVetoException, "
- "css::lang::IllegalArgumentException, css::lang::WrappedTargetException, "
- "css::uno::RuntimeException)\n{\n"
- " ::cppu::PropertySetMixin< "
- << propertyhelper << " >::setPropertyValues(aProps);\n}\n\n";
-}
-
-void generateXLocalizable(std::ostream& o, const OString & classname)
-{
- o << "// ::com::sun::star::lang::XLocalizable:\n"
- "void SAL_CALL " << classname << "setLocale(const css::lang::"
- "Locale & eLocale) throw (css::uno::RuntimeException)\n{\n"
- " m_locale = eLocale;\n}\n\n"
- "css::lang::Locale SAL_CALL " << classname << "getLocale() "
- "throw (css::uno::RuntimeException)\n{\n return m_locale;\n}\n\n";
-}
-
-void generateXAddInBodies(std::ostream& o, const OString & classname)
-{
- o << "// ::com::sun::star::sheet::XAddIn:\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getProgrammaticFuntionName("
- "const ::rtl::OUString & aDisplayName) throw (css::uno::RuntimeException)"
- "\n{\n ::rtl::OUString ret;\n try {\n css::uno::Reference< "
- "css::container::XNameAccess > xNAccess(m_xHAccess, css::uno::UNO_QUERY);\n"
- " css::uno::Sequence< ::rtl::OUString > functions = "
- "xNAccess->getElementNames();\n sal_Int32 len = functions."
- "getLength();\n ::rtl::OUString sDisplayName;\n"
- " for (sal_Int32 i=0; i < len; ++i) {\n"
- " sDisplayName = getAddinProperty(functions[i], "
- "::rtl::OUString(),\n "
- "sDISPLAYNAME);\n if (sDisplayName.equals(aDisplayName))\n"
- " return functions[i];\n }\n }\n"
- " catch ( css::uno::RuntimeException & e ) {\n throw e;\n }\n"
- " catch ( css::uno::Exception & ) {\n }\n return ret;\n}\n\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getDisplayFunctionName(const "
- "::rtl::OUString & aProgrammaticName) throw (css::uno::RuntimeException)\n"
- "{\n return getAddinProperty(aProgrammaticName, ::rtl::OUString(), "
- "sDISPLAYNAME);\n}\n\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getFunctionDescription(const "
- "::rtl::OUString & aProgrammaticName) throw (css::uno::RuntimeException)\n"
- "{\n return getAddinProperty(aProgrammaticName, ::rtl::OUString(), "
- "sDESCRIPTION);\n}\n\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getDisplayArgumentName(const "
- "::rtl::OUString & aProgrammaticFunctionName, ::sal_Int32 nArgument) throw "
- "(css::uno::RuntimeException)\n{\n return getAddinProperty("
- "aProgrammaticFunctionName,\n m_functionMap["
- "aProgrammaticFunctionName][nArgument],\n"
- " sDISPLAYNAME);\n}\n\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getArgumentDescription(const "
- "::rtl::OUString & aProgrammaticFunctionName, ::sal_Int32 nArgument) throw "
- "(css::uno::RuntimeException)\n{\n return getAddinProperty("
- "aProgrammaticFunctionName,\n "
- "m_functionMap[aProgrammaticFunctionName][nArgument],\n"
- " sDESCRIPTION);\n}\n\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getProgrammaticCategoryName("
- "const ::rtl::OUString & aProgrammaticFunctionName) throw ("
- "css::uno::RuntimeException)\n{\n return getAddinProperty("
- "aProgrammaticFunctionName, ::rtl::OUString(), sCATEGORY);\n}\n\n";
-
- o << "::rtl::OUString SAL_CALL " << classname << "getDisplayCategoryName(const "
- "::rtl::OUString & aProgrammaticFunctionName) throw ("
- "css::uno::RuntimeException)\n{\n return getAddinProperty("
- "aProgrammaticFunctionName, ::rtl::OUString(), "
- "sCATEGORYDISPLAYNAME);\n}\n\n";
-}
-
-void generateXCompatibilityNamesBodies(std::ostream& o, const OString & classname)
-{
- o << "// ::com::sun::star::sheet::XCompatibilityNames:\n"
- "css::uno::Sequence< css::sheet::LocalizedName > SAL_CALL " << classname
- << "getCompatibilityNames(const ::rtl::OUString & aProgrammaticName) throw "
- "(css::uno::RuntimeException)\n{\n css::uno::Sequence< "
- "css::sheet::LocalizedName > seqLocalizedNames;\n try {\n "
- "::rtl::OUStringBuffer buf("
- "aProgrammaticName);\n buf.appendAscii(\"/CompatibilityName\");\n"
- " ::rtl::OUString hname(buf.makeStringAndClear());\n\n "
- "if ( m_xCompAccess->hasByHierarchicalName(hname) ) {\n"
- " css::uno::Reference< css::container::XNameAccess > "
- "xNameAccess(\n"
- " m_xCompAccess->getByHierarchicalName(hname), "
- "css::uno::UNO_QUERY);\n\n css::uno::Sequence< ::rtl::OUString"
- " > elems = \n xNameAccess->getElementNames();"
- "\n ::sal_Int32 len = elems.getLength();\n\n "
- "seqLocalizedNames.realloc(len);\n\n ::rtl::OUString "
- "sCompatibilityName;\n for (::sal_Int32 i=0; i < len; ++i) {\n"
- " ::rtl::OUString sLocale(elems[i]);\n "
- "xNameAccess->getByName(sLocale) >>= sCompatibilityName;\n\n"
- " css::lang::Locale aLocale;\n "
- "::sal_Int32 nIndex = 0, nToken = 0;\n "
- "do {\n ::rtl::OUString aToken = sLocale.getToken(0, '-', "
- "nIndex);\n switch (nToken++) {\n "
- "case 0:\n aLocale.Language = aToken;\n"
- " break;\n case 1:\n"
- " aLocale.Country = aToken;\n "
- " break;\n default:\n "
- "aLocale.Variant = sLocale.copy(nIndex-aToken.getLength()-1);\n"
- " nIndex = -1;\n }\n"
- " } while ( nIndex >= 0 );\n\n "
- "seqLocalizedNames[i].Locale = aLocale;\n "
- "seqLocalizedNames[i].Name = sCompatibilityName;\n }"
- "\n }\n }\n catch ( css::uno::RuntimeException & e ) {\n "
- "throw e;\n }\n catch ( css::uno::Exception & ) {\n }\n\n"
- " return seqLocalizedNames;\n}\n\n";
-}
-
-void generateXInitialization(std::ostream& o, const OString & classname)
-{
- o << "// ::com::sun::star::lang::XInitialization:\n"
- "void SAL_CALL " << classname << "initialize( const css::uno::Sequence< "
- "css::uno::Any >& aArguments ) "
- "throw (css::uno::Exception, css::uno::RuntimeException)\n{\n"
- " css::uno::Reference < css::frame::XFrame > xFrame;\n"
- " if ( aArguments.getLength() ) {\n aArguments[0] >>= xFrame;\n"
- " m_xFrame = xFrame;\n }\n}\n\n";
-}
-
-void generateXDispatch(std::ostream& o,
- const OString & classname,
- const ProtocolCmdMap & protocolCmdMap)
-{
- // com.sun.star.frame.XDispatch
- // dispatch
- o << "// ::com::sun::star::frame::XDispatch:\n"
- "void SAL_CALL " << classname << "dispatch( const css::util::URL& aURL, const "
- "css::uno::Sequence< css::beans::PropertyValue >& aArguments ) throw"
- "(css::uno::RuntimeException)\n{\n";
-
- ProtocolCmdMap::const_iterator iter = protocolCmdMap.begin();
- while (iter != protocolCmdMap.end()) {
- o << " if ( aURL.Protocol.equalsAscii(\"" << (*iter).first
- << "\") == 0 )\n {\n";
-
- for (std::vector< OString >::const_iterator i = (*iter).second.begin();
- i != (*iter).second.end(); ++i) {
- o << " if ( aURL.Path.equalsAscii(\"" << (*i) << "\") )\n"
- " {\n // add your own code here\n"
- " return;\n }\n";
- }
-
- o << " }\n";
- ++iter;
- }
- o << "}\n\n";
-
- // addStatusListener
- o << "void SAL_CALL " << classname << "addStatusListener( const css::uno::Reference< "
- "css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) "
- "throw (css::uno::RuntimeException)\n{\n"
- " // add your own code here\n}\n\n";
-
- // removeStatusListener
- o << "void SAL_CALL " << classname << "removeStatusListener( const css::uno::Reference"
- "< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) "
- "throw (css::uno::RuntimeException)\n{\n"
- " // add your own code here\n}\n\n";
-}
-
-void generateXDispatchProvider(std::ostream& o,
- const OString & classname,
- const ProtocolCmdMap & protocolCmdMap)
-{
-
- // com.sun.star.frame.XDispatchProvider
- // queryDispatch
- o << "// ::com::sun::star::frame::XDispatchProvider:\n"
- "css::uno::Reference< css::frame::XDispatch > SAL_CALL " << classname
- << "queryDispatch( const css::util::URL& aURL,"
- " const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags ) "
- "throw(css::uno::RuntimeException)\n{\n css::uno::Reference< "
- "css::frame::XDispatch > xRet;\n"
- " if ( !m_xFrame.is() )\n return 0;\n\n";
-
- ProtocolCmdMap::const_iterator iter = protocolCmdMap.begin();
- while (iter != protocolCmdMap.end()) {
- o << " if ( aURL.Protocol.equalsAscii(\"" << (*iter).first
- << "\") == 0 )\n {\n";
-
- for (std::vector< OString >::const_iterator i = (*iter).second.begin();
- i != (*iter).second.end(); ++i) {
- o << " if ( aURL.Path.equalsAscii(\"" << (*i) << "\") == 0 )\n"
- " xRet = this;\n";
- }
-
- o << " }\n";
- ++iter;
- }
- o << " return xRet;\n}\n\n";
-
- // queryDispatches
- o << "css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL "
- << classname << "queryDispatches( const css::uno::Sequence< "
- "css::frame::DispatchDescriptor >& seqDescripts ) throw("
- "css::uno::RuntimeException)\n{\n"
- " sal_Int32 nCount = seqDescripts.getLength();\n"
- " css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > "
- "lDispatcher(nCount);\n\n"
- " for( sal_Int32 i=0; i<nCount; ++i ) {\n"
- " lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL,\n"
- " seqDescripts[i].FrameName,\n"
- " seqDescripts[i].SearchFlags );\n"
- " }\n\n return lDispatcher;\n}\n\n";
-}
-
-void generateAddinConstructorAndHelper(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager, const OString & classname,
- const boost::unordered_set< OString, OStringHash >& interfaces)
-{
- o << classname << "::" << classname
- << "(css::uno::Reference< css::uno::XComponentContext > const & context) :\n"
- << " m_xContext(context), m_locale()\n{\n";
-
- if (options.backwardcompatible) {
- o << " try {\n";
-
- generateFunctionParameterMap(o, options, manager, interfaces);
-
- o << " css::uno::Reference< css::lang::XMultiServiceFactory > xProvider"
- "(\n m_xContext->getServiceManager()->createInstanceWithContext"
- "(\n ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\n "
- " \"com.sun.star.configuration.ConfigurationProvider\")),"
- "\n m_xContext ), css::uno::UNO_QUERY );\n\n";
-
- o << " ::rtl::OUString sReadOnlyView(\n"
- " RTL_CONSTASCII_USTRINGPARAM(\n"
- " \"com.sun.star.configuration.ConfigurationAccess\"));\n\n";
-
- o << " ::rtl::OUStringBuffer sPath(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\n"
- " \"/org.openoffice.Office.CalcAddIns/AddInInfo/\")));\n"
- " sPath.appendAscii(sADDIN_SERVICENAME);\n"
- " sPath.appendAscii(\"/AddInFunctions\");\n\n"
- " // create arguments: nodepath\n"
- " css::beans::PropertyValue aArgument;\n"
- " aArgument.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"nodepath\"));\n"
- " aArgument.Value <<= sPath.makeStringAndClear();\n\n"
- " css::uno::Sequence< css::uno::Any > aArguments(1);\n"
- " aArguments[0] <<= aArgument;\n\n";
-
- o << " // create the default view using default UI locale\n"
- " css::uno::Reference< css::uno::XInterface > xIface =\n"
- " xProvider->createInstanceWithArguments(sReadOnlyView, "
- "aArguments);\n\n"
- " m_xHAccess = css::uno::Reference<\n "
- "css::container::XHierarchicalNameAccess >(xIface, css::uno::UNO_QUERY);"
- "\n\n";
-
- o << " // extend arguments to create a view for all locales to get "
- "simple\n // access to the compatibilityname property\n"
- " aArgument.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"locale\"));\n"
- " aArgument.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"*\"));\n"
- " aArguments.realloc(2);\n"
- " aArguments[1] <<= aArgument;\n\n"
- " // create view for all locales\n"
- " xIface = xProvider->createInstanceWithArguments(sReadOnlyView, "
- "aArguments);\n\n"
- " m_xCompAccess = css::uno::Reference<\n "
- "css::container::XHierarchicalNameAccess >(xIface, css::uno::UNO_QUERY);\n";
-
- o << " }\n catch ( css::uno::Exception & ) {\n }\n}\n\n";
-
- o << "// addin configuration property helper function:\n::rtl::OUString "
- "SAL_CALL " << classname << "::getAddinProperty(const ::rtl::OUString &"
- " funcName, const ::rtl::OUString & paramName, const char * propName) "
- "throw (css::uno::RuntimeException)\n{\n"
- " ::rtl::OUString ret;\n try {\n "
- "::rtl::OUStringBuffer buf(funcName);\n"
- " if (paramName.getLength() > 0) {\n"
- " buf.appendAscii(\"/Parameters/\");\n"
- " buf.append(paramName);\n }\n\n"
- " css::uno::Reference< css::beans::XPropertySet > xPropSet(\n"
- " m_xHAccess->getByHierarchicalName(\n"
- " buf.makeStringAndClear()), css::uno::UNO_QUERY);\n"
- " xPropSet->getPropertyValue(\n "
- "::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(propName))) >>= ret;\n }\n"
- " catch ( css::uno::RuntimeException & e ) {\n throw e;\n }\n"
- " catch ( css::uno::Exception & ) {\n }\n return ret;\n";
- }
- o <<"}\n\n";
-}
-
-void generateMemberInitialization(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- AttributeInfo const & members)
-{
- if (!members.empty()) {
- for (AttributeInfo::const_iterator i(members.begin());
- i != members.end(); ++i)
- {
- RTTypeClass typeClass;
- OString type(i->second.first.replace('.','/'));
- OString name;
- sal_Int32 rank;
- std::vector< OString > arguments;
- codemaker::UnoType::Sort sort = codemaker::decomposeAndResolve(
- manager, type, true, true, true, &typeClass, &name, &rank,
- &arguments);
-
- if (sort <= codemaker::UnoType::SORT_CHAR && rank == 0) {
- o << ",\n m_" << i->first << "(";
- printType(o, options, manager, type, 16, true);
- o << ")";
- }
- }
- }
-}
-
-void generateMemberDeclaration(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- AttributeInfo const & members)
-{
- for (AttributeInfo::const_iterator i(members.begin());
- i != members.end(); ++i)
- {
- o << " ";
- printType(o, options, manager, i->second.first.replace('.','/'),
- 1, false);
- o << " m_" << i->first << ";\n";
- }
-}
-
-OString generateClassDefinition(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- OString const & classname,
- boost::unordered_set< OString, OStringHash > const & interfaces,
- AttributeInfo const & properties,
- AttributeInfo const & attributes,
- boost::unordered_set< OString, OStringHash > const & propinterfaces,
- OString const & propertyhelper, bool supportxcomponent)
-{
- OStringBuffer parentname(64);
- o << "class " << classname << ":\n";
-
- if (!interfaces.empty()) {
- if (supportxcomponent) {
- parentname.append("::cppu::WeakComponentImplHelper");
- parentname.append(static_cast<sal_Int32>(interfaces.size()));
- o << " private ::cppu::BaseMutex,\n"
- << " public ::cppu::WeakComponentImplHelper"
- << interfaces.size() << "<";
- } else {
- parentname.append("::cppu::WeakImplHelper");
- parentname.append(static_cast<sal_Int32>(interfaces.size()));
- o << " public ::cppu::WeakImplHelper" << interfaces.size() << "<";
- }
-
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- while (iter != interfaces.end())
- {
- o << "\n " << scopedCppName(*iter, false, true);
- ++iter;
- if (iter != interfaces.end())
- o << ",";
- else
- o << ">";
- }
- }
-
- if (propertyhelper.getLength() > 1) {
- o << ",\n public ::cppu::PropertySetMixin< "
- << scopedCppName(propertyhelper, false, true) << " >";
- }
-
- o << "\n{\npublic:\n"
- << " explicit " << classname << "("
- << "css::uno::Reference< css::uno::XComponentContext > const & context);\n\n";
-
- // generate component/service helper functions
-// o << " // component and service helper functions:\n"
-// << " static ::rtl::OUString SAL_CALL _getImplementationName();\n"
-// << " static css::uno::Sequence< ::rtl::OUString > SAL_CALL "
-// << "_getSupportedServiceNames();\n"
-// << " static css::uno::Reference< css::uno::XInterface > SAL_CALL _create("
-// << "\n css::uno::Reference< css::uno::XComponentContext > const & "
-// << "context);\n\n";
-
- // overload queryInterface
- if (propertyhelper.getLength() > 1) {
- o << " // ::com::sun::star::uno::XInterface:\n"
- " virtual css::uno::Any SAL_CALL queryInterface("
- "css::uno::Type const & type) throw ("
- "css::uno::RuntimeException);\n";
-
- OStringBuffer buffer(256);
- buffer.append(parentname);
- buffer.append("< ");
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- while (iter != interfaces.end())
- {
- buffer.append(scopedCppName(*iter, false, true));
- ++iter;
- if (iter != interfaces.end())
- buffer.append(", ");
- else
- buffer.append(" >");
- }
- OString parent(buffer.makeStringAndClear());
- o << " virtual void SAL_CALL acquire() throw ()\n { "
- << parent << "::acquire(); }\n";
- o << " virtual void SAL_CALL release() throw ()\n { "
- << parent << "::release(); }\n\n";
- }
-
- boost::unordered_set< OString, OStringHash >::const_iterator it =
- interfaces.begin();
- codemaker::GeneratedTypeSet generated;
- while (it != interfaces.end())
- {
- typereg::Reader reader(manager.getTypeReader((*it).replace('.','/')));
- printMethods(o, options, manager, reader, generated, "", "", " ",
- true, propertyhelper);
- ++it;
- }
-
- o << "private:\n " << classname << "(const " << classname << " &); // not defined\n"
- << " " << classname << "& operator=(const " << classname << " &); // not defined\n\n"
- << " // destructor is private and will be called indirectly by the release call"
- << " virtual ~" << classname << "() {}\n\n";
-
- if (options.componenttype == 2) {
- o << " typedef boost::unordered_map< ::sal_Int32, rtl::OUString, "
- "boost::hash<::sal_Int32> > ParamMap;\n"
- " typedef boost::unordered_map< rtl::OUString, ParamMap, "
- "rtl::OUStringHash > FunctionMap;\n\n"
- " ::rtl::OUString SAL_CALL getAddinProperty(const ::rtl::OUString & "
- "funcName, const ::rtl::OUString & paramName, const char * propName) "
- "throw (css::uno::RuntimeException);\n\n";
- }
-
- if (supportxcomponent) {
- o << " // overload WeakComponentImplHelperBase::disposing()\n"
- " // This function is called upon disposing the component,\n"
- " // if your component needs special work when it becomes\n"
- " // disposed, do it here.\n"
- " virtual void SAL_CALL disposing();\n\n";
- }
-
- // members
- o << " css::uno::Reference< css::uno::XComponentContext > m_xContext;\n";
- if (!supportxcomponent && !attributes.empty())
- o << " mutable ::osl::Mutex m_aMutex;\n";
-
- // additional member for add-ons
- if (options.componenttype == 3) {
- o << " css::uno::Reference< css::frame::XFrame > m_xFrame;\n";
- }
-
- if (options.componenttype == 2) {
- if (options.backwardcompatible) {
- o <<" css::uno::Reference< css::container::XHierarchicalNameAccess > "
- "m_xHAccess;\n"
- " css::uno::Reference< css::container::XHierarchicalNameAccess > "
- "m_xCompAccess;\n"
- " FunctionMap m_functionMap;\n";
- }
- o << " css::lang::Locale m_locale;\n";
- }
-
- generateMemberDeclaration(o, options, manager, properties);
- generateMemberDeclaration(o, options, manager, attributes);
-
-// if (!properties.empty())
-// {
-// AttributeInfo::const_iterator iter = properties.begin();
-// while (iter != properties.end())
-// {
-// o << " ";
-// printType(o, options, manager, iter->second.first.replace('.','/'),
-// 1, false);
-// o << " m_" << iter->first << ";\n";
-// iter++;
-// }
-// }
-// if (!attributes.empty())
-// {
-// AttributeInfo::const_iterator iter = attributes.begin();
-// while (iter != attributes.end())
-// {
-// o << " ";
-// printType(o, options, manager, iter->second.first.replace('.','/'),
-// 1, false);
-// o << " m_" << iter->first << ";\n";
-// iter++;
-// }
-// }
-
- o << "};\n\n";
-
- // generate constructor
- if (options.componenttype == 2) {
- generateAddinConstructorAndHelper(o, options, manager,
- classname, interfaces);
- } else {
- o << classname << "::" << classname
- << "(css::uno::Reference< css::uno::XComponentContext > const & context) :\n";
- if (supportxcomponent) {
- o << " ::cppu::WeakComponentImplHelper" << interfaces.size() << "<";
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- while (iter != interfaces.end()) {
- o << "\n " << scopedCppName(*iter, false, true);
- ++iter;
- if (iter != interfaces.end())
- o << ",";
- else
- o << ">(m_aMutex),\n";
- }
- }
- if (propertyhelper.getLength() > 1) {
- o << " ::cppu::PropertySetMixin< "
- << scopedCppName(propertyhelper, false, true) << " >(\n"
- << " context, static_cast< Implements >(\n ";
- OStringBuffer buffer(128);
- if (propinterfaces.find("com/sun/star/beans/XPropertySet")
- != propinterfaces.end()) {
- buffer.append("IMPLEMENTS_PROPERTY_SET");
- }
- if (propinterfaces.find("com/sun/star/beans/XFastPropertySet")
- != propinterfaces.end()) {
- if (buffer.getLength() > 0)
- buffer.append(" | IMPLEMENTS_FAST_PROPERTY_SET");
- else
- buffer.append("IMPLEMENTS_FAST_PROPERTY_SET");
- }
- if (propinterfaces.find("com/sun/star/beans/XPropertyAccess")
- != propinterfaces.end()) {
- if (buffer.getLength() > 0)
- buffer.append(" | IMPLEMENTS_PROPERTY_ACCESS");
- else
- buffer.append("IMPLEMENTS_PROPERTY_ACCESS");
- }
- o << buffer.makeStringAndClear()
- << "), css::uno::Sequence< ::rtl::OUString >()),\n";
- }
- o << " m_xContext(context)";
-
- generateMemberInitialization(o, options, manager, properties);
- generateMemberInitialization(o, options, manager, attributes);
-
- o << "\n{}\n\n";
- }
-
- // generate service/component helper function implementations
-// generateServiceHelper(o, options.implname, classname, services);
-
- if (supportxcomponent) {
- o << "// overload WeakComponentImplHelperBase::disposing()\n"
- "// This function is called upon disposing the component,\n"
- "// if your component needs special work when it becomes\n"
- "// disposed, do it here.\n"
- "void SAL_CALL " << classname << "::disposing()\n{\n\n}\n\n";
- }
-
- return parentname.makeStringAndClear();
-}
-
-void generateXServiceInfoBodies(std::ostream& o,
- OString const & classname,
- OString const & comphelpernamespace)
-{
- o << "// com.sun.star.uno.XServiceInfo:\n"
- << "::rtl::OUString SAL_CALL " << classname << "getImplementationName() "
- << "throw (css::uno::RuntimeException)\n{\n "
- << "return " << comphelpernamespace << "::_getImplementationName();\n}\n\n";
-
- o << "::sal_Bool SAL_CALL " << classname
- << "supportsService(::rtl::OUString const & "
- << "serviceName) throw (css::uno::RuntimeException)\n{\n "
- << "css::uno::Sequence< ::rtl::OUString > serviceNames = "
- << comphelpernamespace << "::_getSupportedServiceNames();\n "
- << "for (::sal_Int32 i = 0; i < serviceNames.getLength(); ++i) {\n "
- << " if (serviceNames[i] == serviceName)\n return sal_True;\n"
- << " }\n return sal_False;\n}\n\n";
-
- o << "css::uno::Sequence< ::rtl::OUString > SAL_CALL " << classname
- << "getSupportedServiceNames() throw (css::uno::RuntimeException)\n{\n "
- << "return " << comphelpernamespace
- << "::_getSupportedServiceNames();\n}\n\n";
-}
-
-
-void generateMethodBodies(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- boost::unordered_set< OString, OStringHash > const & interfaces,
- OString const & classname,
- OString const & comphelpernamespace,
- OString const & propertyhelper)
-{
- OString name(classname.concat("::"));
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- codemaker::GeneratedTypeSet generated;
- while (iter != interfaces.end()) {
- if ( (*iter).equals("com.sun.star.lang.XServiceInfo") ) {
- generateXServiceInfoBodies(o, name, comphelpernamespace);
- generated.add(*iter);
- } else {
- typereg::Reader reader(manager.getTypeReader((*iter).replace('.','/')));
- printMethods(o, options, manager, reader, generated, "_",
- name, "", true, propertyhelper);
- }
- ++iter;
- }
-}
-
-void generateQueryInterface(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- const boost::unordered_set< OString, OStringHash >& interfaces,
- OString const & parentname,
- OString const & classname,
- OString const & propertyhelper)
-{
- if (propertyhelper.getLength() == 0)
- return;
-
- o << "css::uno::Any " << classname
- << "::queryInterface(css::uno::Type const & type) throw ("
- "css::uno::RuntimeException)\n{\n ";
-
- if (propertyhelper.getLength() >= 1)
- o << "return ";
- else
- o << "css::uno::Any a(";
-
- o << parentname << "<";
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- while (iter != interfaces.end())
- {
- o << "\n " << scopedCppName(*iter, false, true);
- ++iter;
- if (iter != interfaces.end())
- o << ",";
- else
- o << ">";
- }
-
- if (propertyhelper.getLength() >= 1) {
- o << "::queryInterface(type);\n";
- } else {
- o << "::queryInterface(type));\n";
- o << " return a.hasValue() ? a\n : (";
- if (propertyhelper.equals("_")) {
- o << "::cppu::OPropertySetHelper::queryInterface(type));\n";
- } else {
- o << "::cppu::PropertySetMixin<\n ";
- printType(o, options, manager, propertyhelper.replace('.', '/'),
- 0, false);
- o << " >::queryInterface(\n type));\n";
- }
- }
- o << "}\n\n";
-}
-
-void generateSkeleton(ProgramOptions const & options,
- TypeManager const & manager,
- std::vector< OString > const & types,
- OString const & /*delegate*/)
-{
- // special handling of calc add-ins
- if (options.componenttype == 2) {
- generateCalcAddin(options, manager, types);
- return;
- }
-
- boost::unordered_set< OString, OStringHash > interfaces;
- boost::unordered_set< OString, OStringHash > services;
- AttributeInfo properties;
- AttributeInfo attributes;
- boost::unordered_set< OString, OStringHash > propinterfaces;
- bool serviceobject = false;
- bool supportxcomponent = false;
-
- std::vector< OString >::const_iterator iter = types.begin();
- while (iter != types.end()) {
- checkType(manager, *iter, interfaces, services, properties);
- ++iter;
- }
-
- if (options.componenttype == 3) {
- // the Protocolhandler service is mandatory for an protocol handler add-on,
- // so it is defaulted. The XDispatchProvider provides Dispatch objects for
- // certain functions and the generated impl object implements XDispatch
- // directly for simplicity reasons.
- checkType(manager, "com.sun.star.frame.ProtocolHandler",
- interfaces, services, properties);
- checkType(manager, "com.sun.star.frame.XDispatch",
- interfaces, services, properties);
- }
-
- // check if service object or simple UNO object
- if (!services.empty())
- serviceobject = true;
-
- OString propertyhelper = checkPropertyHelper(
- options, manager, services, interfaces, attributes, propinterfaces);
-
- checkDefaultInterfaces(interfaces, services, propertyhelper);
-
- if (interfaces.size() > 12)
- throw CannotDumpException(
- "the skeletonmaker supports components with 12 interfaces "
- "only (limitation of the UNO implementation helpers)!");
-
-
- supportxcomponent = checkXComponentSupport(manager, interfaces);
-
- OString compFileName;
- OString tmpFileName;
- std::ostream* pofs = NULL;
- bool standardout = getOutputStream(options, ".cxx",
- &pofs, compFileName, tmpFileName);
-
- try {
- if (!standardout && options.license) {
- printLicenseHeader(*pofs, compFileName);
- }
-
- generateIncludes(*pofs, interfaces, properties, propertyhelper,
- serviceobject, supportxcomponent);
-
- if (options.componenttype == 3) {
- *pofs << "#include \"com/sun/star/frame/XFrame.hpp\"\n";
- }
-
- // namespace
- OString nmspace;
- short nm = 0;
-
- if (serviceobject) {
- nmspace = generateCompHelperDeclaration(*pofs, options.implname);
-
- *pofs <<
- "\n\n/// anonymous implementation namespace\nnamespace {\n\n"
- "namespace css = ::com::sun::star;\n\n";
- } else {
- nm = generateNamespace(*pofs, options.implname, false, nmspace);
- *pofs << "namespace css = ::com::sun::star;\n\n";
- }
-
- sal_Int32 index = 0;
- OString classname(options.implname);
- if ((index = classname.lastIndexOf('.')) > 0)
- classname = classname.copy(index+1);
-
- OString parentname(
- generateClassDefinition(*pofs,
- options, manager, classname, interfaces, properties,
- attributes, propinterfaces, propertyhelper, supportxcomponent));
-
- generateQueryInterface(*pofs, options, manager, interfaces, parentname,
- classname, propertyhelper);
-
- generateMethodBodies(*pofs, options, manager, interfaces, classname,
- nmspace, propertyhelper);
-
- if (serviceobject) {
- // close namepsace
- *pofs << "} // closing anonymous implementation namespace\n\n";
-
- generateCompHelperDefinition(*pofs, options.implname,
- classname, services);
- generateCompFunctions(*pofs, nmspace);
- } else {
- // close namepsace
- for (short i=0; i < nm; i++)
- *pofs << "} ";
- *pofs << (nm > 0 ? "// closing namespace\n\n" : "\n");
- }
-
- if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
- delete pofs;
- OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False));
- }
- } catch(CannotDumpException& e) {
-
- std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
- if ( !standardout ) {
- if (pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
- delete pofs;
- }
- // remove existing type file if something goes wrong to ensure
- // consistency
- if (fileExists(compFileName))
- removeTypeFile(compFileName);
-
- // remove tmp file if something goes wrong
- removeTypeFile(tmpFileName);
- }
- }
-}
-
-void generateCalcAddin(ProgramOptions const & options,
- TypeManager const & manager,
- std::vector< OString > const & types)
-{
- boost::unordered_set< OString, OStringHash > interfaces;
- boost::unordered_set< OString, OStringHash > services;
- AttributeInfo properties;
- AttributeInfo attributes;
- boost::unordered_set< OString, OStringHash > propinterfaces;
- bool serviceobject = false;
- bool supportxcomponent = false;
-
-
- std::vector< OString >::const_iterator iter = types.begin();
- while (iter != types.end()) {
- checkType(manager, *iter, interfaces, services, properties);
- ++iter;
- }
-
- OString sAddinService;
- if (services.size() != 1) {
- throw CannotDumpException(
- "for calc add-in components one and only one service type is necessary!"
- " Please reference a valid type with the '-t' option.");
- }
-
-
- // get the one and only add-in service for later use
- boost::unordered_set< OString, OStringHash >::const_iterator iter2 = services.begin();
- sAddinService = (*iter2).replace('/', '.');
- if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
- sAddinService = (*(++iter2)).replace('/', '.');
- }
-
- // if backwardcompatible==true the AddIn service needs to be added to the
- // suported service list, the necessary intefaces are mapped to the add-in
- // configuration. Since OO.org 2.0.4 this is obsolete and the add-in is
- // take form the configuration from Calc directly, this simplifies the
- // add-in code
- if (options.backwardcompatible) {
- checkType(manager, "com.sun.star.sheet.AddIn",
- interfaces, services, properties);
- } else {
- // special case for the optional XLocalization interface. It should be
- // implemented always. But it is parent of the XAddIn and we need it only
- // if backwardcompatible is false.
- if (interfaces.find("com.sun.star.lang.XLocalizable") == interfaces.end()) {
- interfaces.insert("com.sun.star.lang.XLocalizable");
- }
- }
-
- OString propertyhelper = checkPropertyHelper(
- options, manager, services, interfaces, attributes, propinterfaces);
-
- if (propertyhelper.getLength() > 0)
- std::cerr << "WARNING: interfaces specifying calc add-in functions "
- "shouldn't support attributes!\n";
-
- checkDefaultInterfaces(interfaces, services, propertyhelper);
-
- if (interfaces.size() > 12) {
- throw CannotDumpException(
- "the skeletonmaker supports components with 12 interfaces "
- "only (limitation of the UNO implementation helpers)!");
- }
-
- // check if service object or simple UNO object
- if (!services.empty())
- serviceobject = true;
-
- supportxcomponent = checkXComponentSupport(manager, interfaces);
- if (supportxcomponent)
- std::cerr << "WARNING: add-ins shouldn't support "
- "com.sun.star.uno.XComponent!\n";
-
- OString compFileName;
- OString tmpFileName;
- std::ostream* pofs = NULL;
- bool standardout = getOutputStream(options, ".cxx",
- &pofs, compFileName, tmpFileName);
-
- try {
- if (!standardout && options.license) {
- printLicenseHeader(*pofs, compFileName);
- }
-
- generateIncludes(*pofs, interfaces, properties, propertyhelper,
- serviceobject, supportxcomponent);
-
- *pofs <<
- "#include \"com/sun/star/beans/PropertyValue.hpp\"\n"
- "#include \"com/sun/star/beans/XPropertySet.hpp\"\n"
- "#include \"com/sun/star/container/XNameAccess.hpp\"\n"
- "#include \"com/sun/star/container/XHierarchicalNameAccess.hpp\"\n\n"
- "#include \"rtl/ustrbuf.hxx\"\n\n"
- "#include <boost/unordered_map.hpp>\n"
- "#include <set>\n";
-
- // namespace
- OString nmspace(generateCompHelperDeclaration(*pofs, options.implname));
-
- *pofs <<
- "\n\n// anonymous implementation namespace\nnamespace {\n\n"
- "namespace css = ::com::sun::star;\n\n";
-
- sal_Int32 index = 0;
- OString classname(options.implname);
- if ((index = classname.lastIndexOf('.')) > 0) {
- classname = classname.copy(index+1);
- }
-
- if (options.backwardcompatible) {
- *pofs << "static const char * sADDIN_SERVICENAME = \""
- << sAddinService << "\";\n\n";
- *pofs << "static const char * sDISPLAYNAME = \"DisplayName\";\n"
- "static const char * sDESCRIPTION = \"Description\";\n"
- "static const char * sCATEGORY = \"Category\";\n"
- "static const char * sCATEGORYDISPLAYNAME = \"CategoryDisplayName\";"
- "\n\n";
- }
-
- OString parentname(
- generateClassDefinition(*pofs,
- options, manager, classname, interfaces, properties,
- attributes, propinterfaces, propertyhelper, supportxcomponent));
-
- generateQueryInterface(*pofs, options, manager, interfaces, parentname,
- classname, propertyhelper);
-
- generateMethodBodies(*pofs, options, manager, interfaces, classname,
- nmspace, propertyhelper);
-
- // close namepsace
- *pofs << "} // closing anonymous implementation namespace\n\n";
-
- generateCompHelperDefinition(*pofs, options.implname, classname,
- services);
-
- generateCompFunctions(*pofs, nmspace);
-
- if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
- delete pofs;
- OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False));
- }
- } catch(CannotDumpException& e) {
-
- std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
- if ( !standardout ) {
- if (pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
- delete pofs;
- }
- // remove existing type file if something goes wrong to ensure
- // consistency
- if (fileExists(compFileName))
- removeTypeFile(compFileName);
-
- // remove tmp file if something goes wrong
- removeTypeFile(tmpFileName);
- }
- }
-}
-
-} }
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
deleted file mode 100644
index 08e4e657..00000000
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ /dev/null
@@ -1,973 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "codemaker/commoncpp.hxx"
-
-#include "skeletoncommon.hxx"
-#include "skeletoncpp.hxx"
-
-using namespace ::rtl;
-using namespace ::codemaker::cpp;
-
-namespace skeletonmaker { namespace cpp {
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- OString const & name, sal_Int32 rank,
- std::vector< OString > const & arguments, short referenceType,
- bool defaultvalue)
-{
- if (defaultvalue && rank == 0 && sort <= codemaker::UnoType::SORT_CHAR) {
- switch (sort)
- {
- case codemaker::UnoType::SORT_BOOLEAN:
- o << "sal_False";
- return;
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- o << "0";
- return;
- case codemaker::UnoType::SORT_VOID:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_COMPLEX:
- break;
- }
- }
-
- if (defaultvalue && referenceType == 16) {
- if (typeClass == RT_TYPE_ENUM) {
- typereg::Reader reader(manager.getTypeReader(name));
- o << name.copy(name.lastIndexOf('/'))
- << "_"
- << codemaker::convertString(reader.getFieldName(0));
- }
- return;
- }
- bool bReference = false;
- if (((sort > codemaker::UnoType::SORT_CHAR ||
- rank > 0) && referenceType != 8 &&
- !(typeClass == RT_TYPE_ENUM && referenceType == 4 && rank == 0)) ||
- (sort <= codemaker::UnoType::SORT_CHAR && referenceType == 2))
- {
- bReference = true;
- }
-
- if (bReference && referenceType == 4)
- o << "const ";
-
- for (sal_Int32 i = 0; i < rank; ++i) {
- o << ((options.shortnames) ? "css::uno::Sequence< " :
- "::com::sun::star::uno::Sequence< ");
- }
- if (typeClass == RT_TYPE_INTERFACE && referenceType > 0) {
- o << ((options.shortnames) ? "css::uno::Reference< " :
- "::com::sun::star::uno::Reference< ");
- }
-
- o << scopedCppName(codemaker::cpp::translateUnoToCppType(
- sort, typeClass, name, false),
- false, options.shortnames && referenceType > 0);
-
- if (typeClass == RT_TYPE_INTERFACE && referenceType > 0)
- o << " >";
-
- if (!arguments.empty()) {
- o << "< ";
- for (std::vector< OString >::const_iterator i(arguments.begin());
- i != arguments.end(); ++i)
- {
- if (i != arguments.begin())
- o << ", ";
-
- printType(o, options, manager, *i, 1, false);
- }
- o << " >";
- }
-
- for (sal_Int32 i = 0; i < rank; ++i)
- o << " >";
-
- if (bReference && referenceType > 1)
- o << " &";
-
- if (referenceType == 8 && (sort > codemaker::UnoType::SORT_CHAR || rank > 0))
- o << "()";
-}
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- OString const & type, short referenceType, bool defaultvalue)
-{
- RTTypeClass typeClass;
- OString name;
- sal_Int32 rank;
- std::vector< OString > arguments;
- codemaker::UnoType::Sort sort = codemaker::decomposeAndResolve(
- manager, type, true, true, true, &typeClass, &name, &rank, &arguments);
- printType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- referenceType, defaultvalue);
-}
-
-bool printConstructorParameters(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, typereg::Reader const & outerReader,
- std::vector< OString > const & arguments)
-{
- bool previous = false;
- if (reader.getSuperTypeCount() != 0) {
- OString super(
- codemaker::convertString(reader.getSuperTypeName(0)));
- typereg::Reader superReader(manager.getTypeReader(super));
- if (!superReader.isValid())
- throw CannotDumpException("Bad type library entity " + super);
-
- previous = printConstructorParameters(o,
- options, manager, superReader, outerReader, arguments);
- }
- for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) {
- if (previous)
- o << ", ";
- else
- previous = true;
-
- if ((reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) == 0) {
- printType(o, options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)), 4);
- } else if (arguments.empty()) {
- // ToDo !
- // o << "com::sun::star::uno::Any";
- } else {
- sal_uInt16 tparam = 0;
- while (outerReader.getReferenceTypeName(tparam)
- != reader.getFieldTypeName(i))
- {
- ++tparam;
- OSL_ASSERT(tparam < outerReader.getReferenceCount());
- }
- // assume std::vector< OString >::size_type is at least as
- // large as sal_uInt16:
- printType(o, options, manager, arguments[tparam], 4);
- }
- o << ' '
- << (codemaker::cpp::translateUnoToCppIdentifier(
- codemaker::convertString(reader.getFieldName(i)),
- "param").
- getStr());
- }
- return previous;
-}
-
-void printConstructor(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader,
- std::vector< OString > const & arguments)
-{
- OString type(codemaker::convertString(reader.getTypeName()));
- o << "public ";
- o << type.copy(type.lastIndexOf('/') + 1) << '(';
- printConstructorParameters(o, options, manager, reader, reader,
- arguments);
- o << ");\n";
-}
-
-void printMethodParameters(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, sal_uInt16 method, bool previous,
- bool withtype)
-{
- short referenceType = 4;
- for (sal_uInt16 i = 0; i < reader.getMethodParameterCount(method); ++i) {
- if (previous)
- o << ", ";
-
- previous = true;
-
- if (reader.getMethodParameterFlags(method, i) == RT_PARAM_OUT
- || reader.getMethodParameterFlags(method, i) == RT_PARAM_INOUT)
- {
- referenceType = 2;
- } else {
- referenceType = 4;
- }
-
- if (withtype) {
- printType(o, options, manager,
- codemaker::convertString(
- reader.getMethodParameterTypeName(method, i)),
- referenceType);
- o << ' ';
- }
-
- o << (codemaker::cpp::translateUnoToCppIdentifier(
- codemaker::convertString(
- reader.getMethodParameterName(method, i)),
- "param").
- getStr());
- }
-}
-
-void printExceptionSpecification(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, sal_uInt16 method)
-{
- o << ((options.shortnames) ? " throw (css::uno::RuntimeException" :
- " throw (::com::sun::star::uno::RuntimeException");
- if (reader.getMethodExceptionCount(method) > 0) {
- for (sal_uInt16 i = 0; i < reader.getMethodExceptionCount(method); ++i) {
- o << ", ";
- printType(o, options, manager,
- codemaker::convertString(
- reader.getMethodExceptionTypeName(method, i)), 1);
- }
- }
- o << ")";
-}
-
-void printSetPropertyMixinBody(std::ostream & o,
- typereg::Reader const & reader,
- sal_uInt16 field,
- sal_uInt16 method)
-{
- RTFieldAccess propFlags = checkAdditionalPropertyFlags(reader, field, method);
- OString fieldname = codemaker::convertString(reader.getFieldName(field));
- bool bound = (reader.getFieldFlags(field) & RT_ACCESS_BOUND ? true : false);
-
- o << "\n{\n";
-
- if (bound)
- o << " BoundListeners l;\n";
-
- if (propFlags & RT_ACCESS_CONSTRAINED) {
- OString fieldtype = codemaker::convertString(
- reader.getFieldTypeName(field));
-
- sal_Int32 index = fieldtype.lastIndexOf('<');
- sal_Int32 nPos=0;
- bool single = true;
- bool optional = false;
- OStringBuffer buffer1(64);
- OStringBuffer buffer2(64);
- do
- {
- OString s(fieldtype.getToken(0, '<', nPos));
- OString t = s.copy(s.lastIndexOf('/')+1);
-
- if (t.equals("Optional")) {
- optional=true;
- if (single) {
- single=false;
- buffer1.append("the_value.IsPresent");
- buffer2.append("the_value.Value");
- } else {
- buffer1.insert(0, t);
- buffer1.append(".IsPresent");
- buffer2.insert(0, t);
- buffer2.append(".Value");
- }
- } else {
- if (single) {
- single=false;
- if (!optional)
- buffer1.append("the_value.Value");
-
- buffer2.append("the_value.Value");
- } else {
- if (!optional) {
- buffer1.insert(0, t);
- buffer1.append(".Value");
- }
- buffer2.insert(0, t);
- buffer2.append(".Value");
- }
- }
- } while( nPos <= index );
-
- o << " css::uno::Any v;\n";
- if (optional) {
- o << " if(" << buffer1.makeStringAndClear() << ")\n {\n"
- << " v <<= " << buffer2.makeStringAndClear() << ";\n }\n";
- } else {
- o << " v <<= " << buffer2.makeStringAndClear() << ";\n\n";
- }
-
- o << " prepareSet(\n rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\""
- << fieldname << "\")),\n css::uno::Any(), v, ";
- } else {
- o << " prepareSet(\n rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\""
- << fieldname << "\")),\n css::uno::Any(), css::uno::Any(), ";
- }
-
- if (bound)
- o << "&l);\n";
- else
- o << "0);\n";
-
- o << " {\n osl::MutexGuard g(m_aMutex);\n m_"
- << fieldname << " = the_value;\n }\n";
-
- if (bound)
- o << " l.notify();\n";
-
- o << "}\n\n";
-}
-
-void generateXPropertySetBodies(std::ostream& o,
- const OString & classname,
- const OString & interfaceName);
-void generateXFastPropertySetBodies(std::ostream& o,
- const OString & classname,
- const OString & interfaceName);
-void generateXPropertyAccessBodies(std::ostream& o,
- const OString & classname,
- const OString & interfaceName);
-
-void generateXAddInBodies(std::ostream& o, const OString & classname);
-
-void generateXLocalizable(std::ostream& o, const OString & classname);
-
-void generateXCompatibilityNamesBodies(std::ostream& o, const OString & classname);
-
-void generateXInitialization(std::ostream& o, const OString & classname);
-
-void generateXDispatch(std::ostream& o,
- const OString & classname,
- const ProtocolCmdMap & protocolCmdMap);
-
-void generateXDispatchProvider(std::ostream& o,
- const OString & classname,
- const ProtocolCmdMap & protocolCmdMap);
-
-
-void printMethods(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, codemaker::GeneratedTypeSet & generated,
- OString const & delegate, OString const & classname,
- OString const & indentation, bool defaultvalue,
- OString const & propertyhelper)
-{
- OString type(codemaker::convertString(reader.getTypeName()));
- if (generated.contains(type) || type.equals("com/sun/star/uno/XInterface") ||
- (defaultvalue &&
- ( type.equals("com/sun/star/lang/XComponent") ||
- type.equals("com/sun/star/lang/XTypeProvider") ||
- type.equals("com/sun/star/uno/XWeak")) ) )
- {
- return;
- }
-
- static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
- bool body = ((delegate.getLength() > 0) ? true : false);
- bool defaultbody = ((delegate.equals(sd)) ? true : false);
-
- if (body && propertyhelper.getLength() > 1) {
- if ( type.equals("com/sun/star/beans/XPropertySet")) {
- generated.add(type);
- generateXPropertySetBodies(
- o, classname, scopedCppName(propertyhelper, false, true));
- return;
- } else if ( type.equals("com/sun/star/beans/XFastPropertySet")) {
- generated.add(type);
- generateXFastPropertySetBodies(
- o, classname, scopedCppName(propertyhelper, false, true));
- return;
- } else if ( type.equals("com/sun/star/beans/XPropertyAccess")) {
- generated.add(type);
- generateXPropertyAccessBodies(
- o, classname, scopedCppName(propertyhelper, false, true));
- return;
- }
- }
-
- if (body && options.componenttype == 2) {
- if (type.equals("com/sun/star/lang/XServiceName")) {
- o << "// ::com::sun::star::lang::XServiceName:\n"
- "::rtl::OUString SAL_CALL " << classname << "getServiceName() "
- "throw (css::uno::RuntimeException)\n{\n "
- "return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("
- "sADDIN_SERVICENAME));\n}\n";
- generated.add(type);
- return;
- } else if (type.equals("com/sun/star/sheet/XAddIn")) {
- generateXAddInBodies(o, classname);
- generated.add(type);
-
- // special handling of XLocalizable -> parent of XAddIn
- if (!generated.contains("com/sun/star/lang/XLocalizable")) {
- generateXLocalizable(o, classname);
- generated.add("com/sun/star/lang/XLocalizable");
- }
- return;
- } else if (type.equals("com/sun/star/lang/XLocalizable")) {
- generateXLocalizable(o, classname);
- generated.add(type);
- return;
- } else if (type.equals("com/sun/star/sheet/XCompatibilityNames")) {
- generateXCompatibilityNamesBodies(o, classname);
- generated.add(type);
- return;
- }
- }
-
- if (body && options.componenttype == 3) {
- if (type.equals("com/sun/star/lang/XInitialization")) {
- generateXInitialization(o, classname);
- generated.add(type);
- return;
- } else if (type.equals("com/sun/star/frame/XDispatch")) {
- generateXDispatch(o, classname, options.protocolCmdMap);
- generated.add(type);
- return;
- } else if (type.equals("com/sun/star/frame/XDispatchProvider")) {
- generateXDispatchProvider(o, classname, options.protocolCmdMap);
- generated.add(type);
- return;
- }
- }
-
- generated.add(type);
- if (options.all || defaultvalue) {
- for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) {
- typereg::Reader super(
- manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(i))));
- if (!super.isValid()) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(
- reader.getSuperTypeName(i)));
- }
-
- OString stype(codemaker::convertString(super.getTypeName()));
- printMethods(o, options, manager, super, generated, delegate,
- classname, indentation, defaultvalue, propertyhelper);
- }
-
- if (reader.getFieldCount() > 0 || reader.getMethodCount() > 0) {
- o << indentation << "// ";
- printType(o, options, manager, type, 0);
- o << ":\n";
- }
- }
- sal_uInt16 method = 0;
- for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) {
- o << indentation;
- if (!body)
- o << "virtual ";
-
- printType(o, options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)), 1);
- o << " SAL_CALL ";
- if (classname.getLength() > 0)
- o << classname;
-
- o << "get"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << "()";
- if (method < reader.getMethodCount()
- && reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_GET
- && reader.getMethodName(method) == reader.getFieldName(i))
- {
- printExceptionSpecification(o, options, manager, reader, method++);
- } else {
- o << ((options.shortnames) ? " throw (css::uno::RuntimeException)" :
- " throw (::com::sun::star::uno::RuntimeException)");
- }
- if (body) {
- if (defaultbody) {
- if (propertyhelper.getLength() > 0) {
- o << "\n{\n osl::MutexGuard g(m_aMutex);\n return m_"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << ";\n}\n\n";
- } else {
- o << "\n{\n return ";
- if (options.componenttype == 1) {
- o << "m_"
- << codemaker::convertString(
- reader.getFieldName(i)).getStr();
- } else {
- printType(o, options, manager,
- codemaker::convertString(
- reader.getFieldTypeName(i)),
- 8, true);
- }
- o << ";\n}\n\n";
- }
- } else {
- o << "\n" << indentation << "{\n" << indentation << " return "
- << delegate.getStr() << "get"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << "();\n" << indentation << "}\n\n";
- }
- } else {
- o << ";\n";
- }
-
- if ((reader.getFieldFlags(i) & RT_ACCESS_READONLY) == 0) {
- o << indentation;
- if (!body)
- o << "virtual ";
-
- o << "void SAL_CALL ";
- if (classname.getLength() > 0)
- o << classname;
-
- o << "set"
- << (codemaker::convertString(reader.getFieldName(i)).getStr())
- << '(';
- printType(o, options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)), 4);
- o << " the_value)";
- if (method < reader.getMethodCount()
- && reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_SET
- && reader.getMethodName(method) == reader.getFieldName(i))
- {
- printExceptionSpecification(o, options, manager, reader, method++);
- } else {
- o << ((options.shortnames) ? " throw (css::uno::RuntimeException)" :
- " throw (::com::sun::star::uno::RuntimeException)");
- }
- if (body) {
- if (defaultbody) {
- if (propertyhelper.getLength() > 0) {
- printSetPropertyMixinBody(o, reader, i, method);
- } else {
- if (options.componenttype == 1) {
- o << "\n{\n m_"
- << codemaker::convertString(
- reader.getFieldName(i)).getStr()
- << " = the_value;\n}\n\n";
- } else {
- o << "\n{\n\n}\n\n";
- }
- }
- } else {
- o << "\n" << indentation << "{\n" << indentation << " "
- << delegate.getStr() << "set"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << "(the_value);\n" << indentation << "}\n\n";
- }
- } else {
- o << ";\n";
- }
- }
- }
- for (; method < reader.getMethodCount(); ++method) {
- o << indentation;
- if (!body)
- o << "virtual ";
-
- printType(o, options, manager,
- codemaker::convertString(
- reader.getMethodReturnTypeName(method)), 1);
- o << " SAL_CALL ";
- if (classname.getLength() > 0)
- o << classname;
-
- const OString methodName(codemaker::convertString(reader.getMethodName(method)));
-
- o << methodName << '(';
- printMethodParameters(o, options, manager, reader, method, false, true);
- o << ')';
- printExceptionSpecification(o, options, manager, reader, method);
- if (body) {
- static OUString s(RTL_CONSTASCII_USTRINGPARAM("void"));
- if (defaultbody) {
- o << "\n{\n";
- if (!reader.getMethodReturnTypeName(method).equals(s)) {
- o << " // TODO: Exchange the default return implementation for \""
- << methodName << "\" !!!\n";
- o << " // Exchange the default return implementation.\n"
- " // NOTE: Default initialized polymorphic structs "
- "can cause problems because of\n // missing default "
- "initialization of primitive types of some C++ compilers or"
- "\n // different Any initialization in Java and C++ "
- "polymorphic structs.\n return ";
- printType(o, options, manager,
- codemaker::convertString(
- reader.getMethodReturnTypeName(method)), 8, true);
- o << ";";
- } else {
- o << " // TODO: Insert your implementation for \""
- << methodName << "\" here.";
- }
- o << "\n}\n\n";
- } else {
- o << "\n" << indentation << "{\n" << indentation << " ";
- if (!reader.getMethodReturnTypeName(method).equals(s))
- o << "return ";
-
- o << delegate.getStr()
- << (codemaker::convertString(
- reader.getMethodName(method)).getStr())
- << '(';
- printMethodParameters(o, options, manager, reader, method,
- false, false);
- o << ");\n" << indentation << "}\n\n";
- }
- } else {
- o << ";\n";
- }
- }
-
- if (method > 0 && !body)
- o << "\n";
-}
-
-void printConstructionMethods(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader)
-{
- for (sal_uInt16 i = 0; i < reader.getMethodCount(); ++i) {
- o << "static ";
- printType(o,
- options, manager,
- codemaker::convertString(reader.getSuperTypeName(0)), 1);
- o << ' ';
- if (reader.getMethodName(i).getLength() == 0) {
- o << "create";
- } else {
- o << (codemaker::cpp::translateUnoToCppIdentifier(
- codemaker::convertString(reader.getMethodName(i)),
- "method").
- getStr());
- }
- o << ((options.shortnames) ? "(css::uno::Reference< css" :
- "(::com::sun::star::uno::Reference< ::com::sun::star")
- << "::uno::XComponentContext > const & the_context";
- printMethodParameters(o, options, manager, reader, i,
- true, true);
- o << ')';
- printExceptionSpecification(o, options, manager, reader, i);
- o << ";\n";
- }
-}
-
-void printServiceMembers(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, OString const & type,
- OString const & delegate)
-{
- for (sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i) {
- OString referenceType(
- codemaker::convertString(
- reader.getReferenceTypeName(i)).replace('/', '.'));
-
- if ( reader.getReferenceSort(i) == RT_REF_SUPPORTS ) {
- o << "\n// supported interface " << referenceType.getStr() << "\n";
- generateDocumentation(o, options, manager, referenceType, delegate);
- } else if ( reader.getReferenceSort(i) == RT_REF_EXPORTS ) {
- o << "\n// exported service " << referenceType.getStr() << "\n";
- generateDocumentation(o, options, manager, referenceType, delegate);
- o << "\n// end of exported service " << referenceType.getStr() << "\n";
- }
- }
-
- if (delegate.getLength() == 0) {
- o << "\n// properties of service \""<< type.getStr() << "\"\n";
- for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) {
- OString fieldName(
- codemaker::convertString(reader.getFieldName(i)));
- OString fieldType(
- codemaker::convertString(reader.getFieldTypeName(i)));
-
- o << "// private ";
- printType(o, options, manager, fieldType, 1);
- o << " "
- << codemaker::cpp::translateUnoToCppIdentifier(
- fieldName, "property").getStr()
- << ";\n";
- }
- }
-}
-
-void printMapsToCppType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- OString const & name, sal_Int32 rank,
- std::vector< OString > const & arguments, const char * cppTypeSort)
-{
- o << "maps to C++ ";
- if (cppTypeSort != 0)
- o << cppTypeSort << ' ';
-
- o << "type \"";
- if (rank == 0 && name == "com/sun/star/uno/XInterface") {
- o << "Reference< com::sun::star::uno::XInterface >";
- } else {
- printType(o, options, manager, sort, typeClass, name, rank, arguments, 0);
- }
- o << '"';
-}
-
-void generateDocumentation(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- OString const & type, OString const & delegate)
-{
- if (type.indexOf('/') >= 0)
- throw CannotDumpException("Illegal type name " + type);
-
- OString binType(type.replace('.', '/'));
- RTTypeClass typeClass;
- OString name;
- sal_Int32 rank;
- std::vector< OString > arguments;
- codemaker::UnoType::Sort sort = decomposeResolveAndCheck(
- manager, binType, false, true, true, &typeClass, &name, &rank,
- &arguments);
-
- bool comment=true;
- if (delegate.getLength() > 0) {
- if (typeClass != RT_TYPE_INTERFACE &&
- typeClass != RT_TYPE_SERVICE )
- {
- return;
- }
- comment=false;
- }
-
- if (comment) {
- o << "\n// UNO";
- if (rank > 0) {
- o << " sequence type";
- } else if (sort != codemaker::UnoType::SORT_COMPLEX) {
- o << " simple type";
- } else {
- typereg::Reader reader(manager.getTypeReader(name));
- if (!reader.isValid())
- throw CannotDumpException("Bad type library entity " + name);
-
- switch (typeClass)
- {
- case RT_TYPE_INTERFACE:
- o << " interface type";
- break;
-
- case RT_TYPE_MODULE:
- o << "IDL module";
- break;
-
- case RT_TYPE_STRUCT:
- if (reader.getReferenceCount() == 0)
- o << " simple struct type";
- else if (arguments.empty())
- o << " polymorphic struct type template";
- else
- o << " instantiated polymorphic struct type";
- break;
-
- case RT_TYPE_ENUM:
- o << " enum type";
- break;
-
- case RT_TYPE_EXCEPTION:
- o << " exception type";
- break;
-
- case RT_TYPE_TYPEDEF:
- o << "IDL typedef";
- break;
-
- case RT_TYPE_SERVICE:
- if (reader.getSuperTypeCount() > 0)
- o << " single-inheritance--based service";
- else
- o << "IDL accumulation-based service";
- break;
-
- case RT_TYPE_SINGLETON:
- if ((manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(0))).getTypeClass())
- == RT_TYPE_INTERFACE)
- o << " inheritance-based singleton";
- else
- o << "IDL service-based singleton";
- break;
-
- case RT_TYPE_CONSTANTS:
- o << "IDL constant group";
- break;
-
- default:
- OSL_ASSERT(false);
- break;
- }
- }
- o << " \"" << type.getStr() << "\" ";
- }
- sort = codemaker::decomposeAndResolve(
- manager, binType, true, true, true, &typeClass, &name, &rank,
- &arguments);
- if (rank > 0) {
- if (comment) {
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments, "array");
- o << '\n';
- }
- } else if (sort != codemaker::UnoType::SORT_COMPLEX) {
- if (comment) {
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments, 0);
- o << '\n';
- }
- } else {
- typereg::Reader reader(manager.getTypeReader(name));
- if (!reader.isValid())
- throw CannotDumpException("Bad type library entity " + name);
-
- switch (typeClass)
- {
- case RT_TYPE_INTERFACE:
- if (comment)
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "interface");
- if (name == "com/sun/star/uno/XInterface") {
- if (comment)
- o << '\n';
- } else {
- if (comment)
- o << "; " << (options.all ? "all" : "direct") << " methods:\n";
-
- codemaker::GeneratedTypeSet generated;
- printMethods(o, options, manager, reader, generated,
- delegate, options.implname, "");
- }
- break;
-
- case RT_TYPE_MODULE:
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "namespace");
- o << '\n';
- break;
-
- case RT_TYPE_STRUCT:
- if (reader.getReferenceCount() == 0) {
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "class");
- } else if (arguments.empty()) {
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- options.java5 ? "generic class" : "class");
- } else {
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- options.java5 ? "generic class instantiation" : "class");
- }
- o << "; full constructor:\n";
- printConstructor(o, options, manager, reader, arguments);
- break;
-
- case RT_TYPE_ENUM:
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "enum");
- o << '\n';
- break;
-
- case RT_TYPE_CONSTANTS:
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "namespace");
- o << '\n';
- break;
-
- case RT_TYPE_EXCEPTION:
- printMapsToCppType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "exception class");
- o << "; full constructor:\n";
- printConstructor(o, options, manager, reader, arguments);
- break;
-
- case RT_TYPE_SERVICE:
- if (reader.getSuperTypeCount() > 0) {
- if (comment) {
- printMapsToCppType(o, options, manager, sort, typeClass,
- name, rank, arguments, "class");
- o << "; construction methods:\n";
- printConstructionMethods(o, options, manager, reader);
- }
-
- OString super(
- codemaker::convertString(
- reader.getSuperTypeName(0)).replace('/', '.'));
- generateDocumentation(o, options, manager, super, delegate);
- } else {
- if (comment)
- o << ("does not map to C++\n"
- "// the service members are generated instead\n");
- printServiceMembers(o, options, manager, reader, type, delegate);
- }
- break;
-
- case RT_TYPE_SINGLETON:
- if (reader.getSuperTypeCount() > 0 &&
- ((manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(0))).
- getTypeClass()) == RT_TYPE_INTERFACE) )
- {
- printMapsToCppType(o, options, manager, sort, typeClass,
- name, rank, arguments,
- "class");
- o << "; get method:\nstatic ";
- printType(o, options, manager,
- codemaker::convertString(reader.getSuperTypeName(0)), 1);
- o << " get(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);\n";
- } else {
- o << "does not map to C++\n";
- }
- break;
-
- default:
- OSL_ASSERT(false);
- break;
- }
- }
-}
-
-} }
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
deleted file mode 100644
index 4a08a612..00000000
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ /dev/null
@@ -1,999 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "codemaker/commonjava.hxx"
-
-#include "skeletoncommon.hxx"
-#include "skeletonjava.hxx"
-
-#include <iostream>
-
-using namespace ::rtl;
-using namespace ::codemaker::java;
-
-namespace skeletonmaker { namespace java {
-
-void generatePackage(std::ostream & o, const OString & implname)
-{
- sal_Int32 index = implname.lastIndexOf('.');
- if (index != -1)
- o << "package " << implname.copy(0, index) << ";\n\n";
-}
-
-void generateImports(std::ostream & o, ProgramOptions const & options,
- const boost::unordered_set< OString, OStringHash >& /*interfaces*/,
- const OString & propertyhelper,
- bool serviceobject, bool supportxcomponent)
-{
- if (options.componenttype == 3)
- o << "import com.sun.star.uno.UnoRuntime;\n";
- o << "import com.sun.star.uno.XComponentContext;\n";
- if (serviceobject) {
- o << "import com.sun.star.lib.uno.helper.Factory;\n";
- o << "import com.sun.star.lang.XSingleComponentFactory;\n";
- o << "import com.sun.star.registry.XRegistryKey;\n";
- }
-
- if (!propertyhelper.equals("_")) {
- if (supportxcomponent)
- o << "import com.sun.star.lib.uno.helper.ComponentBase;\n";
- else
- o << "import com.sun.star.lib.uno.helper.WeakBase;\n";
- }
- if (propertyhelper.getLength() > 0) {
- if (propertyhelper.equals("_")) {
- o << "import com.sun.star.lib.uno.helper.PropertySet;\n";
- o << "import com.sun.star.beans.PropertyAttribute;\n";
- } else {
- o << "import com.sun.star.uno.Type;\n";
- o << "import com.sun.star.uno.Any;\n";
- o << "import com.sun.star.beans.Ambiguous;\n";
- o << "import com.sun.star.beans.Defaulted;\n";
- o << "import com.sun.star.beans.Optional;\n";
- o << "import com.sun.star.lib.uno.helper.PropertySetMixin;\n";
- }
- }
-
-
-// boost::unordered_set< OString, OStringHash >::const_iterator iter =
-// interfaces.begin();
-// while (iter != interfaces.end())
-// {
-// o << "import " << ((*iter).getStr()) << ";\n";
-// iter++;
-// }
-}
-
-void generateCompFunctions(std::ostream & o, const OString & classname)
-{
- o << " public static XSingleComponentFactory __getComponentFactory("
- " String sImplementationName ) {\n"
- " XSingleComponentFactory xFactory = null;\n\n"
- " if ( sImplementationName.equals( m_implementationName ) )\n"
- " xFactory = Factory.createComponentFactory("
- << classname << ".class, m_serviceNames);\n"
- " return xFactory;\n }\n\n";
-
- o << " public static boolean __writeRegistryServiceInfo("
- " XRegistryKey xRegistryKey ) {\n"
- " return Factory.writeRegistryServiceInfo(m_implementationName,\n"
- " m_serviceNames,\n"
- " xRegistryKey);\n"
- " }\n\n";
-}
-
-void generateXServiceInfoBodies(std::ostream& o)
-{
- o << " // com.sun.star.lang.XServiceInfo:\n";
- o << " public String getImplementationName() {\n"
- << " return m_implementationName;\n }\n\n";
-
- o << " public boolean supportsService( String sService ) {\n"
- << " int len = m_serviceNames.length;\n\n"
- << " for( int i=0; i < len; i++) {\n"
- << " if (sService.equals(m_serviceNames[i]))\n"
- << " return true;\n"
- << " }\n return false;\n }\n\n";
-
- o << " public String[] getSupportedServiceNames() {\n"
- << " return m_serviceNames;\n }\n\n";
-}
-
-void generateXPropertySetBodies(std::ostream& o)
-{
- o << " // com.sun.star.beans.XPropertySet:\n";
- o << " public com.sun.star.beans.XPropertySetInfo getPropertySetInfo()\n"
- " {\n return m_prophlp.getPropertySetInfo();\n }\n\n";
-
- o << " public void setPropertyValue(String aPropertyName, "
- "Object aValue) throws "
- "com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.beans.PropertyVetoException, "
- "com.sun.star.lang.IllegalArgumentException,"
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.setPropertyValue(aPropertyName, aValue);\n }\n\n";
-
- o << " public Object getPropertyValue(String "
- "aPropertyName) throws com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.lang.WrappedTargetException\n {\n return "
- "m_prophlp.getPropertyValue(aPropertyName);\n }\n\n";
-
- o << " public void addPropertyChangeListener(String aPropertyName"
- ", com.sun.star.beans.XPropertyChangeListener xListener) throws "
- "com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.addPropertyChangeListener(aPropertyName, xListener);\n }\n\n";
-
- o << " public void removePropertyChangeListener(String "
- "aPropertyName, com.sun.star.beans.XPropertyChangeListener xListener) "
- "throws com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.removePropertyChangeListener(aPropertyName, xListener);\n"
- " }\n\n";
-
- o << " public void addVetoableChangeListener(String aPropertyName"
- ", com.sun.star.beans.XVetoableChangeListener xListener) throws "
- "com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.addVetoableChangeListener(aPropertyName, xListener);\n }\n\n";
-
- o << " public void removeVetoableChangeListener(String "
- "aPropertyName, com.sun.star.beans.XVetoableChangeListener xListener) "
- "throws com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.removeVetoableChangeListener(aPropertyName, xListener);\n }\n\n";
-}
-
-void generateXFastPropertySetBodies(std::ostream& o)
-{
- o << " // com.sun.star.beans.XFastPropertySet:\n";
-
- o << " public void setFastPropertyValue(int nHandle, Object "
- "aValue) throws com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.beans.PropertyVetoException, "
- "com.sun.star.lang.IllegalArgumentException, "
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.setFastPropertyValue(nHandle, aValue);\n }\n\n";
-
- o << " public Object getFastPropertyValue(int nHandle) throws "
- "com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.lang.WrappedTargetException\n {\n return "
- "m_prophlp.getFastPropertyValue(nHandle);\n }\n\n";
-}
-
-void generateXPropertyAccessBodies(std::ostream& o)
-{
- o << " // com.sun.star.beans.XPropertyAccess:\n";
-
- o << " public com.sun.star.beans.PropertyValue[] getPropertyValues()\n"
- " {\n return m_prophlp.getPropertyValues();\n }\n\n";
-
- o << " public void setPropertyValues(com.sun.star.beans.PropertyValue[] "
- "aProps) throws com.sun.star.beans.UnknownPropertyException, "
- "com.sun.star.beans.PropertyVetoException, "
- "com.sun.star.lang.IllegalArgumentException, "
- "com.sun.star.lang.WrappedTargetException\n {\n "
- "m_prophlp.setPropertyValues(aProps);\n }\n\n";
-}
-
-
-bool checkAttribute(OStringBuffer& attributeValue, sal_uInt16 attribute)
-{
- bool cast = false;
- sal_uInt16 attributes[9] = {
- /* com::sun::star::beans::PropertyValue::MAYBEVOID */ 1,
- /* com::sun::star::beans::PropertyValue::BOUND */ 2,
- /* com::sun::star::beans::PropertyValue::CONSTRAINED */ 4,
- /* com::sun::star::beans::PropertyValue::TRANSIENT */ 8,
- /* com::sun::star::beans::PropertyValue::READONLY */ 16,
- /* com::sun::star::beans::PropertyValue::MAYBEAMBIGIOUS */ 32,
- /* com::sun::star::beans::PropertyValue::MAYBEDEFAULT */ 64,
- /* com::sun::star::beans::PropertyValue::REMOVEABLE */ 128,
- /* com::sun::star::beans::PropertyValue::OPTIONAL */ 256 };
-
- for (sal_uInt16 i = 0; i < 9; i++)
- {
- if (attribute & attributes[i]) {
- if (attributeValue.getLength() > 0) {
- cast |= true;
- attributeValue.append("|");
- }
- switch (attributes[i])
- {
- case 1:
- attributeValue.append("PropertyAttribute.MAYBEVOID");
- break;
- case 2:
- attributeValue.append("PropertyAttribute.BOUND");
- break;
- case 4:
- attributeValue.append("PropertyAttribute.CONSTRAINED");
- break;
- case 8:
- attributeValue.append("PropertyAttribute.TRANSIENT");
- break;
- case 16:
- attributeValue.append("PropertyAttribute.READONLY");
- break;
- case 32:
- attributeValue.append("PropertyAttribute.MAYBEAMBIGIOUS");
- break;
- case 64:
- attributeValue.append("PropertyAttribute.MAYBEDEFAULT");
- break;
- case 128:
- attributeValue.append("PropertyAttribute.REMOVEABLE");
- break;
- case 256:
- attributeValue.append("PropertyAttribute.OPTIONAL");
- break;
- }
- }
- }
- if (cast) {
- attributeValue.insert(0, '(');
- attributeValue.append(')');
- }
-
- return cast;
-}
-
-void registerProperties(std::ostream& o,
- TypeManager const & /*manager*/,
- const AttributeInfo& properties,
- const OString& indentation)
-{
- if (!properties.empty()) {
- bool cast = false;
- OStringBuffer attributeValue;
- for (AttributeInfo::const_iterator i(properties.begin());
- i != properties.end(); ++i)
- {
- if (i->second.second > 0) {
- cast = checkAttribute(attributeValue, i->second.second);
- } else {
- cast = true;
- attributeValue.append('0');
- }
-
- o << indentation << "registerProperty(\"" << i->first
- << "\", \"m_" << i->first << "\",\n"
- << indentation << " ";
- if (cast)
- o << "(short)";
-
- o << attributeValue.makeStringAndClear() << ");\n";
- }
- }
-}
-
-void generateXLocalizableBodies(std::ostream& o) {
- // com.sun.star.lang.XLocalizable:
- // setLocale
- o << " // com.sun.star.lang.XLocalizable:\n"
- " public void setLocale(com.sun.star.lang.Locale eLocale)\n {\n"
- " m_locale = eLocale;\n }\n\n";
-
- // getLocale
- o << " public com.sun.star.lang.Locale getLocale()\n {\n"
- " return m_locale;\n }\n\n";
-}
-
-void generateXAddInBodies(std::ostream& o, ProgramOptions const & options)
-{
- // com.sun.star.sheet.XAddIn:
- // getProgrammaticFuntionName
- o << " // com.sun.star.sheet.XAddIn:\n"
- " public String getProgrammaticFuntionName(String "
- "aDisplayName)\n {\n"
- " try {\n"
- " com.sun.star.container.XNameAccess xNAccess =\n"
- " (com.sun.star.container.XNameAccess)UnoRuntime."
- "queryInterface(\n"
- " com.sun.star.container.XNameAccess.class, m_xHAccess);"
- "\n String functions[] = xNAccess.getElementNames();\n"
- " String sDisplayName = \"\";\n"
- " int len = functions.length;\n"
- " for (int i=0; i < len; ++i) {\n"
- " sDisplayName = com.sun.star.uno.AnyConverter.toString(\n"
- " getAddinProperty(functions[i], \"\", sDISPLAYNAME));\n"
- " if (sDisplayName.equals(aDisplayName))\n"
- " return functions[i];\n }\n"
- " }\n catch ( com.sun.star.uno.RuntimeException e ) {\n"
- " throw e;\n }\n"
- " catch ( com.sun.star.uno.Exception e ) {\n }\n\n"
- " return \"\";\n }\n\n";
-
- // getDisplayFunctionName
- o << " public String getDisplayFunctionName(String "
- "aProgrammaticName)\n {\n"
- " return getAddinProperty(aProgrammaticName, \"\", sDISPLAYNAME);\n"
- " }\n\n";
-
- // getFunctionDescription
- o << " public String getFunctionDescription(String "
- "aProgrammaticName)\n {\n"
- " return getAddinProperty(aProgrammaticName, \"\", sDESCRIPTION);\n"
- " }\n\n";
-
- // getDisplayArgumentName
- o << " public String getDisplayArgumentName(String "
- "aProgrammaticFunctionName, int nArgument)\n {\n";
- if (options.java5) {
- o << " return getAddinProperty(aProgrammaticFunctionName,\n"
- " m_functionMap.get(\n"
- " aProgrammaticFunctionName).get("
- "nArgument),\n"
- " sDISPLAYNAME);\n }\n\n";
- } else {
- o << " return getAddinProperty(aProgrammaticFunctionName, (String)\n"
- " ((java.util.Hashtable)m_functionMap."
- "get(\n aProgrammaticFunctionName))."
- "get(\n new Integer(nArgument))"
- ", sDISPLAYNAME);\n }\n\n";
- }
-
- // getArgumentDescription
- o << " public String getArgumentDescription(String "
- "aProgrammaticFunctionName, int nArgument)\n {\n";
- if (options.java5) {
- o << " return getAddinProperty(aProgrammaticFunctionName,\n"
- " m_functionMap.get(\n"
- " aProgrammaticFunctionName).get("
- "nArgument),\n"
- " sDESCRIPTION);\n }\n\n";
- } else {
- o << " return getAddinProperty(aProgrammaticFunctionName, (String)\n"
- " ((java.util.Hashtable)m_functionMap."
- "get(\n aProgrammaticFunctionName))."
- "get(\n new Integer(nArgument))"
- ", sDESCRIPTION);\n }\n\n";
- }
- // getProgrammaticCategoryName
- o << " public String getProgrammaticCategoryName(String "
- "aProgrammaticFunctionName)\n {\n"
- " return getAddinProperty(aProgrammaticFunctionName, \"\", "
- "sCATEGORY);\n }\n\n";
-
- // getDisplayCategoryName
- o << " public String getDisplayCategoryName(String "
- "aProgrammaticFunctionName)\n {\n"
- " return getAddinProperty(aProgrammaticFunctionName, \"\", "
- "sCATEGORYDISPLAYNAME);\n }\n\n";
-}
-
-void generateXCompatibilityNamesBodies(std::ostream& o)
-{
- o << " // com.sun.star.sheet.XCompatibilityNames:\n"
- " public com.sun.star.sheet.LocalizedName[] getCompatibilityNames("
- "String aProgrammaticName)\n {\n"
- " com.sun.star.sheet.LocalizedName[] seqLocalizedNames =\n"
- " new com.sun.star.sheet.LocalizedName[0];\n\n try {\n";
-
- o << " StringBuffer path = new StringBuffer(aProgrammaticName);\n"
- " path.append(\"/CompatibilityName\");\n"
- " String hname = path.toString();\n\n";
-
- o << " if ( m_xCompAccess.hasByHierarchicalName(hname) ) {\n"
- " com.sun.star.container.XNameAccess xNameAccess =\n"
- " (com.sun.star.container.XNameAccess)UnoRuntime."
- "queryInterface(\n"
- " com.sun.star.container.XNameAccess.class,\n"
- " m_xCompAccess.getByHierarchicalName(hname));\n\n"
- " String elems[] = xNameAccess.getElementNames();\n"
- " int len = elems.length;\n"
- " seqLocalizedNames = new com.sun.star.sheet.LocalizedName"
- "[len];\n String sCompatibilityName = \"\";\n\n";
-
- o << " for (int i=0; i < len; ++i) {\n"
- " String sLocale = elems[i];\n"
- " sCompatibilityName = com.sun.star.uno.AnyConverter."
- "toString(\n xNameAccess.getByName(sLocale));\n\n"
- " com.sun.star.lang.Locale aLocale = \n"
- " new com.sun.star.lang.Locale();\n\n"
- " String tokens[] = sLocale.split(\"-\");\n"
- " int nToken = tokens.length;\n"
- " if (nToken >= 1) aLocale.Language = tokens[0];\n"
- " if (nToken >= 2) aLocale.Country = tokens[1];\n"
- " if (nToken >= 3) {\n"
- " StringBuffer buf = \n"
- " new StringBuffer(tokens[2]);\n"
- " for (int t=3; t < nToken; ++t)\n"
- " buf.append(tokens[t]);\n\n"
- " aLocale.Variant = buf.toString();\n"
- " }\n\n"
- " seqLocalizedNames[i].Locale = aLocale;\n"
- " seqLocalizedNames[i].Name = sCompatibilityName;\n"
- " }\n }\n }\n"
- " catch ( com.sun.star.uno.RuntimeException e ) {\n"
- " throw e;\n }\n"
- " catch ( com.sun.star.uno.Exception e ) {\n }\n\n"
- " return seqLocalizedNames;\n }\n\n";
-}
-
-void generateXInitializationBodies(std::ostream& o)
-{
- o << " // com.sun.star.lang.XInitialization:\n"
- " public void initialize( Object[] object )\n"
- " throws com.sun.star.uno.Exception\n {\n"
- " if ( object.length > 0 )\n {\n"
- " m_xFrame = (com.sun.star.frame.XFrame)UnoRuntime.queryInterface(\n"
- " com.sun.star.frame.XFrame.class, object[0]);\n }\n }\n\n";
-}
-
-void generateXDispatchBodies(std::ostream& o, ProgramOptions const & options)
-{
- // com.sun.star.frame.XDispatch
- // dispatch
- o << " // com.sun.star.frame.XDispatch:\n"
- " public void dispatch( com.sun.star.util.URL aURL,\n"
- " com.sun.star.beans.PropertyValue[] aArguments )\n {\n";
-
- ProtocolCmdMap::const_iterator iter = options.protocolCmdMap.begin();
- while (iter != options.protocolCmdMap.end()) {
- o << " if ( aURL.Protocol.compareTo(\"" << (*iter).first
- << "\") == 0 )\n {\n";
-
- for (std::vector< OString >::const_iterator i = (*iter).second.begin();
- i != (*iter).second.end(); ++i) {
- o << " if ( aURL.Path.compareTo(\"" << (*i) << "\") == 0 )\n"
- " {\n // add your own code here\n"
- " return;\n }\n";
- }
-
- o << " }\n";
- ++iter;
- }
- o << " }\n\n";
-
- // addStatusListener
- o << " public void addStatusListener( com.sun.star.frame.XStatusListener xControl,\n"
- " com.sun.star.util.URL aURL )\n {\n"
- " // add your own code here\n }\n\n";
-
- // com.sun.star.frame.XDispatch
- o << " public void removeStatusListener( com.sun.star.frame.XStatusListener xControl,\n"
- " com.sun.star.util.URL aURL )\n {\n"
- " // add your own code here\n }\n\n";
-}
-
-void generateXDispatchProviderBodies(std::ostream& o, ProgramOptions const & options)
-{
- // com.sun.star.frame.XDispatchProvider
- // queryDispatch
- o << " // com.sun.star.frame.XDispatchProvider:\n"
- " public com.sun.star.frame.XDispatch queryDispatch( com.sun.star.util.URL aURL,\n"
- " String sTargetFrameName,\n"
- " int iSearchFlags )\n {\n";
-
- ProtocolCmdMap::const_iterator iter = options.protocolCmdMap.begin();
- while (iter != options.protocolCmdMap.end()) {
- o << " if ( aURL.Protocol.compareTo(\"" << (*iter).first
- << "\") == 0 )\n {\n";
-
- for (std::vector< OString >::const_iterator i = (*iter).second.begin();
- i != (*iter).second.end(); ++i) {
- o << " if ( aURL.Path.compareTo(\"" << (*i) << "\") == 0 )\n"
- " return this;\n";
- }
-
- o << " }\n";
- ++iter;
- }
- o << " return null;\n }\n\n";
-
- // queryDispatches
- o << " // com.sun.star.frame.XDispatchProvider:\n"
- " public com.sun.star.frame.XDispatch[] queryDispatches(\n"
- " com.sun.star.frame.DispatchDescriptor[] seqDescriptors )\n {\n"
- " int nCount = seqDescriptors.length;\n"
- " com.sun.star.frame.XDispatch[] seqDispatcher =\n"
- " new com.sun.star.frame.XDispatch[seqDescriptors.length];\n\n"
- " for( int i=0; i < nCount; ++i )\n {\n"
- " seqDispatcher[i] = queryDispatch(seqDescriptors[i].FeatureURL,\n"
- " seqDescriptors[i].FrameName,\n"
- " seqDescriptors[i].SearchFlags );\n"
- " }\n return seqDispatcher;\n }\n\n";
-}
-
-void generateMethodBodies(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- const boost::unordered_set< OString, OStringHash >& interfaces,
- const OString& indentation, bool usepropertymixin)
-{
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- codemaker::GeneratedTypeSet generated;
- while (iter != interfaces.end()) {
- OString type(*iter);
- ++iter;
- if (type.equals("com.sun.star.lang.XServiceInfo")) {
- generateXServiceInfoBodies(o);
- generated.add(type);
- } else {
- if (options.componenttype == 2) {
- if (type.equals("com.sun.star.lang.XServiceName")) {
- o << " // com.sun.star.lang.XServiceName:\n"
- " public String getServiceName() {\n"
- " return sADDIN_SERVICENAME;\n }\n";
- generated.add(type);
- continue;
- } else if (type.equals("com.sun.star.sheet.XAddIn")) {
- generateXAddInBodies(o, options);
- generated.add(type);
-
- // special handling of XLocalizable -> parent of XAddIn
- if (!generated.contains("com.sun.star.lang.XLocalizable")) {
- generateXLocalizableBodies(o);
- generated.add("com.sun.star.lang.XLocalizable");
- }
- continue;
- } else if (type.equals("com.sun.star.lang.XLocalizable")) {
- generateXLocalizableBodies(o);
- generated.add(type);
- continue;
- } else if (type.equals("com.sun.star.sheet.XCompatibilityNames")) {
- generateXCompatibilityNamesBodies(o);
- generated.add(type);
- continue;
- }
- }
- if (options.componenttype == 3) {
- if (type.equals("com.sun.star.lang.XInitialization")) {
- generateXInitializationBodies(o);
- generated.add(type);
- continue;
- } else if (type.equals("com.sun.star.frame.XDispatch")) {
- generateXDispatchBodies(o, options);
- generated.add(type);
- continue;
- } else if (type.equals("com.sun.star.frame.XDispatchProvider")) {
- generateXDispatchProviderBodies(o, options);
- generated.add(type);
- continue;
- }
- }
- typereg::Reader reader(manager.getTypeReader(type.replace('.','/')));
- printMethods(o, options, manager, reader, generated, "_",
- indentation, true, usepropertymixin);
- }
- }
-}
-
-static const char* propcomment=
-" // use the last parameter of the PropertySetMixin constructor\n"
-" // for your optional attributes if necessary. See the documentation\n"
-" // of the PropertySetMixin helper for further information.\n"
-" // Ensure that your attributes are initialized correctly!\n";
-
-
-void generateAddinConstructorAndHelper(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager, const OString & classname,
- const boost::unordered_set< OString, OStringHash >& services,
- const boost::unordered_set< OString, OStringHash >& interfaces)
-{
- o << " private com.sun.star.lang.Locale m_locale = "
- "new com.sun.star.lang.Locale();\n";
-
- if (!options.backwardcompatible) {
- // Constructor
- o << "\n public " << classname << "( XComponentContext context )\n"
- " {\n m_xContext = context;\n }\n\n";
- return;
- }
-
-
- // get the one and only add-in service for later use
- boost::unordered_set< OString, OStringHash >::const_iterator iter = services.begin();
- OString sAddinService = (*iter).replace('/', '.');
- if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
- sAddinService = (*(++iter)).replace('/', '.');
- }
-
-
- // add-in specific fields
- o << "\n private static final String sADDIN_SERVICENAME = \""
- << sAddinService << "\";\n\n";
- o << " private static final String sDISPLAYNAME = "
- "\"DisplayName\";\n"
- " private static final String sDESCRIPTION = "
- "\"Description\";\n"
- " private static final String sCATEGORY = \"Category\";\n"
- " private static final String sCATEGORYDISPLAYNAME = "
- "\"CategoryDisplayName\";\n\n";
-
- o << " private com.sun.star.container.XHierarchicalNameAccess "
- "m_xHAccess = null;\n"
- " private com.sun.star.container.XHierarchicalNameAccess "
- "m_xCompAccess = null;\n";
- if (options.java5) {
- o << " private java.util.Hashtable<\n String, "
- "java.util.Hashtable< Integer, String> > m_functionMap = null;\n\n";
- } else {
- o << " private java.util.Hashtable m_functionMap = null;\n\n";
- }
- // Constructor
- o << "\n public " << classname << "( XComponentContext context )\n {\n"
- " m_xContext = context;\n\n"
- " try {\n";
-
- if (options.java5) {
- o << " m_functionMap = new java.util.Hashtable<\n"
- " String, java.util.Hashtable< Integer, "
- "String > >();\n\n";
- } else {
- o << " m_functionMap = new java.util.Hashtable();\n\n";
- }
-
- generateFunctionParameterMap(o, options, manager, interfaces);
-
- o << " com.sun.star.lang.XMultiServiceFactory xProvider = \n"
- " (com.sun.star.lang.XMultiServiceFactory)UnoRuntime."
- "queryInterface(\n"
- " com.sun.star.lang.XMultiServiceFactory.class,\n"
- " m_xContext.getServiceManager().createInstanceWithContext("
- "\n \"com.sun.star.configuration.ConfigurationProvider\""
- ",\n m_xContext));\n\n";
-
- o << " String sReadOnlyView = "
- "\"com.sun.star.configuration.ConfigurationAccess\";\n\n";
-
- o << " StringBuffer sPath = new StringBuffer(\n"
- " \"/org.openoffice.Office.CalcAddIns/AddInInfo/\");\n"
- " sPath.append(sADDIN_SERVICENAME);\n"
- " sPath.append(\"/AddInFunctions\");\n\n";
-
- o << " // create arguments: nodepath\n"
- " com.sun.star.beans.PropertyValue aArgument = \n"
- " new com.sun.star.beans.PropertyValue();\n"
- " aArgument.Name = \"nodepath\";\n"
- " aArgument.Value = new com.sun.star.uno.Any(\n"
- " com.sun.star.uno.Type.STRING, sPath.toString());\n\n";
-
- o << " Object aArguments[] = new Object[1];\n"
- " aArguments[0] = new com.sun.star.uno.Any("
- " new com.sun.star.uno.Type(\n"
- " com.sun.star.beans.PropertyValue.class), aArgument);\n\n";
-
- o << " // create the default view using default UI locale\n"
- " Object xIface = \n"
- " xProvider.createInstanceWithArguments(sReadOnlyView, "
- "aArguments);\n\n";
-
- o << " m_xHAccess = (com.sun.star.container.XHierarchicalNameAccess)\n"
- " UnoRuntime.queryInterface(\n"
- " com.sun.star.container.XHierarchicalNameAccess.class, "
- "xIface);\n\n";
-
- o << " // extends arguments to create a view for all locales to get "
- "simple\n // access to the compatibilityname property\n"
- " aArguments = new Object[2];\n"
- " aArguments[0] = new com.sun.star.uno.Any( "
- "new com.sun.star.uno.Type(\n"
- " com.sun.star.beans.PropertyValue.class), aArgument);\n"
- " aArgument.Name = \"locale\";\n"
- " aArgument.Value = new com.sun.star.uno.Any(\n"
- " com.sun.star.uno.Type.STRING, \"*\");\n"
- " aArguments[1] = new com.sun.star.uno.Any( "
- " new com.sun.star.uno.Type(\n"
- " com.sun.star.beans.PropertyValue.class), aArgument);\n\n";
-
- o << " // create view for all locales\n"
- " xIface = xProvider.createInstanceWithArguments(sReadOnlyView, "
- "aArguments);\n\n"
- " m_xCompAccess = (com.sun.star.container.XHierarchicalNameAccess)\n"
- " UnoRuntime.queryInterface(\n"
- " com.sun.star.container.XHierarchicalNameAccess.class, "
- "xIface);\n }\n"
- " catch ( com.sun.star.uno.Exception e ) {\n }\n }\n\n";
-
- // add-in helper function
- o << " // addin configuration property helper function:\n"
- " String getAddinProperty(String funcName, "
- "String paramName, String propName)\n {\n"
- " try {\n StringBuffer buf = "
- "new StringBuffer(funcName);\n\n"
- " if (paramName.length() > 0) {\n"
- " buf.append(\"/Parameters/\");\n"
- " buf.append(paramName);\n }\n\n";
-
- o << " com.sun.star.beans.XPropertySet xPropSet =\n"
- " (com.sun.star.beans.XPropertySet)UnoRuntime."
- "queryInterface(\n"
- " com.sun.star.beans.XPropertySet.class,\n"
- " m_xHAccess.getByHierarchicalName(buf.toString()));\n\n"
- " return com.sun.star.uno.AnyConverter.toString(\n"
- " xPropSet.getPropertyValue(propName));\n }\n"
- " catch ( com.sun.star.uno.RuntimeException e ) {\n"
- " throw e;\n }\n"
- " catch ( com.sun.star.uno.Exception e ) {\n }\n"
- " return \"\";\n }\n\n";
-}
-
-
-void generateClassDefinition(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- const OString & classname,
- const boost::unordered_set< OString, OStringHash >& services,
- const boost::unordered_set< OString, OStringHash >& interfaces,
- const AttributeInfo& properties,
- const AttributeInfo& attributes,
- const OString& propertyhelper, bool supportxcomponent)
-{
- o << "\n\npublic final class " << classname << " extends ";
-
- if (!interfaces.empty()) {
- if (propertyhelper.equals("_")) {
- o << "PropertySet\n";
- } else {
- if (supportxcomponent)
- o << "ComponentBase\n";
- else
- o << "WeakBase\n";
- }
- o << " implements ";
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- while (iter != interfaces.end()) {
- o << (*iter);
- ++iter;
- if (iter != interfaces.end())
- o << ",\n ";
- }
- }
- o << "\n{\n";
-
- o << " private final XComponentContext m_xContext;\n";
-
- // additional member for add-ons
- if (options.componenttype == 3) {
- o << " private com.sun.star.frame.XFrame m_xFrame;\n";
- }
-
- // check property helper
- if (propertyhelper.getLength() > 1)
- o << " private final PropertySetMixin m_prophlp;\n";
-
- o << " private static final String m_implementationName = "
- << classname << ".class.getName();\n";
-
- if (!services.empty()) {
- o << " private static final String[] m_serviceNames = {\n";
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- services.begin();
- while (iter != services.end()) {
- o << " \"" << (*iter).replace('/','.') << "\"";
- ++iter;
- if (iter != services.end())
- o << ",\n";
- else
- o << " };\n\n";
- }
- }
-
- // attribute/property members
- if (!properties.empty()) {
- AttributeInfo::const_iterator iter =
- properties.begin();
- o << " // properties\n";
- while (iter != properties.end()) {
- o << " protected ";
- printType(o, options, manager, iter->second.first.replace('.','/'),
- false, false);
- o << " m_" << iter->first << ";\n";
- ++iter;
- }
- } else if (!attributes.empty()) {
- AttributeInfo::const_iterator iter =
- attributes.begin();
- o << " // attributes\n";
- while (iter != attributes.end()) {
- o << " private ";
- printType(o, options, manager, iter->second.first.replace('.','/'),
- false, false);
- o << " m_" << iter->first << " = ";
- printType(o, options, manager, iter->second.first.replace('.','/'),
- false, true);
- o <<";\n";
- ++iter;
- }
- }
-
- // special handling of calc add-ins
- if (options.componenttype == 2)
- {
- generateAddinConstructorAndHelper(o, options, manager, classname,
- services, interfaces);
- } else {
- o << "\n public " << classname << "( XComponentContext context )\n"
- " {\n m_xContext = context;\n";
- if (propertyhelper.equals("_")) {
- registerProperties(o, manager, properties, " ");
- } else {
- if (propertyhelper.getLength() > 1) {
- o << propcomment
- << " m_prophlp = new PropertySetMixin(m_xContext, this,\n"
- << " new Type(" << propertyhelper
- << ".class), null);\n";
- }
- }
- o << " };\n\n";
-
- }
-
- if (!services.empty())
- generateCompFunctions(o, classname);
-
- generateMethodBodies(o, options, manager, interfaces,
- " ", propertyhelper.getLength() > 1);
-
- // end of class definition
- o << "}\n";
-}
-
-void generateSkeleton(ProgramOptions const & options,
- TypeManager const & manager,
- std::vector< OString > const & types,
- OString const & /*delegate*/)
-{
- boost::unordered_set< OString, OStringHash > interfaces;
- boost::unordered_set< OString, OStringHash > services;
- AttributeInfo properties;
- AttributeInfo attributes;
- boost::unordered_set< OString, OStringHash > propinterfaces;
- bool serviceobject = false;
- bool supportxcomponent = false;
-
- std::vector< OString >::const_iterator iter = types.begin();
- while (iter != types.end()) {
- checkType(manager, *iter, interfaces, services, properties);
- ++iter;
- }
-
- if (options.componenttype == 3) {
- // the Protocolhandler service is mandatory for an protocol handler add-on,
- // so it is defaulted. The XDispatchProvider provides Dispatch objects for
- // certain functions and the generated impl object implements XDispatch
- // directly for simplicity reasons.
- checkType(manager, "com.sun.star.frame.ProtocolHandler",
- interfaces, services, properties);
- checkType(manager, "com.sun.star.frame.XDispatch",
- interfaces, services, properties);
-
-
-// ProtocolCmdMap::const_iterator iter2 = options.protocolCmdMap.begin();
-// while (iter2 != options.protocolCmdMap.end()) {
-// fprintf(stdout, "prt=%s\n", (*iter2).first.getStr());
-
-// for (std::vector< OString >::const_iterator i = (*iter2).second.begin();
-// i != (*iter2).second.end(); ++i) {
-// fprintf(stdout, "cmd=%s\n", (*i).getStr());
-// }
-// iter2++;
-// }
-// return;
- }
-
- if (options.componenttype == 2) {
- if (services.size() != 1) {
- throw CannotDumpException(
- "for calc add-in components one and only one service type is "
- "necessary! Please reference a valid type with the '-t' option.");
- }
-
- // if backwardcompatible==true the AddIn service needs to be added to the
- // suported service list, the necessary intefaces are mapped to the add-in
- // configuration. Since OO.org 2.0.4 this is obsolete and the add-in is
- // take form the configuration from Calc directly, this simplifies the
- // add-in code
- if (options.backwardcompatible) {
- checkType(manager, "com.sun.star.sheet.AddIn",
- interfaces, services, properties);
- } else {
- // special case for the optional XLocalization interface. It should be
- // implemented always. But it is parent of the XAddIn and we need it only
- // if backwardcompatible is false.
- if (interfaces.find("com.sun.star.lang.XLocalizable") == interfaces.end()) {
- interfaces.insert("com.sun.star.lang.XLocalizable");
- }
- }
- }
-
-
- // check if service object or simple UNO object
- if (!services.empty())
- serviceobject = true;
-
- OString propertyhelper = checkPropertyHelper(
- options, manager, services, interfaces, attributes, propinterfaces);
- checkDefaultInterfaces(interfaces, services, propertyhelper);
-
- if (options.componenttype == 2) {
- if (propertyhelper.getLength() > 0)
- std::cerr << "WARNING: interfaces specifying calc add-in functions "
- "shouldn't support attributes!\n";
- }
-
- supportxcomponent = checkXComponentSupport(manager, interfaces);
-
- OString compFileName;
- OString tmpFileName;
- std::ostream* pofs = NULL;
- bool standardout = getOutputStream(options, ".java",
- &pofs, compFileName, tmpFileName);
-
- try {
- if (!standardout && options.license) {
- printLicenseHeader(*pofs, compFileName);
- }
-
- generatePackage(*pofs, options.implname);
-
- generateImports(*pofs, options, interfaces, propertyhelper,
- serviceobject, supportxcomponent);
-
- OString classname(options.implname);
- sal_Int32 index = 0;
- if ((index = classname.lastIndexOf('.')) > 0)
- classname = classname.copy(index+1);
-
- generateClassDefinition(*pofs, options, manager, classname, services,
- interfaces, properties, attributes, propertyhelper,
- supportxcomponent);
-
- if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
- delete pofs;
- OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False));
- }
- } catch(CannotDumpException& e) {
-
- std::cerr << "ERROR: " << e.m_message.getStr() << "\n";
- if ( !standardout ) {
- if (pofs && ((std::ofstream*)pofs)->is_open()) {
- ((std::ofstream*)pofs)->close();
- delete pofs;
- }
- // remove existing type file if something goes wrong to ensure
- // consistency
- if (fileExists(compFileName))
- removeTypeFile(compFileName);
-
- // remove tmp file if something goes wrong
- removeTypeFile(tmpFileName);
- }
- }
-}
-
-} }
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
deleted file mode 100644
index f69e474f..00000000
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ /dev/null
@@ -1,873 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "codemaker/commonjava.hxx"
-
-#include "skeletoncommon.hxx"
-#include "skeletonjava.hxx"
-
-using namespace ::rtl;
-
-namespace skeletonmaker { namespace java {
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- OString const & type, bool referenceType,
- bool defaultvalue);
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- OString const & name, sal_Int32 rank,
- std::vector< OString > const & arguments, bool referenceType,
- bool defaultvalue)
-{
- if ( defaultvalue && rank == 0 && sort <= codemaker::UnoType::SORT_CHAR ) {
- switch (sort)
- {
- case codemaker::UnoType::SORT_BOOLEAN:
- o << "false";
- return;
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- o << "0";
- return;
- case codemaker::UnoType::SORT_VOID:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_COMPLEX:
- break;
- }
- }
-
- if ( defaultvalue ) {
- if ( sort == codemaker::UnoType::SORT_COMPLEX &&
- typeClass == RT_TYPE_INTERFACE ) {
- o << "null";
- return;
- } else if ( sort == codemaker::UnoType::SORT_ANY && rank==0 ) {
- o << "com.sun.star.uno.Any.VOID";
- return;
- } else if ( sort == codemaker::UnoType::SORT_TYPE && rank==0 ) {
- o << "com.sun.star.uno.Type.VOID";
- return;
- } else
- if ( typeClass != RT_TYPE_ENUM || rank > 0 )
- o << "new ";
- }
-
- OString sType(codemaker::java::translateUnoToJavaType(
- sort, typeClass, name, referenceType && rank==0).replace('/', '.'));
- if ( sType.indexOf("java.lang.") == 0 )
- sType = sType.copy(10);
- o << sType.getStr();
- if ( !arguments.empty() && options.java5 ) {
- o << '<';
- for ( std::vector< OString >::const_iterator i(arguments.begin());
- i != arguments.end(); ++i )
- {
- if ( i != arguments.begin() ) {
- o << ", ";
- }
-
- printType(o, options, manager, *i, true, false);
- }
- o << '>';
- }
- for ( sal_Int32 i = 0; i < rank; ++i ) {
- if ( defaultvalue )
- o << "[0]";
- else
- o << "[]";
- }
-
- if ( defaultvalue && sort > codemaker::UnoType::SORT_CHAR && rank == 0 ) {
- if ( typeClass == RT_TYPE_ENUM )
- o << ".getDefault()";
- else
- o << "()";
- }
-}
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- OString const & type, bool referenceType, bool defaultvalue)
-{
- RTTypeClass typeClass;
- OString name;
- sal_Int32 rank;
- std::vector< OString > arguments;
- codemaker::UnoType::Sort sort = codemaker::decomposeAndResolve(
- manager, type, true, true, true, &typeClass, &name, &rank, &arguments);
- printType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- referenceType, defaultvalue);
-}
-
-bool printConstructorParameters(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, typereg::Reader const & outerReader,
- std::vector< OString > const & arguments)
-{
- bool previous = false;
- if ( reader.getSuperTypeCount() != 0 ) {
- OString super(
- codemaker::convertString(reader.getSuperTypeName(0)));
- typereg::Reader superReader(manager.getTypeReader(super));
- if ( !superReader.isValid() ) {
- throw CannotDumpException("Bad type library entity " + super);
- }
- previous = printConstructorParameters(o,
- options, manager, superReader, outerReader, arguments);
- }
- for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
- if ( previous ) {
- o << ", ";
- }
- previous = true;
- if ( (reader.getFieldFlags(i) & RT_ACCESS_PARAMETERIZED_TYPE) == 0 ) {
- printType(o,
- options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)),
- false);
- } else if ( arguments.empty() ) {
- o << "java.lang.Object";
- } else {
- sal_uInt16 tparam = 0;
- while ( outerReader.getReferenceTypeName(tparam)
- != reader.getFieldTypeName(i) )
- {
- ++tparam;
- OSL_ASSERT(tparam < outerReader.getReferenceCount());
- }
- // assume std::vector< OString >::size_type is at least as
- // large as sal_uInt16:
- printType(o, options, manager, arguments[tparam], true);
- }
- o
- << ' '
- << (codemaker::java::translateUnoToJavaIdentifier(
- codemaker::convertString(reader.getFieldName(i)),
- "param").
- getStr());
- }
- return previous;
-}
-
-void printConstructor(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader,
- std::vector< OString > const & arguments)
-{
- OString type(codemaker::convertString(reader.getTypeName()));
- o << "public " << type.copy(type.lastIndexOf('/') + 1) << '(';
- printConstructorParameters(o, options, manager, reader, reader, arguments);
- o << ");\n";
-}
-
-void printMethodParameters(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, sal_uInt16 method, bool previous,
- bool withtype, bool /*shortname*/)
-{
- for ( sal_uInt16 i = 0; i < reader.getMethodParameterCount(method); ++i ) {
- if ( previous )
- o << ", ";
- else
- previous = true;
-
- if ( withtype ) {
- printType(o, options, manager,
- codemaker::convertString(
- reader.getMethodParameterTypeName(method, i)),
- false);
- if ( reader.getMethodParameterFlags(method, i) == RT_PARAM_OUT
- || reader.getMethodParameterFlags(method, i) == RT_PARAM_INOUT )
- {
- o << "[]";
- } else if ( (reader.getMethodParameterFlags(method, i) & RT_PARAM_REST )
- != 0)
- {
- o << (options.java5 ? "..." : "[]");
- }
- o << ' ';
- }
- o << (codemaker::java::translateUnoToJavaIdentifier(
- codemaker::convertString(
- reader.getMethodParameterName(method, i)),
- "param").
- getStr());
- }
-}
-
-void printExceptionSpecification(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, sal_uInt16 method)
-{
- if ( reader.getMethodExceptionCount(method) > 0 ) {
- o << " throws ";
- for ( sal_uInt16 i = 0; i < reader.getMethodExceptionCount(method); ++i )
- {
- if ( i != 0 ) {
- o << ", ";
- }
- printType(o,
- options, manager,
- codemaker::convertString(
- reader.getMethodExceptionTypeName(method, i)),
- false);
- }
- }
-}
-
-
-void printSetPropertyMixinBody(std::ostream & o,
- typereg::Reader const & reader,
- sal_uInt16 field,
- sal_uInt16 method,
- OString const & indentation)
-{
- RTFieldAccess propFlags = checkAdditionalPropertyFlags(reader, field, method);
- OString fieldname = codemaker::convertString(reader.getFieldName(field));
- bool bound = (reader.getFieldFlags(field) & RT_ACCESS_BOUND ? true : false);
-
- o << "\n" << indentation << "{\n";
-
- if ( bound ) {
- o << indentation << " PropertySetMixin.BoundListeners l = "
- "new PropertySetMixin.BoundListeners();\n\n";
- }
-
- o << indentation << " m_prophlp.prepareSet(\""
- << fieldname << "\", ";
- if ( propFlags & RT_ACCESS_CONSTRAINED ) {
- OString fieldtype = codemaker::convertString(reader.getFieldTypeName(field));
-
- sal_Int32 index = fieldtype.lastIndexOf('<');
- sal_Int32 nPos=0;
- bool single = true;
- bool optional = false;
- OStringBuffer buffer1(64);
- OStringBuffer buffer2(64);
- do
- {
- OString s(fieldtype.getToken(0, '<', nPos));
- OStringBuffer buffer(16);
- buffer.append("((");
- buffer.append(s.copy(s.lastIndexOf('/')+1));
- buffer.append(')');
- OString t = buffer.makeStringAndClear();
-
- if ( t.equals("((Optional)") ) {
- optional=true;
- if (single) {
- single=false;
- buffer1.append("the_value.IsPresent");
- buffer2.append("the_value.Value");
- } else {
- buffer1.insert(0, t);
- buffer1.append(").IsPresent");
- buffer2.insert(0, t);
- buffer2.append(").Value");
- }
- } else {
- if ( single ) {
- single=false;
- if ( !optional ) {
- buffer1.append("the_value.Value");
- }
- buffer2.append("the_value.Value");
- } else {
- if ( !optional ) {
- buffer1.insert(0, t);
- buffer1.append(").Value");
- }
- buffer2.insert(0, t);
- buffer2.append(").Value");
- }
- }
- } while( nPos <= index );
-
- o << "Any.VOID,\n" << indentation << " ";
- if ( optional )
- o << "(";
- o << buffer1.makeStringAndClear();
- if ( optional )
- o << ") ? " << buffer2.makeStringAndClear() << " : Any.VOID,\n"
- << indentation << " ";
- else
- o << ", ";
- }
-
- if ( bound )
- o << "l";
- else
- o << "null";
- o << ");\n";
-
- o << indentation << " synchronized (this) {\n"
- << indentation << " m_" << fieldname
- << " = the_value;\n" << indentation << " }\n";
-
- if ( bound ) {
- o << indentation << " l.notifyListeners();\n";
- }
- o << indentation << "}\n\n";
-}
-
-void generateXPropertySetBodies(std::ostream& o);
-void generateXFastPropertySetBodies(std::ostream& o);
-void generateXPropertyAccessBodies(std::ostream& o);
-
-void printMethods(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader,
- codemaker::GeneratedTypeSet & generated,
- OString const & delegate, OString const & indentation,
- bool defaultvalue, bool usepropertymixin)
-{
- OString type(codemaker::convertString(reader.getTypeName()));
- if ( generated.contains(type) || type == "com/sun/star/uno/XInterface" ||
- ( defaultvalue &&
- ( type.equals("com/sun/star/lang/XComponent") ||
- type.equals("com/sun/star/lang/XTypeProvider") ||
- type.equals("com/sun/star/uno/XWeak") ) ) ) {
- return;
- }
-
- if ( usepropertymixin ) {
- if ( type.equals("com/sun/star/beans/XPropertySet") ) {
- generated.add(type);
- generateXPropertySetBodies(o);
- return;
- } else if ( type.equals("com/sun/star/beans/XFastPropertySet") ) {
- generated.add(type);
- generateXFastPropertySetBodies(o);
- return;
- } else if ( type.equals("com/sun/star/beans/XPropertyAccess") ) {
- generated.add(type);
- generateXPropertyAccessBodies(o);
- return;
- }
- }
-
- static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
- bool body = ((delegate.getLength() > 0) ? true : false);
- bool defaultbody = ((delegate.equals(sd)) ? true : false);
-
- generated.add(type);
- if ( options.all || defaultvalue ) {
- for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) {
- typereg::Reader super(
- manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(i))));
- if ( !super.isValid() ) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(
- reader.getSuperTypeName(i)));
- }
- printMethods(o, options, manager, super, generated, delegate,
- indentation, defaultvalue, usepropertymixin);
- }
- if ( reader.getFieldCount() > 0 || reader.getMethodCount() > 0 ) {
- o << indentation << "// ";
- printType(o, options, manager, type, false);
- o << ":\n";
- }
- }
- sal_uInt16 method = 0;
- for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
-// OString fieldName(
-// codemaker::convertString(reader.getFieldName(i)).
-// replace('/', '.'));
-// OString fieldType(
-// codemaker::convertString(reader.getFieldTypeName(i)).
-// replace('/', '.'));
-// attributes.insert(StringPairHashMap::value_type(fieldName,
-// std::pair<OString, sal_Int16>(
-// fieldType, reader.getFieldFlags(i))));
-
- o << indentation << "public ";
- printType(o,
- options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)), false);
- o << " get"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << "()";
-
- OUString mn = reader.getMethodName(method);
- OUString fn = reader.getFieldName(i);
-
- if ( method < reader.getMethodCount()
- && reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_GET
- && reader.getMethodName(method) == reader.getFieldName(i) )
- {
- printExceptionSpecification(o, options, manager, reader, method++);
- }
- if ( body ) {
- if ( defaultbody ) {
- if ( usepropertymixin ) {
- o << "\n" << indentation << "{\n" << indentation
- << " return m_"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << ";\n" << indentation << "}\n\n";
- } else {
- o << "\n" << indentation << "{\n" << indentation
- << " return ";
- printType(o,
- options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)),
- false, true);
- o << ";\n" << indentation << "}\n\n";
- }
- } else {
- o << "\n" << indentation << "{\n" << indentation <<
- " return "
- << delegate.getStr() << "get"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << "();\n" << indentation << "}\n\n";
- }
- } else {
- o << ";\n";
- }
-
- // REMOVE next line
- OUString tmp = reader.getFieldName(i);
- bool setAttrMethod = false;
- if ( (reader.getFieldFlags(i) & RT_ACCESS_READONLY) == 0 ) {
- o << indentation << "public void set"
- << (codemaker::convertString(reader.getFieldName(i)).
- getStr())
- << '(';
- printType(o,
- options, manager,
- codemaker::convertString(reader.getFieldTypeName(i)),
- false);
- o << " the_value)";
- if ( method < reader.getMethodCount()
- && reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_SET
- && reader.getMethodName(method) == reader.getFieldName(i) )
- {
- setAttrMethod=true;
- printExceptionSpecification(o, options, manager, reader, method);
- }
- if ( body ) {
- if ( defaultbody ) {
- if ( usepropertymixin ) {
- printSetPropertyMixinBody(o, reader, i, method,
- indentation);
- } else {
- o << "\n" << indentation << "{\n\n" << indentation
- << "}\n\n";
- }
- } else {
- o << "\n" << indentation << "{\n" << indentation
- << " " << delegate.getStr() << "set"
- << codemaker::convertString(reader.getFieldName(i)).getStr()
- << "(the_value);\n" << indentation << "}\n\n";
- }
- } else {
- o << ";\n";
- }
- if (setAttrMethod) ++method;
- }
- }
- for ( ; method < reader.getMethodCount(); ++method ) {
- o << indentation << "public ";
- printType(o,
- options, manager,
- codemaker::convertString(
- reader.getMethodReturnTypeName(method)),
- false);
-
- const OString methodName(codemaker::convertString(reader.getMethodName(method)));
-
- o << ' ' << methodName.getStr() << '(';
- printMethodParameters(o, options, manager, reader, method, false, true);
- o << ')';
- printExceptionSpecification(o, options, manager, reader, method);
- if ( body ) {
- static OUString s(RTL_CONSTASCII_USTRINGPARAM("void"));
- if ( defaultbody ) {
- o << "\n" << indentation << "{\n";
- if ( !reader.getMethodReturnTypeName(method).equals(s) ) {
- o << indentation << " // TODO: Exchange the default return "
- << "implementation for \"" << methodName << "\" !!!\n";
- o << indentation << " // NOTE: "
- "Default initialized polymorphic structs can cause problems"
- "\n" << indentation << " // because of missing default "
- "initialization of primitive types of\n" << indentation
- << " // some C++ compilers or different Any initialization"
- " in Java and C++\n" << indentation
- << " // polymorphic structs.\n" << indentation
- << " return ";
- printType(o,
- options, manager,
- codemaker::convertString(
- reader.getMethodReturnTypeName(method)),
- false, true);
- o << ";";
- } else {
- o << indentation << " // TODO: Insert your implementation for \""
- << methodName << "\" here.";
- }
- o << "\n" << indentation << "}\n\n";
- } else {
- o << "\n" << indentation << "{\n" << indentation << " ";
- if ( !reader.getMethodReturnTypeName(method).equals(s) )
- o << "return ";
- o << delegate.getStr()
- << (codemaker::convertString(
- reader.getMethodName(method)).getStr())
- << '(';
- printMethodParameters(o, options, manager, reader, method,
- false, false);
- o << ");\n" << indentation << "}\n\n";
- }
- } else {
- o << ";\n";
- }
- }
-}
-
-void printConstructionMethods(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader)
-{
- for ( sal_uInt16 i = 0; i < reader.getMethodCount(); ++i ) {
- o << "public static ";
- printType(o,
- options, manager,
- codemaker::convertString(reader.getSuperTypeName(0)), false);
- o << ' ';
- if ( reader.getMethodName(i).getLength() == 0 ) {
- o << "create";
- } else {
- o << (codemaker::java::translateUnoToJavaIdentifier(
- codemaker::convertString(reader.getMethodName(i)),
- "method").getStr());
- }
- o << "(com.sun.star.uno.XComponentContext the_context";
- printMethodParameters(o, options, manager, reader, i, true, true);
- o << ')';
- printExceptionSpecification(o, options, manager, reader, i);
- o << ";\n";
- }
-}
-
-void generateDocumentation(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- OString const & type);
-
-void printServiceMembers(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader, OString const & type,
- OString const & delegate)
-{
- for ( sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i ) {
- OString referenceType(
- codemaker::convertString(
- reader.getReferenceTypeName(i)).replace('/', '.'));
-
- if ( reader.getReferenceSort(i) == RT_REF_SUPPORTS ) {
- o << "\n// supported interface " << referenceType.getStr() << "\n";
- generateDocumentation(o, options, manager, referenceType, delegate);
- } else if ( reader.getReferenceSort(i) == RT_REF_EXPORTS ) {
- o << "\n// exported service " << referenceType.getStr() << "\n";
- generateDocumentation(o, options, manager, referenceType, delegate);
- }
- }
-
- o << "\n// properties of service \""<< type.getStr() << "\"\n";
- for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
- OString fieldName(
- codemaker::convertString(reader.getFieldName(i)));
- OString fieldType(
- codemaker::convertString(reader.getFieldTypeName(i)));
-
- o << "// private ";
- printType(o, options, manager, fieldType, false);
- o << " "
- << codemaker::java::translateUnoToJavaIdentifier(
- fieldName, "property").getStr()
- << ";\n";
- }
-}
-
-void printMapsToJavaType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- OString const & name, sal_Int32 rank,
- std::vector< OString > const & arguments, const char * javaTypeSort)
-{
- o << "maps to Java " << (options.java5 ? "1.5" : "1.4") << " ";
- if ( javaTypeSort != 0 ) {
- o << javaTypeSort << ' ';
- }
- o << "type \"";
- if ( rank == 0 && name == "com/sun/star/uno/XInterface" ) {
- o << "com.sun.star.uno.XInterface";
- } else {
- printType(o,
- options, manager, sort, typeClass, name, rank, arguments, false);
- }
- o << '"';
-}
-
-void generateDocumentation(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- OString const & type, OString const & delegate)
-{
- if ( type.indexOf('/') >= 0 ) {
- throw CannotDumpException("Illegal type name " + type);
- }
- OString binType(type.replace('.', '/'));
- RTTypeClass typeClass;
- OString name;
- sal_Int32 rank;
- std::vector< OString > arguments;
- codemaker::UnoType::Sort sort = decomposeResolveAndCheck(
- manager, binType, false, true, true, &typeClass, &name, &rank,
- &arguments);
-
- bool comment=true;
- if ( delegate.getLength() > 0 ) {
- if ( typeClass != RT_TYPE_INTERFACE && typeClass != RT_TYPE_SERVICE )
- return;
-
- comment=false;
- }
-
- if ( comment ) {
- o << "\n// UNO";
- if ( rank > 0 ) {
- o << " sequence type";
- } else if ( sort != codemaker::UnoType::SORT_COMPLEX ) {
- o << " simple type";
- } else {
- typereg::Reader reader(manager.getTypeReader(name));
- if ( !reader.isValid() ) {
- throw CannotDumpException("Bad type library entity " + name);
- }
- switch ( typeClass ) {
- case RT_TYPE_INTERFACE:
- o << " interface type";
- break;
-
- case RT_TYPE_MODULE:
- o << "IDL module";
- break;
-
- case RT_TYPE_STRUCT:
- if ( reader.getReferenceCount() == 0 ) {
- o << " simple struct type";
- } else if ( arguments.empty() ) {
- o << " polymorphic struct type template";
- } else {
- o << " instantiated polymorphic struct type";
- }
- break;
-
- case RT_TYPE_ENUM:
- o << " enum type";
- break;
-
- case RT_TYPE_EXCEPTION:
- o << " exception type";
- break;
-
- case RT_TYPE_TYPEDEF:
- o << "IDL typedef";
- break;
-
- case RT_TYPE_SERVICE:
- if ( reader.getSuperTypeCount() > 0 ) {
- o << " single-inheritance--based service";
- } else {
- o << "IDL accumulation-based service";
- }
- break;
-
- case RT_TYPE_SINGLETON:
- if ( (manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(0))).getTypeClass())
- == RT_TYPE_INTERFACE )
- {
- o << " inheritance-based singleton";
- } else {
- o << "IDL service-based singleton";
- }
- break;
-
- case RT_TYPE_CONSTANTS:
- o << "IDL constant group";
- break;
-
- default:
- OSL_ASSERT(false);
- break;
- }
- }
- o << " \"" << type.getStr() << "\" ";
- }
- sort = codemaker::decomposeAndResolve(
- manager, binType, true, true, true, &typeClass, &name, &rank,
- &arguments);
- if ( rank > 0 ) {
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments, "array");
- o << '\n';
- } else if ( sort != codemaker::UnoType::SORT_COMPLEX ) {
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments, 0);
- o << '\n';
- } else {
- typereg::Reader reader(manager.getTypeReader(name));
- if ( !reader.isValid() ) {
- throw CannotDumpException("Bad type library entity " + name);
- }
- switch ( typeClass ) {
- case RT_TYPE_INTERFACE:
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "interface");
- if ( name == "com/sun/star/uno/XInterface" ) {
- o << '\n';
- } else {
- o
- << "; " << (options.all ? "all" : "direct")
- << " methods:\n";
- codemaker::GeneratedTypeSet generated;
- printMethods(o, options, manager, reader, generated,
- delegate, "");
- }
- break;
-
- case RT_TYPE_MODULE:
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "package");
- o << '\n';
- break;
-
- case RT_TYPE_STRUCT:
- if ( reader.getReferenceCount() == 0 ) {
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "class");
- } else if ( arguments.empty() ) {
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- options.java5 ? "generic class" : "class");
- } else {
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- options.java5 ? "generic class instantiation" : "class");
- }
- o << "; full constructor:\n";
- printConstructor(o, options, manager, reader, arguments);
- break;
-
- case RT_TYPE_ENUM:
- case RT_TYPE_CONSTANTS:
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "class");
- o << '\n';
- break;
-
- case RT_TYPE_EXCEPTION:
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "exception class");
- o << "; full constructor:\n";
- printConstructor(o, options, manager, reader, arguments);
- break;
-
- case RT_TYPE_SERVICE:
- if ( reader.getSuperTypeCount() > 0 ) {
- printMapsToJavaType(o,
- options, manager, sort, typeClass, name, rank, arguments,
- "class");
- o << "; construction methods:\n";
- printConstructionMethods(o, options, manager, reader);
-
- OString super(
- codemaker::convertString(
- reader.getSuperTypeName(0)).replace('/', '.'));
-
- generateDocumentation(o, options, manager, super, delegate);
- } else {
- o << ("does not map to Java\n"
- "// the service members are generated instead\n");
- printServiceMembers(o, options, manager, reader, type, delegate);
- }
- break;
-
- case RT_TYPE_SINGLETON:
- if ( reader.getSuperTypeCount() > 0 &&
- ((manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(0))).getTypeClass())
- == RT_TYPE_INTERFACE) ) {
- printMapsToJavaType(o, options, manager, sort, typeClass,
- name, rank, arguments, "class");
- o << "; get method:\npublic static ";
- printType(o, options, manager,
- codemaker::convertString(reader.getSuperTypeName(0)),
- false);
- o
- << " get(com.sun.star.uno.XComponentContext context);\n";
- } else {
- o << "does not map to Java\n";
- }
- break;
-
- default:
- OSL_ASSERT(false);
- break;
- }
- }
-}
-
-} }
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/makefile.mk b/unodevtools/source/skeletonmaker/makefile.mk
deleted file mode 100644
index ec0a3821..00000000
--- a/unodevtools/source/skeletonmaker/makefile.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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 := unodevtools
-
-TARGET := uno-skeletonmaker
-TARGETTYPE := CUI
-LIBTARGET := NO
-
-ENABLE_EXCEPTIONS := TRUE
-
-.INCLUDE: settings.mk
-
-.IF "$(OS)" == "IOS"
-all:
- @echo No point in build-time executables for this platform
-.ENDIF
-
-.INCLUDE : $(PRJ)$/unodevtools.pmk
-
-APP1TARGET = $(TARGET)
-APP1RPATH=SDK
-
-APP1OBJS = $(OBJ)$/skeletonmaker.obj \
- $(OBJ)$/skeletoncommon.obj \
- $(OBJ)$/javatypemaker.obj \
- $(OBJ)$/cpptypemaker.obj \
- $(OBJ)$/javacompskeleton.obj \
- $(OBJ)$/cppcompskeleton.obj
-
-APP1DEPN= $(OUT)$/lib$/$(UNODEVTOOLSLIBDEPN) $(SOLARLIBDIR)$/$(CODEMAKERLIBDEPN) \
- $(SOLARLIBDIR)$/$(COMMONCPPLIBDEPN) $(SOLARLIBDIR)$/$(COMMONJAVALIBDEPN)
-APP1STDLIBS = $(UNODEVTOOLSLIBST) $(REGLIB) $(SALLIB) $(SALHELPERLIB) $(CPPULIB) $(CPPUHELPERLIB) \
- $(CODEMAKERLIBST) $(COMMONCPPLIBST) $(COMMONJAVALIBST)
-
-OBJFILES = $(APP1OBJS)
-
-.INCLUDE: target.mk
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
deleted file mode 100644
index ee17c557..00000000
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ /dev/null
@@ -1,724 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "osl/thread.hxx"
-
-#include "codemaker/commonjava.hxx"
-#include "codemaker/commoncpp.hxx"
-#include "codemaker/generatedtypeset.hxx"
-
-#include "skeletoncommon.hxx"
-
-#include <iostream>
-
-using namespace ::rtl;
-using namespace ::codemaker::cpp;
-
-namespace skeletonmaker {
-
-void printLicenseHeader(std::ostream& o, rtl::OString const & filename)
-{
- sal_Int32 index = -1;
-#ifdef SAL_UNX
- index = filename.lastIndexOf('/');
-#else
- index = filename.lastIndexOf('\\');
-#endif
- OString shortfilename(filename);
- if ( index != -1 )
- shortfilename = filename.copy(index+1);
-
- o << "/*************************************************************************\n"
- " *\n"
- " * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n"
- " * \n"
- " * Copyright 2000, 2010 Oracle and/or its affiliates.\n"
- " *\n"
- " * OpenOffice.org - a multi-platform office productivity suite\n"
- " *\n"
- " * This file is part of OpenOffice.org.\n"
- " *\n"
- " * OpenOffice.org is free software: you can redistribute it and/or modify\n"
- " * it under the terms of the GNU Lesser General Public License version 3\n"
- " * only, as published by the Free Software Foundation.\n"
- " *\n"
- " * OpenOffice.org is distributed in the hope that it will be useful,\n"
- " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- " * GNU Lesser General Public License version 3 for more details\n"
- " * (a copy is included in the LICENSE file that accompanied this code).\n"
- " *\n"
- " * You should have received a copy of the GNU Lesser General Public License\n"
- " * version 3 along with OpenOffice.org. If not, see\n"
- " * <http://www.openoffice.org/license.html>\n"
- " * for a copy of the LGPLv3 License.\n"
- " *\n"
- " ************************************************************************/\n\n";
-}
-
-bool getOutputStream(ProgramOptions const & options,
- OString const & extension,
- std::ostream** ppOutputStream,
- OString & targetSourceFileName,
- OString & tmpSourceFileName)
-{
- bool bStandardout = false;
- if ( options.outputpath.equals("stdout") )
- {
- bStandardout = true;
- *ppOutputStream = &std::cout;
- return bStandardout;
- }
-
- targetSourceFileName = createFileNameFromType(
- options.outputpath, options.implname.replace('.','/'), extension);
-
- OString tmpDir = getTempDir(targetSourceFileName);
- FileStream file;
- file.createTempFile(tmpDir);
-
- if( !file.isValid() )
- {
- OString message("cannot open ");
- message += targetSourceFileName + " for writing";
- throw CannotDumpException(message);
- } else {
- tmpSourceFileName = file.getName();
- }
- file.close();
- *ppOutputStream = new std::ofstream(tmpSourceFileName.getStr(),
- std::ios_base::binary);
-
- return bStandardout;
-}
-
-codemaker::UnoType::Sort decomposeResolveAndCheck(
- TypeManager const & manager, OString const & type,
- bool resolveTypedefs, bool allowVoid, bool allowExtraEntities,
- RTTypeClass * typeClass, OString * name, sal_Int32 * rank,
- std::vector< OString > * arguments)
-{
- codemaker::UnoType::Sort sort = codemaker::decomposeAndResolve(
- manager, type, resolveTypedefs, allowVoid, allowExtraEntities,
- typeClass, name, rank, arguments);
- for ( std::vector< OString >::iterator i(arguments->begin());
- i != arguments->end(); ++i )
- {
- RTTypeClass typeClass2;
- OString name2;
- sal_Int32 rank2;
- std::vector< OString > arguments2;
- decomposeResolveAndCheck(
- manager, *i, true, false, false, &typeClass2, &name2, &rank2,
- &arguments2);
- }
- return sort;
-}
-
-bool containsAttribute(AttributeInfo& attributes, OString const & attrname)
-{
- for ( AttributeInfo::const_iterator i(attributes.begin());
- i != attributes.end(); ++i ) {
- if ( (*i).first == attrname ) {
- return true;
- }
- }
- return false;
-}
-
-// collect attributes including inherited attributes
-void checkAttributes(TypeManager const & manager,
- const typereg::Reader& reader,
- AttributeInfo& attributes,
- boost::unordered_set< OString, OStringHash >& propinterfaces)
-{
- OString typeName = codemaker::convertString(reader.getTypeName());
- if ( typeName.equals("com/sun/star/beans/XPropertySet") ||
- typeName.equals("com/sun/star/beans/XFastPropertySet") ||
-// typeName.equals("com/sun/star/beans/XMultiPropertySet") ||
- typeName.equals("com/sun/star/beans/XPropertyAccess") )
- {
- propinterfaces.insert(typeName);
- }
-
- for ( sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i ) {
- typereg::Reader supertype(manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(i))));
- if ( !supertype.isValid() ) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(reader.getSuperTypeName(i)));
- }
- checkAttributes(manager, supertype, attributes, propinterfaces);
- }
-
- for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
- OString fieldName(
- codemaker::convertString(reader.getFieldName(i)).
- replace('/', '.'));
-
- if ( !containsAttribute(attributes, fieldName) ) {
- OString fieldType(
- codemaker::convertString(reader.getFieldTypeName(i)).
- replace('/', '.'));
- attributes.push_back(AttributeInfo::value_type(
- fieldName, std::pair<OString, sal_Int16>(
- fieldType, reader.getFieldFlags(i))));
- }
- }
-}
-
-void checkType(TypeManager const & manager,
- OString const & type,
- boost::unordered_set< OString, OStringHash >& interfaceTypes,
- boost::unordered_set< OString, OStringHash >& serviceTypes,
- AttributeInfo& properties)
-{
-
- OString binType(type.replace('.', '/'));
- typereg::Reader reader(manager.getTypeReader(binType));
- if ( !reader.isValid() ) {
- throw CannotDumpException("Bad type library entity " + binType);
- }
-
- switch ( reader.getTypeClass() )
- {
- case RT_TYPE_INTERFACE:
- {
- // com/sun/star/lang/XComponent should be also not in the list
- // but it will be used for checking the impl helper and will be
- // removed later if necessary.
- if ( binType.equals("com/sun/star/lang/XTypeProvider") ||
- binType.equals("com/sun/star/uno/XWeak") )
- return;
- if (interfaceTypes.find(type) == interfaceTypes.end()) {
- interfaceTypes.insert(type);
- }
- }
- break;
- case RT_TYPE_SERVICE:
- if ( serviceTypes.find(binType) == serviceTypes.end() ) {
- serviceTypes.insert(binType);
-
- if ( reader.getSuperTypeCount() > 0 ) {
- OString supername(codemaker::convertString(
- reader.getSuperTypeName(0).replace('/', '.')));
- if ( interfaceTypes.find(supername) == interfaceTypes.end() ) {
- interfaceTypes.insert(supername);
-
- typereg::Reader supertype(manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(0))));
- if ( !supertype.isValid() ) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(reader.getSuperTypeName(0)));
- }
- }
-
- // check if constructors are specified, if yes automatically
- // support of XInitialization. We will take care of the default
- // constructor because in this case XInitialization is not called.
- if ( reader.getMethodCount() > 1 ||
- ( reader.getMethodCount() == 1 &&
- reader.getMethodName(0).getLength() > 0 ) )
- {
- OString s("com.sun.star.lang.XInitialization");
- if ( interfaceTypes.find(s) == interfaceTypes.end() )
- interfaceTypes.insert(s);
- }
- } else {
- for ( sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i ) {
- OString referenceType(
- codemaker::convertString(
- reader.getReferenceTypeName(i)).replace('/', '.'));
-
- if ( reader.getReferenceSort(i) == RT_REF_SUPPORTS ) {
- checkType(manager, referenceType, interfaceTypes,
- serviceTypes, properties);
- } else if ( reader.getReferenceSort(i) == RT_REF_EXPORTS ) {
- checkType(manager, referenceType, interfaceTypes,
- serviceTypes, properties);
- }
- }
-
- for ( sal_uInt16 i = 0; i < reader.getFieldCount(); ++i ) {
- OString fieldName(
- codemaker::convertString(reader.getFieldName(i)).
- replace('/', '.'));
- OString fieldType(
- codemaker::convertString(reader.getFieldTypeName(i)).
- replace('/', '.'));
-
- properties.push_back(AttributeInfo::value_type(
- fieldName, std::pair<OString, sal_Int16>(
- fieldType, reader.getFieldFlags(i))));
- }
- }
- }
- break;
- default:
- OSL_ASSERT(false);
- break;
- }
-}
-
-void checkDefaultInterfaces(
- boost::unordered_set< OString, OStringHash >& interfaces,
- const boost::unordered_set< OString, OStringHash >& services,
- const OString & propertyhelper)
-{
- if ( services.empty() ) {
- if (interfaces.find("com.sun.star.lang.XServiceInfo") != interfaces.end())
- interfaces.erase("com.sun.star.lang.XServiceInfo");
- } else {
- if (interfaces.find("com.sun.star.lang.XServiceInfo") == interfaces.end())
- interfaces.insert("com.sun.star.lang.XServiceInfo");
- }
-
- if ( propertyhelper.equals("_") ) {
- if (interfaces.find("com.sun.star.beans.XPropertySet")
- != interfaces.end())
- interfaces.erase("com.sun.star.beans.XPropertySet");
- if (interfaces.find("com.sun.star.beans.XFastPropertySet")
- != interfaces.end())
- interfaces.erase("com.sun.star.beans.XFastPropertySet");
- if (interfaces.find("com.sun.star.beans.XPropertyAccess")
- != interfaces.end())
- interfaces.erase("com.sun.star.beans.XPropertyAccess");
- }
-}
-
-bool checkServiceProperties(TypeManager const & manager,
- const typereg::Reader & reader)
-{
- if ( reader.getFieldCount() > 0 )
- return true;
-
- if ( reader.getReferenceCount() > 0 ) {
- for ( sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i ) {
- if ( reader.getReferenceSort(i) == RT_REF_EXPORTS ) {
- typereg::Reader refreader(
- manager.getTypeReader(
- codemaker::convertString(reader.getReferenceTypeName(i))));
-
- if ( checkServiceProperties(manager, refreader) )
- return true;
- }
- }
- }
- return false;
-}
-
-
-OString checkPropertyHelper(
- ProgramOptions const & options,
- TypeManager const & manager,
- const boost::unordered_set< OString, OStringHash >& services,
- const boost::unordered_set< OString, OStringHash >& interfaces,
- AttributeInfo& attributes,
- boost::unordered_set< OString, OStringHash >& propinterfaces)
-{
- boost::unordered_set< OString, OStringHash >::const_iterator iter;
- boost::unordered_set< OString, OStringHash >::const_iterator end;
-
- if ( !services.empty() ) {
- iter = services.begin();
- end = services.end();
- } else {
- iter = interfaces.begin();
- end = interfaces.end();
- }
-
- bool oldStyleWithProperties = false;
- while ( iter != end ) {
- typereg::Reader reader(manager.getTypeReader((*iter).replace('.', '/')));
-
- if ( !services.empty() ) {
- if ( options.supportpropertysetmixin && reader.getSuperTypeCount() > 0 )
- {
- typereg::Reader supertype(
- manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(0))));
- if ( !supertype.isValid() ) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(
- reader.getSuperTypeName(0)));
- }
-
- checkAttributes(manager, supertype, attributes, propinterfaces);
-
- if ( !(attributes.empty() || propinterfaces.empty()) ) {
- return OUStringToOString(
- supertype.getTypeName().replace('/', '.'),
- osl_getThreadTextEncoding());
- }
- } else {
- oldStyleWithProperties = checkServiceProperties(manager, reader);
- }
- } else {
- checkAttributes(manager, reader, attributes, propinterfaces);
- if ( !(attributes.empty() || propinterfaces.empty()) ) {
- return OUStringToOString(
- reader.getTypeName().replace('/', '.'),
- osl_getThreadTextEncoding());
- }
- }
- ++iter;
- }
-
- return (oldStyleWithProperties ? "_" : "");
-}
-
-bool checkXComponentSupport(TypeManager const & manager,
- typereg::Reader const & reader)
-{
- static OUString s(RTL_CONSTASCII_USTRINGPARAM(
- "com/sun/star/lang/XComponent"));
- if ( reader.getTypeName().equals(s) )
- return true;
-
- for ( sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i ) {
- typereg::Reader super(
- manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(i))));
- if ( !super.isValid() ) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(
- reader.getSuperTypeName(i)));
- }
- if ( checkXComponentSupport(manager, super) )
- return true;
- }
-
- return false;
-}
-
-
-// if XComponent is directly specified, return true and remove it from the
-// supported interfaces list
-bool checkXComponentSupport(TypeManager const & manager,
- boost::unordered_set< OString, OStringHash >& interfaces)
-{
- if ( interfaces.empty() )
- return false;
-
- boost::unordered_set< OString, OStringHash >::const_iterator iter =
- interfaces.begin();
- while ( iter != interfaces.end() ) {
- if ( (*iter).equals("com.sun.star.lang.XComponent") ) {
- interfaces.erase("com.sun.star.lang.XComponent");
- return true;
- }
- typereg::Reader reader(manager.getTypeReader((*iter).replace('.', '/')));
- if ( checkXComponentSupport(manager, reader) )
- return true;
- ++iter;
- }
-
- return false;
-}
-
-sal_uInt16 checkAdditionalPropertyFlags(typereg::Reader const & reader,
- sal_uInt16 field, sal_uInt16 method)
-{
- sal_uInt16 flags = 0;
- bool getterSupportsUnknown = false;
-
- OUString su(RTL_CONSTASCII_USTRINGPARAM(
- "com/sun/star/beans/UnknownPropertyException"));
- if ( method < reader.getMethodCount()
- && reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_GET
- && reader.getMethodName(method) == reader.getFieldName(field) )
- {
- if ( reader.getMethodExceptionCount(method) > 0 ) {
- for ( sal_uInt16 i = 0; i < reader.getMethodExceptionCount(method);
- ++i )
- {
- if (su.equals(reader.getMethodExceptionTypeName(method, i)))
- getterSupportsUnknown = true;
- }
- }
- method++;
- }
- if ( method < reader.getMethodCount()
- && reader.getMethodFlags(method) == RT_MODE_ATTRIBUTE_SET
- && reader.getMethodName(method) == reader.getFieldName(field) )
- {
- if ( reader.getMethodExceptionCount(method) > 0 ) {
- OUString s(RTL_CONSTASCII_USTRINGPARAM(
- "com/sun/star/beans/PropertyVetoException"));
- for ( sal_uInt16 i = 0; i < reader.getMethodExceptionCount(method);
- ++i )
- {
- if ( s.equals(reader.getMethodExceptionTypeName(method, i)) )
- flags |= RT_ACCESS_CONSTRAINED;
- if ( getterSupportsUnknown &&
- su.equals(reader.getMethodExceptionTypeName(method, i)) )
- flags |= RT_ACCESS_OPTIONAL;
- }
- }
- }
- return flags;
-}
-
-// This function checks if the specified types for paramters and return
-// types are allowed add-in types, for more info see the com.sun.star.sheet.AddIn
-// service description
-bool checkAddinType(TypeManager const & manager,
- OString const & type, bool & bLastAny,
- bool & bHasXPropertySet, bool bIsReturn)
-{
- RTTypeClass typeClass;
- OString name;
- sal_Int32 rank;
- std::vector< OString > arguments;
- codemaker::UnoType::Sort sort = codemaker::decomposeAndResolve(
- manager, type, true, true, true, &typeClass, &name, &rank, &arguments);
-
- if ( sort == codemaker::UnoType::SORT_LONG ||
- sort == codemaker::UnoType::SORT_DOUBLE ||
- sort == codemaker::UnoType::SORT_STRING )
- {
- if ( rank == 0 || rank ==2 )
- return true;
- }
- if ( sort == codemaker::UnoType::SORT_ANY )
- {
- if ( rank <= 2 ) {
- if ( rank ==1 ) {
- if ( bIsReturn )
- return false;
- bLastAny = true;
- }
-
- return true;
- }
- }
- if ( sort == codemaker::UnoType::SORT_COMPLEX &&
- typeClass == RT_TYPE_INTERFACE )
- {
- if ( bIsReturn && type.equals("com/sun/star/sheet/XVolatileResult") )
- return true;
- if ( !bIsReturn && type.equals("com/sun/star/table/XCellRange") )
- return true;
- if ( !bIsReturn && type.equals("com/sun/star/beans/XPropertySet") )
- {
- if ( bHasXPropertySet ) {
- return false;
- } else {
- bHasXPropertySet = true;
- return true;
- }
- }
- }
- return false;
-}
-
-void checkAddInTypes(TypeManager const & manager,
- typereg::Reader const & reader)
-{
- OString sType(codemaker::convertString(reader.getTypeName()).replace('/', '.'));
- bool bLastAny = false;
- bool bHasXPropertySet = false;
- for ( sal_uInt16 m = 0; m < reader.getMethodCount(); ++m ) {
- OString sMethod(codemaker::convertString(reader.getMethodName(m)));
-
- OString sReturnType(codemaker::convertString(
- reader.getMethodReturnTypeName(m)));
- if ( !checkAddinType(
- manager, sReturnType, bLastAny, bHasXPropertySet, true) )
- {
- OStringBuffer msg("the return type of the calc add-in function '");
- msg.append(sType);
- msg.append(":");
- msg.append(sMethod);
- msg.append("' is invalid. Please check your IDL defintion.");
- throw CannotDumpException(msg.makeStringAndClear());
- }
-
- bHasXPropertySet = false;
- for ( sal_uInt16 p = 0; p < reader.getMethodParameterCount(m); ++p ) {
- bLastAny = false;
- OString sParamType(codemaker::convertString(
- reader.getMethodParameterTypeName(m, p)));
- if ( !checkAddinType(manager, sParamType,
- bLastAny, bHasXPropertySet, false) ||
- bLastAny )
- {
- OStringBuffer msg("the type of the ");
- msg.append((sal_Int32)p+1);
- msg.append(". parameter of the calc add-in function '");
- msg.append(sType);
- msg.append(":");
- msg.append(sMethod);
- msg.append("' is invalid.");
- if ( bLastAny )
- msg.append(" The type 'sequence<any>' is allowed as last "
- "parameter only.");
- if ( bHasXPropertySet )
- msg.append(" The type 'XPropertySet' is allowed only once.");
-
- msg.append(" Please check your IDL definition.");
- throw CannotDumpException(msg.makeStringAndClear());
- }
- }
- }
-}
-
-void generateFunctionParamterMap(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- ::codemaker::GeneratedTypeSet & generated,
- bool bFirst)
-{
- OString sType(codemaker::convertString(reader.getTypeName()));
- if ( sType.equals("com/sun/star/uno/XInterface") ||
- sType.equals("com/sun/star/lang/XLocalizable") ||
- sType.equals("com/sun/star/lang/XServiceInfo") ||
- // the next three checks becomes obsolete when configuration is used
- sType.equals("com/sun/star/sheet/XAddIn") ||
- sType.equals("com/sun/star/sheet/XCompatibilityNames") ||
- sType.equals("com/sun/star/lang/XServiceName") )
- {
- return;
- }
-
- // check if the specified add-in functions supports valid types
- checkAddInTypes(manager, reader);
-
- for ( sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i ) {
- typereg::Reader super(
- manager.getTypeReader(
- codemaker::convertString(
- reader.getSuperTypeName(i))));
- if ( !super.isValid() ) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(
- reader.getSuperTypeName(i)));
- }
- generateFunctionParamterMap(o, options, manager, super, generated, bFirst);
- }
-
- OString type(codemaker::convertString(reader.getTypeName()));
- if ( generated.contains(type) )
- return;
- else
- generated.add(type);
-
- for ( sal_uInt16 m = 0; m < reader.getMethodCount(); ++m ) {
- OString sMethod(codemaker::convertString(reader.getMethodName(m)));
-
- if ( bFirst ) {
- if (options.language == 2) {
- o << " ParamMap fpm;\n";
- }
- else {
- if ( options.java5 )
- o << " java.util.Hashtable< Integer, String > fpm = "
- "new java.util.Hashtable< Integer, String >();\n";
- else
- o << " java.util.Hashtable fpm = "
- "new java.util.Hashtable();\n";
- }
- bFirst = false;
- } else
- if ( options.language == 2 ) {
- o << " fpm = ParamMap();\n";
- }
- else {
- if ( options.java5 )
- o << " fpm = new java.util.Hashtable< "
- "Integer, String >();\n";
- else
- o << " fpm = new java.util.Hashtable();\n";
- }
-
- for ( sal_uInt16 p = 0; p < reader.getMethodParameterCount(m); ++p ) {
- if ( options.language == 2 ) {
- o << " fpm[" << p
- << "] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\""
- << codemaker::convertString(reader.getMethodParameterName(m, p))
- << "\"));\n";
- }
- else {
- if ( options.java5 )
- o << " fpm.put(" << p << ", \""
- << codemaker::convertString(
- reader.getMethodParameterName(m, p))
- << "\");\n";
- else
- o << " fpm.put(new Integer(" << p << "), \""
- << codemaker::convertString(
- reader.getMethodParameterName(m, p))
- << "\");\n";
- }
- }
-
- if ( options.language == 2 ) {
- o << " m_functionMap[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\""
- << sMethod << "\"))] = fpm;\n\n";
- }
- else {
- o << " m_functionMap.put(\"" << sMethod << "\", fpm);\n\n";
- }
- }
-}
-
-void generateFunctionParameterMap(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- const boost::unordered_set< OString, OStringHash >& interfaces)
-{
- ::codemaker::GeneratedTypeSet generated;
- bool bFirst = true;
- boost::unordered_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
- while ( iter != interfaces.end() ) {
- typereg::Reader reader(manager.getTypeReader((*iter).replace('.','/')));
- if (!reader.isValid()) {
- throw CannotDumpException(
- "Bad type library entity "
- + codemaker::convertString(
- reader.getTypeName()));
- }
-
- generateFunctionParamterMap(o, options, manager, reader, generated, bFirst);
- ++iter;
- }
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.hxx b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
deleted file mode 100644
index 80b6d0d1..00000000
--- a/unodevtools/source/skeletonmaker/skeletoncommon.hxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCOMMON_HXX
-#define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCOMMON_HXX
-
-#include "rtl/string.hxx"
-#include "registry/reader.hxx"
-#include "codemaker/typemanager.hxx"
-#include "codemaker/unotype.hxx"
-
-#include <fstream>
-#include <boost/unordered_set.hpp>
-#include <map>
-
-namespace skeletonmaker {
-
-typedef ::std::map< ::rtl::OString, ::std::vector< ::rtl::OString >,
- ::std::less< ::rtl::OString > > ProtocolCmdMap;
-
-typedef ::std::vector< ::std::pair< rtl::OString,
- ::std::pair< rtl::OString, sal_Int16 > > > AttributeInfo;
-
-
-struct ProgramOptions {
- ProgramOptions(): java5(true), all(false), dump(false), license(false),
- shortnames(false), supportpropertysetmixin(false),
- backwardcompatible(false), language(1), componenttype(1) {}
-
- bool java5;
- bool all;
- bool dump;
- bool license;
- bool shortnames;
- bool supportpropertysetmixin;
- bool backwardcompatible;
- // language specifier - is extendable
- // 1 = Java
- // 2 = C++
- short language;
- // component type
- // 1 = default UNO component - is extendable
- // 2 = calc add-in
- // 3 = add-on
- short componenttype;
- rtl::OString outputpath;
- rtl::OString implname;
- ProtocolCmdMap protocolCmdMap;
-};
-
-
-/**
- print the standard OpenOffice.org license header
-
- @param o specifies the output stream
- @param filename specifies the source file name
-*/
-void printLicenseHeader(std::ostream& o, rtl::OString const & filename);
-
-/**
- create dependent on the output path, the implementation name and the
- extension a new output file. If output path is equal "stdout" the tool
- generates the output to standard out.
-
- @param options the program options including the output path and the
- implementation name
- @param extension specifies the file extensions (e.g. .cxx or .java)
- @param ppOutputStream out parameter returning the output stream
- @param targetSourceFileName out parameter returning the generated file name
- constructed on base of the output path, the
- implementation name and the extension
- @param tmpSourceFileName out parameter returning the temporary file name based
- on the output path and a generated temporary file name.
- @return true if output is generated to standard out or else false
-*/
-bool getOutputStream(ProgramOptions const & options,
- rtl::OString const & extension,
- std::ostream** ppOutputStream,
- rtl::OString & targetSourceFileName,
- rtl::OString & tmpSourceFileName);
-
-codemaker::UnoType::Sort decomposeResolveAndCheck(
- TypeManager const & manager, rtl::OString const & type,
- bool resolveTypedefs, bool allowVoid, bool allowExtraEntities,
- RTTypeClass * typeClass, rtl::OString * name, sal_Int32 * rank,
- std::vector< rtl::OString > * arguments);
-
-void checkType(TypeManager const & manager,
- rtl::OString const & type,
- boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaceTypes,
- boost::unordered_set< rtl::OString, rtl::OStringHash >& serviceTypes,
- AttributeInfo& properties);
-
-void checkDefaultInterfaces(
- boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaces,
- const boost::unordered_set< rtl::OString, rtl::OStringHash >& services,
- const rtl::OString & propertyhelper);
-
-rtl::OString checkPropertyHelper(
- ProgramOptions const & options, TypeManager const & manager,
- const boost::unordered_set< rtl::OString, rtl::OStringHash >& services,
- const boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaces,
- AttributeInfo& attributes,
- boost::unordered_set< rtl::OString, rtl::OStringHash >& propinterfaces);
-
-/**
- checks whether the return and parameters types are valid and allowed
- calc add-in type. The function throws a CannotDumpException with an
- detailed error description which type is wrong
-
- @param manager a type manager
- @param reader a registry type reader of an interface defining
- calc add-in functions
-*/
-void checkAddInTypes(TypeManager const & manager,
- typereg::Reader const & reader);
-
-
-/**
- checks if XComponent have to be supported, if yes it removes it from the
- supported interfaces list becuase it becmoes implmented by the appropriate
- helper
-
- @param manager a type manager
- @param interfaces a list of interfaces which should be implemented
-
- @return true if XComponent have to be supported
-*/
-bool checkXComponentSupport(TypeManager const & manager,
- boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaces);
-
-
-sal_uInt16 checkAdditionalPropertyFlags(typereg::Reader const & reader,
- sal_uInt16 field, sal_uInt16 method);
-
-
-void generateFunctionParameterMap(std::ostream& o,
- ProgramOptions const & options,
- TypeManager const & manager,
- const boost::unordered_set< ::rtl::OString, ::rtl::OStringHash >& interfaces);
-
-}
-
-#endif // INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCOMMON_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/skeletoncpp.hxx b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
deleted file mode 100644
index 6213bc1d..00000000
--- a/unodevtools/source/skeletonmaker/skeletoncpp.hxx
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
-#define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
-
-#include <fstream>
-
-#include "codemaker/generatedtypeset.hxx"
-#include "skeletoncommon.hxx"
-
-namespace skeletonmaker { namespace cpp {
-
-// referenceType
-// 0 = no reference
-// 1 = use of css::uno::Reference for interfaces
-// 2 = reference (includes css::uno::Reference for interfaces)
-// 4 = const reference (includes css::uno::Reference for interfaces)
-// 8 = default construction for example for return types, means "return <type>();"
-// 16 = default member initialization in a constructor
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- rtl::OString const & name, sal_Int32 rank,
- std::vector< rtl::OString > const & arguments,
- short referenceType, bool defaultvalue=false);
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- rtl::OString const & type, short referenceType,
- bool defaultvalue=false);
-
-
-bool printConstructorParameters(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- typereg::Reader const & outerReader,
- std::vector< rtl::OString > const & arguments);
-
-
-void printConstructor(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- std::vector< rtl::OString > const & arguments);
-
-
-void printMethodParameters(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- sal_uInt16 method, bool previous,
- bool withtype);
-
-
-void printExceptionSpecification(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- sal_uInt16 method);
-
-
-void printMethods(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader,
- codemaker::GeneratedTypeSet & generated,
- rtl::OString const & delegate,
- rtl::OString const & classname=rtl::OString(),
- rtl::OString const & indentation=rtl::OString(),
- bool defaultvalue=false,
- rtl::OString const & propertyhelper=rtl::OString());
-
-
-void printConstructionMethods(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader);
-
-
-void printServiceMembers(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- rtl::OString const & type,
- rtl::OString const & delegate);
-
-
-void printMapsToCppType(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- codemaker::UnoType::Sort sort,
- RTTypeClass typeClass,
- rtl::OString const & name,
- sal_Int32 rank,
- std::vector< rtl::OString > const & arguments,
- const char * cppTypeSort);
-
-
-void generateDocumentation(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- rtl::OString const & type,
- rtl::OString const & delegate);
-
-
-void generateSkeleton(ProgramOptions const & options,
- TypeManager const & manager,
- std::vector< rtl::OString > const & types,
- rtl::OString const & delegate);
-
-void generateCalcAddin(ProgramOptions const & options,
- TypeManager const & manager,
- std::vector< rtl::OString > const & types);
-
-} }
-
-#endif // INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/skeletonjava.hxx b/unodevtools/source/skeletonmaker/skeletonjava.hxx
deleted file mode 100644
index 36174d19..00000000
--- a/unodevtools/source/skeletonmaker/skeletonjava.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 INCLUDED_UNODEVTOOLS_SKELETONJAVA_HXX
-#define INCLUDED_UNODEVTOOLS_SKELETONJAVA_HXX
-
-#include <fstream>
-
-#include "codemaker/generatedtypeset.hxx"
-#include "skeletoncommon.hxx"
-
-namespace skeletonmaker { namespace java {
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- codemaker::UnoType::Sort sort, RTTypeClass typeClass,
- rtl::OString const & name, sal_Int32 rank,
- std::vector< rtl::OString > const & arguments,
- bool referenceType, bool defaultvalue=false);
-
-void printType(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- rtl::OString const & type, bool referenceType,
- bool defaultvalue=false);
-
-bool printConstructorParameters(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- typereg::Reader const & outerReader,
- std::vector< rtl::OString > const & arguments);
-
-void printConstructor(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader,
- std::vector< rtl::OString > const & arguments);
-
-void printMethodParameters(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- sal_uInt16 method, bool previous,
- bool withtype,
- bool shortname=false);
-
-void printExceptionSpecification(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- sal_uInt16 method);
-
-void printMethods(std::ostream & o,
- ProgramOptions const & options, TypeManager const & manager,
- typereg::Reader const & reader,
- codemaker::GeneratedTypeSet & generated,
- rtl::OString const & delegate,
- rtl::OString const & indentation=rtl::OString(),
- bool defaultvalue=false,
- bool usepropertymixin=false);
-
-void printConstructionMethods(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader);
-
-void printServiceMembers(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- typereg::Reader const & reader,
- rtl::OString const & type,
- rtl::OString const & delegate);
-
-void printMapsToJavaType(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- codemaker::UnoType::Sort sort,
- RTTypeClass typeClass,
- rtl::OString const & name, sal_Int32 rank,
- std::vector< rtl::OString > const & arguments,
- const char * javaTypeSort);
-
-void generateDocumentation(std::ostream & o,
- ProgramOptions const & options,
- TypeManager const & manager,
- rtl::OString const & type,
- rtl::OString const & delegate);
-
-void generateSkeleton(ProgramOptions const & options, TypeManager const & manager, std::vector< rtl::OString > const & types, rtl::OString const & delegate);
-
-} }
-
-#endif // INCLUDED_UNODEVTOOLS_SKELETONJAVA_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
deleted file mode 100644
index 5e1858b2..00000000
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ /dev/null
@@ -1,354 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <iostream>
-
-#include "sal/main.h"
-#include "rtl/process.h"
-#include "rtl/ustrbuf.hxx"
-#include "unodevtools/typemanager.hxx"
-#include "unodevtools/options.hxx"
-#include "skeletonjava.hxx"
-#include "skeletoncpp.hxx"
-
-#include "com/sun/star/uno/Reference.hxx"
-
-using namespace ::rtl;
-using namespace ::skeletonmaker;
-using namespace ::unodevtools;
-using namespace ::com::sun::star::uno;
-
-namespace {
-
-static const char usageText[] =
-"\n sub-commands:\n"
-" dump dump declarations on stdout (e.g. constructors, methods, type\n"
-" mapping for properties) or complete method bodies with\n"
-" method forwarding.\n"
-" component generates language specific code skeleton files using the\n"
-" implementation name as the file and class name\n"
-" calc-add-in generates a language specific code skeleton for a calc add-in\n"
-" using the implementation name as the file and class name. A \n"
-" service type is necessary, referencing an interface which defines\n"
-" the new add-in functions.\n"
-" add-on generates a language specific code skeleton for an add-on compnent\n"
-" using the implementation name as the file and class name. The protocol\n"
-" name(s) and the corresponding command(s) have to be specified with the\n"
-" '-p' option.\n"
-"\n options:\n"
-" -env:INIFILENAME=<url> url specifies a URL to an UNO ini|rc file of an\n"
-" existing UNO environment (URE, office installation).\n"
-" -env:UNO_TYPES=<url> url specifies a binary type library file. It can be\n"
-" a space separated list of urls.\n"
-" -a, --all list all interface methods, not only the direct\n"
-" ones\n"
-" --(java4|java5|cpp) select the target language\n"
-" --java4 generate output for Java 1.4 or earlier\n"
-" --java5 generate output for Java 1.5 or later (is \n"
-" currently the default)\n"
-" --cpp generate output for C++\n"
-" -sn, --shortnames using namespace abbreviation 'css:': for\n"
-" '::com::sun::star::', only valid for sub-command\n"
-" 'dump' and target language 'cpp'. It is default for the\n"
-" sub-command 'component'.\n"
-" --propertysetmixin the generated skeleton implements the cppu::PropertySetMixin\n"
-" helper if a referenced new style service specifies an\n"
-" interface which provides attributes (directly or inherited).\n"
-" -lh --licenseheader generates a default OpenOffice.org LGPL license\n"
-" header at the beginning of a component source file.\n"
-" This option is taken into account in 'component' mode\n"
-" only and if -o is unequal 'stdout'.\n"
-" -bc specifies that the generated calc add-in is backward\n"
-" --backward-compatible compatible to older office versions and implement the\n"
-" former required add-in interfaces where the implementation\n"
-" is mapped on the new add-in configuration. In this case\n"
-" the config schema needs to be bundled with the extension\n"
-" add-in as well. Default is a minimal add-in component\n"
-" skeleton based on the configuration coming with the\n"
-" office since OO.org 2.0.4.\n"
-" -o <path> path specifies an existing directory where the\n"
-" output files are generated to, only valid for\n"
-" sub-command 'component'. If path=stdout the generated\n"
-" code is generated on standard out instead of a file.\n"
-" -l <file> specifies a binary type library (can be used more\n"
-" than once). The type library is integrated as an\n"
-" additional type provider in the bootstrapped type\n"
-" system.\n"
-" -n <name> specifies an implementation name for the component\n"
-" (used as classname, filename and package|namespace\n"
-" name). In 'dump' mode it is used as classname (e.g.\n"
-" \"MyBase::\", C++ only) to generate method bodies not\n"
-" inline.\n"
-" -d <name> specifies a base classname or a delegator.\n"
-" In 'dump' mode it is used as a delegator to forward\n"
-" methods. It can be used as '<name>::' for base\n"
-" forwarding, or '<name>->|.' for composition.\n"
-" Using \"_\" means that a default bodies with default\n"
-" return values are dumped.\n"
-" -t <name> specifies an UNOIDL type name, e.g.\n"
-" com.sun.star.text.XText (can be used more than once)\n"
-" -p <protocol:cmd(s)> specifies an add-on protocol name and the corresponding\n"
-" command names, where the commands are a ',' separated list\n"
-" of unique commands. This option is only valid for add-ons.\n"
-" -V, --version print version number and exit\n"
-" -h, --help print this help and exit\n\n";
-
-void printUsageAndExit(const char* programname, const char* version)
-{
- std::cerr
- << "\n using: " << programname
- << " (-env:INIFILENAME=<url> | -env:UNO_TYPES=<url>)\n"
- << " dump [<options>] -t <type> ...\n"
- << " " << programname
- << " (-env:INIFILENAME=<url> | -env:UNO_TYPES=<url>)\n"
- << " component [<options>] -n <name> -t <type> ...\n"
- << " " << programname
- << " (-env:INIFILENAME=<url> | -env:UNO_TYPES=<url>)\n"
- << " calc-add-in [<options>] -n <name> -t <add-in_service>\n"
- << " " << programname
- << " (-env:INIFILENAME=<url> | -env:UNO_TYPES=<url>)\n"
- << " add-on [<options>] -n <name> -p <protocol_name:command,...>\n"
- << " " << programname << " -V, --version\n"
- << " " << programname << " -h, --help\n"
- << usageText
- << programname << " Version " << version << "\n\n";
-}
-
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
-{
- const char* version = "0.4";
- const char* programname = "uno-skeletonmaker";
-
- if ( argc <= 1 ) {
- printUsageAndExit(programname, version);
- exit(EXIT_FAILURE);
- }
-
- ProgramOptions options;
- std::vector< OUString > registries;
- std::vector< OString > types;
- OString delegate;
-
- try {
-
- sal_Int32 nPos = 0;
- sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
- OUString arg, sOption;
- sal_Bool bOption=sal_False;
-
- // check command
- rtl_getAppCommandArg(nPos++, &arg.pData);
- if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("dump"))) ) {
- options.dump = true;
- } else if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("component"))) ) {
- options.dump = false;
- options.shortnames = true;
- } else if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("calc-add-in"))) ) {
- options.dump = false;
- options.shortnames = true;
- options.componenttype = 2;
- } else if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("add-on"))) ) {
- options.dump = false;
- options.shortnames = true;
- options.componenttype = 3;
- } else if ( readOption( &bOption, "h", &nPos, arg) ||
- readOption( &bOption, "help", &nPos, arg) ) {
- printUsageAndExit(programname, version);
- exit(EXIT_SUCCESS);
- } else if ( readOption( &bOption, "V", &nPos, arg) ||
- readOption( &bOption, "version", &nPos, arg) ) {
- std::cerr << "\n Sun Microsystems (R) " << programname
- << " Version " << version << "\n\n";
- exit(EXIT_SUCCESS);
- } else {
- std::cerr
- << "ERROR: unexpected command \""
- << OUStringToOString(arg, RTL_TEXTENCODING_UTF8).getStr()
- << "\"!\n";
- printUsageAndExit(programname, version);
- exit(EXIT_FAILURE);
- }
-
- // read up to arguments
- while ( nPos < nCount )
- {
- rtl_getAppCommandArg(nPos, &arg.pData);
-
- if ( readOption( &bOption, "a", &nPos, arg) ||
- readOption( &bOption, "all", &nPos, arg) ) {
- options.all = true;
- continue;
- }
- if ( readOption( &bOption, "java4", &nPos, arg) ) {
- options.java5 = false;
- options.language = 1;
- continue;
- }
- if ( readOption( &bOption, "java5", &nPos, arg) ) {
- options.java5 = true;
- options.language = 1;
- continue;
- }
- if ( readOption( &bOption, "cpp", &nPos, arg) ) {
- options.java5 = false;
- options.language = 2;
- continue;
- }
- if ( readOption( &bOption, "sn", &nPos, arg) ||
- readOption( &bOption, "shortnames", &nPos, arg) ) {
- options.shortnames = true;
- continue;
- }
- if ( readOption( &bOption, "lh", &nPos, arg) ||
- readOption( &bOption, "licenseheader", &nPos, arg) ) {
- options.license = true;
- continue;
- }
- if ( readOption( &bOption, "bc", &nPos, arg) ||
- readOption( &bOption, "backward-compatible", &nPos, arg) ) {
- options.backwardcompatible = true;
- continue;
- }
- if ( readOption( &bOption, "propertysetmixin", &nPos, arg) ) {
- options.supportpropertysetmixin = true;
- continue;
- }
- if ( readOption( &sOption, "d", &nPos, arg) ) {
- delegate = OUStringToOString(sOption, RTL_TEXTENCODING_UTF8);
- continue;
- }
- if ( readOption( &sOption, "n", &nPos, arg) ) {
- options.implname = OUStringToOString(sOption, RTL_TEXTENCODING_UTF8);
- continue;
- }
- if ( readOption( &sOption, "o", &nPos, arg) ) {
- options.outputpath = OUStringToOString(sOption, RTL_TEXTENCODING_UTF8);
- continue;
- }
- if ( readOption( &sOption, "l", &nPos, arg) ) {
- registries.push_back(sOption);
- continue;
- }
- if ( readOption( &sOption, "t", &nPos, arg) ) {
- types.push_back(OUStringToOString(sOption, RTL_TEXTENCODING_UTF8));
- continue;
- }
- if ( readOption( &sOption, "p", &nPos, arg) ) {
- OString sTmp(OUStringToOString(sOption, RTL_TEXTENCODING_UTF8));
- sal_Int32 nIndex= sTmp.indexOf(':');
- OString sPrt = sTmp.copy(0, nIndex+1);
- OString sCmds = sTmp.copy(nIndex+1);
-
- nIndex = 0;
- std::vector< OString > vCmds;
- do {
- OString sCmd = sCmds.getToken( 0, ',', nIndex );
- vCmds.push_back(sCmd);
- } while ( nIndex >= 0 );
-
- options.protocolCmdMap.insert(ProtocolCmdMap::value_type(sPrt, vCmds));
- continue;
- }
-
-
- // else illegal argument
- OUStringBuffer buf( 64 );
- buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("unexpected parameter \""));
- buf.append(arg);
- buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("\"!"));
- throw RuntimeException(buf.makeStringAndClear(),
- Reference< XInterface >());
- }
-
- if ( types.empty() && options.componenttype != 3) {
- std::cerr
- << ("\nError: no type is specified, use the -T option at least once\n");
- printUsageAndExit(programname, version);
- exit(EXIT_FAILURE);
- }
-
- UnoTypeManager manager;
- if ( !manager.init(registries) ) {
- std::cerr
- << ("\nError: Using the binary type libraries failed, check the -L"
- " options\n");
- exit(EXIT_FAILURE);
- }
-
- if ( options.dump ) {
- std::vector< OString >::const_iterator iter = types.begin();
- while (iter != types.end()) {
- std::cout << "\n/***************************************************"
- "*****************************/\n";
- switch (options.language )
- {
- case 1: //Java
- java::generateDocumentation(std::cout, options, manager,
- *iter, delegate);
- break;
- case 2: //C++
- cpp::generateDocumentation(std::cout, options, manager,
- *iter, delegate);
- break;
- default:
- OSL_ASSERT(false);
- break;
- }
- ++iter;
- }
- } else {
- switch ( options.language )
- {
- case 1: //Java
- java::generateSkeleton(options, manager, types, delegate);
- break;
- case 2: //C++
- cpp::generateSkeleton(options, manager, types, delegate);
- break;
- default:
- OSL_ASSERT(false);
- break;
- }
- }
-
- } catch (CannotDumpException & e) {
- std::cout.flush();
- std::cerr << "\nError: " << e.m_message << std::endl;
- } catch(Exception& e) {
- std::cout.flush();
- std::cerr
- << "\nError: "
- << OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()
- << std::endl;
- }
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/unodevtools/makefile.mk b/unodevtools/source/unodevtools/makefile.mk
deleted file mode 100644
index d8f0920a..00000000
--- a/unodevtools/source/unodevtools/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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=unodevtools
-TARGET=unodevtools
-
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-.INCLUDE : settings.mk
-
-# ------------------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/typemanager.obj \
- $(SLO)$/typeblob.obj \
- $(SLO)$/options.obj
-
-LIB1TARGET=$(LB)$/$(TARGET).lib
-LIB1ARCHIV=$(LB)$/lib$(TARGET).a
-LIB1OBJFILES=$(SLOFILES)
-
-# ------------------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
deleted file mode 100644
index 305ce54d..00000000
--- a/unodevtools/source/unodevtools/options.cxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 <stdio.h>
-
-#include "rtl/ustring.hxx"
-#include "rtl/ustrbuf.hxx"
-#include "rtl/process.h"
-
-#include "com/sun/star/uno/RuntimeException.hpp"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-namespace unodevtools {
-
-//-------------------------------------------------------------------------------
-#if OSL_DEBUG_LEVEL > 1
-static void out( const sal_Char * pText )
-{
- fprintf( stderr, pText );
-}
-#endif
-
-//-------------------------------------------------------------------------------
-sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const OUString & aArg)
- throw (RuntimeException)
-{
- const OUString dash = OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
- if(aArg.indexOf(dash) != 0)
- return sal_False;
-
- OUString aOpt = OUString::createFromAscii( pOpt );
-
- if (aArg.getLength() < aOpt.getLength())
- return sal_False;
-
- if (aOpt.equalsIgnoreAsciiCase( aArg.copy(1) )) {
- // take next argument
- ++(*pnIndex);
-
- rtl_getAppCommandArg(*pnIndex, &pValue->pData);
- if (*pnIndex >= (sal_Int32)rtl_getAppCommandArgCount() ||
- pValue->copy(1).equals(dash))
- {
- OUStringBuffer buf( 32 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("incomplete option \"-") );
- buf.appendAscii( pOpt );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" given!") );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
- } else {
-#if OSL_DEBUG_LEVEL > 1
- out( "\n> identified option -" );
- out( pOpt );
- out( " = " );
- OString tmp = OUStringToOString(*pValue, RTL_TEXTENCODING_ASCII_US);
- out( tmp.getStr() );
-#endif
- ++(*pnIndex);
- return sal_True;
- }
- } else if (aArg.indexOf(aOpt) == 1) {
- *pValue = aArg.copy(1 + aOpt.getLength());
-#if OSL_DEBUG_LEVEL > 1
- out( "\n> identified option -" );
- out( pOpt );
- out( " = " );
- OString tmp = OUStringToOString(*pValue, RTL_TEXTENCODING_ASCII_US);
- out( tmp.getStr() );
-#endif
- ++(*pnIndex);
-
- return sal_True;
- }
- return sal_False;
-}
-
-//-------------------------------------------------------------------------------
-sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const OUString & aArg)
-{
- const OUString dashdash(RTL_CONSTASCII_USTRINGPARAM("--"));
- const OUString dash(RTL_CONSTASCII_USTRINGPARAM("-"));
- OUString aOpt = OUString::createFromAscii(pOpt);
-
- if((aArg.indexOf(dash) == 0 && aOpt.equalsIgnoreAsciiCase(aArg.copy(1))) ||
- (aArg.indexOf(dashdash) == 0 && aOpt.equalsIgnoreAsciiCase(aArg.copy(2))) )
- {
- ++(*pnIndex);
- *pbOpt = sal_True;
-#if OSL_DEBUG_LEVEL > 1
- out( "\n> identified option --" );
- out( pOpt );
-#endif
- return sal_True;
- }
- return sal_False;
-}
-
-} // end of namespace unodevtools
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/unodevtools/typeblob.cxx b/unodevtools/source/unodevtools/typeblob.cxx
deleted file mode 100644
index cf53d59c..00000000
--- a/unodevtools/source/unodevtools/typeblob.cxx
+++ /dev/null
@@ -1,810 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "rtl/alloc.h"
-#include "registry/writer.hxx"
-
-#include "com/sun/star/beans/PropertyAttribute.hpp"
-#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
-#include "com/sun/star/reflection/XPublished.hpp"
-#include "com/sun/star/reflection/XInterfaceTypeDescription2.hpp"
-#include "com/sun/star/reflection/XSingletonTypeDescription2.hpp"
-#include "com/sun/star/reflection/XServiceTypeDescription2.hpp"
-#include "com/sun/star/reflection/XStructTypeDescription.hpp"
-#include "com/sun/star/reflection/XConstantsTypeDescription.hpp"
-#include "com/sun/star/reflection/XConstantTypeDescription.hpp"
-#include "com/sun/star/reflection/XModuleTypeDescription.hpp"
-#include "com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp"
-#include "com/sun/star/reflection/XInterfaceAttributeTypeDescription2.hpp"
-#include "com/sun/star/reflection/XMethodParameter.hpp"
-#include "com/sun/star/reflection/XCompoundTypeDescription.hpp"
-#include "com/sun/star/reflection/XIndirectTypeDescription.hpp"
-#include "com/sun/star/reflection/XEnumTypeDescription.hpp"
-
-#include "codemaker/generatedtypeset.hxx"
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::container;
-using namespace com::sun::star::reflection;
-using namespace codemaker;
-
-using ::rtl::OUString;
-using ::rtl::OString;
-using ::rtl::OStringToOUString;
-using ::rtl::OUStringToOString;
-
-namespace unodevtools {
-
-void writeConstantData(typereg::Writer& rWriter, sal_uInt16 fieldIndex,
- const Reference< XConstantTypeDescription >& xConstant)
-
-{
- RTConstValue constValue;
- OUString uConstTypeName;
- OUString uConstName = xConstant->getName();
- Any aConstantAny = xConstant->getConstantValue();
-
- switch ( aConstantAny.getValueTypeClass() )
- {
- case TypeClass_BOOLEAN:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("boolean"));
- constValue.m_type = RT_TYPE_BOOL;
- aConstantAny >>= constValue.m_value.aBool;
- }
- break;
- case TypeClass_BYTE:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("byte"));
- constValue.m_type = RT_TYPE_BYTE;
- aConstantAny >>= constValue.m_value.aByte;
- }
- break;
- case TypeClass_SHORT:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("short"));
- constValue.m_type = RT_TYPE_INT16;
- aConstantAny >>= constValue.m_value.aShort;
- }
- break;
- case TypeClass_UNSIGNED_SHORT:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned short"));
- constValue.m_type = RT_TYPE_UINT16;
- aConstantAny >>= constValue.m_value.aUShort;
- }
- break;
- case TypeClass_LONG:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("long"));
- constValue.m_type = RT_TYPE_INT32;
- aConstantAny >>= constValue.m_value.aLong;
- }
- break;
- case TypeClass_UNSIGNED_LONG:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned long"));
- constValue.m_type = RT_TYPE_UINT32;
- aConstantAny >>= constValue.m_value.aULong;
- }
- break;
- case TypeClass_FLOAT:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("float"));
- constValue.m_type = RT_TYPE_FLOAT;
- aConstantAny >>= constValue.m_value.aFloat;
- }
- break;
- case TypeClass_DOUBLE:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("double"));
- constValue.m_type = RT_TYPE_DOUBLE;
- aConstantAny >>= constValue.m_value.aDouble;
- }
- break;
- case TypeClass_STRING:
- {
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("string"));
- constValue.m_type = RT_TYPE_STRING;
- constValue.m_value.aString = ((OUString*)aConstantAny.getValue())->getStr();
- }
- break;
- default:
- OSL_FAIL( "unsupported constant type" );
- break;
- }
-
- rWriter.setFieldData(fieldIndex, OUString(), OUString(), RT_ACCESS_CONST,
- uConstName, uConstTypeName, constValue);
-}
-
-sal_uInt32 getInheritedMemberCount(
- GeneratedTypeSet& checkedTypes,
- Sequence< Reference< XTypeDescription > >& superTypes)
-{
- sal_uInt32 memberCount = 0;
-
- sal_uInt16 count = (sal_uInt16)superTypes.getLength();
- OString name;
- for (sal_uInt16 i=0; i < count; i++) {
- name = OString(OUStringToOString(superTypes[i]->getName(),
- RTL_TEXTENCODING_UTF8));
- if (!checkedTypes.contains(name)) {
- checkedTypes.add(name);
-
- Reference< XInterfaceTypeDescription2 > xIFace(
- superTypes[i], UNO_QUERY);
-
- Sequence< Reference< XTypeDescription> > baseTypes =
- xIFace->getBaseTypes();
- if ( baseTypes.getLength() > 0)
- memberCount += getInheritedMemberCount(checkedTypes, baseTypes);
-
- memberCount += xIFace->getMembers().getLength();
- }
- }
-
- return memberCount;
-}
-
-void writeMethodData( typereg::Writer& rWriter, sal_uInt32 calculatedMemberOffset,
- const Reference< XInterfaceMethodTypeDescription >& xMethod )
-{
- RTMethodMode methodMode = RT_MODE_TWOWAY;
- if ( xMethod->isOneway() )
- methodMode = RT_MODE_ONEWAY;
-
- Sequence< Reference< XMethodParameter > > parameters(xMethod->getParameters());
- Sequence< Reference< XTypeDescription > > exceptions(xMethod->getExceptions());
-
- OUString name(xMethod->getMemberName());
- sal_uInt16 methodIndex = (sal_uInt16)(xMethod->getPosition()
- - calculatedMemberOffset);
- sal_uInt16 paramCount = (sal_uInt16)parameters.getLength();
- sal_uInt16 exceptionCount = (sal_uInt16)exceptions.getLength();
-
- rWriter.setMethodData(methodIndex, OUString(), methodMode,
- xMethod->getMemberName(),
- xMethod->getReturnType()->getName().replace('.', '/'),
- paramCount, exceptionCount);
-
- RTParamMode paramMode = RT_PARAM_IN;
- sal_uInt16 i;
-
- for ( i=0; i < paramCount; i++) {
- Reference< XMethodParameter > xParam = parameters[i];
- if ( xParam->isIn() && xParam->isOut())
- paramMode = RT_PARAM_INOUT;
- else if ( xParam->isIn() )
- paramMode = RT_PARAM_IN;
- else if ( xParam->isOut() )
- paramMode = RT_PARAM_OUT;
-
- rWriter.setMethodParameterData(methodIndex,
- (sal_uInt16)xParam->getPosition(),
- paramMode, xParam->getName(),
- xParam->getType()->
- getName().replace('.', '/'));
- }
-
- for (i=0; i < exceptionCount; i++) {
- rWriter.setMethodExceptionTypeName(
- methodIndex, i, exceptions[i]->getName().replace('.', '/'));
- }
-}
-
-void writeAttributeMethodData(
- typereg::Writer& rWriter, sal_uInt16& methodindex, RTMethodMode methodmode,
- const Reference<XInterfaceAttributeTypeDescription2>& xAttr)
-{
- Sequence<Reference<XCompoundTypeDescription> > seqExcp;
- if (methodmode == RT_MODE_ATTRIBUTE_GET)
- seqExcp = xAttr->getGetExceptions();
- else
- seqExcp = xAttr->getSetExceptions();
-
- if (seqExcp.getLength() > 0) {
- rWriter.setMethodData(methodindex, OUString(), methodmode,
- xAttr->getMemberName(),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("void")),
- 0, (sal_uInt16)seqExcp.getLength());
-
- for (sal_Int32 i=0; i < seqExcp.getLength(); i++) {
- rWriter.setMethodExceptionTypeName(
- methodindex, (sal_uInt16)i,
- seqExcp[i]->getName().replace('.', '/'));
- }
- ++methodindex;
- }
-}
-
-RTFieldAccess checkParameterizedTypeFlag(const Sequence< OUString >& typeParams,
- const OUString & memberType)
-{
- for (sal_uInt16 i=0; i < typeParams.getLength(); i++) {
- if (typeParams[i].equals(memberType))
- return RT_ACCESS_PARAMETERIZED_TYPE;
- }
-
- return RT_ACCESS_READWRITE;
-}
-
-RTFieldAccess checkPropertyFlags(short flags) {
- RTFieldAccess propertyFlags=RT_ACCESS_INVALID;
- switch(flags) {
- case PropertyAttribute::MAYBEVOID:
- propertyFlags |= RT_ACCESS_MAYBEVOID;
- case PropertyAttribute::BOUND:
- propertyFlags |= RT_ACCESS_BOUND;
- case PropertyAttribute::CONSTRAINED:
- propertyFlags |= RT_ACCESS_CONSTRAINED;
- case PropertyAttribute::TRANSIENT:
- propertyFlags |= RT_ACCESS_TRANSIENT;
- case PropertyAttribute::READONLY :
- propertyFlags |= RT_ACCESS_READONLY;
- case PropertyAttribute::MAYBEAMBIGUOUS:
- propertyFlags |= RT_ACCESS_MAYBEAMBIGUOUS;
- case PropertyAttribute::MAYBEDEFAULT:
- propertyFlags |= RT_ACCESS_MAYBEDEFAULT;
- case PropertyAttribute::REMOVEABLE:
- propertyFlags |= RT_ACCESS_REMOVEABLE;
- case PropertyAttribute::OPTIONAL:
- propertyFlags |= RT_ACCESS_OPTIONAL;
- }
- return propertyFlags;
-}
-
-void* getTypeBlob(Reference< XHierarchicalNameAccess > xTDmgr,
- const OString& typeName, sal_uInt32* blobsize)
-{
- if ( typeName.getLength() == 0 )
- return NULL;
-
- OUString uTypeName(OStringToOUString(typeName, RTL_TEXTENCODING_UTF8)
- .replace('/', '.'));
-
- Any aTypeAny( xTDmgr->getByHierarchicalName( uTypeName ) );
-
- if ( !aTypeAny.hasValue() )
- return NULL;
-
- Reference< XTypeDescription > xType;
- aTypeAny >>= xType;
-
- if ( !xType.is() )
- return NULL;
-
- Reference< XPublished > xPublished(xType, UNO_QUERY);
- void* pBlob = NULL;
- switch (xType->getTypeClass())
- {
- case TypeClass_CONSTANTS:
- {
- Reference< XConstantsTypeDescription > xCFace(xType, UNO_QUERY);
-
- if ( !xCFace.is() )
- return NULL;
-
- Sequence< Reference< XConstantTypeDescription > > constTypes(
- xCFace->getConstants());
- sal_uInt16 constCount = (sal_uInt16)constTypes.getLength();
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_CONSTANTS, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- 0, constCount, 0, 0);
-
- for (sal_uInt16 i=0; i < constCount; i++)
- writeConstantData(writer, i, constTypes[i]);
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_MODULE:
- {
- Reference< XModuleTypeDescription > xMFace(xType, UNO_QUERY);
-
- if ( !xMFace.is() )
- return NULL;
-
- Sequence< Reference< XTypeDescription > > memberTypes(
- xMFace->getMembers());
-
- sal_uInt16 memberCount = (sal_uInt16)memberTypes.getLength();
- sal_uInt16 constCount = 0;
- sal_Int16 i;
-
- for ( i=0; i < memberCount; i++) {
- if ( TypeClass_CONSTANT == memberTypes[i]->getTypeClass() )
- constCount++;
- }
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_MODULE, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- 0, constCount, 0, 0);
-
- if ( 0 < constCount ) {
- Reference< XConstantTypeDescription > xConst;
- sal_uInt16 fieldIndex = 0;
- for (i=0; i < memberCount; i++) {
- if ( TypeClass_CONSTANT == memberTypes[i]->getTypeClass() ) {
- xConst = Reference< XConstantTypeDescription >(
- memberTypes[i], UNO_QUERY);
-
- writeConstantData(writer, ++fieldIndex, xConst);
- }
- }
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_INTERFACE:
- {
- Reference< XInterfaceTypeDescription2 > xIFace(xType, UNO_QUERY);
-
- if ( !xIFace.is() )
- return NULL;
-
- Reference< XInterfaceAttributeTypeDescription2 > xAttr;
- Reference< XInterfaceMethodTypeDescription > xMethod;
- Sequence< Reference< XInterfaceMemberTypeDescription > > memberTypes(
- xIFace->getMembers());
- Sequence< Reference< XTypeDescription > > baseTypes =
- xIFace->getBaseTypes();
- Sequence< Reference< XTypeDescription > > optBaseTypes =
- xIFace->getOptionalBaseTypes();
-
- sal_uInt16 baseCount = (sal_uInt16)baseTypes.getLength();
- sal_uInt16 optBaseCount = (sal_uInt16)optBaseTypes.getLength();
- sal_uInt16 memberCount = (sal_uInt16)memberTypes.getLength();
- sal_uInt16 attrCount = 0, attrmethods = 0;
- sal_uInt16 inheritedMemberCount = 0;
- sal_uInt16 i;
-
- for (i=0; i < memberCount; i++) {
- xAttr = Reference< XInterfaceAttributeTypeDescription2 >(
- memberTypes[i], UNO_QUERY);
- if ( xAttr.is() ) {
- attrCount++;
-
- if (xAttr->getGetExceptions().getLength() > 0)
- attrmethods++;
-
- if (xAttr->getSetExceptions().getLength() > 0)
- attrmethods++;
- }
- }
-
- // check inherited members count
- if (baseCount > 0) {
- GeneratedTypeSet checkedTypes;
- inheritedMemberCount = (sal_uInt16)getInheritedMemberCount(
- checkedTypes, baseTypes );
- }
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_INTERFACE, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- baseCount, attrCount, memberCount-attrCount+attrmethods,
- (sal_uInt16)optBaseTypes.getLength());
-
- // set super types
- for (i=0; i < baseCount; i++) {
- writer.setSuperTypeName(i, baseTypes[i]->
- getName().replace('.', '/'));
- }
-
- // set optional super types
- RTReferenceType referenceType = RT_REF_SUPPORTS;
- RTFieldAccess fieldAccess = RT_ACCESS_OPTIONAL;
- for (i=0; i < optBaseCount; i++) {
- writer.setReferenceData(i, OUString(), referenceType,
- fieldAccess, optBaseTypes[i]->
- getName().replace('.', '/'));
- }
-
- fieldAccess = RT_ACCESS_READWRITE;
- // reset attrCount, used for method index calculation
- attrCount = 0;
- attrmethods = 0;
- for (i=0; i < memberCount; i++) {
- xAttr = Reference< XInterfaceAttributeTypeDescription2 >(
- memberTypes[i], UNO_QUERY);
- if ( xAttr.is() ) {
- ++attrCount;
- if (xAttr->isReadOnly())
- fieldAccess = RT_ACCESS_READONLY;
- else
- fieldAccess = RT_ACCESS_READWRITE;
-
- if (xAttr->isBound())
- fieldAccess |= RT_ACCESS_BOUND;
-
- writer.setFieldData((sal_uInt16)memberTypes[i]->getPosition()
- - inheritedMemberCount,
- OUString(), OUString(), fieldAccess,
- memberTypes[i]->getMemberName(),
- xAttr->getType()->getName().replace('.','/'),
- RTConstValue());
-
- writeAttributeMethodData(writer, attrmethods,
- RT_MODE_ATTRIBUTE_GET, xAttr);
- if (!xAttr->isReadOnly()) {
- writeAttributeMethodData(writer, attrmethods,
- RT_MODE_ATTRIBUTE_SET, xAttr);
- }
-
- continue;
- }
-
- xMethod = Reference< XInterfaceMethodTypeDescription >(
- memberTypes[i], UNO_QUERY);
- if ( xMethod.is() ) {
- writeMethodData(writer, attrCount+inheritedMemberCount-attrmethods,
- xMethod);
- }
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_STRUCT:
- {
- Reference< XStructTypeDescription > xStruct(xType, UNO_QUERY);
-
- if ( !xStruct.is() )
- return NULL;
-
- if ( xStruct->getTypeArguments().getLength() > 0)
- return NULL;
-
-
- Sequence< OUString > typeParams( xStruct->getTypeParameters());
- Sequence< OUString > memberNames( xStruct->getMemberNames());
- Sequence< Reference< XTypeDescription > > memberTypes(
- xStruct->getMemberTypes());
- sal_uInt16 memberCount = (sal_uInt16)memberNames.getLength();
-
- OUString uSuperType;
- sal_uInt16 superCount=0;
- if ( typeParams.getLength() == 0) {
- Reference< XTypeDescription > xSuperType = xStruct->getBaseType();
- if ( xSuperType.is() ) {
- ++superCount;
- uSuperType = xSuperType->getName().replace('.','/');
- }
- }
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_STRUCT, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- superCount, memberCount, 0,
- (sal_uInt16)typeParams.getLength());
-
- // set super type
- if (superCount > 0) {
- writer.setSuperTypeName(0, uSuperType);
- }
-
- sal_uInt16 i=0;
- for (i=0; i < memberCount; i++) {
- RTFieldAccess fieldAccess = RT_ACCESS_READWRITE;
- if (typeParams.getLength() > 0)
- fieldAccess |= checkParameterizedTypeFlag(
- typeParams, memberTypes[i]->getName());
-
- writer.setFieldData(i, OUString(), OUString(), fieldAccess,
- memberNames[i],
- memberTypes[i]->getName().replace('.', '/'),
- RTConstValue());
- }
-
- for (i=0; i < typeParams.getLength(); i++) {
- writer.setReferenceData(i, OUString(), RT_REF_TYPE_PARAMETER,
- RT_ACCESS_INVALID, typeParams[i]);
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_EXCEPTION:
- {
- Reference< XCompoundTypeDescription > xComp(xType, UNO_QUERY);
-
- if ( !xComp.is() )
- return NULL;
-
- Sequence< OUString > memberNames( xComp->getMemberNames());
- Sequence< Reference< XTypeDescription > > memberTypes(
- xComp->getMemberTypes());
- sal_uInt16 memberCount = (sal_uInt16)memberNames.getLength();
-
- OUString uSuperType;
- sal_uInt16 superCount=0;
- Reference< XTypeDescription > xSuperType = xComp->getBaseType();
- if ( xSuperType.is() ) {
- ++superCount;
- uSuperType = xSuperType->getName().replace('.','/');
- }
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_EXCEPTION, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- superCount, memberCount, 0, 0);
-
- // set super type
- if (superCount > 0) {
- writer.setSuperTypeName(0, uSuperType);
- }
-
- for (sal_Int16 i=0; i < memberCount; i++) {
- writer.setFieldData(i, OUString(), OUString(), RT_ACCESS_READWRITE,
- memberNames[i],
- memberTypes[i]->getName().replace('.', '/'),
- RTConstValue());
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_ENUM:
- {
- Reference< XEnumTypeDescription > xEnum(xType, UNO_QUERY);
-
- if ( !xEnum.is() )
- return NULL;
-
- Sequence< OUString > enumNames( xEnum->getEnumNames());
- Sequence< sal_Int32 > enumValues( xEnum->getEnumValues());
- sal_uInt16 enumCount = (sal_uInt16)enumNames.getLength();
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_ENUM, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- 0, enumCount, 0, 0);
-
- RTConstValue constValue;
- for (sal_Int16 i=0; i < enumCount; i++) {
- constValue.m_type = RT_TYPE_INT32;
- constValue.m_value.aLong = enumValues[i];
-
- writer.setFieldData(i, OUString(), OUString(),
- RT_ACCESS_CONST, enumNames[i],
- OUString(), constValue);
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_TYPEDEF:
- {
- Reference< XIndirectTypeDescription > xTD(xType, UNO_QUERY);
-
- if ( !xTD.is() )
- return NULL;
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_TYPEDEF, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- 1, 0, 0, 0);
-
- writer.setSuperTypeName(0, xTD->getReferencedType()
- ->getName().replace('.','/'));
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_SERVICE:
- {
- Reference< XServiceTypeDescription2 > xService(xType, UNO_QUERY);
-
- if ( !xService.is() )
- return NULL;
-
- Sequence<Reference<XServiceConstructorDescription> > constructors(
- xService->getConstructors());
- Sequence<Reference<XPropertyTypeDescription> > properties;
- Sequence<Reference<XServiceTypeDescription> > mandatoryServices;
- Sequence<Reference<XServiceTypeDescription> > optionalServices;
- Sequence<Reference<XInterfaceTypeDescription> > mandatoryInterfaces;
- Sequence<Reference<XInterfaceTypeDescription> > optionalInterfaces;
- sal_uInt16 methodCount = (sal_uInt16)constructors.getLength();
- sal_uInt16 referenceCount = 0;
- sal_uInt16 propertyCount = 0;
-
- if ( !xService->isSingleInterfaceBased() ) {
- mandatoryServices = xService->getMandatoryServices();
- optionalServices = xService->getOptionalServices();
- mandatoryInterfaces = xService->getMandatoryInterfaces();
- optionalInterfaces = xService->getOptionalInterfaces();
- properties = xService->getProperties();
- referenceCount = (sal_uInt16)(
- mandatoryServices.getLength()+
- optionalServices.getLength()+
- mandatoryInterfaces.getLength()+
- optionalInterfaces.getLength());
- propertyCount = (sal_uInt16)properties.getLength();
- }
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_SERVICE, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- (xService->isSingleInterfaceBased() ? 1 : 0),
- propertyCount, methodCount, referenceCount);
-
- sal_uInt16 i=0;
- if ( xService->isSingleInterfaceBased() ) {
- writer.setSuperTypeName(0, xService->getInterface()
- ->getName().replace('.','/'));
-
- sal_uInt16 j=0;
- for ( i=0; i<methodCount; i++ ) {
- Reference<XServiceConstructorDescription> xConstructor(
- constructors[i], UNO_QUERY);
- Sequence<Reference<XParameter> > parameters;
- Sequence<Reference<XCompoundTypeDescription> > exceptions;
- sal_uInt16 parameterCount=0;
- sal_uInt16 exceptionCount=0;
- if ( !xConstructor->isDefaultConstructor() ) {
- parameters = xConstructor->getParameters();
- parameterCount = (sal_uInt16)parameters.getLength();
- }
-
- writer.setMethodData(i, OUString(), RT_MODE_TWOWAY,
- xConstructor->getName(),
- OUString(
- RTL_CONSTASCII_USTRINGPARAM("void")),
- parameterCount, exceptionCount);
-
- if ( !xConstructor->isDefaultConstructor() ) {
- for ( j=0; j<parameterCount; j++ ) {
- Reference<XParameter> xParam(parameters[j], UNO_QUERY);
- RTParamMode paramMode = RT_PARAM_IN;
- if (xParam->isRestParameter())
- paramMode = RT_PARAM_REST;
-
- writer.setMethodParameterData(
- i, (sal_uInt16)xParam->getPosition(),
- paramMode, xParam->getName(),
- xParam->getType()->getName().replace('.', '/'));
- }
-
- for (j=0; j<exceptionCount; j++) {
- Reference<XCompoundTypeDescription> xExcp(
- exceptions[j], UNO_QUERY);
-
- writer.setMethodExceptionTypeName(
- i, j, xExcp->getName().replace('.', '/'));
- }
- }
- }
- } else
- {
- for (i=0; i<propertyCount; i++) {
- Reference<XPropertyTypeDescription> xProp(
- properties[i], UNO_QUERY);
-
- RTFieldAccess propertyFlags = checkPropertyFlags(
- xProp->getPropertyFlags());
-
- writer.setFieldData(i, OUString(), OUString(),
- propertyFlags,
- xProp->getName().copy(xProp->getName().lastIndexOf('.')+1),
- xProp->getPropertyTypeDescription()
- ->getName().replace('.', '/'),
- RTConstValue());
- }
-
- sal_uInt16 refIndex = 0;
- sal_uInt16 length = (sal_uInt16)mandatoryServices.getLength();
- for (i=0; i < length; i++) {
- writer.setReferenceData(refIndex++, OUString(),
- RT_REF_EXPORTS, RT_ACCESS_INVALID,
- mandatoryServices[i]->getName()
- .replace('.', '/'));
- }
- length = (sal_uInt16)optionalServices.getLength();
- for (i=0; i < length; i++) {
- writer.setReferenceData(refIndex++, OUString(),
- RT_REF_EXPORTS, RT_ACCESS_OPTIONAL,
- optionalServices[i]->getName()
- .replace('.', '/'));
- }
- length = (sal_uInt16)mandatoryInterfaces.getLength();
- for (i=0; i < length; i++) {
- writer.setReferenceData(refIndex++, OUString(),
- RT_REF_SUPPORTS, RT_ACCESS_INVALID,
- mandatoryInterfaces[i]->getName()
- .replace('.', '/'));
- }
- length = (sal_uInt16)optionalInterfaces.getLength();
- for (i=0; i < length; i++) {
- writer.setReferenceData(refIndex++, OUString(),
- RT_REF_SUPPORTS, RT_ACCESS_OPTIONAL,
- optionalInterfaces[i]->getName()
- .replace('.', '/'));
- }
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- case TypeClass_SINGLETON:
- {
- Reference<XSingletonTypeDescription2> xSingleton(xType, UNO_QUERY);
-
- if ( !xSingleton.is() )
- return NULL;
-
- typereg::Writer writer(TYPEREG_VERSION_1, OUString(), OUString(),
- RT_TYPE_SINGLETON, xPublished->isPublished(),
- uTypeName.replace('.', '/'),
- 1, 0, 0, 0);
-
- if (xSingleton->isInterfaceBased()) {
- writer.setSuperTypeName(0, xSingleton->getInterface()
- ->getName().replace('.','/'));
- } else {
- writer.setSuperTypeName(0, xSingleton->getService()
- ->getName().replace('.','/'));
- }
-
- const void* p = writer.getBlob(blobsize);
- pBlob = (sal_uInt8*)rtl_allocateMemory(*blobsize);
- rtl_copyMemory(pBlob, p, *blobsize);
- }
- break;
- default:
- OSL_FAIL( "unsupported type" );
- break;
- }
-
- return pBlob;
-}
-
-} // end of namespace unodevtools
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/source/unodevtools/typemanager.cxx b/unodevtools/source/unodevtools/typemanager.cxx
deleted file mode 100644
index 70c16102..00000000
--- a/unodevtools/source/unodevtools/typemanager.cxx
+++ /dev/null
@@ -1,284 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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 "unodevtools/typemanager.hxx"
-
-#include "rtl/alloc.h"
-#include "registry/reader.hxx"
-#include "cppuhelper/bootstrap.hxx"
-
-#include "com/sun/star/container/XSet.hpp"
-#include "com/sun/star/reflection/XTypeDescription.hpp"
-#include "com/sun/star/registry/XSimpleRegistry.hpp"
-#include "com/sun/star/uno/XComponentContext.hpp"
-
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::reflection;
-
-namespace unodevtools {
-
-static RTTypeClass mapTypeClass(TypeClass typeclass) {
- switch(typeclass) {
- case TypeClass_ENUM:
- return RT_TYPE_ENUM;
- case TypeClass_TYPEDEF:
- return RT_TYPE_TYPEDEF;
- case TypeClass_STRUCT:
- return RT_TYPE_STRUCT;
- case TypeClass_UNION:
- return RT_TYPE_UNION;
- case TypeClass_EXCEPTION:
- return RT_TYPE_EXCEPTION;
- case TypeClass_INTERFACE:
- return RT_TYPE_INTERFACE;
- case TypeClass_SERVICE:
- return RT_TYPE_SERVICE;
- case TypeClass_MODULE:
- return RT_TYPE_MODULE;
- case TypeClass_CONSTANTS:
- return RT_TYPE_CONSTANTS;
- case TypeClass_SINGLETON:
- return RT_TYPE_SINGLETON;
- default:
- break;
- }
- return RT_TYPE_INVALID;
-}
-
-
-UnoTypeManager::UnoTypeManager()
-{
- m_pImpl = new UnoTypeManagerImpl();
- acquire();
-}
-
-UnoTypeManager::~UnoTypeManager()
-{
- release();
-}
-
-void UnoTypeManager::release()
-{
- if (0 == TypeManager::release())
- delete m_pImpl;
-}
-
-sal_Bool UnoTypeManager::init(
- const ::std::vector< ::rtl::OUString > registries)
-{
- Reference< XComponentContext > xContext=
- defaultBootstrap_InitialComponentContext();
-
- if ( !xContext.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't create initial UNO component context"));
- throw RuntimeException( msg, Reference< XInterface >());
- }
- Any a = xContext->getValueByName(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "/singletons/com.sun.star.reflection.theTypeDescriptionManager")));
-
- a >>= m_pImpl->m_tdmgr;
-
- if ( !m_pImpl->m_tdmgr.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't get TypeDescriptionManager"));
- throw RuntimeException( msg, Reference< XInterface >());
- }
-
- if ( !registries.empty() ) {
-
- Reference< XMultiComponentFactory > xServiceManager(
- xContext->getServiceManager() );
- if ( !xServiceManager.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't get ServiceManager"));
- throw RuntimeException( msg, Reference< XInterface >());
- }
-
- Sequence<Any> seqArgs(registries.size());
-
- std::vector< OUString >::const_iterator iter = registries.begin();
- int i = 0;
- while ( iter != registries.end() )
- {
- Reference< XSimpleRegistry > xReg(
- xServiceManager->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry")),
- xContext), UNO_QUERY);
- xReg->open(convertToFileUrl(
- OUStringToOString(*iter, RTL_TEXTENCODING_UTF8)),
- sal_True, sal_False);
-
- seqArgs[i++] = makeAny(xReg);
- ++iter;
- }
-
- Reference< XHierarchicalNameAccess > xTDProvider(
- xServiceManager->createInstanceWithArgumentsAndContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.reflection.TypeDescriptionProvider")),
- seqArgs, xContext),
- UNO_QUERY);
- if ( !xTDProvider.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't create local"
- " type description provider"));
- throw RuntimeException( msg, Reference< XInterface >());
- }
-
- a = makeAny(xTDProvider);
- Reference< XSet > xSet(m_pImpl->m_tdmgr, UNO_QUERY);
- xSet->insert(a);
- }
-
- return sal_True;
-}
-
-sal_Bool UnoTypeManager::isValidType(const ::rtl::OString& name) const
-{
- return m_pImpl->m_tdmgr->hasByHierarchicalName(
- OStringToOUString(name, RTL_TEXTENCODING_UTF8));
-}
-
-OString UnoTypeManager::getTypeName(RegistryKey& rTypeKey) const
-{
- OString typeName = OUStringToOString(rTypeKey.getName(), RTL_TEXTENCODING_UTF8);
- static OString sBase("/UCR");
- if (typeName.indexOf(sBase) == 0) {
- typeName = typeName.copy(typeName.indexOf('/', 1) + 1);
- } else {
- typeName = typeName.copy(1);
- }
- return typeName;
-}
-
-// extern
-void* getTypeBlob(Reference< XHierarchicalNameAccess > xTDmgr,
- const OString& typeName, sal_uInt32* pBlob);
-
-typereg::Reader UnoTypeManager::getTypeReader(
- const OString& name, sal_Bool * /*pIsExtraType*/ ) const
-{
- typereg::Reader reader;
-
- void* pBlob = NULL;
- sal_uInt32 blobsize = 0;
-
- if ( (pBlob = getTypeBlob(m_pImpl->m_tdmgr, name, &blobsize)) != NULL )
- reader = typereg::Reader(pBlob, blobsize, sal_True, TYPEREG_VERSION_1);
-
- if ( pBlob )
- rtl_freeMemory(pBlob);
-
- return reader;
-}
-
-typereg::Reader UnoTypeManager::getTypeReader(RegistryKey& rTypeKey) const
-{
- typereg::Reader reader;
-
- if (rTypeKey.isValid()) {
- RegValueType valueType;
- sal_uInt32 valueSize;
-
- if (!rTypeKey.getValueInfo(OUString(), &valueType, &valueSize)) {
- sal_uInt8* pBuffer = (sal_uInt8*)rtl_allocateMemory(valueSize);
- if ( !rTypeKey.getValue(OUString(), pBuffer) ) {
- reader = typereg::Reader(
- pBuffer, valueSize, true, TYPEREG_VERSION_1);
- }
- rtl_freeMemory(pBuffer);
- }
- }
- return reader;
-}
-
-
-RTTypeClass UnoTypeManager::getTypeClass(const OString& name) const
-{
- if ( m_pImpl->m_t2TypeClass.count(name) > 0 ) {
- return m_pImpl->m_t2TypeClass[name];
- } else {
- Reference< XTypeDescription > xTD;
- Any a = m_pImpl->m_tdmgr->getByHierarchicalName(
- OStringToOUString(name, RTL_TEXTENCODING_UTF8));
- a >>= xTD;
-
- if ( xTD.is() ) {
- RTTypeClass tc = mapTypeClass(xTD->getTypeClass());
- if (tc != RT_TYPE_INVALID)
- m_pImpl->m_t2TypeClass[name] = tc;
- return tc;
- }
- }
-
- return RT_TYPE_INVALID;
-}
-
-RTTypeClass UnoTypeManager::getTypeClass(RegistryKey& rTypeKey) const
-{
- OString name = getTypeName(rTypeKey);
-
- if ( m_pImpl->m_t2TypeClass.count(name) > 0 ) {
- return m_pImpl->m_t2TypeClass[name];
- } else {
- if ( rTypeKey.isValid() ) {
- RegValueType valueType;
- sal_uInt32 valueSize;
-
- if ( !rTypeKey.getValueInfo(OUString(), &valueType, &valueSize) ) {
- sal_uInt8* pBuffer = (sal_uInt8*)rtl_allocateMemory(valueSize);
- if ( !rTypeKey.getValue(OUString(), pBuffer) ) {
- typereg::Reader reader(
- pBuffer, valueSize, false, TYPEREG_VERSION_1);
-
- RTTypeClass ret = reader.getTypeClass();
-
- rtl_freeMemory(pBuffer);
-
- m_pImpl->m_t2TypeClass[name] = ret;
- return ret;
- }
- rtl_freeMemory(pBuffer);
- }
- }
- }
-
- return RT_TYPE_INVALID;
-}
-
-} // end of namespace unodevtools
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unodevtools/unodevtools.pmk b/unodevtools/unodevtools.pmk
deleted file mode 100755
index c2d119c2..00000000
--- a/unodevtools/unodevtools.pmk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-.IF "$(GUI)"=="WNT"
-UNODEVTOOLSLIBDEPN=unodevtools.lib
-CODEMAKERLIBDEPN=codemaker.lib
-COMMONCPPLIBDEPN=commoncpp.lib
-COMMONJAVALIBDEPN=commonjava.lib
-.IF "$(COM)"=="GCC"
-UNODEVTOOLSLIBST=-lunodevtools
-CODEMAKERLIBST=-lcodemaker
-COMMONCPPLIBST=-lcommoncpp
-COMMONJAVALIBST=-lcommonjava
-.ELSE
-UNODEVTOOLSLIBST=unodevtools.lib
-CODEMAKERLIBST=codemaker.lib
-COMMONCPPLIBST=commoncpp.lib
-COMMONJAVALIBST=commonjava.lib
-.ENDIF
-
-.ELSE
-UNODEVTOOLSLIBDEPN=libunodevtools.a
-CODEMAKERLIBDEPN=libcodemaker.a
-COMMONCPPLIBDEPN=libcommoncpp.a
-COMMONJAVALIBDEPN=libcommonjava.a
-UNODEVTOOLSLIBST=-lunodevtools
-CODEMAKERLIBST=-lcodemaker
-COMMONCPPLIBST=-lcommoncpp
-COMMONJAVALIBST=-lcommonjava
-.ENDIF
-